@build-script/esbuild-html-entry 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 GongT<admin@gongt.me>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # yet another esbuild html entry plugin
2
+
3
+ ### Usage:
4
+ ```js
5
+ import { HtmlEntryPlugin } from '@gongt/esbuild-html-entry'
6
+
7
+
8
+ const ctx = await esbuild.context({
9
+ entryPoints: ['src/index.html'],
10
+ outdir: 'lib',
11
+ entryNames: '[name]-[hash]',
12
+ metafile: true, // <-- this is required
13
+ plugins: [
14
+ new ESBuildHtmlEntry(), // should be first in most case
15
+ ],
16
+ });
17
+
18
+ await ctx.rebuild();
19
+ await ctx.dispose();
20
+ ```
21
+
22
+ ### Then write HTML like this:
23
+ ```html
24
+ <!doctype html>
25
+ <html>
26
+ <head>
27
+ <title>Test App</title>
28
+ <link rel="stylesheet" href="test.css">
29
+ <!-- <link rel="stylesheet" href="missing.css"> -->
30
+ <script type="module" src="index1.ts" defer></script>
31
+ <script type="module" src="index2.ts" defer></script>
32
+ <script>
33
+ console.log('hello static');
34
+ </script>
35
+ </head>
36
+ <body>
37
+ <h1>This is a test</h1>
38
+ </body>
39
+ </html>
40
+ ```
41
+
42
+ ### Note:
43
+ * esbuild will bundle files into one, so only first &lt;script> and &lt;link> tag will be used, and type/defer etc will be same value0.
package/lib/main.d.ts ADDED
@@ -0,0 +1,29 @@
1
+ import { type CheerioAPI } from 'cheerio';
2
+ import type esbuild from 'esbuild';
3
+ import { TagCollection } from './tag.js';
4
+ interface ICache {
5
+ readonly filepath: string;
6
+ readonly content: CheerioAPI;
7
+ readonly mtime: Date;
8
+ readonly tags: TagCollection;
9
+ result: esbuild.OnLoadResult;
10
+ }
11
+ export declare class HtmlEntryPlugin {
12
+ private readonly cache;
13
+ private readonly sourceRoot;
14
+ private readonly commonParent;
15
+ private readonly _resolve;
16
+ constructor(build: esbuild.PluginBuild);
17
+ onEnd(args: esbuild.BuildResult): Promise<esbuild.OnEndResult | null>;
18
+ protected findByInput(path: string): ICache | null;
19
+ onResolve(args: esbuild.OnResolveArgs): null | esbuild.OnResolveResult;
20
+ onLoad(args: esbuild.OnLoadResult): Promise<esbuild.OnLoadResult>;
21
+ private tryResolve;
22
+ private work;
23
+ }
24
+ export declare class ESBuildHtmlEntry implements esbuild.Plugin {
25
+ readonly name = "html-creation";
26
+ setup(build: esbuild.PluginBuild): void;
27
+ }
28
+ export {};
29
+ //# sourceMappingURL=main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAoB,MAAM,SAAS,CAAC;AAC5D,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAO,aAAa,EAAE,MAAM,UAAU,CAAC;AAQ9C,UAAU,MAAM;IACf,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC;CAC7B;AAED,qBAAa,eAAe;IAC3B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA6B;IACnD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqF;gBAElG,KAAK,EAAE,OAAO,CAAC,WAAW;IAmBhC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAoE3E,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM;IAUlC,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,aAAa,GAAG,IAAI,GAAG,OAAO,CAAC,eAAe;IAQhE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC;YAqDzD,UAAU;YAgBV,IAAI;CAclB;AAED,qBAAa,gBAAiB,YAAW,OAAO,CAAC,MAAM;IACtD,QAAQ,CAAC,IAAI,mBAAe;IAE5B,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,WAAW;CAUhC"}
package/lib/main.js ADDED
@@ -0,0 +1,182 @@
1
+ import { relativePath } from '@idlebox/node';
2
+ import { load as loadHtml } from 'cheerio';
3
+ import { readFile, stat, writeFile } from 'node:fs/promises';
4
+ import { basename, dirname, resolve } from 'node:path';
5
+ import { Tag, TagCollection } from './tag.js';
6
+ import { commonParent, debug } from './tools.js';
7
+ const PLUGIN_NAME = 'html-creation';
8
+ const NAMESPACE = 'esbuild-html-entry';
9
+ const isHtml = /.*\.html$/;
10
+ export class HtmlEntryPlugin {
11
+ cache = new Map();
12
+ sourceRoot;
13
+ commonParent;
14
+ _resolve;
15
+ constructor(build) {
16
+ debug('[plugin] absWorkingDir:', build.initialOptions.absWorkingDir);
17
+ this.sourceRoot = resolve(build.initialOptions.absWorkingDir ?? process.cwd());
18
+ debug('[plugin] sourceRoot:', this.sourceRoot);
19
+ const cr = resolve(this.sourceRoot, build.initialOptions.outdir ?? '.');
20
+ if (cr.startsWith(this.sourceRoot) || this.sourceRoot.startsWith(cr)) {
21
+ }
22
+ this.commonParent = commonParent(this.sourceRoot, cr);
23
+ debug('[plugin] commonParent:', this.commonParent);
24
+ this._resolve = build.resolve;
25
+ this.onResolve = this.onResolve.bind(this);
26
+ this.onLoad = this.onLoad.bind(this);
27
+ this.onEnd = this.onEnd.bind(this);
28
+ }
29
+ async onEnd(args) {
30
+ const res = { warnings: [], errors: [] };
31
+ if (!args.metafile) {
32
+ res.warnings.push({ text: 'html file(s) not created due to previous error' });
33
+ return res;
34
+ }
35
+ debug('\x1b[38;5;11m[onEnd]\x1b[0m outputFiles:', args.outputFiles?.map((e) => e.path));
36
+ debug(' metafile.outputs:', Object.keys(args.metafile.outputs));
37
+ const entryMap = new Map();
38
+ for (const [jsBundle, output] of Object.entries(args.metafile.outputs)) {
39
+ if (!output.entryPoint?.startsWith(`${NAMESPACE}:`)) {
40
+ debug('\x1b[2m ✘ %s (entry: %s)\x1b[0m', jsBundle, output.entryPoint);
41
+ continue;
42
+ }
43
+ debug('\x1b[38;5;14m ✔ %s\x1b[0m', jsBundle);
44
+ const sourceFile = output.entryPoint.substring(NAMESPACE.length + 1);
45
+ debug(' * sourceFile:', sourceFile);
46
+ const entry = this.cache.get(sourceFile);
47
+ if (!entry) {
48
+ res.errors.push({ text: 'entry not found', location: { file: sourceFile } });
49
+ continue;
50
+ }
51
+ debug(' * inputs:', Object.keys(output.inputs));
52
+ const outputDir = resolve(this.commonParent, dirname(jsBundle));
53
+ debug(' * outputDir:', outputDir);
54
+ const jsBundleRel = relativePath(outputDir, resolve(this.commonParent, jsBundle));
55
+ debug(' * jsBundle: %s (%s)', jsBundleRel, jsBundle);
56
+ const cssBundleRel = output.cssBundle
57
+ ? relativePath(outputDir, resolve(this.commonParent, output.cssBundle))
58
+ : undefined;
59
+ debug(' * cssBundle: %s (%s)', cssBundleRel, output.cssBundle);
60
+ const outputFile = resolve(outputDir, basename(sourceFile));
61
+ debug(' * outputFile:', outputFile);
62
+ debug(' * tags:', entry.tags.size);
63
+ entryMap.set(entry, outputFile);
64
+ entry.tags.apply(jsBundleRel, cssBundleRel, res);
65
+ // if (!output.inputs[item.relative]) {
66
+ // res.errors.push({
67
+ // text: `unknown tag source ${item.relative}`,
68
+ // location: { file: entryFile, lineText: item.element.toString() },
69
+ // });
70
+ // continue;
71
+ // }
72
+ }
73
+ /* Emit Html Files */
74
+ for (const [entry, filename] of entryMap.entries()) {
75
+ const text = entry.content.html();
76
+ await writeFile(filename, text, 'utf-8');
77
+ }
78
+ return res.errors.length || res.warnings.length ? res : null;
79
+ }
80
+ findByInput(path) {
81
+ for (const entry of this.cache.values()) {
82
+ // if(entry.loads.)
83
+ if (entry.result.pluginData.filepath === path) {
84
+ return entry;
85
+ }
86
+ }
87
+ return null;
88
+ }
89
+ onResolve(args) {
90
+ if (args.importer) {
91
+ return null;
92
+ }
93
+ const path = resolve(this.sourceRoot, args.path);
94
+ return { namespace: NAMESPACE, path: path, pluginData: { filepath: path }, watchFiles: [path] };
95
+ }
96
+ async onLoad(args) {
97
+ const filepath = args.pluginData.filepath;
98
+ const ss = await stat(filepath);
99
+ // TODO: cache
100
+ const text = await readFile(filepath, 'utf-8');
101
+ const diag = {
102
+ errors: [],
103
+ warnings: [],
104
+ };
105
+ const ret = {
106
+ contents: '',
107
+ loader: 'js',
108
+ pluginName: PLUGIN_NAME,
109
+ resolveDir: this.sourceRoot,
110
+ };
111
+ const html = loadHtml(text, {
112
+ baseURI: dirname(filepath),
113
+ onParseError(err) {
114
+ diag.errors.push({
115
+ pluginName: PLUGIN_NAME,
116
+ text: `parse html failed: ${err.code}`,
117
+ location: {
118
+ file: filepath,
119
+ line: err.startLine - 1,
120
+ column: err.startCol - 1,
121
+ length: err.endOffset - err.startOffset,
122
+ },
123
+ });
124
+ },
125
+ });
126
+ const tags = await this.work(html, args, diag);
127
+ ret.contents = tags.createDummyScript();
128
+ this.cache.set(filepath, {
129
+ filepath: filepath,
130
+ content: html,
131
+ mtime: ss.mtime,
132
+ tags: tags,
133
+ result: ret,
134
+ });
135
+ if (diag.errors.length)
136
+ ret.errors = diag.errors;
137
+ if (diag.warnings.length)
138
+ ret.warnings = diag.warnings;
139
+ return ret;
140
+ }
141
+ async tryResolve(kind, importer, file, diag) {
142
+ if (!file.startsWith('.')) {
143
+ file = `./${file}`;
144
+ }
145
+ const res = await this._resolve(file, { importer, kind, resolveDir: dirname(importer) });
146
+ diag.errors.push(...res.errors);
147
+ diag.warnings.push(...res.warnings);
148
+ if (res.external || !res.path)
149
+ return null;
150
+ if (!res.sideEffects) {
151
+ diag.warnings.push({ text: `file ${res.path} has no sideEffects` });
152
+ }
153
+ return res;
154
+ }
155
+ async work($, args, diag) {
156
+ const filepath = args.pluginData.filepath;
157
+ const loads = new TagCollection($, this.commonParent, filepath);
158
+ for (const htmlTag of $('script,link[rel="stylesheet"]')) {
159
+ const tagObject = new Tag($(htmlTag));
160
+ if (!tagObject.isValid())
161
+ continue;
162
+ const res = await this.tryResolve(tagObject.importKind(), filepath, tagObject.src, diag);
163
+ if (!res)
164
+ continue;
165
+ loads.register(res.path, tagObject);
166
+ }
167
+ return loads;
168
+ }
169
+ }
170
+ export class ESBuildHtmlEntry {
171
+ name = PLUGIN_NAME;
172
+ setup(build) {
173
+ if (!build.initialOptions.metafile) {
174
+ throw new Error(`metafile: true is required to ${PLUGIN_NAME}`);
175
+ }
176
+ const plugin = new HtmlEntryPlugin(build);
177
+ build.onResolve({ filter: isHtml }, plugin.onResolve);
178
+ build.onLoad({ filter: isHtml, namespace: NAMESPACE }, plugin.onLoad);
179
+ build.onEnd(plugin.onEnd);
180
+ }
181
+ }
182
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAmB,IAAI,IAAI,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE5D,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,YAAY,CAAC;AAEpE,MAAM,WAAW,GAAG,eAAe,CAAC;AACpC,MAAM,SAAS,GAAG,oBAAoB,CAAC;AACvC,MAAM,MAAM,GAAG,WAAW,CAAC;AAW3B,MAAM,OAAO,eAAe;IACV,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;IAClC,UAAU,CAAS;IACnB,YAAY,CAAS;IACrB,QAAQ,CAAqF;IAE9G,YAAY,KAA0B;QACrC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;QAErE,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,aAAa,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QAC/E,KAAK,CAAC,sBAAsB,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAE/C,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,UAAU,EAA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AE5B,KAAK,CAAC,KAA0B;QAC/B,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CAAC,iCAAiC,WAAW,EAAE,CAAC,CAAC;QACjE,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;QAC1C,KAAK,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;QACtD,KAAK,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;QACtE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;CACD"}
package/lib/tag.d.ts ADDED
@@ -0,0 +1,33 @@
1
+ import type { Cheerio, CheerioAPI } from 'cheerio';
2
+ import type { Element } from 'domhandler';
3
+ import type { ImportKind } from 'esbuild';
4
+ import { type IDiagnostics } from './tools.js';
5
+ export type CheerElement = Cheerio<Element>;
6
+ export declare enum TagKind {
7
+ script = 0,
8
+ link = 1
9
+ }
10
+ export declare class Tag {
11
+ readonly $elem: CheerElement;
12
+ readonly field: string;
13
+ readonly src: string;
14
+ readonly kind: TagKind;
15
+ constructor($elem: CheerElement);
16
+ importKind(): ImportKind;
17
+ isValid(): boolean | "";
18
+ use(src: string): void;
19
+ unuse(): void;
20
+ toString(): string;
21
+ }
22
+ export declare class TagCollection {
23
+ readonly $html: CheerioAPI;
24
+ private readonly commonRoot;
25
+ readonly htmlSource: string;
26
+ private readonly tags;
27
+ constructor($html: CheerioAPI, commonRoot: string, htmlSource: string);
28
+ get size(): number;
29
+ register(filepath: string, tag: Tag): void;
30
+ apply(entryFile: string, cssBundle: string | undefined, _res: IDiagnostics): void;
31
+ createDummyScript(): string;
32
+ }
33
+ //# sourceMappingURL=tag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../src/tag.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAS,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAEtD,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAI5C,oBAAY,OAAO;IAClB,MAAM,IAAI;IACV,IAAI,IAAI;CACR;AAED,qBAAa,GAAG;aAKa,KAAK,EAAE,YAAY;IAJ/C,SAAgB,KAAK,EAAE,MAAM,CAAC;IAC9B,SAAgB,GAAG,EAAE,MAAM,CAAC;IAC5B,SAAgB,IAAI,EAAE,OAAO,CAAC;gBAEF,KAAK,EAAE,YAAY;IAQ/C,UAAU,IAAI,UAAU;IAIxB,OAAO;IAIP,GAAG,CAAC,GAAG,EAAE,MAAM;IAIf,KAAK;IAIL,QAAQ;CAGR;AAQD,qBAAa,aAAa;aAIR,KAAK,EAAE,UAAU;IACjC,OAAO,CAAC,QAAQ,CAAC,UAAU;aACX,UAAU,EAAE,MAAM;IALnC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAe;gBAGnB,KAAK,EAAE,UAAU,EAChB,UAAU,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM;IAGnC,IAAI,IAAI,WAEP;IAED,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG;IAInC,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,YAAY;IA8B1E,iBAAiB;CAYjB"}
package/lib/tag.js ADDED
@@ -0,0 +1,92 @@
1
+ import { relativePath } from '@idlebox/node';
2
+ import { debug } from './tools.js';
3
+ const isRemoteUrl = /^https?:|^file:/;
4
+ export var TagKind;
5
+ (function (TagKind) {
6
+ TagKind[TagKind["script"] = 0] = "script";
7
+ TagKind[TagKind["link"] = 1] = "link";
8
+ })(TagKind || (TagKind = {}));
9
+ export class Tag {
10
+ $elem;
11
+ field;
12
+ src;
13
+ kind;
14
+ constructor($elem) {
15
+ this.$elem = $elem;
16
+ this.kind = $elem[0].tagName === 'script' ? TagKind.script : TagKind.link;
17
+ this.field = this.kind === TagKind.link ? 'href' : 'src';
18
+ this.src = $elem.attr(this.field);
19
+ this.$elem.attr(`data-${this.field}`, this.src);
20
+ this.unuse();
21
+ }
22
+ importKind() {
23
+ return this.kind === TagKind.link ? 'import-rule' : 'import-statement';
24
+ }
25
+ isValid() {
26
+ return this.src && !isRemoteUrl.test(this.src);
27
+ }
28
+ use(src) {
29
+ this.$elem.attr(this.field, src.startsWith('.') ? src : `./${src}`);
30
+ }
31
+ unuse() {
32
+ this.$elem.removeAttr(this.field);
33
+ }
34
+ toString() {
35
+ return this.$elem.toString();
36
+ }
37
+ }
38
+ export class TagCollection {
39
+ $html;
40
+ commonRoot;
41
+ htmlSource;
42
+ tags = [];
43
+ constructor($html, commonRoot, htmlSource) {
44
+ this.$html = $html;
45
+ this.commonRoot = commonRoot;
46
+ this.htmlSource = htmlSource;
47
+ }
48
+ get size() {
49
+ return this.tags.length;
50
+ }
51
+ register(filepath, tag) {
52
+ this.tags.push({ id: relativePath(this.commonRoot, filepath), filepath, tag });
53
+ }
54
+ apply(entryFile, cssBundle, _res) {
55
+ const entryTagHasSet = {
56
+ [TagKind.link]: false,
57
+ [TagKind.script]: false,
58
+ };
59
+ const sources = {
60
+ [TagKind.link]: cssBundle,
61
+ [TagKind.script]: entryFile,
62
+ };
63
+ for (const item of this.tags) {
64
+ debug('TAG:', item.tag.toString());
65
+ const src = sources[item.tag.kind];
66
+ if (entryTagHasSet[item.tag.kind] || !src) {
67
+ debug(' -> not use');
68
+ item.tag.unuse();
69
+ continue;
70
+ }
71
+ entryTagHasSet[item.tag.kind] = true;
72
+ debug(' -> use main %s: %s', TagKind[item.tag.kind], src);
73
+ item.tag.use(src);
74
+ }
75
+ if (cssBundle && !entryTagHasSet[TagKind.link]) {
76
+ debug('found in-direct imported css, insert one <link/> tag into <head/>');
77
+ this.$html('head').append(`<link rel="stylesheet" href="${cssBundle}">`);
78
+ }
79
+ }
80
+ createDummyScript() {
81
+ let contents = '';
82
+ debug('\x1b[38;5;14mSTART\x1b[0m [%s]', this.htmlSource);
83
+ for (const load of this.tags) {
84
+ debug(' -> %s - %s', TagKind[load.tag.kind], load.filepath);
85
+ contents += `import ${JSON.stringify(load.filepath)}; /* original: ${load.tag.src} */ \n`;
86
+ }
87
+ debug('\x1b[2m%s\x1b[0m', contents.trim());
88
+ debug('\x1b[38;5;14mEND\x1b[0m [%s]', this.htmlSource);
89
+ return contents;
90
+ }
91
+ }
92
+ //# sourceMappingURL=tag.js.map
package/lib/tag.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag.js","sourceRoot":"","sources":["../src/tag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAI7C,OAAO,EAAE,KAAK,EAAqB,MAAM,YAAY,CAAC;AAItD,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAEtC,MAAM,CAAN,IAAY,OAGX;AAHD,WAAY,OAAO;IAClB,yCAAU,CAAA;IACV,qCAAQ,CAAA;AACT,CAAC,EAHW,OAAO,KAAP,OAAO,QAGlB;AAED,MAAM,OAAO,GAAG;IAKa;IAJZ,KAAK,CAAS;IACd,GAAG,CAAS;IACZ,IAAI,CAAU;IAE9B,YAA4B,KAAmB;QAAnB,UAAK,GAAL,KAAK,CAAc;QAC9C,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC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GAAG,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;QAED,IAAI,SAAS,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YAChD,KAAK,CAAC,mEAAmE,CAAC,CAAC;YAC3E,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,gCAAgC,SAAS,IAAI,CAAC,CAAC;QAC1E,CAAC;IACF,CAAC;IAED,iBAAiB;QAChB,IAAI,QAAQ,GAAG,EAAE,CAAC;QAClB,KAAK,CAAC,gCAAgC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACzD,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YAC9B,KAAK,CAAC,cAAc,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;YAE7D,QAAQ,IAAI,UAAU,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,kBAAkB,IAAI,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;QAC3F,CAAC;QACD,KAAK,CAAC,kBAAkB,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;QAC3C,KAAK,CAAC,8BAA8B,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACvD,OAAO,QAAQ,CAAC;IACjB,CAAC;CACD"}
package/lib/tools.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ import type esbuild from 'esbuild';
2
+ export declare const debug: Function;
3
+ export declare function commonParent(a: string, b: string): string;
4
+ export interface IDiagnostics {
5
+ errors: esbuild.PartialMessage[];
6
+ warnings: esbuild.PartialMessage[];
7
+ }
8
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAGnC,eAAO,MAAM,KAAK,EAAE,QAMT,CAAC;AAEZ,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAehD;AAED,MAAM,WAAW,YAAY;IAC5B,MAAM,EAAE,OAAO,CAAC,cAAc,EAAE,CAAC;IACjC,QAAQ,EAAE,OAAO,CAAC,cAAc,EAAE,CAAC;CACnC"}
package/lib/tools.js ADDED
@@ -0,0 +1,22 @@
1
+ import { formatWithOptions } from 'node:util';
2
+ export const debug = process.argv.includes('--debug')
3
+ ? (text, ...args) => {
4
+ process.stderr.write(`${formatWithOptions({ colors: true, breakLength: Number.POSITIVE_INFINITY }, text, ...args)}\n`);
5
+ }
6
+ : () => { };
7
+ export function commonParent(a, b) {
8
+ const ar = a.split(/[/\/]/g);
9
+ const br = b.split(/[/\/]/g);
10
+ const to = Math.min(ar.length, br.length);
11
+ let i;
12
+ for (i = 0; i < to; i++) {
13
+ if (ar[i] !== br[i]) {
14
+ break;
15
+ }
16
+ }
17
+ if (i < ar.length) {
18
+ return ar.slice(0, i).join('/');
19
+ }
20
+ return br.slice(0, i).join('/');
21
+ }
22
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,CAAC,MAAM,KAAK,GAAa,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;IAC9D,CAAC,CAAC,CAAC,IAAY,EAAE,GAAG,IAAW,EAAE,EAAE;QACjC,OAAO,CAAC,MAAM,CAAC,KAAK,CACnB,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,CAChG,CAAC;IACH,CAAC;IACF,CAAC,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC;AAEZ,MAAM,UAAU,YAAY,CAAC,CAAS,EAAE,CAAS;IAChD,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC7B,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC7B,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;IAC1C,IAAI,CAAC,CAAC;IACN,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;QACzB,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACrB,MAAM;QACP,CAAC;IACF,CAAC;IAED,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC;QACnB,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC;IACD,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACjC,CAAC"}
@@ -0,0 +1 @@
1
+ {"fileNames":["../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.object.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.array.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.float16.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.d.ts","../../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/modules/index.d.ts","../../../@idlebox/node/lib/esm/asyncLoad.d.ts","../../../@idlebox/node/lib/esm/child_process/error.d.ts","../../../@idlebox/node/lib/esm/child_process/execa.d.ts","../../../@idlebox/node/lib/esm/cli-io/output.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/utils.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/transform/normalize.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/stdio/type.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/ipc.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/arguments/fd-options.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/arguments/specific.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/return/final-error.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/stdio/array.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/stdio/option.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/transform/object-mode.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/stdio/direction.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/return/ignore.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/arguments/encoding-option.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/return/result-stdout.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/return/result-all.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/return/result-stdio.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/return/result-ipc.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/return/result.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/verbose.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/arguments/options.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/methods/template.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/pipe.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/convert.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/subprocess/stdout.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/subprocess/stdio.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/subprocess/all.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/subprocess/subprocess.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/methods/main-async.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/methods/main-sync.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/methods/command.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/methods/script.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/types/methods/node.d.ts","../../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/index.d.ts","../../../@idlebox/node/lib/esm/child_process/lateError.d.ts","../../../@idlebox/node/lib/esm/error/linux.d.ts","../../../@idlebox/node/lib/esm/error/nodejs-error-code.generated.d.ts","../../../@idlebox/node/lib/esm/error/types.d.ts","../../../@idlebox/node/lib/esm/fs/exists.d.ts","../../../@idlebox/node/lib/esm/environment/getEnvironment.d.ts","../../../@idlebox/common/lib/esm/array/arrayDiff.d.ts","../../../@idlebox/common/lib/esm/array/arraySame.d.ts","../../../@idlebox/common/lib/esm/array/arrayUnique.d.ts","../../../@idlebox/common/lib/esm/array/normalizeArray.d.ts","../../../@idlebox/common/lib/esm/array/sortAlpha.d.ts","../../../@idlebox/common/lib/esm/date/consts.d.ts","../../../@idlebox/common/lib/esm/date/isInvalid.d.ts","../../../@idlebox/common/lib/esm/date/sibling.d.ts","../../../@idlebox/common/lib/esm/string/pad2.d.ts","../../../@idlebox/common/lib/esm/date/timeString.d.ts","../../../@idlebox/common/lib/esm/date/unix.d.ts","../../../@idlebox/common/lib/esm/debugging/serializable.d.ts","../../../@idlebox/common/lib/esm/debugging/tryInspect.d.ts","../../../@idlebox/common/lib/esm/error/getFrame.d.ts","../../../@idlebox/common/lib/esm/error/convertUnknown.d.ts","../../../@idlebox/common/lib/esm/platform/os.d.ts","../../../@idlebox/common/lib/esm/error/known.d.ts","../../../@idlebox/common/lib/esm/path/isAbsolute.d.ts","../../../@idlebox/common/lib/esm/path/normalizePath.d.ts","../../../@idlebox/common/lib/esm/platform/globalObject.d.ts","../../../@idlebox/common/lib/esm/error/pretty.vscode.d.ts","../../../@idlebox/common/lib/esm/error/pretty.d.ts","../../../@idlebox/common/lib/esm/function/functionName.d.ts","../../../@idlebox/common/lib/esm/function/asyncCallbackList.d.ts","../../../@idlebox/common/lib/esm/function/callbackList.d.ts","../../../@idlebox/common/lib/esm/function/delayCallbackList.d.ts","../../../@idlebox/common/lib/esm/lifecycle/dispose/lifecycle.d.ts","../../../@idlebox/common/lib/esm/lifecycle/event/event.d.ts","../../../@idlebox/common/lib/esm/lifecycle/dispose/disposableEvent.d.ts","../../../@idlebox/common/lib/esm/lifecycle/dispose/disposedError.d.ts","../../../@idlebox/common/lib/esm/lifecycle/dispose/lifecycle.async.d.ts","../../../@idlebox/common/lib/esm/platform/globalSingleton.d.ts","../../../@idlebox/common/lib/esm/platform/globalSymbol.d.ts","../../../@idlebox/common/lib/esm/lifecycle/dispose/lifecycle.global.d.ts","../../../@idlebox/common/lib/esm/lifecycle/dispose/lifecycle.sync.d.ts","../../../@idlebox/common/lib/esm/lifecycle/dispose/bridges/rxjs.d.ts","../../../@idlebox/common/lib/esm/lifecycle/event/memorized.d.ts","../../../@idlebox/common/lib/esm/lifecycle/promise/cancel.d.ts","../../../@idlebox/common/lib/esm/lifecycle/promise/deferredPromise.d.ts","../../../@idlebox/common/lib/esm/lifecycle/promise/cancellationToken/source.d.ts","../../../@idlebox/common/lib/esm/lifecycle/timeout/timeoutError.d.ts","../../../@idlebox/common/lib/esm/lifecycle/timeout/timeout.d.ts","../../../@idlebox/common/lib/esm/log/logger.d.ts","../../../@idlebox/common/lib/esm/mapSet/customSet.d.ts","../../../@idlebox/common/lib/esm/mapSet/extendMap.d.ts","../../../@idlebox/common/lib/esm/misc/assertNotNull.d.ts","../../../@idlebox/common/lib/esm/misc/package.json.d.ts","../../../@idlebox/common/lib/esm/object/definePublicConstant.d.ts","../../../@idlebox/common/lib/esm/object/initOnRead.d.ts","../../../@idlebox/common/lib/esm/object/objectPath.d.ts","../../../@idlebox/common/lib/esm/object/objectSame.d.ts","../../../@idlebox/common/lib/esm/string/castCase.d.ts","../../../@idlebox/common/lib/esm/path/pathArray.d.ts","../../../@idlebox/common/lib/esm/promise/awaitIterator.d.ts","../../../@idlebox/common/lib/esm/promise/finishAllPromise.d.ts","../../../@idlebox/common/lib/esm/promise/promiseBool.d.ts","../../../@idlebox/common/lib/esm/promise/promiseCollection.d.ts","../../../@idlebox/common/lib/esm/promise/timeoutPromiseCollection.d.ts","../../../@idlebox/common/lib/esm/reflection/classes/hookClass.d.ts","../../../@idlebox/common/lib/esm/reflection/classes/singleton.d.ts","../../../@idlebox/common/lib/esm/reflection/methods/bind.d.ts","../../../@idlebox/common/lib/esm/reflection/methods/initOnRead.d.ts","../../../@idlebox/common/lib/esm/reflection/methods/memorize.d.ts","../../../@idlebox/common/lib/esm/state/StateMachine.d.ts","../../../@idlebox/common/lib/esm/string/concatType.generated.d.ts","../../../@idlebox/common/lib/esm/string/escapeRegexp.d.ts","../../../@idlebox/common/lib/esm/string/sizeString.d.ts","../../../@idlebox/common/lib/esm/typingHelper/literal.d.ts","../../../@idlebox/common/lib/esm/typingHelper/deep.partial.d.ts","../../../@idlebox/common/lib/esm/typingHelper/deep.readonly.d.ts","../../../@idlebox/common/lib/esm/typingHelper/deep.required.d.ts","../../../@idlebox/common/lib/esm/typingHelper/deep.writable.d.ts","../../../@idlebox/common/lib/esm/__create_index.generated.d.ts","../../../@idlebox/node/lib/esm/environment/pathEnvironment.d.ts","../../../@idlebox/node/lib/esm/environment/findBinary.d.ts","../../../@idlebox/node/lib/esm/child_process/respawn.d.ts","../../../@idlebox/node/lib/esm/crypto/md5.d.ts","../../../@idlebox/node/lib/esm/crypto/sha256.d.ts","../../../@idlebox/node/lib/esm/environment/npmConfig.d.ts","../../../@idlebox/node/lib/esm/events/dumpEventEmitter.d.ts","../../../@idlebox/node/lib/esm/fs/commandExists.d.ts","../../../@idlebox/node/lib/esm/fs/emptyDir.d.ts","../../../@idlebox/node/lib/esm/fs/tempFolder.d.ts","../../../@idlebox/node/lib/esm/fs/weiteChanged.d.ts","../../../@idlebox/node/lib/esm/log/terminal.d.ts","../../../@idlebox/node/lib/esm/path-resolve/findUp.d.ts","../../../@idlebox/node/lib/esm/path-resolve/findPackageRoot.d.ts","../../../@idlebox/node/lib/esm/path-resolve/getAllUp.d.ts","../../../@idlebox/node/lib/esm/path-resolve/lrelative.d.ts","../../../@idlebox/node/lib/esm/path-resolve/nodeResolvePathArray.d.ts","../../../@idlebox/node/lib/esm/path-resolve/resolvePath.d.ts","../../../@idlebox/node/lib/esm/stream/blackHoleStream.d.ts","../../../@idlebox/node/lib/esm/stream/streamPromise.d.ts","../../../@idlebox/node/lib/esm/stream/collectingStream.d.ts","../../../@idlebox/node/lib/esm/stream/disposableStream.d.ts","../../../@idlebox/node/lib/esm/stream/drainStream.d.ts","../../../@idlebox/node/lib/esm/stream/loggerStream.d.ts","../../../@idlebox/node/lib/esm/__create_index.generated.d.ts","../../../node_modules/.pnpm/domelementtype@2.3.0/node_modules/domelementtype/lib/esm/index.d.ts","../../../node_modules/.pnpm/domhandler@5.0.3/node_modules/domhandler/lib/esm/node.d.ts","../../../node_modules/.pnpm/domhandler@5.0.3/node_modules/domhandler/lib/esm/index.d.ts","../../../node_modules/.pnpm/htmlparser2@9.1.0/node_modules/htmlparser2/lib/esm/Tokenizer.d.ts","../../../node_modules/.pnpm/htmlparser2@9.1.0/node_modules/htmlparser2/lib/esm/Parser.d.ts","../../../node_modules/.pnpm/dom-serializer@2.0.0/node_modules/dom-serializer/lib/esm/index.d.ts","../../../node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/stringify.d.ts","../../../node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/traversal.d.ts","../../../node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/manipulation.d.ts","../../../node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/querying.d.ts","../../../node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/legacy.d.ts","../../../node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/helpers.d.ts","../../../node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/feeds.d.ts","../../../node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/index.d.ts","../../../node_modules/.pnpm/htmlparser2@9.1.0/node_modules/htmlparser2/lib/esm/index.d.ts","../../../node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/html.d.ts","../../../node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/token.d.ts","../../../node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/error-codes.d.ts","../../../node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/tokenizer/preprocessor.d.ts","../../../node_modules/.pnpm/entities@6.0.0/node_modules/entities/dist/esm/generated/decode-data-html.d.ts","../../../node_modules/.pnpm/entities@6.0.0/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts","../../../node_modules/.pnpm/entities@6.0.0/node_modules/entities/dist/esm/decode-codepoint.d.ts","../../../node_modules/.pnpm/entities@6.0.0/node_modules/entities/dist/esm/decode.d.ts","../../../node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/tokenizer/index.d.ts","../../../node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/tree-adapters/interface.d.ts","../../../node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/parser/open-element-stack.d.ts","../../../node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/parser/formatting-element-list.d.ts","../../../node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/parser/index.d.ts","../../../node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/tree-adapters/default.d.ts","../../../node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/serializer/index.d.ts","../../../node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/foreign-content.d.ts","../../../node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/index.d.ts","../../../node_modules/.pnpm/parse5-htmlparser2-tree-adapter@7.1.0/node_modules/parse5-htmlparser2-tree-adapter/dist/index.d.ts","../../../node_modules/.pnpm/css-what@6.1.0/node_modules/css-what/lib/es/types.d.ts","../../../node_modules/.pnpm/css-what@6.1.0/node_modules/css-what/lib/es/parse.d.ts","../../../node_modules/.pnpm/css-what@6.1.0/node_modules/css-what/lib/es/stringify.d.ts","../../../node_modules/.pnpm/css-what@6.1.0/node_modules/css-what/lib/es/index.d.ts","../../../node_modules/.pnpm/css-select@5.1.0/node_modules/css-select/lib/esm/types.d.ts","../../../node_modules/.pnpm/css-select@5.1.0/node_modules/css-select/lib/esm/pseudo-selectors/filters.d.ts","../../../node_modules/.pnpm/css-select@5.1.0/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.d.ts","../../../node_modules/.pnpm/css-select@5.1.0/node_modules/css-select/lib/esm/pseudo-selectors/aliases.d.ts","../../../node_modules/.pnpm/css-select@5.1.0/node_modules/css-select/lib/esm/pseudo-selectors/index.d.ts","../../../node_modules/.pnpm/css-select@5.1.0/node_modules/css-select/lib/esm/index.d.ts","../../../node_modules/.pnpm/cheerio-select@2.1.0/node_modules/cheerio-select/lib/esm/index.d.ts","../../../node_modules/.pnpm/cheerio@1.0.0/node_modules/cheerio/dist/esm/options.d.ts","../../../node_modules/.pnpm/cheerio@1.0.0/node_modules/cheerio/dist/esm/api/attributes.d.ts","../../../node_modules/.pnpm/cheerio@1.0.0/node_modules/cheerio/dist/esm/api/traversing.d.ts","../../../node_modules/.pnpm/cheerio@1.0.0/node_modules/cheerio/dist/esm/api/manipulation.d.ts","../../../node_modules/.pnpm/cheerio@1.0.0/node_modules/cheerio/dist/esm/api/css.d.ts","../../../node_modules/.pnpm/cheerio@1.0.0/node_modules/cheerio/dist/esm/api/forms.d.ts","../../../node_modules/.pnpm/cheerio@1.0.0/node_modules/cheerio/dist/esm/api/extract.d.ts","../../../node_modules/.pnpm/cheerio@1.0.0/node_modules/cheerio/dist/esm/cheerio.d.ts","../../../node_modules/.pnpm/cheerio@1.0.0/node_modules/cheerio/dist/esm/types.d.ts","../../../node_modules/.pnpm/cheerio@1.0.0/node_modules/cheerio/dist/esm/static.d.ts","../../../node_modules/.pnpm/cheerio@1.0.0/node_modules/cheerio/dist/esm/load.d.ts","../../../node_modules/.pnpm/cheerio@1.0.0/node_modules/cheerio/dist/esm/load-parse.d.ts","../../../node_modules/.pnpm/cheerio@1.0.0/node_modules/cheerio/dist/esm/slim.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/header.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/readable.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/file.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/fetch.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/formdata.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/connector.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/client.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/errors.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/global-origin.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/pool-stats.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/pool.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/handlers.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/agent.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/mock-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/mock-client.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/mock-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/mock-errors.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/retry-handler.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/retry-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/api.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/interceptors.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/util.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/cookies.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/patch.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/websocket.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/eventsource.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/filereader.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/content-type.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/cache.d.ts","../../../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/index.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/dom-events.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/sea.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/sqlite.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@22.13.10/node_modules/@types/node/index.d.ts","../../../node_modules/.pnpm/encoding-sniffer@0.2.0/node_modules/encoding-sniffer/dist/esm/sniffer.d.ts","../../../node_modules/.pnpm/encoding-sniffer@0.2.0/node_modules/encoding-sniffer/dist/esm/index.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/header.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/readable.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/file.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/fetch.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/formdata.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/connector.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/client.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/errors.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/dispatcher.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/global-dispatcher.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/global-origin.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/pool-stats.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/pool.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/handlers.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/balanced-pool.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/agent.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/mock-interceptor.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/mock-agent.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/mock-client.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/mock-pool.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/mock-errors.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/proxy-agent.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/env-http-proxy-agent.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/retry-handler.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/retry-agent.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/api.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/interceptors.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/util.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/cookies.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/patch.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/websocket.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/eventsource.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/filereader.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/diagnostics-channel.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/content-type.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/cache.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/types/index.d.ts","../../../node_modules/.pnpm/undici@6.21.2/node_modules/undici/index.d.ts","../../../node_modules/.pnpm/cheerio@1.0.0/node_modules/cheerio/dist/esm/index.d.ts","../../../node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.d.ts","../src/tools.ts","../src/tag.ts","../src/main.ts"],"fileIdsList":[[80,221,284,327,341,349,418,419,420,421],[80,221,224,284,327,418,419,420],[80,284,327,371,419],[124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,284,327],[284,327],[150,284,327],[150,151,284,327],[151,284,327],[150,154,284,327],[150,151,158,284,327],[162,284,327],[162,196,284,327],[180,196,284,327],[172,284,327],[196,284,327],[191,284,327],[81,82,83,84,118,119,120,121,122,123,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,284,327],[117,284,327],[119,120,284,327],[284,327,339],[284,327,340,341],[284,327,359],[196,284,327,359],[284,324,327],[284,326,327],[327],[284,327,332,362],[284,327,328,333,339,340,347,359,370],[284,327,328,329,339,347],[279,280,281,284,327],[284,327,330,371],[284,327,331,332,340,348],[284,327,332,359,367],[284,327,333,335,339,347],[284,326,327,334],[284,327,335,336],[284,327,337,339],[284,326,327,339],[284,327,339,340,341,359,370],[284,327,339,340,341,354,359,362],[284,322,327,375],[284,322,327,335,339,342,347,359,370],[284,327,339,340,342,343,347,359,367,370],[284,327,342,344,359,367,370],[282,283,284,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376],[284,327,339,345],[284,327,346,370],[284,327,335,339,347,359],[284,327,348],[284,327,349],[284,326,327,350],[284,324,325,326,327,328,329,330,331,332,333,334,335,336,337,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376],[284,327,352],[284,327,353],[284,327,339,354,355],[284,327,354,356,371,373],[284,327,339,359,360,362],[284,327,359,361],[284,327,359,360],[284,327,362],[284,327,363],[284,324,327,359],[284,327,339,365,366],[284,327,365,366],[284,327,332,347,359,367],[284,327,368],[284,327,347,369],[284,327,342,353,370],[284,327,332,371],[284,327,359,372],[284,327,346,373],[284,327,374],[284,327,332,339,341,350,359,370,373,375],[284,327,359,376],[224,264,284,327],[224,273,284,327],[224,267,273,284,327],[224,273,274,284,327],[224,266,267,268,269,270,271,272,274,284,327],[266,274,275,276,277,278,284,327,359,379,417],[224,266,276,284,327],[224,266,273,274,275,284,327],[224,236,253,254,265,284,327],[224,266,273,274,275,276,284,327],[224,266,272,273,274,276,284,327],[258,259,263,284,327],[259,284,327],[258,259,260,261,262,284,327],[258,259,284,327],[258,284,327],[255,256,257,284,327],[255,284,327],[224,284,327],[223,284,327],[222,284,327],[224,228,229,230,231,232,233,234,284,327],[222,224,284,327],[224,227,284,327],[284,327,359,377,378],[241,242,243,284,327],[87,88,91,102,103,104,105,111,112,113,114,115,116,284,327],[85,87,88,90,97,103,284,327,348,359],[89,284,327],[89,97,104,284,327],[104,284,327],[102,104,105,111,284,327],[104,105,111,284,327],[102,104,105,284,327],[102,284,327],[89,102,104,105,111,284,327],[102,104,284,327],[87,90,93,95,104,284,327],[90,94,96,98,104,284,327],[88,90,104,284,327],[92,98,104,284,327],[90,94,96,97,104,284,327],[85,91,98,99,100,101,104,284,327,348],[87,104,284,327],[85,87,93,104,284,327],[87,92,104,284,327],[85,86,284,327,359,362],[96,104,284,327,359],[92,104,108,284,327],[95,96,104,284,327,359],[88,102,104,106,107,108,109,110,284,327,328,348,359],[85,284,327,359,362],[86,87,93,104,284,327],[90,102,104,284,327],[225,284,327],[222,224,225,226,235,284,327],[224,253,284,327],[238,284,327],[237,238,284,327],[237,284,327],[237,238,239,245,246,249,250,251,252,284,327],[238,246,284,327],[237,238,239,245,246,247,248,284,327],[237,246,284,327],[246,250,284,327],[238,239,240,244,284,327],[239,284,327],[237,238,246,284,327],[79,284,327],[284,294,298,327,370],[284,294,327,359,370],[284,289,327],[284,291,294,327,367,370],[284,327,347,367],[284,327,377],[284,289,327,377],[284,291,294,327,347,370],[284,286,287,290,293,327,339,359,370],[284,294,301,327],[284,286,292,327],[284,294,315,316,327],[284,290,294,327,362,370,377],[284,315,327,377],[284,288,289,327,377],[284,294,327],[284,288,289,290,291,292,293,294,295,296,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,316,317,318,319,320,321,327],[284,294,309,327],[284,294,301,302,327],[284,292,294,302,303,327],[284,293,327],[284,286,289,294,327],[284,294,298,302,303,327],[284,298,327],[284,292,294,297,327,370],[284,286,291,294,301,327],[284,289,294,315,327,375,377],[284,327,416],[284,327,370,388,392],[284,327,359,370,388],[284,327,383],[284,327,367,370,385,388],[284,327,377,383],[284,327,347,370,385,388],[284,327,339,359,370,380,381,384,387],[284,327,388,395],[284,327,380,386],[284,327,388,409,410],[284,327,362,370,377,384,388],[284,327,377,409],[284,327,377,382,383],[284,327,388],[284,327,382,383,384,385,386,387,388,389,390,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,410,411,412,413,414,415],[284,327,335,388,403],[284,327,388,395,396],[284,327,386,388,396,397],[284,327,387],[284,327,380,383,388],[284,327,388,392,396,397],[284,327,392],[284,327,370,386,388,391],[284,327,380,385,388,395],[284,327,388,403],[284,327,375,377,383,388,409]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"8bf8b5e44e3c9c36f98e1007e8b7018c0f38d8adc07aecef42f5200114547c70","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"60037901da1a425516449b9a20073aa03386cce92f7a1fd902d7602be3a7c2e9","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22adec94ef7047a6c9d1af3cb96be87a335908bf9ef386ae9fd50eeb37f44c47","affectsGlobalScope":true,"impliedFormat":1},{"version":"4245fee526a7d1754529d19227ecbf3be066ff79ebb6a380d78e41648f2f224d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6a5253138c5432c68a1510c70fe78a644fe2e632111ba778e1978010d6edfec","impliedFormat":1},{"version":"b8f34dd1757f68e03262b1ca3ddfa668a855b872f8bdd5224d6f993a7b37dc2c","impliedFormat":99},"2615c3cb8ac3f2182bc2569ef3d275caf9b884b8678c06a001906df4814712ef","1b1cab3408ae8d3af646764bf2ea6d743462cec3f29fa46b96695b17d984e88f","5692580ceadd949b4d3d8f688f404341d0ffff4cc7db265e6f25dd69ab87f270","b1ac16093a75303c1920d1fbe743ffb2757f16ba008f3e18caed8c12c9f022f9",{"version":"6b1d838981b5606f4c958d98800e318314e71f0dd1d087196350d189362b69c9","impliedFormat":99},{"version":"eecab4c87fadc3a8c5fa35f659a4f5c480208ab80f0f36d9761c2bb427908fcb","impliedFormat":99},{"version":"b8dd1d513057d0320e4d5473be58c7161fb50ca2d5ad5c0e6e81b417aad36f61","impliedFormat":99},{"version":"73465f19e61e23f551639909f94147b4211e1331d3699bce6fcc972203423b20","impliedFormat":99},{"version":"929746f886d166cee5d20d109e816f527c709a00cc90c8fd7c52c66e72e31805","impliedFormat":99},{"version":"9ffa740c1a384e68eca1c3e530ee6911ed42fbc0010570d2effb375eaaa4dceb","impliedFormat":99},{"version":"6f2cc41dae1386fc57a4980d3aba6115e879479821ea78a2d4e3a3c2fd5cb786","impliedFormat":99},{"version":"bd236ec30223eaced7fed2c84ffc5933ad23061314c4b9874d4d7c88f2d841f4","impliedFormat":99},{"version":"97adcdc3cd8c7fbcaf7e1f60a4ea05972da21b0e0b1ef71ab96c20c9c65ffe88","impliedFormat":99},{"version":"3dcf393cb7c87561367ae539f1462b15b48af0bac86cb6892bbf6c617e9e1872","impliedFormat":99},{"version":"86413ef25968db827f5d8ca68a3ae8a7fd91f8cbe4f654053ff32454b3f6e2e8","impliedFormat":99},{"version":"3ef8337f4df30d8d6978651ae95632bb7dd229ac4dfa7006c2aa4e2006ea6453","impliedFormat":99},{"version":"09e0d46e3d2fcc6c5d7a2afbd1a22809dafd50f1f3f8b1d2e327ed21c7c6fa5f","impliedFormat":99},{"version":"ac5b06a39925ae9c5344c84e2e24d7b61c22b4176fcbb96de5f8e45986f2331e","impliedFormat":99},{"version":"d829826b1dc3a0d84174e03b009afe4677e36a84904863f6318b7243c3644b44","impliedFormat":99},{"version":"c61e4cede8cf73fb4dbff3cad8fd57902eab1ebc62f20d9aeb105c3257f5a906","impliedFormat":99},{"version":"ebdf90aea74d99b9fc1a639433c3458604b5db3571b7954b8317dd1a1fa71bdd","impliedFormat":99},{"version":"9c1de355ef73132bba24da0e616cb67867e4b7f85689bd95b9638395cbb81a6d","impliedFormat":99},{"version":"46c4ec0878833d2ae63e24e2389a8145babdcab72297e18581af97d7e62c0511","impliedFormat":99},{"version":"df92b0948e17e54e60e2b7bbc525d06b35d404a1a3c1ea48e4071262002f7d3d","impliedFormat":99},{"version":"7c9e187838a0e665cac719dc03b215dfc29da9caa30af79a78531e7256a1d6d2","impliedFormat":99},{"version":"1eb292fabe901c9fa80732c87cf7b42b5f790f5af48bc36d8371272fa80427f2","impliedFormat":99},{"version":"c34decddf18283ad1811981c06a07208aaef29010c55a7b810ba5c96e3d89a6b","impliedFormat":99},{"version":"694adea51eea8d8981ce771b52c5e5a2d524886e6397fc9431424325ecf42eb1","impliedFormat":99},{"version":"15036d0d6ec1d21354542a670696edea4a344baeed6718cb553aa8fe619e8069","impliedFormat":99},{"version":"3c6ce563b69aa0a196f2373c5ee96472ca1aeb232a9611981bdff9b3bc48e02a","impliedFormat":99},{"version":"45a6de331708ab2a4f98fbb5d68d0a91b887802d277b37573a26ecb0036f1e7e","impliedFormat":99},{"version":"8743f6147ba8d5e9cff0076f0a016d183df75a0796c25e096ee3fa19d06acfc5","impliedFormat":99},{"version":"812651dab7b19c7fe9cfea34fdb7a059093aff0c1cfa5dbfe979b57e7d7627ab","impliedFormat":99},{"version":"e329923a93fce350f89d04facf9053fa20b789cae18fe3340527ccd9a61275ed","impliedFormat":99},{"version":"a008ee16379994ecad644e0e543bcd0ec790fc51e9ee2632008f241872cbcfce","impliedFormat":99},{"version":"3cf28c9c5653662986136d2ffb17e5e1ea6d933aaee20ec64de184b19284ffda","impliedFormat":99},{"version":"3d25e4112b03e9a3549ab85ff56e3f2d7264f74dcf5308549c81609c31ab2aa3","impliedFormat":99},"fe10ae446569b57de33cb0fdd46c6ce0f30ab4cb92d6e18b7dfc1086092bcaf5","adc66baddef1f199fd8a93a50f798e69dddbef47b38787527c306e70312fd80c","71c0a7d11f3ce57d0e1ab38f1ce6de020610c08f319e789d43df9822a81ddd18","927487f1944a3ecb3aac2a75e1213f93e071ee7fb84ba330378dc3af0a81251a","aac937ae647dbdbf5c84f336b7c30e50a1795623440370759cb63c49c94b0bd9","10abcbe5079c4b0dc937b9174e4fb9796038eb5e79d454eb6834b8d194319d4f","88378be78ce8dac14b7927883f4b9e8dd3612cd88e64e0164db3065f8c158947","2d322764dba4469c613f8b19a26b9d800bcf51bf430b8e70c5af5cf467d7a763","be3a7ee5446ea7a126eef7ab655dbdbfaeb9cdd671152118dea8458f0004331a","606ae9c3346659ba64114a7534d9c493b9a669eb59e6b0101e5f71a2cb023408","ed0b9b9a4c09e4c4fe7b6d5b82c8989f7ace6d2006bc36bf7db576651c69ee5c","80e8bdab699cd19a979e483ca9f8bb8713865eea045ea08bfe4d7eb353c497c3","6f140b43d6331e40eea33aaa7be3e7b1b3a1a613f9cff57aaf57127436de290b","737b2748f9654ca7bd38c89f168b162fdf8b11c74a0d4bde829ea477796c5a21","649fea1083587b7d65c0023b446730c0ad1467ad826cdbed533d2dc15083b496","2d49408434772ebe838c61fccedd0a7afeae7501e75771482901934f047283a8","e221ec0bc919f8a8155a77c7bb5755943624bea24718b46a3e4981c7d5eb8096","27895ed87b6cad83aab1811bbda6976c34e6135e3a504bc8bd549cc05c0df273","088543c61a04f65bde78a764251f630cc8e988f49ac7837b56eb4c50536bfa53","cd0d93d09e6bf9cad1ccb137bcb252bf83b9ed0d2c5a0916b4411120fcf6ec5b","335179628075f4711075eb5bc2ef2fc8be51e9da130dc1ba994cb3cff9e8fa7f","1eca874aae0f07679eb81d7629a5b0199853e7c9c8cedd4a8588764c5edae077","8cdbfc82a970fc0c7a62444ee9e572ac8dd33350b05da9e0002c1bb3634ebfb6","95e917f9d1201f4f3721c99fb8dc6cfd3842fb531418ceb0ee8e189da28bfd76","ee97019837bad69156c8bba272ceb2d3f851ee9000e24583332538a9a6fbe25d","4885ec27a704c2d082d8c72366f91e1191a5adf0395add77108c2c2a754e5f5c","61b71e102585d2db7c111d2481b06f2672c33b91e82da02f466797f52fb2b3b7","f50c1433ef5704c172991b9b062994932928db57d3e4daa5656b31f57a088c88","d972bbe5d8938c3427efc1a880ddec470e3633574b0d103774841153bb9fbdcc","81a4609234df0cd33307a14e77ec11269311e9c51bef0e90d88baa76da7e6a59","3f6efed4dd2c2be251f3bf2d4f23227eef34a06271c26ce659dbbaaa39fa642a","0524437111769dfb679cd177e0ec1a7b009413b899ad42f865b18358864fbe87","52002715fd9ec3c2c1ec0911f135ce861b3978a89bebee6c952feb44fdc1941b","2dae3b48be67a7f92530a3ee87dcbbf61ba45e49f30f73775535e43b8b515610","4db98fd2c642a065d8a09f3e005b4723668dd4dbc4afebfbddc379f89880ad0d","fbfac132fc6f1b2f61fd522e4f3c763a478c23932310ed86c66fe0b8bd560a4c","08690316a62c6bf820bd6b4fc42ef0650677f6e618ace213093a77c1a75c5f79","dc32a8a370f7f4e489f781db64c2ea13d92371289ec5a71f503e5572578c11ed","8f1d6e5fdf25a9ac752b4c862902a317ba5ce462b14106241483eb0415393d0c","906cca43ffa731d7d2184aabdc550c69accecea4af582e1ee7f120720adbb2ca","0d37b9cdf2d9b921b7c4b2aebbc0b584b019e567ac2025cfcf757ad099608264","c90c305169211b7bfaddc5a59ade3ebfd63e188bf0ec1285b2d972fcc02e0e8e","5a1d1fc570eb5d46cbbe39184d91b1675563025626216653a04db5e88f5e7ef3","c7f61608579205950ede2e3a3de802208c9e3223440a75a30680f35ff692bc91","04c94959a4931a8d63f0ed5af3d51c7cd09cd2641962c8a76e760158484b8d83","d83819820d8a511c026429dc9379981e8d4544f42231f12e4f9e53922f9003ef","06c5d55b1fd4a5d2999658d45a0100d813e7e960773ab9a6ee1a9e5f7bbce4b0","8e58a92f30d50b5bc4ae2c3a9a79da89182132442d813520befc8dcd79ae8850","4c73dd9880dfca484ee80758aed88edd97b7cbde4856d7067a41d9aaef82bf32","7180f66293e5ff10082d4d93b7b97468d69d93b2e74613d5a7a461cb556639e1","b92a727dabec36aad30b4caa8a183bb46667a9722f225460485f1e2a6778c31f","c3af34afdd25ad389b6cadc9028239b2636196b7907f3a930054d32573deba23","d592726ce9f4c4c103584082d9342cacd9b5a1baf0b3186904dbafcb7534ad0d","e2169e34d6b1fca5071bc826c3e770943712155115a7111f6a0f2085f9faf98e","997883ff5b0e4fdd020d6227ffc7320d2fac7cfaf1a8355bf17c0894c0c44b05","711f5d06a402d2a967535212ffac3eea9988a2d3864b3f5220e9040fe21faa22","cf9b919d1e40fda25fe8c6eb3e3ad418fce1406bca6beac21c352b9166c61fd4","65616d4bb1728e2dcfd1ba33db914f83e4320686a4b90114ea042f6895412f6a","21f253fd1eefba927a932fcda511788e2190c2f55dbfbfbc69925372300c1a94","f35f954822a42718a47ff925f2fc269f231cd85d6aff3cec4321c2879b30f0e1","70b89b2eeeb588fa1c9a7de4d9107950967eca4fcb603704114c1558e3d2254e","73af89ec7c39b67faf624dc95f70849f0b1e5a9716cb0bca3f2c5a8b2f044f39","6fe7951e58396472243c09c07f95c9e266fa9461603da9722f17ee9bf026d5df","4a16e78ea7f2de778fb331db89642b012c834fa70d2a7a70de8515de5a6495e6","903b165ba31148d246f08dbc7ba4f1fa967f5d8fa7c0dabb9e85f8be95110dc3","75e7fcbad0487229a6a5593d5a57c4b1f15d9a2788ab091c32bce8e10c944c74","ac5809c45822e0f241683e9bd15b8d01a5f9ed0ea1d5788e85acbd0d3314e978","099dd2f7fa05b863954681ce99e824f74f4a395bbfb989f0b1b03546e43dc4be","217da3ef39c7173eb95648aec803c1da4851e4c15dfa65e39ced18783f5321e8","ea8339217e84abd0a925d4050ab7ea264fa07b2aa5862da2761d3bfaec6872a2","62da6348079507c463b04da15e1fa765c840b941b57c65b1c12f576f1f452fbd","0c293035df882536f93c042ed0a3354f35dd55d27ae043245dfa9519a08abaf1","545fa6c789b74842fc7c94946d9b64784a646b164b1573b2196b403a0103c87e","f0da9c416585c1be6f42cc4d437d8e62fcae4c0b2c7db9c5ddb96d76b1d61cf1","235046e8db5cb94d70e9535ec092f496c21160776788bfd1e8bc326bd94d7791","947a6f355607398050c26a381ddf18cc72b234e45421b416ab11e0b5f47777ad","64c587997501be8a5b09e72b533162cc29271d3f1474b9f43ededd948493f299","8107e2075c2886f9384e2349bb2b087ef30d6746b5edadf07a1606f833c6bc57","7fd19df18a82d3ae0d96bf178246d2ca9f52d9dc58febb272c720740d5d69535","78ea9a2fb9eedd9cbb3fff5b04b9397ca30093591e1853e329f30241598201be","99cee571363beac9ce036d5a4fd24e8b773866625177a165435fb7a8c30a3770","3c3902107b98737e4cc75af6db3ce3a885f38da85ffdf0f6c389cefb92cb9aec","9257d2625ec1f30942315d16819d27710438fa26cf0a0528bdf782bccf9d5507","111767295f2b6e83ba740124454e9cdbd3b79428b8b1f2348e2176df2aaab99b","9be7ab794f4fe16f5e46cf1e44d205afa2c966793bd7bffc103f546947c63d52","61d5a4d2bcd123b37b56979660f0a6164f23a032d81eda596b1ef297701260a0","dd973bb43dc8ae32fabe516cd578cd083dc33b766c47eeec50ff9dbcc69f4e44","cd1a0b5bfeff4c16463f4485e4b45068ea481370c29e7dbd4130657d91693e72","21fc57ea3a42c9ef7abe5dae17e818883c31d7d129492a4f8fb8166fb45a60a8","0d1cea52583803b2476cc888b5a3146cfc534d3182eada798798a19141b72ff8","d62728b86c3ebae6e6a3373b971ce79ed16d525a10b2073f967395364151b1ed","0569030c30bc80d826dab3f0adff19532e12e9a1422fa6074a3307ece5e2d390","747b1c0b9764c4c4c3d69bba978200dc66a481cb16c48d5c8426995139c1aa5b","6f3f39dfaaecaf7fc7a9b30a830e777e3787f2c6a2d70e8bbab9f97304ce9e42","d7183347f197bd84c548a6b286af0e9b4e089db6145ce0b00c21827c6e92f6d3","d7773d00e57ee861a8696fdbbc5ec6845c39362690e0d1b77a78125fcc14ad4b","32396803dfd2179271f9344c25e15cb3328b0da5f6421e6d046dc4be16f56f41","5d36fd4ee4c515b9f0729fc836c850c9b3a5a4a852aae66a4a1ebe01f5e939cf","bc9989afc605949c5b45b8da5c5d348eb0efec2160072eaa5148ebc80d9229cd","05d3251216a8e1ec65049ca93e34ad49ae0e582cbeeb1cf0b1db88cc99bad7db","6734f6ae33800be682fbf1bb8ee688f499201798046d3f712a8a70559781029f","d5c232711ea2b2ef402b1f88445617c20f7822daf6367048c6d9be54628d5490","8bde9224af9617d27de57dd3ac215513fd5a4423063bb66102b9345e2710f63e","2271a4eeafa212e60e13fac283c9d424ed79d22df808f28afeca83410c4080e4",{"version":"2556e7e8bb7e6f0bb3fe25f3da990d1812cb91f8c9b389354b6a0c8a6d687590","impliedFormat":99},{"version":"ad1c91ca536e0962dcbfcdff40073e3dd18da839e0baad3fe990cf0d10c93065","impliedFormat":99},{"version":"19cf605ba2a4e8fba017edebdddbbc45aea897ddc58b4aae4c55f382b570ff53","impliedFormat":99},{"version":"884aab8c07224434c034b49e88de0511f21536aa83ee88f1285160ba6d3fb77a","impliedFormat":99},{"version":"130b39b18c99e5678635f383ef57efaa507196838ddabb47cb104064e2ce4cd3","impliedFormat":99},{"version":"7618d2cb769e2093acd4623d645b683ab9fea78c262b3aa354aba9f5afdcaaee","impliedFormat":99},{"version":"029f1ce606891c3f57f4c0c60b8a46c8ced53e719d27a7c9693817f2fe37690b","impliedFormat":99},{"version":"83596c963e276a9c5911412fba37ae7c1fe280f2d77329928828eed5a3bfa9a6","impliedFormat":99},{"version":"81acfd3a01767770e559bc57d32684756989475be6ea32e2fe6255472c3ea116","impliedFormat":99},{"version":"88d0c3eae81868b4749ba5b88f9b6d564ee748321ce19a2f4269a4e9dd46020a","impliedFormat":99},{"version":"8266b39a828bfb2695cabfa403e7c1226d7d94599f21bea9f760e35f4ca7a576","impliedFormat":99},{"version":"c1c1e740195c882a776cf084acbaf963907785ee39e723c6375fec9a59bf2387","impliedFormat":99},{"version":"137f96b78e477e08876f6372072c3b6f1767672bf182013f84f8ae53d987ff86","impliedFormat":99},{"version":"29896c61d09880ff39f8a86873bf72ce4deb910158d3a496122781e29904c615","impliedFormat":99},{"version":"81ce540acef0d6972b0b163331583181be3603300f618dcd6a6a3138954ff30c","impliedFormat":99},{"version":"19990350fca066265b2c190c9b6cde1229f35002ea2d4df8c9e397e9942f6c89","impliedFormat":99},{"version":"8fb8fdda477cd7382477ffda92c2bb7d9f7ef583b1aa531eb6b2dc2f0a206c10","impliedFormat":99},{"version":"66995b0c991b5c5d42eff1d950733f85482c7419f7296ab8952e03718169e379","impliedFormat":99},{"version":"9863f888da357e35e013ca3465b794a490a198226bd8232c2f81fb44e16ff323","impliedFormat":99},{"version":"84bc2d80326a83ee4a6e7cba2fd480b86502660770c0e24da96535af597c9f1e","impliedFormat":99},{"version":"ea27768379b866ee3f5da2419650acdb01125479f7af73580a4bceb25b79e372","impliedFormat":99},{"version":"598931eeb4362542cae5845f95c5f0e45ac668925a40ce201e244d7fe808e965","impliedFormat":99},{"version":"da9ef88cde9f715756da642ad80c4cd87a987f465d325462d6bc2a0b11d202c8","impliedFormat":99},{"version":"b4c6184d78303b0816e779a48bef779b15aea4a66028eb819aac0abee8407dea","impliedFormat":99},{"version":"db085d2171d48938a99e851dafe0e486dce9859e5dfa73c21de5ed3d4d6fb0c5","impliedFormat":99},{"version":"62a3ad1ddd1f5974b3bf105680b3e09420f2230711d6520a521fab2be1a32838","impliedFormat":99},{"version":"a77be6fc44c876bc10c897107f84eaba10790913ebdcad40fcda7e47469b2160","impliedFormat":99},{"version":"06cf55b6da5cef54eaaf51cdc3d4e5ebf16adfdd9ebd20cec7fe719be9ced017","impliedFormat":99},{"version":"91f5dbcdb25d145a56cffe957ec665256827892d779ef108eb2f3864faff523b","impliedFormat":99},{"version":"052ba354bab8fb943e0bc05a0769f7b81d7c3b3c6cd0f5cfa53c7b2da2a525c5","impliedFormat":99},{"version":"927955a3de5857e0a1c575ced5a4245e74e6821d720ed213141347dd1870197f","impliedFormat":99},{"version":"fec804d54cd97dd77e956232fc37dc13f53e160d4bbeeb5489e86eeaa91f7ebd","impliedFormat":99},{"version":"75ef949153a3e6ff419e39d0fa5eb6617e92de5019738ad3c43872023d9665f5","impliedFormat":99},{"version":"ed9ce8e6dd5b2d00ab95efc44e4ad9d0eba77362e01619cb21dedfdedbad51b8","impliedFormat":1},{"version":"5520611f997f2b8e62a6e191da45b07813ac2e758304690606604a64ac0ca976","impliedFormat":1},{"version":"00b469cba48c9d772a4555216d21ba41cdb5a732af797ccb57267344f4fc6c3d","impliedFormat":1},{"version":"2766bf77766c85c25ec31586823fefb48344e64556faad7e75a3363e517814f6","impliedFormat":1},{"version":"b7d1eaffd8003e8dc0ec275e58bd24c7b9a4dbae2a2d0d83cf248c88237262ce","impliedFormat":99},{"version":"7a8b08c0521c3a9e1db3c8b14f37e59d838fdc32389f1193b96630b435a8e64e","impliedFormat":99},{"version":"2e54848617fae9eb73654d9cf4295d99dab4b9c759934e5b82e2e57e6aaaef20","impliedFormat":99},{"version":"ae056b7c3f727d492166d4c1169d5905ddd194128a014b5d2d621248ed94b49c","impliedFormat":99},{"version":"edc5d99a04130f066f6e8d31c7c3f9ba4749496356470279408833b4faee3554","impliedFormat":99},{"version":"2f502ac2473a2bbf0d6217f9660e9d5bf40165a2f91067596323898c53dab87c","impliedFormat":99},{"version":"21f27a0c8bc8d9a4e2cf6d9c60140f8b071d0e1ffddb4b7dcf6bbf74d0e8d470","impliedFormat":99},{"version":"c9e304539f80684ca0ee5953ca409c0cd49d116c717852d84cc0e63680081188","impliedFormat":99},{"version":"3a09521d2ae02cc74e82ec9781f678c8c6d94667cd2c46bba5b7a2dd1cc676bf","impliedFormat":99},{"version":"0f38bcf19f105cd31ded5d46491ca50a46462c838816c358d445f41ac7a68f5a","impliedFormat":99},{"version":"a65fc667cd78d7cad733fab96f4bff3183c0dcbc15b083dce0055cffc5c64f9f","impliedFormat":99},{"version":"c735e27dfa775155120c50f714f594639dd7b6ad1878097feb005a0b5c59b7c2","impliedFormat":99},{"version":"f3dd541f4d87bba38dabf43fd06b7616c6f86b11608d30e61086ab39f84fa8d8","impliedFormat":99},{"version":"2e356d28181df929a42aa86371cebc835f75cf2b49fabf22833a6bdd489f75b2","impliedFormat":99},{"version":"a515b08047d24de84d89ad80b2843e565e65ed4a4e7cfc9707656470d7c555f9","impliedFormat":99},{"version":"cf43b2783a58e42fca6e45f0d47465b2ab855b7e9bea5ccb68447297df8aade5","impliedFormat":99},{"version":"03b0b1ee0f534f1878fccce9f381f4aef80c7053c4f8208aeade8d988941c6ba","impliedFormat":99},{"version":"e1876320803ff4fd56bba45662b541bce6775dd98962b2539ff3d68233608cee","impliedFormat":99},{"version":"c494bed4afeac874be01bfba3c581c1274e1a03d75d850ee311a933dffd6c692","impliedFormat":99},{"version":"d67fd6ea8cf37131627c7a9ae1de96d19d41cb32e741a475f0f56942576a7b3b","impliedFormat":99},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"030e350db2525514580ed054f712ffb22d273e6bc7eddc1bb7eda1e0ba5d395e","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"a79e62f1e20467e11a904399b8b18b18c0c6eea6b50c1168bf215356d5bebfaf","affectsGlobalScope":true,"impliedFormat":1},{"version":"8fa51737611c21ba3a5ac02c4e1535741d58bec67c9bdf94b1837a31c97a2263","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"d2bc987ae352271d0d615a420dcf98cc886aa16b87fb2b569358c1fe0ca0773d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4f0539c58717cbc8b73acb29f9e992ab5ff20adba5f9b57130691c7f9b186a4d","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"76103716ba397bbb61f9fa9c9090dca59f39f9047cb1352b2179c5d8e7f4e8d0","impliedFormat":1},{"version":"f9677e434b7a3b14f0a9367f9dfa1227dfe3ee661792d0085523c3191ae6a1a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"4314c7a11517e221f7296b46547dbc4df047115b182f544d072bdccffa57fc72","impliedFormat":1},{"version":"115971d64632ea4742b5b115fb64ed04bcaae2c3c342f13d9ba7e3f9ee39c4e7","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"9057f224b79846e3a95baf6dad2c8103278de2b0c5eebda23fc8188171ad2398","affectsGlobalScope":true,"impliedFormat":1},{"version":"19d5f8d3930e9f99aa2c36258bf95abbe5adf7e889e6181872d1cdba7c9a7dd5","impliedFormat":1},{"version":"e6f5a38687bebe43a4cef426b69d34373ef68be9a6b1538ec0a371e69f309354","impliedFormat":1},{"version":"a6bf63d17324010ca1fbf0389cab83f93389bb0b9a01dc8a346d092f65b3605f","impliedFormat":1},{"version":"e009777bef4b023a999b2e5b9a136ff2cde37dc3f77c744a02840f05b18be8ff","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"88bc59b32d0d5b4e5d9632ac38edea23454057e643684c3c0b94511296f2998c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ff5a53a58e756d2661b73ba60ffe274231a4432d21f7a2d0d9e4f6aa99f4283","impliedFormat":1},{"version":"1e289f30a48126935a5d408a91129a13a59c9b0f8c007a816f9f16ef821e144e","impliedFormat":1},{"version":"2ea254f944dfe131df1264d1fb96e4b1f7d110195b21f1f5dbb68fdd394e5518","impliedFormat":1},{"version":"5135bdd72cc05a8192bd2e92f0914d7fc43ee077d1293dc622a049b7035a0afb","impliedFormat":1},{"version":"4f80de3a11c0d2f1329a72e92c7416b2f7eab14f67e92cac63bb4e8d01c6edc8","impliedFormat":1},{"version":"6d386bc0d7f3afa1d401afc3e00ed6b09205a354a9795196caed937494a713e6","impliedFormat":1},{"version":"f579f267a2f4c2278cca2ec84613e95059368b503ce96586972d304e5e40125b","affectsGlobalScope":true,"impliedFormat":1},{"version":"23459c1915878a7c1e86e8bdb9c187cddd3aea105b8b1dfce512f093c969bc7e","impliedFormat":1},{"version":"b1b6ee0d012aeebe11d776a155d8979730440082797695fc8e2a5c326285678f","impliedFormat":1},{"version":"45875bcae57270aeb3ebc73a5e3fb4c7b9d91d6b045f107c1d8513c28ece71c0","impliedFormat":1},{"version":"1dc73f8854e5c4506131c4d95b3a6c24d0c80336d3758e95110f4c7b5cb16397","affectsGlobalScope":true,"impliedFormat":1},{"version":"5f6f1d54779d0b9ed152b0516b0958cd34889764c1190434bbf18e7a8bb884cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"c6b4e0a02545304935ecbf7de7a8e056a31bb50939b5b321c9d50a405b5a0bba","impliedFormat":1},{"version":"fab29e6d649aa074a6b91e3bdf2bff484934a46067f6ee97a30fcd9762ae2213","impliedFormat":1},{"version":"8145e07aad6da5f23f2fcd8c8e4c5c13fb26ee986a79d03b0829b8fce152d8b2","impliedFormat":1},{"version":"e1120271ebbc9952fdc7b2dd3e145560e52e06956345e6fdf91d70ca4886464f","impliedFormat":1},{"version":"814118df420c4e38fe5ae1b9a3bafb6e9c2aa40838e528cde908381867be6466","impliedFormat":1},{"version":"f7b1df115dbd1b8522cba4f404a9f4fdcd5169e2137129187ffeee9d287e4fd1","impliedFormat":1},{"version":"c878f74b6d10b267f6075c51ac1d8becd15b4aa6a58f79c0cfe3b24908357f60","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","impliedFormat":1},{"version":"fbf68fc8057932b1c30107ebc37420f8d8dc4bef1253c4c2f9e141886c0df5ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2754d8221d77c7b382096651925eb476f1066b3348da4b73fe71ced7801edada","impliedFormat":1},{"version":"993985beef40c7d113f6dd8f0ba26eed63028b691fbfeb6a5b63f26408dd2c6d","affectsGlobalScope":true,"impliedFormat":1},{"version":"bef91efa0baea5d0e0f0f27b574a8bc100ce62a6d7e70220a0d58af6acab5e89","affectsGlobalScope":true,"impliedFormat":1},{"version":"282fd2a1268a25345b830497b4b7bf5037a5e04f6a9c44c840cb605e19fea841","impliedFormat":1},{"version":"5360a27d3ebca11b224d7d3e38e3e2c63f8290cb1fcf6c3610401898f8e68bc3","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"7d6ff413e198d25639f9f01f16673e7df4e4bd2875a42455afd4ecc02ef156da","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb094bb347d7df3380299eb69836c2c8758626ecf45917577707c03cf816b6f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"f689c4237b70ae6be5f0e4180e8833f34ace40529d1acc0676ab8fb8f70457d7","impliedFormat":1},{"version":"b02784111b3fc9c38590cd4339ff8718f9329a6f4d3fd66e9744a1dcd1d7e191","impliedFormat":1},{"version":"ac5ed35e649cdd8143131964336ab9076937fa91802ec760b3ea63b59175c10a","impliedFormat":1},{"version":"52a8e7e8a1454b6d1b5ad428efae3870ffc56f2c02d923467f2940c454aa9aec","affectsGlobalScope":true,"impliedFormat":1},{"version":"78dc0513cc4f1642906b74dda42146bcbd9df7401717d6e89ea6d72d12ecb539","impliedFormat":1},{"version":"ad90122e1cb599b3bc06a11710eb5489101be678f2920f2322b0ac3e195af78d","impliedFormat":1},{"version":"9b2f424a2c5c592d738100d898df3f9ee018bdd23a279f10849c3686abbec158","impliedFormat":99},{"version":"45a863abb109b97864039f30a93f6ad88584cdc0dd47a6f1b7bfacb0792bd3fe","impliedFormat":99},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"aa5524e0509c2168c9493604acf51ef97d2027f03f3b38da097802d3aa719dc8","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"d072cb61b086eeae042c45d85ea553a03b123d3e27dbac911faa1a695f5d6752","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"299fd0c281633d8dbfbe5f44c5f2850fe37392da6fd3b9cca3cb4e10cda16432","impliedFormat":1},{"version":"5af67564ca508c2f4d64e3c3643cc41660805e7bf94eaa80f916d3457b521765","impliedFormat":99},{"version":"4536edc937015c38172e7ff9d022a16110d2c1890529132c20a7c4f6005ee2c6","affectsGlobalScope":true,"impliedFormat":1},{"version":"9ac7d6ff6630b32714a83ca666e675059e2da52cd99ff3bf013f429a29918f47","signature":"6a14cd9daee8b6270e4c221e9d049501bf9f6240bf9f62c2e538ca0aad1c88d0"},{"version":"3bfeed6e17d67411b2eb60f745b43c69f4636ef7852a8a50bdf7d13e2efefa6e","signature":"65faa50d445d5c3643900e3e4d47dfb59177d19d8c1ce9f435a9773172f51824"},{"version":"864f218b87db84d31833ef53b81f368c94d759f2be5d21cf4871dc513a415bc6","signature":"093ff8067a0f4424d4cf50df09aa2c549c66dc7cae0c8e9c255a8e1d7ddaef17"}],"root":[[420,422]],"options":{"allowImportingTsExtensions":false,"allowJs":false,"allowSyntheticDefaultImports":true,"allowUmdGlobalAccess":false,"allowUnreachableCode":false,"allowUnusedLabels":false,"alwaysStrict":true,"assumeChangesOnlyAffectDirectDependencies":false,"checkJs":false,"composite":true,"declaration":true,"declarationMap":true,"downlevelIteration":true,"emitBOM":false,"emitDeclarationOnly":false,"emitDecoratorMetadata":false,"esModuleInterop":true,"exactOptionalPropertyTypes":false,"experimentalDecorators":false,"importHelpers":true,"inlineSourceMap":false,"inlineSources":false,"jsx":4,"jsxImportSource":"react","module":99,"newLine":1,"noEmitHelpers":false,"noEmitOnError":true,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitOverride":true,"noImplicitReturns":true,"noImplicitThis":true,"noPropertyAccessFromIndexSignature":false,"noStrictGenericChecks":false,"noUncheckedIndexedAccess":false,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","preserveConstEnums":true,"removeComments":false,"sourceMap":true,"strict":true,"strictBindCallApply":true,"strictFunctionTypes":true,"strictNullChecks":true,"strictPropertyInitialization":true,"stripInternal":false,"target":99,"useDefineForClassFields":true,"useUnknownInCatchVariables":true,"verbatimModuleSyntax":false},"referencedMap":[[422,1],[421,2],[420,3],[196,4],[124,5],[125,5],[126,5],[127,5],[128,5],[129,5],[130,5],[131,5],[133,5],[134,5],[135,5],[136,5],[138,5],[137,5],[140,5],[145,5],[144,5],[147,5],[148,5],[149,5],[146,5],[159,5],[152,6],[153,5],[154,7],[150,8],[157,9],[158,7],[151,6],[160,7],[161,5],[163,10],[162,6],[165,11],[164,5],[166,5],[167,5],[168,5],[169,5],[170,5],[171,5],[172,5],[173,5],[174,5],[141,5],[142,5],[176,5],[143,5],[155,5],[156,5],[139,5],[177,5],[178,5],[179,5],[180,12],[181,13],[182,5],[183,5],[184,5],[185,14],[186,5],[187,15],[175,5],[188,5],[189,5],[132,5],[190,5],[192,16],[193,16],[194,16],[195,16],[191,5],[221,17],[81,5],[82,5],[83,5],[118,18],[199,5],[84,5],[200,5],[201,5],[198,15],[123,5],[202,5],[197,15],[119,5],[120,5],[121,19],[203,20],[204,5],[205,5],[122,21],[206,15],[207,5],[208,15],[210,5],[209,5],[211,5],[212,5],[213,5],[214,5],[215,22],[217,22],[218,23],[219,5],[220,22],[216,5],[324,24],[325,24],[326,25],[284,26],[327,27],[328,28],[329,29],[279,5],[282,30],[280,5],[281,5],[330,31],[331,32],[332,33],[333,34],[334,35],[335,36],[336,36],[338,20],[337,37],[339,38],[340,39],[341,40],[323,41],[283,5],[342,42],[343,43],[344,44],[377,45],[345,46],[346,47],[347,48],[348,49],[349,50],[350,51],[351,52],[352,53],[353,54],[354,55],[355,55],[356,56],[357,5],[358,5],[359,57],[361,58],[360,59],[362,60],[363,61],[364,62],[365,63],[366,64],[367,65],[368,66],[369,67],[370,68],[371,69],[372,70],[373,71],[374,72],[375,73],[376,74],[285,5],[265,75],[267,76],[270,76],[272,77],[271,76],[269,78],[268,78],[273,79],[418,80],[277,81],[276,82],[266,83],[278,84],[275,85],[274,76],[264,86],[262,5],[260,87],[263,88],[261,89],[259,90],[258,91],[256,92],[257,92],[255,5],[227,93],[222,5],[224,94],[223,95],[234,93],[233,93],[235,96],[232,97],[230,93],[231,93],[228,98],[229,93],[379,99],[378,5],[243,5],[244,100],[241,5],[242,5],[419,5],[117,101],[97,5],[89,5],[104,102],[90,103],[107,104],[88,105],[114,106],[112,107],[113,108],[116,107],[115,106],[105,109],[106,110],[91,111],[96,112],[99,113],[101,114],[100,115],[98,116],[102,117],[92,118],[95,119],[93,120],[87,121],[110,122],[109,123],[108,124],[111,125],[86,126],[94,127],[85,5],[103,128],[226,129],[225,5],[236,130],[254,131],[239,132],[252,133],[237,5],[238,134],[253,135],[248,136],[249,137],[247,138],[251,139],[245,140],[240,141],[250,142],[246,133],[80,143],[79,5],[77,5],[78,5],[14,5],[13,5],[2,5],[15,5],[16,5],[17,5],[18,5],[19,5],[20,5],[21,5],[22,5],[3,5],[23,5],[24,5],[4,5],[25,5],[29,5],[26,5],[27,5],[28,5],[30,5],[31,5],[32,5],[5,5],[33,5],[34,5],[35,5],[36,5],[6,5],[40,5],[37,5],[38,5],[39,5],[41,5],[7,5],[42,5],[47,5],[48,5],[43,5],[44,5],[45,5],[46,5],[8,5],[52,5],[49,5],[50,5],[51,5],[53,5],[9,5],[54,5],[55,5],[56,5],[58,5],[57,5],[59,5],[60,5],[10,5],[61,5],[62,5],[63,5],[11,5],[64,5],[65,5],[66,5],[67,5],[68,5],[1,5],[69,5],[70,5],[12,5],[74,5],[72,5],[76,5],[71,5],[75,5],[73,5],[301,144],[311,145],[300,144],[321,146],[292,147],[291,148],[320,149],[314,150],[319,151],[294,152],[308,153],[293,154],[317,155],[289,156],[288,149],[318,157],[290,158],[295,159],[296,5],[299,159],[286,5],[322,160],[312,161],[303,162],[304,163],[306,164],[302,165],[305,166],[315,149],[297,167],[298,168],[307,169],[287,22],[310,161],[309,159],[313,5],[316,170],[417,171],[395,172],[405,173],[394,172],[415,174],[386,175],[385,148],[414,149],[408,176],[413,177],[388,178],[402,179],[387,180],[411,181],[383,182],[382,149],[412,183],[384,184],[389,185],[390,5],[393,185],[380,5],[416,186],[406,187],[397,188],[398,189],[400,190],[396,191],[399,192],[409,149],[391,193],[392,194],[401,195],[381,22],[404,196],[403,185],[407,5],[410,197]],"latestChangedDtsFile":"./main.d.ts","version":"5.8.3"}
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@build-script/esbuild-html-entry",
3
+ "version": "0.1.1",
4
+ "type": "module",
5
+ "license": "MIT",
6
+ "repository": "https://github.com/GongT/baobao",
7
+ "keywords": [
8
+ "esbuild",
9
+ "html"
10
+ ],
11
+ "exports": {
12
+ ".": "./lib/main.js",
13
+ "./package.json": "./package.json"
14
+ },
15
+ "dependencies": {
16
+ "cheerio": "^1.0.0",
17
+ "@idlebox/node": "^1.4.5"
18
+ },
19
+ "devDependencies": {
20
+ "@types/node": "^22.8.6",
21
+ "domhandler": "^5.0.3",
22
+ "esbuild": "^0.24.0",
23
+ "rimraf": "^6.0.1",
24
+ "@build-script/single-dog-asset": "^1.0.34",
25
+ "@internal/local-rig": "^1.0.1"
26
+ },
27
+ "scripts": {
28
+ "build": "tsc -p src",
29
+ "_phase:build": "tsc -p src",
30
+ "watch": "tsc -p src -w",
31
+ "clean": "rimraf lib",
32
+ "test": "node test/esbuild.js"
33
+ }
34
+ }
package/src/main.ts ADDED
@@ -0,0 +1,231 @@
1
+ import { relativePath } from '@idlebox/node';
2
+ import { type CheerioAPI, load as loadHtml } from 'cheerio';
3
+ import type esbuild from 'esbuild';
4
+ import { readFile, stat, writeFile } from 'node:fs/promises';
5
+ import { basename, dirname, resolve } from 'node:path';
6
+ import { Tag, TagCollection } from './tag.js';
7
+ import { commonParent, debug, type IDiagnostics } from './tools.js';
8
+
9
+ const PLUGIN_NAME = 'html-creation';
10
+ const NAMESPACE = 'esbuild-html-entry';
11
+ const isHtml = /.*\.html$/;
12
+ // const rExt = /\..+?$/;
13
+
14
+ interface ICache {
15
+ readonly filepath: string;
16
+ readonly content: CheerioAPI;
17
+ readonly mtime: Date;
18
+ readonly tags: TagCollection;
19
+ result: esbuild.OnLoadResult;
20
+ }
21
+
22
+ export class HtmlEntryPlugin {
23
+ private readonly cache = new Map<string, ICache>();
24
+ private readonly sourceRoot: string;
25
+ private readonly commonParent: string;
26
+ private readonly _resolve: (path: string, options?: esbuild.ResolveOptions) => Promise<esbuild.ResolveResult>;
27
+
28
+ constructor(build: esbuild.PluginBuild) {
29
+ debug('[plugin] absWorkingDir:', build.initialOptions.absWorkingDir);
30
+
31
+ this.sourceRoot = resolve(build.initialOptions.absWorkingDir ?? process.cwd());
32
+ debug('[plugin] sourceRoot:', this.sourceRoot);
33
+
34
+ const cr = resolve(this.sourceRoot, build.initialOptions.outdir ?? '.');
35
+ if (cr.startsWith(this.sourceRoot) || this.sourceRoot.startsWith(cr)) {
36
+ }
37
+ this.commonParent = commonParent(this.sourceRoot, cr);
38
+ debug('[plugin] commonParent:', this.commonParent);
39
+
40
+ this._resolve = build.resolve;
41
+
42
+ this.onResolve = this.onResolve.bind(this);
43
+ this.onLoad = this.onLoad.bind(this);
44
+ this.onEnd = this.onEnd.bind(this);
45
+ }
46
+
47
+ async onEnd(args: esbuild.BuildResult): Promise<esbuild.OnEndResult | null> {
48
+ const res: IDiagnostics = { warnings: [], errors: [] };
49
+ if (!args.metafile) {
50
+ res.warnings.push({ text: 'html file(s) not created due to previous error' });
51
+ return res;
52
+ }
53
+ debug(
54
+ '\x1b[38;5;11m[onEnd]\x1b[0m outputFiles:',
55
+ args.outputFiles?.map((e) => e.path)
56
+ );
57
+ debug(' metafile.outputs:', Object.keys(args.metafile.outputs));
58
+
59
+ const entryMap = new Map<ICache, string>();
60
+
61
+ for (const [jsBundle, output] of Object.entries(args.metafile.outputs)) {
62
+ if (!output.entryPoint?.startsWith(`${NAMESPACE}:`)) {
63
+ debug('\x1b[2m ✘ %s (entry: %s)\x1b[0m', jsBundle, output.entryPoint);
64
+ continue;
65
+ }
66
+ debug('\x1b[38;5;14m ✔ %s\x1b[0m', jsBundle);
67
+
68
+ const sourceFile = output.entryPoint.substring(NAMESPACE.length + 1);
69
+ debug(' * sourceFile:', sourceFile);
70
+
71
+ const entry = this.cache.get(sourceFile);
72
+ if (!entry) {
73
+ res.errors.push({ text: 'entry not found', location: { file: sourceFile } });
74
+ continue;
75
+ }
76
+ debug(' * inputs:', Object.keys(output.inputs));
77
+
78
+ const outputDir = resolve(this.commonParent, dirname(jsBundle));
79
+ debug(' * outputDir:', outputDir);
80
+
81
+ const jsBundleRel = relativePath(outputDir, resolve(this.commonParent, jsBundle));
82
+ debug(' * jsBundle: %s (%s)', jsBundleRel, jsBundle);
83
+
84
+ const cssBundleRel = output.cssBundle
85
+ ? relativePath(outputDir, resolve(this.commonParent, output.cssBundle))
86
+ : undefined;
87
+ debug(' * cssBundle: %s (%s)', cssBundleRel, output.cssBundle);
88
+
89
+ const outputFile = resolve(outputDir, basename(sourceFile));
90
+ debug(' * outputFile:', outputFile);
91
+
92
+ debug(' * tags:', entry.tags.size);
93
+
94
+ entryMap.set(entry, outputFile);
95
+
96
+ entry.tags.apply(jsBundleRel, cssBundleRel, res);
97
+ // if (!output.inputs[item.relative]) {
98
+ // res.errors.push({
99
+ // text: `unknown tag source ${item.relative}`,
100
+ // location: { file: entryFile, lineText: item.element.toString() },
101
+ // });
102
+ // continue;
103
+ // }
104
+ }
105
+
106
+ /* Emit Html Files */
107
+ for (const [entry, filename] of entryMap.entries()) {
108
+ const text = entry.content.html();
109
+ await writeFile(filename, text, 'utf-8');
110
+ }
111
+
112
+ return res.errors.length || res.warnings.length ? res : null;
113
+ }
114
+
115
+ protected findByInput(path: string) {
116
+ for (const entry of this.cache.values()) {
117
+ // if(entry.loads.)
118
+ if (entry.result.pluginData.filepath === path) {
119
+ return entry;
120
+ }
121
+ }
122
+ return null;
123
+ }
124
+
125
+ onResolve(args: esbuild.OnResolveArgs): null | esbuild.OnResolveResult {
126
+ if (args.importer) {
127
+ return null;
128
+ }
129
+ const path = resolve(this.sourceRoot, args.path);
130
+ return { namespace: NAMESPACE, path: path, pluginData: { filepath: path }, watchFiles: [path] };
131
+ }
132
+
133
+ async onLoad(args: esbuild.OnLoadResult): Promise<esbuild.OnLoadResult> {
134
+ const filepath: string = args.pluginData.filepath;
135
+ const ss = await stat(filepath);
136
+ // TODO: cache
137
+
138
+ const text = await readFile(filepath, 'utf-8');
139
+
140
+ const diag: IDiagnostics = {
141
+ errors: [],
142
+ warnings: [],
143
+ };
144
+
145
+ const ret: esbuild.OnLoadResult = {
146
+ contents: '',
147
+ loader: 'js',
148
+ pluginName: PLUGIN_NAME,
149
+ resolveDir: this.sourceRoot,
150
+ };
151
+
152
+ const html = loadHtml(text, {
153
+ baseURI: dirname(filepath),
154
+ onParseError(err) {
155
+ diag.errors.push({
156
+ pluginName: PLUGIN_NAME,
157
+ text: `parse html failed: ${err.code}`,
158
+ location: {
159
+ file: filepath,
160
+ line: err.startLine - 1,
161
+ column: err.startCol - 1,
162
+ length: err.endOffset - err.startOffset,
163
+ },
164
+ });
165
+ },
166
+ });
167
+
168
+ const tags = await this.work(html, args, diag);
169
+
170
+ ret.contents = tags.createDummyScript();
171
+
172
+ this.cache.set(filepath, {
173
+ filepath: filepath,
174
+ content: html,
175
+ mtime: ss.mtime,
176
+ tags: tags,
177
+ result: ret,
178
+ });
179
+
180
+ if (diag.errors.length) ret.errors = diag.errors;
181
+ if (diag.warnings.length) ret.warnings = diag.warnings;
182
+
183
+ return ret;
184
+ }
185
+
186
+ private async tryResolve(kind: esbuild.ImportKind, importer: string, file: string, diag: IDiagnostics) {
187
+ if (!file.startsWith('.')) {
188
+ file = `./${file}`;
189
+ }
190
+ const res = await this._resolve(file, { importer, kind, resolveDir: dirname(importer) });
191
+ diag.errors.push(...res.errors);
192
+ diag.warnings.push(...res.warnings);
193
+ if (res.external || !res.path) return null;
194
+
195
+ if (!res.sideEffects) {
196
+ diag.warnings.push({ text: `file ${res.path} has no sideEffects` });
197
+ }
198
+
199
+ return res;
200
+ }
201
+
202
+ private async work($: CheerioAPI, args: esbuild.OnLoadResult, diag: IDiagnostics) {
203
+ const filepath = args.pluginData.filepath;
204
+ const loads = new TagCollection($, this.commonParent, filepath);
205
+ for (const htmlTag of $('script,link[rel="stylesheet"]')) {
206
+ const tagObject = new Tag($(htmlTag));
207
+ if (!tagObject.isValid()) continue;
208
+
209
+ const res = await this.tryResolve(tagObject.importKind(), filepath, tagObject.src, diag);
210
+ if (!res) continue;
211
+
212
+ loads.register(res.path, tagObject);
213
+ }
214
+ return loads;
215
+ }
216
+ }
217
+
218
+ export class ESBuildHtmlEntry implements esbuild.Plugin {
219
+ readonly name = PLUGIN_NAME;
220
+
221
+ setup(build: esbuild.PluginBuild) {
222
+ if (!build.initialOptions.metafile) {
223
+ throw new Error(`metafile: true is required to ${PLUGIN_NAME}`);
224
+ }
225
+
226
+ const plugin = new HtmlEntryPlugin(build);
227
+ build.onResolve({ filter: isHtml }, plugin.onResolve);
228
+ build.onLoad({ filter: isHtml, namespace: NAMESPACE }, plugin.onLoad);
229
+ build.onEnd(plugin.onEnd);
230
+ }
231
+ }
package/src/tag.ts ADDED
@@ -0,0 +1,115 @@
1
+ import { relativePath } from '@idlebox/node';
2
+ import type { Cheerio, CheerioAPI } from 'cheerio';
3
+ import type { Element } from 'domhandler';
4
+ import type { ImportKind } from 'esbuild';
5
+ import { debug, type IDiagnostics } from './tools.js';
6
+
7
+ export type CheerElement = Cheerio<Element>;
8
+
9
+ const isRemoteUrl = /^https?:|^file:/;
10
+
11
+ export enum TagKind {
12
+ script = 0,
13
+ link = 1,
14
+ }
15
+
16
+ export class Tag {
17
+ public readonly field: string;
18
+ public readonly src: string;
19
+ public readonly kind: TagKind;
20
+
21
+ constructor(public readonly $elem: CheerElement) {
22
+ this.kind = $elem[0].tagName === 'script' ? TagKind.script : TagKind.link;
23
+ this.field = this.kind === TagKind.link ? 'href' : 'src';
24
+ this.src = $elem.attr(this.field)!;
25
+ this.$elem.attr(`data-${this.field}`, this.src);
26
+ this.unuse();
27
+ }
28
+
29
+ importKind(): ImportKind {
30
+ return this.kind === TagKind.link ? 'import-rule' : 'import-statement';
31
+ }
32
+
33
+ isValid() {
34
+ return this.src && !isRemoteUrl.test(this.src);
35
+ }
36
+
37
+ use(src: string) {
38
+ this.$elem.attr(this.field, src.startsWith('.') ? src : `./${src}`);
39
+ }
40
+
41
+ unuse() {
42
+ this.$elem.removeAttr(this.field);
43
+ }
44
+
45
+ toString() {
46
+ return this.$elem.toString();
47
+ }
48
+ }
49
+
50
+ interface ILoad {
51
+ readonly id: string;
52
+ readonly filepath: string;
53
+ readonly tag: Tag;
54
+ }
55
+
56
+ export class TagCollection {
57
+ private readonly tags: ILoad[] = [];
58
+
59
+ constructor(
60
+ public readonly $html: CheerioAPI,
61
+ private readonly commonRoot: string,
62
+ public readonly htmlSource: string
63
+ ) {}
64
+
65
+ get size() {
66
+ return this.tags.length;
67
+ }
68
+
69
+ register(filepath: string, tag: Tag) {
70
+ this.tags.push({ id: relativePath(this.commonRoot, filepath), filepath, tag });
71
+ }
72
+
73
+ apply(entryFile: string, cssBundle: string | undefined, _res: IDiagnostics) {
74
+ const entryTagHasSet = {
75
+ [TagKind.link]: false,
76
+ [TagKind.script]: false,
77
+ };
78
+ const sources = {
79
+ [TagKind.link]: cssBundle,
80
+ [TagKind.script]: entryFile,
81
+ };
82
+ for (const item of this.tags) {
83
+ debug('TAG:', item.tag.toString());
84
+ const src = sources[item.tag.kind];
85
+
86
+ if (entryTagHasSet[item.tag.kind] || !src) {
87
+ debug(' -> not use');
88
+ item.tag.unuse();
89
+ continue;
90
+ }
91
+ entryTagHasSet[item.tag.kind] = true;
92
+
93
+ debug(' -> use main %s: %s', TagKind[item.tag.kind], src);
94
+ item.tag.use(src);
95
+ }
96
+
97
+ if (cssBundle && !entryTagHasSet[TagKind.link]) {
98
+ debug('found in-direct imported css, insert one <link/> tag into <head/>');
99
+ this.$html('head').append(`<link rel="stylesheet" href="${cssBundle}">`);
100
+ }
101
+ }
102
+
103
+ createDummyScript() {
104
+ let contents = '';
105
+ debug('\x1b[38;5;14mSTART\x1b[0m [%s]', this.htmlSource);
106
+ for (const load of this.tags) {
107
+ debug(' -> %s - %s', TagKind[load.tag.kind], load.filepath);
108
+
109
+ contents += `import ${JSON.stringify(load.filepath)}; /* original: ${load.tag.src} */ \n`;
110
+ }
111
+ debug('\x1b[2m%s\x1b[0m', contents.trim());
112
+ debug('\x1b[38;5;14mEND\x1b[0m [%s]', this.htmlSource);
113
+ return contents;
114
+ }
115
+ }
package/src/tools.ts ADDED
@@ -0,0 +1,32 @@
1
+ import type esbuild from 'esbuild';
2
+ import { formatWithOptions } from 'node:util';
3
+
4
+ export const debug: Function = process.argv.includes('--debug')
5
+ ? (text: string, ...args: any[]) => {
6
+ process.stderr.write(
7
+ `${formatWithOptions({ colors: true, breakLength: Number.POSITIVE_INFINITY }, text, ...args)}\n`
8
+ );
9
+ }
10
+ : () => {};
11
+
12
+ export function commonParent(a: string, b: string) {
13
+ const ar = a.split(/[/\/]/g);
14
+ const br = b.split(/[/\/]/g);
15
+ const to = Math.min(ar.length, br.length);
16
+ let i;
17
+ for (i = 0; i < to; i++) {
18
+ if (ar[i] !== br[i]) {
19
+ break;
20
+ }
21
+ }
22
+
23
+ if (i < ar.length) {
24
+ return ar.slice(0, i).join('/');
25
+ }
26
+ return br.slice(0, i).join('/');
27
+ }
28
+
29
+ export interface IDiagnostics {
30
+ errors: esbuild.PartialMessage[];
31
+ warnings: esbuild.PartialMessage[];
32
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "@build-script/single-dog-asset/package/tsconfig.json",
3
+ "compilerOptions": {
4
+ "typeRoots": ["../node_modules/@types", "../node_modules"],
5
+ "types": ["node"],
6
+ "outDir": "../lib",
7
+ },
8
+ }