rahad-media-downloader 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/.cache/nix/binary-cache-v6.sqlite +0 -0
- package/.cache/nix/binary-cache-v6.sqlite-journal +0 -0
- package/.cache/replit/__replit_disk_meta.json +1 -0
- package/.cache/replit/modules/nodejs-20:v32-20240401-269b323.res +1 -0
- package/.cache/replit/modules/replit:v8-20240329-787bc7d.res +1 -0
- package/.cache/replit/modules.stamp +0 -0
- package/.cache/replit/nix/env.json +1 -0
- package/.cache/typescript/5.0/node_modules/.package-lock.json +12 -0
- package/.cache/typescript/5.0/node_modules/types-registry/README.md +2 -0
- package/.cache/typescript/5.0/node_modules/types-registry/index.json +1 -0
- package/.cache/typescript/5.0/node_modules/types-registry/package.json +20 -0
- package/.cache/typescript/5.0/package-lock.json +17 -0
- package/.cache/typescript/5.0/package.json +1 -0
- package/.cache/typescript/5.3/node_modules/.package-lock.json +181 -0
- package/.cache/typescript/5.3/node_modules/@types/caseless/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/@types/caseless/README.md +48 -0
- package/.cache/typescript/5.3/node_modules/@types/caseless/index.d.ts +29 -0
- package/.cache/typescript/5.3/node_modules/@types/caseless/package.json +35 -0
- package/.cache/typescript/5.3/node_modules/@types/cheerio/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/@types/cheerio/README.md +15 -0
- package/.cache/typescript/5.3/node_modules/@types/cheerio/index.d.ts +318 -0
- package/.cache/typescript/5.3/node_modules/@types/cheerio/package.json +71 -0
- package/.cache/typescript/5.3/node_modules/@types/jsdom/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/@types/jsdom/README.md +15 -0
- package/.cache/typescript/5.3/node_modules/@types/jsdom/base.d.ts +456 -0
- package/.cache/typescript/5.3/node_modules/@types/jsdom/index.d.ts +18 -0
- package/.cache/typescript/5.3/node_modules/@types/jsdom/package.json +45 -0
- package/.cache/typescript/5.3/node_modules/@types/node/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/@types/node/README.md +15 -0
- package/.cache/typescript/5.3/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/.cache/typescript/5.3/node_modules/@types/node/assert.d.ts +996 -0
- package/.cache/typescript/5.3/node_modules/@types/node/async_hooks.d.ts +539 -0
- package/.cache/typescript/5.3/node_modules/@types/node/buffer.d.ts +2362 -0
- package/.cache/typescript/5.3/node_modules/@types/node/child_process.d.ts +1540 -0
- package/.cache/typescript/5.3/node_modules/@types/node/cluster.d.ts +432 -0
- package/.cache/typescript/5.3/node_modules/@types/node/console.d.ts +415 -0
- package/.cache/typescript/5.3/node_modules/@types/node/constants.d.ts +19 -0
- package/.cache/typescript/5.3/node_modules/@types/node/crypto.d.ts +4456 -0
- package/.cache/typescript/5.3/node_modules/@types/node/dgram.d.ts +586 -0
- package/.cache/typescript/5.3/node_modules/@types/node/diagnostics_channel.d.ts +191 -0
- package/.cache/typescript/5.3/node_modules/@types/node/dns/promises.d.ts +425 -0
- package/.cache/typescript/5.3/node_modules/@types/node/dns.d.ts +809 -0
- package/.cache/typescript/5.3/node_modules/@types/node/dom-events.d.ts +122 -0
- package/.cache/typescript/5.3/node_modules/@types/node/domain.d.ts +170 -0
- package/.cache/typescript/5.3/node_modules/@types/node/events.d.ts +879 -0
- package/.cache/typescript/5.3/node_modules/@types/node/fs/promises.d.ts +1239 -0
- package/.cache/typescript/5.3/node_modules/@types/node/fs.d.ts +4291 -0
- package/.cache/typescript/5.3/node_modules/@types/node/globals.d.ts +385 -0
- package/.cache/typescript/5.3/node_modules/@types/node/globals.global.d.ts +1 -0
- package/.cache/typescript/5.3/node_modules/@types/node/http.d.ts +1888 -0
- package/.cache/typescript/5.3/node_modules/@types/node/http2.d.ts +2382 -0
- package/.cache/typescript/5.3/node_modules/@types/node/https.d.ts +550 -0
- package/.cache/typescript/5.3/node_modules/@types/node/index.d.ts +88 -0
- package/.cache/typescript/5.3/node_modules/@types/node/inspector.d.ts +2747 -0
- package/.cache/typescript/5.3/node_modules/@types/node/module.d.ts +301 -0
- package/.cache/typescript/5.3/node_modules/@types/node/net.d.ts +949 -0
- package/.cache/typescript/5.3/node_modules/@types/node/os.d.ts +478 -0
- package/.cache/typescript/5.3/node_modules/@types/node/package.json +230 -0
- package/.cache/typescript/5.3/node_modules/@types/node/path.d.ts +191 -0
- package/.cache/typescript/5.3/node_modules/@types/node/perf_hooks.d.ts +639 -0
- package/.cache/typescript/5.3/node_modules/@types/node/process.d.ts +1539 -0
- package/.cache/typescript/5.3/node_modules/@types/node/punycode.d.ts +117 -0
- package/.cache/typescript/5.3/node_modules/@types/node/querystring.d.ts +141 -0
- package/.cache/typescript/5.3/node_modules/@types/node/readline/promises.d.ts +150 -0
- package/.cache/typescript/5.3/node_modules/@types/node/readline.d.ts +539 -0
- package/.cache/typescript/5.3/node_modules/@types/node/repl.d.ts +430 -0
- package/.cache/typescript/5.3/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/.cache/typescript/5.3/node_modules/@types/node/stream/promises.d.ts +83 -0
- package/.cache/typescript/5.3/node_modules/@types/node/stream/web.d.ts +350 -0
- package/.cache/typescript/5.3/node_modules/@types/node/stream.d.ts +1701 -0
- package/.cache/typescript/5.3/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/.cache/typescript/5.3/node_modules/@types/node/test.d.ts +1382 -0
- package/.cache/typescript/5.3/node_modules/@types/node/timers/promises.d.ts +93 -0
- package/.cache/typescript/5.3/node_modules/@types/node/timers.d.ts +240 -0
- package/.cache/typescript/5.3/node_modules/@types/node/tls.d.ts +1210 -0
- package/.cache/typescript/5.3/node_modules/@types/node/trace_events.d.ts +182 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/assert.d.ts +996 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/async_hooks.d.ts +539 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/buffer.d.ts +2362 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/child_process.d.ts +1540 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/cluster.d.ts +432 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/console.d.ts +415 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/constants.d.ts +19 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/crypto.d.ts +4455 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dgram.d.ts +586 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dns/promises.d.ts +425 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dns.d.ts +809 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dom-events.d.ts +122 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/events.d.ts +879 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/fs/promises.d.ts +1239 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/fs.d.ts +4291 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/globals.d.ts +385 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/http.d.ts +1888 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/http2.d.ts +2382 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/https.d.ts +550 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/index.d.ts +88 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/inspector.d.ts +2747 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/module.d.ts +301 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/net.d.ts +949 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/os.d.ts +478 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/perf_hooks.d.ts +639 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/process.d.ts +1539 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/querystring.d.ts +141 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/readline/promises.d.ts +150 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/readline.d.ts +539 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/repl.d.ts +430 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream/promises.d.ts +83 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream/web.d.ts +350 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream.d.ts +1701 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/test.d.ts +1382 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/timers.d.ts +240 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/tls.d.ts +1210 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/url.d.ts +927 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/util.d.ts +2183 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/vm.d.ts +903 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/wasi.d.ts +158 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/worker_threads.d.ts +691 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- package/.cache/typescript/5.3/node_modules/@types/node/tty.d.ts +208 -0
- package/.cache/typescript/5.3/node_modules/@types/node/url.d.ts +927 -0
- package/.cache/typescript/5.3/node_modules/@types/node/util.d.ts +2183 -0
- package/.cache/typescript/5.3/node_modules/@types/node/v8.d.ts +635 -0
- package/.cache/typescript/5.3/node_modules/@types/node/vm.d.ts +903 -0
- package/.cache/typescript/5.3/node_modules/@types/node/wasi.d.ts +158 -0
- package/.cache/typescript/5.3/node_modules/@types/node/worker_threads.d.ts +691 -0
- package/.cache/typescript/5.3/node_modules/@types/node/zlib.d.ts +517 -0
- package/.cache/typescript/5.3/node_modules/@types/node-fetch/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/@types/node-fetch/README.md +15 -0
- package/.cache/typescript/5.3/node_modules/@types/node-fetch/externals.d.ts +32 -0
- package/.cache/typescript/5.3/node_modules/@types/node-fetch/index.d.ts +214 -0
- package/.cache/typescript/5.3/node_modules/@types/node-fetch/package.json +83 -0
- package/.cache/typescript/5.3/node_modules/@types/request/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/@types/request/README.md +15 -0
- package/.cache/typescript/5.3/node_modules/@types/request/index.d.ts +395 -0
- package/.cache/typescript/5.3/node_modules/@types/request/node_modules/form-data/License +19 -0
- package/.cache/typescript/5.3/node_modules/@types/request/node_modules/form-data/README.md +350 -0
- package/.cache/typescript/5.3/node_modules/@types/request/node_modules/form-data/README.md.bak +350 -0
- package/.cache/typescript/5.3/node_modules/@types/request/node_modules/form-data/index.d.ts +51 -0
- package/.cache/typescript/5.3/node_modules/@types/request/node_modules/form-data/lib/browser.js +2 -0
- package/.cache/typescript/5.3/node_modules/@types/request/node_modules/form-data/lib/form_data.js +483 -0
- package/.cache/typescript/5.3/node_modules/@types/request/node_modules/form-data/lib/populate.js +10 -0
- package/.cache/typescript/5.3/node_modules/@types/request/node_modules/form-data/package.json +68 -0
- package/.cache/typescript/5.3/node_modules/@types/request/package.json +70 -0
- package/.cache/typescript/5.3/node_modules/@types/tough-cookie/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/@types/tough-cookie/README.md +15 -0
- package/.cache/typescript/5.3/node_modules/@types/tough-cookie/index.d.ts +321 -0
- package/.cache/typescript/5.3/node_modules/@types/tough-cookie/package.json +35 -0
- package/.cache/typescript/5.3/node_modules/asynckit/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/asynckit/README.md +233 -0
- package/.cache/typescript/5.3/node_modules/asynckit/bench.js +76 -0
- package/.cache/typescript/5.3/node_modules/asynckit/index.js +6 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/abort.js +29 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/async.js +34 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/defer.js +26 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/iterate.js +75 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_asynckit.js +91 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_parallel.js +25 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_serial.js +25 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/state.js +37 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/streamify.js +141 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/terminator.js +29 -0
- package/.cache/typescript/5.3/node_modules/asynckit/package.json +63 -0
- package/.cache/typescript/5.3/node_modules/asynckit/parallel.js +43 -0
- package/.cache/typescript/5.3/node_modules/asynckit/serial.js +17 -0
- package/.cache/typescript/5.3/node_modules/asynckit/serialOrdered.js +75 -0
- package/.cache/typescript/5.3/node_modules/asynckit/stream.js +21 -0
- package/.cache/typescript/5.3/node_modules/combined-stream/License +19 -0
- package/.cache/typescript/5.3/node_modules/combined-stream/Readme.md +138 -0
- package/.cache/typescript/5.3/node_modules/combined-stream/lib/combined_stream.js +208 -0
- package/.cache/typescript/5.3/node_modules/combined-stream/package.json +25 -0
- package/.cache/typescript/5.3/node_modules/combined-stream/yarn.lock +17 -0
- package/.cache/typescript/5.3/node_modules/delayed-stream/License +19 -0
- package/.cache/typescript/5.3/node_modules/delayed-stream/Makefile +7 -0
- package/.cache/typescript/5.3/node_modules/delayed-stream/Readme.md +141 -0
- package/.cache/typescript/5.3/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
- package/.cache/typescript/5.3/node_modules/delayed-stream/package.json +27 -0
- package/.cache/typescript/5.3/node_modules/entities/LICENSE +11 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/decode.d.ts +211 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/decode.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/decode.js +536 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/decode.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/decode_codepoint.d.ts +19 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/decode_codepoint.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/decode_codepoint.js +76 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/decode_codepoint.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/encode.d.ts +22 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/encode.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/encode.js +77 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/encode.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/escape.d.ts +43 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/escape.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/escape.js +122 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/escape.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/decode.d.ts +211 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/decode.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/decode.js +496 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/decode.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/decode_codepoint.d.ts +19 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/decode_codepoint.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/decode_codepoint.js +71 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/decode_codepoint.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/encode.d.ts +22 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/encode.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/encode.js +69 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/encode.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/escape.d.ts +43 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/escape.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/escape.js +116 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/escape.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/generated/decode-data-html.d.ts +3 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/generated/decode-data-html.js +7 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/generated/decode-data-html.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts +3 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/generated/decode-data-xml.js +7 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/generated/decode-data-xml.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/generated/encode-html.d.ts +8 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/generated/encode-html.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/generated/encode-html.js +10 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/generated/encode-html.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/index.d.ts +96 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/index.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/index.js +99 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/index.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/esm/package.json +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/generated/decode-data-html.d.ts +3 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/generated/decode-data-html.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/generated/decode-data-html.js +9 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/generated/decode-data-html.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/generated/decode-data-xml.d.ts +3 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/generated/decode-data-xml.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/generated/decode-data-xml.js +9 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/generated/decode-data-xml.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/generated/encode-html.d.ts +8 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/generated/encode-html.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/generated/encode-html.js +12 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/generated/encode-html.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/index.d.ts +96 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/index.d.ts.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/index.js +126 -0
- package/.cache/typescript/5.3/node_modules/entities/lib/index.js.map +1 -0
- package/.cache/typescript/5.3/node_modules/entities/package.json +90 -0
- package/.cache/typescript/5.3/node_modules/entities/readme.md +122 -0
- package/.cache/typescript/5.3/node_modules/form-data/License +19 -0
- package/.cache/typescript/5.3/node_modules/form-data/README.md.bak +358 -0
- package/.cache/typescript/5.3/node_modules/form-data/Readme.md +358 -0
- package/.cache/typescript/5.3/node_modules/form-data/index.d.ts +62 -0
- package/.cache/typescript/5.3/node_modules/form-data/lib/browser.js +2 -0
- package/.cache/typescript/5.3/node_modules/form-data/lib/form_data.js +501 -0
- package/.cache/typescript/5.3/node_modules/form-data/lib/populate.js +10 -0
- package/.cache/typescript/5.3/node_modules/form-data/package.json +68 -0
- package/.cache/typescript/5.3/node_modules/mime-db/HISTORY.md +507 -0
- package/.cache/typescript/5.3/node_modules/mime-db/LICENSE +23 -0
- package/.cache/typescript/5.3/node_modules/mime-db/README.md +100 -0
- package/.cache/typescript/5.3/node_modules/mime-db/db.json +8519 -0
- package/.cache/typescript/5.3/node_modules/mime-db/index.js +12 -0
- package/.cache/typescript/5.3/node_modules/mime-db/package.json +60 -0
- package/.cache/typescript/5.3/node_modules/mime-types/HISTORY.md +397 -0
- package/.cache/typescript/5.3/node_modules/mime-types/LICENSE +23 -0
- package/.cache/typescript/5.3/node_modules/mime-types/README.md +113 -0
- package/.cache/typescript/5.3/node_modules/mime-types/index.js +188 -0
- package/.cache/typescript/5.3/node_modules/mime-types/package.json +44 -0
- package/.cache/typescript/5.3/node_modules/parse5/LICENSE +19 -0
- package/.cache/typescript/5.3/node_modules/parse5/README.md +38 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/common/doctype.d.ts +5 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/common/doctype.js +120 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/common/error-codes.d.ts +68 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/common/error-codes.js +67 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/common/foreign-content.d.ts +10 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/common/foreign-content.js +239 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/common/html.d.ts +288 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/common/html.js +529 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/common/token.d.ts +85 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/common/token.js +25 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/common/unicode.d.ts +49 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/common/unicode.js +77 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/index.d.ts +60 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/index.js +57 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/package.json +1 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/parser/formatting-element-list.d.ts +37 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/parser/formatting-element-list.js +115 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/parser/index.d.ts +157 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/parser/index.js +3163 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/parser/open-element-stack.d.ts +53 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/parser/open-element-stack.js +316 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/serializer/index.d.ts +61 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/serializer/index.js +173 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/tokenizer/index.d.ts +248 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/tokenizer/index.js +2908 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/tokenizer/preprocessor.d.ts +37 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/tokenizer/preprocessor.js +199 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/tree-adapters/default.d.ts +85 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/tree-adapters/default.js +177 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/tree-adapters/interface.d.ts +250 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/cjs/tree-adapters/interface.js +3 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/common/doctype.d.ts +5 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/common/doctype.js +115 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/common/error-codes.d.ts +68 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/common/error-codes.js +64 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/common/foreign-content.d.ts +10 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/common/foreign-content.js +230 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/common/html.d.ts +288 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/common/html.js +523 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/common/token.d.ts +85 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/common/token.js +21 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/common/unicode.d.ts +49 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/common/unicode.js +69 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/index.d.ts +60 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/index.js +45 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/parser/formatting-element-list.d.ts +37 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/parser/formatting-element-list.js +111 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/parser/index.d.ts +157 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/parser/index.js +3168 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/parser/open-element-stack.d.ts +53 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/parser/open-element-stack.js +312 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/serializer/index.d.ts +61 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/serializer/index.js +168 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/tokenizer/index.d.ts +248 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/tokenizer/index.js +2904 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/tokenizer/preprocessor.d.ts +37 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/tokenizer/preprocessor.js +195 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/tree-adapters/default.d.ts +85 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/tree-adapters/default.js +174 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/tree-adapters/interface.d.ts +250 -0
- package/.cache/typescript/5.3/node_modules/parse5/dist/tree-adapters/interface.js +2 -0
- package/.cache/typescript/5.3/node_modules/parse5/package.json +50 -0
- package/.cache/typescript/5.3/node_modules/types-registry/README.md +2 -0
- package/.cache/typescript/5.3/node_modules/types-registry/index.json +1 -0
- package/.cache/typescript/5.3/node_modules/types-registry/package.json +20 -0
- package/.cache/typescript/5.3/node_modules/undici-types/README.md +6 -0
- package/.cache/typescript/5.3/node_modules/undici-types/agent.d.ts +31 -0
- package/.cache/typescript/5.3/node_modules/undici-types/api.d.ts +43 -0
- package/.cache/typescript/5.3/node_modules/undici-types/balanced-pool.d.ts +18 -0
- package/.cache/typescript/5.3/node_modules/undici-types/cache.d.ts +36 -0
- package/.cache/typescript/5.3/node_modules/undici-types/client.d.ts +97 -0
- package/.cache/typescript/5.3/node_modules/undici-types/connector.d.ts +34 -0
- package/.cache/typescript/5.3/node_modules/undici-types/content-type.d.ts +21 -0
- package/.cache/typescript/5.3/node_modules/undici-types/cookies.d.ts +28 -0
- package/.cache/typescript/5.3/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
- package/.cache/typescript/5.3/node_modules/undici-types/dispatcher.d.ts +241 -0
- package/.cache/typescript/5.3/node_modules/undici-types/errors.d.ts +128 -0
- package/.cache/typescript/5.3/node_modules/undici-types/fetch.d.ts +209 -0
- package/.cache/typescript/5.3/node_modules/undici-types/file.d.ts +39 -0
- package/.cache/typescript/5.3/node_modules/undici-types/filereader.d.ts +54 -0
- package/.cache/typescript/5.3/node_modules/undici-types/formdata.d.ts +108 -0
- package/.cache/typescript/5.3/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/.cache/typescript/5.3/node_modules/undici-types/global-origin.d.ts +7 -0
- package/.cache/typescript/5.3/node_modules/undici-types/handlers.d.ts +9 -0
- package/.cache/typescript/5.3/node_modules/undici-types/header.d.ts +4 -0
- package/.cache/typescript/5.3/node_modules/undici-types/index.d.ts +63 -0
- package/.cache/typescript/5.3/node_modules/undici-types/interceptors.d.ts +5 -0
- package/.cache/typescript/5.3/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/.cache/typescript/5.3/node_modules/undici-types/mock-client.d.ts +25 -0
- package/.cache/typescript/5.3/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/.cache/typescript/5.3/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/.cache/typescript/5.3/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/.cache/typescript/5.3/node_modules/undici-types/package.json +55 -0
- package/.cache/typescript/5.3/node_modules/undici-types/patch.d.ts +71 -0
- package/.cache/typescript/5.3/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/.cache/typescript/5.3/node_modules/undici-types/pool.d.ts +28 -0
- package/.cache/typescript/5.3/node_modules/undici-types/proxy-agent.d.ts +30 -0
- package/.cache/typescript/5.3/node_modules/undici-types/readable.d.ts +61 -0
- package/.cache/typescript/5.3/node_modules/undici-types/webidl.d.ts +220 -0
- package/.cache/typescript/5.3/node_modules/undici-types/websocket.d.ts +131 -0
- package/.cache/typescript/5.3/package-lock.json +192 -0
- package/.cache/typescript/5.3/package.json +1 -0
- package/.replit +17 -0
- package/README.md +130 -0
- package/index.js +1 -0
- package/package.json +28 -0
- package/replit.nix +3 -0
@@ -0,0 +1,37 @@
|
|
1
|
+
import { ERR, type ParserError, type ParserErrorHandler } from '../common/error-codes.js';
|
2
|
+
export declare class Preprocessor {
|
3
|
+
private handler;
|
4
|
+
html: string;
|
5
|
+
private pos;
|
6
|
+
private lastGapPos;
|
7
|
+
private gapStack;
|
8
|
+
private skipNextNewLine;
|
9
|
+
private lastChunkWritten;
|
10
|
+
endOfChunkHit: boolean;
|
11
|
+
bufferWaterline: number;
|
12
|
+
private isEol;
|
13
|
+
private lineStartPos;
|
14
|
+
droppedBufferSize: number;
|
15
|
+
line: number;
|
16
|
+
constructor(handler: {
|
17
|
+
onParseError?: ParserErrorHandler | null;
|
18
|
+
});
|
19
|
+
/** The column on the current line. If we just saw a gap (eg. a surrogate pair), return the index before. */
|
20
|
+
get col(): number;
|
21
|
+
get offset(): number;
|
22
|
+
getError(code: ERR): ParserError;
|
23
|
+
private lastErrOffset;
|
24
|
+
private _err;
|
25
|
+
private _addGap;
|
26
|
+
private _processSurrogate;
|
27
|
+
willDropParsedChunk(): boolean;
|
28
|
+
dropParsedChunk(): void;
|
29
|
+
write(chunk: string, isLastChunk: boolean): void;
|
30
|
+
insertHtmlAtCurrentPos(chunk: string): void;
|
31
|
+
startsWith(pattern: string, caseSensitive: boolean): boolean;
|
32
|
+
peek(offset: number): number;
|
33
|
+
advance(): number;
|
34
|
+
private _checkForProblematicCharacters;
|
35
|
+
retreat(count: number): void;
|
36
|
+
}
|
37
|
+
//# sourceMappingURL=preprocessor.d.ts.map
|
@@ -0,0 +1,199 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Preprocessor = void 0;
|
4
|
+
const unicode_js_1 = require("../common/unicode.js");
|
5
|
+
const error_codes_js_1 = require("../common/error-codes.js");
|
6
|
+
//Const
|
7
|
+
const DEFAULT_BUFFER_WATERLINE = 1 << 16;
|
8
|
+
//Preprocessor
|
9
|
+
//NOTE: HTML input preprocessing
|
10
|
+
//(see: http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#preprocessing-the-input-stream)
|
11
|
+
class Preprocessor {
|
12
|
+
constructor(handler) {
|
13
|
+
this.handler = handler;
|
14
|
+
this.html = '';
|
15
|
+
this.pos = -1;
|
16
|
+
// NOTE: Initial `lastGapPos` is -2, to ensure `col` on initialisation is 0
|
17
|
+
this.lastGapPos = -2;
|
18
|
+
this.gapStack = [];
|
19
|
+
this.skipNextNewLine = false;
|
20
|
+
this.lastChunkWritten = false;
|
21
|
+
this.endOfChunkHit = false;
|
22
|
+
this.bufferWaterline = DEFAULT_BUFFER_WATERLINE;
|
23
|
+
this.isEol = false;
|
24
|
+
this.lineStartPos = 0;
|
25
|
+
this.droppedBufferSize = 0;
|
26
|
+
this.line = 1;
|
27
|
+
//NOTE: avoid reporting errors twice on advance/retreat
|
28
|
+
this.lastErrOffset = -1;
|
29
|
+
}
|
30
|
+
/** The column on the current line. If we just saw a gap (eg. a surrogate pair), return the index before. */
|
31
|
+
get col() {
|
32
|
+
return this.pos - this.lineStartPos + Number(this.lastGapPos !== this.pos);
|
33
|
+
}
|
34
|
+
get offset() {
|
35
|
+
return this.droppedBufferSize + this.pos;
|
36
|
+
}
|
37
|
+
getError(code) {
|
38
|
+
const { line, col, offset } = this;
|
39
|
+
return {
|
40
|
+
code,
|
41
|
+
startLine: line,
|
42
|
+
endLine: line,
|
43
|
+
startCol: col,
|
44
|
+
endCol: col,
|
45
|
+
startOffset: offset,
|
46
|
+
endOffset: offset,
|
47
|
+
};
|
48
|
+
}
|
49
|
+
_err(code) {
|
50
|
+
if (this.handler.onParseError && this.lastErrOffset !== this.offset) {
|
51
|
+
this.lastErrOffset = this.offset;
|
52
|
+
this.handler.onParseError(this.getError(code));
|
53
|
+
}
|
54
|
+
}
|
55
|
+
_addGap() {
|
56
|
+
this.gapStack.push(this.lastGapPos);
|
57
|
+
this.lastGapPos = this.pos;
|
58
|
+
}
|
59
|
+
_processSurrogate(cp) {
|
60
|
+
//NOTE: try to peek a surrogate pair
|
61
|
+
if (this.pos !== this.html.length - 1) {
|
62
|
+
const nextCp = this.html.charCodeAt(this.pos + 1);
|
63
|
+
if ((0, unicode_js_1.isSurrogatePair)(nextCp)) {
|
64
|
+
//NOTE: we have a surrogate pair. Peek pair character and recalculate code point.
|
65
|
+
this.pos++;
|
66
|
+
//NOTE: add a gap that should be avoided during retreat
|
67
|
+
this._addGap();
|
68
|
+
return (0, unicode_js_1.getSurrogatePairCodePoint)(cp, nextCp);
|
69
|
+
}
|
70
|
+
}
|
71
|
+
//NOTE: we are at the end of a chunk, therefore we can't infer the surrogate pair yet.
|
72
|
+
else if (!this.lastChunkWritten) {
|
73
|
+
this.endOfChunkHit = true;
|
74
|
+
return unicode_js_1.CODE_POINTS.EOF;
|
75
|
+
}
|
76
|
+
//NOTE: isolated surrogate
|
77
|
+
this._err(error_codes_js_1.ERR.surrogateInInputStream);
|
78
|
+
return cp;
|
79
|
+
}
|
80
|
+
willDropParsedChunk() {
|
81
|
+
return this.pos > this.bufferWaterline;
|
82
|
+
}
|
83
|
+
dropParsedChunk() {
|
84
|
+
if (this.willDropParsedChunk()) {
|
85
|
+
this.html = this.html.substring(this.pos);
|
86
|
+
this.lineStartPos -= this.pos;
|
87
|
+
this.droppedBufferSize += this.pos;
|
88
|
+
this.pos = 0;
|
89
|
+
this.lastGapPos = -2;
|
90
|
+
this.gapStack.length = 0;
|
91
|
+
}
|
92
|
+
}
|
93
|
+
write(chunk, isLastChunk) {
|
94
|
+
if (this.html.length > 0) {
|
95
|
+
this.html += chunk;
|
96
|
+
}
|
97
|
+
else {
|
98
|
+
this.html = chunk;
|
99
|
+
}
|
100
|
+
this.endOfChunkHit = false;
|
101
|
+
this.lastChunkWritten = isLastChunk;
|
102
|
+
}
|
103
|
+
insertHtmlAtCurrentPos(chunk) {
|
104
|
+
this.html = this.html.substring(0, this.pos + 1) + chunk + this.html.substring(this.pos + 1);
|
105
|
+
this.endOfChunkHit = false;
|
106
|
+
}
|
107
|
+
startsWith(pattern, caseSensitive) {
|
108
|
+
// Check if our buffer has enough characters
|
109
|
+
if (this.pos + pattern.length > this.html.length) {
|
110
|
+
this.endOfChunkHit = !this.lastChunkWritten;
|
111
|
+
return false;
|
112
|
+
}
|
113
|
+
if (caseSensitive) {
|
114
|
+
return this.html.startsWith(pattern, this.pos);
|
115
|
+
}
|
116
|
+
for (let i = 0; i < pattern.length; i++) {
|
117
|
+
const cp = this.html.charCodeAt(this.pos + i) | 0x20;
|
118
|
+
if (cp !== pattern.charCodeAt(i)) {
|
119
|
+
return false;
|
120
|
+
}
|
121
|
+
}
|
122
|
+
return true;
|
123
|
+
}
|
124
|
+
peek(offset) {
|
125
|
+
const pos = this.pos + offset;
|
126
|
+
if (pos >= this.html.length) {
|
127
|
+
this.endOfChunkHit = !this.lastChunkWritten;
|
128
|
+
return unicode_js_1.CODE_POINTS.EOF;
|
129
|
+
}
|
130
|
+
const code = this.html.charCodeAt(pos);
|
131
|
+
return code === unicode_js_1.CODE_POINTS.CARRIAGE_RETURN ? unicode_js_1.CODE_POINTS.LINE_FEED : code;
|
132
|
+
}
|
133
|
+
advance() {
|
134
|
+
this.pos++;
|
135
|
+
//NOTE: LF should be in the last column of the line
|
136
|
+
if (this.isEol) {
|
137
|
+
this.isEol = false;
|
138
|
+
this.line++;
|
139
|
+
this.lineStartPos = this.pos;
|
140
|
+
}
|
141
|
+
if (this.pos >= this.html.length) {
|
142
|
+
this.endOfChunkHit = !this.lastChunkWritten;
|
143
|
+
return unicode_js_1.CODE_POINTS.EOF;
|
144
|
+
}
|
145
|
+
let cp = this.html.charCodeAt(this.pos);
|
146
|
+
//NOTE: all U+000D CARRIAGE RETURN (CR) characters must be converted to U+000A LINE FEED (LF) characters
|
147
|
+
if (cp === unicode_js_1.CODE_POINTS.CARRIAGE_RETURN) {
|
148
|
+
this.isEol = true;
|
149
|
+
this.skipNextNewLine = true;
|
150
|
+
return unicode_js_1.CODE_POINTS.LINE_FEED;
|
151
|
+
}
|
152
|
+
//NOTE: any U+000A LINE FEED (LF) characters that immediately follow a U+000D CARRIAGE RETURN (CR) character
|
153
|
+
//must be ignored.
|
154
|
+
if (cp === unicode_js_1.CODE_POINTS.LINE_FEED) {
|
155
|
+
this.isEol = true;
|
156
|
+
if (this.skipNextNewLine) {
|
157
|
+
// `line` will be bumped again in the recursive call.
|
158
|
+
this.line--;
|
159
|
+
this.skipNextNewLine = false;
|
160
|
+
this._addGap();
|
161
|
+
return this.advance();
|
162
|
+
}
|
163
|
+
}
|
164
|
+
this.skipNextNewLine = false;
|
165
|
+
if ((0, unicode_js_1.isSurrogate)(cp)) {
|
166
|
+
cp = this._processSurrogate(cp);
|
167
|
+
}
|
168
|
+
//OPTIMIZATION: first check if code point is in the common allowed
|
169
|
+
//range (ASCII alphanumeric, whitespaces, big chunk of BMP)
|
170
|
+
//before going into detailed performance cost validation.
|
171
|
+
const isCommonValidRange = this.handler.onParseError === null ||
|
172
|
+
(cp > 0x1f && cp < 0x7f) ||
|
173
|
+
cp === unicode_js_1.CODE_POINTS.LINE_FEED ||
|
174
|
+
cp === unicode_js_1.CODE_POINTS.CARRIAGE_RETURN ||
|
175
|
+
(cp > 0x9f && cp < 64976);
|
176
|
+
if (!isCommonValidRange) {
|
177
|
+
this._checkForProblematicCharacters(cp);
|
178
|
+
}
|
179
|
+
return cp;
|
180
|
+
}
|
181
|
+
_checkForProblematicCharacters(cp) {
|
182
|
+
if ((0, unicode_js_1.isControlCodePoint)(cp)) {
|
183
|
+
this._err(error_codes_js_1.ERR.controlCharacterInInputStream);
|
184
|
+
}
|
185
|
+
else if ((0, unicode_js_1.isUndefinedCodePoint)(cp)) {
|
186
|
+
this._err(error_codes_js_1.ERR.noncharacterInInputStream);
|
187
|
+
}
|
188
|
+
}
|
189
|
+
retreat(count) {
|
190
|
+
this.pos -= count;
|
191
|
+
while (this.pos < this.lastGapPos) {
|
192
|
+
this.lastGapPos = this.gapStack.pop();
|
193
|
+
this.pos--;
|
194
|
+
}
|
195
|
+
this.isEol = false;
|
196
|
+
}
|
197
|
+
}
|
198
|
+
exports.Preprocessor = Preprocessor;
|
199
|
+
//# sourceMappingURL=preprocessor.js.map
|
@@ -0,0 +1,85 @@
|
|
1
|
+
import { DOCUMENT_MODE, type NS } from '../common/html.js';
|
2
|
+
import type { Attribute, Location, ElementLocation } from '../common/token.js';
|
3
|
+
import type { TreeAdapter, TreeAdapterTypeMap } from './interface.js';
|
4
|
+
export interface Document {
|
5
|
+
/** The name of the node. */
|
6
|
+
nodeName: '#document';
|
7
|
+
/**
|
8
|
+
* Document mode.
|
9
|
+
*
|
10
|
+
* @see {@link DOCUMENT_MODE} */
|
11
|
+
mode: DOCUMENT_MODE;
|
12
|
+
/** The node's children. */
|
13
|
+
childNodes: ChildNode[];
|
14
|
+
/** Comment source code location info. Available if location info is enabled. */
|
15
|
+
sourceCodeLocation?: Location | null;
|
16
|
+
}
|
17
|
+
export interface DocumentFragment {
|
18
|
+
/** The name of the node. */
|
19
|
+
nodeName: '#document-fragment';
|
20
|
+
/** The node's children. */
|
21
|
+
childNodes: ChildNode[];
|
22
|
+
/** Comment source code location info. Available if location info is enabled. */
|
23
|
+
sourceCodeLocation?: Location | null;
|
24
|
+
}
|
25
|
+
export interface Element {
|
26
|
+
/** Element tag name. Same as {@link tagName}. */
|
27
|
+
nodeName: string;
|
28
|
+
/** Element tag name. Same as {@link nodeName}. */
|
29
|
+
tagName: string;
|
30
|
+
/** List of element attributes. */
|
31
|
+
attrs: Attribute[];
|
32
|
+
/** Element namespace. */
|
33
|
+
namespaceURI: NS;
|
34
|
+
/** Element source code location info, with attributes. Available if location info is enabled. */
|
35
|
+
sourceCodeLocation?: ElementLocation | null;
|
36
|
+
/** Parent node. */
|
37
|
+
parentNode: ParentNode | null;
|
38
|
+
/** The node's children. */
|
39
|
+
childNodes: ChildNode[];
|
40
|
+
}
|
41
|
+
export interface CommentNode {
|
42
|
+
/** The name of the node. */
|
43
|
+
nodeName: '#comment';
|
44
|
+
/** Parent node. */
|
45
|
+
parentNode: ParentNode | null;
|
46
|
+
/** Comment text. */
|
47
|
+
data: string;
|
48
|
+
/** Comment source code location info. Available if location info is enabled. */
|
49
|
+
sourceCodeLocation?: Location | null;
|
50
|
+
}
|
51
|
+
export interface TextNode {
|
52
|
+
nodeName: '#text';
|
53
|
+
/** Parent node. */
|
54
|
+
parentNode: ParentNode | null;
|
55
|
+
/** Text content. */
|
56
|
+
value: string;
|
57
|
+
/** Comment source code location info. Available if location info is enabled. */
|
58
|
+
sourceCodeLocation?: Location | null;
|
59
|
+
}
|
60
|
+
export interface Template extends Element {
|
61
|
+
nodeName: 'template';
|
62
|
+
tagName: 'template';
|
63
|
+
/** The content of a `template` tag. */
|
64
|
+
content: DocumentFragment;
|
65
|
+
}
|
66
|
+
export interface DocumentType {
|
67
|
+
/** The name of the node. */
|
68
|
+
nodeName: '#documentType';
|
69
|
+
/** Parent node. */
|
70
|
+
parentNode: ParentNode | null;
|
71
|
+
/** Document type name. */
|
72
|
+
name: string;
|
73
|
+
/** Document type public identifier. */
|
74
|
+
publicId: string;
|
75
|
+
/** Document type system identifier. */
|
76
|
+
systemId: string;
|
77
|
+
/** Comment source code location info. Available if location info is enabled. */
|
78
|
+
sourceCodeLocation?: Location | null;
|
79
|
+
}
|
80
|
+
export type ParentNode = Document | DocumentFragment | Element | Template;
|
81
|
+
export type ChildNode = Element | Template | CommentNode | TextNode | DocumentType;
|
82
|
+
export type Node = ParentNode | ChildNode;
|
83
|
+
export type DefaultTreeAdapterMap = TreeAdapterTypeMap<Node, ParentNode, ChildNode, Document, DocumentFragment, Element, CommentNode, TextNode, Template, DocumentType>;
|
84
|
+
export declare const defaultTreeAdapter: TreeAdapter<DefaultTreeAdapterMap>;
|
85
|
+
//# sourceMappingURL=default.d.ts.map
|
@@ -0,0 +1,177 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.defaultTreeAdapter = void 0;
|
4
|
+
const html_js_1 = require("../common/html.js");
|
5
|
+
function createTextNode(value) {
|
6
|
+
return {
|
7
|
+
nodeName: '#text',
|
8
|
+
value,
|
9
|
+
parentNode: null,
|
10
|
+
};
|
11
|
+
}
|
12
|
+
exports.defaultTreeAdapter = {
|
13
|
+
//Node construction
|
14
|
+
createDocument() {
|
15
|
+
return {
|
16
|
+
nodeName: '#document',
|
17
|
+
mode: html_js_1.DOCUMENT_MODE.NO_QUIRKS,
|
18
|
+
childNodes: [],
|
19
|
+
};
|
20
|
+
},
|
21
|
+
createDocumentFragment() {
|
22
|
+
return {
|
23
|
+
nodeName: '#document-fragment',
|
24
|
+
childNodes: [],
|
25
|
+
};
|
26
|
+
},
|
27
|
+
createElement(tagName, namespaceURI, attrs) {
|
28
|
+
return {
|
29
|
+
nodeName: tagName,
|
30
|
+
tagName,
|
31
|
+
attrs,
|
32
|
+
namespaceURI,
|
33
|
+
childNodes: [],
|
34
|
+
parentNode: null,
|
35
|
+
};
|
36
|
+
},
|
37
|
+
createCommentNode(data) {
|
38
|
+
return {
|
39
|
+
nodeName: '#comment',
|
40
|
+
data,
|
41
|
+
parentNode: null,
|
42
|
+
};
|
43
|
+
},
|
44
|
+
//Tree mutation
|
45
|
+
appendChild(parentNode, newNode) {
|
46
|
+
parentNode.childNodes.push(newNode);
|
47
|
+
newNode.parentNode = parentNode;
|
48
|
+
},
|
49
|
+
insertBefore(parentNode, newNode, referenceNode) {
|
50
|
+
const insertionIdx = parentNode.childNodes.indexOf(referenceNode);
|
51
|
+
parentNode.childNodes.splice(insertionIdx, 0, newNode);
|
52
|
+
newNode.parentNode = parentNode;
|
53
|
+
},
|
54
|
+
setTemplateContent(templateElement, contentElement) {
|
55
|
+
templateElement.content = contentElement;
|
56
|
+
},
|
57
|
+
getTemplateContent(templateElement) {
|
58
|
+
return templateElement.content;
|
59
|
+
},
|
60
|
+
setDocumentType(document, name, publicId, systemId) {
|
61
|
+
const doctypeNode = document.childNodes.find((node) => node.nodeName === '#documentType');
|
62
|
+
if (doctypeNode) {
|
63
|
+
doctypeNode.name = name;
|
64
|
+
doctypeNode.publicId = publicId;
|
65
|
+
doctypeNode.systemId = systemId;
|
66
|
+
}
|
67
|
+
else {
|
68
|
+
const node = {
|
69
|
+
nodeName: '#documentType',
|
70
|
+
name,
|
71
|
+
publicId,
|
72
|
+
systemId,
|
73
|
+
parentNode: null,
|
74
|
+
};
|
75
|
+
exports.defaultTreeAdapter.appendChild(document, node);
|
76
|
+
}
|
77
|
+
},
|
78
|
+
setDocumentMode(document, mode) {
|
79
|
+
document.mode = mode;
|
80
|
+
},
|
81
|
+
getDocumentMode(document) {
|
82
|
+
return document.mode;
|
83
|
+
},
|
84
|
+
detachNode(node) {
|
85
|
+
if (node.parentNode) {
|
86
|
+
const idx = node.parentNode.childNodes.indexOf(node);
|
87
|
+
node.parentNode.childNodes.splice(idx, 1);
|
88
|
+
node.parentNode = null;
|
89
|
+
}
|
90
|
+
},
|
91
|
+
insertText(parentNode, text) {
|
92
|
+
if (parentNode.childNodes.length > 0) {
|
93
|
+
const prevNode = parentNode.childNodes[parentNode.childNodes.length - 1];
|
94
|
+
if (exports.defaultTreeAdapter.isTextNode(prevNode)) {
|
95
|
+
prevNode.value += text;
|
96
|
+
return;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
exports.defaultTreeAdapter.appendChild(parentNode, createTextNode(text));
|
100
|
+
},
|
101
|
+
insertTextBefore(parentNode, text, referenceNode) {
|
102
|
+
const prevNode = parentNode.childNodes[parentNode.childNodes.indexOf(referenceNode) - 1];
|
103
|
+
if (prevNode && exports.defaultTreeAdapter.isTextNode(prevNode)) {
|
104
|
+
prevNode.value += text;
|
105
|
+
}
|
106
|
+
else {
|
107
|
+
exports.defaultTreeAdapter.insertBefore(parentNode, createTextNode(text), referenceNode);
|
108
|
+
}
|
109
|
+
},
|
110
|
+
adoptAttributes(recipient, attrs) {
|
111
|
+
const recipientAttrsMap = new Set(recipient.attrs.map((attr) => attr.name));
|
112
|
+
for (let j = 0; j < attrs.length; j++) {
|
113
|
+
if (!recipientAttrsMap.has(attrs[j].name)) {
|
114
|
+
recipient.attrs.push(attrs[j]);
|
115
|
+
}
|
116
|
+
}
|
117
|
+
},
|
118
|
+
//Tree traversing
|
119
|
+
getFirstChild(node) {
|
120
|
+
return node.childNodes[0];
|
121
|
+
},
|
122
|
+
getChildNodes(node) {
|
123
|
+
return node.childNodes;
|
124
|
+
},
|
125
|
+
getParentNode(node) {
|
126
|
+
return node.parentNode;
|
127
|
+
},
|
128
|
+
getAttrList(element) {
|
129
|
+
return element.attrs;
|
130
|
+
},
|
131
|
+
//Node data
|
132
|
+
getTagName(element) {
|
133
|
+
return element.tagName;
|
134
|
+
},
|
135
|
+
getNamespaceURI(element) {
|
136
|
+
return element.namespaceURI;
|
137
|
+
},
|
138
|
+
getTextNodeContent(textNode) {
|
139
|
+
return textNode.value;
|
140
|
+
},
|
141
|
+
getCommentNodeContent(commentNode) {
|
142
|
+
return commentNode.data;
|
143
|
+
},
|
144
|
+
getDocumentTypeNodeName(doctypeNode) {
|
145
|
+
return doctypeNode.name;
|
146
|
+
},
|
147
|
+
getDocumentTypeNodePublicId(doctypeNode) {
|
148
|
+
return doctypeNode.publicId;
|
149
|
+
},
|
150
|
+
getDocumentTypeNodeSystemId(doctypeNode) {
|
151
|
+
return doctypeNode.systemId;
|
152
|
+
},
|
153
|
+
//Node types
|
154
|
+
isTextNode(node) {
|
155
|
+
return node.nodeName === '#text';
|
156
|
+
},
|
157
|
+
isCommentNode(node) {
|
158
|
+
return node.nodeName === '#comment';
|
159
|
+
},
|
160
|
+
isDocumentTypeNode(node) {
|
161
|
+
return node.nodeName === '#documentType';
|
162
|
+
},
|
163
|
+
isElementNode(node) {
|
164
|
+
return Object.prototype.hasOwnProperty.call(node, 'tagName');
|
165
|
+
},
|
166
|
+
// Source code location
|
167
|
+
setNodeSourceCodeLocation(node, location) {
|
168
|
+
node.sourceCodeLocation = location;
|
169
|
+
},
|
170
|
+
getNodeSourceCodeLocation(node) {
|
171
|
+
return node.sourceCodeLocation;
|
172
|
+
},
|
173
|
+
updateNodeSourceCodeLocation(node, endLocation) {
|
174
|
+
node.sourceCodeLocation = Object.assign(Object.assign({}, node.sourceCodeLocation), endLocation);
|
175
|
+
},
|
176
|
+
};
|
177
|
+
//# sourceMappingURL=default.js.map
|