@psnext/slingcli 2.4.20260520-2 → 2.4.20260520-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +5 -5
- package/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +23 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.js +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +557 -385
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js +13 -82
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +61 -144
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/utils.js +14 -36
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +234 -96
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js +85 -55
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js +101 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js +231 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js +42 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js +114 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js +39 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +3 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/uuid.js +50 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js +125 -73
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js +86 -8
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js +85 -56
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js +103 -18
- package/node_modules/@earendil-works/pi-agent-core/dist/index.js +4 -4
- package/node_modules/@earendil-works/pi-agent-core/dist/node.js +3 -0
- package/node_modules/@earendil-works/pi-agent-core/package.json +23 -10
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +11 -3
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +117 -353
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +35 -32
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +5 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +19 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +35 -4
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +24 -10
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-prompt-cache.js +10 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js +19 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/register-builtins.js +13 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js +6 -4
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/utils/node-http-proxy.js +97 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +3 -1
- package/node_modules/@earendil-works/pi-ai/package.json +15 -20
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/config-selector.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli.js +4 -6
- package/node_modules/@earendil-works/pi-coding-agent/dist/config.js +45 -22
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.js +4 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +127 -151
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/bash-executor.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.js +25 -15
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/export-html/template.js +17 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/http-dispatcher.js +48 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js +71 -33
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.js +6 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js +39 -9
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js +20 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/skills.js +2 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js +7 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/render-utils.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/index.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +7 -11
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/config-selector.js +7 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/countdown-timer.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/extension-editor.js +14 -6
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/extension-selector.js +6 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/footer.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +15 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +99 -17
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/dark.json +5 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/light.json +5 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.js +83 -41
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js +62 -7
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/ansi.js +52 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/child-process.js +9 -7
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/html.js +40 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/mime.js +59 -16
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/paths.js +16 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/shell.js +6 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/syntax-highlight.js +118 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/tools-manager.js +80 -8
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/version-check.js +9 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/windows-self-update.js +77 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/LICENSE +21 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Agent.md +84 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/BalancedPool.md +99 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/CacheStorage.md +30 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/CacheStore.md +164 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Client.md +287 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/ClientStats.md +27 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Connector.md +115 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/ContentType.md +57 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Cookies.md +101 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Debug.md +62 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +315 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Dispatcher.md +1427 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +159 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Errors.md +49 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/EventSource.md +45 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Fetch.md +60 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/GlobalInstallation.md +141 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/H2CClient.md +263 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/MockAgent.md +603 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/MockCallHistory.md +197 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +43 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/MockClient.md +81 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/MockErrors.md +12 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/MockPool.md +555 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Pool.md +84 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/PoolStats.md +35 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/ProxyAgent.md +229 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/RedirectHandler.md +98 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/RetryAgent.md +49 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/RetryHandler.md +116 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/RoundRobinPool.md +145 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/SnapshotAgent.md +639 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +274 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Util.md +25 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/WebSocket.md +141 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/api-lifecycle.md +91 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/best-practices/client-certificate.md +64 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/best-practices/crawling.md +58 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/best-practices/migrating-from-v7-to-v8.md +231 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/best-practices/mocking-request.md +190 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/best-practices/proxy.md +127 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +224 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/best-practices/writing-tests.md +63 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/index-fetch.js +65 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/index.js +236 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/abort-signal.js +59 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/api-connect.js +112 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/api-pipeline.js +265 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/api-request.js +238 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/api-stream.js +270 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/api-upgrade.js +121 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/index.js +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/readable.js +581 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/cache/memory-cache-store.js +234 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/cache/sqlite-cache-store.js +463 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/connect.js +153 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/constants.js +120 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/diagnostics.js +227 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/errors.js +477 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/request.js +535 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/socks5-client.js +422 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/socks5-utils.js +212 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/symbols.js +76 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/tree.js +160 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/util.js +1019 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/agent.js +172 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/balanced-pool.js +214 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client-h1.js +1669 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client-h2.js +1326 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client.js +666 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher-base.js +184 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher.js +44 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +107 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +146 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/fixed-queue.js +135 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/h2c-client.js +51 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/pool-base.js +232 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/pool.js +143 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/proxy-agent.js +343 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/retry-agent.js +35 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/round-robin-pool.js +159 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +264 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/encoding/index.js +33 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/global.js +62 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/cache-handler.js +586 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/cache-revalidation-handler.js +124 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/decorator-handler.js +66 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/deduplication-handler.js +460 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/redirect-handler.js +192 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/retry-handler.js +407 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/cache.js +508 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/decompress.js +285 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/deduplicate.js +117 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/dns.js +571 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/dump.js +112 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/redirect.js +21 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/response-error.js +95 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/retry.js +19 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/llhttp/constants.js +531 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/llhttp/llhttp-wasm.js +15 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +15 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/llhttp/utils.js +12 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-agent.js +232 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-call-history.js +248 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-client.js +68 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-errors.js +29 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-interceptor.js +209 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-pool.js +68 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-symbols.js +32 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-utils.js +501 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/pending-interceptors-formatter.js +43 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/snapshot-agent.js +363 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/snapshot-recorder.js +623 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/snapshot-utils.js +158 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/util/cache.js +408 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/util/date.js +653 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/util/runtime-features.js +93 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/util/stats.js +32 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/util/timers.js +425 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cache/cache.js +862 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cache/cachestorage.js +152 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cache/util.js +45 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cookies/constants.js +12 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cookies/index.js +199 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cookies/parse.js +322 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cookies/util.js +282 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/eventsource/eventsource-stream.js +494 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/eventsource/eventsource.js +501 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/eventsource/util.js +29 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/LICENSE +21 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/body.js +503 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/constants.js +131 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/data-url.js +596 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/formdata-parser.js +586 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/formdata.js +278 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/global.js +40 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/headers.js +719 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/index.js +2403 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/request.js +1115 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/response.js +641 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/util.js +1522 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/infra/index.js +229 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/subresource-integrity/Readme.md +9 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +307 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/webidl/index.js +1004 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/connection.js +329 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/constants.js +126 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/events.js +331 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/frame.js +127 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/permessage-deflate.js +100 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/receiver.js +490 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/sender.js +109 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/stream/websocketerror.js +104 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/stream/websocketstream.js +491 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/util.js +347 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/websocket.js +756 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/package.json +152 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/scripts/strip-comments.js +10 -0
- package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +1803 -0
- package/node_modules/@earendil-works/pi-coding-agent/package.json +34 -36
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js +27 -14
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js +4 -4
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +11 -5
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js +22 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +27 -15
- package/node_modules/@earendil-works/pi-tui/package.json +9 -12
- package/node_modules/cross-spawn/LICENSE +21 -0
- package/node_modules/cross-spawn/README.md +89 -0
- package/node_modules/cross-spawn/index.js +39 -0
- package/node_modules/cross-spawn/lib/enoent.js +59 -0
- package/node_modules/cross-spawn/lib/parse.js +91 -0
- package/node_modules/cross-spawn/lib/util/escape.js +47 -0
- package/node_modules/cross-spawn/lib/util/readShebang.js +23 -0
- package/node_modules/cross-spawn/lib/util/resolveCommand.js +52 -0
- package/node_modules/cross-spawn/package.json +73 -0
- package/node_modules/isexe/.npmignore +2 -0
- package/node_modules/isexe/README.md +51 -0
- package/node_modules/isexe/index.js +57 -0
- package/node_modules/isexe/mode.js +41 -0
- package/node_modules/isexe/package.json +31 -0
- package/node_modules/isexe/test/basic.js +221 -0
- package/node_modules/isexe/windows.js +42 -0
- package/node_modules/path-key/index.d.ts +40 -0
- package/node_modules/path-key/index.js +16 -0
- package/node_modules/path-key/package.json +39 -0
- package/node_modules/path-key/readme.md +61 -0
- package/node_modules/shebang-command/index.js +19 -0
- package/node_modules/shebang-command/license +9 -0
- package/node_modules/shebang-command/package.json +34 -0
- package/node_modules/shebang-command/readme.md +34 -0
- package/node_modules/shebang-regex/index.d.ts +22 -0
- package/node_modules/shebang-regex/index.js +2 -0
- package/node_modules/shebang-regex/package.json +35 -0
- package/node_modules/shebang-regex/readme.md +33 -0
- package/node_modules/which/README.md +54 -0
- package/node_modules/which/bin/node-which +52 -0
- package/node_modules/which/package.json +43 -0
- package/node_modules/which/which.js +125 -0
- package/package.json +6 -6
- package/slingshot/index.js +259 -255
- package/node_modules/@borewit/text-codec/LICENSE.txt +0 -9
- package/node_modules/@borewit/text-codec/README.md +0 -87
- package/node_modules/@borewit/text-codec/lib/index.d.ts +0 -6
- package/node_modules/@borewit/text-codec/lib/index.js +0 -380
- package/node_modules/@borewit/text-codec/package.json +0 -70
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.js +0 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.js +0 -92
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.js +0 -42
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.js +0 -31
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.js +0 -170
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.js +0 -90
- package/node_modules/@tokenizer/inflate/LICENSE +0 -15
- package/node_modules/@tokenizer/inflate/README.md +0 -114
- package/node_modules/@tokenizer/inflate/lib/GzipHandler.d.ts +0 -6
- package/node_modules/@tokenizer/inflate/lib/GzipHandler.js +0 -19
- package/node_modules/@tokenizer/inflate/lib/ZipHandler.d.ts +0 -26
- package/node_modules/@tokenizer/inflate/lib/ZipHandler.js +0 -233
- package/node_modules/@tokenizer/inflate/lib/ZipToken.d.ts +0 -94
- package/node_modules/@tokenizer/inflate/lib/ZipToken.js +0 -117
- package/node_modules/@tokenizer/inflate/lib/index.d.ts +0 -3
- package/node_modules/@tokenizer/inflate/lib/index.js +0 -2
- package/node_modules/@tokenizer/inflate/package.json +0 -76
- package/node_modules/@tokenizer/token/README.md +0 -19
- package/node_modules/@tokenizer/token/index.d.ts +0 -30
- package/node_modules/@tokenizer/token/package.json +0 -33
- package/node_modules/@tootallnate/quickjs-emscripten/LICENSE +0 -21
- package/node_modules/@tootallnate/quickjs-emscripten/README.md +0 -597
- package/node_modules/@tootallnate/quickjs-emscripten/c/interface.c +0 -819
- package/node_modules/@tootallnate/quickjs-emscripten/dist/asyncify-helpers.d.ts +0 -24
- package/node_modules/@tootallnate/quickjs-emscripten/dist/asyncify-helpers.js +0 -53
- package/node_modules/@tootallnate/quickjs-emscripten/dist/asyncify-helpers.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/context-asyncify.d.ts +0 -48
- package/node_modules/@tootallnate/quickjs-emscripten/dist/context-asyncify.js +0 -58
- package/node_modules/@tootallnate/quickjs-emscripten/dist/context-asyncify.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/context.d.ts +0 -371
- package/node_modules/@tootallnate/quickjs-emscripten/dist/context.js +0 -691
- package/node_modules/@tootallnate/quickjs-emscripten/dist/context.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/debug.d.ts +0 -5
- package/node_modules/@tootallnate/quickjs-emscripten/dist/debug.js +0 -6
- package/node_modules/@tootallnate/quickjs-emscripten/dist/debug.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/deferred-promise.d.ts +0 -75
- package/node_modules/@tootallnate/quickjs-emscripten/dist/deferred-promise.js +0 -96
- package/node_modules/@tootallnate/quickjs-emscripten/dist/deferred-promise.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/emscripten-types.d.ts +0 -97
- package/node_modules/@tootallnate/quickjs-emscripten/dist/emscripten-types.js +0 -15
- package/node_modules/@tootallnate/quickjs-emscripten/dist/emscripten-types.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/errors.d.ts +0 -28
- package/node_modules/@tootallnate/quickjs-emscripten/dist/errors.js +0 -58
- package/node_modules/@tootallnate/quickjs-emscripten/dist/errors.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/esmHelpers.d.ts +0 -9
- package/node_modules/@tootallnate/quickjs-emscripten/dist/esmHelpers.js +0 -19
- package/node_modules/@tootallnate/quickjs-emscripten/dist/esmHelpers.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/generated/emscripten-module.WASM_RELEASE_SYNC.d.ts +0 -5
- package/node_modules/@tootallnate/quickjs-emscripten/dist/generated/emscripten-module.WASM_RELEASE_SYNC.js +0 -387
- package/node_modules/@tootallnate/quickjs-emscripten/dist/generated/emscripten-module.WASM_RELEASE_SYNC.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/generated/ffi.WASM_RELEASE_SYNC.d.ts +0 -67
- package/node_modules/@tootallnate/quickjs-emscripten/dist/generated/ffi.WASM_RELEASE_SYNC.js +0 -71
- package/node_modules/@tootallnate/quickjs-emscripten/dist/generated/ffi.WASM_RELEASE_SYNC.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/index.d.ts +0 -75
- package/node_modules/@tootallnate/quickjs-emscripten/dist/index.js +0 -128
- package/node_modules/@tootallnate/quickjs-emscripten/dist/index.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/lifetime.d.ts +0 -115
- package/node_modules/@tootallnate/quickjs-emscripten/dist/lifetime.js +0 -227
- package/node_modules/@tootallnate/quickjs-emscripten/dist/lifetime.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/memory.d.ts +0 -18
- package/node_modules/@tootallnate/quickjs-emscripten/dist/memory.js +0 -41
- package/node_modules/@tootallnate/quickjs-emscripten/dist/memory.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/module-asyncify.d.ts +0 -53
- package/node_modules/@tootallnate/quickjs-emscripten/dist/module-asyncify.js +0 -97
- package/node_modules/@tootallnate/quickjs-emscripten/dist/module-asyncify.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/module-test.d.ts +0 -27
- package/node_modules/@tootallnate/quickjs-emscripten/dist/module-test.js +0 -77
- package/node_modules/@tootallnate/quickjs-emscripten/dist/module-test.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/module.d.ts +0 -152
- package/node_modules/@tootallnate/quickjs-emscripten/dist/module.js +0 -302
- package/node_modules/@tootallnate/quickjs-emscripten/dist/module.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/runtime-asyncify.d.ts +0 -38
- package/node_modules/@tootallnate/quickjs-emscripten/dist/runtime-asyncify.js +0 -49
- package/node_modules/@tootallnate/quickjs-emscripten/dist/runtime-asyncify.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/runtime.d.ts +0 -174
- package/node_modules/@tootallnate/quickjs-emscripten/dist/runtime.js +0 -300
- package/node_modules/@tootallnate/quickjs-emscripten/dist/runtime.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/types-ffi.d.ts +0 -114
- package/node_modules/@tootallnate/quickjs-emscripten/dist/types-ffi.js +0 -38
- package/node_modules/@tootallnate/quickjs-emscripten/dist/types-ffi.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/types.d.ts +0 -158
- package/node_modules/@tootallnate/quickjs-emscripten/dist/types.js +0 -58
- package/node_modules/@tootallnate/quickjs-emscripten/dist/types.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/variants.d.ts +0 -113
- package/node_modules/@tootallnate/quickjs-emscripten/dist/variants.js +0 -169
- package/node_modules/@tootallnate/quickjs-emscripten/dist/variants.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/vm-interface.d.ts +0 -68
- package/node_modules/@tootallnate/quickjs-emscripten/dist/vm-interface.js +0 -12
- package/node_modules/@tootallnate/quickjs-emscripten/dist/vm-interface.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/package.json +0 -60
- package/node_modules/@types/mime-types/LICENSE +0 -21
- package/node_modules/@types/mime-types/README.md +0 -28
- package/node_modules/@types/mime-types/index.d.ts +0 -9
- package/node_modules/@types/mime-types/package.json +0 -25
- package/node_modules/@types/yauzl/LICENSE +0 -21
- package/node_modules/@types/yauzl/README.md +0 -15
- package/node_modules/@types/yauzl/index.d.ts +0 -110
- package/node_modules/@types/yauzl/package.json +0 -27
- package/node_modules/ansi-regex/index.d.ts +0 -33
- package/node_modules/ansi-regex/index.js +0 -14
- package/node_modules/ansi-regex/license +0 -9
- package/node_modules/ansi-regex/package.json +0 -61
- package/node_modules/ansi-regex/readme.md +0 -66
- package/node_modules/ansi-styles/index.d.ts +0 -345
- package/node_modules/ansi-styles/index.js +0 -163
- package/node_modules/ansi-styles/package.json +0 -56
- package/node_modules/ansi-styles/readme.md +0 -152
- package/node_modules/any-promise/.jshintrc +0 -4
- package/node_modules/any-promise/.npmignore +0 -7
- package/node_modules/any-promise/LICENSE +0 -19
- package/node_modules/any-promise/README.md +0 -161
- package/node_modules/any-promise/implementation.d.ts +0 -3
- package/node_modules/any-promise/implementation.js +0 -1
- package/node_modules/any-promise/index.d.ts +0 -73
- package/node_modules/any-promise/index.js +0 -1
- package/node_modules/any-promise/loader.js +0 -78
- package/node_modules/any-promise/optional.js +0 -6
- package/node_modules/any-promise/package.json +0 -45
- package/node_modules/any-promise/register/bluebird.d.ts +0 -1
- package/node_modules/any-promise/register/bluebird.js +0 -2
- package/node_modules/any-promise/register/es6-promise.d.ts +0 -1
- package/node_modules/any-promise/register/es6-promise.js +0 -2
- package/node_modules/any-promise/register/lie.d.ts +0 -1
- package/node_modules/any-promise/register/lie.js +0 -2
- package/node_modules/any-promise/register/native-promise-only.d.ts +0 -1
- package/node_modules/any-promise/register/native-promise-only.js +0 -2
- package/node_modules/any-promise/register/pinkie.d.ts +0 -1
- package/node_modules/any-promise/register/pinkie.js +0 -2
- package/node_modules/any-promise/register/promise.d.ts +0 -1
- package/node_modules/any-promise/register/promise.js +0 -2
- package/node_modules/any-promise/register/q.d.ts +0 -1
- package/node_modules/any-promise/register/q.js +0 -2
- package/node_modules/any-promise/register/rsvp.d.ts +0 -1
- package/node_modules/any-promise/register/rsvp.js +0 -2
- package/node_modules/any-promise/register/vow.d.ts +0 -1
- package/node_modules/any-promise/register/vow.js +0 -2
- package/node_modules/any-promise/register/when.d.ts +0 -1
- package/node_modules/any-promise/register/when.js +0 -2
- package/node_modules/any-promise/register-shim.js +0 -18
- package/node_modules/any-promise/register.d.ts +0 -17
- package/node_modules/any-promise/register.js +0 -94
- package/node_modules/ast-types/.github/dependabot.yml +0 -9
- package/node_modules/ast-types/.github/workflows/main.yml +0 -29
- package/node_modules/ast-types/LICENSE +0 -20
- package/node_modules/ast-types/README.md +0 -512
- package/node_modules/ast-types/def/babel-core.d.ts +0 -2
- package/node_modules/ast-types/def/babel-core.js +0 -256
- package/node_modules/ast-types/def/babel.d.ts +0 -2
- package/node_modules/ast-types/def/babel.js +0 -11
- package/node_modules/ast-types/def/core.d.ts +0 -2
- package/node_modules/ast-types/def/core.js +0 -298
- package/node_modules/ast-types/def/es-proposals.d.ts +0 -2
- package/node_modules/ast-types/def/es-proposals.js +0 -33
- package/node_modules/ast-types/def/es2020.d.ts +0 -2
- package/node_modules/ast-types/def/es2020.js +0 -16
- package/node_modules/ast-types/def/es6.d.ts +0 -2
- package/node_modules/ast-types/def/es6.js +0 -210
- package/node_modules/ast-types/def/es7.d.ts +0 -2
- package/node_modules/ast-types/def/es7.js +0 -34
- package/node_modules/ast-types/def/esprima.d.ts +0 -2
- package/node_modules/ast-types/def/esprima.js +0 -49
- package/node_modules/ast-types/def/flow.d.ts +0 -2
- package/node_modules/ast-types/def/flow.js +0 -292
- package/node_modules/ast-types/def/jsx.d.ts +0 -2
- package/node_modules/ast-types/def/jsx.js +0 -103
- package/node_modules/ast-types/def/type-annotations.d.ts +0 -7
- package/node_modules/ast-types/def/type-annotations.js +0 -40
- package/node_modules/ast-types/def/typescript.d.ts +0 -2
- package/node_modules/ast-types/def/typescript.js +0 -344
- package/node_modules/ast-types/fork.d.ts +0 -42
- package/node_modules/ast-types/fork.js +0 -52
- package/node_modules/ast-types/gen/builders.d.ts +0 -2584
- package/node_modules/ast-types/gen/builders.js +0 -2
- package/node_modules/ast-types/gen/kinds.d.ts +0 -264
- package/node_modules/ast-types/gen/kinds.js +0 -2
- package/node_modules/ast-types/gen/namedTypes.d.ts +0 -1809
- package/node_modules/ast-types/gen/namedTypes.js +0 -6
- package/node_modules/ast-types/gen/visitor.d.ts +0 -268
- package/node_modules/ast-types/gen/visitor.js +0 -2
- package/node_modules/ast-types/lib/equiv.d.ts +0 -5
- package/node_modules/ast-types/lib/equiv.js +0 -154
- package/node_modules/ast-types/lib/node-path.d.ts +0 -22
- package/node_modules/ast-types/lib/node-path.js +0 -411
- package/node_modules/ast-types/lib/path-visitor.d.ts +0 -52
- package/node_modules/ast-types/lib/path-visitor.js +0 -343
- package/node_modules/ast-types/lib/path.d.ts +0 -25
- package/node_modules/ast-types/lib/path.js +0 -331
- package/node_modules/ast-types/lib/scope.d.ts +0 -26
- package/node_modules/ast-types/lib/scope.js +0 -318
- package/node_modules/ast-types/lib/shared.d.ts +0 -13
- package/node_modules/ast-types/lib/shared.js +0 -47
- package/node_modules/ast-types/lib/types.d.ts +0 -136
- package/node_modules/ast-types/lib/types.js +0 -780
- package/node_modules/ast-types/main.d.ts +0 -28
- package/node_modules/ast-types/main.js +0 -53
- package/node_modules/ast-types/package.json +0 -65
- package/node_modules/ast-types/tsconfig.json +0 -21
- package/node_modules/ast-types/types.d.ts +0 -6
- package/node_modules/ast-types/types.js +0 -2
- package/node_modules/basic-ftp/LICENSE.txt +0 -19
- package/node_modules/basic-ftp/README.md +0 -244
- package/node_modules/basic-ftp/dist/Client.d.ts +0 -340
- package/node_modules/basic-ftp/dist/Client.js +0 -785
- package/node_modules/basic-ftp/dist/FileInfo.d.ts +0 -80
- package/node_modules/basic-ftp/dist/FileInfo.js +0 -92
- package/node_modules/basic-ftp/dist/FtpContext.d.ts +0 -175
- package/node_modules/basic-ftp/dist/FtpContext.js +0 -375
- package/node_modules/basic-ftp/dist/ProgressTracker.d.ts +0 -45
- package/node_modules/basic-ftp/dist/ProgressTracker.js +0 -72
- package/node_modules/basic-ftp/dist/StringEncoding.d.ts +0 -1
- package/node_modules/basic-ftp/dist/StringEncoding.js +0 -2
- package/node_modules/basic-ftp/dist/StringWriter.d.ts +0 -10
- package/node_modules/basic-ftp/dist/StringWriter.js +0 -29
- package/node_modules/basic-ftp/dist/index.d.ts +0 -9
- package/node_modules/basic-ftp/dist/index.js +0 -28
- package/node_modules/basic-ftp/dist/netUtils.d.ts +0 -21
- package/node_modules/basic-ftp/dist/netUtils.js +0 -66
- package/node_modules/basic-ftp/dist/parseControlResponse.d.ts +0 -22
- package/node_modules/basic-ftp/dist/parseControlResponse.js +0 -66
- package/node_modules/basic-ftp/dist/parseList.d.ts +0 -5
- package/node_modules/basic-ftp/dist/parseList.js +0 -79
- package/node_modules/basic-ftp/dist/parseListDOS.d.ts +0 -12
- package/node_modules/basic-ftp/dist/parseListDOS.js +0 -52
- package/node_modules/basic-ftp/dist/parseListMLSD.d.ts +0 -20
- package/node_modules/basic-ftp/dist/parseListMLSD.js +0 -187
- package/node_modules/basic-ftp/dist/parseListUnix.d.ts +0 -12
- package/node_modules/basic-ftp/dist/parseListUnix.js +0 -155
- package/node_modules/basic-ftp/dist/transfer.d.ts +0 -39
- package/node_modules/basic-ftp/dist/transfer.js +0 -318
- package/node_modules/basic-ftp/package.json +0 -52
- package/node_modules/buffer-crc32/LICENSE +0 -19
- package/node_modules/buffer-crc32/README.md +0 -47
- package/node_modules/buffer-crc32/index.js +0 -111
- package/node_modules/buffer-crc32/package.json +0 -39
- package/node_modules/cli-highlight/LICENSE.txt +0 -15
- package/node_modules/cli-highlight/README.md +0 -88
- package/node_modules/cli-highlight/bin/highlight +0 -2
- package/node_modules/cli-highlight/dist/cli.d.ts +0 -1
- package/node_modules/cli-highlight/dist/cli.js +0 -102
- package/node_modules/cli-highlight/dist/cli.js.map +0 -1
- package/node_modules/cli-highlight/dist/index.d.ts +0 -53
- package/node_modules/cli-highlight/dist/index.js +0 -112
- package/node_modules/cli-highlight/dist/index.js.map +0 -1
- package/node_modules/cli-highlight/dist/test/test.d.ts +0 -1
- package/node_modules/cli-highlight/dist/test/test.js +0 -62
- package/node_modules/cli-highlight/dist/test/test.js.map +0 -1
- package/node_modules/cli-highlight/dist/theme.d.ts +0 -270
- package/node_modules/cli-highlight/dist/theme.js +0 -265
- package/node_modules/cli-highlight/dist/theme.js.map +0 -1
- package/node_modules/cli-highlight/node_modules/chalk/index.d.ts +0 -415
- package/node_modules/cli-highlight/node_modules/chalk/package.json +0 -68
- package/node_modules/cli-highlight/node_modules/chalk/readme.md +0 -341
- package/node_modules/cli-highlight/node_modules/chalk/source/index.js +0 -229
- package/node_modules/cli-highlight/node_modules/chalk/source/templates.js +0 -134
- package/node_modules/cli-highlight/node_modules/chalk/source/util.js +0 -39
- package/node_modules/cli-highlight/package.json +0 -129
- package/node_modules/cliui/LICENSE.txt +0 -14
- package/node_modules/cliui/README.md +0 -141
- package/node_modules/cliui/build/index.cjs +0 -302
- package/node_modules/cliui/build/lib/index.js +0 -287
- package/node_modules/cliui/build/lib/string-utils.js +0 -27
- package/node_modules/cliui/index.mjs +0 -13
- package/node_modules/cliui/node_modules/ansi-regex/index.d.ts +0 -37
- package/node_modules/cliui/node_modules/ansi-regex/index.js +0 -10
- package/node_modules/cliui/node_modules/ansi-regex/license +0 -9
- package/node_modules/cliui/node_modules/ansi-regex/package.json +0 -55
- package/node_modules/cliui/node_modules/ansi-regex/readme.md +0 -78
- package/node_modules/cliui/node_modules/strip-ansi/index.d.ts +0 -17
- package/node_modules/cliui/node_modules/strip-ansi/index.js +0 -4
- package/node_modules/cliui/node_modules/strip-ansi/license +0 -9
- package/node_modules/cliui/node_modules/strip-ansi/package.json +0 -54
- package/node_modules/cliui/node_modules/strip-ansi/readme.md +0 -46
- package/node_modules/cliui/package.json +0 -83
- package/node_modules/color-convert/LICENSE +0 -21
- package/node_modules/color-convert/README.md +0 -68
- package/node_modules/color-convert/conversions.js +0 -839
- package/node_modules/color-convert/index.js +0 -81
- package/node_modules/color-convert/package.json +0 -48
- package/node_modules/color-convert/route.js +0 -97
- package/node_modules/color-name/LICENSE +0 -8
- package/node_modules/color-name/README.md +0 -11
- package/node_modules/color-name/index.js +0 -152
- package/node_modules/color-name/package.json +0 -28
- package/node_modules/degenerator/README.md +0 -117
- package/node_modules/degenerator/dist/compile.d.ts +0 -11
- package/node_modules/degenerator/dist/compile.d.ts.map +0 -1
- package/node_modules/degenerator/dist/compile.js +0 -107
- package/node_modules/degenerator/dist/compile.js.map +0 -1
- package/node_modules/degenerator/dist/degenerator.d.ts +0 -12
- package/node_modules/degenerator/dist/degenerator.d.ts.map +0 -1
- package/node_modules/degenerator/dist/degenerator.js +0 -156
- package/node_modules/degenerator/dist/degenerator.js.map +0 -1
- package/node_modules/degenerator/dist/index.d.ts +0 -3
- package/node_modules/degenerator/dist/index.d.ts.map +0 -1
- package/node_modules/degenerator/dist/index.js +0 -19
- package/node_modules/degenerator/dist/index.js.map +0 -1
- package/node_modules/degenerator/package.json +0 -42
- package/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
- package/node_modules/emoji-regex/README.md +0 -73
- package/node_modules/emoji-regex/es2015/index.js +0 -6
- package/node_modules/emoji-regex/es2015/text.js +0 -6
- package/node_modules/emoji-regex/index.d.ts +0 -23
- package/node_modules/emoji-regex/index.js +0 -6
- package/node_modules/emoji-regex/package.json +0 -50
- package/node_modules/emoji-regex/text.js +0 -6
- package/node_modules/end-of-stream/LICENSE +0 -21
- package/node_modules/end-of-stream/README.md +0 -54
- package/node_modules/end-of-stream/index.js +0 -96
- package/node_modules/end-of-stream/package.json +0 -37
- package/node_modules/escalade/dist/index.js +0 -22
- package/node_modules/escalade/dist/index.mjs +0 -22
- package/node_modules/escalade/index.d.mts +0 -11
- package/node_modules/escalade/index.d.ts +0 -15
- package/node_modules/escalade/license +0 -9
- package/node_modules/escalade/package.json +0 -74
- package/node_modules/escalade/readme.md +0 -211
- package/node_modules/escalade/sync/index.d.mts +0 -9
- package/node_modules/escalade/sync/index.d.ts +0 -13
- package/node_modules/escalade/sync/index.js +0 -18
- package/node_modules/escalade/sync/index.mjs +0 -18
- package/node_modules/escodegen/LICENSE.BSD +0 -21
- package/node_modules/escodegen/README.md +0 -84
- package/node_modules/escodegen/bin/escodegen.js +0 -77
- package/node_modules/escodegen/bin/esgenerate.js +0 -64
- package/node_modules/escodegen/escodegen.js +0 -2667
- package/node_modules/escodegen/package.json +0 -63
- package/node_modules/esprima/LICENSE.BSD +0 -21
- package/node_modules/esprima/README.md +0 -46
- package/node_modules/esprima/bin/esparse.js +0 -139
- package/node_modules/esprima/bin/esvalidate.js +0 -236
- package/node_modules/esprima/dist/esprima.js +0 -6709
- package/node_modules/esprima/package.json +0 -112
- package/node_modules/estraverse/.jshintrc +0 -16
- package/node_modules/estraverse/LICENSE.BSD +0 -19
- package/node_modules/estraverse/README.md +0 -153
- package/node_modules/estraverse/estraverse.js +0 -805
- package/node_modules/estraverse/gulpfile.js +0 -70
- package/node_modules/estraverse/package.json +0 -40
- package/node_modules/esutils/LICENSE.BSD +0 -19
- package/node_modules/esutils/README.md +0 -174
- package/node_modules/esutils/lib/ast.js +0 -144
- package/node_modules/esutils/lib/code.js +0 -135
- package/node_modules/esutils/lib/keyword.js +0 -165
- package/node_modules/esutils/lib/utils.js +0 -33
- package/node_modules/esutils/package.json +0 -44
- package/node_modules/extract-zip/LICENSE +0 -23
- package/node_modules/extract-zip/cli.js +0 -19
- package/node_modules/extract-zip/index.d.ts +0 -21
- package/node_modules/extract-zip/index.js +0 -173
- package/node_modules/extract-zip/package.json +0 -80
- package/node_modules/extract-zip/readme.md +0 -57
- package/node_modules/fd-slicer/.npmignore +0 -2
- package/node_modules/fd-slicer/.travis.yml +0 -7
- package/node_modules/fd-slicer/CHANGELOG.md +0 -49
- package/node_modules/fd-slicer/LICENSE +0 -21
- package/node_modules/fd-slicer/README.md +0 -199
- package/node_modules/fd-slicer/index.js +0 -296
- package/node_modules/fd-slicer/package.json +0 -36
- package/node_modules/fd-slicer/test/test.js +0 -350
- package/node_modules/file-type/core.d.ts +0 -253
- package/node_modules/file-type/core.js +0 -2899
- package/node_modules/file-type/index.d.ts +0 -98
- package/node_modules/file-type/index.js +0 -163
- package/node_modules/file-type/license +0 -9
- package/node_modules/file-type/package.json +0 -290
- package/node_modules/file-type/readme.md +0 -667
- package/node_modules/file-type/supported.js +0 -360
- package/node_modules/file-type/util.js +0 -60
- package/node_modules/get-caller-file/LICENSE.md +0 -6
- package/node_modules/get-caller-file/README.md +0 -41
- package/node_modules/get-caller-file/index.d.ts +0 -2
- package/node_modules/get-caller-file/index.js +0 -22
- package/node_modules/get-caller-file/index.js.map +0 -1
- package/node_modules/get-caller-file/package.json +0 -42
- package/node_modules/get-stream/buffer-stream.js +0 -52
- package/node_modules/get-stream/index.d.ts +0 -108
- package/node_modules/get-stream/index.js +0 -60
- package/node_modules/get-stream/license +0 -9
- package/node_modules/get-stream/package.json +0 -50
- package/node_modules/get-stream/readme.md +0 -124
- package/node_modules/get-uri/LICENSE +0 -22
- package/node_modules/get-uri/README.md +0 -109
- package/node_modules/get-uri/dist/data.d.ts +0 -16
- package/node_modules/get-uri/dist/data.js +0 -43
- package/node_modules/get-uri/dist/data.js.map +0 -1
- package/node_modules/get-uri/dist/file.d.ts +0 -17
- package/node_modules/get-uri/dist/file.js +0 -57
- package/node_modules/get-uri/dist/file.js.map +0 -1
- package/node_modules/get-uri/dist/ftp.d.ts +0 -14
- package/node_modules/get-uri/dist/ftp.js +0 -93
- package/node_modules/get-uri/dist/ftp.js.map +0 -1
- package/node_modules/get-uri/dist/http-error.d.ts +0 -8
- package/node_modules/get-uri/dist/http-error.js +0 -15
- package/node_modules/get-uri/dist/http-error.js.map +0 -1
- package/node_modules/get-uri/dist/http.d.ts +0 -29
- package/node_modules/get-uri/dist/http.js +0 -191
- package/node_modules/get-uri/dist/http.js.map +0 -1
- package/node_modules/get-uri/dist/https.d.ts +0 -6
- package/node_modules/get-uri/dist/https.js +0 -16
- package/node_modules/get-uri/dist/https.js.map +0 -1
- package/node_modules/get-uri/dist/index.d.ts +0 -37
- package/node_modules/get-uri/dist/index.js +0 -57
- package/node_modules/get-uri/dist/index.js.map +0 -1
- package/node_modules/get-uri/dist/notfound.d.ts +0 -10
- package/node_modules/get-uri/dist/notfound.js +0 -16
- package/node_modules/get-uri/dist/notfound.js.map +0 -1
- package/node_modules/get-uri/dist/notmodified.d.ts +0 -10
- package/node_modules/get-uri/dist/notmodified.js +0 -17
- package/node_modules/get-uri/dist/notmodified.js.map +0 -1
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/LICENSE +0 -22
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/README.md +0 -61
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/dist/common.d.ts +0 -17
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/dist/common.d.ts.map +0 -1
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/dist/common.js +0 -54
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/dist/common.js.map +0 -1
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/dist/index.d.ts +0 -8
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/dist/index.d.ts.map +0 -1
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/dist/index.js +0 -48
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/dist/index.js.map +0 -1
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/dist/node.d.ts +0 -8
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/dist/node.d.ts.map +0 -1
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/dist/node.js +0 -26
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/dist/node.js.map +0 -1
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/package.json +0 -48
- package/node_modules/get-uri/package.json +0 -58
- package/node_modules/has-flag/index.d.ts +0 -39
- package/node_modules/has-flag/index.js +0 -8
- package/node_modules/has-flag/license +0 -9
- package/node_modules/has-flag/package.json +0 -46
- package/node_modules/has-flag/readme.md +0 -89
- package/node_modules/ieee754/LICENSE +0 -11
- package/node_modules/ieee754/README.md +0 -51
- package/node_modules/ieee754/index.d.ts +0 -10
- package/node_modules/ieee754/index.js +0 -85
- package/node_modules/ieee754/package.json +0 -52
- package/node_modules/ip-address/LICENSE +0 -19
- package/node_modules/ip-address/README.md +0 -278
- package/node_modules/ip-address/dist/address-error.d.ts +0 -4
- package/node_modules/ip-address/dist/address-error.js +0 -12
- package/node_modules/ip-address/dist/address-error.js.map +0 -1
- package/node_modules/ip-address/dist/common.d.ts +0 -20
- package/node_modules/ip-address/dist/common.js +0 -67
- package/node_modules/ip-address/dist/common.js.map +0 -1
- package/node_modules/ip-address/dist/ip-address.d.ts +0 -7
- package/node_modules/ip-address/dist/ip-address.js +0 -35
- package/node_modules/ip-address/dist/ip-address.js.map +0 -1
- package/node_modules/ip-address/dist/ipv4.d.ts +0 -267
- package/node_modules/ip-address/dist/ipv4.js +0 -485
- package/node_modules/ip-address/dist/ipv4.js.map +0 -1
- package/node_modules/ip-address/dist/ipv6.d.ts +0 -489
- package/node_modules/ip-address/dist/ipv6.js +0 -1217
- package/node_modules/ip-address/dist/ipv6.js.map +0 -1
- package/node_modules/ip-address/dist/v4/constants.d.ts +0 -4
- package/node_modules/ip-address/dist/v4/constants.js +0 -8
- package/node_modules/ip-address/dist/v4/constants.js.map +0 -1
- package/node_modules/ip-address/dist/v6/constants.d.ts +0 -44
- package/node_modules/ip-address/dist/v6/constants.js +0 -81
- package/node_modules/ip-address/dist/v6/constants.js.map +0 -1
- package/node_modules/ip-address/dist/v6/helpers.d.ts +0 -18
- package/node_modules/ip-address/dist/v6/helpers.js +0 -54
- package/node_modules/ip-address/dist/v6/helpers.js.map +0 -1
- package/node_modules/ip-address/dist/v6/regular-expressions.d.ts +0 -5
- package/node_modules/ip-address/dist/v6/regular-expressions.js +0 -95
- package/node_modules/ip-address/dist/v6/regular-expressions.js.map +0 -1
- package/node_modules/ip-address/package.json +0 -88
- package/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
- package/node_modules/is-fullwidth-code-point/index.js +0 -50
- package/node_modules/is-fullwidth-code-point/license +0 -9
- package/node_modules/is-fullwidth-code-point/package.json +0 -42
- package/node_modules/is-fullwidth-code-point/readme.md +0 -39
- package/node_modules/mime-db/HISTORY.md +0 -541
- package/node_modules/mime-db/LICENSE +0 -23
- package/node_modules/mime-db/README.md +0 -109
- package/node_modules/mime-db/db.json +0 -9342
- package/node_modules/mime-db/index.js +0 -12
- package/node_modules/mime-db/package.json +0 -56
- package/node_modules/mime-types/HISTORY.md +0 -428
- package/node_modules/mime-types/LICENSE +0 -23
- package/node_modules/mime-types/README.md +0 -126
- package/node_modules/mime-types/index.js +0 -211
- package/node_modules/mime-types/mimeScore.js +0 -57
- package/node_modules/mime-types/package.json +0 -49
- package/node_modules/mz/LICENSE +0 -22
- package/node_modules/mz/README.md +0 -106
- package/node_modules/mz/child_process.js +0 -8
- package/node_modules/mz/crypto.js +0 -9
- package/node_modules/mz/dns.js +0 -16
- package/node_modules/mz/fs.js +0 -62
- package/node_modules/mz/index.js +0 -8
- package/node_modules/mz/package.json +0 -44
- package/node_modules/mz/readline.js +0 -64
- package/node_modules/mz/zlib.js +0 -13
- package/node_modules/netmask/CHANGELOG.md +0 -66
- package/node_modules/netmask/LICENSE.md +0 -21
- package/node_modules/netmask/README.md +0 -112
- package/node_modules/netmask/dist/netmask.d.ts +0 -21
- package/node_modules/netmask/dist/netmask.js +0 -68
- package/node_modules/netmask/dist/netmask4.d.ts +0 -20
- package/node_modules/netmask/dist/netmask4.js +0 -189
- package/node_modules/netmask/dist/netmask6.d.ts +0 -20
- package/node_modules/netmask/dist/netmask6.js +0 -187
- package/node_modules/netmask/package.json +0 -45
- package/node_modules/object-assign/index.js +0 -90
- package/node_modules/object-assign/license +0 -21
- package/node_modules/object-assign/package.json +0 -42
- package/node_modules/object-assign/readme.md +0 -61
- package/node_modules/once/README.md +0 -79
- package/node_modules/once/once.js +0 -42
- package/node_modules/once/package.json +0 -33
- package/node_modules/pac-proxy-agent/LICENSE +0 -22
- package/node_modules/pac-proxy-agent/README.md +0 -27
- package/node_modules/pac-proxy-agent/dist/index.d.ts +0 -60
- package/node_modules/pac-proxy-agent/dist/index.d.ts.map +0 -1
- package/node_modules/pac-proxy-agent/dist/index.js +0 -238
- package/node_modules/pac-proxy-agent/dist/index.js.map +0 -1
- package/node_modules/pac-proxy-agent/package.json +0 -58
- package/node_modules/pac-resolver/LICENSE +0 -22
- package/node_modules/pac-resolver/README.md +0 -59
- package/node_modules/pac-resolver/dist/dateRange.d.ts +0 -67
- package/node_modules/pac-resolver/dist/dateRange.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/dateRange.js +0 -73
- package/node_modules/pac-resolver/dist/dateRange.js.map +0 -1
- package/node_modules/pac-resolver/dist/dnsDomainIs.d.ts +0 -23
- package/node_modules/pac-resolver/dist/dnsDomainIs.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/dnsDomainIs.js +0 -30
- package/node_modules/pac-resolver/dist/dnsDomainIs.js.map +0 -1
- package/node_modules/pac-resolver/dist/dnsDomainLevels.d.ts +0 -18
- package/node_modules/pac-resolver/dist/dnsDomainLevels.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/dnsDomainLevels.js +0 -28
- package/node_modules/pac-resolver/dist/dnsDomainLevels.js.map +0 -1
- package/node_modules/pac-resolver/dist/dnsResolve.d.ts +0 -16
- package/node_modules/pac-resolver/dist/dnsResolve.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/dnsResolve.js +0 -32
- package/node_modules/pac-resolver/dist/dnsResolve.js.map +0 -1
- package/node_modules/pac-resolver/dist/index.d.ts +0 -50
- package/node_modules/pac-resolver/dist/index.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/index.js +0 -87
- package/node_modules/pac-resolver/dist/index.js.map +0 -1
- package/node_modules/pac-resolver/dist/ip.d.ts +0 -8
- package/node_modules/pac-resolver/dist/ip.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/ip.js +0 -50
- package/node_modules/pac-resolver/dist/ip.js.map +0 -1
- package/node_modules/pac-resolver/dist/isInNet.d.ts +0 -24
- package/node_modules/pac-resolver/dist/isInNet.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/isInNet.js +0 -42
- package/node_modules/pac-resolver/dist/isInNet.js.map +0 -1
- package/node_modules/pac-resolver/dist/isPlainHostName.d.ts +0 -18
- package/node_modules/pac-resolver/dist/isPlainHostName.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/isPlainHostName.js +0 -23
- package/node_modules/pac-resolver/dist/isPlainHostName.js.map +0 -1
- package/node_modules/pac-resolver/dist/isResolvable.d.ts +0 -8
- package/node_modules/pac-resolver/dist/isResolvable.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/isResolvable.js +0 -23
- package/node_modules/pac-resolver/dist/isResolvable.js.map +0 -1
- package/node_modules/pac-resolver/dist/localHostOrDomainIs.d.ts +0 -26
- package/node_modules/pac-resolver/dist/localHostOrDomainIs.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/localHostOrDomainIs.js +0 -40
- package/node_modules/pac-resolver/dist/localHostOrDomainIs.js.map +0 -1
- package/node_modules/pac-resolver/dist/myIpAddress.d.ts +0 -16
- package/node_modules/pac-resolver/dist/myIpAddress.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/myIpAddress.js +0 -50
- package/node_modules/pac-resolver/dist/myIpAddress.js.map +0 -1
- package/node_modules/pac-resolver/dist/shExpMatch.d.ts +0 -23
- package/node_modules/pac-resolver/dist/shExpMatch.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/shExpMatch.js +0 -41
- package/node_modules/pac-resolver/dist/shExpMatch.js.map +0 -1
- package/node_modules/pac-resolver/dist/timeRange.d.ts +0 -43
- package/node_modules/pac-resolver/dist/timeRange.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/timeRange.js +0 -92
- package/node_modules/pac-resolver/dist/timeRange.js.map +0 -1
- package/node_modules/pac-resolver/dist/util.d.ts +0 -6
- package/node_modules/pac-resolver/dist/util.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/util.js +0 -22
- package/node_modules/pac-resolver/dist/util.js.map +0 -1
- package/node_modules/pac-resolver/dist/weekdayRange.d.ts +0 -45
- package/node_modules/pac-resolver/dist/weekdayRange.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/weekdayRange.js +0 -91
- package/node_modules/pac-resolver/dist/weekdayRange.js.map +0 -1
- package/node_modules/pac-resolver/package.json +0 -47
- package/node_modules/parse5/LICENSE +0 -19
- package/node_modules/parse5/README.md +0 -38
- package/node_modules/parse5/lib/common/doctype.js +0 -162
- package/node_modules/parse5/lib/common/error-codes.js +0 -65
- package/node_modules/parse5/lib/common/foreign-content.js +0 -265
- package/node_modules/parse5/lib/common/html.js +0 -272
- package/node_modules/parse5/lib/common/unicode.js +0 -109
- package/node_modules/parse5/lib/extensions/error-reporting/mixin-base.js +0 -43
- package/node_modules/parse5/lib/extensions/error-reporting/parser-mixin.js +0 -52
- package/node_modules/parse5/lib/extensions/error-reporting/preprocessor-mixin.js +0 -24
- package/node_modules/parse5/lib/extensions/error-reporting/tokenizer-mixin.js +0 -17
- package/node_modules/parse5/lib/extensions/location-info/open-element-stack-mixin.js +0 -35
- package/node_modules/parse5/lib/extensions/location-info/parser-mixin.js +0 -222
- package/node_modules/parse5/lib/extensions/location-info/tokenizer-mixin.js +0 -146
- package/node_modules/parse5/lib/extensions/position-tracking/preprocessor-mixin.js +0 -64
- package/node_modules/parse5/lib/index.js +0 -29
- package/node_modules/parse5/lib/parser/formatting-element-list.js +0 -181
- package/node_modules/parse5/lib/parser/index.js +0 -2956
- package/node_modules/parse5/lib/parser/open-element-stack.js +0 -482
- package/node_modules/parse5/lib/serializer/index.js +0 -176
- package/node_modules/parse5/lib/tokenizer/index.js +0 -2196
- package/node_modules/parse5/lib/tokenizer/named-entity-data.js +0 -5
- package/node_modules/parse5/lib/tokenizer/preprocessor.js +0 -159
- package/node_modules/parse5/lib/tree-adapters/default.js +0 -217
- package/node_modules/parse5/lib/utils/merge-options.js +0 -13
- package/node_modules/parse5/lib/utils/mixin.js +0 -39
- package/node_modules/parse5/package.json +0 -35
- package/node_modules/parse5-htmlparser2-tree-adapter/LICENSE +0 -19
- package/node_modules/parse5-htmlparser2-tree-adapter/README.md +0 -34
- package/node_modules/parse5-htmlparser2-tree-adapter/lib/index.js +0 -348
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/LICENSE +0 -19
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/README.md +0 -38
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/doctype.js +0 -162
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/error-codes.js +0 -65
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/foreign-content.js +0 -265
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/html.js +0 -272
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/unicode.js +0 -109
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/error-reporting/mixin-base.js +0 -43
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/error-reporting/parser-mixin.js +0 -52
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/error-reporting/preprocessor-mixin.js +0 -24
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/error-reporting/tokenizer-mixin.js +0 -17
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/location-info/open-element-stack-mixin.js +0 -35
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/location-info/parser-mixin.js +0 -223
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/location-info/tokenizer-mixin.js +0 -146
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/position-tracking/preprocessor-mixin.js +0 -64
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/index.js +0 -29
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/parser/formatting-element-list.js +0 -181
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/parser/index.js +0 -2956
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/parser/open-element-stack.js +0 -482
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/serializer/index.js +0 -176
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/tokenizer/index.js +0 -2196
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/tokenizer/named-entity-data.js +0 -5
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/tokenizer/preprocessor.js +0 -159
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/tree-adapters/default.js +0 -221
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/utils/merge-options.js +0 -13
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/utils/mixin.js +0 -39
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/package.json +0 -35
- package/node_modules/parse5-htmlparser2-tree-adapter/package.json +0 -27
- package/node_modules/pend/LICENSE +0 -23
- package/node_modules/pend/README.md +0 -41
- package/node_modules/pend/index.js +0 -55
- package/node_modules/pend/package.json +0 -18
- package/node_modules/pend/test.js +0 -137
- package/node_modules/proxy-agent/LICENSE +0 -22
- package/node_modules/proxy-agent/README.md +0 -59
- package/node_modules/proxy-agent/dist/index.d.ts +0 -62
- package/node_modules/proxy-agent/dist/index.d.ts.map +0 -1
- package/node_modules/proxy-agent/dist/index.js +0 -138
- package/node_modules/proxy-agent/dist/index.js.map +0 -1
- package/node_modules/proxy-agent/node_modules/lru-cache/LICENSE +0 -15
- package/node_modules/proxy-agent/node_modules/lru-cache/README.md +0 -1117
- package/node_modules/proxy-agent/node_modules/lru-cache/index.d.ts +0 -869
- package/node_modules/proxy-agent/node_modules/lru-cache/index.js +0 -1227
- package/node_modules/proxy-agent/node_modules/lru-cache/index.mjs +0 -1227
- package/node_modules/proxy-agent/node_modules/lru-cache/package.json +0 -96
- package/node_modules/proxy-agent/package.json +0 -60
- package/node_modules/proxy-from-env/.eslintrc +0 -29
- package/node_modules/proxy-from-env/.travis.yml +0 -10
- package/node_modules/proxy-from-env/LICENSE +0 -20
- package/node_modules/proxy-from-env/README.md +0 -131
- package/node_modules/proxy-from-env/index.js +0 -108
- package/node_modules/proxy-from-env/package.json +0 -34
- package/node_modules/proxy-from-env/test.js +0 -483
- package/node_modules/pump/.github/FUNDING.yml +0 -2
- package/node_modules/pump/.travis.yml +0 -5
- package/node_modules/pump/LICENSE +0 -21
- package/node_modules/pump/README.md +0 -74
- package/node_modules/pump/SECURITY.md +0 -5
- package/node_modules/pump/empty.js +0 -1
- package/node_modules/pump/index.js +0 -86
- package/node_modules/pump/package.json +0 -30
- package/node_modules/pump/test-browser.js +0 -66
- package/node_modules/pump/test-node.js +0 -53
- package/node_modules/require-directory/.jshintrc +0 -67
- package/node_modules/require-directory/.npmignore +0 -1
- package/node_modules/require-directory/.travis.yml +0 -3
- package/node_modules/require-directory/LICENSE +0 -22
- package/node_modules/require-directory/README.markdown +0 -184
- package/node_modules/require-directory/index.js +0 -86
- package/node_modules/require-directory/package.json +0 -40
- package/node_modules/smart-buffer/.prettierrc.yaml +0 -5
- package/node_modules/smart-buffer/.travis.yml +0 -13
- package/node_modules/smart-buffer/LICENSE +0 -20
- package/node_modules/smart-buffer/README.md +0 -633
- package/node_modules/smart-buffer/build/smartbuffer.js +0 -1233
- package/node_modules/smart-buffer/build/smartbuffer.js.map +0 -1
- package/node_modules/smart-buffer/build/utils.js +0 -108
- package/node_modules/smart-buffer/build/utils.js.map +0 -1
- package/node_modules/smart-buffer/docs/CHANGELOG.md +0 -70
- package/node_modules/smart-buffer/docs/README_v3.md +0 -367
- package/node_modules/smart-buffer/docs/ROADMAP.md +0 -0
- package/node_modules/smart-buffer/package.json +0 -79
- package/node_modules/smart-buffer/typings/smartbuffer.d.ts +0 -755
- package/node_modules/smart-buffer/typings/utils.d.ts +0 -66
- package/node_modules/socks/.eslintrc.cjs +0 -11
- package/node_modules/socks/.prettierrc.yaml +0 -7
- package/node_modules/socks/LICENSE +0 -20
- package/node_modules/socks/README.md +0 -686
- package/node_modules/socks/build/client/socksclient.js +0 -793
- package/node_modules/socks/build/client/socksclient.js.map +0 -1
- package/node_modules/socks/build/common/constants.js +0 -108
- package/node_modules/socks/build/common/constants.js.map +0 -1
- package/node_modules/socks/build/common/helpers.js +0 -167
- package/node_modules/socks/build/common/helpers.js.map +0 -1
- package/node_modules/socks/build/common/receivebuffer.js +0 -43
- package/node_modules/socks/build/common/receivebuffer.js.map +0 -1
- package/node_modules/socks/build/common/util.js +0 -25
- package/node_modules/socks/build/common/util.js.map +0 -1
- package/node_modules/socks/build/index.js +0 -18
- package/node_modules/socks/build/index.js.map +0 -1
- package/node_modules/socks/docs/examples/index.md +0 -17
- package/node_modules/socks/docs/examples/javascript/associateExample.md +0 -90
- package/node_modules/socks/docs/examples/javascript/bindExample.md +0 -83
- package/node_modules/socks/docs/examples/javascript/connectExample.md +0 -258
- package/node_modules/socks/docs/examples/typescript/associateExample.md +0 -93
- package/node_modules/socks/docs/examples/typescript/bindExample.md +0 -86
- package/node_modules/socks/docs/examples/typescript/connectExample.md +0 -265
- package/node_modules/socks/docs/index.md +0 -5
- package/node_modules/socks/docs/migratingFromV1.md +0 -86
- package/node_modules/socks/package.json +0 -58
- package/node_modules/socks/typings/client/socksclient.d.ts +0 -162
- package/node_modules/socks/typings/common/constants.d.ts +0 -151
- package/node_modules/socks/typings/common/helpers.d.ts +0 -17
- package/node_modules/socks/typings/common/receivebuffer.d.ts +0 -12
- package/node_modules/socks/typings/common/util.d.ts +0 -14
- package/node_modules/socks/typings/index.d.ts +0 -1
- package/node_modules/socks-proxy-agent/LICENSE +0 -22
- package/node_modules/socks-proxy-agent/README.md +0 -50
- package/node_modules/socks-proxy-agent/dist/index.d.ts +0 -27
- package/node_modules/socks-proxy-agent/dist/index.d.ts.map +0 -1
- package/node_modules/socks-proxy-agent/dist/index.js +0 -195
- package/node_modules/socks-proxy-agent/dist/index.js.map +0 -1
- package/node_modules/socks-proxy-agent/package.json +0 -142
- package/node_modules/source-map/LICENSE +0 -28
- package/node_modules/source-map/README.md +0 -742
- package/node_modules/source-map/dist/source-map.debug.js +0 -3234
- package/node_modules/source-map/dist/source-map.js +0 -3233
- package/node_modules/source-map/dist/source-map.min.js +0 -2
- package/node_modules/source-map/dist/source-map.min.js.map +0 -1
- package/node_modules/source-map/lib/array-set.js +0 -121
- package/node_modules/source-map/lib/base64-vlq.js +0 -140
- package/node_modules/source-map/lib/base64.js +0 -67
- package/node_modules/source-map/lib/binary-search.js +0 -111
- package/node_modules/source-map/lib/mapping-list.js +0 -79
- package/node_modules/source-map/lib/quick-sort.js +0 -114
- package/node_modules/source-map/lib/source-map-consumer.js +0 -1145
- package/node_modules/source-map/lib/source-map-generator.js +0 -425
- package/node_modules/source-map/lib/source-node.js +0 -413
- package/node_modules/source-map/lib/util.js +0 -488
- package/node_modules/source-map/package.json +0 -73
- package/node_modules/source-map/source-map.d.ts +0 -98
- package/node_modules/source-map/source-map.js +0 -8
- package/node_modules/string-width/index.d.ts +0 -29
- package/node_modules/string-width/index.js +0 -47
- package/node_modules/string-width/license +0 -9
- package/node_modules/string-width/node_modules/ansi-regex/index.d.ts +0 -37
- package/node_modules/string-width/node_modules/ansi-regex/index.js +0 -10
- package/node_modules/string-width/node_modules/ansi-regex/license +0 -9
- package/node_modules/string-width/node_modules/ansi-regex/package.json +0 -55
- package/node_modules/string-width/node_modules/ansi-regex/readme.md +0 -78
- package/node_modules/string-width/node_modules/strip-ansi/index.d.ts +0 -17
- package/node_modules/string-width/node_modules/strip-ansi/index.js +0 -4
- package/node_modules/string-width/node_modules/strip-ansi/license +0 -9
- package/node_modules/string-width/node_modules/strip-ansi/package.json +0 -54
- package/node_modules/string-width/node_modules/strip-ansi/readme.md +0 -46
- package/node_modules/string-width/package.json +0 -56
- package/node_modules/string-width/readme.md +0 -50
- package/node_modules/strip-ansi/index.d.ts +0 -15
- package/node_modules/strip-ansi/index.js +0 -19
- package/node_modules/strip-ansi/license +0 -9
- package/node_modules/strip-ansi/package.json +0 -59
- package/node_modules/strip-ansi/readme.md +0 -37
- package/node_modules/strtok3/LICENSE.txt +0 -21
- package/node_modules/strtok3/README.md +0 -399
- package/node_modules/strtok3/lib/AbstractTokenizer.d.ts +0 -76
- package/node_modules/strtok3/lib/AbstractTokenizer.js +0 -111
- package/node_modules/strtok3/lib/BlobTokenizer.d.ts +0 -29
- package/node_modules/strtok3/lib/BlobTokenizer.js +0 -53
- package/node_modules/strtok3/lib/BufferTokenizer.d.ts +0 -29
- package/node_modules/strtok3/lib/BufferTokenizer.js +0 -52
- package/node_modules/strtok3/lib/FileTokenizer.d.ts +0 -37
- package/node_modules/strtok3/lib/FileTokenizer.js +0 -61
- package/node_modules/strtok3/lib/ReadStreamTokenizer.d.ts +0 -34
- package/node_modules/strtok3/lib/ReadStreamTokenizer.js +0 -107
- package/node_modules/strtok3/lib/core.d.ts +0 -40
- package/node_modules/strtok3/lib/core.js +0 -62
- package/node_modules/strtok3/lib/index.d.ts +0 -16
- package/node_modules/strtok3/lib/index.js +0 -22
- package/node_modules/strtok3/lib/stream/AbstractStreamReader.d.ts +0 -54
- package/node_modules/strtok3/lib/stream/AbstractStreamReader.js +0 -71
- package/node_modules/strtok3/lib/stream/Deferred.d.ts +0 -6
- package/node_modules/strtok3/lib/stream/Deferred.js +0 -10
- package/node_modules/strtok3/lib/stream/Errors.d.ts +0 -10
- package/node_modules/strtok3/lib/stream/Errors.js +0 -16
- package/node_modules/strtok3/lib/stream/StreamReader.d.ts +0 -29
- package/node_modules/strtok3/lib/stream/StreamReader.js +0 -83
- package/node_modules/strtok3/lib/stream/WebStreamByobReader.d.ts +0 -14
- package/node_modules/strtok3/lib/stream/WebStreamByobReader.js +0 -27
- package/node_modules/strtok3/lib/stream/WebStreamDefaultReader.d.ts +0 -19
- package/node_modules/strtok3/lib/stream/WebStreamDefaultReader.js +0 -62
- package/node_modules/strtok3/lib/stream/WebStreamReader.d.ts +0 -14
- package/node_modules/strtok3/lib/stream/WebStreamReader.js +0 -13
- package/node_modules/strtok3/lib/stream/WebStreamReaderFactory.d.ts +0 -5
- package/node_modules/strtok3/lib/stream/WebStreamReaderFactory.js +0 -19
- package/node_modules/strtok3/lib/stream/index.d.ts +0 -6
- package/node_modules/strtok3/lib/stream/index.js +0 -5
- package/node_modules/strtok3/lib/types.d.ts +0 -139
- package/node_modules/strtok3/lib/types.js +0 -1
- package/node_modules/strtok3/package.json +0 -94
- package/node_modules/supports-color/browser.js +0 -5
- package/node_modules/supports-color/index.js +0 -135
- package/node_modules/supports-color/license +0 -9
- package/node_modules/supports-color/package.json +0 -53
- package/node_modules/supports-color/readme.md +0 -76
- package/node_modules/thenify/LICENSE +0 -22
- package/node_modules/thenify/README.md +0 -120
- package/node_modules/thenify/index.js +0 -77
- package/node_modules/thenify/package.json +0 -31
- package/node_modules/thenify-all/LICENSE +0 -22
- package/node_modules/thenify-all/README.md +0 -66
- package/node_modules/thenify-all/index.js +0 -73
- package/node_modules/thenify-all/package.json +0 -34
- package/node_modules/token-types/LICENSE.txt +0 -9
- package/node_modules/token-types/README.md +0 -120
- package/node_modules/token-types/lib/index.d.ts +0 -135
- package/node_modules/token-types/lib/index.js +0 -401
- package/node_modules/token-types/package.json +0 -81
- package/node_modules/uint8array-extras/index.d.ts +0 -331
- package/node_modules/uint8array-extras/index.js +0 -318
- package/node_modules/uint8array-extras/license +0 -9
- package/node_modules/uint8array-extras/package.json +0 -54
- package/node_modules/uint8array-extras/readme.md +0 -318
- package/node_modules/uuid/LICENSE.md +0 -9
- package/node_modules/uuid/README.md +0 -491
- package/node_modules/uuid/dist/index.d.ts +0 -15
- package/node_modules/uuid/dist/index.js +0 -14
- package/node_modules/uuid/dist/max.d.ts +0 -2
- package/node_modules/uuid/dist/max.js +0 -1
- package/node_modules/uuid/dist/md5.d.ts +0 -2
- package/node_modules/uuid/dist/md5.js +0 -135
- package/node_modules/uuid/dist/nil.d.ts +0 -2
- package/node_modules/uuid/dist/nil.js +0 -1
- package/node_modules/uuid/dist/parse.d.ts +0 -3
- package/node_modules/uuid/dist/parse.js +0 -9
- package/node_modules/uuid/dist/regex.d.ts +0 -2
- package/node_modules/uuid/dist/regex.js +0 -1
- package/node_modules/uuid/dist/rng.d.ts +0 -1
- package/node_modules/uuid/dist/rng.js +0 -4
- package/node_modules/uuid/dist/sha1.d.ts +0 -2
- package/node_modules/uuid/dist/sha1.js +0 -70
- package/node_modules/uuid/dist/stringify.d.ts +0 -3
- package/node_modules/uuid/dist/stringify.js +0 -35
- package/node_modules/uuid/dist/types.d.ts +0 -22
- package/node_modules/uuid/dist/types.js +0 -1
- package/node_modules/uuid/dist/uuid-bin.d.ts +0 -1
- package/node_modules/uuid/dist/uuid-bin.js +0 -70
- package/node_modules/uuid/dist/v1.d.ts +0 -11
- package/node_modules/uuid/dist/v1.js +0 -83
- package/node_modules/uuid/dist/v1ToV6.d.ts +0 -3
- package/node_modules/uuid/dist/v1ToV6.js +0 -10
- package/node_modules/uuid/dist/v3.d.ts +0 -9
- package/node_modules/uuid/dist/v3.js +0 -9
- package/node_modules/uuid/dist/v35.d.ts +0 -7
- package/node_modules/uuid/dist/v35.js +0 -39
- package/node_modules/uuid/dist/v4.d.ts +0 -4
- package/node_modules/uuid/dist/v4.js +0 -29
- package/node_modules/uuid/dist/v5.d.ts +0 -9
- package/node_modules/uuid/dist/v5.js +0 -9
- package/node_modules/uuid/dist/v6.d.ts +0 -4
- package/node_modules/uuid/dist/v6.js +0 -20
- package/node_modules/uuid/dist/v6ToV1.d.ts +0 -2
- package/node_modules/uuid/dist/v6ToV1.js +0 -10
- package/node_modules/uuid/dist/v7.d.ts +0 -9
- package/node_modules/uuid/dist/v7.js +0 -65
- package/node_modules/uuid/dist/validate.d.ts +0 -2
- package/node_modules/uuid/dist/validate.js +0 -5
- package/node_modules/uuid/dist/version.d.ts +0 -2
- package/node_modules/uuid/dist/version.js +0 -8
- package/node_modules/uuid/dist-node/bin/uuid +0 -2
- package/node_modules/uuid/dist-node/index.js +0 -14
- package/node_modules/uuid/dist-node/max.js +0 -1
- package/node_modules/uuid/dist-node/md5.js +0 -11
- package/node_modules/uuid/dist-node/nil.js +0 -1
- package/node_modules/uuid/dist-node/parse.js +0 -9
- package/node_modules/uuid/dist-node/regex.js +0 -1
- package/node_modules/uuid/dist-node/rng.js +0 -4
- package/node_modules/uuid/dist-node/sha1.js +0 -11
- package/node_modules/uuid/dist-node/stringify.js +0 -35
- package/node_modules/uuid/dist-node/types.js +0 -1
- package/node_modules/uuid/dist-node/uuid-bin.js +0 -70
- package/node_modules/uuid/dist-node/v1.js +0 -83
- package/node_modules/uuid/dist-node/v1ToV6.js +0 -10
- package/node_modules/uuid/dist-node/v3.js +0 -9
- package/node_modules/uuid/dist-node/v35.js +0 -39
- package/node_modules/uuid/dist-node/v4.js +0 -29
- package/node_modules/uuid/dist-node/v5.js +0 -9
- package/node_modules/uuid/dist-node/v6.js +0 -20
- package/node_modules/uuid/dist-node/v6ToV1.js +0 -10
- package/node_modules/uuid/dist-node/v7.js +0 -65
- package/node_modules/uuid/dist-node/validate.js +0 -5
- package/node_modules/uuid/dist-node/version.js +0 -8
- package/node_modules/uuid/package.json +0 -110
- package/node_modules/wrap-ansi/index.js +0 -216
- package/node_modules/wrap-ansi/license +0 -9
- package/node_modules/wrap-ansi/node_modules/ansi-regex/index.d.ts +0 -37
- package/node_modules/wrap-ansi/node_modules/ansi-regex/index.js +0 -10
- package/node_modules/wrap-ansi/node_modules/ansi-regex/license +0 -9
- package/node_modules/wrap-ansi/node_modules/ansi-regex/package.json +0 -55
- package/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md +0 -78
- package/node_modules/wrap-ansi/node_modules/strip-ansi/index.d.ts +0 -17
- package/node_modules/wrap-ansi/node_modules/strip-ansi/index.js +0 -4
- package/node_modules/wrap-ansi/node_modules/strip-ansi/license +0 -9
- package/node_modules/wrap-ansi/node_modules/strip-ansi/package.json +0 -54
- package/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md +0 -46
- package/node_modules/wrap-ansi/package.json +0 -62
- package/node_modules/wrap-ansi/readme.md +0 -91
- package/node_modules/wrappy/README.md +0 -36
- package/node_modules/wrappy/package.json +0 -29
- package/node_modules/wrappy/wrappy.js +0 -33
- package/node_modules/y18n/LICENSE +0 -13
- package/node_modules/y18n/README.md +0 -127
- package/node_modules/y18n/build/index.cjs +0 -203
- package/node_modules/y18n/build/lib/cjs.js +0 -6
- package/node_modules/y18n/build/lib/index.js +0 -174
- package/node_modules/y18n/build/lib/platform-shims/node.js +0 -19
- package/node_modules/y18n/index.mjs +0 -8
- package/node_modules/y18n/package.json +0 -70
- package/node_modules/yargs/LICENSE +0 -21
- package/node_modules/yargs/README.md +0 -202
- package/node_modules/yargs/browser.mjs +0 -7
- package/node_modules/yargs/build/index.cjs +0 -2920
- package/node_modules/yargs/build/lib/argsert.js +0 -62
- package/node_modules/yargs/build/lib/command.js +0 -382
- package/node_modules/yargs/build/lib/completion-templates.js +0 -47
- package/node_modules/yargs/build/lib/completion.js +0 -128
- package/node_modules/yargs/build/lib/middleware.js +0 -53
- package/node_modules/yargs/build/lib/parse-command.js +0 -32
- package/node_modules/yargs/build/lib/typings/common-types.js +0 -9
- package/node_modules/yargs/build/lib/typings/yargs-parser-types.js +0 -1
- package/node_modules/yargs/build/lib/usage.js +0 -548
- package/node_modules/yargs/build/lib/utils/apply-extends.js +0 -59
- package/node_modules/yargs/build/lib/utils/is-promise.js +0 -5
- package/node_modules/yargs/build/lib/utils/levenshtein.js +0 -26
- package/node_modules/yargs/build/lib/utils/obj-filter.js +0 -10
- package/node_modules/yargs/build/lib/utils/process-argv.js +0 -17
- package/node_modules/yargs/build/lib/utils/set-blocking.js +0 -12
- package/node_modules/yargs/build/lib/utils/which-module.js +0 -10
- package/node_modules/yargs/build/lib/validation.js +0 -308
- package/node_modules/yargs/build/lib/yargs-factory.js +0 -1143
- package/node_modules/yargs/build/lib/yerror.js +0 -7
- package/node_modules/yargs/helpers/helpers.mjs +0 -10
- package/node_modules/yargs/helpers/index.js +0 -14
- package/node_modules/yargs/helpers/package.json +0 -3
- package/node_modules/yargs/index.cjs +0 -39
- package/node_modules/yargs/index.mjs +0 -8
- package/node_modules/yargs/lib/platform-shims/browser.mjs +0 -92
- package/node_modules/yargs/lib/platform-shims/esm.mjs +0 -67
- package/node_modules/yargs/locales/be.json +0 -46
- package/node_modules/yargs/locales/de.json +0 -46
- package/node_modules/yargs/locales/en.json +0 -51
- package/node_modules/yargs/locales/es.json +0 -46
- package/node_modules/yargs/locales/fi.json +0 -49
- package/node_modules/yargs/locales/fr.json +0 -53
- package/node_modules/yargs/locales/hi.json +0 -49
- package/node_modules/yargs/locales/hu.json +0 -46
- package/node_modules/yargs/locales/id.json +0 -50
- package/node_modules/yargs/locales/it.json +0 -46
- package/node_modules/yargs/locales/ja.json +0 -51
- package/node_modules/yargs/locales/ko.json +0 -49
- package/node_modules/yargs/locales/nb.json +0 -44
- package/node_modules/yargs/locales/nl.json +0 -49
- package/node_modules/yargs/locales/nn.json +0 -44
- package/node_modules/yargs/locales/pirate.json +0 -13
- package/node_modules/yargs/locales/pl.json +0 -49
- package/node_modules/yargs/locales/pt.json +0 -45
- package/node_modules/yargs/locales/pt_BR.json +0 -48
- package/node_modules/yargs/locales/ru.json +0 -46
- package/node_modules/yargs/locales/th.json +0 -46
- package/node_modules/yargs/locales/tr.json +0 -48
- package/node_modules/yargs/locales/zh_CN.json +0 -48
- package/node_modules/yargs/locales/zh_TW.json +0 -47
- package/node_modules/yargs/package.json +0 -122
- package/node_modules/yargs/yargs +0 -9
- package/node_modules/yargs-parser/LICENSE.txt +0 -14
- package/node_modules/yargs-parser/README.md +0 -518
- package/node_modules/yargs-parser/browser.js +0 -29
- package/node_modules/yargs-parser/build/index.cjs +0 -1042
- package/node_modules/yargs-parser/build/lib/index.js +0 -59
- package/node_modules/yargs-parser/build/lib/string-utils.js +0 -65
- package/node_modules/yargs-parser/build/lib/tokenize-arg-string.js +0 -40
- package/node_modules/yargs-parser/build/lib/yargs-parser-types.js +0 -12
- package/node_modules/yargs-parser/build/lib/yargs-parser.js +0 -1037
- package/node_modules/yargs-parser/package.json +0 -87
- package/node_modules/yauzl/LICENSE +0 -21
- package/node_modules/yauzl/README.md +0 -658
- package/node_modules/yauzl/index.js +0 -796
- package/node_modules/yauzl/package.json +0 -40
- /package/node_modules/{once → isexe}/LICENSE +0 -0
- /package/node_modules/{ansi-styles → path-key}/license +0 -0
- /package/node_modules/{cli-highlight/node_modules/chalk → shebang-regex}/license +0 -0
- /package/node_modules/{wrappy → which}/LICENSE +0 -0
|
@@ -1,2196 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const Preprocessor = require('./preprocessor');
|
|
4
|
-
const unicode = require('../common/unicode');
|
|
5
|
-
const neTree = require('./named-entity-data');
|
|
6
|
-
const ERR = require('../common/error-codes');
|
|
7
|
-
|
|
8
|
-
//Aliases
|
|
9
|
-
const $ = unicode.CODE_POINTS;
|
|
10
|
-
const $$ = unicode.CODE_POINT_SEQUENCES;
|
|
11
|
-
|
|
12
|
-
//C1 Unicode control character reference replacements
|
|
13
|
-
const C1_CONTROLS_REFERENCE_REPLACEMENTS = {
|
|
14
|
-
0x80: 0x20ac,
|
|
15
|
-
0x82: 0x201a,
|
|
16
|
-
0x83: 0x0192,
|
|
17
|
-
0x84: 0x201e,
|
|
18
|
-
0x85: 0x2026,
|
|
19
|
-
0x86: 0x2020,
|
|
20
|
-
0x87: 0x2021,
|
|
21
|
-
0x88: 0x02c6,
|
|
22
|
-
0x89: 0x2030,
|
|
23
|
-
0x8a: 0x0160,
|
|
24
|
-
0x8b: 0x2039,
|
|
25
|
-
0x8c: 0x0152,
|
|
26
|
-
0x8e: 0x017d,
|
|
27
|
-
0x91: 0x2018,
|
|
28
|
-
0x92: 0x2019,
|
|
29
|
-
0x93: 0x201c,
|
|
30
|
-
0x94: 0x201d,
|
|
31
|
-
0x95: 0x2022,
|
|
32
|
-
0x96: 0x2013,
|
|
33
|
-
0x97: 0x2014,
|
|
34
|
-
0x98: 0x02dc,
|
|
35
|
-
0x99: 0x2122,
|
|
36
|
-
0x9a: 0x0161,
|
|
37
|
-
0x9b: 0x203a,
|
|
38
|
-
0x9c: 0x0153,
|
|
39
|
-
0x9e: 0x017e,
|
|
40
|
-
0x9f: 0x0178
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
// Named entity tree flags
|
|
44
|
-
const HAS_DATA_FLAG = 1 << 0;
|
|
45
|
-
const DATA_DUPLET_FLAG = 1 << 1;
|
|
46
|
-
const HAS_BRANCHES_FLAG = 1 << 2;
|
|
47
|
-
const MAX_BRANCH_MARKER_VALUE = HAS_DATA_FLAG | DATA_DUPLET_FLAG | HAS_BRANCHES_FLAG;
|
|
48
|
-
|
|
49
|
-
//States
|
|
50
|
-
const DATA_STATE = 'DATA_STATE';
|
|
51
|
-
const RCDATA_STATE = 'RCDATA_STATE';
|
|
52
|
-
const RAWTEXT_STATE = 'RAWTEXT_STATE';
|
|
53
|
-
const SCRIPT_DATA_STATE = 'SCRIPT_DATA_STATE';
|
|
54
|
-
const PLAINTEXT_STATE = 'PLAINTEXT_STATE';
|
|
55
|
-
const TAG_OPEN_STATE = 'TAG_OPEN_STATE';
|
|
56
|
-
const END_TAG_OPEN_STATE = 'END_TAG_OPEN_STATE';
|
|
57
|
-
const TAG_NAME_STATE = 'TAG_NAME_STATE';
|
|
58
|
-
const RCDATA_LESS_THAN_SIGN_STATE = 'RCDATA_LESS_THAN_SIGN_STATE';
|
|
59
|
-
const RCDATA_END_TAG_OPEN_STATE = 'RCDATA_END_TAG_OPEN_STATE';
|
|
60
|
-
const RCDATA_END_TAG_NAME_STATE = 'RCDATA_END_TAG_NAME_STATE';
|
|
61
|
-
const RAWTEXT_LESS_THAN_SIGN_STATE = 'RAWTEXT_LESS_THAN_SIGN_STATE';
|
|
62
|
-
const RAWTEXT_END_TAG_OPEN_STATE = 'RAWTEXT_END_TAG_OPEN_STATE';
|
|
63
|
-
const RAWTEXT_END_TAG_NAME_STATE = 'RAWTEXT_END_TAG_NAME_STATE';
|
|
64
|
-
const SCRIPT_DATA_LESS_THAN_SIGN_STATE = 'SCRIPT_DATA_LESS_THAN_SIGN_STATE';
|
|
65
|
-
const SCRIPT_DATA_END_TAG_OPEN_STATE = 'SCRIPT_DATA_END_TAG_OPEN_STATE';
|
|
66
|
-
const SCRIPT_DATA_END_TAG_NAME_STATE = 'SCRIPT_DATA_END_TAG_NAME_STATE';
|
|
67
|
-
const SCRIPT_DATA_ESCAPE_START_STATE = 'SCRIPT_DATA_ESCAPE_START_STATE';
|
|
68
|
-
const SCRIPT_DATA_ESCAPE_START_DASH_STATE = 'SCRIPT_DATA_ESCAPE_START_DASH_STATE';
|
|
69
|
-
const SCRIPT_DATA_ESCAPED_STATE = 'SCRIPT_DATA_ESCAPED_STATE';
|
|
70
|
-
const SCRIPT_DATA_ESCAPED_DASH_STATE = 'SCRIPT_DATA_ESCAPED_DASH_STATE';
|
|
71
|
-
const SCRIPT_DATA_ESCAPED_DASH_DASH_STATE = 'SCRIPT_DATA_ESCAPED_DASH_DASH_STATE';
|
|
72
|
-
const SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE = 'SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE';
|
|
73
|
-
const SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE = 'SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE';
|
|
74
|
-
const SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE = 'SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE';
|
|
75
|
-
const SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE = 'SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE';
|
|
76
|
-
const SCRIPT_DATA_DOUBLE_ESCAPED_STATE = 'SCRIPT_DATA_DOUBLE_ESCAPED_STATE';
|
|
77
|
-
const SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE = 'SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE';
|
|
78
|
-
const SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE = 'SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE';
|
|
79
|
-
const SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE = 'SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE';
|
|
80
|
-
const SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE = 'SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE';
|
|
81
|
-
const BEFORE_ATTRIBUTE_NAME_STATE = 'BEFORE_ATTRIBUTE_NAME_STATE';
|
|
82
|
-
const ATTRIBUTE_NAME_STATE = 'ATTRIBUTE_NAME_STATE';
|
|
83
|
-
const AFTER_ATTRIBUTE_NAME_STATE = 'AFTER_ATTRIBUTE_NAME_STATE';
|
|
84
|
-
const BEFORE_ATTRIBUTE_VALUE_STATE = 'BEFORE_ATTRIBUTE_VALUE_STATE';
|
|
85
|
-
const ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE = 'ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE';
|
|
86
|
-
const ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE = 'ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE';
|
|
87
|
-
const ATTRIBUTE_VALUE_UNQUOTED_STATE = 'ATTRIBUTE_VALUE_UNQUOTED_STATE';
|
|
88
|
-
const AFTER_ATTRIBUTE_VALUE_QUOTED_STATE = 'AFTER_ATTRIBUTE_VALUE_QUOTED_STATE';
|
|
89
|
-
const SELF_CLOSING_START_TAG_STATE = 'SELF_CLOSING_START_TAG_STATE';
|
|
90
|
-
const BOGUS_COMMENT_STATE = 'BOGUS_COMMENT_STATE';
|
|
91
|
-
const MARKUP_DECLARATION_OPEN_STATE = 'MARKUP_DECLARATION_OPEN_STATE';
|
|
92
|
-
const COMMENT_START_STATE = 'COMMENT_START_STATE';
|
|
93
|
-
const COMMENT_START_DASH_STATE = 'COMMENT_START_DASH_STATE';
|
|
94
|
-
const COMMENT_STATE = 'COMMENT_STATE';
|
|
95
|
-
const COMMENT_LESS_THAN_SIGN_STATE = 'COMMENT_LESS_THAN_SIGN_STATE';
|
|
96
|
-
const COMMENT_LESS_THAN_SIGN_BANG_STATE = 'COMMENT_LESS_THAN_SIGN_BANG_STATE';
|
|
97
|
-
const COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE = 'COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE';
|
|
98
|
-
const COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE = 'COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE';
|
|
99
|
-
const COMMENT_END_DASH_STATE = 'COMMENT_END_DASH_STATE';
|
|
100
|
-
const COMMENT_END_STATE = 'COMMENT_END_STATE';
|
|
101
|
-
const COMMENT_END_BANG_STATE = 'COMMENT_END_BANG_STATE';
|
|
102
|
-
const DOCTYPE_STATE = 'DOCTYPE_STATE';
|
|
103
|
-
const BEFORE_DOCTYPE_NAME_STATE = 'BEFORE_DOCTYPE_NAME_STATE';
|
|
104
|
-
const DOCTYPE_NAME_STATE = 'DOCTYPE_NAME_STATE';
|
|
105
|
-
const AFTER_DOCTYPE_NAME_STATE = 'AFTER_DOCTYPE_NAME_STATE';
|
|
106
|
-
const AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE = 'AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE';
|
|
107
|
-
const BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE = 'BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE';
|
|
108
|
-
const DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE = 'DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE';
|
|
109
|
-
const DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE = 'DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE';
|
|
110
|
-
const AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE = 'AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE';
|
|
111
|
-
const BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE = 'BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE';
|
|
112
|
-
const AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE = 'AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE';
|
|
113
|
-
const BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE = 'BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE';
|
|
114
|
-
const DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE = 'DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE';
|
|
115
|
-
const DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE = 'DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE';
|
|
116
|
-
const AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE = 'AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE';
|
|
117
|
-
const BOGUS_DOCTYPE_STATE = 'BOGUS_DOCTYPE_STATE';
|
|
118
|
-
const CDATA_SECTION_STATE = 'CDATA_SECTION_STATE';
|
|
119
|
-
const CDATA_SECTION_BRACKET_STATE = 'CDATA_SECTION_BRACKET_STATE';
|
|
120
|
-
const CDATA_SECTION_END_STATE = 'CDATA_SECTION_END_STATE';
|
|
121
|
-
const CHARACTER_REFERENCE_STATE = 'CHARACTER_REFERENCE_STATE';
|
|
122
|
-
const NAMED_CHARACTER_REFERENCE_STATE = 'NAMED_CHARACTER_REFERENCE_STATE';
|
|
123
|
-
const AMBIGUOUS_AMPERSAND_STATE = 'AMBIGUOS_AMPERSAND_STATE';
|
|
124
|
-
const NUMERIC_CHARACTER_REFERENCE_STATE = 'NUMERIC_CHARACTER_REFERENCE_STATE';
|
|
125
|
-
const HEXADEMICAL_CHARACTER_REFERENCE_START_STATE = 'HEXADEMICAL_CHARACTER_REFERENCE_START_STATE';
|
|
126
|
-
const DECIMAL_CHARACTER_REFERENCE_START_STATE = 'DECIMAL_CHARACTER_REFERENCE_START_STATE';
|
|
127
|
-
const HEXADEMICAL_CHARACTER_REFERENCE_STATE = 'HEXADEMICAL_CHARACTER_REFERENCE_STATE';
|
|
128
|
-
const DECIMAL_CHARACTER_REFERENCE_STATE = 'DECIMAL_CHARACTER_REFERENCE_STATE';
|
|
129
|
-
const NUMERIC_CHARACTER_REFERENCE_END_STATE = 'NUMERIC_CHARACTER_REFERENCE_END_STATE';
|
|
130
|
-
|
|
131
|
-
//Utils
|
|
132
|
-
|
|
133
|
-
//OPTIMIZATION: these utility functions should not be moved out of this module. V8 Crankshaft will not inline
|
|
134
|
-
//this functions if they will be situated in another module due to context switch.
|
|
135
|
-
//Always perform inlining check before modifying this functions ('node --trace-inlining').
|
|
136
|
-
function isWhitespace(cp) {
|
|
137
|
-
return cp === $.SPACE || cp === $.LINE_FEED || cp === $.TABULATION || cp === $.FORM_FEED;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
function isAsciiDigit(cp) {
|
|
141
|
-
return cp >= $.DIGIT_0 && cp <= $.DIGIT_9;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
function isAsciiUpper(cp) {
|
|
145
|
-
return cp >= $.LATIN_CAPITAL_A && cp <= $.LATIN_CAPITAL_Z;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
function isAsciiLower(cp) {
|
|
149
|
-
return cp >= $.LATIN_SMALL_A && cp <= $.LATIN_SMALL_Z;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
function isAsciiLetter(cp) {
|
|
153
|
-
return isAsciiLower(cp) || isAsciiUpper(cp);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
function isAsciiAlphaNumeric(cp) {
|
|
157
|
-
return isAsciiLetter(cp) || isAsciiDigit(cp);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
function isAsciiUpperHexDigit(cp) {
|
|
161
|
-
return cp >= $.LATIN_CAPITAL_A && cp <= $.LATIN_CAPITAL_F;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
function isAsciiLowerHexDigit(cp) {
|
|
165
|
-
return cp >= $.LATIN_SMALL_A && cp <= $.LATIN_SMALL_F;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
function isAsciiHexDigit(cp) {
|
|
169
|
-
return isAsciiDigit(cp) || isAsciiUpperHexDigit(cp) || isAsciiLowerHexDigit(cp);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
function toAsciiLowerCodePoint(cp) {
|
|
173
|
-
return cp + 0x0020;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
//NOTE: String.fromCharCode() function can handle only characters from BMP subset.
|
|
177
|
-
//So, we need to workaround this manually.
|
|
178
|
-
//(see: https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/fromCharCode#Getting_it_to_work_with_higher_values)
|
|
179
|
-
function toChar(cp) {
|
|
180
|
-
if (cp <= 0xffff) {
|
|
181
|
-
return String.fromCharCode(cp);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
cp -= 0x10000;
|
|
185
|
-
return String.fromCharCode(((cp >>> 10) & 0x3ff) | 0xd800) + String.fromCharCode(0xdc00 | (cp & 0x3ff));
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
function toAsciiLowerChar(cp) {
|
|
189
|
-
return String.fromCharCode(toAsciiLowerCodePoint(cp));
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
function findNamedEntityTreeBranch(nodeIx, cp) {
|
|
193
|
-
const branchCount = neTree[++nodeIx];
|
|
194
|
-
let lo = ++nodeIx;
|
|
195
|
-
let hi = lo + branchCount - 1;
|
|
196
|
-
|
|
197
|
-
while (lo <= hi) {
|
|
198
|
-
const mid = (lo + hi) >>> 1;
|
|
199
|
-
const midCp = neTree[mid];
|
|
200
|
-
|
|
201
|
-
if (midCp < cp) {
|
|
202
|
-
lo = mid + 1;
|
|
203
|
-
} else if (midCp > cp) {
|
|
204
|
-
hi = mid - 1;
|
|
205
|
-
} else {
|
|
206
|
-
return neTree[mid + branchCount];
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
return -1;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
//Tokenizer
|
|
214
|
-
class Tokenizer {
|
|
215
|
-
constructor() {
|
|
216
|
-
this.preprocessor = new Preprocessor();
|
|
217
|
-
|
|
218
|
-
this.tokenQueue = [];
|
|
219
|
-
|
|
220
|
-
this.allowCDATA = false;
|
|
221
|
-
|
|
222
|
-
this.state = DATA_STATE;
|
|
223
|
-
this.returnState = '';
|
|
224
|
-
|
|
225
|
-
this.charRefCode = -1;
|
|
226
|
-
this.tempBuff = [];
|
|
227
|
-
this.lastStartTagName = '';
|
|
228
|
-
|
|
229
|
-
this.consumedAfterSnapshot = -1;
|
|
230
|
-
this.active = false;
|
|
231
|
-
|
|
232
|
-
this.currentCharacterToken = null;
|
|
233
|
-
this.currentToken = null;
|
|
234
|
-
this.currentAttr = null;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
//Errors
|
|
238
|
-
_err() {
|
|
239
|
-
// NOTE: err reporting is noop by default. Enabled by mixin.
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
_errOnNextCodePoint(err) {
|
|
243
|
-
this._consume();
|
|
244
|
-
this._err(err);
|
|
245
|
-
this._unconsume();
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
//API
|
|
249
|
-
getNextToken() {
|
|
250
|
-
while (!this.tokenQueue.length && this.active) {
|
|
251
|
-
this.consumedAfterSnapshot = 0;
|
|
252
|
-
|
|
253
|
-
const cp = this._consume();
|
|
254
|
-
|
|
255
|
-
if (!this._ensureHibernation()) {
|
|
256
|
-
this[this.state](cp);
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
return this.tokenQueue.shift();
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
write(chunk, isLastChunk) {
|
|
264
|
-
this.active = true;
|
|
265
|
-
this.preprocessor.write(chunk, isLastChunk);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
insertHtmlAtCurrentPos(chunk) {
|
|
269
|
-
this.active = true;
|
|
270
|
-
this.preprocessor.insertHtmlAtCurrentPos(chunk);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
//Hibernation
|
|
274
|
-
_ensureHibernation() {
|
|
275
|
-
if (this.preprocessor.endOfChunkHit) {
|
|
276
|
-
for (; this.consumedAfterSnapshot > 0; this.consumedAfterSnapshot--) {
|
|
277
|
-
this.preprocessor.retreat();
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
this.active = false;
|
|
281
|
-
this.tokenQueue.push({ type: Tokenizer.HIBERNATION_TOKEN });
|
|
282
|
-
|
|
283
|
-
return true;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
return false;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
//Consumption
|
|
290
|
-
_consume() {
|
|
291
|
-
this.consumedAfterSnapshot++;
|
|
292
|
-
return this.preprocessor.advance();
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
_unconsume() {
|
|
296
|
-
this.consumedAfterSnapshot--;
|
|
297
|
-
this.preprocessor.retreat();
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
_reconsumeInState(state) {
|
|
301
|
-
this.state = state;
|
|
302
|
-
this._unconsume();
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
_consumeSequenceIfMatch(pattern, startCp, caseSensitive) {
|
|
306
|
-
let consumedCount = 0;
|
|
307
|
-
let isMatch = true;
|
|
308
|
-
const patternLength = pattern.length;
|
|
309
|
-
let patternPos = 0;
|
|
310
|
-
let cp = startCp;
|
|
311
|
-
let patternCp = void 0;
|
|
312
|
-
|
|
313
|
-
for (; patternPos < patternLength; patternPos++) {
|
|
314
|
-
if (patternPos > 0) {
|
|
315
|
-
cp = this._consume();
|
|
316
|
-
consumedCount++;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
if (cp === $.EOF) {
|
|
320
|
-
isMatch = false;
|
|
321
|
-
break;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
patternCp = pattern[patternPos];
|
|
325
|
-
|
|
326
|
-
if (cp !== patternCp && (caseSensitive || cp !== toAsciiLowerCodePoint(patternCp))) {
|
|
327
|
-
isMatch = false;
|
|
328
|
-
break;
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
if (!isMatch) {
|
|
333
|
-
while (consumedCount--) {
|
|
334
|
-
this._unconsume();
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
return isMatch;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
//Temp buffer
|
|
342
|
-
_isTempBufferEqualToScriptString() {
|
|
343
|
-
if (this.tempBuff.length !== $$.SCRIPT_STRING.length) {
|
|
344
|
-
return false;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
for (let i = 0; i < this.tempBuff.length; i++) {
|
|
348
|
-
if (this.tempBuff[i] !== $$.SCRIPT_STRING[i]) {
|
|
349
|
-
return false;
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
return true;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
//Token creation
|
|
357
|
-
_createStartTagToken() {
|
|
358
|
-
this.currentToken = {
|
|
359
|
-
type: Tokenizer.START_TAG_TOKEN,
|
|
360
|
-
tagName: '',
|
|
361
|
-
selfClosing: false,
|
|
362
|
-
ackSelfClosing: false,
|
|
363
|
-
attrs: []
|
|
364
|
-
};
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
_createEndTagToken() {
|
|
368
|
-
this.currentToken = {
|
|
369
|
-
type: Tokenizer.END_TAG_TOKEN,
|
|
370
|
-
tagName: '',
|
|
371
|
-
selfClosing: false,
|
|
372
|
-
attrs: []
|
|
373
|
-
};
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
_createCommentToken() {
|
|
377
|
-
this.currentToken = {
|
|
378
|
-
type: Tokenizer.COMMENT_TOKEN,
|
|
379
|
-
data: ''
|
|
380
|
-
};
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
_createDoctypeToken(initialName) {
|
|
384
|
-
this.currentToken = {
|
|
385
|
-
type: Tokenizer.DOCTYPE_TOKEN,
|
|
386
|
-
name: initialName,
|
|
387
|
-
forceQuirks: false,
|
|
388
|
-
publicId: null,
|
|
389
|
-
systemId: null
|
|
390
|
-
};
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
_createCharacterToken(type, ch) {
|
|
394
|
-
this.currentCharacterToken = {
|
|
395
|
-
type: type,
|
|
396
|
-
chars: ch
|
|
397
|
-
};
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
_createEOFToken() {
|
|
401
|
-
this.currentToken = { type: Tokenizer.EOF_TOKEN };
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
//Tag attributes
|
|
405
|
-
_createAttr(attrNameFirstCh) {
|
|
406
|
-
this.currentAttr = {
|
|
407
|
-
name: attrNameFirstCh,
|
|
408
|
-
value: ''
|
|
409
|
-
};
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
_leaveAttrName(toState) {
|
|
413
|
-
if (Tokenizer.getTokenAttr(this.currentToken, this.currentAttr.name) === null) {
|
|
414
|
-
this.currentToken.attrs.push(this.currentAttr);
|
|
415
|
-
} else {
|
|
416
|
-
this._err(ERR.duplicateAttribute);
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
this.state = toState;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
_leaveAttrValue(toState) {
|
|
423
|
-
this.state = toState;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
//Token emission
|
|
427
|
-
_emitCurrentToken() {
|
|
428
|
-
this._emitCurrentCharacterToken();
|
|
429
|
-
|
|
430
|
-
const ct = this.currentToken;
|
|
431
|
-
|
|
432
|
-
this.currentToken = null;
|
|
433
|
-
|
|
434
|
-
//NOTE: store emited start tag's tagName to determine is the following end tag token is appropriate.
|
|
435
|
-
if (ct.type === Tokenizer.START_TAG_TOKEN) {
|
|
436
|
-
this.lastStartTagName = ct.tagName;
|
|
437
|
-
} else if (ct.type === Tokenizer.END_TAG_TOKEN) {
|
|
438
|
-
if (ct.attrs.length > 0) {
|
|
439
|
-
this._err(ERR.endTagWithAttributes);
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
if (ct.selfClosing) {
|
|
443
|
-
this._err(ERR.endTagWithTrailingSolidus);
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
this.tokenQueue.push(ct);
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
_emitCurrentCharacterToken() {
|
|
451
|
-
if (this.currentCharacterToken) {
|
|
452
|
-
this.tokenQueue.push(this.currentCharacterToken);
|
|
453
|
-
this.currentCharacterToken = null;
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
_emitEOFToken() {
|
|
458
|
-
this._createEOFToken();
|
|
459
|
-
this._emitCurrentToken();
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
//Characters emission
|
|
463
|
-
|
|
464
|
-
//OPTIMIZATION: specification uses only one type of character tokens (one token per character).
|
|
465
|
-
//This causes a huge memory overhead and a lot of unnecessary parser loops. parse5 uses 3 groups of characters.
|
|
466
|
-
//If we have a sequence of characters that belong to the same group, parser can process it
|
|
467
|
-
//as a single solid character token.
|
|
468
|
-
//So, there are 3 types of character tokens in parse5:
|
|
469
|
-
//1)NULL_CHARACTER_TOKEN - \u0000-character sequences (e.g. '\u0000\u0000\u0000')
|
|
470
|
-
//2)WHITESPACE_CHARACTER_TOKEN - any whitespace/new-line character sequences (e.g. '\n \r\t \f')
|
|
471
|
-
//3)CHARACTER_TOKEN - any character sequence which don't belong to groups 1 and 2 (e.g. 'abcdef1234@@#$%^')
|
|
472
|
-
_appendCharToCurrentCharacterToken(type, ch) {
|
|
473
|
-
if (this.currentCharacterToken && this.currentCharacterToken.type !== type) {
|
|
474
|
-
this._emitCurrentCharacterToken();
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
if (this.currentCharacterToken) {
|
|
478
|
-
this.currentCharacterToken.chars += ch;
|
|
479
|
-
} else {
|
|
480
|
-
this._createCharacterToken(type, ch);
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
_emitCodePoint(cp) {
|
|
485
|
-
let type = Tokenizer.CHARACTER_TOKEN;
|
|
486
|
-
|
|
487
|
-
if (isWhitespace(cp)) {
|
|
488
|
-
type = Tokenizer.WHITESPACE_CHARACTER_TOKEN;
|
|
489
|
-
} else if (cp === $.NULL) {
|
|
490
|
-
type = Tokenizer.NULL_CHARACTER_TOKEN;
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
this._appendCharToCurrentCharacterToken(type, toChar(cp));
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
_emitSeveralCodePoints(codePoints) {
|
|
497
|
-
for (let i = 0; i < codePoints.length; i++) {
|
|
498
|
-
this._emitCodePoint(codePoints[i]);
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
//NOTE: used then we emit character explicitly. This is always a non-whitespace and a non-null character.
|
|
503
|
-
//So we can avoid additional checks here.
|
|
504
|
-
_emitChars(ch) {
|
|
505
|
-
this._appendCharToCurrentCharacterToken(Tokenizer.CHARACTER_TOKEN, ch);
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
// Character reference helpers
|
|
509
|
-
_matchNamedCharacterReference(startCp) {
|
|
510
|
-
let result = null;
|
|
511
|
-
let excess = 1;
|
|
512
|
-
let i = findNamedEntityTreeBranch(0, startCp);
|
|
513
|
-
|
|
514
|
-
this.tempBuff.push(startCp);
|
|
515
|
-
|
|
516
|
-
while (i > -1) {
|
|
517
|
-
const current = neTree[i];
|
|
518
|
-
const inNode = current < MAX_BRANCH_MARKER_VALUE;
|
|
519
|
-
const nodeWithData = inNode && current & HAS_DATA_FLAG;
|
|
520
|
-
|
|
521
|
-
if (nodeWithData) {
|
|
522
|
-
//NOTE: we use greedy search, so we continue lookup at this point
|
|
523
|
-
result = current & DATA_DUPLET_FLAG ? [neTree[++i], neTree[++i]] : [neTree[++i]];
|
|
524
|
-
excess = 0;
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
const cp = this._consume();
|
|
528
|
-
|
|
529
|
-
this.tempBuff.push(cp);
|
|
530
|
-
excess++;
|
|
531
|
-
|
|
532
|
-
if (cp === $.EOF) {
|
|
533
|
-
break;
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
if (inNode) {
|
|
537
|
-
i = current & HAS_BRANCHES_FLAG ? findNamedEntityTreeBranch(i, cp) : -1;
|
|
538
|
-
} else {
|
|
539
|
-
i = cp === current ? ++i : -1;
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
while (excess--) {
|
|
544
|
-
this.tempBuff.pop();
|
|
545
|
-
this._unconsume();
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
return result;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
_isCharacterReferenceInAttribute() {
|
|
552
|
-
return (
|
|
553
|
-
this.returnState === ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE ||
|
|
554
|
-
this.returnState === ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE ||
|
|
555
|
-
this.returnState === ATTRIBUTE_VALUE_UNQUOTED_STATE
|
|
556
|
-
);
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
_isCharacterReferenceAttributeQuirk(withSemicolon) {
|
|
560
|
-
if (!withSemicolon && this._isCharacterReferenceInAttribute()) {
|
|
561
|
-
const nextCp = this._consume();
|
|
562
|
-
|
|
563
|
-
this._unconsume();
|
|
564
|
-
|
|
565
|
-
return nextCp === $.EQUALS_SIGN || isAsciiAlphaNumeric(nextCp);
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
return false;
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
_flushCodePointsConsumedAsCharacterReference() {
|
|
572
|
-
if (this._isCharacterReferenceInAttribute()) {
|
|
573
|
-
for (let i = 0; i < this.tempBuff.length; i++) {
|
|
574
|
-
this.currentAttr.value += toChar(this.tempBuff[i]);
|
|
575
|
-
}
|
|
576
|
-
} else {
|
|
577
|
-
this._emitSeveralCodePoints(this.tempBuff);
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
this.tempBuff = [];
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
// State machine
|
|
584
|
-
|
|
585
|
-
// Data state
|
|
586
|
-
//------------------------------------------------------------------
|
|
587
|
-
[DATA_STATE](cp) {
|
|
588
|
-
this.preprocessor.dropParsedChunk();
|
|
589
|
-
|
|
590
|
-
if (cp === $.LESS_THAN_SIGN) {
|
|
591
|
-
this.state = TAG_OPEN_STATE;
|
|
592
|
-
} else if (cp === $.AMPERSAND) {
|
|
593
|
-
this.returnState = DATA_STATE;
|
|
594
|
-
this.state = CHARACTER_REFERENCE_STATE;
|
|
595
|
-
} else if (cp === $.NULL) {
|
|
596
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
597
|
-
this._emitCodePoint(cp);
|
|
598
|
-
} else if (cp === $.EOF) {
|
|
599
|
-
this._emitEOFToken();
|
|
600
|
-
} else {
|
|
601
|
-
this._emitCodePoint(cp);
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
// RCDATA state
|
|
606
|
-
//------------------------------------------------------------------
|
|
607
|
-
[RCDATA_STATE](cp) {
|
|
608
|
-
this.preprocessor.dropParsedChunk();
|
|
609
|
-
|
|
610
|
-
if (cp === $.AMPERSAND) {
|
|
611
|
-
this.returnState = RCDATA_STATE;
|
|
612
|
-
this.state = CHARACTER_REFERENCE_STATE;
|
|
613
|
-
} else if (cp === $.LESS_THAN_SIGN) {
|
|
614
|
-
this.state = RCDATA_LESS_THAN_SIGN_STATE;
|
|
615
|
-
} else if (cp === $.NULL) {
|
|
616
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
617
|
-
this._emitChars(unicode.REPLACEMENT_CHARACTER);
|
|
618
|
-
} else if (cp === $.EOF) {
|
|
619
|
-
this._emitEOFToken();
|
|
620
|
-
} else {
|
|
621
|
-
this._emitCodePoint(cp);
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
// RAWTEXT state
|
|
626
|
-
//------------------------------------------------------------------
|
|
627
|
-
[RAWTEXT_STATE](cp) {
|
|
628
|
-
this.preprocessor.dropParsedChunk();
|
|
629
|
-
|
|
630
|
-
if (cp === $.LESS_THAN_SIGN) {
|
|
631
|
-
this.state = RAWTEXT_LESS_THAN_SIGN_STATE;
|
|
632
|
-
} else if (cp === $.NULL) {
|
|
633
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
634
|
-
this._emitChars(unicode.REPLACEMENT_CHARACTER);
|
|
635
|
-
} else if (cp === $.EOF) {
|
|
636
|
-
this._emitEOFToken();
|
|
637
|
-
} else {
|
|
638
|
-
this._emitCodePoint(cp);
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
// Script data state
|
|
643
|
-
//------------------------------------------------------------------
|
|
644
|
-
[SCRIPT_DATA_STATE](cp) {
|
|
645
|
-
this.preprocessor.dropParsedChunk();
|
|
646
|
-
|
|
647
|
-
if (cp === $.LESS_THAN_SIGN) {
|
|
648
|
-
this.state = SCRIPT_DATA_LESS_THAN_SIGN_STATE;
|
|
649
|
-
} else if (cp === $.NULL) {
|
|
650
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
651
|
-
this._emitChars(unicode.REPLACEMENT_CHARACTER);
|
|
652
|
-
} else if (cp === $.EOF) {
|
|
653
|
-
this._emitEOFToken();
|
|
654
|
-
} else {
|
|
655
|
-
this._emitCodePoint(cp);
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
// PLAINTEXT state
|
|
660
|
-
//------------------------------------------------------------------
|
|
661
|
-
[PLAINTEXT_STATE](cp) {
|
|
662
|
-
this.preprocessor.dropParsedChunk();
|
|
663
|
-
|
|
664
|
-
if (cp === $.NULL) {
|
|
665
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
666
|
-
this._emitChars(unicode.REPLACEMENT_CHARACTER);
|
|
667
|
-
} else if (cp === $.EOF) {
|
|
668
|
-
this._emitEOFToken();
|
|
669
|
-
} else {
|
|
670
|
-
this._emitCodePoint(cp);
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
// Tag open state
|
|
675
|
-
//------------------------------------------------------------------
|
|
676
|
-
[TAG_OPEN_STATE](cp) {
|
|
677
|
-
if (cp === $.EXCLAMATION_MARK) {
|
|
678
|
-
this.state = MARKUP_DECLARATION_OPEN_STATE;
|
|
679
|
-
} else if (cp === $.SOLIDUS) {
|
|
680
|
-
this.state = END_TAG_OPEN_STATE;
|
|
681
|
-
} else if (isAsciiLetter(cp)) {
|
|
682
|
-
this._createStartTagToken();
|
|
683
|
-
this._reconsumeInState(TAG_NAME_STATE);
|
|
684
|
-
} else if (cp === $.QUESTION_MARK) {
|
|
685
|
-
this._err(ERR.unexpectedQuestionMarkInsteadOfTagName);
|
|
686
|
-
this._createCommentToken();
|
|
687
|
-
this._reconsumeInState(BOGUS_COMMENT_STATE);
|
|
688
|
-
} else if (cp === $.EOF) {
|
|
689
|
-
this._err(ERR.eofBeforeTagName);
|
|
690
|
-
this._emitChars('<');
|
|
691
|
-
this._emitEOFToken();
|
|
692
|
-
} else {
|
|
693
|
-
this._err(ERR.invalidFirstCharacterOfTagName);
|
|
694
|
-
this._emitChars('<');
|
|
695
|
-
this._reconsumeInState(DATA_STATE);
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
// End tag open state
|
|
700
|
-
//------------------------------------------------------------------
|
|
701
|
-
[END_TAG_OPEN_STATE](cp) {
|
|
702
|
-
if (isAsciiLetter(cp)) {
|
|
703
|
-
this._createEndTagToken();
|
|
704
|
-
this._reconsumeInState(TAG_NAME_STATE);
|
|
705
|
-
} else if (cp === $.GREATER_THAN_SIGN) {
|
|
706
|
-
this._err(ERR.missingEndTagName);
|
|
707
|
-
this.state = DATA_STATE;
|
|
708
|
-
} else if (cp === $.EOF) {
|
|
709
|
-
this._err(ERR.eofBeforeTagName);
|
|
710
|
-
this._emitChars('</');
|
|
711
|
-
this._emitEOFToken();
|
|
712
|
-
} else {
|
|
713
|
-
this._err(ERR.invalidFirstCharacterOfTagName);
|
|
714
|
-
this._createCommentToken();
|
|
715
|
-
this._reconsumeInState(BOGUS_COMMENT_STATE);
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
// Tag name state
|
|
720
|
-
//------------------------------------------------------------------
|
|
721
|
-
[TAG_NAME_STATE](cp) {
|
|
722
|
-
if (isWhitespace(cp)) {
|
|
723
|
-
this.state = BEFORE_ATTRIBUTE_NAME_STATE;
|
|
724
|
-
} else if (cp === $.SOLIDUS) {
|
|
725
|
-
this.state = SELF_CLOSING_START_TAG_STATE;
|
|
726
|
-
} else if (cp === $.GREATER_THAN_SIGN) {
|
|
727
|
-
this.state = DATA_STATE;
|
|
728
|
-
this._emitCurrentToken();
|
|
729
|
-
} else if (isAsciiUpper(cp)) {
|
|
730
|
-
this.currentToken.tagName += toAsciiLowerChar(cp);
|
|
731
|
-
} else if (cp === $.NULL) {
|
|
732
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
733
|
-
this.currentToken.tagName += unicode.REPLACEMENT_CHARACTER;
|
|
734
|
-
} else if (cp === $.EOF) {
|
|
735
|
-
this._err(ERR.eofInTag);
|
|
736
|
-
this._emitEOFToken();
|
|
737
|
-
} else {
|
|
738
|
-
this.currentToken.tagName += toChar(cp);
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
// RCDATA less-than sign state
|
|
743
|
-
//------------------------------------------------------------------
|
|
744
|
-
[RCDATA_LESS_THAN_SIGN_STATE](cp) {
|
|
745
|
-
if (cp === $.SOLIDUS) {
|
|
746
|
-
this.tempBuff = [];
|
|
747
|
-
this.state = RCDATA_END_TAG_OPEN_STATE;
|
|
748
|
-
} else {
|
|
749
|
-
this._emitChars('<');
|
|
750
|
-
this._reconsumeInState(RCDATA_STATE);
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
// RCDATA end tag open state
|
|
755
|
-
//------------------------------------------------------------------
|
|
756
|
-
[RCDATA_END_TAG_OPEN_STATE](cp) {
|
|
757
|
-
if (isAsciiLetter(cp)) {
|
|
758
|
-
this._createEndTagToken();
|
|
759
|
-
this._reconsumeInState(RCDATA_END_TAG_NAME_STATE);
|
|
760
|
-
} else {
|
|
761
|
-
this._emitChars('</');
|
|
762
|
-
this._reconsumeInState(RCDATA_STATE);
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
// RCDATA end tag name state
|
|
767
|
-
//------------------------------------------------------------------
|
|
768
|
-
[RCDATA_END_TAG_NAME_STATE](cp) {
|
|
769
|
-
if (isAsciiUpper(cp)) {
|
|
770
|
-
this.currentToken.tagName += toAsciiLowerChar(cp);
|
|
771
|
-
this.tempBuff.push(cp);
|
|
772
|
-
} else if (isAsciiLower(cp)) {
|
|
773
|
-
this.currentToken.tagName += toChar(cp);
|
|
774
|
-
this.tempBuff.push(cp);
|
|
775
|
-
} else {
|
|
776
|
-
if (this.lastStartTagName === this.currentToken.tagName) {
|
|
777
|
-
if (isWhitespace(cp)) {
|
|
778
|
-
this.state = BEFORE_ATTRIBUTE_NAME_STATE;
|
|
779
|
-
return;
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
if (cp === $.SOLIDUS) {
|
|
783
|
-
this.state = SELF_CLOSING_START_TAG_STATE;
|
|
784
|
-
return;
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
if (cp === $.GREATER_THAN_SIGN) {
|
|
788
|
-
this.state = DATA_STATE;
|
|
789
|
-
this._emitCurrentToken();
|
|
790
|
-
return;
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
this._emitChars('</');
|
|
795
|
-
this._emitSeveralCodePoints(this.tempBuff);
|
|
796
|
-
this._reconsumeInState(RCDATA_STATE);
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
// RAWTEXT less-than sign state
|
|
801
|
-
//------------------------------------------------------------------
|
|
802
|
-
[RAWTEXT_LESS_THAN_SIGN_STATE](cp) {
|
|
803
|
-
if (cp === $.SOLIDUS) {
|
|
804
|
-
this.tempBuff = [];
|
|
805
|
-
this.state = RAWTEXT_END_TAG_OPEN_STATE;
|
|
806
|
-
} else {
|
|
807
|
-
this._emitChars('<');
|
|
808
|
-
this._reconsumeInState(RAWTEXT_STATE);
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
// RAWTEXT end tag open state
|
|
813
|
-
//------------------------------------------------------------------
|
|
814
|
-
[RAWTEXT_END_TAG_OPEN_STATE](cp) {
|
|
815
|
-
if (isAsciiLetter(cp)) {
|
|
816
|
-
this._createEndTagToken();
|
|
817
|
-
this._reconsumeInState(RAWTEXT_END_TAG_NAME_STATE);
|
|
818
|
-
} else {
|
|
819
|
-
this._emitChars('</');
|
|
820
|
-
this._reconsumeInState(RAWTEXT_STATE);
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
// RAWTEXT end tag name state
|
|
825
|
-
//------------------------------------------------------------------
|
|
826
|
-
[RAWTEXT_END_TAG_NAME_STATE](cp) {
|
|
827
|
-
if (isAsciiUpper(cp)) {
|
|
828
|
-
this.currentToken.tagName += toAsciiLowerChar(cp);
|
|
829
|
-
this.tempBuff.push(cp);
|
|
830
|
-
} else if (isAsciiLower(cp)) {
|
|
831
|
-
this.currentToken.tagName += toChar(cp);
|
|
832
|
-
this.tempBuff.push(cp);
|
|
833
|
-
} else {
|
|
834
|
-
if (this.lastStartTagName === this.currentToken.tagName) {
|
|
835
|
-
if (isWhitespace(cp)) {
|
|
836
|
-
this.state = BEFORE_ATTRIBUTE_NAME_STATE;
|
|
837
|
-
return;
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
if (cp === $.SOLIDUS) {
|
|
841
|
-
this.state = SELF_CLOSING_START_TAG_STATE;
|
|
842
|
-
return;
|
|
843
|
-
}
|
|
844
|
-
|
|
845
|
-
if (cp === $.GREATER_THAN_SIGN) {
|
|
846
|
-
this._emitCurrentToken();
|
|
847
|
-
this.state = DATA_STATE;
|
|
848
|
-
return;
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
this._emitChars('</');
|
|
853
|
-
this._emitSeveralCodePoints(this.tempBuff);
|
|
854
|
-
this._reconsumeInState(RAWTEXT_STATE);
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
// Script data less-than sign state
|
|
859
|
-
//------------------------------------------------------------------
|
|
860
|
-
[SCRIPT_DATA_LESS_THAN_SIGN_STATE](cp) {
|
|
861
|
-
if (cp === $.SOLIDUS) {
|
|
862
|
-
this.tempBuff = [];
|
|
863
|
-
this.state = SCRIPT_DATA_END_TAG_OPEN_STATE;
|
|
864
|
-
} else if (cp === $.EXCLAMATION_MARK) {
|
|
865
|
-
this.state = SCRIPT_DATA_ESCAPE_START_STATE;
|
|
866
|
-
this._emitChars('<!');
|
|
867
|
-
} else {
|
|
868
|
-
this._emitChars('<');
|
|
869
|
-
this._reconsumeInState(SCRIPT_DATA_STATE);
|
|
870
|
-
}
|
|
871
|
-
}
|
|
872
|
-
|
|
873
|
-
// Script data end tag open state
|
|
874
|
-
//------------------------------------------------------------------
|
|
875
|
-
[SCRIPT_DATA_END_TAG_OPEN_STATE](cp) {
|
|
876
|
-
if (isAsciiLetter(cp)) {
|
|
877
|
-
this._createEndTagToken();
|
|
878
|
-
this._reconsumeInState(SCRIPT_DATA_END_TAG_NAME_STATE);
|
|
879
|
-
} else {
|
|
880
|
-
this._emitChars('</');
|
|
881
|
-
this._reconsumeInState(SCRIPT_DATA_STATE);
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
// Script data end tag name state
|
|
886
|
-
//------------------------------------------------------------------
|
|
887
|
-
[SCRIPT_DATA_END_TAG_NAME_STATE](cp) {
|
|
888
|
-
if (isAsciiUpper(cp)) {
|
|
889
|
-
this.currentToken.tagName += toAsciiLowerChar(cp);
|
|
890
|
-
this.tempBuff.push(cp);
|
|
891
|
-
} else if (isAsciiLower(cp)) {
|
|
892
|
-
this.currentToken.tagName += toChar(cp);
|
|
893
|
-
this.tempBuff.push(cp);
|
|
894
|
-
} else {
|
|
895
|
-
if (this.lastStartTagName === this.currentToken.tagName) {
|
|
896
|
-
if (isWhitespace(cp)) {
|
|
897
|
-
this.state = BEFORE_ATTRIBUTE_NAME_STATE;
|
|
898
|
-
return;
|
|
899
|
-
} else if (cp === $.SOLIDUS) {
|
|
900
|
-
this.state = SELF_CLOSING_START_TAG_STATE;
|
|
901
|
-
return;
|
|
902
|
-
} else if (cp === $.GREATER_THAN_SIGN) {
|
|
903
|
-
this._emitCurrentToken();
|
|
904
|
-
this.state = DATA_STATE;
|
|
905
|
-
return;
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
this._emitChars('</');
|
|
910
|
-
this._emitSeveralCodePoints(this.tempBuff);
|
|
911
|
-
this._reconsumeInState(SCRIPT_DATA_STATE);
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
// Script data escape start state
|
|
916
|
-
//------------------------------------------------------------------
|
|
917
|
-
[SCRIPT_DATA_ESCAPE_START_STATE](cp) {
|
|
918
|
-
if (cp === $.HYPHEN_MINUS) {
|
|
919
|
-
this.state = SCRIPT_DATA_ESCAPE_START_DASH_STATE;
|
|
920
|
-
this._emitChars('-');
|
|
921
|
-
} else {
|
|
922
|
-
this._reconsumeInState(SCRIPT_DATA_STATE);
|
|
923
|
-
}
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
// Script data escape start dash state
|
|
927
|
-
//------------------------------------------------------------------
|
|
928
|
-
[SCRIPT_DATA_ESCAPE_START_DASH_STATE](cp) {
|
|
929
|
-
if (cp === $.HYPHEN_MINUS) {
|
|
930
|
-
this.state = SCRIPT_DATA_ESCAPED_DASH_DASH_STATE;
|
|
931
|
-
this._emitChars('-');
|
|
932
|
-
} else {
|
|
933
|
-
this._reconsumeInState(SCRIPT_DATA_STATE);
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
// Script data escaped state
|
|
938
|
-
//------------------------------------------------------------------
|
|
939
|
-
[SCRIPT_DATA_ESCAPED_STATE](cp) {
|
|
940
|
-
if (cp === $.HYPHEN_MINUS) {
|
|
941
|
-
this.state = SCRIPT_DATA_ESCAPED_DASH_STATE;
|
|
942
|
-
this._emitChars('-');
|
|
943
|
-
} else if (cp === $.LESS_THAN_SIGN) {
|
|
944
|
-
this.state = SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE;
|
|
945
|
-
} else if (cp === $.NULL) {
|
|
946
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
947
|
-
this._emitChars(unicode.REPLACEMENT_CHARACTER);
|
|
948
|
-
} else if (cp === $.EOF) {
|
|
949
|
-
this._err(ERR.eofInScriptHtmlCommentLikeText);
|
|
950
|
-
this._emitEOFToken();
|
|
951
|
-
} else {
|
|
952
|
-
this._emitCodePoint(cp);
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
// Script data escaped dash state
|
|
957
|
-
//------------------------------------------------------------------
|
|
958
|
-
[SCRIPT_DATA_ESCAPED_DASH_STATE](cp) {
|
|
959
|
-
if (cp === $.HYPHEN_MINUS) {
|
|
960
|
-
this.state = SCRIPT_DATA_ESCAPED_DASH_DASH_STATE;
|
|
961
|
-
this._emitChars('-');
|
|
962
|
-
} else if (cp === $.LESS_THAN_SIGN) {
|
|
963
|
-
this.state = SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE;
|
|
964
|
-
} else if (cp === $.NULL) {
|
|
965
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
966
|
-
this.state = SCRIPT_DATA_ESCAPED_STATE;
|
|
967
|
-
this._emitChars(unicode.REPLACEMENT_CHARACTER);
|
|
968
|
-
} else if (cp === $.EOF) {
|
|
969
|
-
this._err(ERR.eofInScriptHtmlCommentLikeText);
|
|
970
|
-
this._emitEOFToken();
|
|
971
|
-
} else {
|
|
972
|
-
this.state = SCRIPT_DATA_ESCAPED_STATE;
|
|
973
|
-
this._emitCodePoint(cp);
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
|
-
|
|
977
|
-
// Script data escaped dash dash state
|
|
978
|
-
//------------------------------------------------------------------
|
|
979
|
-
[SCRIPT_DATA_ESCAPED_DASH_DASH_STATE](cp) {
|
|
980
|
-
if (cp === $.HYPHEN_MINUS) {
|
|
981
|
-
this._emitChars('-');
|
|
982
|
-
} else if (cp === $.LESS_THAN_SIGN) {
|
|
983
|
-
this.state = SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE;
|
|
984
|
-
} else if (cp === $.GREATER_THAN_SIGN) {
|
|
985
|
-
this.state = SCRIPT_DATA_STATE;
|
|
986
|
-
this._emitChars('>');
|
|
987
|
-
} else if (cp === $.NULL) {
|
|
988
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
989
|
-
this.state = SCRIPT_DATA_ESCAPED_STATE;
|
|
990
|
-
this._emitChars(unicode.REPLACEMENT_CHARACTER);
|
|
991
|
-
} else if (cp === $.EOF) {
|
|
992
|
-
this._err(ERR.eofInScriptHtmlCommentLikeText);
|
|
993
|
-
this._emitEOFToken();
|
|
994
|
-
} else {
|
|
995
|
-
this.state = SCRIPT_DATA_ESCAPED_STATE;
|
|
996
|
-
this._emitCodePoint(cp);
|
|
997
|
-
}
|
|
998
|
-
}
|
|
999
|
-
|
|
1000
|
-
// Script data escaped less-than sign state
|
|
1001
|
-
//------------------------------------------------------------------
|
|
1002
|
-
[SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE](cp) {
|
|
1003
|
-
if (cp === $.SOLIDUS) {
|
|
1004
|
-
this.tempBuff = [];
|
|
1005
|
-
this.state = SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE;
|
|
1006
|
-
} else if (isAsciiLetter(cp)) {
|
|
1007
|
-
this.tempBuff = [];
|
|
1008
|
-
this._emitChars('<');
|
|
1009
|
-
this._reconsumeInState(SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE);
|
|
1010
|
-
} else {
|
|
1011
|
-
this._emitChars('<');
|
|
1012
|
-
this._reconsumeInState(SCRIPT_DATA_ESCAPED_STATE);
|
|
1013
|
-
}
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
// Script data escaped end tag open state
|
|
1017
|
-
//------------------------------------------------------------------
|
|
1018
|
-
[SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE](cp) {
|
|
1019
|
-
if (isAsciiLetter(cp)) {
|
|
1020
|
-
this._createEndTagToken();
|
|
1021
|
-
this._reconsumeInState(SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE);
|
|
1022
|
-
} else {
|
|
1023
|
-
this._emitChars('</');
|
|
1024
|
-
this._reconsumeInState(SCRIPT_DATA_ESCAPED_STATE);
|
|
1025
|
-
}
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
|
-
// Script data escaped end tag name state
|
|
1029
|
-
//------------------------------------------------------------------
|
|
1030
|
-
[SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE](cp) {
|
|
1031
|
-
if (isAsciiUpper(cp)) {
|
|
1032
|
-
this.currentToken.tagName += toAsciiLowerChar(cp);
|
|
1033
|
-
this.tempBuff.push(cp);
|
|
1034
|
-
} else if (isAsciiLower(cp)) {
|
|
1035
|
-
this.currentToken.tagName += toChar(cp);
|
|
1036
|
-
this.tempBuff.push(cp);
|
|
1037
|
-
} else {
|
|
1038
|
-
if (this.lastStartTagName === this.currentToken.tagName) {
|
|
1039
|
-
if (isWhitespace(cp)) {
|
|
1040
|
-
this.state = BEFORE_ATTRIBUTE_NAME_STATE;
|
|
1041
|
-
return;
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
if (cp === $.SOLIDUS) {
|
|
1045
|
-
this.state = SELF_CLOSING_START_TAG_STATE;
|
|
1046
|
-
return;
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
if (cp === $.GREATER_THAN_SIGN) {
|
|
1050
|
-
this._emitCurrentToken();
|
|
1051
|
-
this.state = DATA_STATE;
|
|
1052
|
-
return;
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
|
|
1056
|
-
this._emitChars('</');
|
|
1057
|
-
this._emitSeveralCodePoints(this.tempBuff);
|
|
1058
|
-
this._reconsumeInState(SCRIPT_DATA_ESCAPED_STATE);
|
|
1059
|
-
}
|
|
1060
|
-
}
|
|
1061
|
-
|
|
1062
|
-
// Script data double escape start state
|
|
1063
|
-
//------------------------------------------------------------------
|
|
1064
|
-
[SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE](cp) {
|
|
1065
|
-
if (isWhitespace(cp) || cp === $.SOLIDUS || cp === $.GREATER_THAN_SIGN) {
|
|
1066
|
-
this.state = this._isTempBufferEqualToScriptString()
|
|
1067
|
-
? SCRIPT_DATA_DOUBLE_ESCAPED_STATE
|
|
1068
|
-
: SCRIPT_DATA_ESCAPED_STATE;
|
|
1069
|
-
this._emitCodePoint(cp);
|
|
1070
|
-
} else if (isAsciiUpper(cp)) {
|
|
1071
|
-
this.tempBuff.push(toAsciiLowerCodePoint(cp));
|
|
1072
|
-
this._emitCodePoint(cp);
|
|
1073
|
-
} else if (isAsciiLower(cp)) {
|
|
1074
|
-
this.tempBuff.push(cp);
|
|
1075
|
-
this._emitCodePoint(cp);
|
|
1076
|
-
} else {
|
|
1077
|
-
this._reconsumeInState(SCRIPT_DATA_ESCAPED_STATE);
|
|
1078
|
-
}
|
|
1079
|
-
}
|
|
1080
|
-
|
|
1081
|
-
// Script data double escaped state
|
|
1082
|
-
//------------------------------------------------------------------
|
|
1083
|
-
[SCRIPT_DATA_DOUBLE_ESCAPED_STATE](cp) {
|
|
1084
|
-
if (cp === $.HYPHEN_MINUS) {
|
|
1085
|
-
this.state = SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE;
|
|
1086
|
-
this._emitChars('-');
|
|
1087
|
-
} else if (cp === $.LESS_THAN_SIGN) {
|
|
1088
|
-
this.state = SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE;
|
|
1089
|
-
this._emitChars('<');
|
|
1090
|
-
} else if (cp === $.NULL) {
|
|
1091
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
1092
|
-
this._emitChars(unicode.REPLACEMENT_CHARACTER);
|
|
1093
|
-
} else if (cp === $.EOF) {
|
|
1094
|
-
this._err(ERR.eofInScriptHtmlCommentLikeText);
|
|
1095
|
-
this._emitEOFToken();
|
|
1096
|
-
} else {
|
|
1097
|
-
this._emitCodePoint(cp);
|
|
1098
|
-
}
|
|
1099
|
-
}
|
|
1100
|
-
|
|
1101
|
-
// Script data double escaped dash state
|
|
1102
|
-
//------------------------------------------------------------------
|
|
1103
|
-
[SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE](cp) {
|
|
1104
|
-
if (cp === $.HYPHEN_MINUS) {
|
|
1105
|
-
this.state = SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE;
|
|
1106
|
-
this._emitChars('-');
|
|
1107
|
-
} else if (cp === $.LESS_THAN_SIGN) {
|
|
1108
|
-
this.state = SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE;
|
|
1109
|
-
this._emitChars('<');
|
|
1110
|
-
} else if (cp === $.NULL) {
|
|
1111
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
1112
|
-
this.state = SCRIPT_DATA_DOUBLE_ESCAPED_STATE;
|
|
1113
|
-
this._emitChars(unicode.REPLACEMENT_CHARACTER);
|
|
1114
|
-
} else if (cp === $.EOF) {
|
|
1115
|
-
this._err(ERR.eofInScriptHtmlCommentLikeText);
|
|
1116
|
-
this._emitEOFToken();
|
|
1117
|
-
} else {
|
|
1118
|
-
this.state = SCRIPT_DATA_DOUBLE_ESCAPED_STATE;
|
|
1119
|
-
this._emitCodePoint(cp);
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
// Script data double escaped dash dash state
|
|
1124
|
-
//------------------------------------------------------------------
|
|
1125
|
-
[SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE](cp) {
|
|
1126
|
-
if (cp === $.HYPHEN_MINUS) {
|
|
1127
|
-
this._emitChars('-');
|
|
1128
|
-
} else if (cp === $.LESS_THAN_SIGN) {
|
|
1129
|
-
this.state = SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE;
|
|
1130
|
-
this._emitChars('<');
|
|
1131
|
-
} else if (cp === $.GREATER_THAN_SIGN) {
|
|
1132
|
-
this.state = SCRIPT_DATA_STATE;
|
|
1133
|
-
this._emitChars('>');
|
|
1134
|
-
} else if (cp === $.NULL) {
|
|
1135
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
1136
|
-
this.state = SCRIPT_DATA_DOUBLE_ESCAPED_STATE;
|
|
1137
|
-
this._emitChars(unicode.REPLACEMENT_CHARACTER);
|
|
1138
|
-
} else if (cp === $.EOF) {
|
|
1139
|
-
this._err(ERR.eofInScriptHtmlCommentLikeText);
|
|
1140
|
-
this._emitEOFToken();
|
|
1141
|
-
} else {
|
|
1142
|
-
this.state = SCRIPT_DATA_DOUBLE_ESCAPED_STATE;
|
|
1143
|
-
this._emitCodePoint(cp);
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
|
-
// Script data double escaped less-than sign state
|
|
1148
|
-
//------------------------------------------------------------------
|
|
1149
|
-
[SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE](cp) {
|
|
1150
|
-
if (cp === $.SOLIDUS) {
|
|
1151
|
-
this.tempBuff = [];
|
|
1152
|
-
this.state = SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE;
|
|
1153
|
-
this._emitChars('/');
|
|
1154
|
-
} else {
|
|
1155
|
-
this._reconsumeInState(SCRIPT_DATA_DOUBLE_ESCAPED_STATE);
|
|
1156
|
-
}
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
|
-
// Script data double escape end state
|
|
1160
|
-
//------------------------------------------------------------------
|
|
1161
|
-
[SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE](cp) {
|
|
1162
|
-
if (isWhitespace(cp) || cp === $.SOLIDUS || cp === $.GREATER_THAN_SIGN) {
|
|
1163
|
-
this.state = this._isTempBufferEqualToScriptString()
|
|
1164
|
-
? SCRIPT_DATA_ESCAPED_STATE
|
|
1165
|
-
: SCRIPT_DATA_DOUBLE_ESCAPED_STATE;
|
|
1166
|
-
|
|
1167
|
-
this._emitCodePoint(cp);
|
|
1168
|
-
} else if (isAsciiUpper(cp)) {
|
|
1169
|
-
this.tempBuff.push(toAsciiLowerCodePoint(cp));
|
|
1170
|
-
this._emitCodePoint(cp);
|
|
1171
|
-
} else if (isAsciiLower(cp)) {
|
|
1172
|
-
this.tempBuff.push(cp);
|
|
1173
|
-
this._emitCodePoint(cp);
|
|
1174
|
-
} else {
|
|
1175
|
-
this._reconsumeInState(SCRIPT_DATA_DOUBLE_ESCAPED_STATE);
|
|
1176
|
-
}
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
|
-
// Before attribute name state
|
|
1180
|
-
//------------------------------------------------------------------
|
|
1181
|
-
[BEFORE_ATTRIBUTE_NAME_STATE](cp) {
|
|
1182
|
-
if (isWhitespace(cp)) {
|
|
1183
|
-
return;
|
|
1184
|
-
}
|
|
1185
|
-
|
|
1186
|
-
if (cp === $.SOLIDUS || cp === $.GREATER_THAN_SIGN || cp === $.EOF) {
|
|
1187
|
-
this._reconsumeInState(AFTER_ATTRIBUTE_NAME_STATE);
|
|
1188
|
-
} else if (cp === $.EQUALS_SIGN) {
|
|
1189
|
-
this._err(ERR.unexpectedEqualsSignBeforeAttributeName);
|
|
1190
|
-
this._createAttr('=');
|
|
1191
|
-
this.state = ATTRIBUTE_NAME_STATE;
|
|
1192
|
-
} else {
|
|
1193
|
-
this._createAttr('');
|
|
1194
|
-
this._reconsumeInState(ATTRIBUTE_NAME_STATE);
|
|
1195
|
-
}
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
// Attribute name state
|
|
1199
|
-
//------------------------------------------------------------------
|
|
1200
|
-
[ATTRIBUTE_NAME_STATE](cp) {
|
|
1201
|
-
if (isWhitespace(cp) || cp === $.SOLIDUS || cp === $.GREATER_THAN_SIGN || cp === $.EOF) {
|
|
1202
|
-
this._leaveAttrName(AFTER_ATTRIBUTE_NAME_STATE);
|
|
1203
|
-
this._unconsume();
|
|
1204
|
-
} else if (cp === $.EQUALS_SIGN) {
|
|
1205
|
-
this._leaveAttrName(BEFORE_ATTRIBUTE_VALUE_STATE);
|
|
1206
|
-
} else if (isAsciiUpper(cp)) {
|
|
1207
|
-
this.currentAttr.name += toAsciiLowerChar(cp);
|
|
1208
|
-
} else if (cp === $.QUOTATION_MARK || cp === $.APOSTROPHE || cp === $.LESS_THAN_SIGN) {
|
|
1209
|
-
this._err(ERR.unexpectedCharacterInAttributeName);
|
|
1210
|
-
this.currentAttr.name += toChar(cp);
|
|
1211
|
-
} else if (cp === $.NULL) {
|
|
1212
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
1213
|
-
this.currentAttr.name += unicode.REPLACEMENT_CHARACTER;
|
|
1214
|
-
} else {
|
|
1215
|
-
this.currentAttr.name += toChar(cp);
|
|
1216
|
-
}
|
|
1217
|
-
}
|
|
1218
|
-
|
|
1219
|
-
// After attribute name state
|
|
1220
|
-
//------------------------------------------------------------------
|
|
1221
|
-
[AFTER_ATTRIBUTE_NAME_STATE](cp) {
|
|
1222
|
-
if (isWhitespace(cp)) {
|
|
1223
|
-
return;
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
if (cp === $.SOLIDUS) {
|
|
1227
|
-
this.state = SELF_CLOSING_START_TAG_STATE;
|
|
1228
|
-
} else if (cp === $.EQUALS_SIGN) {
|
|
1229
|
-
this.state = BEFORE_ATTRIBUTE_VALUE_STATE;
|
|
1230
|
-
} else if (cp === $.GREATER_THAN_SIGN) {
|
|
1231
|
-
this.state = DATA_STATE;
|
|
1232
|
-
this._emitCurrentToken();
|
|
1233
|
-
} else if (cp === $.EOF) {
|
|
1234
|
-
this._err(ERR.eofInTag);
|
|
1235
|
-
this._emitEOFToken();
|
|
1236
|
-
} else {
|
|
1237
|
-
this._createAttr('');
|
|
1238
|
-
this._reconsumeInState(ATTRIBUTE_NAME_STATE);
|
|
1239
|
-
}
|
|
1240
|
-
}
|
|
1241
|
-
|
|
1242
|
-
// Before attribute value state
|
|
1243
|
-
//------------------------------------------------------------------
|
|
1244
|
-
[BEFORE_ATTRIBUTE_VALUE_STATE](cp) {
|
|
1245
|
-
if (isWhitespace(cp)) {
|
|
1246
|
-
return;
|
|
1247
|
-
}
|
|
1248
|
-
|
|
1249
|
-
if (cp === $.QUOTATION_MARK) {
|
|
1250
|
-
this.state = ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE;
|
|
1251
|
-
} else if (cp === $.APOSTROPHE) {
|
|
1252
|
-
this.state = ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE;
|
|
1253
|
-
} else if (cp === $.GREATER_THAN_SIGN) {
|
|
1254
|
-
this._err(ERR.missingAttributeValue);
|
|
1255
|
-
this.state = DATA_STATE;
|
|
1256
|
-
this._emitCurrentToken();
|
|
1257
|
-
} else {
|
|
1258
|
-
this._reconsumeInState(ATTRIBUTE_VALUE_UNQUOTED_STATE);
|
|
1259
|
-
}
|
|
1260
|
-
}
|
|
1261
|
-
|
|
1262
|
-
// Attribute value (double-quoted) state
|
|
1263
|
-
//------------------------------------------------------------------
|
|
1264
|
-
[ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE](cp) {
|
|
1265
|
-
if (cp === $.QUOTATION_MARK) {
|
|
1266
|
-
this.state = AFTER_ATTRIBUTE_VALUE_QUOTED_STATE;
|
|
1267
|
-
} else if (cp === $.AMPERSAND) {
|
|
1268
|
-
this.returnState = ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE;
|
|
1269
|
-
this.state = CHARACTER_REFERENCE_STATE;
|
|
1270
|
-
} else if (cp === $.NULL) {
|
|
1271
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
1272
|
-
this.currentAttr.value += unicode.REPLACEMENT_CHARACTER;
|
|
1273
|
-
} else if (cp === $.EOF) {
|
|
1274
|
-
this._err(ERR.eofInTag);
|
|
1275
|
-
this._emitEOFToken();
|
|
1276
|
-
} else {
|
|
1277
|
-
this.currentAttr.value += toChar(cp);
|
|
1278
|
-
}
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
// Attribute value (single-quoted) state
|
|
1282
|
-
//------------------------------------------------------------------
|
|
1283
|
-
[ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE](cp) {
|
|
1284
|
-
if (cp === $.APOSTROPHE) {
|
|
1285
|
-
this.state = AFTER_ATTRIBUTE_VALUE_QUOTED_STATE;
|
|
1286
|
-
} else if (cp === $.AMPERSAND) {
|
|
1287
|
-
this.returnState = ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE;
|
|
1288
|
-
this.state = CHARACTER_REFERENCE_STATE;
|
|
1289
|
-
} else if (cp === $.NULL) {
|
|
1290
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
1291
|
-
this.currentAttr.value += unicode.REPLACEMENT_CHARACTER;
|
|
1292
|
-
} else if (cp === $.EOF) {
|
|
1293
|
-
this._err(ERR.eofInTag);
|
|
1294
|
-
this._emitEOFToken();
|
|
1295
|
-
} else {
|
|
1296
|
-
this.currentAttr.value += toChar(cp);
|
|
1297
|
-
}
|
|
1298
|
-
}
|
|
1299
|
-
|
|
1300
|
-
// Attribute value (unquoted) state
|
|
1301
|
-
//------------------------------------------------------------------
|
|
1302
|
-
[ATTRIBUTE_VALUE_UNQUOTED_STATE](cp) {
|
|
1303
|
-
if (isWhitespace(cp)) {
|
|
1304
|
-
this._leaveAttrValue(BEFORE_ATTRIBUTE_NAME_STATE);
|
|
1305
|
-
} else if (cp === $.AMPERSAND) {
|
|
1306
|
-
this.returnState = ATTRIBUTE_VALUE_UNQUOTED_STATE;
|
|
1307
|
-
this.state = CHARACTER_REFERENCE_STATE;
|
|
1308
|
-
} else if (cp === $.GREATER_THAN_SIGN) {
|
|
1309
|
-
this._leaveAttrValue(DATA_STATE);
|
|
1310
|
-
this._emitCurrentToken();
|
|
1311
|
-
} else if (cp === $.NULL) {
|
|
1312
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
1313
|
-
this.currentAttr.value += unicode.REPLACEMENT_CHARACTER;
|
|
1314
|
-
} else if (
|
|
1315
|
-
cp === $.QUOTATION_MARK ||
|
|
1316
|
-
cp === $.APOSTROPHE ||
|
|
1317
|
-
cp === $.LESS_THAN_SIGN ||
|
|
1318
|
-
cp === $.EQUALS_SIGN ||
|
|
1319
|
-
cp === $.GRAVE_ACCENT
|
|
1320
|
-
) {
|
|
1321
|
-
this._err(ERR.unexpectedCharacterInUnquotedAttributeValue);
|
|
1322
|
-
this.currentAttr.value += toChar(cp);
|
|
1323
|
-
} else if (cp === $.EOF) {
|
|
1324
|
-
this._err(ERR.eofInTag);
|
|
1325
|
-
this._emitEOFToken();
|
|
1326
|
-
} else {
|
|
1327
|
-
this.currentAttr.value += toChar(cp);
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
|
|
1331
|
-
// After attribute value (quoted) state
|
|
1332
|
-
//------------------------------------------------------------------
|
|
1333
|
-
[AFTER_ATTRIBUTE_VALUE_QUOTED_STATE](cp) {
|
|
1334
|
-
if (isWhitespace(cp)) {
|
|
1335
|
-
this._leaveAttrValue(BEFORE_ATTRIBUTE_NAME_STATE);
|
|
1336
|
-
} else if (cp === $.SOLIDUS) {
|
|
1337
|
-
this._leaveAttrValue(SELF_CLOSING_START_TAG_STATE);
|
|
1338
|
-
} else if (cp === $.GREATER_THAN_SIGN) {
|
|
1339
|
-
this._leaveAttrValue(DATA_STATE);
|
|
1340
|
-
this._emitCurrentToken();
|
|
1341
|
-
} else if (cp === $.EOF) {
|
|
1342
|
-
this._err(ERR.eofInTag);
|
|
1343
|
-
this._emitEOFToken();
|
|
1344
|
-
} else {
|
|
1345
|
-
this._err(ERR.missingWhitespaceBetweenAttributes);
|
|
1346
|
-
this._reconsumeInState(BEFORE_ATTRIBUTE_NAME_STATE);
|
|
1347
|
-
}
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
// Self-closing start tag state
|
|
1351
|
-
//------------------------------------------------------------------
|
|
1352
|
-
[SELF_CLOSING_START_TAG_STATE](cp) {
|
|
1353
|
-
if (cp === $.GREATER_THAN_SIGN) {
|
|
1354
|
-
this.currentToken.selfClosing = true;
|
|
1355
|
-
this.state = DATA_STATE;
|
|
1356
|
-
this._emitCurrentToken();
|
|
1357
|
-
} else if (cp === $.EOF) {
|
|
1358
|
-
this._err(ERR.eofInTag);
|
|
1359
|
-
this._emitEOFToken();
|
|
1360
|
-
} else {
|
|
1361
|
-
this._err(ERR.unexpectedSolidusInTag);
|
|
1362
|
-
this._reconsumeInState(BEFORE_ATTRIBUTE_NAME_STATE);
|
|
1363
|
-
}
|
|
1364
|
-
}
|
|
1365
|
-
|
|
1366
|
-
// Bogus comment state
|
|
1367
|
-
//------------------------------------------------------------------
|
|
1368
|
-
[BOGUS_COMMENT_STATE](cp) {
|
|
1369
|
-
if (cp === $.GREATER_THAN_SIGN) {
|
|
1370
|
-
this.state = DATA_STATE;
|
|
1371
|
-
this._emitCurrentToken();
|
|
1372
|
-
} else if (cp === $.EOF) {
|
|
1373
|
-
this._emitCurrentToken();
|
|
1374
|
-
this._emitEOFToken();
|
|
1375
|
-
} else if (cp === $.NULL) {
|
|
1376
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
1377
|
-
this.currentToken.data += unicode.REPLACEMENT_CHARACTER;
|
|
1378
|
-
} else {
|
|
1379
|
-
this.currentToken.data += toChar(cp);
|
|
1380
|
-
}
|
|
1381
|
-
}
|
|
1382
|
-
|
|
1383
|
-
// Markup declaration open state
|
|
1384
|
-
//------------------------------------------------------------------
|
|
1385
|
-
[MARKUP_DECLARATION_OPEN_STATE](cp) {
|
|
1386
|
-
if (this._consumeSequenceIfMatch($$.DASH_DASH_STRING, cp, true)) {
|
|
1387
|
-
this._createCommentToken();
|
|
1388
|
-
this.state = COMMENT_START_STATE;
|
|
1389
|
-
} else if (this._consumeSequenceIfMatch($$.DOCTYPE_STRING, cp, false)) {
|
|
1390
|
-
this.state = DOCTYPE_STATE;
|
|
1391
|
-
} else if (this._consumeSequenceIfMatch($$.CDATA_START_STRING, cp, true)) {
|
|
1392
|
-
if (this.allowCDATA) {
|
|
1393
|
-
this.state = CDATA_SECTION_STATE;
|
|
1394
|
-
} else {
|
|
1395
|
-
this._err(ERR.cdataInHtmlContent);
|
|
1396
|
-
this._createCommentToken();
|
|
1397
|
-
this.currentToken.data = '[CDATA[';
|
|
1398
|
-
this.state = BOGUS_COMMENT_STATE;
|
|
1399
|
-
}
|
|
1400
|
-
}
|
|
1401
|
-
|
|
1402
|
-
//NOTE: sequence lookup can be abrupted by hibernation. In that case lookup
|
|
1403
|
-
//results are no longer valid and we will need to start over.
|
|
1404
|
-
else if (!this._ensureHibernation()) {
|
|
1405
|
-
this._err(ERR.incorrectlyOpenedComment);
|
|
1406
|
-
this._createCommentToken();
|
|
1407
|
-
this._reconsumeInState(BOGUS_COMMENT_STATE);
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
|
|
1411
|
-
// Comment start state
|
|
1412
|
-
//------------------------------------------------------------------
|
|
1413
|
-
[COMMENT_START_STATE](cp) {
|
|
1414
|
-
if (cp === $.HYPHEN_MINUS) {
|
|
1415
|
-
this.state = COMMENT_START_DASH_STATE;
|
|
1416
|
-
} else if (cp === $.GREATER_THAN_SIGN) {
|
|
1417
|
-
this._err(ERR.abruptClosingOfEmptyComment);
|
|
1418
|
-
this.state = DATA_STATE;
|
|
1419
|
-
this._emitCurrentToken();
|
|
1420
|
-
} else {
|
|
1421
|
-
this._reconsumeInState(COMMENT_STATE);
|
|
1422
|
-
}
|
|
1423
|
-
}
|
|
1424
|
-
|
|
1425
|
-
// Comment start dash state
|
|
1426
|
-
//------------------------------------------------------------------
|
|
1427
|
-
[COMMENT_START_DASH_STATE](cp) {
|
|
1428
|
-
if (cp === $.HYPHEN_MINUS) {
|
|
1429
|
-
this.state = COMMENT_END_STATE;
|
|
1430
|
-
} else if (cp === $.GREATER_THAN_SIGN) {
|
|
1431
|
-
this._err(ERR.abruptClosingOfEmptyComment);
|
|
1432
|
-
this.state = DATA_STATE;
|
|
1433
|
-
this._emitCurrentToken();
|
|
1434
|
-
} else if (cp === $.EOF) {
|
|
1435
|
-
this._err(ERR.eofInComment);
|
|
1436
|
-
this._emitCurrentToken();
|
|
1437
|
-
this._emitEOFToken();
|
|
1438
|
-
} else {
|
|
1439
|
-
this.currentToken.data += '-';
|
|
1440
|
-
this._reconsumeInState(COMMENT_STATE);
|
|
1441
|
-
}
|
|
1442
|
-
}
|
|
1443
|
-
|
|
1444
|
-
// Comment state
|
|
1445
|
-
//------------------------------------------------------------------
|
|
1446
|
-
[COMMENT_STATE](cp) {
|
|
1447
|
-
if (cp === $.HYPHEN_MINUS) {
|
|
1448
|
-
this.state = COMMENT_END_DASH_STATE;
|
|
1449
|
-
} else if (cp === $.LESS_THAN_SIGN) {
|
|
1450
|
-
this.currentToken.data += '<';
|
|
1451
|
-
this.state = COMMENT_LESS_THAN_SIGN_STATE;
|
|
1452
|
-
} else if (cp === $.NULL) {
|
|
1453
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
1454
|
-
this.currentToken.data += unicode.REPLACEMENT_CHARACTER;
|
|
1455
|
-
} else if (cp === $.EOF) {
|
|
1456
|
-
this._err(ERR.eofInComment);
|
|
1457
|
-
this._emitCurrentToken();
|
|
1458
|
-
this._emitEOFToken();
|
|
1459
|
-
} else {
|
|
1460
|
-
this.currentToken.data += toChar(cp);
|
|
1461
|
-
}
|
|
1462
|
-
}
|
|
1463
|
-
|
|
1464
|
-
// Comment less-than sign state
|
|
1465
|
-
//------------------------------------------------------------------
|
|
1466
|
-
[COMMENT_LESS_THAN_SIGN_STATE](cp) {
|
|
1467
|
-
if (cp === $.EXCLAMATION_MARK) {
|
|
1468
|
-
this.currentToken.data += '!';
|
|
1469
|
-
this.state = COMMENT_LESS_THAN_SIGN_BANG_STATE;
|
|
1470
|
-
} else if (cp === $.LESS_THAN_SIGN) {
|
|
1471
|
-
this.currentToken.data += '!';
|
|
1472
|
-
} else {
|
|
1473
|
-
this._reconsumeInState(COMMENT_STATE);
|
|
1474
|
-
}
|
|
1475
|
-
}
|
|
1476
|
-
|
|
1477
|
-
// Comment less-than sign bang state
|
|
1478
|
-
//------------------------------------------------------------------
|
|
1479
|
-
[COMMENT_LESS_THAN_SIGN_BANG_STATE](cp) {
|
|
1480
|
-
if (cp === $.HYPHEN_MINUS) {
|
|
1481
|
-
this.state = COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE;
|
|
1482
|
-
} else {
|
|
1483
|
-
this._reconsumeInState(COMMENT_STATE);
|
|
1484
|
-
}
|
|
1485
|
-
}
|
|
1486
|
-
|
|
1487
|
-
// Comment less-than sign bang dash state
|
|
1488
|
-
//------------------------------------------------------------------
|
|
1489
|
-
[COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE](cp) {
|
|
1490
|
-
if (cp === $.HYPHEN_MINUS) {
|
|
1491
|
-
this.state = COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE;
|
|
1492
|
-
} else {
|
|
1493
|
-
this._reconsumeInState(COMMENT_END_DASH_STATE);
|
|
1494
|
-
}
|
|
1495
|
-
}
|
|
1496
|
-
|
|
1497
|
-
// Comment less-than sign bang dash dash state
|
|
1498
|
-
//------------------------------------------------------------------
|
|
1499
|
-
[COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE](cp) {
|
|
1500
|
-
if (cp !== $.GREATER_THAN_SIGN && cp !== $.EOF) {
|
|
1501
|
-
this._err(ERR.nestedComment);
|
|
1502
|
-
}
|
|
1503
|
-
|
|
1504
|
-
this._reconsumeInState(COMMENT_END_STATE);
|
|
1505
|
-
}
|
|
1506
|
-
|
|
1507
|
-
// Comment end dash state
|
|
1508
|
-
//------------------------------------------------------------------
|
|
1509
|
-
[COMMENT_END_DASH_STATE](cp) {
|
|
1510
|
-
if (cp === $.HYPHEN_MINUS) {
|
|
1511
|
-
this.state = COMMENT_END_STATE;
|
|
1512
|
-
} else if (cp === $.EOF) {
|
|
1513
|
-
this._err(ERR.eofInComment);
|
|
1514
|
-
this._emitCurrentToken();
|
|
1515
|
-
this._emitEOFToken();
|
|
1516
|
-
} else {
|
|
1517
|
-
this.currentToken.data += '-';
|
|
1518
|
-
this._reconsumeInState(COMMENT_STATE);
|
|
1519
|
-
}
|
|
1520
|
-
}
|
|
1521
|
-
|
|
1522
|
-
// Comment end state
|
|
1523
|
-
//------------------------------------------------------------------
|
|
1524
|
-
[COMMENT_END_STATE](cp) {
|
|
1525
|
-
if (cp === $.GREATER_THAN_SIGN) {
|
|
1526
|
-
this.state = DATA_STATE;
|
|
1527
|
-
this._emitCurrentToken();
|
|
1528
|
-
} else if (cp === $.EXCLAMATION_MARK) {
|
|
1529
|
-
this.state = COMMENT_END_BANG_STATE;
|
|
1530
|
-
} else if (cp === $.HYPHEN_MINUS) {
|
|
1531
|
-
this.currentToken.data += '-';
|
|
1532
|
-
} else if (cp === $.EOF) {
|
|
1533
|
-
this._err(ERR.eofInComment);
|
|
1534
|
-
this._emitCurrentToken();
|
|
1535
|
-
this._emitEOFToken();
|
|
1536
|
-
} else {
|
|
1537
|
-
this.currentToken.data += '--';
|
|
1538
|
-
this._reconsumeInState(COMMENT_STATE);
|
|
1539
|
-
}
|
|
1540
|
-
}
|
|
1541
|
-
|
|
1542
|
-
// Comment end bang state
|
|
1543
|
-
//------------------------------------------------------------------
|
|
1544
|
-
[COMMENT_END_BANG_STATE](cp) {
|
|
1545
|
-
if (cp === $.HYPHEN_MINUS) {
|
|
1546
|
-
this.currentToken.data += '--!';
|
|
1547
|
-
this.state = COMMENT_END_DASH_STATE;
|
|
1548
|
-
} else if (cp === $.GREATER_THAN_SIGN) {
|
|
1549
|
-
this._err(ERR.incorrectlyClosedComment);
|
|
1550
|
-
this.state = DATA_STATE;
|
|
1551
|
-
this._emitCurrentToken();
|
|
1552
|
-
} else if (cp === $.EOF) {
|
|
1553
|
-
this._err(ERR.eofInComment);
|
|
1554
|
-
this._emitCurrentToken();
|
|
1555
|
-
this._emitEOFToken();
|
|
1556
|
-
} else {
|
|
1557
|
-
this.currentToken.data += '--!';
|
|
1558
|
-
this._reconsumeInState(COMMENT_STATE);
|
|
1559
|
-
}
|
|
1560
|
-
}
|
|
1561
|
-
|
|
1562
|
-
// DOCTYPE state
|
|
1563
|
-
//------------------------------------------------------------------
|
|
1564
|
-
[DOCTYPE_STATE](cp) {
|
|
1565
|
-
if (isWhitespace(cp)) {
|
|
1566
|
-
this.state = BEFORE_DOCTYPE_NAME_STATE;
|
|
1567
|
-
} else if (cp === $.GREATER_THAN_SIGN) {
|
|
1568
|
-
this._reconsumeInState(BEFORE_DOCTYPE_NAME_STATE);
|
|
1569
|
-
} else if (cp === $.EOF) {
|
|
1570
|
-
this._err(ERR.eofInDoctype);
|
|
1571
|
-
this._createDoctypeToken(null);
|
|
1572
|
-
this.currentToken.forceQuirks = true;
|
|
1573
|
-
this._emitCurrentToken();
|
|
1574
|
-
this._emitEOFToken();
|
|
1575
|
-
} else {
|
|
1576
|
-
this._err(ERR.missingWhitespaceBeforeDoctypeName);
|
|
1577
|
-
this._reconsumeInState(BEFORE_DOCTYPE_NAME_STATE);
|
|
1578
|
-
}
|
|
1579
|
-
}
|
|
1580
|
-
|
|
1581
|
-
// Before DOCTYPE name state
|
|
1582
|
-
//------------------------------------------------------------------
|
|
1583
|
-
[BEFORE_DOCTYPE_NAME_STATE](cp) {
|
|
1584
|
-
if (isWhitespace(cp)) {
|
|
1585
|
-
return;
|
|
1586
|
-
}
|
|
1587
|
-
|
|
1588
|
-
if (isAsciiUpper(cp)) {
|
|
1589
|
-
this._createDoctypeToken(toAsciiLowerChar(cp));
|
|
1590
|
-
this.state = DOCTYPE_NAME_STATE;
|
|
1591
|
-
} else if (cp === $.NULL) {
|
|
1592
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
1593
|
-
this._createDoctypeToken(unicode.REPLACEMENT_CHARACTER);
|
|
1594
|
-
this.state = DOCTYPE_NAME_STATE;
|
|
1595
|
-
} else if (cp === $.GREATER_THAN_SIGN) {
|
|
1596
|
-
this._err(ERR.missingDoctypeName);
|
|
1597
|
-
this._createDoctypeToken(null);
|
|
1598
|
-
this.currentToken.forceQuirks = true;
|
|
1599
|
-
this._emitCurrentToken();
|
|
1600
|
-
this.state = DATA_STATE;
|
|
1601
|
-
} else if (cp === $.EOF) {
|
|
1602
|
-
this._err(ERR.eofInDoctype);
|
|
1603
|
-
this._createDoctypeToken(null);
|
|
1604
|
-
this.currentToken.forceQuirks = true;
|
|
1605
|
-
this._emitCurrentToken();
|
|
1606
|
-
this._emitEOFToken();
|
|
1607
|
-
} else {
|
|
1608
|
-
this._createDoctypeToken(toChar(cp));
|
|
1609
|
-
this.state = DOCTYPE_NAME_STATE;
|
|
1610
|
-
}
|
|
1611
|
-
}
|
|
1612
|
-
|
|
1613
|
-
// DOCTYPE name state
|
|
1614
|
-
//------------------------------------------------------------------
|
|
1615
|
-
[DOCTYPE_NAME_STATE](cp) {
|
|
1616
|
-
if (isWhitespace(cp)) {
|
|
1617
|
-
this.state = AFTER_DOCTYPE_NAME_STATE;
|
|
1618
|
-
} else if (cp === $.GREATER_THAN_SIGN) {
|
|
1619
|
-
this.state = DATA_STATE;
|
|
1620
|
-
this._emitCurrentToken();
|
|
1621
|
-
} else if (isAsciiUpper(cp)) {
|
|
1622
|
-
this.currentToken.name += toAsciiLowerChar(cp);
|
|
1623
|
-
} else if (cp === $.NULL) {
|
|
1624
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
1625
|
-
this.currentToken.name += unicode.REPLACEMENT_CHARACTER;
|
|
1626
|
-
} else if (cp === $.EOF) {
|
|
1627
|
-
this._err(ERR.eofInDoctype);
|
|
1628
|
-
this.currentToken.forceQuirks = true;
|
|
1629
|
-
this._emitCurrentToken();
|
|
1630
|
-
this._emitEOFToken();
|
|
1631
|
-
} else {
|
|
1632
|
-
this.currentToken.name += toChar(cp);
|
|
1633
|
-
}
|
|
1634
|
-
}
|
|
1635
|
-
|
|
1636
|
-
// After DOCTYPE name state
|
|
1637
|
-
//------------------------------------------------------------------
|
|
1638
|
-
[AFTER_DOCTYPE_NAME_STATE](cp) {
|
|
1639
|
-
if (isWhitespace(cp)) {
|
|
1640
|
-
return;
|
|
1641
|
-
}
|
|
1642
|
-
|
|
1643
|
-
if (cp === $.GREATER_THAN_SIGN) {
|
|
1644
|
-
this.state = DATA_STATE;
|
|
1645
|
-
this._emitCurrentToken();
|
|
1646
|
-
} else if (cp === $.EOF) {
|
|
1647
|
-
this._err(ERR.eofInDoctype);
|
|
1648
|
-
this.currentToken.forceQuirks = true;
|
|
1649
|
-
this._emitCurrentToken();
|
|
1650
|
-
this._emitEOFToken();
|
|
1651
|
-
} else if (this._consumeSequenceIfMatch($$.PUBLIC_STRING, cp, false)) {
|
|
1652
|
-
this.state = AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE;
|
|
1653
|
-
} else if (this._consumeSequenceIfMatch($$.SYSTEM_STRING, cp, false)) {
|
|
1654
|
-
this.state = AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE;
|
|
1655
|
-
}
|
|
1656
|
-
//NOTE: sequence lookup can be abrupted by hibernation. In that case lookup
|
|
1657
|
-
//results are no longer valid and we will need to start over.
|
|
1658
|
-
else if (!this._ensureHibernation()) {
|
|
1659
|
-
this._err(ERR.invalidCharacterSequenceAfterDoctypeName);
|
|
1660
|
-
this.currentToken.forceQuirks = true;
|
|
1661
|
-
this._reconsumeInState(BOGUS_DOCTYPE_STATE);
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
|
|
1665
|
-
// After DOCTYPE public keyword state
|
|
1666
|
-
//------------------------------------------------------------------
|
|
1667
|
-
[AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE](cp) {
|
|
1668
|
-
if (isWhitespace(cp)) {
|
|
1669
|
-
this.state = BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE;
|
|
1670
|
-
} else if (cp === $.QUOTATION_MARK) {
|
|
1671
|
-
this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword);
|
|
1672
|
-
this.currentToken.publicId = '';
|
|
1673
|
-
this.state = DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE;
|
|
1674
|
-
} else if (cp === $.APOSTROPHE) {
|
|
1675
|
-
this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword);
|
|
1676
|
-
this.currentToken.publicId = '';
|
|
1677
|
-
this.state = DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE;
|
|
1678
|
-
} else if (cp === $.GREATER_THAN_SIGN) {
|
|
1679
|
-
this._err(ERR.missingDoctypePublicIdentifier);
|
|
1680
|
-
this.currentToken.forceQuirks = true;
|
|
1681
|
-
this.state = DATA_STATE;
|
|
1682
|
-
this._emitCurrentToken();
|
|
1683
|
-
} else if (cp === $.EOF) {
|
|
1684
|
-
this._err(ERR.eofInDoctype);
|
|
1685
|
-
this.currentToken.forceQuirks = true;
|
|
1686
|
-
this._emitCurrentToken();
|
|
1687
|
-
this._emitEOFToken();
|
|
1688
|
-
} else {
|
|
1689
|
-
this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier);
|
|
1690
|
-
this.currentToken.forceQuirks = true;
|
|
1691
|
-
this._reconsumeInState(BOGUS_DOCTYPE_STATE);
|
|
1692
|
-
}
|
|
1693
|
-
}
|
|
1694
|
-
|
|
1695
|
-
// Before DOCTYPE public identifier state
|
|
1696
|
-
//------------------------------------------------------------------
|
|
1697
|
-
[BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE](cp) {
|
|
1698
|
-
if (isWhitespace(cp)) {
|
|
1699
|
-
return;
|
|
1700
|
-
}
|
|
1701
|
-
|
|
1702
|
-
if (cp === $.QUOTATION_MARK) {
|
|
1703
|
-
this.currentToken.publicId = '';
|
|
1704
|
-
this.state = DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE;
|
|
1705
|
-
} else if (cp === $.APOSTROPHE) {
|
|
1706
|
-
this.currentToken.publicId = '';
|
|
1707
|
-
this.state = DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE;
|
|
1708
|
-
} else if (cp === $.GREATER_THAN_SIGN) {
|
|
1709
|
-
this._err(ERR.missingDoctypePublicIdentifier);
|
|
1710
|
-
this.currentToken.forceQuirks = true;
|
|
1711
|
-
this.state = DATA_STATE;
|
|
1712
|
-
this._emitCurrentToken();
|
|
1713
|
-
} else if (cp === $.EOF) {
|
|
1714
|
-
this._err(ERR.eofInDoctype);
|
|
1715
|
-
this.currentToken.forceQuirks = true;
|
|
1716
|
-
this._emitCurrentToken();
|
|
1717
|
-
this._emitEOFToken();
|
|
1718
|
-
} else {
|
|
1719
|
-
this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier);
|
|
1720
|
-
this.currentToken.forceQuirks = true;
|
|
1721
|
-
this._reconsumeInState(BOGUS_DOCTYPE_STATE);
|
|
1722
|
-
}
|
|
1723
|
-
}
|
|
1724
|
-
|
|
1725
|
-
// DOCTYPE public identifier (double-quoted) state
|
|
1726
|
-
//------------------------------------------------------------------
|
|
1727
|
-
[DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE](cp) {
|
|
1728
|
-
if (cp === $.QUOTATION_MARK) {
|
|
1729
|
-
this.state = AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE;
|
|
1730
|
-
} else if (cp === $.NULL) {
|
|
1731
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
1732
|
-
this.currentToken.publicId += unicode.REPLACEMENT_CHARACTER;
|
|
1733
|
-
} else if (cp === $.GREATER_THAN_SIGN) {
|
|
1734
|
-
this._err(ERR.abruptDoctypePublicIdentifier);
|
|
1735
|
-
this.currentToken.forceQuirks = true;
|
|
1736
|
-
this._emitCurrentToken();
|
|
1737
|
-
this.state = DATA_STATE;
|
|
1738
|
-
} else if (cp === $.EOF) {
|
|
1739
|
-
this._err(ERR.eofInDoctype);
|
|
1740
|
-
this.currentToken.forceQuirks = true;
|
|
1741
|
-
this._emitCurrentToken();
|
|
1742
|
-
this._emitEOFToken();
|
|
1743
|
-
} else {
|
|
1744
|
-
this.currentToken.publicId += toChar(cp);
|
|
1745
|
-
}
|
|
1746
|
-
}
|
|
1747
|
-
|
|
1748
|
-
// DOCTYPE public identifier (single-quoted) state
|
|
1749
|
-
//------------------------------------------------------------------
|
|
1750
|
-
[DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE](cp) {
|
|
1751
|
-
if (cp === $.APOSTROPHE) {
|
|
1752
|
-
this.state = AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE;
|
|
1753
|
-
} else if (cp === $.NULL) {
|
|
1754
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
1755
|
-
this.currentToken.publicId += unicode.REPLACEMENT_CHARACTER;
|
|
1756
|
-
} else if (cp === $.GREATER_THAN_SIGN) {
|
|
1757
|
-
this._err(ERR.abruptDoctypePublicIdentifier);
|
|
1758
|
-
this.currentToken.forceQuirks = true;
|
|
1759
|
-
this._emitCurrentToken();
|
|
1760
|
-
this.state = DATA_STATE;
|
|
1761
|
-
} else if (cp === $.EOF) {
|
|
1762
|
-
this._err(ERR.eofInDoctype);
|
|
1763
|
-
this.currentToken.forceQuirks = true;
|
|
1764
|
-
this._emitCurrentToken();
|
|
1765
|
-
this._emitEOFToken();
|
|
1766
|
-
} else {
|
|
1767
|
-
this.currentToken.publicId += toChar(cp);
|
|
1768
|
-
}
|
|
1769
|
-
}
|
|
1770
|
-
|
|
1771
|
-
// After DOCTYPE public identifier state
|
|
1772
|
-
//------------------------------------------------------------------
|
|
1773
|
-
[AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE](cp) {
|
|
1774
|
-
if (isWhitespace(cp)) {
|
|
1775
|
-
this.state = BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE;
|
|
1776
|
-
} else if (cp === $.GREATER_THAN_SIGN) {
|
|
1777
|
-
this.state = DATA_STATE;
|
|
1778
|
-
this._emitCurrentToken();
|
|
1779
|
-
} else if (cp === $.QUOTATION_MARK) {
|
|
1780
|
-
this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers);
|
|
1781
|
-
this.currentToken.systemId = '';
|
|
1782
|
-
this.state = DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE;
|
|
1783
|
-
} else if (cp === $.APOSTROPHE) {
|
|
1784
|
-
this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers);
|
|
1785
|
-
this.currentToken.systemId = '';
|
|
1786
|
-
this.state = DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE;
|
|
1787
|
-
} else if (cp === $.EOF) {
|
|
1788
|
-
this._err(ERR.eofInDoctype);
|
|
1789
|
-
this.currentToken.forceQuirks = true;
|
|
1790
|
-
this._emitCurrentToken();
|
|
1791
|
-
this._emitEOFToken();
|
|
1792
|
-
} else {
|
|
1793
|
-
this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);
|
|
1794
|
-
this.currentToken.forceQuirks = true;
|
|
1795
|
-
this._reconsumeInState(BOGUS_DOCTYPE_STATE);
|
|
1796
|
-
}
|
|
1797
|
-
}
|
|
1798
|
-
|
|
1799
|
-
// Between DOCTYPE public and system identifiers state
|
|
1800
|
-
//------------------------------------------------------------------
|
|
1801
|
-
[BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE](cp) {
|
|
1802
|
-
if (isWhitespace(cp)) {
|
|
1803
|
-
return;
|
|
1804
|
-
}
|
|
1805
|
-
|
|
1806
|
-
if (cp === $.GREATER_THAN_SIGN) {
|
|
1807
|
-
this._emitCurrentToken();
|
|
1808
|
-
this.state = DATA_STATE;
|
|
1809
|
-
} else if (cp === $.QUOTATION_MARK) {
|
|
1810
|
-
this.currentToken.systemId = '';
|
|
1811
|
-
this.state = DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE;
|
|
1812
|
-
} else if (cp === $.APOSTROPHE) {
|
|
1813
|
-
this.currentToken.systemId = '';
|
|
1814
|
-
this.state = DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE;
|
|
1815
|
-
} else if (cp === $.EOF) {
|
|
1816
|
-
this._err(ERR.eofInDoctype);
|
|
1817
|
-
this.currentToken.forceQuirks = true;
|
|
1818
|
-
this._emitCurrentToken();
|
|
1819
|
-
this._emitEOFToken();
|
|
1820
|
-
} else {
|
|
1821
|
-
this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);
|
|
1822
|
-
this.currentToken.forceQuirks = true;
|
|
1823
|
-
this._reconsumeInState(BOGUS_DOCTYPE_STATE);
|
|
1824
|
-
}
|
|
1825
|
-
}
|
|
1826
|
-
|
|
1827
|
-
// After DOCTYPE system keyword state
|
|
1828
|
-
//------------------------------------------------------------------
|
|
1829
|
-
[AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE](cp) {
|
|
1830
|
-
if (isWhitespace(cp)) {
|
|
1831
|
-
this.state = BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE;
|
|
1832
|
-
} else if (cp === $.QUOTATION_MARK) {
|
|
1833
|
-
this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword);
|
|
1834
|
-
this.currentToken.systemId = '';
|
|
1835
|
-
this.state = DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE;
|
|
1836
|
-
} else if (cp === $.APOSTROPHE) {
|
|
1837
|
-
this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword);
|
|
1838
|
-
this.currentToken.systemId = '';
|
|
1839
|
-
this.state = DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE;
|
|
1840
|
-
} else if (cp === $.GREATER_THAN_SIGN) {
|
|
1841
|
-
this._err(ERR.missingDoctypeSystemIdentifier);
|
|
1842
|
-
this.currentToken.forceQuirks = true;
|
|
1843
|
-
this.state = DATA_STATE;
|
|
1844
|
-
this._emitCurrentToken();
|
|
1845
|
-
} else if (cp === $.EOF) {
|
|
1846
|
-
this._err(ERR.eofInDoctype);
|
|
1847
|
-
this.currentToken.forceQuirks = true;
|
|
1848
|
-
this._emitCurrentToken();
|
|
1849
|
-
this._emitEOFToken();
|
|
1850
|
-
} else {
|
|
1851
|
-
this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);
|
|
1852
|
-
this.currentToken.forceQuirks = true;
|
|
1853
|
-
this._reconsumeInState(BOGUS_DOCTYPE_STATE);
|
|
1854
|
-
}
|
|
1855
|
-
}
|
|
1856
|
-
|
|
1857
|
-
// Before DOCTYPE system identifier state
|
|
1858
|
-
//------------------------------------------------------------------
|
|
1859
|
-
[BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE](cp) {
|
|
1860
|
-
if (isWhitespace(cp)) {
|
|
1861
|
-
return;
|
|
1862
|
-
}
|
|
1863
|
-
|
|
1864
|
-
if (cp === $.QUOTATION_MARK) {
|
|
1865
|
-
this.currentToken.systemId = '';
|
|
1866
|
-
this.state = DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE;
|
|
1867
|
-
} else if (cp === $.APOSTROPHE) {
|
|
1868
|
-
this.currentToken.systemId = '';
|
|
1869
|
-
this.state = DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE;
|
|
1870
|
-
} else if (cp === $.GREATER_THAN_SIGN) {
|
|
1871
|
-
this._err(ERR.missingDoctypeSystemIdentifier);
|
|
1872
|
-
this.currentToken.forceQuirks = true;
|
|
1873
|
-
this.state = DATA_STATE;
|
|
1874
|
-
this._emitCurrentToken();
|
|
1875
|
-
} else if (cp === $.EOF) {
|
|
1876
|
-
this._err(ERR.eofInDoctype);
|
|
1877
|
-
this.currentToken.forceQuirks = true;
|
|
1878
|
-
this._emitCurrentToken();
|
|
1879
|
-
this._emitEOFToken();
|
|
1880
|
-
} else {
|
|
1881
|
-
this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);
|
|
1882
|
-
this.currentToken.forceQuirks = true;
|
|
1883
|
-
this._reconsumeInState(BOGUS_DOCTYPE_STATE);
|
|
1884
|
-
}
|
|
1885
|
-
}
|
|
1886
|
-
|
|
1887
|
-
// DOCTYPE system identifier (double-quoted) state
|
|
1888
|
-
//------------------------------------------------------------------
|
|
1889
|
-
[DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE](cp) {
|
|
1890
|
-
if (cp === $.QUOTATION_MARK) {
|
|
1891
|
-
this.state = AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE;
|
|
1892
|
-
} else if (cp === $.NULL) {
|
|
1893
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
1894
|
-
this.currentToken.systemId += unicode.REPLACEMENT_CHARACTER;
|
|
1895
|
-
} else if (cp === $.GREATER_THAN_SIGN) {
|
|
1896
|
-
this._err(ERR.abruptDoctypeSystemIdentifier);
|
|
1897
|
-
this.currentToken.forceQuirks = true;
|
|
1898
|
-
this._emitCurrentToken();
|
|
1899
|
-
this.state = DATA_STATE;
|
|
1900
|
-
} else if (cp === $.EOF) {
|
|
1901
|
-
this._err(ERR.eofInDoctype);
|
|
1902
|
-
this.currentToken.forceQuirks = true;
|
|
1903
|
-
this._emitCurrentToken();
|
|
1904
|
-
this._emitEOFToken();
|
|
1905
|
-
} else {
|
|
1906
|
-
this.currentToken.systemId += toChar(cp);
|
|
1907
|
-
}
|
|
1908
|
-
}
|
|
1909
|
-
|
|
1910
|
-
// DOCTYPE system identifier (single-quoted) state
|
|
1911
|
-
//------------------------------------------------------------------
|
|
1912
|
-
[DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE](cp) {
|
|
1913
|
-
if (cp === $.APOSTROPHE) {
|
|
1914
|
-
this.state = AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE;
|
|
1915
|
-
} else if (cp === $.NULL) {
|
|
1916
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
1917
|
-
this.currentToken.systemId += unicode.REPLACEMENT_CHARACTER;
|
|
1918
|
-
} else if (cp === $.GREATER_THAN_SIGN) {
|
|
1919
|
-
this._err(ERR.abruptDoctypeSystemIdentifier);
|
|
1920
|
-
this.currentToken.forceQuirks = true;
|
|
1921
|
-
this._emitCurrentToken();
|
|
1922
|
-
this.state = DATA_STATE;
|
|
1923
|
-
} else if (cp === $.EOF) {
|
|
1924
|
-
this._err(ERR.eofInDoctype);
|
|
1925
|
-
this.currentToken.forceQuirks = true;
|
|
1926
|
-
this._emitCurrentToken();
|
|
1927
|
-
this._emitEOFToken();
|
|
1928
|
-
} else {
|
|
1929
|
-
this.currentToken.systemId += toChar(cp);
|
|
1930
|
-
}
|
|
1931
|
-
}
|
|
1932
|
-
|
|
1933
|
-
// After DOCTYPE system identifier state
|
|
1934
|
-
//------------------------------------------------------------------
|
|
1935
|
-
[AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE](cp) {
|
|
1936
|
-
if (isWhitespace(cp)) {
|
|
1937
|
-
return;
|
|
1938
|
-
}
|
|
1939
|
-
|
|
1940
|
-
if (cp === $.GREATER_THAN_SIGN) {
|
|
1941
|
-
this._emitCurrentToken();
|
|
1942
|
-
this.state = DATA_STATE;
|
|
1943
|
-
} else if (cp === $.EOF) {
|
|
1944
|
-
this._err(ERR.eofInDoctype);
|
|
1945
|
-
this.currentToken.forceQuirks = true;
|
|
1946
|
-
this._emitCurrentToken();
|
|
1947
|
-
this._emitEOFToken();
|
|
1948
|
-
} else {
|
|
1949
|
-
this._err(ERR.unexpectedCharacterAfterDoctypeSystemIdentifier);
|
|
1950
|
-
this._reconsumeInState(BOGUS_DOCTYPE_STATE);
|
|
1951
|
-
}
|
|
1952
|
-
}
|
|
1953
|
-
|
|
1954
|
-
// Bogus DOCTYPE state
|
|
1955
|
-
//------------------------------------------------------------------
|
|
1956
|
-
[BOGUS_DOCTYPE_STATE](cp) {
|
|
1957
|
-
if (cp === $.GREATER_THAN_SIGN) {
|
|
1958
|
-
this._emitCurrentToken();
|
|
1959
|
-
this.state = DATA_STATE;
|
|
1960
|
-
} else if (cp === $.NULL) {
|
|
1961
|
-
this._err(ERR.unexpectedNullCharacter);
|
|
1962
|
-
} else if (cp === $.EOF) {
|
|
1963
|
-
this._emitCurrentToken();
|
|
1964
|
-
this._emitEOFToken();
|
|
1965
|
-
}
|
|
1966
|
-
}
|
|
1967
|
-
|
|
1968
|
-
// CDATA section state
|
|
1969
|
-
//------------------------------------------------------------------
|
|
1970
|
-
[CDATA_SECTION_STATE](cp) {
|
|
1971
|
-
if (cp === $.RIGHT_SQUARE_BRACKET) {
|
|
1972
|
-
this.state = CDATA_SECTION_BRACKET_STATE;
|
|
1973
|
-
} else if (cp === $.EOF) {
|
|
1974
|
-
this._err(ERR.eofInCdata);
|
|
1975
|
-
this._emitEOFToken();
|
|
1976
|
-
} else {
|
|
1977
|
-
this._emitCodePoint(cp);
|
|
1978
|
-
}
|
|
1979
|
-
}
|
|
1980
|
-
|
|
1981
|
-
// CDATA section bracket state
|
|
1982
|
-
//------------------------------------------------------------------
|
|
1983
|
-
[CDATA_SECTION_BRACKET_STATE](cp) {
|
|
1984
|
-
if (cp === $.RIGHT_SQUARE_BRACKET) {
|
|
1985
|
-
this.state = CDATA_SECTION_END_STATE;
|
|
1986
|
-
} else {
|
|
1987
|
-
this._emitChars(']');
|
|
1988
|
-
this._reconsumeInState(CDATA_SECTION_STATE);
|
|
1989
|
-
}
|
|
1990
|
-
}
|
|
1991
|
-
|
|
1992
|
-
// CDATA section end state
|
|
1993
|
-
//------------------------------------------------------------------
|
|
1994
|
-
[CDATA_SECTION_END_STATE](cp) {
|
|
1995
|
-
if (cp === $.GREATER_THAN_SIGN) {
|
|
1996
|
-
this.state = DATA_STATE;
|
|
1997
|
-
} else if (cp === $.RIGHT_SQUARE_BRACKET) {
|
|
1998
|
-
this._emitChars(']');
|
|
1999
|
-
} else {
|
|
2000
|
-
this._emitChars(']]');
|
|
2001
|
-
this._reconsumeInState(CDATA_SECTION_STATE);
|
|
2002
|
-
}
|
|
2003
|
-
}
|
|
2004
|
-
|
|
2005
|
-
// Character reference state
|
|
2006
|
-
//------------------------------------------------------------------
|
|
2007
|
-
[CHARACTER_REFERENCE_STATE](cp) {
|
|
2008
|
-
this.tempBuff = [$.AMPERSAND];
|
|
2009
|
-
|
|
2010
|
-
if (cp === $.NUMBER_SIGN) {
|
|
2011
|
-
this.tempBuff.push(cp);
|
|
2012
|
-
this.state = NUMERIC_CHARACTER_REFERENCE_STATE;
|
|
2013
|
-
} else if (isAsciiAlphaNumeric(cp)) {
|
|
2014
|
-
this._reconsumeInState(NAMED_CHARACTER_REFERENCE_STATE);
|
|
2015
|
-
} else {
|
|
2016
|
-
this._flushCodePointsConsumedAsCharacterReference();
|
|
2017
|
-
this._reconsumeInState(this.returnState);
|
|
2018
|
-
}
|
|
2019
|
-
}
|
|
2020
|
-
|
|
2021
|
-
// Named character reference state
|
|
2022
|
-
//------------------------------------------------------------------
|
|
2023
|
-
[NAMED_CHARACTER_REFERENCE_STATE](cp) {
|
|
2024
|
-
const matchResult = this._matchNamedCharacterReference(cp);
|
|
2025
|
-
|
|
2026
|
-
//NOTE: matching can be abrupted by hibernation. In that case match
|
|
2027
|
-
//results are no longer valid and we will need to start over.
|
|
2028
|
-
if (this._ensureHibernation()) {
|
|
2029
|
-
this.tempBuff = [$.AMPERSAND];
|
|
2030
|
-
} else if (matchResult) {
|
|
2031
|
-
const withSemicolon = this.tempBuff[this.tempBuff.length - 1] === $.SEMICOLON;
|
|
2032
|
-
|
|
2033
|
-
if (!this._isCharacterReferenceAttributeQuirk(withSemicolon)) {
|
|
2034
|
-
if (!withSemicolon) {
|
|
2035
|
-
this._errOnNextCodePoint(ERR.missingSemicolonAfterCharacterReference);
|
|
2036
|
-
}
|
|
2037
|
-
|
|
2038
|
-
this.tempBuff = matchResult;
|
|
2039
|
-
}
|
|
2040
|
-
|
|
2041
|
-
this._flushCodePointsConsumedAsCharacterReference();
|
|
2042
|
-
this.state = this.returnState;
|
|
2043
|
-
} else {
|
|
2044
|
-
this._flushCodePointsConsumedAsCharacterReference();
|
|
2045
|
-
this.state = AMBIGUOUS_AMPERSAND_STATE;
|
|
2046
|
-
}
|
|
2047
|
-
}
|
|
2048
|
-
|
|
2049
|
-
// Ambiguos ampersand state
|
|
2050
|
-
//------------------------------------------------------------------
|
|
2051
|
-
[AMBIGUOUS_AMPERSAND_STATE](cp) {
|
|
2052
|
-
if (isAsciiAlphaNumeric(cp)) {
|
|
2053
|
-
if (this._isCharacterReferenceInAttribute()) {
|
|
2054
|
-
this.currentAttr.value += toChar(cp);
|
|
2055
|
-
} else {
|
|
2056
|
-
this._emitCodePoint(cp);
|
|
2057
|
-
}
|
|
2058
|
-
} else {
|
|
2059
|
-
if (cp === $.SEMICOLON) {
|
|
2060
|
-
this._err(ERR.unknownNamedCharacterReference);
|
|
2061
|
-
}
|
|
2062
|
-
|
|
2063
|
-
this._reconsumeInState(this.returnState);
|
|
2064
|
-
}
|
|
2065
|
-
}
|
|
2066
|
-
|
|
2067
|
-
// Numeric character reference state
|
|
2068
|
-
//------------------------------------------------------------------
|
|
2069
|
-
[NUMERIC_CHARACTER_REFERENCE_STATE](cp) {
|
|
2070
|
-
this.charRefCode = 0;
|
|
2071
|
-
|
|
2072
|
-
if (cp === $.LATIN_SMALL_X || cp === $.LATIN_CAPITAL_X) {
|
|
2073
|
-
this.tempBuff.push(cp);
|
|
2074
|
-
this.state = HEXADEMICAL_CHARACTER_REFERENCE_START_STATE;
|
|
2075
|
-
} else {
|
|
2076
|
-
this._reconsumeInState(DECIMAL_CHARACTER_REFERENCE_START_STATE);
|
|
2077
|
-
}
|
|
2078
|
-
}
|
|
2079
|
-
|
|
2080
|
-
// Hexademical character reference start state
|
|
2081
|
-
//------------------------------------------------------------------
|
|
2082
|
-
[HEXADEMICAL_CHARACTER_REFERENCE_START_STATE](cp) {
|
|
2083
|
-
if (isAsciiHexDigit(cp)) {
|
|
2084
|
-
this._reconsumeInState(HEXADEMICAL_CHARACTER_REFERENCE_STATE);
|
|
2085
|
-
} else {
|
|
2086
|
-
this._err(ERR.absenceOfDigitsInNumericCharacterReference);
|
|
2087
|
-
this._flushCodePointsConsumedAsCharacterReference();
|
|
2088
|
-
this._reconsumeInState(this.returnState);
|
|
2089
|
-
}
|
|
2090
|
-
}
|
|
2091
|
-
|
|
2092
|
-
// Decimal character reference start state
|
|
2093
|
-
//------------------------------------------------------------------
|
|
2094
|
-
[DECIMAL_CHARACTER_REFERENCE_START_STATE](cp) {
|
|
2095
|
-
if (isAsciiDigit(cp)) {
|
|
2096
|
-
this._reconsumeInState(DECIMAL_CHARACTER_REFERENCE_STATE);
|
|
2097
|
-
} else {
|
|
2098
|
-
this._err(ERR.absenceOfDigitsInNumericCharacterReference);
|
|
2099
|
-
this._flushCodePointsConsumedAsCharacterReference();
|
|
2100
|
-
this._reconsumeInState(this.returnState);
|
|
2101
|
-
}
|
|
2102
|
-
}
|
|
2103
|
-
|
|
2104
|
-
// Hexademical character reference state
|
|
2105
|
-
//------------------------------------------------------------------
|
|
2106
|
-
[HEXADEMICAL_CHARACTER_REFERENCE_STATE](cp) {
|
|
2107
|
-
if (isAsciiUpperHexDigit(cp)) {
|
|
2108
|
-
this.charRefCode = this.charRefCode * 16 + cp - 0x37;
|
|
2109
|
-
} else if (isAsciiLowerHexDigit(cp)) {
|
|
2110
|
-
this.charRefCode = this.charRefCode * 16 + cp - 0x57;
|
|
2111
|
-
} else if (isAsciiDigit(cp)) {
|
|
2112
|
-
this.charRefCode = this.charRefCode * 16 + cp - 0x30;
|
|
2113
|
-
} else if (cp === $.SEMICOLON) {
|
|
2114
|
-
this.state = NUMERIC_CHARACTER_REFERENCE_END_STATE;
|
|
2115
|
-
} else {
|
|
2116
|
-
this._err(ERR.missingSemicolonAfterCharacterReference);
|
|
2117
|
-
this._reconsumeInState(NUMERIC_CHARACTER_REFERENCE_END_STATE);
|
|
2118
|
-
}
|
|
2119
|
-
}
|
|
2120
|
-
|
|
2121
|
-
// Decimal character reference state
|
|
2122
|
-
//------------------------------------------------------------------
|
|
2123
|
-
[DECIMAL_CHARACTER_REFERENCE_STATE](cp) {
|
|
2124
|
-
if (isAsciiDigit(cp)) {
|
|
2125
|
-
this.charRefCode = this.charRefCode * 10 + cp - 0x30;
|
|
2126
|
-
} else if (cp === $.SEMICOLON) {
|
|
2127
|
-
this.state = NUMERIC_CHARACTER_REFERENCE_END_STATE;
|
|
2128
|
-
} else {
|
|
2129
|
-
this._err(ERR.missingSemicolonAfterCharacterReference);
|
|
2130
|
-
this._reconsumeInState(NUMERIC_CHARACTER_REFERENCE_END_STATE);
|
|
2131
|
-
}
|
|
2132
|
-
}
|
|
2133
|
-
|
|
2134
|
-
// Numeric character reference end state
|
|
2135
|
-
//------------------------------------------------------------------
|
|
2136
|
-
[NUMERIC_CHARACTER_REFERENCE_END_STATE]() {
|
|
2137
|
-
if (this.charRefCode === $.NULL) {
|
|
2138
|
-
this._err(ERR.nullCharacterReference);
|
|
2139
|
-
this.charRefCode = $.REPLACEMENT_CHARACTER;
|
|
2140
|
-
} else if (this.charRefCode > 0x10ffff) {
|
|
2141
|
-
this._err(ERR.characterReferenceOutsideUnicodeRange);
|
|
2142
|
-
this.charRefCode = $.REPLACEMENT_CHARACTER;
|
|
2143
|
-
} else if (unicode.isSurrogate(this.charRefCode)) {
|
|
2144
|
-
this._err(ERR.surrogateCharacterReference);
|
|
2145
|
-
this.charRefCode = $.REPLACEMENT_CHARACTER;
|
|
2146
|
-
} else if (unicode.isUndefinedCodePoint(this.charRefCode)) {
|
|
2147
|
-
this._err(ERR.noncharacterCharacterReference);
|
|
2148
|
-
} else if (unicode.isControlCodePoint(this.charRefCode) || this.charRefCode === $.CARRIAGE_RETURN) {
|
|
2149
|
-
this._err(ERR.controlCharacterReference);
|
|
2150
|
-
|
|
2151
|
-
const replacement = C1_CONTROLS_REFERENCE_REPLACEMENTS[this.charRefCode];
|
|
2152
|
-
|
|
2153
|
-
if (replacement) {
|
|
2154
|
-
this.charRefCode = replacement;
|
|
2155
|
-
}
|
|
2156
|
-
}
|
|
2157
|
-
|
|
2158
|
-
this.tempBuff = [this.charRefCode];
|
|
2159
|
-
|
|
2160
|
-
this._flushCodePointsConsumedAsCharacterReference();
|
|
2161
|
-
this._reconsumeInState(this.returnState);
|
|
2162
|
-
}
|
|
2163
|
-
}
|
|
2164
|
-
|
|
2165
|
-
//Token types
|
|
2166
|
-
Tokenizer.CHARACTER_TOKEN = 'CHARACTER_TOKEN';
|
|
2167
|
-
Tokenizer.NULL_CHARACTER_TOKEN = 'NULL_CHARACTER_TOKEN';
|
|
2168
|
-
Tokenizer.WHITESPACE_CHARACTER_TOKEN = 'WHITESPACE_CHARACTER_TOKEN';
|
|
2169
|
-
Tokenizer.START_TAG_TOKEN = 'START_TAG_TOKEN';
|
|
2170
|
-
Tokenizer.END_TAG_TOKEN = 'END_TAG_TOKEN';
|
|
2171
|
-
Tokenizer.COMMENT_TOKEN = 'COMMENT_TOKEN';
|
|
2172
|
-
Tokenizer.DOCTYPE_TOKEN = 'DOCTYPE_TOKEN';
|
|
2173
|
-
Tokenizer.EOF_TOKEN = 'EOF_TOKEN';
|
|
2174
|
-
Tokenizer.HIBERNATION_TOKEN = 'HIBERNATION_TOKEN';
|
|
2175
|
-
|
|
2176
|
-
//Tokenizer initial states for different modes
|
|
2177
|
-
Tokenizer.MODE = {
|
|
2178
|
-
DATA: DATA_STATE,
|
|
2179
|
-
RCDATA: RCDATA_STATE,
|
|
2180
|
-
RAWTEXT: RAWTEXT_STATE,
|
|
2181
|
-
SCRIPT_DATA: SCRIPT_DATA_STATE,
|
|
2182
|
-
PLAINTEXT: PLAINTEXT_STATE
|
|
2183
|
-
};
|
|
2184
|
-
|
|
2185
|
-
//Static
|
|
2186
|
-
Tokenizer.getTokenAttr = function(token, attrName) {
|
|
2187
|
-
for (let i = token.attrs.length - 1; i >= 0; i--) {
|
|
2188
|
-
if (token.attrs[i].name === attrName) {
|
|
2189
|
-
return token.attrs[i].value;
|
|
2190
|
-
}
|
|
2191
|
-
}
|
|
2192
|
-
|
|
2193
|
-
return null;
|
|
2194
|
-
};
|
|
2195
|
-
|
|
2196
|
-
module.exports = Tokenizer;
|