@dvaji/cheerox 0.0.0-stage → 0.1.2
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/CONTRIBUTING.md +74 -0
- package/Cargo.lock +1091 -0
- package/Cargo.toml +47 -0
- package/LICENSE +21 -0
- package/README.md +121 -2
- package/RELEASING.md +114 -0
- package/THIRD_PARTY_NOTICES.md +7581 -0
- package/build.rs +3 -0
- package/cheerox.darwin-arm64.node +0 -0
- package/cheerox.darwin-x64.node +0 -0
- package/cheerox.linux-arm64-gnu.node +0 -0
- package/cheerox.linux-arm64-musl.node +0 -0
- package/cheerox.linux-x64-gnu.node +0 -0
- package/cheerox.linux-x64-musl.node +0 -0
- package/cheerox.win32-arm64-msvc.node +0 -0
- package/cheerox.win32-x64-msvc.node +0 -0
- package/dist/cheerio-compat-BKkfJEAr.mjs +1648 -0
- package/dist/cheerio-compat-BKkfJEAr.mjs.map +1 -0
- package/dist/cheerio-compat-DRLPzBdX.d.mts +88 -0
- package/dist/cheerio-compat-DRsINTwV.d.cts +88 -0
- package/dist/cheerio-compat-DRsINTwV.d.ts +88 -0
- package/dist/cheerio-compat-DcnYK9OB.cjs +1719 -0
- package/dist/cheerio-compat-DcnYK9OB.cjs.map +1 -0
- package/dist/cheerio-compat.cjs +18 -0
- package/dist/cheerio-compat.d.cts +2 -0
- package/dist/cheerio-compat.d.mts +2 -0
- package/dist/cheerio-compat.d.ts +2 -0
- package/dist/cheerio-compat.mjs +1 -0
- package/dist/index.cjs +13 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +28 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.mjs +53 -0
- package/dist/index.mjs.map +1 -0
- package/dist/legacy-parse.cjs +5 -0
- package/dist/legacy-parse.d.mts +8 -0
- package/dist/legacy-parse.d.ts +7 -0
- package/dist/legacy-parse.mjs +1 -0
- package/dist/modern-B7hyW4cI.d.cts +102 -0
- package/dist/modern-B7hyW4cI.d.ts +102 -0
- package/dist/modern-CHQGP0Yt.cjs +2858 -0
- package/dist/modern-CHQGP0Yt.cjs.map +1 -0
- package/dist/modern-CJvSD_y5.d.mts +102 -0
- package/dist/modern-CvXcTn82.mjs +2769 -0
- package/dist/modern-CvXcTn82.mjs.map +1 -0
- package/dist/modern.cjs +19 -0
- package/dist/modern.d.cts +3 -0
- package/dist/modern.d.mts +3 -0
- package/dist/modern.d.ts +3 -0
- package/dist/modern.mjs +3 -0
- package/dist/nodes-jbWWhssj.cjs +4210 -0
- package/dist/nodes-jbWWhssj.cjs.map +1 -0
- package/dist/nodes-sYxb5qyZ.mjs +3803 -0
- package/dist/nodes-sYxb5qyZ.mjs.map +1 -0
- package/dist/slim.cjs +16 -0
- package/dist/slim.cjs.map +1 -0
- package/dist/slim.d.cts +6 -0
- package/dist/slim.d.mts +6 -0
- package/dist/slim.d.ts +6 -0
- package/dist/slim.mjs +12 -0
- package/dist/slim.mjs.map +1 -0
- package/dist/types-CA01Zg3r.d.cts +526 -0
- package/dist/types-CA01Zg3r.d.mts +526 -0
- package/dist/types-CA01Zg3r.d.ts +526 -0
- package/dist/utils.cjs +31 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.d.cts +8 -0
- package/dist/utils.d.mts +8 -0
- package/dist/utils.d.ts +8 -0
- package/dist/utils.mjs +25 -0
- package/dist/utils.mjs.map +1 -0
- package/native/src/arena.rs +2109 -0
- package/native/src/attributes.rs +946 -0
- package/native/src/codec.rs +298 -0
- package/native/src/diagnostics.rs +1249 -0
- package/native/src/document_order.rs +711 -0
- package/native/src/extraction.rs +321 -0
- package/native/src/gc.rs +175 -0
- package/native/src/hook_sink.rs +801 -0
- package/native/src/hook_stream.rs +513 -0
- package/native/src/id_hash.rs +42 -0
- package/native/src/immutable.rs +333 -0
- package/native/src/lib.rs +4120 -0
- package/native/src/location.rs +392 -0
- package/native/src/markup_tokenizer.rs +668 -0
- package/native/src/runtime.rs +368 -0
- package/native/src/selector.rs +1596 -0
- package/native/src/sink.rs +274 -0
- package/native/src/snapshot.rs +672 -0
- package/native/src/stream.rs +334 -0
- package/native/src/tokenizer.rs +581 -0
- package/native/src/tracker.rs +232 -0
- package/native/vendor/README.md +35 -0
- package/native/vendor/html5ever-0.35.0/.cargo_vcs_info.json +6 -0
- package/native/vendor/html5ever-0.35.0/Cargo.lock +828 -0
- package/native/vendor/html5ever-0.35.0/Cargo.toml +85 -0
- package/native/vendor/html5ever-0.35.0/LICENSE-APACHE +201 -0
- package/native/vendor/html5ever-0.35.0/LICENSE-MIT +25 -0
- package/native/vendor/html5ever-0.35.0/README.md +60 -0
- package/native/vendor/html5ever-0.35.0/benches/html5ever.rs +86 -0
- package/native/vendor/html5ever-0.35.0/data/bench/lipsum-zh.html +19 -0
- package/native/vendor/html5ever-0.35.0/data/bench/lipsum.html +40 -0
- package/native/vendor/html5ever-0.35.0/data/bench/medium-fragment.html +24 -0
- package/native/vendor/html5ever-0.35.0/data/bench/small-fragment.html +7 -0
- package/native/vendor/html5ever-0.35.0/data/bench/strong.html +1 -0
- package/native/vendor/html5ever-0.35.0/data/bench/tiny-fragment.html +1 -0
- package/native/vendor/html5ever-0.35.0/examples/arena.rs +356 -0
- package/native/vendor/html5ever-0.35.0/examples/capi/tokenize.c +74 -0
- package/native/vendor/html5ever-0.35.0/examples/noop-tokenize.rs +47 -0
- package/native/vendor/html5ever-0.35.0/examples/noop-tree-builder.rs +132 -0
- package/native/vendor/html5ever-0.35.0/examples/print-tree-actions.rs +185 -0
- package/native/vendor/html5ever-0.35.0/examples/tokenize.rs +111 -0
- package/native/vendor/html5ever-0.35.0/src/driver.rs +148 -0
- package/native/vendor/html5ever-0.35.0/src/lib.rs +30 -0
- package/native/vendor/html5ever-0.35.0/src/macros.rs +34 -0
- package/native/vendor/html5ever-0.35.0/src/serialize/mod.rs +255 -0
- package/native/vendor/html5ever-0.35.0/src/tokenizer/char_ref/mod.rs +530 -0
- package/native/vendor/html5ever-0.35.0/src/tokenizer/interface.rs +99 -0
- package/native/vendor/html5ever-0.35.0/src/tokenizer/mod.rs +2628 -0
- package/native/vendor/html5ever-0.35.0/src/tokenizer/states.rs +97 -0
- package/native/vendor/html5ever-0.35.0/src/tree_builder/data.rs +170 -0
- package/native/vendor/html5ever-0.35.0/src/tree_builder/mod.rs +1848 -0
- package/native/vendor/html5ever-0.35.0/src/tree_builder/rules.rs +1494 -0
- package/native/vendor/html5ever-0.35.0/src/tree_builder/tag_sets.rs +114 -0
- package/native/vendor/html5ever-0.35.0/src/tree_builder/types.rs +91 -0
- package/native/vendor/html5ever-0.35.0/src/util/str.rs +52 -0
- package/native/vendor/html5gum-0.8.4/Cargo.lock +1006 -0
- package/native/vendor/html5gum-0.8.4/Cargo.toml +109 -0
- package/native/vendor/html5gum-0.8.4/LICENSE +19 -0
- package/native/vendor/html5gum-0.8.4/README.md +110 -0
- package/native/vendor/html5gum-0.8.4/benches/files/0050.html +2131 -0
- package/native/vendor/html5gum-0.8.4/benches/files/6D30.html +1004 -0
- package/native/vendor/html5gum-0.8.4/benches/files.rs +32 -0
- package/native/vendor/html5gum-0.8.4/benches/patterns.rs +31 -0
- package/native/vendor/html5gum-0.8.4/src/arrayvec.rs +29 -0
- package/native/vendor/html5gum-0.8.4/src/char_validator.rs +134 -0
- package/native/vendor/html5gum-0.8.4/src/emitters/callback.rs +676 -0
- package/native/vendor/html5gum-0.8.4/src/emitters/default.rs +207 -0
- package/native/vendor/html5gum-0.8.4/src/emitters/emitter.rs +344 -0
- package/native/vendor/html5gum-0.8.4/src/emitters/html5ever.rs +306 -0
- package/native/vendor/html5gum-0.8.4/src/emitters/mod.rs +25 -0
- package/native/vendor/html5gum-0.8.4/src/entities.rs +3342 -0
- package/native/vendor/html5gum-0.8.4/src/error.rs +96 -0
- package/native/vendor/html5gum-0.8.4/src/htmlstring.rs +130 -0
- package/native/vendor/html5gum-0.8.4/src/lib.rs +66 -0
- package/native/vendor/html5gum-0.8.4/src/machine.rs +2136 -0
- package/native/vendor/html5gum-0.8.4/src/machine_helper.rs +277 -0
- package/native/vendor/html5gum-0.8.4/src/read_helper.rs +244 -0
- package/native/vendor/html5gum-0.8.4/src/reader.rs +440 -0
- package/native/vendor/html5gum-0.8.4/src/span.rs +98 -0
- package/native/vendor/html5gum-0.8.4/src/state.rs +16 -0
- package/native/vendor/html5gum-0.8.4/src/testutils.rs +71 -0
- package/native/vendor/html5gum-0.8.4/src/tokenizer.rs +189 -0
- package/native/vendor/html5gum-0.8.4/src/utils.rs +88 -0
- package/native/vendor/markup5ever-0.35.0/.cargo_vcs_info.json +6 -0
- package/native/vendor/markup5ever-0.35.0/Cargo.toml +45 -0
- package/native/vendor/markup5ever-0.35.0/LICENSE-APACHE +201 -0
- package/native/vendor/markup5ever-0.35.0/LICENSE-MIT +25 -0
- package/native/vendor/markup5ever-0.35.0/interface/mod.rs +422 -0
- package/native/vendor/markup5ever-0.35.0/interface/tree_builder.rs +280 -0
- package/native/vendor/markup5ever-0.35.0/lib.rs +59 -0
- package/native/vendor/markup5ever-0.35.0/serialize.rs +77 -0
- package/native/vendor/markup5ever-0.35.0/util/buffer_queue.rs +333 -0
- package/native/vendor/markup5ever-0.35.0/util/smallcharset.rs +88 -0
- package/native/vendor/scraper-0.24.0/Cargo.toml +52 -0
- package/native/vendor/scraper-0.24.0/LICENSE +15 -0
- package/native/vendor/scraper-0.24.0/src/element_ref/element.rs +212 -0
- package/native/vendor/scraper-0.24.0/src/element_ref/mod.rs +236 -0
- package/native/vendor/scraper-0.24.0/src/element_ref/serializable.rs +15 -0
- package/native/vendor/scraper-0.24.0/src/error/utils.rs +91 -0
- package/native/vendor/scraper-0.24.0/src/error.rs +118 -0
- package/native/vendor/scraper-0.24.0/src/html/mod.rs +270 -0
- package/native/vendor/scraper-0.24.0/src/html/serializable.rs +27 -0
- package/native/vendor/scraper-0.24.0/src/html/tree_sink.rs +285 -0
- package/native/vendor/scraper-0.24.0/src/lib.rs +180 -0
- package/native/vendor/scraper-0.24.0/src/node/serializable.rs +52 -0
- package/native/vendor/scraper-0.24.0/src/node.rs +465 -0
- package/native/vendor/scraper-0.24.0/src/selectable.rs +70 -0
- package/native/vendor/scraper-0.24.0/src/selector.rs +290 -0
- package/package.json +167 -4
- package/scripts/check-native.mjs +15 -0
- package/scripts/check-release.mjs +234 -0
- package/scripts/fix-declarations.mjs +39 -0
- package/scripts/generate-notices.mjs +194 -0
- package/scripts/notices/README.md +13 -0
- package/scripts/notices/cheerio-MIT.txt +21 -0
- package/scripts/notices/html5ever-AUTHORS.txt +20 -0
- package/scripts/notices/html5ever-COPYRIGHT.txt +8 -0
- package/scripts/notices/html5ever-LICENSE-APACHE.txt +201 -0
- package/scripts/notices/html5ever-LICENSE-MIT.txt +25 -0
- package/scripts/notices/htmlparser2-MIT.txt +18 -0
- package/scripts/notices/napi-rs-MIT.txt +43 -0
- package/scripts/notices/neon-MIT.txt +19 -0
- package/scripts/notices/runtime-01c266bced4a434da005.txt +3 -0
- package/scripts/notices/runtime-0a54e647fe54104658b5.txt +14 -0
- package/scripts/notices/runtime-0b74dfa0bcee5c420c6b.txt +25 -0
- package/scripts/notices/runtime-0d542e0c8804e39aa7f3.txt +177 -0
- package/scripts/notices/runtime-0f96a83840e146e43c0e.txt +21 -0
- package/scripts/notices/runtime-123a331b5dbf04c30097.txt +25 -0
- package/scripts/notices/runtime-172020dbfd5b53a226df.txt +34 -0
- package/scripts/notices/runtime-209fbbe0ad52d9235e37.txt +26 -0
- package/scripts/notices/runtime-23f18e03dc49df91622f.txt +23 -0
- package/scripts/notices/runtime-268872b9816f90fd8e85.txt +220 -0
- package/scripts/notices/runtime-35242e7a83f69875e6ed.txt +176 -0
- package/scripts/notices/runtime-378f5840b258e2779c39.txt +25 -0
- package/scripts/notices/runtime-4108245a1f2df9d4e94d.txt +25 -0
- package/scripts/notices/runtime-4455bf75a91154108304.txt +21 -0
- package/scripts/notices/runtime-553fffcd9b1cb158bc3e.txt +13 -0
- package/scripts/notices/runtime-62c7a1e35f56406896d7.txt +176 -0
- package/scripts/notices/runtime-6485b8ed310d3f0340bf.txt +25 -0
- package/scripts/notices/runtime-69fef7b0f322a6555415.txt +201 -0
- package/scripts/notices/runtime-6df43f6f4b5d4587f3d8.txt +187 -0
- package/scripts/notices/runtime-799e9ca9d179295ef372.txt +24 -0
- package/scripts/notices/runtime-7b63ecd5f1902af1b637.txt +25 -0
- package/scripts/notices/runtime-7bc7d5de2a0b793d4e1a.txt +21 -0
- package/scripts/notices/runtime-7e12e5df4bae12cb2158.txt +24 -0
- package/scripts/notices/runtime-861399f8c21c042b1105.txt +12 -0
- package/scripts/notices/runtime-8ada45cd9f843acf64e4.txt +201 -0
- package/scripts/notices/runtime-90eb64f0279b0d9432ac.txt +12 -0
- package/scripts/notices/runtime-a60eea817514531668d7.txt +201 -0
- package/scripts/notices/runtime-a7c936ff1ed8fa340172.txt +25 -0
- package/scripts/notices/runtime-ab6eec6caf0fa5775e41.txt +275 -0
- package/scripts/notices/runtime-b1181a40b2a7b25cf66f.txt +19 -0
- package/scripts/notices/runtime-b71bd43a069ca0641a9e.txt +25 -0
- package/scripts/notices/runtime-c16f8dcf1a368b83be78.txt +201 -0
- package/scripts/notices/runtime-c2cfccb812fe482101a8.txt +21 -0
- package/scripts/notices/runtime-e99d88d232bf57d70f0f.txt +25 -0
- package/scripts/notices/runtime-f32fb3b417a194167cfa.txt +9 -0
- package/scripts/notices/runtime-f5062c9a188d81dfe66b.txt +39 -0
- package/scripts/notices/runtime-f9070a832833fa7488fd.txt +4 -0
- package/scripts/notices/runtime-fab3dd6bdab226f1c086.txt +373 -0
- package/scripts/notices/runtime-fba3318d0c600380177e.txt +62 -0
- package/scripts/notices/runtime-ff8f68cb076caf8cefe7.txt +25 -0
- package/scripts/notices/runtime-ff92bed461f50338dd70.txt +74 -0
- package/scripts/notices/runtime.json +1632 -0
- package/scripts/notices/sources.json +561 -0
- package/scripts/notices/xray-MIT.txt +21 -0
- package/src/attribute-object.ts +71 -0
- package/src/attributes.ts +308 -0
- package/src/cheerio-compat/css.ts +58 -0
- package/src/cheerio-compat/render.ts +106 -0
- package/src/cheerio-compat/selectors.ts +51 -0
- package/src/cheerio-compat/types.ts +52 -0
- package/src/cheerio-compat.ts +2055 -0
- package/src/codec.ts +96 -0
- package/src/dom.ts +87 -0
- package/src/extract-plan.ts +97 -0
- package/src/extract.ts +322 -0
- package/src/hooks.ts +369 -0
- package/src/index.ts +48 -0
- package/src/io.ts +491 -0
- package/src/match.ts +207 -0
- package/src/modern.ts +259 -0
- package/src/native.ts +149 -0
- package/src/nodes.ts +831 -0
- package/src/parse.ts +53 -0
- package/src/parser-types.ts +157 -0
- package/src/router.ts +1129 -0
- package/src/selection.ts +682 -0
- package/src/slim.ts +12 -0
- package/src/snapshot.ts +291 -0
- package/src/transport.ts +113 -0
- package/src/types.ts +186 -0
- package/src/utils.ts +29 -0
- package/src/workers.ts +21 -0
- package/tsconfig.json +15 -0
- package/tsdown.config.mjs +17 -0
|
@@ -0,0 +1,526 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The compact record copy returned by `NativeDocument.snapshot()`: the
|
|
3
|
+
* lengths of the node, child, attribute and string lists, whether any string
|
|
4
|
+
* holds codec escapes, then the lists.
|
|
5
|
+
*/
|
|
6
|
+
interface NativeSnapshot {
|
|
7
|
+
data: Uint32Array;
|
|
8
|
+
text: string;
|
|
9
|
+
}
|
|
10
|
+
interface NativeDocument {
|
|
11
|
+
readonly nodeSpace?: object;
|
|
12
|
+
retainNode?(id: number): void;
|
|
13
|
+
retainNodeData?(id: number, data: object): void;
|
|
14
|
+
adopt?(source: NativeDocument, ids: number[], detach?: boolean): string;
|
|
15
|
+
op(command: string, argsJson: string): string;
|
|
16
|
+
create?(html: string, contextId?: number, optionsJson?: string): number[];
|
|
17
|
+
select(selector: string, contexts?: number[]): number[];
|
|
18
|
+
text(ids: number[]): string;
|
|
19
|
+
innerHtml(id: number): string;
|
|
20
|
+
outerHtml(ids: number[]): string;
|
|
21
|
+
attr(id: number, name: string): string | undefined | null;
|
|
22
|
+
tagName(id: number): string | undefined | null;
|
|
23
|
+
exportTree(): string;
|
|
24
|
+
exportTreeWithOffset?(base: number): string;
|
|
25
|
+
forestRoots?(): number[];
|
|
26
|
+
rootId(): number;
|
|
27
|
+
takePreparedPlans?(): (string | null)[] | null;
|
|
28
|
+
takePreparedSnapshot?(isWanted: boolean): NativeSnapshot | null;
|
|
29
|
+
parserDiagnostics?(): string;
|
|
30
|
+
}
|
|
31
|
+
interface NativeWorkerPoolInfo {
|
|
32
|
+
threads: number;
|
|
33
|
+
activeBatches: number;
|
|
34
|
+
activeWorkers: number;
|
|
35
|
+
peakActiveWorkers: number;
|
|
36
|
+
}
|
|
37
|
+
/** Useful for installation diagnostics and benchmarks that require native code. */
|
|
38
|
+
declare function nativeStatus(): {
|
|
39
|
+
available: boolean;
|
|
40
|
+
error?: string;
|
|
41
|
+
};
|
|
42
|
+
interface StyleProp {
|
|
43
|
+
length: number;
|
|
44
|
+
[key: string]: string | number;
|
|
45
|
+
[index: number]: string;
|
|
46
|
+
}
|
|
47
|
+
interface AttributeMethods<T = AnyNode> {
|
|
48
|
+
attr<U extends AnyNode>(this: Cheerio<U>, name: string): string | undefined;
|
|
49
|
+
attr<U extends AnyNode>(this: Cheerio<U>): Record<string, string> | undefined;
|
|
50
|
+
attr<U extends AnyNode>(this: Cheerio<U>, name: string, value?: string | null | ((this: Element, index: number, value: string) => string | null)): Cheerio<U>;
|
|
51
|
+
attr<U extends AnyNode>(this: Cheerio<U>, values: Record<string, string | null>): Cheerio<U>;
|
|
52
|
+
prop<U extends AnyNode>(this: Cheerio<U>, name: 'tagName' | 'nodeName'): string | undefined;
|
|
53
|
+
prop<U extends AnyNode>(this: Cheerio<U>, name: 'innerHTML' | 'outerHTML' | 'innerText' | 'textContent'): string | null;
|
|
54
|
+
prop<U extends AnyNode>(this: Cheerio<U>, name: 'style'): StyleProp | undefined;
|
|
55
|
+
prop<U extends AnyNode>(this: Cheerio<U>, name: 'href' | 'src'): string | undefined;
|
|
56
|
+
prop<U extends AnyNode, K extends keyof Element>(this: Cheerio<U>, name: K): Element[K];
|
|
57
|
+
prop<U extends AnyNode, K extends keyof Element>(this: Cheerio<U>, name: K, value: Element[K] | ((this: Element, index: number, property: K) => Element[keyof Element])): Cheerio<U>;
|
|
58
|
+
prop<U extends AnyNode>(this: Cheerio<U>, values: Record<string, string | Element[keyof Element] | boolean>): Cheerio<U>;
|
|
59
|
+
prop<U extends AnyNode>(this: Cheerio<U>, name: string, value: string | boolean | null | ((this: Element, index: number, property: string) => string | boolean)): Cheerio<U>;
|
|
60
|
+
prop<U extends AnyNode>(this: Cheerio<U>, name: string): string;
|
|
61
|
+
data<U extends AnyNode>(this: Cheerio<U>, name: string): unknown;
|
|
62
|
+
data<U extends AnyNode>(this: Cheerio<U>): Record<string, unknown>;
|
|
63
|
+
data<U extends AnyNode>(this: Cheerio<U>, name: string, value: unknown): Cheerio<U>;
|
|
64
|
+
data<U extends AnyNode>(this: Cheerio<U>, values: Record<string, unknown>): Cheerio<U>;
|
|
65
|
+
val<U extends AnyNode>(this: Cheerio<U>): string | string[] | undefined;
|
|
66
|
+
val<U extends AnyNode>(this: Cheerio<U>, value: string | string[]): Cheerio<U>;
|
|
67
|
+
removeAttr<U extends AnyNode>(this: Cheerio<U>, name: string): Cheerio<U>;
|
|
68
|
+
hasClass<U extends AnyNode>(this: Cheerio<U>, name: string): boolean;
|
|
69
|
+
addClass<U extends AnyNode, R extends ArrayLike<U>>(this: R, name?: string | ((this: Element, index: number, current: string) => string | undefined)): R;
|
|
70
|
+
removeClass<U extends AnyNode, R extends ArrayLike<U>>(this: R, name?: string | ((this: Element, index: number, current: string) => string | undefined)): R;
|
|
71
|
+
toggleClass<U extends AnyNode, R extends ArrayLike<U>>(this: R, name?: string | ((this: Element, index: number, current: string, state?: boolean) => string), state?: boolean): R;
|
|
72
|
+
css<U extends AnyNode>(this: Cheerio<U>, names?: string[]): Record<string, string> | undefined;
|
|
73
|
+
css<U extends AnyNode>(this: Cheerio<U>, name: string): string | undefined;
|
|
74
|
+
css<U extends AnyNode>(this: Cheerio<U>, name: string, value: string | ((this: Element, index: number, current: string) => string | undefined)): Cheerio<U>;
|
|
75
|
+
css<U extends AnyNode>(this: Cheerio<U>, values: Record<string, string>): Cheerio<U>;
|
|
76
|
+
serializeArray<U extends AnyNode>(this: Cheerio<U>): SerializedField[];
|
|
77
|
+
serialize<U extends AnyNode>(this: Cheerio<U>): string;
|
|
78
|
+
}
|
|
79
|
+
/** An array-like selection of native nodes. */
|
|
80
|
+
declare class Cheerio<T = AnyNode> implements ArrayLike<T>, Iterable<T> {
|
|
81
|
+
[index: number]: T;
|
|
82
|
+
length: number;
|
|
83
|
+
options: CheerioOptions;
|
|
84
|
+
_root: Cheerio<Document> | null;
|
|
85
|
+
prevObject: Cheerio<any> | undefined;
|
|
86
|
+
cheerio: '[cheerio object]';
|
|
87
|
+
constructor(api: CheerioAPI, document: NativeDocument, ids?: number[], root?: Cheerio<Document> | null, options?: CheerioOptions, values?: T[]);
|
|
88
|
+
_make<R>(value: ArrayLike<R> | R | string, context?: BasicAcceptedElems<AnyNode>): Cheerio<R>;
|
|
89
|
+
_parse(content: any, options: CheerioOptions, isDocument: boolean, context: ParentNode | null): Document;
|
|
90
|
+
_render(content: any): string;
|
|
91
|
+
_makeDomArray<T extends AnyNode>(this: Cheerio<T>, elem?: BasicAcceptedElems<AnyNode> | BasicAcceptedElems<AnyNode>[], clone?: boolean): AnyNode[];
|
|
92
|
+
find<T extends AnyNode>(this: Cheerio<T>, selectorOrHaystack?: string | Cheerio<Element> | Element): Cheerio<Element>;
|
|
93
|
+
_findBySelector<T extends AnyNode>(this: Cheerio<T>, selector: string, limit: number): Cheerio<Element>;
|
|
94
|
+
parent<T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>): Cheerio<Element>;
|
|
95
|
+
parents<T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>): Cheerio<Element>;
|
|
96
|
+
next<T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>): Cheerio<Element>;
|
|
97
|
+
prev<T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>): Cheerio<Element>;
|
|
98
|
+
nextAll<T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>): Cheerio<Element>;
|
|
99
|
+
prevAll<T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>): Cheerio<Element>;
|
|
100
|
+
siblings<T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>): Cheerio<Element>;
|
|
101
|
+
children<T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>): Cheerio<Element>;
|
|
102
|
+
contents<T extends AnyNode>(this: Cheerio<T>): Cheerio<AnyNode>;
|
|
103
|
+
parentsUntil<T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element> | null, filterSelector?: AcceptedFilters<Element>): Cheerio<Element>;
|
|
104
|
+
nextUntil<T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element> | null, filterSelector?: AcceptedFilters<Element>): Cheerio<Element>;
|
|
105
|
+
prevUntil<T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element> | null, filterSelector?: AcceptedFilters<Element>): Cheerio<Element>;
|
|
106
|
+
closest<T extends AnyNode>(this: Cheerio<T>, selector?: AcceptedFilters<Element>): Cheerio<AnyNode>;
|
|
107
|
+
each<T>(this: Cheerio<T>, fn: (this: T, i: number, el: T) => void | boolean): Cheerio<T>;
|
|
108
|
+
map<T, M>(this: Cheerio<T>, fn: (this: T, i: number, el: T) => M[] | M | null | undefined): Cheerio<M>;
|
|
109
|
+
filter<T, S extends T>(this: Cheerio<T>, match: (this: T, index: number, value: T) => value is S): Cheerio<S>;
|
|
110
|
+
filter<T, S extends AcceptedFilters<T>>(this: Cheerio<T>, match: S): Cheerio<S extends string ? Element : T>;
|
|
111
|
+
filterArray<T>(nodes: T[], match: AcceptedFilters<T>, xmlMode?: boolean, root?: Document): Element[] | T[];
|
|
112
|
+
not<T extends AnyNode>(this: Cheerio<T>, match: AcceptedFilters<T>): Cheerio<T>;
|
|
113
|
+
is<T>(this: Cheerio<T>, selector?: AcceptedFilters<T>): boolean;
|
|
114
|
+
has(this: Cheerio<AnyNode | Element>, selectorOrHaystack: string | Cheerio<Element> | Element): Cheerio<AnyNode | Element>;
|
|
115
|
+
first<T extends AnyNode>(this: Cheerio<T>): Cheerio<T>;
|
|
116
|
+
last<T>(this: Cheerio<T>): Cheerio<T>;
|
|
117
|
+
eq<T>(this: Cheerio<T>, i: number): Cheerio<T>;
|
|
118
|
+
get<T>(this: Cheerio<T>, i: number): T | undefined;
|
|
119
|
+
get<T>(this: Cheerio<T>): T[];
|
|
120
|
+
toArray<T>(this: Cheerio<T>): T[];
|
|
121
|
+
slice<T>(this: Cheerio<T>, start?: number, end?: number): Cheerio<T>;
|
|
122
|
+
end<T>(this: Cheerio<T>): Cheerio<AnyNode>;
|
|
123
|
+
add<S extends AnyNode, T extends AnyNode>(this: Cheerio<T>, other: string | Cheerio<S> | S | S[], context?: Cheerio<S> | string): Cheerio<S | T>;
|
|
124
|
+
addBack<T extends AnyNode>(this: Cheerio<T>, selector?: string): Cheerio<AnyNode>;
|
|
125
|
+
index<T extends AnyNode>(this: Cheerio<T>, selectorOrNeedle?: string | Cheerio<AnyNode> | AnyNode): number;
|
|
126
|
+
splice(start: number, deleteCount?: number): any[];
|
|
127
|
+
splice(start: number, deleteCount: number, ...items: any[]): any[];
|
|
128
|
+
[Symbol.iterator](): Iterator<T>;
|
|
129
|
+
append<T extends AnyNode>(this: Cheerio<T>, ...elems: [(this: AnyNode, i: number, html: string) => BasicAcceptedElems<AnyNode>] | BasicAcceptedElems<AnyNode>[]): Cheerio<T>;
|
|
130
|
+
prepend<T extends AnyNode>(this: Cheerio<T>, ...elems: [(this: AnyNode, i: number, html: string) => BasicAcceptedElems<AnyNode>] | BasicAcceptedElems<AnyNode>[]): Cheerio<T>;
|
|
131
|
+
before<T extends AnyNode>(this: Cheerio<T>, ...elems: [(this: AnyNode, i: number, html: string) => BasicAcceptedElems<AnyNode>] | BasicAcceptedElems<AnyNode>[]): Cheerio<T>;
|
|
132
|
+
after<T extends AnyNode>(this: Cheerio<T>, ...elems: [(this: AnyNode, i: number, html: string) => BasicAcceptedElems<AnyNode>] | BasicAcceptedElems<AnyNode>[]): Cheerio<T>;
|
|
133
|
+
appendTo<T extends AnyNode>(this: Cheerio<T>, target: BasicAcceptedElems<AnyNode>): Cheerio<T>;
|
|
134
|
+
prependTo<T extends AnyNode>(this: Cheerio<T>, target: BasicAcceptedElems<AnyNode>): Cheerio<T>;
|
|
135
|
+
insertBefore<T extends AnyNode>(this: Cheerio<T>, target: BasicAcceptedElems<AnyNode>): Cheerio<T>;
|
|
136
|
+
insertAfter<T extends AnyNode>(this: Cheerio<T>, target: BasicAcceptedElems<AnyNode>): Cheerio<T>;
|
|
137
|
+
remove<T extends AnyNode>(this: Cheerio<T>, selector?: string): Cheerio<T>;
|
|
138
|
+
replaceWith<T extends AnyNode>(this: Cheerio<T>, content: AcceptedElems<AnyNode>): Cheerio<T>;
|
|
139
|
+
empty<T extends AnyNode>(this: Cheerio<T>): Cheerio<T>;
|
|
140
|
+
html<T extends AnyNode>(this: Cheerio<T>): string | null;
|
|
141
|
+
html<T extends AnyNode>(this: Cheerio<T>, str: string | Cheerio<T>): Cheerio<T>;
|
|
142
|
+
text<T extends AnyNode>(this: Cheerio<T>): string;
|
|
143
|
+
text<T extends AnyNode>(this: Cheerio<T>, str: string | ((this: AnyNode, i: number, text: string) => string)): Cheerio<T>;
|
|
144
|
+
toString<T extends AnyNode>(this: Cheerio<T>): string;
|
|
145
|
+
clone<T extends AnyNode>(this: Cheerio<T>): Cheerio<T>;
|
|
146
|
+
wrap<T extends AnyNode>(this: Cheerio<T>, wrapper: AcceptedElems<AnyNode>): Cheerio<T>;
|
|
147
|
+
wrapInner<T extends AnyNode>(this: Cheerio<T>, wrapper: AcceptedElems<AnyNode>): Cheerio<T>;
|
|
148
|
+
unwrap<T extends AnyNode>(this: Cheerio<T>, selector?: string): Cheerio<T>;
|
|
149
|
+
wrapAll<T extends AnyNode>(this: Cheerio<T>, wrapper: AcceptedElems<T>): Cheerio<T>;
|
|
150
|
+
extract<M extends ExtractMap, T extends AnyNode>(this: Cheerio<T>, map: M): ExtractedMap<M>;
|
|
151
|
+
extract<M extends ExtractMap, T extends AnyNode>(this: Cheerio<T>, map: M): Record<string, unknown>;
|
|
152
|
+
}
|
|
153
|
+
interface Cheerio<T = AnyNode> extends AttributeMethods<T> {}
|
|
154
|
+
/** Parse5-compatible diagnostics, declared locally without a parser dependency. */
|
|
155
|
+
declare enum ERR {
|
|
156
|
+
controlCharacterInInputStream = "control-character-in-input-stream",
|
|
157
|
+
noncharacterInInputStream = "noncharacter-in-input-stream",
|
|
158
|
+
surrogateInInputStream = "surrogate-in-input-stream",
|
|
159
|
+
nonVoidHtmlElementStartTagWithTrailingSolidus = "non-void-html-element-start-tag-with-trailing-solidus",
|
|
160
|
+
endTagWithAttributes = "end-tag-with-attributes",
|
|
161
|
+
endTagWithTrailingSolidus = "end-tag-with-trailing-solidus",
|
|
162
|
+
unexpectedSolidusInTag = "unexpected-solidus-in-tag",
|
|
163
|
+
unexpectedNullCharacter = "unexpected-null-character",
|
|
164
|
+
unexpectedQuestionMarkInsteadOfTagName = "unexpected-question-mark-instead-of-tag-name",
|
|
165
|
+
invalidFirstCharacterOfTagName = "invalid-first-character-of-tag-name",
|
|
166
|
+
unexpectedEqualsSignBeforeAttributeName = "unexpected-equals-sign-before-attribute-name",
|
|
167
|
+
missingEndTagName = "missing-end-tag-name",
|
|
168
|
+
unexpectedCharacterInAttributeName = "unexpected-character-in-attribute-name",
|
|
169
|
+
unknownNamedCharacterReference = "unknown-named-character-reference",
|
|
170
|
+
missingSemicolonAfterCharacterReference = "missing-semicolon-after-character-reference",
|
|
171
|
+
unexpectedCharacterAfterDoctypeSystemIdentifier = "unexpected-character-after-doctype-system-identifier",
|
|
172
|
+
unexpectedCharacterInUnquotedAttributeValue = "unexpected-character-in-unquoted-attribute-value",
|
|
173
|
+
eofBeforeTagName = "eof-before-tag-name",
|
|
174
|
+
eofInTag = "eof-in-tag",
|
|
175
|
+
missingAttributeValue = "missing-attribute-value",
|
|
176
|
+
missingWhitespaceBetweenAttributes = "missing-whitespace-between-attributes",
|
|
177
|
+
missingWhitespaceAfterDoctypePublicKeyword = "missing-whitespace-after-doctype-public-keyword",
|
|
178
|
+
missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers = "missing-whitespace-between-doctype-public-and-system-identifiers",
|
|
179
|
+
missingWhitespaceAfterDoctypeSystemKeyword = "missing-whitespace-after-doctype-system-keyword",
|
|
180
|
+
missingQuoteBeforeDoctypePublicIdentifier = "missing-quote-before-doctype-public-identifier",
|
|
181
|
+
missingQuoteBeforeDoctypeSystemIdentifier = "missing-quote-before-doctype-system-identifier",
|
|
182
|
+
missingDoctypePublicIdentifier = "missing-doctype-public-identifier",
|
|
183
|
+
missingDoctypeSystemIdentifier = "missing-doctype-system-identifier",
|
|
184
|
+
abruptDoctypePublicIdentifier = "abrupt-doctype-public-identifier",
|
|
185
|
+
abruptDoctypeSystemIdentifier = "abrupt-doctype-system-identifier",
|
|
186
|
+
cdataInHtmlContent = "cdata-in-html-content",
|
|
187
|
+
incorrectlyOpenedComment = "incorrectly-opened-comment",
|
|
188
|
+
eofInScriptHtmlCommentLikeText = "eof-in-script-html-comment-like-text",
|
|
189
|
+
eofInDoctype = "eof-in-doctype",
|
|
190
|
+
nestedComment = "nested-comment",
|
|
191
|
+
abruptClosingOfEmptyComment = "abrupt-closing-of-empty-comment",
|
|
192
|
+
eofInComment = "eof-in-comment",
|
|
193
|
+
incorrectlyClosedComment = "incorrectly-closed-comment",
|
|
194
|
+
eofInCdata = "eof-in-cdata",
|
|
195
|
+
absenceOfDigitsInNumericCharacterReference = "absence-of-digits-in-numeric-character-reference",
|
|
196
|
+
nullCharacterReference = "null-character-reference",
|
|
197
|
+
surrogateCharacterReference = "surrogate-character-reference",
|
|
198
|
+
characterReferenceOutsideUnicodeRange = "character-reference-outside-unicode-range",
|
|
199
|
+
controlCharacterReference = "control-character-reference",
|
|
200
|
+
noncharacterCharacterReference = "noncharacter-character-reference",
|
|
201
|
+
missingWhitespaceBeforeDoctypeName = "missing-whitespace-before-doctype-name",
|
|
202
|
+
missingDoctypeName = "missing-doctype-name",
|
|
203
|
+
invalidCharacterSequenceAfterDoctypeName = "invalid-character-sequence-after-doctype-name",
|
|
204
|
+
duplicateAttribute = "duplicate-attribute",
|
|
205
|
+
nonConformingDoctype = "non-conforming-doctype",
|
|
206
|
+
missingDoctype = "missing-doctype",
|
|
207
|
+
misplacedDoctype = "misplaced-doctype",
|
|
208
|
+
endTagWithoutMatchingOpenElement = "end-tag-without-matching-open-element",
|
|
209
|
+
closingOfElementWithOpenChildElements = "closing-of-element-with-open-child-elements",
|
|
210
|
+
disallowedContentInNoscriptInHead = "disallowed-content-in-noscript-in-head",
|
|
211
|
+
openElementsLeftAfterEof = "open-elements-left-after-eof",
|
|
212
|
+
abandonedHeadElementChild = "abandoned-head-element-child",
|
|
213
|
+
misplacedStartTagForHeadElement = "misplaced-start-tag-for-head-element",
|
|
214
|
+
nestedNoscriptInHead = "nested-noscript-in-head",
|
|
215
|
+
eofInElementThatCanContainOnlyText = "eof-in-element-that-can-contain-only-text"
|
|
216
|
+
}
|
|
217
|
+
type ParserErrorCode = ERR;
|
|
218
|
+
interface ParserError extends SourceCodeLocation {
|
|
219
|
+
code: ParserErrorCode;
|
|
220
|
+
}
|
|
221
|
+
type ParserErrorHandler = (error: ParserError) => void;
|
|
222
|
+
declare enum NS {
|
|
223
|
+
HTML = "http://www.w3.org/1999/xhtml",
|
|
224
|
+
MATHML = "http://www.w3.org/1998/Math/MathML",
|
|
225
|
+
SVG = "http://www.w3.org/2000/svg",
|
|
226
|
+
XLINK = "http://www.w3.org/1999/xlink",
|
|
227
|
+
XML = "http://www.w3.org/XML/1998/namespace",
|
|
228
|
+
XMLNS = "http://www.w3.org/2000/xmlns/"
|
|
229
|
+
}
|
|
230
|
+
declare enum DOCUMENT_MODE {
|
|
231
|
+
NO_QUIRKS = "no-quirks",
|
|
232
|
+
QUIRKS = "quirks",
|
|
233
|
+
LIMITED_QUIRKS = "limited-quirks"
|
|
234
|
+
}
|
|
235
|
+
type NamespaceURI = NS;
|
|
236
|
+
type DocumentMode = DOCUMENT_MODE;
|
|
237
|
+
interface TreeAdapterAttribute {
|
|
238
|
+
name: string;
|
|
239
|
+
value: string;
|
|
240
|
+
namespace?: string;
|
|
241
|
+
prefix?: string;
|
|
242
|
+
}
|
|
243
|
+
/** The HTML5 adapter shape used by Cheerio's DOM representation. */
|
|
244
|
+
interface TreeAdapter {
|
|
245
|
+
adoptAttributes(recipient: Element, attrs: TreeAdapterAttribute[]): void;
|
|
246
|
+
appendChild(parentNode: ParentNode, newNode: ChildNode): void;
|
|
247
|
+
createCommentNode(data: string): Comment;
|
|
248
|
+
createTextNode(value: string): Text;
|
|
249
|
+
createDocument(): Document;
|
|
250
|
+
createDocumentFragment(): Document;
|
|
251
|
+
createElement(tagName: string, namespaceURI: NamespaceURI, attrs: TreeAdapterAttribute[]): Element;
|
|
252
|
+
detachNode(node: ChildNode): void;
|
|
253
|
+
getAttrList(element: Element): TreeAdapterAttribute[];
|
|
254
|
+
getChildNodes(node: ParentNode): ChildNode[];
|
|
255
|
+
getCommentNodeContent(node: Comment): string;
|
|
256
|
+
getDocumentMode(document: Document): DocumentMode;
|
|
257
|
+
getDocumentTypeNodeName(node: ProcessingInstruction): string;
|
|
258
|
+
getDocumentTypeNodePublicId(node: ProcessingInstruction): string;
|
|
259
|
+
getDocumentTypeNodeSystemId(node: ProcessingInstruction): string;
|
|
260
|
+
getFirstChild(node: ParentNode): ChildNode | null;
|
|
261
|
+
getNamespaceURI(element: Element): NamespaceURI;
|
|
262
|
+
getNodeSourceCodeLocation(node: AnyNode): TagSourceCodeLocation | undefined | null;
|
|
263
|
+
getParentNode(node: AnyNode): ParentNode | null;
|
|
264
|
+
getTagName(element: Element): string;
|
|
265
|
+
getTextNodeContent(node: Text): string;
|
|
266
|
+
getTemplateContent(element: Element): Document;
|
|
267
|
+
insertBefore(parent: ParentNode, child: ChildNode, reference: ChildNode): void;
|
|
268
|
+
insertText(parent: ParentNode, text: string): void;
|
|
269
|
+
insertTextBefore(parent: ParentNode, text: string, reference: ChildNode): void;
|
|
270
|
+
isCommentNode(node: AnyNode): node is Comment;
|
|
271
|
+
isDocumentTypeNode(node: AnyNode): node is ProcessingInstruction;
|
|
272
|
+
isElementNode(node: AnyNode): node is Element;
|
|
273
|
+
isTextNode(node: AnyNode): node is Text;
|
|
274
|
+
setDocumentMode(document: Document, mode: DocumentMode): void;
|
|
275
|
+
setDocumentType(document: Document, name: string, publicId: string, systemId: string): void;
|
|
276
|
+
setNodeSourceCodeLocation(node: AnyNode, location: TagSourceCodeLocation | null): void;
|
|
277
|
+
updateNodeSourceCodeLocation(node: AnyNode, location: Partial<TagSourceCodeLocation>): void;
|
|
278
|
+
setTemplateContent(element: Element, content: Document): void;
|
|
279
|
+
onItemPush?: (item: Element) => void;
|
|
280
|
+
onItemPop?: (item: Element, newTop: ParentNode) => void;
|
|
281
|
+
}
|
|
282
|
+
declare enum QuoteType {
|
|
283
|
+
NoValue = 0,
|
|
284
|
+
Unquoted = 1,
|
|
285
|
+
Single = 2,
|
|
286
|
+
Double = 3
|
|
287
|
+
}
|
|
288
|
+
interface TokenizerCallbacks {
|
|
289
|
+
onattribdata(start: number, endIndex: number): void;
|
|
290
|
+
onattribentity(codepoint: number): void;
|
|
291
|
+
onattribend(quote: QuoteType, endIndex: number): void;
|
|
292
|
+
onattribname(start: number, endIndex: number): void;
|
|
293
|
+
oncdata(start: number, endIndex: number, endOffset: number): void;
|
|
294
|
+
onclosetag(start: number, endIndex: number): void;
|
|
295
|
+
oncomment(start: number, endIndex: number, endOffset: number): void;
|
|
296
|
+
ondeclaration(start: number, endIndex: number): void;
|
|
297
|
+
onend(): void;
|
|
298
|
+
onopentagend(endIndex: number): void;
|
|
299
|
+
onopentagname(start: number, endIndex: number): void;
|
|
300
|
+
onprocessinginstruction(start: number, endIndex: number): void;
|
|
301
|
+
onselfclosingtag(endIndex: number): void;
|
|
302
|
+
ontext(start: number, endIndex: number): void;
|
|
303
|
+
ontextentity(codepoint: number, endIndex: number): void;
|
|
304
|
+
}
|
|
305
|
+
interface Tokenizer {
|
|
306
|
+
running: boolean;
|
|
307
|
+
reset(): void;
|
|
308
|
+
write(chunk: string): void;
|
|
309
|
+
end(): void;
|
|
310
|
+
pause(): void;
|
|
311
|
+
resume(): void;
|
|
312
|
+
}
|
|
313
|
+
interface TokenizerOptions {
|
|
314
|
+
xmlMode?: boolean;
|
|
315
|
+
decodeEntities?: boolean;
|
|
316
|
+
}
|
|
317
|
+
interface TokenizerConstructor {
|
|
318
|
+
new (options: TokenizerOptions, callbacks: TokenizerCallbacks): Tokenizer;
|
|
319
|
+
new (options: TokenizerOptions, callbacks: TokenizerCallbacks): any;
|
|
320
|
+
}
|
|
321
|
+
/** DOM-compatible views over stable nodes owned by the native document. */
|
|
322
|
+
declare enum ElementType {
|
|
323
|
+
Root = "root",
|
|
324
|
+
Text = "text",
|
|
325
|
+
Directive = "directive",
|
|
326
|
+
Comment = "comment",
|
|
327
|
+
Script = "script",
|
|
328
|
+
Style = "style",
|
|
329
|
+
Tag = "tag",
|
|
330
|
+
CDATA = "cdata",
|
|
331
|
+
Doctype = "doctype"
|
|
332
|
+
}
|
|
333
|
+
interface SourceCodeLocation {
|
|
334
|
+
startLine: number;
|
|
335
|
+
startCol: number;
|
|
336
|
+
startOffset: number;
|
|
337
|
+
endLine: number;
|
|
338
|
+
endCol: number;
|
|
339
|
+
endOffset: number;
|
|
340
|
+
}
|
|
341
|
+
interface TagSourceCodeLocation extends SourceCodeLocation {
|
|
342
|
+
startTag?: SourceCodeLocation;
|
|
343
|
+
endTag?: SourceCodeLocation;
|
|
344
|
+
attrs?: Record<string, SourceCodeLocation>;
|
|
345
|
+
}
|
|
346
|
+
interface Node {
|
|
347
|
+
readonly type: ElementType;
|
|
348
|
+
parent: ParentNode | null;
|
|
349
|
+
prev: ChildNode | null;
|
|
350
|
+
next: ChildNode | null;
|
|
351
|
+
startIndex: number | null;
|
|
352
|
+
endIndex: number | null;
|
|
353
|
+
readonly nodeType: number;
|
|
354
|
+
parentNode: ParentNode | null;
|
|
355
|
+
previousSibling: ChildNode | null;
|
|
356
|
+
nextSibling: ChildNode | null;
|
|
357
|
+
sourceCodeLocation?: SourceCodeLocation | null;
|
|
358
|
+
cloneNode<T extends Node>(this: T, recursive?: boolean): T;
|
|
359
|
+
}
|
|
360
|
+
interface DataNode extends Node {
|
|
361
|
+
data: string;
|
|
362
|
+
nodeValue: string;
|
|
363
|
+
}
|
|
364
|
+
interface Text extends DataNode {
|
|
365
|
+
type: ElementType.Text;
|
|
366
|
+
readonly nodeType: 3;
|
|
367
|
+
}
|
|
368
|
+
interface Comment extends DataNode {
|
|
369
|
+
type: ElementType.Comment;
|
|
370
|
+
readonly nodeType: 8;
|
|
371
|
+
}
|
|
372
|
+
interface ProcessingInstruction extends DataNode {
|
|
373
|
+
type: ElementType.Directive;
|
|
374
|
+
name: string;
|
|
375
|
+
readonly nodeType: 1;
|
|
376
|
+
'x-name'?: string;
|
|
377
|
+
'x-publicId'?: string;
|
|
378
|
+
'x-systemId'?: string;
|
|
379
|
+
}
|
|
380
|
+
interface NodeWithChildren extends Node {
|
|
381
|
+
children: ChildNode[];
|
|
382
|
+
childNodes: ChildNode[];
|
|
383
|
+
readonly firstChild: ChildNode | null;
|
|
384
|
+
readonly lastChild: ChildNode | null;
|
|
385
|
+
}
|
|
386
|
+
interface Document extends NodeWithChildren {
|
|
387
|
+
type: ElementType.Root;
|
|
388
|
+
readonly nodeType: 9;
|
|
389
|
+
'x-mode'?: 'quirks' | 'limited-quirks' | 'no-quirks';
|
|
390
|
+
}
|
|
391
|
+
interface CDATA extends NodeWithChildren {
|
|
392
|
+
type: ElementType.CDATA;
|
|
393
|
+
readonly nodeType: 4;
|
|
394
|
+
}
|
|
395
|
+
interface Element extends NodeWithChildren {
|
|
396
|
+
type: ElementType.Tag | ElementType.Script | ElementType.Style;
|
|
397
|
+
readonly nodeType: 1;
|
|
398
|
+
name: string;
|
|
399
|
+
tagName: string;
|
|
400
|
+
attribs: Record<string, string>;
|
|
401
|
+
namespace?: string;
|
|
402
|
+
sourceCodeLocation?: TagSourceCodeLocation | null;
|
|
403
|
+
readonly attributes: {
|
|
404
|
+
name: string;
|
|
405
|
+
value: string;
|
|
406
|
+
namespace?: string;
|
|
407
|
+
prefix?: string;
|
|
408
|
+
}[];
|
|
409
|
+
'x-attribsNamespace'?: Record<string, string>;
|
|
410
|
+
'x-attribsPrefix'?: Record<string, string>;
|
|
411
|
+
}
|
|
412
|
+
type ParentNode = Document | Element | CDATA;
|
|
413
|
+
type ChildNode = Text | Comment | ProcessingInstruction | Element | CDATA | Document;
|
|
414
|
+
type AnyNode = ParentNode | ChildNode;
|
|
415
|
+
interface HTMLParser2Options {
|
|
416
|
+
xmlMode?: boolean;
|
|
417
|
+
decodeEntities?: boolean;
|
|
418
|
+
encodeEntities?: boolean | 'utf8';
|
|
419
|
+
lowerCaseTags?: boolean;
|
|
420
|
+
lowerCaseAttributeNames?: boolean;
|
|
421
|
+
recognizeCDATA?: boolean;
|
|
422
|
+
recognizeSelfClosing?: boolean;
|
|
423
|
+
withStartIndices?: boolean;
|
|
424
|
+
withEndIndices?: boolean;
|
|
425
|
+
emptyAttrs?: boolean;
|
|
426
|
+
selfClosingTags?: boolean;
|
|
427
|
+
Tokenizer?: TokenizerConstructor;
|
|
428
|
+
[key: string]: any;
|
|
429
|
+
}
|
|
430
|
+
interface CheerioOptions extends HTMLParser2Options {
|
|
431
|
+
xml?: boolean | HTMLParser2Options;
|
|
432
|
+
baseURI?: string | URL;
|
|
433
|
+
quirksMode?: boolean;
|
|
434
|
+
scriptingEnabled?: boolean;
|
|
435
|
+
sourceCodeLocationInfo?: boolean;
|
|
436
|
+
treeAdapter?: TreeAdapter;
|
|
437
|
+
onParseError?: ParserErrorHandler | null;
|
|
438
|
+
pseudos?: Record<string, string | ((element: Element, value?: string | null) => boolean)>;
|
|
439
|
+
_useHtmlParser2?: boolean;
|
|
440
|
+
}
|
|
441
|
+
type InternalOptions = CheerioOptions;
|
|
442
|
+
type LowercaseLetters = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z';
|
|
443
|
+
type AlphaNumeric = LowercaseLetters | Uppercase<LowercaseLetters> | `${number}`;
|
|
444
|
+
type SelectorType = `${'.' | '#' | ':' | '|' | '>' | '+' | '~' | '['}${AlphaNumeric}${string}` | `${AlphaNumeric}${string}`;
|
|
445
|
+
type BasicAcceptedElems<T extends AnyNode = AnyNode> = ArrayLike<T> | T | string;
|
|
446
|
+
type AcceptedElems<T extends AnyNode = AnyNode> = BasicAcceptedElems<T> | ((this: T, index: number, element: T) => BasicAcceptedElems<T>);
|
|
447
|
+
type FilterFunction<T> = (this: T, index: number, element: T) => boolean;
|
|
448
|
+
type AcceptedFilters<T> = string | FilterFunction<T> | T | Cheerio<T>;
|
|
449
|
+
type LoadContent = string | Buffer | AnyNode | ArrayLike<AnyNode>;
|
|
450
|
+
interface CheerioAPI {
|
|
451
|
+
<T extends AnyNode, S extends string>(selector?: S | BasicAcceptedElems<T>, context?: BasicAcceptedElems<AnyNode> | null, root?: BasicAcceptedElems<Document>, options?: CheerioOptions): Cheerio<S extends SelectorType ? Element : T>;
|
|
452
|
+
<T extends AnyNode, S extends string>(selector?: S | BasicAcceptedElems<T>, context?: BasicAcceptedElems<AnyNode> | null, root?: BasicAcceptedElems<Document>, options?: CheerioOptions): Cheerio<AnyNode>;
|
|
453
|
+
html(options?: CheerioOptions): string;
|
|
454
|
+
html(dom?: BasicAcceptedElems<AnyNode> | Cheerio<AnyNode>, options?: CheerioOptions): string;
|
|
455
|
+
xml(dom?: BasicAcceptedElems<AnyNode> | Cheerio<AnyNode>): string;
|
|
456
|
+
text(elements?: ArrayLike<AnyNode>): string;
|
|
457
|
+
root(): Cheerio<Document>;
|
|
458
|
+
contains(container: AnyNode, contained: AnyNode): boolean;
|
|
459
|
+
merge<T>(first: ArrayLike<T>, second: ArrayLike<T>): ArrayLike<T> | undefined;
|
|
460
|
+
parseHTML(data: string, context?: unknown, keepScripts?: boolean): AnyNode[];
|
|
461
|
+
parseHTML(data?: '' | null): null;
|
|
462
|
+
load(content: LoadContent, options?: CheerioOptions | null, isDocument?: boolean): CheerioAPI;
|
|
463
|
+
extract<M extends ExtractMap>(this: CheerioAPI, map: M): ExtractedMap<M>;
|
|
464
|
+
extract<M extends ExtractMap>(this: CheerioAPI, map: M): Record<string, unknown>;
|
|
465
|
+
fn: typeof Cheerio.prototype;
|
|
466
|
+
_root: Document;
|
|
467
|
+
_options: InternalOptions;
|
|
468
|
+
[key: string]: any;
|
|
469
|
+
}
|
|
470
|
+
type ExtractDescriptorFn = (element: Element, key: string, result: Record<string, unknown>) => unknown;
|
|
471
|
+
interface ExtractDescriptor {
|
|
472
|
+
selector: string;
|
|
473
|
+
value?: string | ExtractDescriptorFn | ExtractMap;
|
|
474
|
+
}
|
|
475
|
+
type ExtractValue = string | ExtractDescriptor | [string | ExtractDescriptor];
|
|
476
|
+
type ExtractMap = Record<string, ExtractValue>;
|
|
477
|
+
type ExtractedValue<V extends ExtractValue> = V extends [string | ExtractDescriptor] ? NonNullable<ExtractedValue<V[0]>>[] : V extends string ? string | undefined : V extends ExtractDescriptor ? V['value'] extends (infer U) ? U extends ExtractMap ? ExtractedMap<U> | undefined : U extends ExtractDescriptorFn ? ReturnType<U> | undefined : string | undefined : never : never;
|
|
478
|
+
type ExtractedMap<M extends ExtractMap> = { [key in keyof M]: ExtractedValue<M[key]>; };
|
|
479
|
+
type ExtractionDescriptor = ExtractDescriptor;
|
|
480
|
+
type ExtractionMap = ExtractMap;
|
|
481
|
+
type ExtractionResult<M extends ExtractMap> = ExtractedMap<M>;
|
|
482
|
+
interface EncodingOptions {
|
|
483
|
+
defaultEncoding?: string;
|
|
484
|
+
transportLayerEncodingLabel?: string | null;
|
|
485
|
+
userEncoding?: string;
|
|
486
|
+
maxBytes?: number;
|
|
487
|
+
}
|
|
488
|
+
interface DecodeStreamOptions extends CheerioOptions {
|
|
489
|
+
encoding?: EncodingOptions;
|
|
490
|
+
}
|
|
491
|
+
/** Structural Node/Undici FormData compatibility without importing its package. */
|
|
492
|
+
interface FormDataLike extends Iterable<[string, string | import('node:buffer').Blob]> {
|
|
493
|
+
append(name: string, value: unknown, filename?: string): void;
|
|
494
|
+
get(name: string): string | import('node:buffer').Blob | null;
|
|
495
|
+
}
|
|
496
|
+
interface CheerioRequestOptions extends DecodeStreamOptions {
|
|
497
|
+
requestOptions?: {
|
|
498
|
+
method?: string;
|
|
499
|
+
headers?: Record<string, string | string[] | undefined> | string[] | Iterable<[string, string | string[] | undefined]> | Headers | null;
|
|
500
|
+
body?: string | Buffer | Uint8Array | import('node:stream').Readable | FormData | FormDataLike | null;
|
|
501
|
+
query?: import('node:querystring').ParsedUrlQueryInput;
|
|
502
|
+
onInfo?: (info: {
|
|
503
|
+
statusCode: number;
|
|
504
|
+
headers: Record<string, string | string[]>;
|
|
505
|
+
}) => void;
|
|
506
|
+
reset?: boolean;
|
|
507
|
+
typeOfService?: number | null;
|
|
508
|
+
highWaterMark?: number;
|
|
509
|
+
maxRedirections?: number;
|
|
510
|
+
throwOnError?: boolean;
|
|
511
|
+
signal?: unknown;
|
|
512
|
+
headersTimeout?: number | null;
|
|
513
|
+
bodyTimeout?: number | null;
|
|
514
|
+
dispatcher?: unknown;
|
|
515
|
+
[key: string]: unknown;
|
|
516
|
+
};
|
|
517
|
+
}
|
|
518
|
+
interface ParallelOptions extends CheerioOptions {
|
|
519
|
+
threads?: number;
|
|
520
|
+
}
|
|
521
|
+
type SerializedField = {
|
|
522
|
+
name: string;
|
|
523
|
+
value: string;
|
|
524
|
+
};
|
|
525
|
+
export { nativeStatus as $, NodeWithChildren as A, NamespaceURI as B, ExtractionResult as C, InternalOptions as D, HTMLParser2Options as E, SerializedField as F, TokenizerCallbacks as G, ParserErrorCode as H, SourceCodeLocation as I, TreeAdapter as J, TokenizerConstructor as K, TagSourceCodeLocation as L, ParentNode as M, ProcessingInstruction as N, LoadContent as O, SelectorType as P, NativeWorkerPoolInfo as Q, Text as R, ExtractionMap as S, FormDataLike as T, ParserErrorHandler as U, ParserError as V, Tokenizer as W, Cheerio as X, TreeAdapterAttribute as Y, NativeDocument as Z, ExtractDescriptor as _, CDATA as a, ExtractedValue as b, CheerioRequestOptions as c, DataNode as d, DecodeStreamOptions as f, EncodingOptions as g, ElementType as h, BasicAcceptedElems as i, ParallelOptions as j, Node as k, ChildNode as l, Element as m, AcceptedFilters as n, CheerioAPI as o, Document as p, TokenizerOptions as q, AnyNode as r, CheerioOptions as s, AcceptedElems as t, Comment as u, ExtractMap as v, FilterFunction as w, ExtractionDescriptor as x, ExtractedMap as y, DocumentMode as z };
|
|
526
|
+
//# sourceMappingURL=types-CA01Zg3r.d.cts.map
|
package/dist/utils.cjs
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
// src/utils.ts
|
|
3
|
+
function isCheerio(value) {
|
|
4
|
+
return value !== null && typeof value === "object" && "cheerio" in value;
|
|
5
|
+
}
|
|
6
|
+
function camelCase(value) {
|
|
7
|
+
return value.replace(/[._-](\w|$)/g, (_match, character) => character.toUpperCase());
|
|
8
|
+
}
|
|
9
|
+
function cssCase(value) {
|
|
10
|
+
return value.replace(/[A-Z]/g, (character) => `-${character.toLowerCase()}`);
|
|
11
|
+
}
|
|
12
|
+
function domEach(array, callback) {
|
|
13
|
+
for (let index = 0; index < array.length; index += 1) callback(array[index], index);
|
|
14
|
+
return array;
|
|
15
|
+
}
|
|
16
|
+
function isHtml(value) {
|
|
17
|
+
if (typeof value !== "string") return false;
|
|
18
|
+
const start = value.indexOf("<");
|
|
19
|
+
return start >= 0 && /[A-Za-z!]/.test(value[start + 1] ?? "") && value.indexOf(">", start + 2) >= 0;
|
|
20
|
+
}
|
|
21
|
+
function isTag(node) {
|
|
22
|
+
return node.type === "tag" || node.type === "script" || node.type === "style";
|
|
23
|
+
}
|
|
24
|
+
exports.camelCase = camelCase;
|
|
25
|
+
exports.cssCase = cssCase;
|
|
26
|
+
exports.domEach = domEach;
|
|
27
|
+
exports.isCheerio = isCheerio;
|
|
28
|
+
exports.isHtml = isHtml;
|
|
29
|
+
exports.isTag = isTag;
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=utils.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.cjs","names":[],"sources":["../src/utils.ts"],"sourcesContent":["import type { AnyNode, Element } from './types.js';\nimport type { Cheerio } from './selection.js';\n\nexport function isCheerio(value: unknown): value is Cheerio<AnyNode> {\n return value !== null && typeof value === 'object' && 'cheerio' in value;\n}\n\nexport function camelCase(value: string): string {\n return value.replace(/[._-](\\w|$)/g, (_match, character: string) => character.toUpperCase());\n}\n\nexport function cssCase(value: string): string {\n return value.replace(/[A-Z]/g, (character) => `-${character.toLowerCase()}`);\n}\n\nexport function domEach<T, A extends ArrayLike<T>>(array: A, callback: (element: T, index: number) => void): A {\n for (let index = 0; index < array.length; index += 1) callback(array[index], index);\n return array;\n}\n\nexport function isHtml(value: unknown): value is string {\n if (typeof value !== 'string') return false;\n const start = value.indexOf('<');\n return start >= 0 && /[A-Za-z!]/.test(value[start + 1] ?? '') && value.indexOf('>', start + 2) >= 0;\n}\n\nexport function isTag(node: AnyNode): node is Element {\n return node.type === 'tag' || node.type === 'script' || node.type === 'style';\n}\n"],"mappings":";;AAGA,SAAgB,UAAU,OAA2C;CACnE,OAAO,UAAU,QAAQ,OAAO,UAAU,YAAY,aAAa;AACrE;AAEA,SAAgB,UAAU,OAAuB;CAC/C,OAAO,MAAM,QAAQ,iBAAiB,QAAQ,cAAsB,UAAU,YAAY,CAAC;AAC7F;AAEA,SAAgB,QAAQ,OAAuB;CAC7C,OAAO,MAAM,QAAQ,WAAW,cAAc,IAAI,UAAU,YAAY,GAAG;AAC7E;AAEA,SAAgB,QAAmC,OAAU,UAAkD;CAC7G,KAAK,IAAI,QAAQ,GAAG,QAAQ,MAAM,QAAQ,SAAS,GAAG,SAAS,MAAM,QAAQ,KAAK;CAClF,OAAO;AACT;AAEA,SAAgB,OAAO,OAAiC;CACtD,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,MAAM,QAAQ,MAAM,QAAQ,GAAG;CAC/B,OAAO,SAAS,KAAK,YAAY,KAAK,MAAM,QAAQ,MAAM,EAAE,KAAK,MAAM,QAAQ,KAAK,QAAQ,CAAC,KAAK;AACpG;AAEA,SAAgB,MAAM,MAAgC;CACpD,OAAO,KAAK,SAAS,SAAS,KAAK,SAAS,YAAY,KAAK,SAAS;AACxE"}
|
package/dist/utils.d.cts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { X as Cheerio, m as Element, r as AnyNode } from "./types-CA01Zg3r.cjs";
|
|
2
|
+
export declare function isCheerio(value: unknown): value is Cheerio<AnyNode>;
|
|
3
|
+
export declare function camelCase(value: string): string;
|
|
4
|
+
export declare function cssCase(value: string): string;
|
|
5
|
+
export declare function domEach<T, A extends ArrayLike<T>>(array: A, callback: (element: T, index: number) => void): A;
|
|
6
|
+
export declare function isHtml(value: unknown): value is string;
|
|
7
|
+
export declare function isTag(node: AnyNode): node is Element;
|
|
8
|
+
//# sourceMappingURL=utils.d.cts.map
|
package/dist/utils.d.mts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { X as Cheerio, m as Element, r as AnyNode } from "./types-CA01Zg3r.mjs";
|
|
2
|
+
export declare function isCheerio(value: unknown): value is Cheerio<AnyNode>;
|
|
3
|
+
export declare function camelCase(value: string): string;
|
|
4
|
+
export declare function cssCase(value: string): string;
|
|
5
|
+
export declare function domEach<T, A extends ArrayLike<T>>(array: A, callback: (element: T, index: number) => void): A;
|
|
6
|
+
export declare function isHtml(value: unknown): value is string;
|
|
7
|
+
export declare function isTag(node: AnyNode): node is Element;
|
|
8
|
+
//# sourceMappingURL=utils.d.mts.map
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { X as Cheerio, m as Element, r as AnyNode } from "./types-CA01Zg3r.cjs";
|
|
2
|
+
export declare function isCheerio(value: unknown): value is Cheerio<AnyNode>;
|
|
3
|
+
export declare function camelCase(value: string): string;
|
|
4
|
+
export declare function cssCase(value: string): string;
|
|
5
|
+
export declare function domEach<T, A extends ArrayLike<T>>(array: A, callback: (element: T, index: number) => void): A;
|
|
6
|
+
export declare function isHtml(value: unknown): value is string;
|
|
7
|
+
export declare function isTag(node: AnyNode): node is Element;
|
|
8
|
+
//# sourceMappingURL=utils.d.cts.map
|
package/dist/utils.mjs
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// src/utils.ts
|
|
2
|
+
function isCheerio(value) {
|
|
3
|
+
return value !== null && typeof value === "object" && "cheerio" in value;
|
|
4
|
+
}
|
|
5
|
+
function camelCase(value) {
|
|
6
|
+
return value.replace(/[._-](\w|$)/g, (_match, character) => character.toUpperCase());
|
|
7
|
+
}
|
|
8
|
+
function cssCase(value) {
|
|
9
|
+
return value.replace(/[A-Z]/g, (character) => `-${character.toLowerCase()}`);
|
|
10
|
+
}
|
|
11
|
+
function domEach(array, callback) {
|
|
12
|
+
for (let index = 0; index < array.length; index += 1) callback(array[index], index);
|
|
13
|
+
return array;
|
|
14
|
+
}
|
|
15
|
+
function isHtml(value) {
|
|
16
|
+
if (typeof value !== "string") return false;
|
|
17
|
+
const start = value.indexOf("<");
|
|
18
|
+
return start >= 0 && /[A-Za-z!]/.test(value[start + 1] ?? "") && value.indexOf(">", start + 2) >= 0;
|
|
19
|
+
}
|
|
20
|
+
function isTag(node) {
|
|
21
|
+
return node.type === "tag" || node.type === "script" || node.type === "style";
|
|
22
|
+
}
|
|
23
|
+
export { camelCase, cssCase, domEach, isCheerio, isHtml, isTag };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.mjs","names":[],"sources":["../src/utils.ts"],"sourcesContent":["import type { AnyNode, Element } from './types.js';\nimport type { Cheerio } from './selection.js';\n\nexport function isCheerio(value: unknown): value is Cheerio<AnyNode> {\n return value !== null && typeof value === 'object' && 'cheerio' in value;\n}\n\nexport function camelCase(value: string): string {\n return value.replace(/[._-](\\w|$)/g, (_match, character: string) => character.toUpperCase());\n}\n\nexport function cssCase(value: string): string {\n return value.replace(/[A-Z]/g, (character) => `-${character.toLowerCase()}`);\n}\n\nexport function domEach<T, A extends ArrayLike<T>>(array: A, callback: (element: T, index: number) => void): A {\n for (let index = 0; index < array.length; index += 1) callback(array[index], index);\n return array;\n}\n\nexport function isHtml(value: unknown): value is string {\n if (typeof value !== 'string') return false;\n const start = value.indexOf('<');\n return start >= 0 && /[A-Za-z!]/.test(value[start + 1] ?? '') && value.indexOf('>', start + 2) >= 0;\n}\n\nexport function isTag(node: AnyNode): node is Element {\n return node.type === 'tag' || node.type === 'script' || node.type === 'style';\n}\n"],"mappings":";AAGA,SAAgB,UAAU,OAA2C;CACnE,OAAO,UAAU,QAAQ,OAAO,UAAU,YAAY,aAAa;AACrE;AAEA,SAAgB,UAAU,OAAuB;CAC/C,OAAO,MAAM,QAAQ,iBAAiB,QAAQ,cAAsB,UAAU,YAAY,CAAC;AAC7F;AAEA,SAAgB,QAAQ,OAAuB;CAC7C,OAAO,MAAM,QAAQ,WAAW,cAAc,IAAI,UAAU,YAAY,GAAG;AAC7E;AAEA,SAAgB,QAAmC,OAAU,UAAkD;CAC7G,KAAK,IAAI,QAAQ,GAAG,QAAQ,MAAM,QAAQ,SAAS,GAAG,SAAS,MAAM,QAAQ,KAAK;CAClF,OAAO;AACT;AAEA,SAAgB,OAAO,OAAiC;CACtD,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,MAAM,QAAQ,MAAM,QAAQ,GAAG;CAC/B,OAAO,SAAS,KAAK,YAAY,KAAK,MAAM,QAAQ,MAAM,EAAE,KAAK,MAAM,QAAQ,KAAK,QAAQ,CAAC,KAAK;AACpG;AAEA,SAAgB,MAAM,MAAgC;CACpD,OAAO,KAAK,SAAS,SAAS,KAAK,SAAS,YAAY,KAAK,SAAS;AACxE"}
|