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,22 @@
|
|
1
|
+
/**
|
2
|
+
* Encodes all characters in the input using HTML entities. This includes
|
3
|
+
* characters that are valid ASCII characters in HTML documents, such as `#`.
|
4
|
+
*
|
5
|
+
* To get a more compact output, consider using the `encodeNonAsciiHTML`
|
6
|
+
* function, which will only encode characters that are not valid in HTML
|
7
|
+
* documents, as well as non-ASCII characters.
|
8
|
+
*
|
9
|
+
* If a character has no equivalent entity, a numeric hexadecimal reference
|
10
|
+
* (eg. `ü`) will be used.
|
11
|
+
*/
|
12
|
+
export declare function encodeHTML(data: string): string;
|
13
|
+
/**
|
14
|
+
* Encodes all non-ASCII characters, as well as characters not valid in HTML
|
15
|
+
* documents using HTML entities. This function will not encode characters that
|
16
|
+
* are valid in HTML documents, such as `#`.
|
17
|
+
*
|
18
|
+
* If a character has no equivalent entity, a numeric hexadecimal reference
|
19
|
+
* (eg. `ü`) will be used.
|
20
|
+
*/
|
21
|
+
export declare function encodeNonAsciiHTML(data: string): string;
|
22
|
+
//# sourceMappingURL=encode.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"encode.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["encode.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AACD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD"}
|
@@ -0,0 +1,77 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.encodeNonAsciiHTML = exports.encodeHTML = void 0;
|
7
|
+
var encode_html_js_1 = __importDefault(require("./generated/encode-html.js"));
|
8
|
+
var escape_js_1 = require("./escape.js");
|
9
|
+
var htmlReplacer = /[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;
|
10
|
+
/**
|
11
|
+
* Encodes all characters in the input using HTML entities. This includes
|
12
|
+
* characters that are valid ASCII characters in HTML documents, such as `#`.
|
13
|
+
*
|
14
|
+
* To get a more compact output, consider using the `encodeNonAsciiHTML`
|
15
|
+
* function, which will only encode characters that are not valid in HTML
|
16
|
+
* documents, as well as non-ASCII characters.
|
17
|
+
*
|
18
|
+
* If a character has no equivalent entity, a numeric hexadecimal reference
|
19
|
+
* (eg. `ü`) will be used.
|
20
|
+
*/
|
21
|
+
function encodeHTML(data) {
|
22
|
+
return encodeHTMLTrieRe(htmlReplacer, data);
|
23
|
+
}
|
24
|
+
exports.encodeHTML = encodeHTML;
|
25
|
+
/**
|
26
|
+
* Encodes all non-ASCII characters, as well as characters not valid in HTML
|
27
|
+
* documents using HTML entities. This function will not encode characters that
|
28
|
+
* are valid in HTML documents, such as `#`.
|
29
|
+
*
|
30
|
+
* If a character has no equivalent entity, a numeric hexadecimal reference
|
31
|
+
* (eg. `ü`) will be used.
|
32
|
+
*/
|
33
|
+
function encodeNonAsciiHTML(data) {
|
34
|
+
return encodeHTMLTrieRe(escape_js_1.xmlReplacer, data);
|
35
|
+
}
|
36
|
+
exports.encodeNonAsciiHTML = encodeNonAsciiHTML;
|
37
|
+
function encodeHTMLTrieRe(regExp, str) {
|
38
|
+
var ret = "";
|
39
|
+
var lastIdx = 0;
|
40
|
+
var match;
|
41
|
+
while ((match = regExp.exec(str)) !== null) {
|
42
|
+
var i = match.index;
|
43
|
+
ret += str.substring(lastIdx, i);
|
44
|
+
var char = str.charCodeAt(i);
|
45
|
+
var next = encode_html_js_1.default.get(char);
|
46
|
+
if (typeof next === "object") {
|
47
|
+
// We are in a branch. Try to match the next char.
|
48
|
+
if (i + 1 < str.length) {
|
49
|
+
var nextChar = str.charCodeAt(i + 1);
|
50
|
+
var value = typeof next.n === "number"
|
51
|
+
? next.n === nextChar
|
52
|
+
? next.o
|
53
|
+
: undefined
|
54
|
+
: next.n.get(nextChar);
|
55
|
+
if (value !== undefined) {
|
56
|
+
ret += value;
|
57
|
+
lastIdx = regExp.lastIndex += 1;
|
58
|
+
continue;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
next = next.v;
|
62
|
+
}
|
63
|
+
// We might have a tree node without a value; skip and use a numeric entity.
|
64
|
+
if (next !== undefined) {
|
65
|
+
ret += next;
|
66
|
+
lastIdx = i + 1;
|
67
|
+
}
|
68
|
+
else {
|
69
|
+
var cp = (0, escape_js_1.getCodePoint)(str, i);
|
70
|
+
ret += "&#x".concat(cp.toString(16), ";");
|
71
|
+
// Increase by 1 if we have a surrogate pair
|
72
|
+
lastIdx = regExp.lastIndex += Number(cp !== char);
|
73
|
+
}
|
74
|
+
}
|
75
|
+
return ret + str.substr(lastIdx);
|
76
|
+
}
|
77
|
+
//# sourceMappingURL=encode.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"encode.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["encode.ts"],"names":[],"mappings":";;;;;;AAAA,8EAAkD;AAClD,yCAAwD;AAExD,IAAM,YAAY,GAAG,qCAAqC,CAAC;AAE3D;;;;;;;;;;GAUG;AACH,SAAgB,UAAU,CAAC,IAAY;IACnC,OAAO,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;AAChD,CAAC;AAFD,gCAEC;AACD;;;;;;;GA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,CAAC,CAAC;SACjB;QAED,4EAA4E;QAC5E,IAAI,IAAI,KAAK,SAAS,EAAE;YACpB,GAAG,IAAI,IAAI,CAAC;YACZ,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;SACnB;aAAM;YACH,IAAM,EAAE,GAAG,IAAA,wBAAY,EAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YAChC,GAAG,IAAI,aAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAG,CAAC;YAChC,4CAA4C;YAC5C,OAAO,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC,CAAC;SACrD;KACJ;IAED,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC"}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
export declare const xmlReplacer: RegExp;
|
2
|
+
export declare const getCodePoint: (str: string, index: number) => number;
|
3
|
+
/**
|
4
|
+
* Encodes all non-ASCII characters, as well as characters not valid in XML
|
5
|
+
* documents using XML entities.
|
6
|
+
*
|
7
|
+
* If a character has no equivalent entity, a
|
8
|
+
* numeric hexadecimal reference (eg. `ü`) will be used.
|
9
|
+
*/
|
10
|
+
export declare function encodeXML(str: string): string;
|
11
|
+
/**
|
12
|
+
* Encodes all non-ASCII characters, as well as characters not valid in XML
|
13
|
+
* documents using numeric hexadecimal reference (eg. `ü`).
|
14
|
+
*
|
15
|
+
* Have a look at `escapeUTF8` if you want a more concise output at the expense
|
16
|
+
* of reduced transportability.
|
17
|
+
*
|
18
|
+
* @param data String to escape.
|
19
|
+
*/
|
20
|
+
export declare const escape: typeof encodeXML;
|
21
|
+
/**
|
22
|
+
* Encodes all characters not valid in XML documents using XML entities.
|
23
|
+
*
|
24
|
+
* Note that the output will be character-set dependent.
|
25
|
+
*
|
26
|
+
* @param data String to escape.
|
27
|
+
*/
|
28
|
+
export declare const escapeUTF8: (data: string) => string;
|
29
|
+
/**
|
30
|
+
* Encodes all characters that have to be escaped in HTML attributes,
|
31
|
+
* following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
|
32
|
+
*
|
33
|
+
* @param data String to escape.
|
34
|
+
*/
|
35
|
+
export declare const escapeAttribute: (data: string) => string;
|
36
|
+
/**
|
37
|
+
* Encodes all characters that have to be escaped in HTML text,
|
38
|
+
* following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
|
39
|
+
*
|
40
|
+
* @param data String to escape.
|
41
|
+
*/
|
42
|
+
export declare const escapeText: (data: string) => string;
|
43
|
+
//# sourceMappingURL=escape.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"escape.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["escape.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,QAAyB,CAAC;AAWlD,eAAO,MAAM,YAAY,QAGT,MAAM,SAAS,MAAM,KAAG,MAQD,CAAC;AAExC;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CA0B7C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,kBAAY,CAAC;AAqChC;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,SA7Bb,MAAM,KAAK,MA6BuC,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,eAAe,SArClB,MAAM,KAAK,MA4CpB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,SApDb,MAAM,KAAK,MA4DpB,CAAC"}
|
@@ -0,0 +1,122 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.escapeText = exports.escapeAttribute = exports.escapeUTF8 = exports.escape = exports.encodeXML = exports.getCodePoint = exports.xmlReplacer = void 0;
|
4
|
+
exports.xmlReplacer = /["&'<>$\x80-\uFFFF]/g;
|
5
|
+
var xmlCodeMap = new Map([
|
6
|
+
[34, """],
|
7
|
+
[38, "&"],
|
8
|
+
[39, "'"],
|
9
|
+
[60, "<"],
|
10
|
+
[62, ">"],
|
11
|
+
]);
|
12
|
+
// For compatibility with node < 4, we wrap `codePointAt`
|
13
|
+
exports.getCodePoint =
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
15
|
+
String.prototype.codePointAt != null
|
16
|
+
? function (str, index) { return str.codePointAt(index); }
|
17
|
+
: // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
|
18
|
+
function (c, index) {
|
19
|
+
return (c.charCodeAt(index) & 0xfc00) === 0xd800
|
20
|
+
? (c.charCodeAt(index) - 0xd800) * 0x400 +
|
21
|
+
c.charCodeAt(index + 1) -
|
22
|
+
0xdc00 +
|
23
|
+
0x10000
|
24
|
+
: c.charCodeAt(index);
|
25
|
+
};
|
26
|
+
/**
|
27
|
+
* Encodes all non-ASCII characters, as well as characters not valid in XML
|
28
|
+
* documents using XML entities.
|
29
|
+
*
|
30
|
+
* If a character has no equivalent entity, a
|
31
|
+
* numeric hexadecimal reference (eg. `ü`) will be used.
|
32
|
+
*/
|
33
|
+
function encodeXML(str) {
|
34
|
+
var ret = "";
|
35
|
+
var lastIdx = 0;
|
36
|
+
var match;
|
37
|
+
while ((match = exports.xmlReplacer.exec(str)) !== null) {
|
38
|
+
var i = match.index;
|
39
|
+
var char = str.charCodeAt(i);
|
40
|
+
var next = xmlCodeMap.get(char);
|
41
|
+
if (next !== undefined) {
|
42
|
+
ret += str.substring(lastIdx, i) + next;
|
43
|
+
lastIdx = i + 1;
|
44
|
+
}
|
45
|
+
else {
|
46
|
+
ret += "".concat(str.substring(lastIdx, i), "&#x").concat((0, exports.getCodePoint)(str, i).toString(16), ";");
|
47
|
+
// Increase by 1 if we have a surrogate pair
|
48
|
+
lastIdx = exports.xmlReplacer.lastIndex += Number((char & 0xfc00) === 0xd800);
|
49
|
+
}
|
50
|
+
}
|
51
|
+
return ret + str.substr(lastIdx);
|
52
|
+
}
|
53
|
+
exports.encodeXML = encodeXML;
|
54
|
+
/**
|
55
|
+
* Encodes all non-ASCII characters, as well as characters not valid in XML
|
56
|
+
* documents using numeric hexadecimal reference (eg. `ü`).
|
57
|
+
*
|
58
|
+
* Have a look at `escapeUTF8` if you want a more concise output at the expense
|
59
|
+
* of reduced transportability.
|
60
|
+
*
|
61
|
+
* @param data String to escape.
|
62
|
+
*/
|
63
|
+
exports.escape = encodeXML;
|
64
|
+
/**
|
65
|
+
* Creates a function that escapes all characters matched by the given regular
|
66
|
+
* expression using the given map of characters to escape to their entities.
|
67
|
+
*
|
68
|
+
* @param regex Regular expression to match characters to escape.
|
69
|
+
* @param map Map of characters to escape to their entities.
|
70
|
+
*
|
71
|
+
* @returns Function that escapes all characters matched by the given regular
|
72
|
+
* expression using the given map of characters to escape to their entities.
|
73
|
+
*/
|
74
|
+
function getEscaper(regex, map) {
|
75
|
+
return function escape(data) {
|
76
|
+
var match;
|
77
|
+
var lastIdx = 0;
|
78
|
+
var result = "";
|
79
|
+
while ((match = regex.exec(data))) {
|
80
|
+
if (lastIdx !== match.index) {
|
81
|
+
result += data.substring(lastIdx, match.index);
|
82
|
+
}
|
83
|
+
// We know that this character will be in the map.
|
84
|
+
result += map.get(match[0].charCodeAt(0));
|
85
|
+
// Every match will be of length 1
|
86
|
+
lastIdx = match.index + 1;
|
87
|
+
}
|
88
|
+
return result + data.substring(lastIdx);
|
89
|
+
};
|
90
|
+
}
|
91
|
+
/**
|
92
|
+
* Encodes all characters not valid in XML documents using XML entities.
|
93
|
+
*
|
94
|
+
* Note that the output will be character-set dependent.
|
95
|
+
*
|
96
|
+
* @param data String to escape.
|
97
|
+
*/
|
98
|
+
exports.escapeUTF8 = getEscaper(/[&<>'"]/g, xmlCodeMap);
|
99
|
+
/**
|
100
|
+
* Encodes all characters that have to be escaped in HTML attributes,
|
101
|
+
* following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
|
102
|
+
*
|
103
|
+
* @param data String to escape.
|
104
|
+
*/
|
105
|
+
exports.escapeAttribute = getEscaper(/["&\u00A0]/g, new Map([
|
106
|
+
[34, """],
|
107
|
+
[38, "&"],
|
108
|
+
[160, " "],
|
109
|
+
]));
|
110
|
+
/**
|
111
|
+
* Encodes all characters that have to be escaped in HTML text,
|
112
|
+
* following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
|
113
|
+
*
|
114
|
+
* @param data String to escape.
|
115
|
+
*/
|
116
|
+
exports.escapeText = getEscaper(/[&<>\u00A0]/g, new Map([
|
117
|
+
[38, "&"],
|
118
|
+
[60, "<"],
|
119
|
+
[62, ">"],
|
120
|
+
[160, " "],
|
121
|
+
]));
|
122
|
+
//# sourceMappingURL=escape.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"escape.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["escape.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG,sBAAsB,CAAC;AAElD,IAAM,UAAU,GAAG,IAAI,GAAG,CAAC;IACvB,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,OAAO,CAAC;IACb,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,yDAAyD;AAC5C,QAAA,YAAY;AACrB,uEAAuE;AACvE,MAAM,CAAC,SAAS,CAAC,WAAW,IAAI,IAAI;IAChC,CAAC,CAAC,UAAC,GAAW,EAAE,KAAa,IAAa,OAAA,GAAG,CAAC,WAAW,CAAC,KAAK,CAAE,EAAvB,CAAuB;IACjE,CAAC,CAAC,uEAAuE;QACvE,UAAC,CAAS,EAAE,KAAa;YACrB,OAAA,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KA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E,EAAE,MAAM,CAAC;IACZ,CAAC,GAAG,EAAE,QAAQ,CAAC;CAClB,CAAC,CACL,CAAC"}
|
@@ -0,0 +1,211 @@
|
|
1
|
+
import htmlDecodeTree from "./generated/decode-data-html.js";
|
2
|
+
import xmlDecodeTree from "./generated/decode-data-xml.js";
|
3
|
+
import decodeCodePoint from "./decode_codepoint.js";
|
4
|
+
export { htmlDecodeTree, xmlDecodeTree, decodeCodePoint };
|
5
|
+
export { replaceCodePoint, fromCodePoint } from "./decode_codepoint.js";
|
6
|
+
export declare enum BinTrieFlags {
|
7
|
+
VALUE_LENGTH = 49152,
|
8
|
+
BRANCH_LENGTH = 16256,
|
9
|
+
JUMP_TABLE = 127
|
10
|
+
}
|
11
|
+
export declare enum DecodingMode {
|
12
|
+
/** Entities in text nodes that can end with any character. */
|
13
|
+
Legacy = 0,
|
14
|
+
/** Only allow entities terminated with a semicolon. */
|
15
|
+
Strict = 1,
|
16
|
+
/** Entities in attributes have limitations on ending characters. */
|
17
|
+
Attribute = 2
|
18
|
+
}
|
19
|
+
/**
|
20
|
+
* Producers for character reference errors as defined in the HTML spec.
|
21
|
+
*/
|
22
|
+
export interface EntityErrorProducer {
|
23
|
+
missingSemicolonAfterCharacterReference(): void;
|
24
|
+
absenceOfDigitsInNumericCharacterReference(consumedCharacters: number): void;
|
25
|
+
validateNumericCharacterReference(code: number): void;
|
26
|
+
}
|
27
|
+
/**
|
28
|
+
* Token decoder with support of writing partial entities.
|
29
|
+
*/
|
30
|
+
export declare class EntityDecoder {
|
31
|
+
/** The tree used to decode entities. */
|
32
|
+
private readonly decodeTree;
|
33
|
+
/**
|
34
|
+
* The function that is called when a codepoint is decoded.
|
35
|
+
*
|
36
|
+
* For multi-byte named entities, this will be called multiple times,
|
37
|
+
* with the second codepoint, and the same `consumed` value.
|
38
|
+
*
|
39
|
+
* @param codepoint The decoded codepoint.
|
40
|
+
* @param consumed The number of bytes consumed by the decoder.
|
41
|
+
*/
|
42
|
+
private readonly emitCodePoint;
|
43
|
+
/** An object that is used to produce errors. */
|
44
|
+
private readonly errors?;
|
45
|
+
constructor(
|
46
|
+
/** The tree used to decode entities. */
|
47
|
+
decodeTree: Uint16Array,
|
48
|
+
/**
|
49
|
+
* The function that is called when a codepoint is decoded.
|
50
|
+
*
|
51
|
+
* For multi-byte named entities, this will be called multiple times,
|
52
|
+
* with the second codepoint, and the same `consumed` value.
|
53
|
+
*
|
54
|
+
* @param codepoint The decoded codepoint.
|
55
|
+
* @param consumed The number of bytes consumed by the decoder.
|
56
|
+
*/
|
57
|
+
emitCodePoint: (cp: number, consumed: number) => void,
|
58
|
+
/** An object that is used to produce errors. */
|
59
|
+
errors?: EntityErrorProducer | undefined);
|
60
|
+
/** The current state of the decoder. */
|
61
|
+
private state;
|
62
|
+
/** Characters that were consumed while parsing an entity. */
|
63
|
+
private consumed;
|
64
|
+
/**
|
65
|
+
* The result of the entity.
|
66
|
+
*
|
67
|
+
* Either the result index of a numeric entity, or the codepoint of a
|
68
|
+
* numeric entity.
|
69
|
+
*/
|
70
|
+
private result;
|
71
|
+
/** The current index in the decode tree. */
|
72
|
+
private treeIndex;
|
73
|
+
/** The number of characters that were consumed in excess. */
|
74
|
+
private excess;
|
75
|
+
/** The mode in which the decoder is operating. */
|
76
|
+
private decodeMode;
|
77
|
+
/** Resets the instance to make it reusable. */
|
78
|
+
startEntity(decodeMode: DecodingMode): void;
|
79
|
+
/**
|
80
|
+
* Write an entity to the decoder. This can be called multiple times with partial entities.
|
81
|
+
* If the entity is incomplete, the decoder will return -1.
|
82
|
+
*
|
83
|
+
* Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the
|
84
|
+
* entity is incomplete, and resume when the next string is written.
|
85
|
+
*
|
86
|
+
* @param string The string containing the entity (or a continuation of the entity).
|
87
|
+
* @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
|
88
|
+
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
89
|
+
*/
|
90
|
+
write(str: string, offset: number): number;
|
91
|
+
/**
|
92
|
+
* Switches between the numeric decimal and hexadecimal states.
|
93
|
+
*
|
94
|
+
* Equivalent to the `Numeric character reference state` in the HTML spec.
|
95
|
+
*
|
96
|
+
* @param str The string containing the entity (or a continuation of the entity).
|
97
|
+
* @param offset The current offset.
|
98
|
+
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
99
|
+
*/
|
100
|
+
private stateNumericStart;
|
101
|
+
private addToNumericResult;
|
102
|
+
/**
|
103
|
+
* Parses a hexadecimal numeric entity.
|
104
|
+
*
|
105
|
+
* Equivalent to the `Hexademical character reference state` in the HTML spec.
|
106
|
+
*
|
107
|
+
* @param str The string containing the entity (or a continuation of the entity).
|
108
|
+
* @param offset The current offset.
|
109
|
+
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
110
|
+
*/
|
111
|
+
private stateNumericHex;
|
112
|
+
/**
|
113
|
+
* Parses a decimal numeric entity.
|
114
|
+
*
|
115
|
+
* Equivalent to the `Decimal character reference state` in the HTML spec.
|
116
|
+
*
|
117
|
+
* @param str The string containing the entity (or a continuation of the entity).
|
118
|
+
* @param offset The current offset.
|
119
|
+
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
120
|
+
*/
|
121
|
+
private stateNumericDecimal;
|
122
|
+
/**
|
123
|
+
* Validate and emit a numeric entity.
|
124
|
+
*
|
125
|
+
* Implements the logic from the `Hexademical character reference start
|
126
|
+
* state` and `Numeric character reference end state` in the HTML spec.
|
127
|
+
*
|
128
|
+
* @param lastCp The last code point of the entity. Used to see if the
|
129
|
+
* entity was terminated with a semicolon.
|
130
|
+
* @param expectedLength The minimum number of characters that should be
|
131
|
+
* consumed. Used to validate that at least one digit
|
132
|
+
* was consumed.
|
133
|
+
* @returns The number of characters that were consumed.
|
134
|
+
*/
|
135
|
+
private emitNumericEntity;
|
136
|
+
/**
|
137
|
+
* Parses a named entity.
|
138
|
+
*
|
139
|
+
* Equivalent to the `Named character reference state` in the HTML spec.
|
140
|
+
*
|
141
|
+
* @param str The string containing the entity (or a continuation of the entity).
|
142
|
+
* @param offset The current offset.
|
143
|
+
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
144
|
+
*/
|
145
|
+
private stateNamedEntity;
|
146
|
+
/**
|
147
|
+
* Emit a named entity that was not terminated with a semicolon.
|
148
|
+
*
|
149
|
+
* @returns The number of characters consumed.
|
150
|
+
*/
|
151
|
+
private emitNotTerminatedNamedEntity;
|
152
|
+
/**
|
153
|
+
* Emit a named entity.
|
154
|
+
*
|
155
|
+
* @param result The index of the entity in the decode tree.
|
156
|
+
* @param valueLength The number of bytes in the entity.
|
157
|
+
* @param consumed The number of characters consumed.
|
158
|
+
*
|
159
|
+
* @returns The number of characters consumed.
|
160
|
+
*/
|
161
|
+
private emitNamedEntityData;
|
162
|
+
/**
|
163
|
+
* Signal to the parser that the end of the input was reached.
|
164
|
+
*
|
165
|
+
* Remaining data will be emitted and relevant errors will be produced.
|
166
|
+
*
|
167
|
+
* @returns The number of characters consumed.
|
168
|
+
*/
|
169
|
+
end(): number;
|
170
|
+
}
|
171
|
+
/**
|
172
|
+
* Determines the branch of the current node that is taken given the current
|
173
|
+
* character. This function is used to traverse the trie.
|
174
|
+
*
|
175
|
+
* @param decodeTree The trie.
|
176
|
+
* @param current The current node.
|
177
|
+
* @param nodeIdx The index right after the current node and its value.
|
178
|
+
* @param char The current character.
|
179
|
+
* @returns The index of the next node, or -1 if no branch is taken.
|
180
|
+
*/
|
181
|
+
export declare function determineBranch(decodeTree: Uint16Array, current: number, nodeIdx: number, char: number): number;
|
182
|
+
/**
|
183
|
+
* Decodes an HTML string.
|
184
|
+
*
|
185
|
+
* @param str The string to decode.
|
186
|
+
* @param mode The decoding mode.
|
187
|
+
* @returns The decoded string.
|
188
|
+
*/
|
189
|
+
export declare function decodeHTML(str: string, mode?: DecodingMode): string;
|
190
|
+
/**
|
191
|
+
* Decodes an HTML string in an attribute.
|
192
|
+
*
|
193
|
+
* @param str The string to decode.
|
194
|
+
* @returns The decoded string.
|
195
|
+
*/
|
196
|
+
export declare function decodeHTMLAttribute(str: string): string;
|
197
|
+
/**
|
198
|
+
* Decodes an HTML string, requiring all entities to be terminated by a semicolon.
|
199
|
+
*
|
200
|
+
* @param str The string to decode.
|
201
|
+
* @returns The decoded string.
|
202
|
+
*/
|
203
|
+
export declare function decodeHTMLStrict(str: string): string;
|
204
|
+
/**
|
205
|
+
* Decodes an XML string, requiring all entities to be terminated by a semicolon.
|
206
|
+
*
|
207
|
+
* @param str The string to decode.
|
208
|
+
* @returns The decoded string.
|
209
|
+
*/
|
210
|
+
export declare function decodeXML(str: string): string;
|
211
|
+
//# sourceMappingURL=decode.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"decode.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAC7D,OAAO,aAAa,MAAM,gCAAgC,CAAC;AAC3D,OAAO,eAGN,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAoBxE,oBAAY,YAAY;IACpB,YAAY,QAAwB;IACpC,aAAa,QAAwB;IACrC,UAAU,MAAwB;CACrC;AAuCD,oBAAY,YAAY;IACpB,8DAA8D;IAC9D,MAAM,IAAI;IACV,uDAAuD;IACvD,MAAM,IAAI;IACV,oEAAoE;IACpE,SAAS,IAAI;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,uCAAuC,IAAI,IAAI,CAAC;IAChD,0CAA0C,CACtC,kBAAkB,EAAE,MAAM,GAC3B,IAAI,CAAC;IACR,iCAAiC,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACzD;AAED;;GAEG;AACH,q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