67router 1.0.3 → 1.0.7
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/README.md +139 -190
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +3 -3
- package/app/.next-cli-build/build-manifest.json +3 -3
- package/app/.next-cli-build/prerender-manifest.json +17 -17
- package/app/.next-cli-build/react-loadable-manifest.json +20 -29
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +3 -3
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +1 -1
- package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing/page.js +1 -1
- package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/login/page.js +1 -1
- package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +4 -4
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js +1 -1
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +3 -3
- package/app/.next-cli-build/server/chunks/1712.js +2 -0
- package/app/.next-cli-build/server/chunks/3449.js +1 -1
- package/app/.next-cli-build/server/chunks/412.js +1 -1
- package/app/.next-cli-build/server/chunks/4190.js +1 -1
- package/app/.next-cli-build/server/chunks/4254.js +1 -0
- package/app/.next-cli-build/server/chunks/6540.js +1 -1
- package/app/.next-cli-build/server/chunks/7037.js +1 -1
- package/app/.next-cli-build/server/chunks/7066.js +1 -1
- package/app/.next-cli-build/server/chunks/827.js +1 -1
- package/app/.next-cli-build/server/chunks/869.js +1 -1
- package/app/.next-cli-build/server/chunks/915.js +2 -2
- package/app/.next-cli-build/server/chunks/9604.js +1 -1
- package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/static/chunks/124.c1b5af11afe50408.js +1 -0
- package/app/.next-cli-build/static/chunks/{1321-10507ce87a2d1e74.js → 1321-6630b5aa23e3ec0e.js} +1 -1
- package/app/.next-cli-build/static/chunks/2435.73c540d31dae9ecf.js +1 -0
- package/app/.next-cli-build/static/chunks/3521.f0ac0c88103b9f6c.js +1 -0
- package/app/.next-cli-build/static/chunks/5497-1681f72f0e82b863.js +7 -0
- package/app/.next-cli-build/static/chunks/5524.fca1db6352c39218.js +1 -0
- package/app/.next-cli-build/static/chunks/6808-b6550a28721e71e1.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-1f79ed13b16582ef.js → page-be90b4d4a94a121d.js} +1 -1
- package/app/.next-cli-build/static/chunks/webpack-396894770603fee1.js +1 -0
- package/app/.next-cli-build/static/css/2388dd0fafaf8266.css +1 -0
- package/app/cli/.build-home/AppData/Roaming/67router/db/data.sqlite-shm +0 -0
- package/app/cli/.build-home/AppData/Roaming/67router/db/data.sqlite-wal +0 -0
- package/app/package.json +1 -2
- package/app/src/mitm/server.js +193 -51
- package/cli.js +54 -54
- package/package.json +3 -4
- package/src/cli/tray/tray.ps1 +64 -10
- package/src/cli/tray/trayWin.js +38 -15
- package/app/.next-cli-build/server/chunks/1260.js +0 -1
- package/app/.next-cli-build/server/chunks/6708.js +0 -1
- package/app/.next-cli-build/server/chunks/7121.js +0 -1
- package/app/.next-cli-build/static/chunks/124.c092990b4bdb9713.js +0 -1
- package/app/.next-cli-build/static/chunks/2435.8a5a02e626c780d0.js +0 -1
- package/app/.next-cli-build/static/chunks/3521.a9e2daf685420cc7.js +0 -1
- package/app/.next-cli-build/static/chunks/5497-3353154ebc0a5eb1.js +0 -7
- package/app/.next-cli-build/static/chunks/6808-9540d7ac65c3e6a0.js +0 -1
- package/app/.next-cli-build/static/chunks/webpack-97b250ee703d0d92.js +0 -1
- package/app/.next-cli-build/static/css/1b93179163bad564.css +0 -1
- /package/app/.next-cli-build/static/{eXoiEKu5yWZkk7npUXFrc → ZSFfwWCBng6VPk2-0itNU}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{eXoiEKu5yWZkk7npUXFrc → ZSFfwWCBng6VPk2-0itNU}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
exports.id=1712,exports.ids=[595,1712],exports.modules={12044:(a,b,c)=>{let{X509CertificateGenerator:d,X509Certificate:e,cryptoProvider:f,X509ChainBuilder:g,BasicConstraintsExtension:h,KeyUsagesExtension:i,KeyUsageFlags:j,ExtendedKeyUsageExtension:k,ExtendedKeyUsage:l,SubjectAlternativeNameExtension:m,GeneralName:n}=c(88807),o=c(55511),p=o.webcrypto;function q(a){var b=parseInt(a[0],16);return b<8?a:(b-=8).toString()+a.substring(1)}function r(a){switch(a){case"sha256":return"SHA-256";case"sha384":return"SHA-384";case"sha512":return"SHA-512";default:return"SHA-1"}}function s(a,b){let c=r(a);return"ec"===b?{name:"ECDSA",hash:c}:{name:"RSASSA-PKCS1-v1_5",hash:c}}function t(a){let b=a.keyType||"rsa",c=r(a.algorithm||"sha1");return"ec"===b?{name:"ECDSA",namedCurve:a.curve||"P-256"}:{name:"RSASSA-PKCS1-v1_5",modulusLength:a.keySize||2048,publicExponent:new Uint8Array([1,0,1]),hash:c}}function u(a){let b={commonName:"CN",countryName:"C",ST:"ST",localityName:"L",organizationName:"O",OU:"OU"};return a.map(a=>{let c=a.name||a.shortName,d=b[c]||c;return`${d}=${a.value}`}).join(", ")}async function v(a,b,c){let d,e=o.createPrivateKey(a),f=e.asymmetricKeyType,g=e.export({type:"pkcs8",format:"pem"}).replace(/-----BEGIN PRIVATE KEY-----/,"").replace(/-----END PRIVATE KEY-----/,"").replace(/\s/g,""),h=Buffer.from(g,"base64");return d="ec"===(c||f)?{name:"ECDSA",namedCurve:function(a){let b=a.asymmetricKeyDetails;if(b&&b.namedCurve){var c;return({prime256v1:"P-256",secp384r1:"P-384",secp521r1:"P-521","P-256":"P-256","P-384":"P-384","P-521":"P-521"})[c=b.namedCurve]||c}return"P-256"}(e)}:{name:"RSASSA-PKCS1-v1_5",hash:r(b)},await p.subtle.importKey("pkcs8",h,d,!0,["sign"])}async function w(a,b,c,d){let e,f=a.replace(/-----BEGIN PUBLIC KEY-----/,"").replace(/-----END PUBLIC KEY-----/,"").replace(/\s/g,""),g=Buffer.from(f,"base64");return e="ec"===c?{name:"ECDSA",namedCurve:d||"P-256"}:{name:"RSASSA-PKCS1-v1_5",hash:r(b)},await p.subtle.importKey("spki",g,e,!0,["verify"])}async function x(a,b,c,f){let n,r,{privateKey:w,publicKey:x}=a,y=p.getRandomValues(new Uint8Array(9)),z=q(Buffer.from(y).toString("hex")),A=c.notBeforeDate||new Date;c.notAfterDate?n=c.notAfterDate:(n=new Date(A)).setDate(n.getDate()+365);let B=u(b=b||[{name:"commonName",value:"example.org"},{name:"countryName",value:"US"},{shortName:"ST",value:"Virginia"},{name:"localityName",value:"Blacksburg"},{name:"organizationName",value:"Test"},{shortName:"OU",value:"Test"}]),C=c.keyType||"rsa",D=s(c.algorithm,C),E=b.find(a=>"commonName"===a.name||"CN"===a.shortName),F=E?E.value:"localhost",G=function(a,b){if(!a||0===a.length)return[new h(!1,void 0,!0),new i(j.digitalSignature|j.keyEncipherment,!0),new k([l.serverAuth,l.clientAuth],!1),new m([{type:"dns",value:b},..."localhost"===b?[{type:"ip",value:"127.0.0.1"}]:[]],!1)];let c=[];for(let b of a){let a=b.critical||!1;switch(b.name){case"basicConstraints":c.push(new h(b.cA||!1,b.pathLenConstraint,a));break;case"keyUsage":let d=0;b.digitalSignature&&(d|=j.digitalSignature),(b.nonRepudiation||b.contentCommitment)&&(d|=j.nonRepudiation),b.keyEncipherment&&(d|=j.keyEncipherment),b.dataEncipherment&&(d|=j.dataEncipherment),b.keyAgreement&&(d|=j.keyAgreement),b.keyCertSign&&(d|=j.keyCertSign),b.cRLSign&&(d|=j.cRLSign),b.encipherOnly&&(d|=j.encipherOnly),b.decipherOnly&&(d|=j.decipherOnly),c.push(new i(d,a));break;case"extKeyUsage":let e=[];b.serverAuth&&e.push(l.serverAuth),b.clientAuth&&e.push(l.clientAuth),b.codeSigning&&e.push(l.codeSigning),b.emailProtection&&e.push(l.emailProtection),b.timeStamping&&e.push(l.timeStamping),c.push(new k(e,a));break;case"subjectAltName":let f=(b.altNames||[]).map(a=>{switch(a.type){case 1:return{type:"email",value:a.value};case 2:return{type:"dns",value:a.value};case 6:return{type:"url",value:a.value};case 7:return{type:"ip",value:a.ip||a.value};default:if(a.ip)return{type:"ip",value:a.ip};if(a.dns)return{type:"dns",value:a.dns};if(a.email)return{type:"email",value:a.email};if(a.uri||a.url)return{type:"url",value:a.uri||a.url};return{type:"dns",value:a.value}}});c.push(new m(f,a));break;default:console.warn(`Unknown extension "${b.name}" ignored`)}}return c}(c.extensions,F);if(f){let a=new e(f.cert),b=await v(f.key,c.algorithm||"sha256",C);r=await d.create({serialNumber:z,subject:B,issuer:a.subject,notBefore:A,notAfter:n,signingAlgorithm:D,publicKey:x,signingKey:b,extensions:G})}else r=await d.createSelfSigned({serialNumber:z,name:B,notBefore:A,notAfter:n,signingAlgorithm:D,keys:{privateKey:w,publicKey:x},extensions:G});let H=r.rawData,I=await p.subtle.digest("SHA-1",H),J=Buffer.from(I).toString("hex").match(/.{2}/g).join(":"),K=await p.subtle.exportKey("pkcs8",w),L=await p.subtle.exportKey("spki",x),M={private:c.passphrase?o.createPrivateKey({key:Buffer.from(K),format:"der",type:"pkcs8"}).export({type:"pkcs8",format:"pem",cipher:"aes-256-cbc",passphrase:c.passphrase}):"-----BEGIN PRIVATE KEY-----\n"+Buffer.from(K).toString("base64").match(/.{1,64}/g).join("\n")+"\n-----END PRIVATE KEY-----\n",public:"-----BEGIN PUBLIC KEY-----\n"+Buffer.from(L).toString("base64").match(/.{1,64}/g).join("\n")+"\n-----END PUBLIC KEY-----\n",cert:r.toString("pem"),fingerprint:J};if(c&&c.clientCertificate){let a,e="object"==typeof c.clientCertificate?c.clientCertificate:{},f=e.keySize||c.clientCertificateKeySize||2048,g=e.algorithm||c.algorithm||"sha1",h=e.cn||c.clientCertificateCN||"John Doe jdoe123",i=t({keyType:e.keyType||C,keySize:f,algorithm:g,curve:e.curve||c.curve||"P-256"}),j=await p.subtle.generateKey(i,!0,["sign","verify"]),k=p.getRandomValues(new Uint8Array(9)),l=q(Buffer.from(k).toString("hex")),m=e.notBeforeDate||new Date;e.notAfterDate?a=e.notAfterDate:(a=new Date(m)).setFullYear(m.getFullYear()+1);let n=JSON.parse(JSON.stringify(b));for(let a=0;a<n.length;a++)"commonName"===n[a].name&&(n[a]={name:"commonName",value:h});let o=u(n),r=u(b),v=s(g,C),x=await d.create({serialNumber:l,subject:o,issuer:r,notBefore:m,notAfter:a,signingAlgorithm:v,publicKey:j.publicKey,signingKey:w}),y=await p.subtle.exportKey("pkcs8",j.privateKey),z=await p.subtle.exportKey("spki",j.publicKey);M.clientprivate="-----BEGIN PRIVATE KEY-----\n"+Buffer.from(y).toString("base64").match(/.{1,64}/g).join("\n")+"\n-----END PRIVATE KEY-----\n",M.clientpublic="-----BEGIN PUBLIC KEY-----\n"+Buffer.from(z).toString("base64").match(/.{1,64}/g).join("\n")+"\n-----END PUBLIC KEY-----\n",M.clientcert=x.toString("pem")}let N=new e(r.rawData),O=[N];if(f){let a=new e(f.cert);O.push(a)}let P=new g({certificates:O});if(0===(await P.build(N)).length)throw Error("Certificate could not be verified.");return M}f.set(p),b.generate=async function(a,b){let c;a=a||void 0;let d=(b=b||{}).keyType||"rsa",e=b.curve||"P-256";if(b.keyPair)c={privateKey:await v(b.keyPair.privateKey,b.algorithm||"sha1",d),publicKey:await w(b.keyPair.publicKey,b.algorithm||"sha1",d,e)};else{let a=t(b);c=await p.subtle.generateKey(a,!0,["sign","verify"])}return await x(c,a,b,b.ca)}},19713:function(a,b,c){a.exports=function(a,b){var d=[function(a,b,c){a.exports=c(34)},function(a,b,c){var d=c(29)("wks"),e=c(33),f=c(2).Symbol,g="function"==typeof f;(a.exports=function(a){return d[a]||(d[a]=g&&f[a]||(g?f:e)("Symbol."+a))}).store=d},function(a,b){var c=a.exports="u">typeof window&&window.Math==Math?window:"u">typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=c)},function(a,b,c){var d=c(9);a.exports=function(a){if(!d(a))throw TypeError(a+" is not an object!");return a}},function(a,b,c){a.exports=!c(24)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(a,b,c){var d=c(12),e=c(17);a.exports=c(4)?function(a,b,c){return d.f(a,b,e(1,c))}:function(a,b,c){return a[b]=c,a}},function(a,b){var c=a.exports={version:"2.4.0"};"number"==typeof __e&&(__e=c)},function(a,b,c){var d=c(14);a.exports=function(a,b,c){if(d(a),void 0===b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},function(a,b){var c={}.hasOwnProperty;a.exports=function(a,b){return c.call(a,b)}},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,b){a.exports={}},function(a,b){var c={}.toString;a.exports=function(a){return c.call(a).slice(8,-1)}},function(a,b,c){var d=c(3),e=c(26),f=c(32),g=Object.defineProperty;b.f=c(4)?Object.defineProperty:function(a,b,c){if(d(a),b=f(b,!0),d(c),e)try{return g(a,b,c)}catch(a){}if("get"in c||"set"in c)throw TypeError("Accessors not supported!");return"value"in c&&(a[b]=c.value),a}},function(a,b,c){var d=c(42),e=c(15);a.exports=function(a){return d(e(a))}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,b){a.exports=function(a){if(void 0==a)throw TypeError("Can't call method on "+a);return a}},function(a,b,c){var d=c(9),e=c(2).document,f=d(e)&&d(e.createElement);a.exports=function(a){return f?e.createElement(a):{}}},function(a,b){a.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},function(a,b,c){var d=c(12).f,e=c(8),f=c(1)("toStringTag");a.exports=function(a,b,c){a&&!e(a=c?a:a.prototype,f)&&d(a,f,{configurable:!0,value:b})}},function(a,b,c){var d=c(29)("keys"),e=c(33);a.exports=function(a){return d[a]||(d[a]=e(a))}},function(a,b){var c=Math.ceil,d=Math.floor;a.exports=function(a){return isNaN(a*=1)?0:(a>0?d:c)(a)}},function(a,b,c){var d=c(11),e=c(1)("toStringTag"),f="Arguments"==d(function(){return arguments}()),g=function(a,b){try{return a[b]}catch(a){}};a.exports=function(a){var b,c,h;return void 0===a?"Undefined":null===a?"Null":"string"==typeof(c=g(b=Object(a),e))?c:f?d(b):"Object"==(h=d(b))&&"function"==typeof b.callee?"Arguments":h}},function(a,b){a.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(a,b,c){var d=c(2),e=c(6),f=c(7),g=c(5),h="prototype",i=function(a,b,c){var j,k,l,m=a&i.F,n=a&i.G,o=a&i.S,p=a&i.P,q=a&i.B,r=a&i.W,s=n?e:e[b]||(e[b]={}),t=s[h],u=n?d:o?d[b]:(d[b]||{})[h];for(j in n&&(c=b),c)(k=!m&&u&&void 0!==u[j])&&j in s||(l=k?u[j]:c[j],s[j]=n&&"function"!=typeof u[j]?c[j]:q&&k?f(l,d):r&&u[j]==l?function(a){var b=function(b,c,d){if(this instanceof a){switch(arguments.length){case 0:return new a;case 1:return new a(b);case 2:return new a(b,c)}return new a(b,c,d)}return a.apply(this,arguments)};return b[h]=a[h],b}(l):p&&"function"==typeof l?f(Function.call,l):l,p&&((s.virtual||(s.virtual={}))[j]=l,a&i.R&&t&&!t[j]&&g(t,j,l)))};i.F=1,i.G=2,i.S=4,i.P=8,i.B=16,i.W=32,i.U=64,i.R=128,a.exports=i},function(a,b){a.exports=function(a){try{return!!a()}catch(a){return!0}}},function(a,b,c){a.exports=c(2).document&&document.documentElement},function(a,b,c){a.exports=!c(4)&&!c(24)(function(){return 7!=Object.defineProperty(c(16)("div"),"a",{get:function(){return 7}}).a})},function(a,b,c){"use strict";var d=c(28),e=c(23),f=c(57),g=c(5),h=c(8),i=c(10),j=c(45),k=c(18),l=c(52),m=c(1)("iterator"),n=!([].keys&&"next"in[].keys()),o="keys",p="values",q=function(){return this};a.exports=function(a,b,c,r,s,t,u){j(c,b,r);var v,w,x,y=function(a){if(!n&&a in C)return C[a];switch(a){case o:case p:return function(){return new c(this,a)}}return function(){return new c(this,a)}},z=b+" Iterator",A=s==p,B=!1,C=a.prototype,D=C[m]||C["@@iterator"]||s&&C[s],E=D||y(s),F=s?A?y("entries"):E:void 0,G="Array"==b&&C.entries||D;if(G&&(x=l(G.call(new a)))!==Object.prototype&&(k(x,z,!0),d||h(x,m)||g(x,m,q)),A&&D&&D.name!==p&&(B=!0,E=function(){return D.call(this)}),(!d||u)&&(n||B||!C[m])&&g(C,m,E),i[b]=E,i[z]=q,s)if(v={values:A?E:y(p),keys:t?E:y(o),entries:F},u)for(w in v)w in C||f(C,w,v[w]);else e(e.P+e.F*(n||B),b,v);return v}},function(a,b){a.exports=!0},function(a,b,c){var d=c(2),e="__core-js_shared__",f=d[e]||(d[e]={});a.exports=function(a){return f[a]||(f[a]={})}},function(a,b,c){var d,e,f,g=c(7),h=c(41),i=c(25),j=c(16),k=c(2),l=k.process,m=k.setImmediate,n=k.clearImmediate,o=k.MessageChannel,p=0,q={},r="onreadystatechange",s=function(){var a=+this;if(q.hasOwnProperty(a)){var b=q[a];delete q[a],b()}},t=function(a){s.call(a.data)};m&&n||(m=function(a){for(var b=[],c=1;arguments.length>c;)b.push(arguments[c++]);return q[++p]=function(){h("function"==typeof a?a:Function(a),b)},d(p),p},n=function(a){delete q[a]},"process"==c(11)(l)?d=function(a){l.nextTick(g(s,a,1))}:o?(f=(e=new o).port2,e.port1.onmessage=t,d=g(f.postMessage,f,1)):k.addEventListener&&"function"==typeof postMessage&&!k.importScripts?(d=function(a){k.postMessage(a+"","*")},k.addEventListener("message",t,!1)):d=r in j("script")?function(a){i.appendChild(j("script"))[r]=function(){i.removeChild(this),s.call(a)}}:function(a){setTimeout(g(s,a,1),0)}),a.exports={set:m,clear:n}},function(a,b,c){var d=c(20),e=Math.min;a.exports=function(a){return a>0?e(d(a),0x1fffffffffffff):0}},function(a,b,c){var d=c(9);a.exports=function(a,b){var c,e;if(!d(a))return a;if(b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a))||"function"==typeof(c=a.valueOf)&&!d(e=c.call(a))||!b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;throw TypeError("Can't convert object to primitive value")}},function(a,b){var c=0,d=Math.random();a.exports=function(a){return"Symbol(".concat(void 0===a?"":a,")_",(++c+d).toString(36))}},function(a,b,c){"use strict";function d(a){return(0,i.createHash)("sha256").update(a).digest("hex")}function e(a){switch(j){case"darwin":return a.split("IOPlatformUUID")[1].split("\n")[0].replace(/\=|\s+|\"/gi,"").toLowerCase();case"win32":return a.toString().split("REG_SZ")[1].replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"linux":case"freebsd":return a.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();default:throw Error("Unsupported platform: "+process.platform)}}Object.defineProperty(b,"__esModule",{value:!0});var f,g=(f=c(35))&&f.__esModule?f:{default:f};b.machineIdSync=function(a){var b=e((0,h.execSync)(k[j]).toString());return a?b:d(b)},b.machineId=function(a){return new g.default(function(b,c){return(0,h.exec)(k[j],{},function(f,g,h){if(f)return c(Error("Error while obtaining machine id: "+f.stack));var i=e(g.toString());return b(a?i:d(i))})})};var h=c(70),i=c(71),j=process.platform,k={darwin:"ioreg -rd1 -c IOPlatformExpertDevice",win32:{native:"%windir%\\System32",mixed:"%windir%\\sysnative\\cmd.exe /c %windir%\\System32"}["win32"!==process.platform?"":"ia32"===process.arch&&process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432")?"mixed":"native"]+"\\REG.exe QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",linux:"( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :",freebsd:"kenv -q smbios.system.uuid || sysctl -n kern.hostuuid"}},function(a,b,c){a.exports={default:c(36),__esModule:!0}},function(a,b,c){c(66),c(68),c(69),c(67),a.exports=c(6).Promise},function(a,b){a.exports=function(){}},function(a,b){a.exports=function(a,b,c,d){if(!(a instanceof b)||void 0!==d&&d in a)throw TypeError(c+": incorrect invocation!");return a}},function(a,b,c){var d=c(13),e=c(31),f=c(62);a.exports=function(a){return function(b,c,g){var h,i=d(b),j=e(i.length),k=f(g,j);if(a&&c!=c){for(;j>k;)if((h=i[k++])!=h)return!0}else for(;j>k;k++)if((a||k in i)&&i[k]===c)return a||k||0;return!a&&-1}}},function(a,b,c){var d=c(7),e=c(44),f=c(43),g=c(3),h=c(31),i=c(64),j={},k={},b=a.exports=function(a,b,c,l,m){var n,o,p,q,r=m?function(){return a}:i(a),s=d(c,l,b?2:1),t=0;if("function"!=typeof r)throw TypeError(a+" is not iterable!");if(f(r)){for(n=h(a.length);n>t;t++)if((q=b?s(g(o=a[t])[0],o[1]):s(a[t]))===j||q===k)return q}else for(p=r.call(a);!(o=p.next()).done;)if((q=e(p,s,o.value,b))===j||q===k)return q};b.BREAK=j,b.RETURN=k},function(a,b){a.exports=function(a,b,c){var d=void 0===c;switch(b.length){case 0:return d?a():a.call(c);case 1:return d?a(b[0]):a.call(c,b[0]);case 2:return d?a(b[0],b[1]):a.call(c,b[0],b[1]);case 3:return d?a(b[0],b[1],b[2]):a.call(c,b[0],b[1],b[2]);case 4:return d?a(b[0],b[1],b[2],b[3]):a.call(c,b[0],b[1],b[2],b[3])}return a.apply(c,b)}},function(a,b,c){var d=c(11);a.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==d(a)?a.split(""):Object(a)}},function(a,b,c){var d=c(10),e=c(1)("iterator"),f=Array.prototype;a.exports=function(a){return void 0!==a&&(d.Array===a||f[e]===a)}},function(a,b,c){var d=c(3);a.exports=function(a,b,c,e){try{return e?b(d(c)[0],c[1]):b(c)}catch(b){var f=a.return;throw void 0!==f&&d(f.call(a)),b}}},function(a,b,c){"use strict";var d=c(49),e=c(17),f=c(18),g={};c(5)(g,c(1)("iterator"),function(){return this}),a.exports=function(a,b,c){a.prototype=d(g,{next:e(1,c)}),f(a,b+" Iterator")}},function(a,b,c){var d=c(1)("iterator"),e=!1;try{var f=[7][d]();f.return=function(){e=!0},Array.from(f,function(){throw 2})}catch(a){}a.exports=function(a,b){if(!b&&!e)return!1;var c=!1;try{var f=[7],g=f[d]();g.next=function(){return{done:c=!0}},f[d]=function(){return g},a(f)}catch(a){}return c}},function(a,b){a.exports=function(a,b){return{value:b,done:!!a}}},function(a,b,c){var d=c(2),e=c(30).set,f=d.MutationObserver||d.WebKitMutationObserver,g=d.process,h=d.Promise,i="process"==c(11)(g);a.exports=function(){var a,b,c,j=function(){var d,e;for(i&&(d=g.domain)&&d.exit();a;){e=a.fn,a=a.next;try{e()}catch(d){throw a?c():b=void 0,d}}b=void 0,d&&d.enter()};if(i)c=function(){g.nextTick(j)};else if(f){var k=!0,l=document.createTextNode("");new f(j).observe(l,{characterData:!0}),c=function(){l.data=k=!k}}else if(h&&h.resolve){var m=h.resolve();c=function(){m.then(j)}}else c=function(){e.call(d,j)};return function(d){var e={fn:d,next:void 0};b&&(b.next=e),a||(a=e,c()),b=e}}},function(a,b,c){var d=c(3),e=c(50),f=c(22),g=c(19)("IE_PROTO"),h=function(){},i="prototype",j=function(){var a,b=c(16)("iframe"),d=f.length;for(b.style.display="none",c(25).appendChild(b),b.src="javascript:",(a=b.contentWindow.document).open(),a.write("<script>document.F=Object<\/script>"),a.close(),j=a.F;d--;)delete j[i][f[d]];return j()};a.exports=Object.create||function(a,b){var c;return null!==a?(h[i]=d(a),c=new h,h[i]=null,c[g]=a):c=j(),void 0===b?c:e(c,b)}},function(a,b,c){var d=c(12),e=c(3),f=c(54);a.exports=c(4)?Object.defineProperties:function(a,b){e(a);for(var c,g=f(b),h=g.length,i=0;h>i;)d.f(a,c=g[i++],b[c]);return a}},function(a,b,c){var d=c(55),e=c(17),f=c(13),g=c(32),h=c(8),i=c(26),j=Object.getOwnPropertyDescriptor;b.f=c(4)?j:function(a,b){if(a=f(a),b=g(b,!0),i)try{return j(a,b)}catch(a){}if(h(a,b))return e(!d.f.call(a,b),a[b])}},function(a,b,c){var d=c(8),e=c(63),f=c(19)("IE_PROTO"),g=Object.prototype;a.exports=Object.getPrototypeOf||function(a){return d(a=e(a),f)?a[f]:"function"==typeof a.constructor&&a instanceof a.constructor?a.constructor.prototype:a instanceof Object?g:null}},function(a,b,c){var d=c(8),e=c(13),f=c(39)(!1),g=c(19)("IE_PROTO");a.exports=function(a,b){var c,h=e(a),i=0,j=[];for(c in h)c!=g&&d(h,c)&&j.push(c);for(;b.length>i;)d(h,c=b[i++])&&(~f(j,c)||j.push(c));return j}},function(a,b,c){var d=c(53),e=c(22);a.exports=Object.keys||function(a){return d(a,e)}},function(a,b){b.f=({}).propertyIsEnumerable},function(a,b,c){var d=c(5);a.exports=function(a,b,c){for(var e in b)c&&a[e]?a[e]=b[e]:d(a,e,b[e]);return a}},function(a,b,c){a.exports=c(5)},function(a,b,c){var d=c(9),e=c(3),f=function(a,b){if(e(a),!d(b)&&null!==b)throw TypeError(b+": can't set as prototype!")};a.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(a,b,d){try{(d=c(7)(Function.call,c(51).f(Object.prototype,"__proto__").set,2))(a,[]),b=!(a instanceof Array)}catch(a){b=!0}return function(a,c){return f(a,c),b?a.__proto__=c:d(a,c),a}}({},!1):void 0),check:f}},function(a,b,c){"use strict";var d=c(2),e=c(6),f=c(12),g=c(4),h=c(1)("species");a.exports=function(a){var b="function"==typeof e[a]?e[a]:d[a];g&&b&&!b[h]&&f.f(b,h,{configurable:!0,get:function(){return this}})}},function(a,b,c){var d=c(3),e=c(14),f=c(1)("species");a.exports=function(a,b){var c,g=d(a).constructor;return void 0===g||void 0==(c=d(g)[f])?b:e(c)}},function(a,b,c){var d=c(20),e=c(15);a.exports=function(a){return function(b,c){var f,g,h=String(e(b)),i=d(c),j=h.length;return i<0||i>=j?a?"":void 0:(f=h.charCodeAt(i))<55296||f>56319||i+1===j||(g=h.charCodeAt(i+1))<56320||g>57343?a?h.charAt(i):f:a?h.slice(i,i+2):(f-55296<<10)+(g-56320)+65536}}},function(a,b,c){var d=c(20),e=Math.max,f=Math.min;a.exports=function(a,b){return(a=d(a))<0?e(a+b,0):f(a,b)}},function(a,b,c){var d=c(15);a.exports=function(a){return Object(d(a))}},function(a,b,c){var d=c(21),e=c(1)("iterator"),f=c(10);a.exports=c(6).getIteratorMethod=function(a){if(void 0!=a)return a[e]||a["@@iterator"]||f[d(a)]}},function(a,b,c){"use strict";var d=c(37),e=c(47),f=c(10),g=c(13);a.exports=c(27)(Array,"Array",function(a,b){this._t=g(a),this._i=0,this._k=b},function(){var a=this._t,b=this._k,c=this._i++;return!a||c>=a.length?(this._t=void 0,e(1)):"keys"==b?e(0,c):"values"==b?e(0,a[c]):e(0,[c,a[c]])},"values"),f.Arguments=f.Array,d("keys"),d("values"),d("entries")},function(a,b){},function(a,b,c){"use strict";var d,e,f,g=c(28),h=c(2),i=c(7),j=c(21),k=c(23),l=c(9),m=(c(3),c(14)),n=c(38),o=c(40),p=(c(58).set,c(60)),q=c(30).set,r=c(48)(),s="Promise",t=h.TypeError,u=h.process,v=h[s],u=h.process,w="process"==j(u),x=function(){},y=!!function(){try{var a=v.resolve(1),b=(a.constructor={})[c(1)("species")]=function(a){a(x,x)};return(w||"function"==typeof PromiseRejectionEvent)&&a.then(x)instanceof b}catch(a){}}(),z=function(a,b){return a===b||a===v&&b===f},A=function(a){var b;return!(!l(a)||"function"!=typeof(b=a.then))&&b},B=function(a){return z(v,a)?new C(a):new e(a)},C=e=function(a){var b,c;this.promise=new a(function(a,d){if(void 0!==b||void 0!==c)throw t("Bad Promise constructor");b=a,c=d}),this.resolve=m(b),this.reject=m(c)},D=function(a){try{a()}catch(a){return{error:a}}},E=function(a,b){if(!a._n){a._n=!0;var c=a._c;r(function(){for(var d=a._v,e=1==a._s,f=0;c.length>f;)!function(b){var c,f,g=e?b.ok:b.fail,h=b.resolve,i=b.reject,j=b.domain;try{g?(e||(2==a._h&&H(a),a._h=1),!0===g?c=d:(j&&j.enter(),c=g(d),j&&j.exit()),c===b.promise?i(t("Promise-chain cycle")):(f=A(c))?f.call(c,h,i):h(c)):i(d)}catch(a){i(a)}}(c[f++]);a._c=[],a._n=!1,b&&!a._h&&F(a)})}},F=function(a){q.call(h,function(){var b,c,d,e=a._v;if(G(a)&&(b=D(function(){w?u.emit("unhandledRejection",e,a):(c=h.onunhandledrejection)?c({promise:a,reason:e}):(d=h.console)&&d.error&&d.error("Unhandled promise rejection",e)}),a._h=w||G(a)?2:1),a._a=void 0,b)throw b.error})},G=function(a){if(1==a._h)return!1;for(var b,c=a._a||a._c,d=0;c.length>d;)if((b=c[d++]).fail||!G(b.promise))return!1;return!0},H=function(a){q.call(h,function(){var b;w?u.emit("rejectionHandled",a):(b=h.onrejectionhandled)&&b({promise:a,reason:a._v})})},I=function(a){var b=this;b._d||(b._d=!0,(b=b._w||b)._v=a,b._s=2,b._a||(b._a=b._c.slice()),E(b,!0))},J=function(a){var b,c=this;if(!c._d){c._d=!0,c=c._w||c;try{if(c===a)throw t("Promise can't be resolved itself");(b=A(a))?r(function(){var d={_w:c,_d:!1};try{b.call(a,i(J,d,1),i(I,d,1))}catch(a){I.call(d,a)}}):(c._v=a,c._s=1,E(c,!1))}catch(a){I.call({_w:c,_d:!1},a)}}};y||(v=function(a){n(this,v,s,"_h"),m(a),d.call(this);try{a(i(J,this,1),i(I,this,1))}catch(a){I.call(this,a)}},(d=function(a){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=c(56)(v.prototype,{then:function(a,b){var c=B(p(this,v));return c.ok="function"!=typeof a||a,c.fail="function"==typeof b&&b,c.domain=w?u.domain:void 0,this._c.push(c),this._a&&this._a.push(c),this._s&&E(this,!1),c.promise},catch:function(a){return this.then(void 0,a)}}),C=function(){var a=new d;this.promise=a,this.resolve=i(J,a,1),this.reject=i(I,a,1)}),k(k.G+k.W+!y*k.F,{Promise:v}),c(18)(v,s),c(59)(s),f=c(6)[s],k(k.S+!y*k.F,s,{reject:function(a){var b=B(this);return(0,b.reject)(a),b.promise}}),k(k.S+k.F*(g||!y),s,{resolve:function(a){if(a instanceof v&&z(a.constructor,this))return a;var b=B(this);return(0,b.resolve)(a),b.promise}}),k(k.S+k.F*!(y&&c(46)(function(a){v.all(a).catch(x)})),s,{all:function(a){var b=this,c=B(b),d=c.resolve,e=c.reject,f=D(function(){var c=[],f=0,g=1;o(a,!1,function(a){var h=f++,i=!1;c.push(void 0),g++,b.resolve(a).then(function(a){i||(i=!0,c[h]=a,--g||d(c))},e)}),--g||d(c)});return f&&e(f.error),c.promise},race:function(a){var b=this,c=B(b),d=c.reject,e=D(function(){o(a,!1,function(a){b.resolve(a).then(c.resolve,d)})});return e&&d(e.error),c.promise}})},function(a,b,c){"use strict";var d=c(61)(!0);c(27)(String,"String",function(a){this._t=String(a),this._i=0},function(){var a,b=this._t,c=this._i;return c>=b.length?{value:void 0,done:!0}:(a=d(b,c),this._i+=a.length,{value:a,done:!1})})},function(a,b,c){c(65);for(var d=c(2),e=c(5),f=c(10),g=c(1)("toStringTag"),h=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],i=0;i<5;i++){var j=h[i],k=d[j],l=k&&k.prototype;l&&!l[g]&&e(l,g,j),f[j]=f.Array}},function(a,b){a.exports=c(79646)},function(a,b){a.exports=c(55511)}];function e(a){if(f[a])return f[a].exports;var b=f[a]={exports:{},id:a,loaded:!1};return d[a].call(b.exports,b,b.exports,e),b.loaded=!0,b.exports}var f={};return e.m=d,e.c=f,e.p="",e(0)}(c(79646),c(55511))},50122:(a,b,c)=>{"use strict";c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},86718:()=>{var a,b;b=a||(a={}),function(a){var c="object"==typeof globalThis?globalThis:"object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(a){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(a){}}(),d=e(b);function e(a,b){return function(c,d){Object.defineProperty(a,c,{configurable:!0,writable:!0,value:d}),b&&b(c,d)}}void 0!==c.Reflect&&(d=e(c.Reflect,d)),a(d,c),void 0===c.Reflect&&(c.Reflect=b)}(function(a,b){var c,d=Object.prototype.hasOwnProperty,e="function"==typeof Symbol,f=e&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",g=e&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",h="function"==typeof Object.create,i=({__proto__:[]})instanceof Array,j=!h&&!i,k={create:h?function(){return L(Object.create(null))}:i?function(){return L({__proto__:null})}:function(){return L({})},has:j?function(a,b){return d.call(a,b)}:function(a,b){return b in a},get:j?function(a,b){return d.call(a,b)?a[b]:void 0}:function(a,b){return a[b]}},l=Object.getPrototypeOf(Function),m="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:function(){var a={},b=[],c=function(){function a(a,b,c){this._index=0,this._keys=a,this._values=b,this._selector=c}return a.prototype["@@iterator"]=function(){return this},a.prototype[g]=function(){return this},a.prototype.next=function(){var a=this._index;if(a>=0&&a<this._keys.length){var c=this._selector(this._keys[a],this._values[a]);return a+1>=this._keys.length?(this._index=-1,this._keys=b,this._values=b):this._index++,{value:c,done:!1}}return{value:void 0,done:!0}},a.prototype.throw=function(a){throw this._index>=0&&(this._index=-1,this._keys=b,this._values=b),a},a.prototype.return=function(a){return this._index>=0&&(this._index=-1,this._keys=b,this._values=b),{value:a,done:!0}},a}();function d(){this._keys=[],this._values=[],this._cacheKey=a,this._cacheIndex=-2}return Object.defineProperty(d.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),d.prototype.has=function(a){return this._find(a,!1)>=0},d.prototype.get=function(a){var b=this._find(a,!1);return b>=0?this._values[b]:void 0},d.prototype.set=function(a,b){var c=this._find(a,!0);return this._values[c]=b,this},d.prototype.delete=function(b){var c=this._find(b,!1);if(c>=0){for(var d=this._keys.length,e=c+1;e<d;e++)this._keys[e-1]=this._keys[e],this._values[e-1]=this._values[e];return this._keys.length--,this._values.length--,E(b,this._cacheKey)&&(this._cacheKey=a,this._cacheIndex=-2),!0}return!1},d.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=a,this._cacheIndex=-2},d.prototype.keys=function(){return new c(this._keys,this._values,e)},d.prototype.values=function(){return new c(this._keys,this._values,f)},d.prototype.entries=function(){return new c(this._keys,this._values,h)},d.prototype["@@iterator"]=function(){return this.entries()},d.prototype[g]=function(){return this.entries()},d.prototype._find=function(a,b){if(!E(this._cacheKey,a)){this._cacheIndex=-1;for(var c=0;c<this._keys.length;c++)if(E(this._keys[c],a)){this._cacheIndex=c;break}}return this._cacheIndex<0&&b&&(this._cacheIndex=this._keys.length,this._keys.push(a),this._values.push(void 0)),this._cacheIndex},d;function e(a,b){return a}function f(a,b){return b}function h(a,b){return[a,b]}}(),n="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:function(){function a(){this._map=new m}return Object.defineProperty(a.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),a.prototype.has=function(a){return this._map.has(a)},a.prototype.add=function(a){return this._map.set(a,a),this},a.prototype.delete=function(a){return this._map.delete(a)},a.prototype.clear=function(){this._map.clear()},a.prototype.keys=function(){return this._map.keys()},a.prototype.values=function(){return this._map.keys()},a.prototype.entries=function(){return this._map.entries()},a.prototype["@@iterator"]=function(){return this.keys()},a.prototype[g]=function(){return this.keys()},a}(),o="function"==typeof WeakMap?WeakMap:function(){var a=k.create(),b=e();function c(){this._key=e()}return c.prototype.has=function(a){var b=f(a,!1);return void 0!==b&&k.has(b,this._key)},c.prototype.get=function(a){var b=f(a,!1);return void 0!==b?k.get(b,this._key):void 0},c.prototype.set=function(a,b){return f(a,!0)[this._key]=b,this},c.prototype.delete=function(a){var b=f(a,!1);return void 0!==b&&delete b[this._key]},c.prototype.clear=function(){this._key=e()},c;function e(){var b;do b="@@WeakMap@@"+function(){var a=function(){if("function"==typeof Uint8Array){var a=new Uint8Array(16);return"u">typeof crypto?crypto.getRandomValues(a):"u">typeof msCrypto?msCrypto.getRandomValues(a):g(a,16),a}return g(Array(16),16)}();a[6]=79&a[6]|64,a[8]=191&a[8]|128;for(var b="",c=0;c<16;++c){var d=a[c];(4===c||6===c||8===c)&&(b+="-"),d<16&&(b+="0"),b+=d.toString(16).toLowerCase()}return b}();while(k.has(a,b));return a[b]=!0,b}function f(a,c){if(!d.call(a,b)){if(!c)return;Object.defineProperty(a,b,{value:k.create()})}return a[b]}function g(a,b){for(var c=0;c<b;++c)a[c]=255*Math.random()|0;return a}}(),p=e?Symbol.for("@reflect-metadata:registry"):void 0,q=(!x(p)&&z(b.Reflect)&&Object.isExtensible(b.Reflect)&&(c=b.Reflect[p]),x(c)&&(c=function(){x(p)||void 0===b.Reflect||p in b.Reflect||"function"!=typeof b.Reflect.defineMetadata||(c=(a=b.Reflect).defineMetadata,d=a.hasOwnMetadata,e=a.getOwnMetadata,f=a.getOwnMetadataKeys,g=a.deleteMetadata,h=new o,i={isProviderFor:function(a,b){var c=h.get(a);return!!(!x(c)&&c.has(b))||!!f(a,b).length&&(x(c)&&(c=new n,h.set(a,c)),c.add(b),!0)},OrdinaryDefineOwnMetadata:c,OrdinaryHasOwnMetadata:d,OrdinaryGetOwnMetadata:e,OrdinaryOwnMetadataKeys:f,OrdinaryDeleteMetadata:g});var a,c,d,e,f,g,h,i,j,k,l,q=new o,r={registerProvider:function(a){if(!Object.isExtensible(r))throw Error("Cannot add provider to a frozen registry.");switch(!0){case i===a:break;case x(j):j=a;break;case j===a:break;case x(k):k=a;break;case k===a:break;default:void 0===l&&(l=new n),l.add(a)}},getProvider:s,setProvider:function(a,b,c){if(!function(a){if(x(a))throw TypeError();return j===a||k===a||!x(l)&&l.has(a)}(c))throw Error("Metadata provider not registered.");var d=s(a,b);if(d!==c){if(!x(d))return!1;var e=q.get(a);x(e)&&(e=new m,q.set(a,e)),e.set(b,c)}return!0}};return r;function s(a,b){var c,d=q.get(a);return x(d)||(c=d.get(b)),x(c)&&(c=function(a,b){if(!x(j)){if(j.isProviderFor(a,b))return j;if(!x(k)){if(k.isProviderFor(a,b))return j;if(!x(l))for(var c=G(l);;){var d=H(c);if(!d)return;var e=d.value;if(e.isProviderFor(a,b))return I(c),e}}}if(!x(i)&&i.isProviderFor(a,b))return i}(a,b),x(c)||(x(d)&&(d=new m,q.set(a,d)),d.set(b,c))),c}}()),!x(p)&&z(b.Reflect)&&Object.isExtensible(b.Reflect)&&Object.defineProperty(b.Reflect,p,{enumerable:!1,configurable:!1,writable:!1,value:c}),c),r=function(a){var b=new o,c={isProviderFor:function(a,c){var d=b.get(a);return!x(d)&&d.has(c)},OrdinaryDefineOwnMetadata:function(a,b,c,e){d(c,e,!0).set(a,b)},OrdinaryHasOwnMetadata:function(a,b,c){var e=d(b,c,!1);return!x(e)&&!!e.has(a)},OrdinaryGetOwnMetadata:function(a,b,c){var e=d(b,c,!1);if(!x(e))return e.get(a)},OrdinaryOwnMetadataKeys:function(a,b){var c=[],e=d(a,b,!1);if(x(e))return c;for(var f=G(e.keys()),g=0;;){var h=H(f);if(!h)return c.length=g,c;var i=h.value;try{c[g]=i}catch(a){try{I(f)}finally{throw a}}g++}},OrdinaryDeleteMetadata:function(a,c,e){var f=d(c,e,!1);if(x(f)||!f.delete(a))return!1;if(0===f.size){var g=b.get(c);x(g)||(g.delete(e),0===g.size&&b.delete(g))}return!0}};return q.registerProvider(c),c;function d(d,e,f){var g=b.get(d),h=!1;if(x(g)){if(!f)return;g=new m,b.set(d,g),h=!0}var i=g.get(e);if(x(i)){if(!f)return;if(i=new m,g.set(e,i),!a.setProvider(d,e,c))throw g.delete(e),h&&b.delete(d),Error("Wrong provider for target.")}return i}}(q);function s(a,b,c){var d=K(b,c,!1);return!x(d)&&!!d.OrdinaryHasOwnMetadata(a,b,c)}function t(a,b,c){var d=K(b,c,!1);if(!x(d))return d.OrdinaryGetOwnMetadata(a,b,c)}function u(a,b,c,d){K(c,d,!0).OrdinaryDefineOwnMetadata(a,b,c,d)}function v(a,b){var c=K(a,b,!1);return c?c.OrdinaryOwnMetadataKeys(a,b):[]}function w(a){if(null===a)return 1;switch(typeof a){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===a?1:6;default:return 6}}function x(a){return void 0===a}function y(a){return null===a}function z(a){return"object"==typeof a?null!==a:"function"==typeof a}a("decorate",function(a,b,c,d){if(x(c)){if(!B(a)||!D(b))throw TypeError();for(var e=a,f=b,g=e.length-1;g>=0;--g){var h=(0,e[g])(f);if(!x(h)&&!y(h)){if(!D(h))throw TypeError();f=h}}return f}if(!B(a)||!z(b)||!z(d)&&!x(d)&&!y(d))throw TypeError();return y(d)&&(d=void 0),function(a,b,c,d){for(var e=a.length-1;e>=0;--e){var f=(0,a[e])(b,c,d);if(!x(f)&&!y(f)){if(!z(f))throw TypeError();d=f}}return d}(a,b,c=A(c),d)}),a("metadata",function(a,b){return function(c,d){if(!z(c)||!x(d)&&!function(a){switch(w(a)){case 3:case 4:return!0;default:return!1}}(d))throw TypeError();u(a,b,c,d)}}),a("defineMetadata",function(a,b,c,d){if(!z(c))throw TypeError();return x(d)||(d=A(d)),u(a,b,c,d)}),a("hasMetadata",function(a,b,c){if(!z(b))throw TypeError();return x(c)||(c=A(c)),function a(b,c,d){if(s(b,c,d))return!0;var e=J(c);return!y(e)&&a(b,e,d)}(a,b,c)}),a("hasOwnMetadata",function(a,b,c){if(!z(b))throw TypeError();return x(c)||(c=A(c)),s(a,b,c)}),a("getMetadata",function(a,b,c){if(!z(b))throw TypeError();return x(c)||(c=A(c)),function a(b,c,d){if(s(b,c,d))return t(b,c,d);var e=J(c);if(!y(e))return a(b,e,d)}(a,b,c)}),a("getOwnMetadata",function(a,b,c){if(!z(b))throw TypeError();return x(c)||(c=A(c)),t(a,b,c)}),a("getMetadataKeys",function(a,b){if(!z(a))throw TypeError();return x(b)||(b=A(b)),function a(b,c){var d=v(b,c),e=J(b);if(null===e)return d;var f=a(e,c);if(f.length<=0)return d;if(d.length<=0)return f;for(var g=new n,h=[],i=0;i<d.length;i++){var j=d[i],k=g.has(j);k||(g.add(j),h.push(j))}for(var l=0;l<f.length;l++){var j=f[l],k=g.has(j);k||(g.add(j),h.push(j))}return h}(a,b)}),a("getOwnMetadataKeys",function(a,b){if(!z(a))throw TypeError();return x(b)||(b=A(b)),v(a,b)}),a("deleteMetadata",function(a,b,c){if(!z(b)||(x(c)||(c=A(c)),!z(b)))throw TypeError();x(c)||(c=A(c));var d=K(b,c,!1);return!x(d)&&d.OrdinaryDeleteMetadata(a,b,c)});function A(a){var b=function(a){switch(w(a)){case 0:case 1:case 2:case 3:case 4:case 5:return a}var b="string",c=F(a,f);if(void 0!==c){var d=c.call(a,b);if(z(d))throw TypeError();return d}return function(a,b){if("string"===b){var c=a.toString;if(C(c)){var d=c.call(a);if(!z(d))return d}var e=a.valueOf;if(C(e)){var d=e.call(a);if(!z(d))return d}}else{var e=a.valueOf;if(C(e)){var d=e.call(a);if(!z(d))return d}var f=a.toString;if(C(f)){var d=f.call(a);if(!z(d))return d}}throw TypeError()}(a,b)}(a);return"symbol"==typeof b?b:""+b}function B(a){return Array.isArray?Array.isArray(a):a instanceof Object?a instanceof Array:"[object Array]"===Object.prototype.toString.call(a)}function C(a){return"function"==typeof a}function D(a){return"function"==typeof a}function E(a,b){return a===b||a!=a&&b!=b}function F(a,b){var c=a[b];if(null!=c){if(!C(c))throw TypeError();return c}}function G(a){var b=F(a,g);if(!C(b))throw TypeError();var c=b.call(a);if(!z(c))throw TypeError();return c}function H(a){var b=a.next();return!b.done&&b}function I(a){var b=a.return;b&&b.call(a)}function J(a){var b=Object.getPrototypeOf(a);if("function"!=typeof a||a===l||b!==l)return b;var c=a.prototype,d=c&&Object.getPrototypeOf(c);if(null==d||d===Object.prototype)return b;var e=d.constructor;return"function"!=typeof e||e===a?b:e}function K(a,b,c){var d=q.getProvider(a,b);if(!x(d))return d;if(c){if(q.setProvider(a,b,r))return r;throw Error("Illegal state.")}}function L(a){return a.__=void 0,delete a.__,a}})},88807:(a,b,c)=>{"use strict";c.r(b),c.d(b,{AlgorithmProvider:()=>ic,AsnData:()=>iR,AsnDefaultSignatureFormatter:()=>jD,AsnEcSignatureFormatter:()=>jG,Attribute:()=>jy,AttributeFactory:()=>jB,AuthorityInfoAccessExtension:()=>ju,AuthorityKeyIdentifierExtension:()=>jl,BasicConstraintsExtension:()=>jm,CRLDistributionPointsExtension:()=>jt,CertificatePolicyExtension:()=>js,ChallengePasswordAttribute:()=>jz,CryptoProvider:()=>iT,DN:()=>i5,DNS:()=>i4,DefaultAlgorithmSerializer:()=>iO,EMAIL:()=>i6,EcAlgorithm:()=>iK,EdAlgorithm:()=>jL,ExtendedKeyUsage:()=>av,ExtendedKeyUsageExtension:()=>jn,Extension:()=>iS,ExtensionFactory:()=>jr,ExtensionsAttribute:()=>jA,GUID:()=>i9,GeneralName:()=>jc,GeneralNames:()=>jd,IP:()=>i7,IssuerAlternativeNameExtension:()=>jx,KeyUsageFlags:()=>aw,KeyUsagesExtension:()=>jo,Name:()=>iZ,NameIdentifier:()=>iW,OidSerializer:()=>iP,PemConverter:()=>ji,PemData:()=>jj,Pkcs10CertificateRequest:()=>jM,Pkcs10CertificateRequestGenerator:()=>jN,PublicKey:()=>jk,REGISTERED_ID:()=>jb,RsaAlgorithm:()=>jE,ShaAlgorithm:()=>jF,SubjectAlternativeNameExtension:()=>jq,SubjectKeyIdentifierExtension:()=>jp,TextConverter:()=>iQ,TextObject:()=>iN,UPN:()=>ja,URL:()=>i8,X509Certificate:()=>jO,X509CertificateGenerator:()=>jS,X509Certificates:()=>jP,X509ChainBuilder:()=>jQ,X509Crl:()=>jU,X509CrlEntry:()=>jT,X509CrlGenerator:()=>jV,X509CrlReason:()=>aX,cryptoProvider:()=>iU,diAlgorithm:()=>ib,diAlgorithmProvider:()=>id,diAsnSignatureFormatter:()=>jC,idEd25519:()=>jJ,idEd448:()=>jK,idX25519:()=>jH,idX448:()=>jI});var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ,aK,aL,aM,aN,aO,aP,aQ,aR,aS,aT,aU,aV,aW,aX,aY,aZ,a$,a_,a0,a1,a2,a3={};c.r(a3),c.d(a3,{Any:()=>cw,BaseBlock:()=>bB,BaseStringBlock:()=>bC,BitString:()=>bW,BmpString:()=>cd,Boolean:()=>bS,CharacterString:()=>co,Choice:()=>cx,Constructed:()=>bN,DATE:()=>cr,DEFAULT_MAX_CONTENT_LENGTH:()=>bH,DEFAULT_MAX_DEPTH:()=>bF,DEFAULT_MAX_NODES:()=>bG,DateTime:()=>ct,Duration:()=>cu,EndOfContent:()=>bP,Enumerated:()=>b$,GeneralString:()=>cn,GeneralizedTime:()=>cq,GraphicString:()=>cl,HexBlock:()=>bv,IA5String:()=>ck,Integer:()=>bZ,Null:()=>bQ,NumericString:()=>cg,ObjectIdentifier:()=>b1,OctetString:()=>bU,Primitive:()=>bE,PrintableString:()=>ch,RawData:()=>cz,RelativeObjectIdentifier:()=>b4,Repeated:()=>cy,Sequence:()=>b5,Set:()=>b6,TIME:()=>cv,TeletexString:()=>ci,TimeOfDay:()=>cs,UTCTime:()=>cp,UniversalString:()=>cf,Utf8String:()=>cb,ValueBlock:()=>bx,VideotexString:()=>cj,ViewWriter:()=>bl,VisibleString:()=>cm,compareSchema:()=>cA,fromBER:()=>bL,verifySchema:()=>cB}),c(86718);class a4{static isArrayBuffer(a){return"[object ArrayBuffer]"===Object.prototype.toString.call(a)}static toArrayBuffer(a){return this.isArrayBuffer(a)?a:a.byteLength===a.buffer.byteLength||0===a.byteOffset&&a.byteLength===a.buffer.byteLength?a.buffer:this.toUint8Array(a.buffer).slice(a.byteOffset,a.byteOffset+a.byteLength).buffer}static toUint8Array(a){return this.toView(a,Uint8Array)}static toView(a,b){if(a.constructor===b)return a;if(this.isArrayBuffer(a))return new b(a);if(this.isArrayBufferView(a))return new b(a.buffer,a.byteOffset,a.byteLength);throw TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'")}static isBufferSource(a){return this.isArrayBufferView(a)||this.isArrayBuffer(a)}static isArrayBufferView(a){return ArrayBuffer.isView(a)||a&&this.isArrayBuffer(a.buffer)}static isEqual(a,b){let c=a4.toUint8Array(a),d=a4.toUint8Array(b);if(c.length!==d.byteLength)return!1;for(let a=0;a<c.length;a++)if(c[a]!==d[a])return!1;return!0}static concat(...a){let b;b=!Array.isArray(a[0])||a[1]instanceof Function?Array.isArray(a[0])&&a[1]instanceof Function?a[0]:a[a.length-1]instanceof Function?a.slice(0,a.length-1):a:a[0];let c=0;for(let a of b)c+=a.byteLength;let d=new Uint8Array(c),e=0;for(let a of b){let b=this.toUint8Array(a);d.set(b,e),e+=b.length}return a[a.length-1]instanceof Function?this.toView(d,a[a.length-1]):d.buffer}}let a5="string",a6=/^[0-9a-f\s]+$/i,a7=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,a8=/^[a-zA-Z0-9-_]+$/;class a9{static fromString(a){let b=unescape(encodeURIComponent(a)),c=new Uint8Array(b.length);for(let a=0;a<b.length;a++)c[a]=b.charCodeAt(a);return c.buffer}static toString(a){let b=a4.toUint8Array(a),c="";for(let a=0;a<b.length;a++)c+=String.fromCharCode(b[a]);return decodeURIComponent(escape(c))}}class ba{static toString(a,b=!1){let c=a4.toArrayBuffer(a),d=new DataView(c),e="";for(let a=0;a<c.byteLength;a+=2)e+=String.fromCharCode(d.getUint16(a,b));return e}static fromString(a,b=!1){let c=new ArrayBuffer(2*a.length),d=new DataView(c);for(let c=0;c<a.length;c++)d.setUint16(2*c,a.charCodeAt(c),b);return c}}class bb{static isHex(a){return typeof a===a5&&a6.test(a)}static isBase64(a){return typeof a===a5&&a7.test(a)}static isBase64Url(a){return typeof a===a5&&a8.test(a)}static ToString(a,b="utf8"){let c=a4.toUint8Array(a);switch(b.toLowerCase()){case"utf8":return this.ToUtf8String(c);case"binary":return this.ToBinary(c);case"hex":return this.ToHex(c);case"base64":return this.ToBase64(c);case"base64url":return this.ToBase64Url(c);case"utf16le":return ba.toString(c,!0);case"utf16":case"utf16be":return ba.toString(c);default:throw Error(`Unknown type of encoding '${b}'`)}}static FromString(a,b="utf8"){if(!a)return new ArrayBuffer(0);switch(b.toLowerCase()){case"utf8":return this.FromUtf8String(a);case"binary":return this.FromBinary(a);case"hex":return this.FromHex(a);case"base64":return this.FromBase64(a);case"base64url":return this.FromBase64Url(a);case"utf16le":return ba.fromString(a,!0);case"utf16":case"utf16be":return ba.fromString(a);default:throw Error(`Unknown type of encoding '${b}'`)}}static ToBase64(a){let b=a4.toUint8Array(a);return"u">typeof btoa?btoa(this.ToString(b,"binary")):Buffer.from(b).toString("base64")}static FromBase64(a){let b=this.formatString(a);if(!b)return new ArrayBuffer(0);if(!bb.isBase64(b))throw TypeError("Argument 'base64Text' is not Base64 encoded");return"u">typeof atob?this.FromBinary(atob(b)):new Uint8Array(Buffer.from(b,"base64")).buffer}static FromBase64Url(a){let b=this.formatString(a);if(!b)return new ArrayBuffer(0);if(!bb.isBase64Url(b))throw TypeError("Argument 'base64url' is not Base64Url encoded");return this.FromBase64(this.Base64Padding(b.replace(/\-/g,"+").replace(/\_/g,"/")))}static ToBase64Url(a){return this.ToBase64(a).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}static FromUtf8String(a,b=bb.DEFAULT_UTF8_ENCODING){switch(b){case"ascii":return this.FromBinary(a);case"utf8":return a9.fromString(a);case"utf16":case"utf16be":return ba.fromString(a);case"utf16le":case"usc2":return ba.fromString(a,!0);default:throw Error(`Unknown type of encoding '${b}'`)}}static ToUtf8String(a,b=bb.DEFAULT_UTF8_ENCODING){switch(b){case"ascii":return this.ToBinary(a);case"utf8":return a9.toString(a);case"utf16":case"utf16be":return ba.toString(a);case"utf16le":case"usc2":return ba.toString(a,!0);default:throw Error(`Unknown type of encoding '${b}'`)}}static FromBinary(a){let b=a.length,c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=a.charCodeAt(d);return c.buffer}static ToBinary(a){let b=a4.toUint8Array(a),c="";for(let a=0;a<b.length;a++)c+=String.fromCharCode(b[a]);return c}static ToHex(a){let b=a4.toUint8Array(a),c="",d=b.length;for(let a=0;a<d;a++){let d=b[a];d<16&&(c+="0"),c+=d.toString(16)}return c}static FromHex(a){let b=this.formatString(a);if(!b)return new ArrayBuffer(0);if(!bb.isHex(b))throw TypeError("Argument 'hexString' is not HEX encoded");b.length%2&&(b=`0${b}`);let c=new Uint8Array(b.length/2);for(let a=0;a<b.length;a+=2){let d=b.slice(a,a+2);c[a/2]=parseInt(d,16)}return c.buffer}static ToUtf16String(a,b=!1){return ba.toString(a,b)}static FromUtf16String(a,b=!1){return ba.fromString(a,b)}static Base64Padding(a){let b=4-a.length%4;if(b<4)for(let c=0;c<b;c++)a+="=";return a}static formatString(a){return(null==a?void 0:a.replace(/[\n\r\t ]/g,""))||""}}function bc(a,b){if(!(a&&b)||a.byteLength!==b.byteLength)return!1;let c=new Uint8Array(a),d=new Uint8Array(b);for(let b=0;b<a.byteLength;b++)if(c[b]!==d[b])return!1;return!0}function bd(a,b){let c=0;if(1===a.length)return a[0];for(let d=a.length-1;d>=0;d--)c+=a[a.length-1-d]*Math.pow(2,b*d);return c}function be(a,b,c=-1){let d=a,e=0,f=Math.pow(2,b);for(let g=1;g<8;g++){if(a<f){let a;if(c<0)a=new ArrayBuffer(g),e=g;else{if(c<g)return new ArrayBuffer(0);a=new ArrayBuffer(c),e=c}let f=new Uint8Array(a);for(let a=g-1;a>=0;a--){let c=Math.pow(2,a*b);f[e-a-1]=Math.floor(d/c),d-=f[e-a-1]*c}return a}f*=Math.pow(2,b)}return new ArrayBuffer(0)}function bf(...a){let b=0,c=0;for(let c of a)b+=c.length;let d=new Uint8Array(new ArrayBuffer(b));for(let b of a)d.set(b,c),c+=b.length;return d}function bg(){let a=new Uint8Array(this.valueHex);if(this.valueHex.byteLength>=2){let b=255===a[0]&&128&a[1],c=0===a[0]&&(128&a[1])==0;(b||c)&&this.warnings.push("Needlessly long format")}let b=new Uint8Array(new ArrayBuffer(this.valueHex.byteLength));for(let a=0;a<this.valueHex.byteLength;a++)b[a]=0;b[0]=128&a[0];let c=bd(b,8),d=new Uint8Array(new ArrayBuffer(this.valueHex.byteLength));for(let b=0;b<this.valueHex.byteLength;b++)d[b]=a[b];return d[0]&=127,bd(d,8)-c}function bh(a,b){let c=a.toString(10);if(b<c.length)return"";let d=b-c.length,e=Array.from({length:d});for(let a=0;a<d;a++)e[a]="0";return e.join("").concat(c)}function bi(){if("u"<typeof BigInt)throw Error("BigInt is not defined. Your environment doesn't implement BigInt.")}function bj(a){let b=0,c=0;for(let c=0;c<a.length;c++)b+=a[c].byteLength;let d=new Uint8Array(b);for(let b=0;b<a.length;b++){let e=a[b];d.set(new Uint8Array(e),c),c+=e.byteLength}return d.buffer}function bk(a,b,c,d){return b instanceof Uint8Array?b.byteLength?c<0?(a.error="Wrong parameter: inputOffset less than zero",!1):d<0?(a.error="Wrong parameter: inputLength less than zero",!1):!(b.byteLength-c-d<0)||(a.error="End of input reached before message was fully decoded (inconsistent offset and length values)",!1):(a.error="Wrong parameter: inputBuffer has zero length",!1):(a.error="Wrong parameter: inputBuffer must be 'Uint8Array'",!1)}bb.DEFAULT_UTF8_ENCODING="utf8";class bl{constructor(){this.items=[]}write(a){this.items.push(a)}final(){return bj(this.items)}}let bm=[new Uint8Array([1])],bn="0123456789",bo="name",bp="valueHexView",bq=new ArrayBuffer(0),br=new Uint8Array(0),bs="EndOfContent",bt="OCTET STRING",bu="BIT STRING";function bv(a){var b;return(b=class extends a{get valueHex(){return this.valueHexView.slice().buffer}set valueHex(a){this.valueHexView=new Uint8Array(a)}constructor(...a){var b;super(...a);let c=a[0]||{};this.isHexOnly=null!=(b=c.isHexOnly)&&b,this.valueHexView=c.valueHex?a4.toUint8Array(c.valueHex):br}fromBER(a,b,c,d){let e=a instanceof ArrayBuffer?new Uint8Array(a):a;if(!bk(this,e,b,c))return -1;let f=b+c;return(this.valueHexView=e.subarray(b,f),this.valueHexView.length)?(this.blockLength=c,f):(this.warnings.push("Zero buffer length"),b)}toBER(a=!1){return this.isHexOnly?a?new ArrayBuffer(this.valueHexView.byteLength):this.valueHexView.byteLength===this.valueHexView.buffer.byteLength?this.valueHexView.buffer:this.valueHexView.slice().buffer:(this.error="Flag 'isHexOnly' is not set, abort",bq)}toJSON(){return{...super.toJSON(),isHexOnly:this.isHexOnly,valueHex:bb.ToHex(this.valueHexView)}}}).NAME="hexBlock",b}class bw{static blockName(){return this.NAME}get valueBeforeDecode(){return this.valueBeforeDecodeView.slice().buffer}set valueBeforeDecode(a){this.valueBeforeDecodeView=new Uint8Array(a)}constructor({blockLength:a=0,error:b="",warnings:c=[],valueBeforeDecode:d=br}={}){this.blockLength=a,this.error=b,this.warnings=c,this.valueBeforeDecodeView=a4.toUint8Array(d)}toJSON(){return{blockName:this.constructor.NAME,blockLength:this.blockLength,error:this.error,warnings:this.warnings,valueBeforeDecode:bb.ToHex(this.valueBeforeDecodeView)}}}bw.NAME="baseBlock";class bx extends bw{fromBER(a,b,c,d){throw TypeError("User need to make a specific function in a class which extends 'ValueBlock'")}toBER(a,b){throw TypeError("User need to make a specific function in a class which extends 'ValueBlock'")}}bx.NAME="valueBlock";class by extends bv(bw){constructor({idBlock:a={}}={}){var b,c,d,e;super(),a?(this.isHexOnly=null!=(b=a.isHexOnly)&&b,this.valueHexView=a.valueHex?a4.toUint8Array(a.valueHex):br,this.tagClass=null!=(c=a.tagClass)?c:-1,this.tagNumber=null!=(d=a.tagNumber)?d:-1,this.isConstructed=null!=(e=a.isConstructed)&&e):(this.tagClass=-1,this.tagNumber=-1,this.isConstructed=!1)}toBER(a=!1){let b=0;switch(this.tagClass){case 1:b|=0;break;case 2:b|=64;break;case 3:b|=128;break;case 4:b|=192;break;default:return this.error="Unknown tag class",bq}if(this.isConstructed&&(b|=32),this.tagNumber<31&&!this.isHexOnly){let c=new Uint8Array(1);if(!a){let a=this.tagNumber;a&=31,b|=a,c[0]=b}return c.buffer}if(!this.isHexOnly){let c=be(this.tagNumber,7),d=new Uint8Array(c),e=c.byteLength,f=new Uint8Array(e+1);if(f[0]=31|b,!a){for(let a=0;a<e-1;a++)f[a+1]=128|d[a];f[e]=d[e-1]}return f.buffer}let c=new Uint8Array(this.valueHexView.byteLength+1);if(c[0]=31|b,!a){let a=this.valueHexView;for(let b=0;b<a.length-1;b++)c[b+1]=128|a[b];c[this.valueHexView.byteLength]=a[a.length-1]}return c.buffer}fromBER(a,b,c){let d=a4.toUint8Array(a);if(!bk(this,d,b,c))return -1;let e=d.subarray(b,b+c);if(0===e.length)return this.error="Zero buffer length",-1;switch(192&e[0]){case 0:this.tagClass=1;break;case 64:this.tagClass=2;break;case 128:this.tagClass=3;break;case 192:this.tagClass=4;break;default:return this.error="Unknown tag class",-1}this.isConstructed=(32&e[0])==32,this.isHexOnly=!1;let f=31&e[0];if(31!==f)this.tagNumber=f,this.blockLength=1;else{let a=0;for(;;){let b=a+1;if(b>=e.length)return this.error="End of input reached before message was fully decoded",-1;if(a++,(128&e[b])==0)break}this.blockLength=a+1;let b=this.valueHexView=new Uint8Array(a);for(let c=0;c<a;c++)b[c]=127&e[c+1];this.blockLength<=9?this.tagNumber=bd(b,7):(this.isHexOnly=!0,this.warnings.push("Tag too long, represented as hex-coded"))}if(1===this.tagClass&&this.isConstructed)switch(this.tagNumber){case 1:case 2:case 5:case 6:case 9:case 13:case 14:case 23:case 24:case 31:case 32:case 33:case 34:return this.error="Constructed encoding used for primitive type",-1}return b+this.blockLength}toJSON(){return{...super.toJSON(),tagClass:this.tagClass,tagNumber:this.tagNumber,isConstructed:this.isConstructed}}}by.NAME="identificationBlock";class bz extends bw{constructor({lenBlock:a={}}={}){var b,c,d;super(),this.isIndefiniteForm=null!=(b=a.isIndefiniteForm)&&b,this.longFormUsed=null!=(c=a.longFormUsed)&&c,this.length=null!=(d=a.length)?d:0}fromBER(a,b,c){let d=a4.toUint8Array(a);if(!bk(this,d,b,c))return -1;let e=d.subarray(b,b+c);if(0===e.length)return this.error="Zero buffer length",-1;if(255===e[0])return this.error="Length block 0xFF is reserved by standard",-1;if(this.isIndefiniteForm=128===e[0],this.isIndefiniteForm)return this.blockLength=1,b+this.blockLength;if(this.longFormUsed=!!(128&e[0]),!1===this.longFormUsed)return this.length=e[0],this.blockLength=1,b+this.blockLength;let f=127&e[0];if(f>8)return this.error="Too big integer",-1;if(f+1>e.length)return this.error="End of input reached before message was fully decoded",-1;let g=b+1,h=d.subarray(g,g+f);return 0===h[f-1]&&this.warnings.push("Needlessly long encoded length"),this.length=bd(h,8),this.longFormUsed&&this.length<=127&&this.warnings.push("Unnecessary usage of long length form"),this.blockLength=f+1,b+this.blockLength}toBER(a=!1){let b,c;if(this.length>127&&(this.longFormUsed=!0),this.isIndefiniteForm)return b=new ArrayBuffer(1),!1===a&&((c=new Uint8Array(b))[0]=128),b;if(this.longFormUsed){let d=be(this.length,8);if(d.byteLength>127)return this.error="Too big length",bq;if(b=new ArrayBuffer(d.byteLength+1),a)return b;let e=new Uint8Array(d);(c=new Uint8Array(b))[0]=128|d.byteLength;for(let a=0;a<d.byteLength;a++)c[a+1]=e[a];return b}return b=new ArrayBuffer(1),!1===a&&((c=new Uint8Array(b))[0]=this.length),b}toJSON(){return{...super.toJSON(),isIndefiniteForm:this.isIndefiniteForm,longFormUsed:this.longFormUsed,length:this.length}}}bz.NAME="lengthBlock";let bA={};class bB extends bw{constructor({name:a="",optional:b=!1,primitiveSchema:c,...d}={},e){super(d),this.name=a,this.optional=b,c&&(this.primitiveSchema=c),this.idBlock=new by(d),this.lenBlock=new bz(d),this.valueBlock=e?new e(d):new bx(d)}fromBER(a,b,c,d){let e=this.valueBlock.fromBER(a,b,this.lenBlock.isIndefiniteForm?c:this.lenBlock.length,d);return -1===e?this.error=this.valueBlock.error:(this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.valueBlock.error.length||(this.blockLength+=this.valueBlock.blockLength)),e}toBER(a,b){let c=b||new bl;b||function a(b){var c;if(b instanceof bA.Constructed)for(let c of b.valueBlock.value)a(c)&&(b.lenBlock.isIndefiniteForm=!0);return!!(null==(c=b.lenBlock)?void 0:c.isIndefiniteForm)}(this);let d=this.idBlock.toBER(a);if(c.write(d),this.lenBlock.isIndefiniteForm)c.write(new Uint8Array([128]).buffer),this.valueBlock.toBER(a,c),c.write(new ArrayBuffer(2));else{let b=this.valueBlock.toBER(a);this.lenBlock.length=b.byteLength;let d=this.lenBlock.toBER(a);c.write(d),c.write(b)}return b?bq:c.final()}toJSON(){let a={...super.toJSON(),idBlock:this.idBlock.toJSON(),lenBlock:this.lenBlock.toJSON(),valueBlock:this.valueBlock.toJSON(),name:this.name,optional:this.optional};return this.primitiveSchema&&(a.primitiveSchema=this.primitiveSchema.toJSON()),a}toString(a="ascii"){return"ascii"===a?this.onAsciiEncoding():bb.ToHex(this.toBER())}onAsciiEncoding(){let a=this.constructor.NAME,b=bb.ToHex(this.valueBlock.valueBeforeDecodeView);return`${a} : ${b}`}isEqual(a){if(this===a)return!0;if(!(a instanceof this.constructor))return!1;let b=this.toBER(),c=a.toBER();if(b.byteLength!==c.byteLength)return!1;let d=new Uint8Array(b),e=new Uint8Array(c);for(let a=0;a<d.length;a++)if(d[a]!==e[a])return!1;return!0}}bB.NAME="BaseBlock";class bC extends bB{getValue(){return this.valueBlock.value}setValue(a){this.valueBlock.value=a}constructor({value:a="",...b}={},c){super(b,c),a&&this.fromString(a)}fromBER(a,b,c){let d=this.valueBlock.fromBER(a,b,this.lenBlock.isIndefiniteForm?c:this.lenBlock.length);return -1===d?this.error=this.valueBlock.error:(this.fromBuffer(this.valueBlock.valueHexView),this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.valueBlock.error.length||(this.blockLength+=this.valueBlock.blockLength)),d}onAsciiEncoding(){return`${this.constructor.NAME} : '${this.valueBlock.value}'`}}bC.NAME="BaseStringBlock";class bD extends bv(bx){constructor({isHexOnly:a=!0,...b}={}){super(b),this.isHexOnly=a}}bD.NAME="PrimitiveValueBlock";class bE extends bB{constructor(a={}){super(a,bD),this.idBlock.isConstructed=!1}}bA.Primitive=bE,bE.NAME="PRIMITIVE";let bF=100,bG=1e4,bH=0x1000000;function bI(a={}){var b,c,d;return{depth:0,maxDepth:null!=(b=a.maxDepth)?b:bF,nodesCount:0,maxNodes:null!=(c=a.maxNodes)?c:bG,maxContentLength:null!=(d=a.maxContentLength)?d:bH}}function bJ(a,b,c,d){let e=d.depth+1;if(e>d.maxDepth){let a;return(a=new bB({},bx)).error="Maximum ASN.1 nesting depth exceeded",{offset:-1,result:a}}d.depth=e;try{return bK(a,b,c,d)}finally{d.depth-=1}}function bK(a,b=0,c=a.length,d=bI()){let e=b,f=new bB({},bx),g=new bw;if(!bk(g,a,b,c))return f.error=g.error,{offset:-1,result:f};if(!a.subarray(b,b+c).length)return f.error="Zero buffer length",{offset:-1,result:f};let h=function(a){if(a.nodesCount+=1,a.nodesCount>a.maxNodes)return"Maximum ASN.1 node count exceeded"}(d);if(h)return f.error=h,{offset:-1,result:f};let i=f.idBlock.fromBER(a,b,c);if(f.idBlock.warnings.length&&f.warnings.concat(f.idBlock.warnings),-1===i)return f.error=f.idBlock.error,{offset:-1,result:f};if(b=i,c-=f.idBlock.blockLength,i=f.lenBlock.fromBER(a,b,c),f.lenBlock.warnings.length&&f.warnings.concat(f.lenBlock.warnings),-1===i)return f.error=f.lenBlock.error,{offset:-1,result:f};b=i,c-=f.lenBlock.blockLength;let j=f.lenBlock.isIndefiniteForm?c:f.lenBlock.length,k=function(a,b){if(a>b.maxContentLength)return"Maximum ASN.1 content length exceeded"}(j,d);if(k)return f.error=k,{offset:-1,result:f};if(!f.idBlock.isConstructed&&f.lenBlock.isIndefiniteForm)return f.error="Indefinite length form used for primitive encoding form",{offset:-1,result:f};let l=bB;if(1===f.idBlock.tagClass){if(f.idBlock.tagNumber>=37&&!1===f.idBlock.isHexOnly)return f.error="UNIVERSAL 37 and upper tags are reserved by ASN.1 standard",{offset:-1,result:f};switch(f.idBlock.tagNumber){case 0:if(f.idBlock.isConstructed&&f.lenBlock.length>0)return f.error="Type [UNIVERSAL 0] is reserved",{offset:-1,result:f};l=bA.EndOfContent;break;case 1:l=bA.Boolean;break;case 2:l=bA.Integer;break;case 3:l=bA.BitString;break;case 4:l=bA.OctetString;break;case 5:l=bA.Null;break;case 6:l=bA.ObjectIdentifier;break;case 10:l=bA.Enumerated;break;case 12:l=bA.Utf8String;break;case 13:l=bA.RelativeObjectIdentifier;break;case 14:l=bA.TIME;break;case 15:return f.error="[UNIVERSAL 15] is reserved by ASN.1 standard",{offset:-1,result:f};case 16:l=bA.Sequence;break;case 17:l=bA.Set;break;case 18:l=bA.NumericString;break;case 19:l=bA.PrintableString;break;case 20:l=bA.TeletexString;break;case 21:l=bA.VideotexString;break;case 22:l=bA.IA5String;break;case 23:l=bA.UTCTime;break;case 24:l=bA.GeneralizedTime;break;case 25:l=bA.GraphicString;break;case 26:l=bA.VisibleString;break;case 27:l=bA.GeneralString;break;case 28:l=bA.UniversalString;break;case 29:l=bA.CharacterString;break;case 30:l=bA.BmpString;break;case 31:l=bA.DATE;break;case 32:l=bA.TimeOfDay;break;case 33:l=bA.DateTime;break;case 34:l=bA.Duration;break;default:{let a=f.idBlock.isConstructed?new bA.Constructed:new bA.Primitive;a.idBlock=f.idBlock,a.lenBlock=f.lenBlock,a.warnings=f.warnings,f=a}}}else l=f.idBlock.isConstructed?bA.Constructed:bA.Primitive;return i=(f=function(a,b){if(a instanceof b)return a;let c=new b;return c.idBlock=a.idBlock,c.lenBlock=a.lenBlock,c.warnings=a.warnings,c.valueBeforeDecodeView=a.valueBeforeDecodeView,c}(f,l)).fromBER(a,b,j,d),f.valueBeforeDecodeView=a.subarray(e,e+f.blockLength),{offset:i,result:f}}function bL(a,b={}){if(!a.byteLength){let a=new bB({},bx);return a.error="Input buffer has zero length",{offset:-1,result:a}}return bK(a4.toUint8Array(a).slice(),0,a.byteLength,bI(b))}class bM extends bx{constructor({value:a=[],isIndefiniteForm:b=!1,...c}={}){super(c),this.value=a,this.isIndefiniteForm=b}fromBER(a,b,c,d){var e,f;let g=a4.toUint8Array(a),h=null!=d?d:bI();if(!bk(this,g,b,c))return -1;if(this.valueBeforeDecodeView=g.subarray(b,b+c),0===this.valueBeforeDecodeView.length)return this.warnings.push("Zero buffer length"),b;let i=b;for(;e=this.isIndefiniteForm,f=c,(e?1:f)>0;){let a=bJ(g,i,c,h);if(-1===a.offset)return this.error=a.result.error,this.warnings.concat(a.result.warnings),-1;if(i=a.offset,this.blockLength+=a.result.blockLength,c-=a.result.blockLength,this.value.push(a.result),this.isIndefiniteForm&&a.result.constructor.NAME===bs)break}return this.isIndefiniteForm&&(this.value[this.value.length-1].constructor.NAME===bs?this.value.pop():this.warnings.push("No EndOfContent block encoded")),i}toBER(a,b){let c=b||new bl;for(let b=0;b<this.value.length;b++)this.value[b].toBER(a,c);return b?bq:c.final()}toJSON(){let a={...super.toJSON(),isIndefiniteForm:this.isIndefiniteForm,value:[]};for(let b of this.value)a.value.push(b.toJSON());return a}}bM.NAME="ConstructedValueBlock";class bN extends bB{constructor(a={}){super(a,bM),this.idBlock.isConstructed=!0}fromBER(a,b,c,d){this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm;let e=this.valueBlock.fromBER(a,b,this.lenBlock.isIndefiniteForm?c:this.lenBlock.length,d);return -1===e?this.error=this.valueBlock.error:(this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.valueBlock.error.length||(this.blockLength+=this.valueBlock.blockLength)),e}onAsciiEncoding(){let a=[];for(let b of this.valueBlock.value)a.push(b.toString("ascii").split("\n").map(a=>` ${a}`).join("\n"));let b=3===this.idBlock.tagClass?`[${this.idBlock.tagNumber}]`:this.constructor.NAME;return a.length?`${b} :
|
|
2
|
+
${a.join("\n")}`:`${b} :`}}bA.Constructed=bN,bN.NAME="CONSTRUCTED";class bO extends bx{fromBER(a,b,c){return b}toBER(a){return bq}}bO.override="EndOfContentValueBlock";class bP extends bB{constructor(a={}){super(a,bO),this.idBlock.tagClass=1,this.idBlock.tagNumber=0}}bA.EndOfContent=bP,bP.NAME=bs;class bQ extends bB{constructor(a={}){super(a,bx),this.idBlock.tagClass=1,this.idBlock.tagNumber=5}fromBER(a,b,c){return(this.lenBlock.length>0&&this.warnings.push("Non-zero length of value block for Null type"),this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.blockLength+=c,b+c>a.byteLength)?(this.error="End of input reached before message was fully decoded (inconsistent offset and length values)",-1):b+c}toBER(a,b){let c=new ArrayBuffer(2);if(!a){let a=new Uint8Array(c);a[0]=5,a[1]=0}return b&&b.write(c),c}onAsciiEncoding(){return`${this.constructor.NAME}`}}bA.Null=bQ,bQ.NAME="NULL";class bR extends bv(bx){get value(){for(let a of this.valueHexView)if(a>0)return!0;return!1}set value(a){this.valueHexView[0]=255*!!a}constructor({value:a,...b}={}){super(b),b.valueHex?this.valueHexView=a4.toUint8Array(b.valueHex):this.valueHexView=new Uint8Array(1),a&&(this.value=a)}fromBER(a,b,c){let d=a4.toUint8Array(a);return bk(this,d,b,c)?(this.valueHexView=d.subarray(b,b+c),c>1&&this.warnings.push("Boolean value encoded in more then 1 octet"),this.isHexOnly=!0,bg.call(this),this.blockLength=c,b+c):-1}toBER(){return this.valueHexView.slice()}toJSON(){return{...super.toJSON(),value:this.value}}}bR.NAME="BooleanValueBlock";class bS extends bB{getValue(){return this.valueBlock.value}setValue(a){this.valueBlock.value=a}constructor(a={}){super(a,bR),this.idBlock.tagClass=1,this.idBlock.tagNumber=1}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.getValue}`}}bA.Boolean=bS,bS.NAME="BOOLEAN";class bT extends bv(bM){constructor({isConstructed:a=!1,...b}={}){super(b),this.isConstructed=a}fromBER(a,b,c,d){let e=0;if(this.isConstructed){if(this.isHexOnly=!1,-1===(e=bM.prototype.fromBER.call(this,a,b,c,d)))return e;for(let a=0;a<this.value.length;a++){let b=this.value[a].constructor.NAME;if(b===bs)if(!this.isIndefiniteForm)return this.error="EndOfContent is unexpected, OCTET STRING may consists of OCTET STRINGs only",-1;else break;if(b!==bt)return this.error="OCTET STRING may consists of OCTET STRINGs only",-1}}else this.isHexOnly=!0,e=super.fromBER(a,b,c),this.blockLength=c;return e}toBER(a,b){return this.isConstructed?bM.prototype.toBER.call(this,a,b):a?new ArrayBuffer(this.valueHexView.byteLength):this.valueHexView.slice().buffer}toJSON(){return{...super.toJSON(),isConstructed:this.isConstructed}}}bT.NAME="OctetStringValueBlock";class bU extends bB{constructor({idBlock:a={},lenBlock:b={},...c}={}){var d;null!=c.isConstructed||(c.isConstructed=!!(null==(d=c.value)?void 0:d.length)),super({idBlock:{isConstructed:c.isConstructed,...a},lenBlock:{...b,isIndefiniteForm:!!c.isIndefiniteForm},...c},bT),this.idBlock.tagClass=1,this.idBlock.tagNumber=4}fromBER(a,b,c,d){if(this.valueBlock.isConstructed=this.idBlock.isConstructed,this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm,0===c)return 0===this.idBlock.error.length&&(this.blockLength+=this.idBlock.blockLength),0===this.lenBlock.error.length&&(this.blockLength+=this.lenBlock.blockLength),b;if(!this.valueBlock.isConstructed){let e=(a instanceof ArrayBuffer?new Uint8Array(a):a).subarray(b,b+c);try{if(e.byteLength){let a=null!=d?d:bI(),b=bJ(e,0,e.byteLength,a);-1!==b.offset&&b.offset===c&&(this.valueBlock.value=[b.result])}}catch{}}return super.fromBER(a,b,c,d)}onAsciiEncoding(){if(this.valueBlock.isConstructed||this.valueBlock.value&&this.valueBlock.value.length)return bN.prototype.onAsciiEncoding.call(this);let a=this.constructor.NAME,b=bb.ToHex(this.valueBlock.valueHexView);return`${a} : ${b}`}getValue(){if(!this.idBlock.isConstructed)return this.valueBlock.valueHexView.slice().buffer;let a=[];for(let b of this.valueBlock.value)b instanceof u&&a.push(b.valueBlock.valueHexView);return a4.concat(a)}}bA.OctetString=u=bU,bU.NAME=bt;class bV extends bv(bM){constructor({unusedBits:a=0,isConstructed:b=!1,...c}={}){super(c),this.unusedBits=a,this.isConstructed=b,this.blockLength=this.valueHexView.byteLength}fromBER(a,b,c,d){if(!c)return b;let e=-1;if(this.isConstructed){if(-1===(e=bM.prototype.fromBER.call(this,a,b,c,d)))return e;for(let a of this.value){let b=a.constructor.NAME;if(b===bs)if(!this.isIndefiniteForm)return this.error="EndOfContent is unexpected, BIT STRING may consists of BIT STRINGs only",-1;else break;if(b!==bu)return this.error="BIT STRING may consists of BIT STRINGs only",-1;let c=a.valueBlock;if(this.unusedBits>0&&c.unusedBits>0)return this.error='Using of "unused bits" inside constructive BIT STRING allowed for least one only',-1;this.unusedBits=c.unusedBits}return e}let f=a4.toUint8Array(a);if(!bk(this,f,b,c))return -1;let g=f.subarray(b,b+c);if(this.unusedBits=g[0],this.unusedBits>7)return this.error="Unused bits for BitString must be in range 0-7",-1;if(!this.unusedBits){let a=g.subarray(1);try{if(a.byteLength){let b=null!=d?d:bI(),e=bJ(a,0,a.byteLength,b);-1!==e.offset&&e.offset===c-1&&(this.value=[e.result])}}catch{}}return this.valueHexView=g.subarray(1),this.blockLength=g.length,b+c}toBER(a,b){if(this.isConstructed)return bM.prototype.toBER.call(this,a,b);if(a)return new ArrayBuffer(this.valueHexView.byteLength+1);if(!this.valueHexView.byteLength){let a=new Uint8Array(1);return a[0]=0,a.buffer}let c=new Uint8Array(this.valueHexView.length+1);return c[0]=this.unusedBits,c.set(this.valueHexView,1),c.buffer}toJSON(){return{...super.toJSON(),unusedBits:this.unusedBits,isConstructed:this.isConstructed}}}bV.NAME="BitStringValueBlock";class bW extends bB{constructor({idBlock:a={},lenBlock:b={},...c}={}){var d;null!=c.isConstructed||(c.isConstructed=!!(null==(d=c.value)?void 0:d.length)),super({idBlock:{isConstructed:c.isConstructed,...a},lenBlock:{...b,isIndefiniteForm:!!c.isIndefiniteForm},...c},bV),this.idBlock.tagClass=1,this.idBlock.tagNumber=3}fromBER(a,b,c,d){return this.valueBlock.isConstructed=this.idBlock.isConstructed,this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm,super.fromBER(a,b,c,d)}onAsciiEncoding(){if(this.valueBlock.isConstructed||this.valueBlock.value&&this.valueBlock.value.length)return bN.prototype.onAsciiEncoding.call(this);{let a=[];for(let b of this.valueBlock.valueHexView)a.push(b.toString(2).padStart(8,"0"));let b=a.join(""),c=this.constructor.NAME,d=b.substring(0,b.length-this.valueBlock.unusedBits);return`${c} : ${d}`}}}function bX(a){if(a>=bm.length)for(let b=bm.length;b<=a;b++){let a=new Uint8Array([0]),c=bm[b-1].slice(0);for(let b=c.length-1;b>=0;b--){let d=new Uint8Array([(c[b]<<1)+a[0]]);a[0]=d[0]/10,c[b]=d[0]%10}a[0]>0&&(c=bf(a,c)),bm.push(c)}return bm[a]}bA.BitString=bW,bW.NAME=bu;class bY extends bv(bx){setValueHex(){this.valueHexView.length>=4?(this.warnings.push("Too big Integer for decoding, hex only"),this.isHexOnly=!0,this._valueDec=0):(this.isHexOnly=!1,this.valueHexView.length>0&&(this._valueDec=bg.call(this)))}constructor({value:a,...b}={}){super(b),this._valueDec=0,b.valueHex&&this.setValueHex(),void 0!==a&&(this.valueDec=a)}set valueDec(a){this._valueDec=a,this.isHexOnly=!1,this.valueHexView=new Uint8Array(function(a){let b=a<0?-1*a:a,c=128;for(let d=1;d<8;d++){if(b<=c){if(a<0){let a=be(c-b,8,d),e=new Uint8Array(a);return e[0]|=128,a}let e=be(b,8,d),f=new Uint8Array(e);if(128&f[0]){let a=e.slice(0),b=new Uint8Array(a);f=new Uint8Array(e=new ArrayBuffer(e.byteLength+1));for(let c=0;c<a.byteLength;c++)f[c+1]=b[c];f[0]=0}return e}c*=256}return new ArrayBuffer(0)}(a))}get valueDec(){return this._valueDec}fromDER(a,b,c,d=0){let e=this.fromBER(a,b,c);if(-1===e)return e;let f=this.valueHexView;return 0===f[0]&&(128&f[1])!=0?this.valueHexView=f.subarray(1):0!==d&&f.length<d&&(d-f.length>1&&(d=f.length+1),this.valueHexView=f.subarray(d-f.length)),e}toDER(a=!1){let b=this.valueHexView;switch(!0){case(128&b[0])!=0:{let a=new Uint8Array(this.valueHexView.length+1);a[0]=0,a.set(b,1),this.valueHexView=a}break;case 0===b[0]&&(128&b[1])==0:this.valueHexView=this.valueHexView.subarray(1)}return this.toBER(a)}fromBER(a,b,c){let d=super.fromBER(a,b,c);return -1===d||this.setValueHex(),d}toBER(a){return a?new ArrayBuffer(this.valueHexView.length):this.valueHexView.slice().buffer}toJSON(){return{...super.toJSON(),valueDec:this.valueDec}}toString(){let a,b=8*this.valueHexView.length-1,c=new Uint8Array(8*this.valueHexView.length/3),d=0,e=this.valueHexView,f="",g=!1;for(let g=e.byteLength-1;g>=0;g--){a=e[g];for(let e=0;e<8;e++)(1&a)==1&&(d===b?(c=function(a,b){let c,d=0,e=new Uint8Array(a),f=new Uint8Array(b),g=e.slice(0),h=g.length-1,i=f.slice(0),j=i.length-1,k=0;for(let a=j;a>=0;a--,k++)!0==(c=g[h-k]-i[j-k]-d)<0?(d=1,g[h-k]=c+10):(d=0,g[h-k]=c);if(d>0)for(let a=h-j+1;a>=0;a--,k++)if((c=g[h-k]-d)<0)d=1,g[h-k]=c+10;else{d=0,g[h-k]=c;break}return g.slice()}(bX(d),c),f="-"):c=function(a,b){let c=new Uint8Array([0]),d=new Uint8Array(a),e=new Uint8Array(b),f=d.slice(0),g=f.length-1,h=e.slice(0),i=h.length-1,j=0,k=i<g?g:i,l=0;for(let a=k;a>=0;a--,l++)j=!0==l<h.length?f[g-l]+h[i-l]+c[0]:f[g-l]+c[0],c[0]=j/10,!0==l>=f.length?f=bf(new Uint8Array([j%10]),f):f[g-l]=j%10;return c[0]>0&&(f=bf(c,f)),f}(c,bX(d))),d++,a>>=1}for(let a=0;a<c.length;a++)c[a]&&(g=!0),g&&(f+=bn.charAt(c[a]));return!1===g&&(f+=bn.charAt(0)),f}}bY.NAME="IntegerValueBlock",Object.defineProperty(bY.prototype,"valueHex",{set:function(a){this.valueHexView=new Uint8Array(a),this.setValueHex()},get:function(){return this.valueHexView.slice().buffer}});class bZ extends bB{constructor(a={}){super(a,bY),this.idBlock.tagClass=1,this.idBlock.tagNumber=2}toBigInt(){return bi(),BigInt(this.valueBlock.toString())}static fromBigInt(a){bi();let b=BigInt(a),c=new bl,d=b.toString(16).replace(/^-/,""),e=new Uint8Array(bb.FromHex(d));if(b<0){let a=new Uint8Array(e.length+(128&e[0]?1:0));a[0]|=128;let d=BigInt(`0x${bb.ToHex(a)}`)+b,f=a4.toUint8Array(bb.FromHex(d.toString(16)));f[0]|=128,c.write(f)}else 128&e[0]&&c.write(new Uint8Array([0])),c.write(e);return new v({valueHex:c.final()})}convertToDER(){let a=new v({valueHex:this.valueBlock.valueHexView});return a.valueBlock.toDER(),a}convertFromDER(){return new v({valueHex:0===this.valueBlock.valueHexView[0]?this.valueBlock.valueHexView.subarray(1):this.valueBlock.valueHexView})}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()}`}}bA.Integer=v=bZ,bZ.NAME="INTEGER";class b$ extends bZ{constructor(a={}){super(a),this.idBlock.tagClass=1,this.idBlock.tagNumber=10}}bA.Enumerated=b$,b$.NAME="ENUMERATED";class b_ extends bv(bx){constructor({valueDec:a=-1,isFirstSid:b=!1,...c}={}){super(c),this.valueDec=a,this.isFirstSid=b}fromBER(a,b,c){if(!c)return b;let d=a4.toUint8Array(a);if(!bk(this,d,b,c))return -1;let e=d.subarray(b,b+c);this.valueHexView=new Uint8Array(c);for(let a=0;a<c&&(this.valueHexView[a]=127&e[a],this.blockLength++,(128&e[a])!=0);a++);let f=new Uint8Array(this.blockLength);for(let a=0;a<this.blockLength;a++)f[a]=this.valueHexView[a];return(this.valueHexView=f,(128&e[this.blockLength-1])!=0)?(this.error="End of input reached before message was fully decoded",-1):(0===this.valueHexView[0]&&this.warnings.push("Needlessly long format of SID encoding"),this.blockLength<=8?this.valueDec=bd(this.valueHexView,7):(this.isHexOnly=!0,this.warnings.push("Too big SID for decoding, hex only")),b+this.blockLength)}set valueBigInt(a){bi();let b=BigInt(a).toString(2);for(;b.length%7;)b="0"+b;let c=new Uint8Array(b.length/7);for(let a=0;a<c.length;a++)c[a]=parseInt(b.slice(7*a,7*a+7),2)+128*(a+1<c.length);this.fromBER(c.buffer,0,c.length)}toBER(a){if(this.isHexOnly){if(a)return new ArrayBuffer(this.valueHexView.byteLength);let b=this.valueHexView,c=new Uint8Array(this.blockLength);for(let a=0;a<this.blockLength-1;a++)c[a]=128|b[a];return c[this.blockLength-1]=b[this.blockLength-1],c.buffer}let b=be(this.valueDec,7);if(0===b.byteLength)return this.error="Error during encoding SID value",bq;let c=new Uint8Array(b.byteLength);if(!a){let a=new Uint8Array(b),d=b.byteLength-1;for(let b=0;b<d;b++)c[b]=128|a[b];c[d]=a[d]}return c}toString(){let a="";if(this.isHexOnly)a=bb.ToHex(this.valueHexView);else if(this.isFirstSid){let b=this.valueDec;this.valueDec<=39?a="0.":this.valueDec<=79?(a="1.",b-=40):(a="2.",b-=80),a+=b.toString()}else a=this.valueDec.toString();return a}toJSON(){return{...super.toJSON(),valueDec:this.valueDec,isFirstSid:this.isFirstSid}}}b_.NAME="sidBlock";class b0 extends bx{constructor({value:a="",...b}={}){super(b),this.value=[],a&&this.fromString(a)}fromBER(a,b,c){let d=b;for(;c>0;){let b=new b_;if(-1===(d=b.fromBER(a,d,c))){this.blockLength=0,this.error=b.error;break}0===this.value.length&&(b.isFirstSid=!0),this.blockLength+=b.blockLength,c-=b.blockLength,this.value.push(b)}return d}toBER(a){let b=[];for(let c=0;c<this.value.length;c++){let d=this.value[c].toBER(a);if(0===d.byteLength)return this.error=this.value[c].error,bq;b.push(d)}return bj(b)}fromString(a){this.value=[];let b=0,c=0,d="",e=!1;do if(d=-1===(c=a.indexOf(".",b))?a.substring(b):a.substring(b,c),b=c+1,e){let a=this.value[0],b=0;switch(a.valueDec){case 0:break;case 1:b=40;break;case 2:b=80;break;default:this.value=[];return}let c=parseInt(d,10);if(isNaN(c))return;a.valueDec=c+b,e=!1}else{let a=new b_;if(d>Number.MAX_SAFE_INTEGER)bi(),a.valueBigInt=BigInt(d);else if(a.valueDec=parseInt(d,10),isNaN(a.valueDec))return;this.value.length||(a.isFirstSid=!0,e=!0),this.value.push(a)}while(-1!==c)}toString(){let a="",b=!1;for(let c=0;c<this.value.length;c++){b=this.value[c].isHexOnly;let d=this.value[c].toString();0!==c&&(a=`${a}.`),b?(d=`{${d}}`,this.value[c].isFirstSid?a=`2.{${d} - 80}`:a+=d):a+=d}return a}toJSON(){let a={...super.toJSON(),value:this.toString(),sidArray:[]};for(let b=0;b<this.value.length;b++)a.sidArray.push(this.value[b].toJSON());return a}}b0.NAME="ObjectIdentifierValueBlock";class b1 extends bB{getValue(){return this.valueBlock.toString()}setValue(a){this.valueBlock.fromString(a)}constructor(a={}){super(a,b0),this.idBlock.tagClass=1,this.idBlock.tagNumber=6}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()||"empty"}`}toJSON(){return{...super.toJSON(),value:this.getValue()}}}bA.ObjectIdentifier=b1,b1.NAME="OBJECT IDENTIFIER";class b2 extends bv(bw){constructor({valueDec:a=0,...b}={}){super(b),this.valueDec=a}fromBER(a,b,c){if(0===c)return b;let d=a4.toUint8Array(a);if(!bk(this,d,b,c))return -1;let e=d.subarray(b,b+c);this.valueHexView=new Uint8Array(c);for(let a=0;a<c&&(this.valueHexView[a]=127&e[a],this.blockLength++,(128&e[a])!=0);a++);let f=new Uint8Array(this.blockLength);for(let a=0;a<this.blockLength;a++)f[a]=this.valueHexView[a];return(this.valueHexView=f,(128&e[this.blockLength-1])!=0)?(this.error="End of input reached before message was fully decoded",-1):(0===this.valueHexView[0]&&this.warnings.push("Needlessly long format of SID encoding"),this.blockLength<=8?this.valueDec=bd(this.valueHexView,7):(this.isHexOnly=!0,this.warnings.push("Too big SID for decoding, hex only")),b+this.blockLength)}toBER(a){if(this.isHexOnly){if(a)return new ArrayBuffer(this.valueHexView.byteLength);let b=this.valueHexView,c=new Uint8Array(this.blockLength);for(let a=0;a<this.blockLength-1;a++)c[a]=128|b[a];return c[this.blockLength-1]=b[this.blockLength-1],c.buffer}let b=be(this.valueDec,7);if(0===b.byteLength)return this.error="Error during encoding SID value",bq;let c=new Uint8Array(b.byteLength);if(!a){let a=new Uint8Array(b),d=b.byteLength-1;for(let b=0;b<d;b++)c[b]=128|a[b];c[d]=a[d]}return c.buffer}toString(){return this.isHexOnly?bb.ToHex(this.valueHexView):this.valueDec.toString()}toJSON(){return{...super.toJSON(),valueDec:this.valueDec}}}b2.NAME="relativeSidBlock";class b3 extends bx{constructor({value:a="",...b}={}){super(b),this.value=[],a&&this.fromString(a)}fromBER(a,b,c){let d=b;for(;c>0;){let b=new b2;if(-1===(d=b.fromBER(a,d,c))){this.blockLength=0,this.error=b.error;break}this.blockLength+=b.blockLength,c-=b.blockLength,this.value.push(b)}return d}toBER(a,b){let c=[];for(let b=0;b<this.value.length;b++){let d=this.value[b].toBER(a);if(0===d.byteLength)return this.error=this.value[b].error,bq;c.push(d)}return bj(c)}fromString(a){this.value=[];let b=0,c=0,d="";do{d=-1===(c=a.indexOf(".",b))?a.substring(b):a.substring(b,c),b=c+1;let e=new b2;if(e.valueDec=parseInt(d,10),isNaN(e.valueDec))break;this.value.push(e)}while(-1!==c);return!0}toString(){let a="",b=!1;for(let c=0;c<this.value.length;c++){b=this.value[c].isHexOnly;let d=this.value[c].toString();0!==c&&(a=`${a}.`),b?a+=d=`{${d}}`:a+=d}return a}toJSON(){let a={...super.toJSON(),value:this.toString(),sidArray:[]};for(let b=0;b<this.value.length;b++)a.sidArray.push(this.value[b].toJSON());return a}}b3.NAME="RelativeObjectIdentifierValueBlock";class b4 extends bB{getValue(){return this.valueBlock.toString()}setValue(a){this.valueBlock.fromString(a)}constructor(a={}){super(a,b3),this.idBlock.tagClass=1,this.idBlock.tagNumber=13}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()||"empty"}`}toJSON(){return{...super.toJSON(),value:this.getValue()}}}bA.RelativeObjectIdentifier=b4,b4.NAME="RelativeObjectIdentifier";class b5 extends bN{constructor(a={}){super(a),this.idBlock.tagClass=1,this.idBlock.tagNumber=16}}bA.Sequence=b5,b5.NAME="SEQUENCE";class b6 extends bN{constructor(a={}){super(a),this.idBlock.tagClass=1,this.idBlock.tagNumber=17}}bA.Set=b6,b6.NAME="SET";class b7 extends bv(bx){constructor({...a}={}){super(a),this.isHexOnly=!0,this.value=""}toJSON(){return{...super.toJSON(),value:this.value}}}b7.NAME="StringValueBlock";class b8 extends b7{}b8.NAME="SimpleStringValueBlock";class b9 extends bC{constructor({...a}={}){super(a,b8)}fromBuffer(a){this.valueBlock.value=String.fromCharCode.apply(null,a4.toUint8Array(a))}fromString(a){let b=a.length,c=this.valueBlock.valueHexView=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=a.charCodeAt(d);this.valueBlock.value=a}}b9.NAME="SIMPLE STRING";class ca extends b9{fromBuffer(a){this.valueBlock.valueHexView=a4.toUint8Array(a);try{this.valueBlock.value=bb.ToUtf8String(a)}catch(b){this.warnings.push(`Error during "decodeURIComponent": ${b}, using raw string`),this.valueBlock.value=bb.ToBinary(a)}}fromString(a){this.valueBlock.valueHexView=new Uint8Array(bb.FromUtf8String(a)),this.valueBlock.value=a}}ca.NAME="Utf8StringValueBlock";class cb extends ca{constructor(a={}){super(a),this.idBlock.tagClass=1,this.idBlock.tagNumber=12}}bA.Utf8String=cb,cb.NAME="UTF8String";class cc extends b9{fromBuffer(a){this.valueBlock.value=bb.ToUtf16String(a),this.valueBlock.valueHexView=a4.toUint8Array(a)}fromString(a){this.valueBlock.value=a,this.valueBlock.valueHexView=new Uint8Array(bb.FromUtf16String(a))}}cc.NAME="BmpStringValueBlock";class cd extends cc{constructor({...a}={}){super(a),this.idBlock.tagClass=1,this.idBlock.tagNumber=30}}bA.BmpString=cd,cd.NAME="BMPString";class ce extends b9{fromBuffer(a){let b=ArrayBuffer.isView(a)?a.slice().buffer:a.slice(0),c=new Uint8Array(b);for(let a=0;a<c.length;a+=4)c[a]=c[a+3],c[a+1]=c[a+2],c[a+2]=0,c[a+3]=0;this.valueBlock.value=String.fromCharCode.apply(null,new Uint32Array(b))}fromString(a){let b=a.length,c=this.valueBlock.valueHexView=new Uint8Array(4*b);for(let d=0;d<b;d++){let b=new Uint8Array(be(a.charCodeAt(d),8));if(b.length>4)continue;let e=4-b.length;for(let a=b.length-1;a>=0;a--)c[4*d+a+e]=b[a]}this.valueBlock.value=a}}ce.NAME="UniversalStringValueBlock";class cf extends ce{constructor({...a}={}){super(a),this.idBlock.tagClass=1,this.idBlock.tagNumber=28}}bA.UniversalString=cf,cf.NAME="UniversalString";class cg extends b9{constructor(a={}){super(a),this.idBlock.tagClass=1,this.idBlock.tagNumber=18}}bA.NumericString=cg,cg.NAME="NumericString";class ch extends b9{constructor(a={}){super(a),this.idBlock.tagClass=1,this.idBlock.tagNumber=19}}bA.PrintableString=ch,ch.NAME="PrintableString";class ci extends b9{constructor(a={}){super(a),this.idBlock.tagClass=1,this.idBlock.tagNumber=20}}bA.TeletexString=ci,ci.NAME="TeletexString";class cj extends b9{constructor(a={}){super(a),this.idBlock.tagClass=1,this.idBlock.tagNumber=21}}bA.VideotexString=cj,cj.NAME="VideotexString";class ck extends b9{constructor(a={}){super(a),this.idBlock.tagClass=1,this.idBlock.tagNumber=22}}bA.IA5String=ck,ck.NAME="IA5String";class cl extends b9{constructor(a={}){super(a),this.idBlock.tagClass=1,this.idBlock.tagNumber=25}}bA.GraphicString=cl,cl.NAME="GraphicString";class cm extends b9{constructor(a={}){super(a),this.idBlock.tagClass=1,this.idBlock.tagNumber=26}}bA.VisibleString=cm,cm.NAME="VisibleString";class cn extends b9{constructor(a={}){super(a),this.idBlock.tagClass=1,this.idBlock.tagNumber=27}}bA.GeneralString=cn,cn.NAME="GeneralString";class co extends b9{constructor(a={}){super(a),this.idBlock.tagClass=1,this.idBlock.tagNumber=29}}bA.CharacterString=co,co.NAME="CharacterString";class cp extends cm{constructor({value:a,valueDate:b,...c}={}){if(super(c),this.year=0,this.month=0,this.day=0,this.hour=0,this.minute=0,this.second=0,a){this.fromString(a),this.valueBlock.valueHexView=new Uint8Array(a.length);for(let b=0;b<a.length;b++)this.valueBlock.valueHexView[b]=a.charCodeAt(b)}b&&(this.fromDate(b),this.valueBlock.valueHexView=new Uint8Array(this.toBuffer())),this.idBlock.tagClass=1,this.idBlock.tagNumber=23}fromBuffer(a){this.fromString(String.fromCharCode.apply(null,a4.toUint8Array(a)))}toBuffer(){let a=this.toString(),b=new ArrayBuffer(a.length),c=new Uint8Array(b);for(let b=0;b<a.length;b++)c[b]=a.charCodeAt(b);return b}fromDate(a){this.year=a.getUTCFullYear(),this.month=a.getUTCMonth()+1,this.day=a.getUTCDate(),this.hour=a.getUTCHours(),this.minute=a.getUTCMinutes(),this.second=a.getUTCSeconds()}toDate(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second))}fromString(a){let b=/(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})Z/ig.exec(a);if(null===b){this.error="Wrong input string for conversion";return}let c=parseInt(b[1],10);c>=50?this.year=1900+c:this.year=2e3+c,this.month=parseInt(b[2],10),this.day=parseInt(b[3],10),this.hour=parseInt(b[4],10),this.minute=parseInt(b[5],10),this.second=parseInt(b[6],10)}toString(a="iso"){if("iso"===a){let a=Array(7);return a[0]=bh(this.year<2e3?this.year-1900:this.year-2e3,2),a[1]=bh(this.month,2),a[2]=bh(this.day,2),a[3]=bh(this.hour,2),a[4]=bh(this.minute,2),a[5]=bh(this.second,2),a[6]="Z",a.join("")}return super.toString(a)}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.toDate().toISOString()}`}toJSON(){return{...super.toJSON(),year:this.year,month:this.month,day:this.day,hour:this.hour,minute:this.minute,second:this.second}}}bA.UTCTime=cp,cp.NAME="UTCTime";class cq extends cp{constructor(a={}){super(a),null!=this.millisecond||(this.millisecond=0),this.idBlock.tagClass=1,this.idBlock.tagNumber=24}fromDate(a){super.fromDate(a),this.millisecond=a.getUTCMilliseconds()}toDate(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond))}fromString(a){let b,c=!1,d="",e="",f=0,g=0,h=0;if("Z"===a[a.length-1])d=a.substring(0,a.length-1),c=!0;else{if(isNaN(new Number(a[a.length-1]).valueOf()))throw Error("Wrong input string for conversion");d=a}if(c){if(-1!==d.indexOf("+")||-1!==d.indexOf("-"))throw Error("Wrong input string for conversion")}else{let a=1,b=d.indexOf("+"),c="";if(-1===b&&(b=d.indexOf("-"),a=-1),-1!==b){if(c=d.substring(b+1),d=d.substring(0,b),2!==c.length&&4!==c.length)throw Error("Wrong input string for conversion");let e=parseInt(c.substring(0,2),10);if(isNaN(e.valueOf()))throw Error("Wrong input string for conversion");if(g=a*e,4===c.length){if(isNaN((e=parseInt(c.substring(2,4),10)).valueOf()))throw Error("Wrong input string for conversion");h=a*e}}}let i=d.indexOf(".");if(-1===i&&(i=d.indexOf(",")),-1!==i){let a=new Number(`0${d.substring(i)}`);if(isNaN(a.valueOf()))throw Error("Wrong input string for conversion");f=a.valueOf(),e=d.substring(0,i)}else e=d;switch(!0){case 8===e.length:if(b=/(\d{4})(\d{2})(\d{2})/ig,-1!==i)throw Error("Wrong input string for conversion");break;case 10===e.length:if(b=/(\d{4})(\d{2})(\d{2})(\d{2})/ig,-1!==i){let a=60*f;this.minute=Math.floor(a),a=60*(a-this.minute),this.second=Math.floor(a),a=1e3*(a-this.second),this.millisecond=Math.floor(a)}break;case 12===e.length:if(b=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})/ig,-1!==i){let a=60*f;this.second=Math.floor(a),a=1e3*(a-this.second),this.millisecond=Math.floor(a)}break;case 14===e.length:if(b=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/ig,-1!==i){let a=1e3*f;this.millisecond=Math.floor(a)}break;default:throw Error("Wrong input string for conversion")}let j=b.exec(e);if(null===j)throw Error("Wrong input string for conversion");for(let a=1;a<j.length;a++)switch(a){case 1:this.year=parseInt(j[a],10);break;case 2:this.month=parseInt(j[a],10);break;case 3:this.day=parseInt(j[a],10);break;case 4:this.hour=parseInt(j[a],10)+g;break;case 5:this.minute=parseInt(j[a],10)+h;break;case 6:this.second=parseInt(j[a],10);break;default:throw Error("Wrong input string for conversion")}if(!1===c){let a=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond);this.year=a.getUTCFullYear(),this.month=a.getUTCMonth(),this.day=a.getUTCDay(),this.hour=a.getUTCHours(),this.minute=a.getUTCMinutes(),this.second=a.getUTCSeconds(),this.millisecond=a.getUTCMilliseconds()}}toString(a="iso"){if("iso"===a){let a=[];return a.push(bh(this.year,4)),a.push(bh(this.month,2)),a.push(bh(this.day,2)),a.push(bh(this.hour,2)),a.push(bh(this.minute,2)),a.push(bh(this.second,2)),0!==this.millisecond&&(a.push("."),a.push(bh(this.millisecond,3))),a.push("Z"),a.join("")}return super.toString(a)}toJSON(){return{...super.toJSON(),millisecond:this.millisecond}}}bA.GeneralizedTime=cq,cq.NAME="GeneralizedTime";class cr extends cb{constructor(a={}){super(a),this.idBlock.tagClass=1,this.idBlock.tagNumber=31}}bA.DATE=cr,cr.NAME="DATE";class cs extends cb{constructor(a={}){super(a),this.idBlock.tagClass=1,this.idBlock.tagNumber=32}}bA.TimeOfDay=cs,cs.NAME="TimeOfDay";class ct extends cb{constructor(a={}){super(a),this.idBlock.tagClass=1,this.idBlock.tagNumber=33}}bA.DateTime=ct,ct.NAME="DateTime";class cu extends cb{constructor(a={}){super(a),this.idBlock.tagClass=1,this.idBlock.tagNumber=34}}bA.Duration=cu,cu.NAME="Duration";class cv extends cb{constructor(a={}){super(a),this.idBlock.tagClass=1,this.idBlock.tagNumber=14}}bA.TIME=cv,cv.NAME="TIME";class cw{constructor({name:a="",optional:b=!1}={}){this.name=a,this.optional=b}}class cx extends cw{constructor({value:a=[],...b}={}){super(b),this.value=a}}class cy extends cw{constructor({value:a=new cw,local:b=!1,...c}={}){super(c),this.value=a,this.local=b}}class cz{get data(){return this.dataView.slice().buffer}set data(a){this.dataView=a4.toUint8Array(a)}constructor({data:a=br}={}){this.dataView=a4.toUint8Array(a)}fromBER(a,b,c){let d=b+c;return this.dataView=a4.toUint8Array(a).subarray(b,d),d}toBER(a){return this.dataView.slice().buffer}}function cA(a,b,c){if(c instanceof cx){for(let d of c.value)if(cA(a,b,d).verified)return{verified:!0,result:a};{let a={verified:!1,result:{error:"Wrong values for Choice type"}};return c.hasOwnProperty(bo)&&(a.name=c.name),a}}if(c instanceof cw)return c.hasOwnProperty(bo)&&(a[c.name]=b),{verified:!0,result:a};if(a instanceof Object==!1)return{verified:!1,result:{error:"Wrong root object"}};if(b instanceof Object==!1)return{verified:!1,result:{error:"Wrong ASN.1 data"}};if(c instanceof Object==!1||"idBlock"in c==!1||"fromBER"in c.idBlock==!1||"toBER"in c.idBlock==!1)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};let d=c.idBlock.toBER(!1);if(0===d.byteLength)return{verified:!1,result:{error:"Error encoding idBlock for ASN.1 schema"}};if(-1===c.idBlock.fromBER(d,0,d.byteLength))return{verified:!1,result:{error:"Error decoding idBlock for ASN.1 schema"}};if(!1===c.idBlock.hasOwnProperty("tagClass"))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(c.idBlock.tagClass!==b.idBlock.tagClass)return{verified:!1,result:a};if(!1===c.idBlock.hasOwnProperty("tagNumber"))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(c.idBlock.tagNumber!==b.idBlock.tagNumber)return{verified:!1,result:a};if(!1===c.idBlock.hasOwnProperty("isConstructed"))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(c.idBlock.isConstructed!==b.idBlock.isConstructed)return{verified:!1,result:a};if(!("isHexOnly"in c.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(c.idBlock.isHexOnly!==b.idBlock.isHexOnly)return{verified:!1,result:a};if(c.idBlock.isHexOnly){if(bp in c.idBlock==!1)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};let d=c.idBlock.valueHexView,e=b.idBlock.valueHexView;if(d.length!==e.length)return{verified:!1,result:a};for(let b=0;b<d.length;b++)if(d[b]!==e[1])return{verified:!1,result:a}}if(c.name&&(c.name=c.name.replace(/^\s+|\s+$/g,""),c.name&&(a[c.name]=b)),c instanceof bA.Constructed){let d=0,e={verified:!1,result:{error:"Unknown error"}},f=c.valueBlock.value.length;if(f>0&&c.valueBlock.value[0]instanceof cy&&(f=b.valueBlock.value.length),0===f)return{verified:!0,result:a};if(0===b.valueBlock.value.length&&0!==c.valueBlock.value.length){let b=!0;for(let a=0;a<c.valueBlock.value.length;a++)b=b&&(c.valueBlock.value[a].optional||!1);return b?{verified:!0,result:a}:(c.name&&(c.name=c.name.replace(/^\s+|\s+$/g,""),c.name&&delete a[c.name]),a.error="Inconsistent object length",{verified:!1,result:a})}for(let g=0;g<f;g++)if(g-d>=b.valueBlock.value.length){if(!1===c.valueBlock.value[g].optional){let b={verified:!1,result:a};return a.error="Inconsistent length between ASN.1 data and schema",c.name&&(c.name=c.name.replace(/^\s+|\s+$/g,""),c.name&&(delete a[c.name],b.name=c.name)),b}}else if(c.valueBlock.value[0]instanceof cy){if(!1===(e=cA(a,b.valueBlock.value[g],c.valueBlock.value[0].value)).verified)if(!c.valueBlock.value[0].optional)return c.name&&(c.name=c.name.replace(/^\s+|\s+$/g,""),c.name&&delete a[c.name]),e;else d++;if(bo in c.valueBlock.value[0]&&c.valueBlock.value[0].name.length>0){let d={};void 0===(d="local"in c.valueBlock.value[0]&&c.valueBlock.value[0].local?b:a)[c.valueBlock.value[0].name]&&(d[c.valueBlock.value[0].name]=[]),d[c.valueBlock.value[0].name].push(b.valueBlock.value[g])}}else if(!1===(e=cA(a,b.valueBlock.value[g-d],c.valueBlock.value[g])).verified)if(!c.valueBlock.value[g].optional)return c.name&&(c.name=c.name.replace(/^\s+|\s+$/g,""),c.name&&delete a[c.name]),e;else d++;if(!1===e.verified){let b={verified:!1,result:a};return c.name&&(c.name=c.name.replace(/^\s+|\s+$/g,""),c.name&&(delete a[c.name],b.name=c.name)),b}return{verified:!0,result:a}}if(c.primitiveSchema&&bp in b.valueBlock){let d=bK(b.valueBlock.valueHexView);if(-1===d.offset){let b={verified:!1,result:d.result};return c.name&&(c.name=c.name.replace(/^\s+|\s+$/g,""),c.name&&(delete a[c.name],b.name=c.name)),b}return cA(a,d.result,c.primitiveSchema)}return{verified:!0,result:a}}function cB(a,b){if(b instanceof Object==!1)return{verified:!1,result:{error:"Wrong ASN.1 schema type"}};let c=bK(a4.toUint8Array(a));return -1===c.offset?{verified:!1,result:c.result}:cA(c.result,c.result,b)}function cC(a){return Object.prototype.toString.call(a)}function cD(a){return"[object ArrayBuffer]"===cC(a)}function cE(a){return cD(a)||"u">typeof SharedArrayBuffer&&"[object SharedArrayBuffer]"===cC(a)}function cF(a){return cE(a)||!!ArrayBuffer.isView(a)||!!a&&"object"==typeof a&&"number"==typeof a.byteOffset&&"number"==typeof a.byteLength&&cE(a.buffer)}function cG(a){if(!cF(a))throw TypeError("Expected ArrayBuffer, SharedArrayBuffer, or ArrayBufferView")}function cH(a){return(cG(a),cE(a))?new Uint8Array(a):new Uint8Array(a.buffer,a.byteOffset,a.byteLength)}function cI(a){if(cG(a),cD(a))return a;let b=new ArrayBuffer(a.byteLength);return new Uint8Array(b).set(cH(a)),b}function cJ(a){let b=cH(a),c="";for(let a of b)c+=String.fromCharCode(a);return c}function cK(a){let b=new Uint8Array(a.length);for(let c=0;c<a.length;c++)b[c]=255&a.charCodeAt(c);return b}let cL=/^[0-9a-f]$/i,cM=[" "," ","\n","\r",":","-","."];function cN(a){return a.replace(/[^0-9a-f]/gi,"")}function cO(a,b){if(!b)return a.join("");if(!Number.isInteger(b.size)||b.size<1)throw RangeError("Hex group size must be a positive integer");let c=[];for(let d=0;d<a.length;d+=b.size)c.push(a.slice(d,d+b.size).join(""));return c.join(b.separator)}function cP(a,b={}){return function(a,b){let c=b.allowPrefix??!0,d=[..."none"===b.separators?[]:!b.separators||"common"===b.separators?cM:b.separators].sort((a,b)=>b.length-a.length);for(let a of d)if(!a)throw TypeError("Hex separators must be non-empty strings");let e=a.trim();if(/^0x/i.test(e)){if(!c)throw TypeError("Hexadecimal text must not include a 0x prefix");e=e.slice(2)}let f="",g=!1;for(let a=0;a<e.length;){let c=e[a]??"";if(cL.test(c)){f+=c,g=!1,a+=1;continue}let h=function(a,b,c){for(let d of c)if(a.startsWith(d,b))return d}(e,a,d);if(!h)throw TypeError("Input is not valid hexadecimal text");if(b.strict&&(g||0===f.length))throw TypeError("Hexadecimal text contains misplaced separators");g=!0,a+=h.length}if(b.strict&&g&&f.length>0)throw TypeError("Hexadecimal text must not end with a separator");if(f.length%2!=0){if(!b.allowOddLength)throw TypeError("Hexadecimal text must contain an even number of characters");f=`0${f}`}return f.toLowerCase()}(a,b)}function cQ(a,b={}){let c=cH(a),d=b.case??"lower",e=Array.from(c,a=>{let b=a.toString(16).padStart(2,"0");return"upper"===d?b.toUpperCase():b}),f="";if(b.line){let a=b.line.bytesPerLine;if(!Number.isInteger(a)||a<1)throw RangeError("Hex bytesPerLine must be a positive integer");let c=b.line.separator??"\n",d=[];for(let c=0;c<e.length;c+=a)d.push(cO(e.slice(c,c+a),b.group));f=d.join(c)}else f=cO(e,b.group);return`${b.prefix??""}${f}`}function cR(a,b={}){let c=cP(a,b),d=new Uint8Array(c.length/2);for(let a=0;a<c.length;a+=2)d[a/2]=Number.parseInt(c.slice(a,a+2),16);return d}function cS(a,b={}){let c=new ArrayBuffer(2*a.length),d=new DataView(c);for(let c=0;c<a.length;c++)d.setUint16(2*c,a.charCodeAt(c),b.littleEndian??!1);return new Uint8Array(c)}function cT(a,b={}){let c=cI(a),d=new DataView(c),e="";for(let a=0;a<c.byteLength;a+=2)e+=String.fromCharCode(d.getUint16(a,b.littleEndian??!1));return e}Object.freeze({}),Object.freeze({case:"upper"}),Object.freeze({group:{size:1,separator:":"}}),Object.freeze({case:"upper",group:{size:1,separator:":"}}),Object.freeze({group:{size:4,separator:" "}}),Object.freeze({prefix:"0x"});let cU=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;function cV(){return globalThis.Buffer}function cW(a){return a.replace(/[\n\r\t ]/g,"")}function cX(a){if("string"!=typeof a)return!1;let b=cW(a);return""===b||cU.test(b)}function cY(a,b){let c=cH(a),d=cV();return d?d.from(c).toString("base64"):btoa(cJ(c))}function cZ(a,b){let c=cW(a);if(!cX(c))throw TypeError("Input is not valid Base64 text");let d=cV();return d?new Uint8Array(d.from(c,"base64")):cK(atob(c))}let c$=function(a){let b=a.length%4;return b?a+"=".repeat(4-b):a},c_=/^[A-Za-z0-9_-]*$/;function c0(a){return a.replace(/[\n\r\t ]/g,"")}function c1(a){return"string"==typeof a&&c_.test(c0(a))}let c2=/^[A-Z0-9][A-Z0-9 ._-]*[A-Z0-9]$/i,c3=/-----BEGIN ([^-]+)-----([\s\S]*?)-----END \1-----/g;function c4(a){if(!c2.test(a))throw TypeError(`Invalid PEM label '${a}'`)}function c5(a,b={}){let c,d=[],e=b.label;for(c3.lastIndex=0;c=c3.exec(a);){var f;let a=c[1].trim();if(e&&a!==e)continue;c4(a);let b=function(a){let b=a.trim().replace(/\r\n/g,"\n").split("\n").map(a=>a.trim()).filter(Boolean),c={},d=0;for(;d<b.length;d++){let a=b[d],e=a.indexOf(":");if(e<=0)break;c[a.slice(0,e).trim()]=a.slice(e+1).trim()}return{headers:Object.keys(c).length?c:void 0,base64Lines:b.slice(d),base64Text:b.slice(d).join("")}}(c[2]);d.push({label:a,data:cZ(b.base64Text),headers:b.headers,lineLength:b.base64Lines[0]?.length??64,newline:(f=c[0],/\r\n/.test(f)?"\r\n":"\n")})}if(b.strict&&0===d.length)throw TypeError(e?`No PEM block with label '${e}' was found`:"No PEM blocks were found");return d}function c6(a,b,c={}){c4(a);let d=c.lineLength??64;if(!Number.isInteger(d)||d<1)throw RangeError("PEM lineLength must be a positive integer");let e=c.newline??"\n",f=[`-----BEGIN ${a}-----`];if(c.headers){for(let[a,b]of Object.entries(c.headers))f.push(`${a}: ${b}`);f.push("")}return f.push(...function(a,b){let c=[];for(let d=0;d<a.length;d+=b)c.push(a.slice(d,d+b));return c}(cY(b),d)),f.push(`-----END ${a}-----`),`${f.join(e)}${e}`}function c7(a){return a.trim().toLowerCase()}function c8(a,b,c){for(let b of[c.name,...c.aliases??[]])a.delete(c7(b));b.delete(c7(c.name))}function c9(a,b,c){let d=a[c];if("function"!=typeof d)throw Error(`Converter '${b}' does not support ${c}()`);return d}(function(a=[]){let b=new Map,c=new Set,d={register(a,d={}){if(!a.name||!c7(a.name))throw TypeError("Converter name is required");let e=[...new Set([a.name,...a.aliases??[]].map(c7))],f=new Set;for(let a of e){let c=b.get(a);if(c){if(!d.override)throw Error(`Converter '${a}' is already registered`);f.add(c)}}for(let a of f)c8(b,c,a);for(let c of e)b.set(c,a);return c.add(c7(a.name)),this},unregister(a){let d=b.get(c7(a));return!!d&&(c8(b,c,d),!0)},has:a=>b.has(c7(a)),get(a){let c=b.get(c7(a));if(!c)throw Error(`Converter '${a}' is not registered`);return c},list(){return[...c].map(a=>this.get(a))},encode(a,b,c){return this.get(a).encode(b,c)},decode(a,b,c){return this.get(a).decode(b,c)},tryDecode(a,b,c){try{return{ok:!0,bytes:this.decode(a,b,c)}}catch(a){return{ok:!1,error:a instanceof Error?a:Error(String(a))}}},normalize(a,b,c){let d=this.get(a);return c9(d,a,"normalize").call(d,b,c)},parse(a,b,c){let d=this.get(a);return c9(d,a,"parse").call(d,b,c)},format(a,b,c){let d=this.get(a);return c9(d,a,"format").call(d,b,c)},transcode(a,b){let c=this.decode(b.from,a,b.fromOptions);return this.encode(b.to,c,b.toOptions)},detect(a,b={}){let c=b.formats?.length?b.formats.map(a=>String(a)):this.list().map(a=>a.name).filter(a=>!["binary","utf8","utf16be","utf16le"].includes(c7(a))),d=new Map;for(let b of c){let c=this.get(b),e=function(a,b,c){let d=c7(c.name||a),e=b.trim();if(!e)return 0;let f=!1;c.is&&(f=c.is(b));let g=!1;try{c.decode(b),g=!0}catch{g=!1}if(!f&&!g)return 0;switch(d){case"pem":return+!!/-----BEGIN [^-]+-----/.test(b);case"hex":{let a=e.replace(/^0x/i,"").replace(/[\s:.-]/g,"");if(!a||/[^0-9a-f]/i.test(a)||a.length%2!=0)return 0;if(/^0x/i.test(e)||/[:\s.-]/.test(e))return .95;if(/[a-f]/.test(e)||/[A-F]/.test(e))return .8;return .45}case"base64url":if(/[-_]/.test(e))return .95;if(/=/.test(e))return .1;return .6;case"base64":if(/[+/=]/.test(e))return .9;return .55;case"binary":case"utf8":case"utf16be":case"utf16le":return 0;default:return f&&g?.75:.5}}(b,a,c);if(e<=0)continue;let f=c.name,g=d.get(f);(!g||e>g.confidence)&&d.set(f,{format:f,confidence:e})}return[...d.values()].sort((a,b)=>b.confidence-a.confidence)}};for(let b of a)d.register(b);})([{name:"binary",aliases:["latin1"],encode:cJ,decode:cK,is:function(a){return"string"==typeof a}},{name:"hex",encode:cQ,decode:cR,format:function(a,b){return cQ(a,b)},is:function(a,b={}){if("string"!=typeof a)return!1;try{return cP(a,b),!0}catch{return!1}},normalize:cP,parse:function(a,b={}){let c=cP(a,b);return{bytes:cR(c),format:function(a){let b,c,d=a.trim(),e=/^0x/i.test(d)?"0x":"",f=e?d.slice(2):d,g=function(a){let b=/\r\n|\n/.exec(a);if(b)return"\r\n"===b[0]?"\r\n":"\n"}(f),h=f.split(/\r\n|\n/).filter(a=>a.length>0),i=function(a){let b=a.match(/[0-9A-Fa-f]+|[^0-9A-Fa-f]+/g)??[];if(b.length<3)return;let c=b.filter((a,b)=>b%2==0),d=b.filter((a,b)=>b%2==1),e=d[0];if(!e||d.some(a=>a!==e)||c.some(a=>0===a.length||a.length%2!=0))return;let f=c[0]?.length??0;if(!(!f||c.slice(0,-1).some(a=>a.length!==f))&&!((c[c.length-1]?.length??0)>f))return{size:f/2,separator:e}}(h[0]?.trim()??""),j={case:(b=/[A-F]/.test(d),c=/[a-f]/.test(d),b&&!c?"upper":"lower"),prefix:e};if(i&&(j.group=i),g&&h.length>1){let a=cN(h[0]??"").length/2;a>0&&h.slice(0,-1).every(b=>cN(b).length/2===a)&&(j.line={bytesPerLine:a,separator:g})}return j}(a),normalized:c}}},{name:"base64",aliases:["b64"],encode:cY,decode:cZ,is:cX,normalize:cW},{name:"base64url",aliases:["base64-url","b64url"],encode:function(a,b){return cY(a).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")},decode:function(a,b){let c=c0(a);if(!c1(c))throw TypeError("Input is not valid Base64Url text");return cZ(c$(c.replace(/-/g,"+").replace(/_/g,"/")))},is:c1,normalize:c0},{name:"utf8",aliases:["utf-8"],encode:a=>new TextDecoder("utf-8",{fatal:!1}).decode(cH(a)),decode:a=>new TextEncoder().encode(a),is:a=>"string"==typeof a},{name:"utf16be",aliases:["utf16","utf-16","utf-16be"],encode:a=>cT(a),decode:a=>cS(a),is:a=>"string"==typeof a},{name:"utf16le",aliases:["utf-16le","ucs2","usc2"],encode:a=>cT(a,{littleEndian:!0}),decode:a=>cS(a,{littleEndian:!0}),is:a=>"string"==typeof a},{name:"pem",encode:(a,b)=>{if(!b?.label)throw TypeError("PEM label is required");return c6(b.label,a,b)},decode:(a,b)=>(function(a,b){let[c]=function(a,b={}){return c5(a,b).map(({lineLength:a,newline:b,...c})=>c)}(a,{label:b,strict:!0});return c.data})(a,b?.label),format:function(a,b){return c6(b.label,a,b)},is:a=>"string"==typeof a&&/-----BEGIN [^-]+-----/.test(a),parse:function(a,b={}){let[c]=c5(a,{...b,strict:!0}),d={label:c.label,headers:c.headers,lineLength:c.lineLength,newline:c.newline};return{bytes:c.data,format:d,normalized:c6(c.label,c.data,d)}}}]),(d=w||(w={}))[d.Sequence=0]="Sequence",d[d.Set=1]="Set",d[d.Choice=2]="Choice",(e=x||(x={}))[e.Any=1]="Any",e[e.Boolean=2]="Boolean",e[e.OctetString=3]="OctetString",e[e.BitString=4]="BitString",e[e.Integer=5]="Integer",e[e.Enumerated=6]="Enumerated",e[e.ObjectIdentifier=7]="ObjectIdentifier",e[e.Utf8String=8]="Utf8String",e[e.BmpString=9]="BmpString",e[e.UniversalString=10]="UniversalString",e[e.NumericString=11]="NumericString",e[e.PrintableString=12]="PrintableString",e[e.TeletexString=13]="TeletexString",e[e.VideotexString=14]="VideotexString",e[e.IA5String=15]="IA5String",e[e.GraphicString=16]="GraphicString",e[e.VisibleString=17]="VisibleString",e[e.GeneralString=18]="GeneralString",e[e.CharacterString=19]="CharacterString",e[e.UTCTime=20]="UTCTime",e[e.GeneralizedTime=21]="GeneralizedTime",e[e.DATE=22]="DATE",e[e.TimeOfDay=23]="TimeOfDay",e[e.DateTime=24]="DateTime",e[e.Duration=25]="Duration",e[e.TIME=26]="TIME",e[e.Null=27]="Null",e[e.RelativeObjectIdentifier=28]="RelativeObjectIdentifier";class da{unusedBits=0;value=new ArrayBuffer(0);constructor(a,b=0){if(a)if("number"==typeof a)this.fromNumber(a);else if(cF(a))this.unusedBits=b,this.value=cI(a);else throw TypeError("Unsupported type of 'params' argument for BitString")}fromASN(a){if(!(a instanceof bW))throw TypeError("Argument 'asn' is not instance of ASN.1 BitString");return this.unusedBits=a.valueBlock.unusedBits,this.value=cI(a.valueBlock.valueHex),this}toASN(){return new bW({unusedBits:this.unusedBits,valueHex:this.value})}toSchema(a){return new bW({name:a})}toNumber(){let a="";for(let b of new Uint8Array(this.value))a+=b.toString(2).padStart(8,"0");return a=a.split("").reverse().join(""),this.unusedBits&&(a=a.slice(this.unusedBits).padStart(this.unusedBits,"0")),parseInt(a,2)}fromNumber(a){let b=a.toString(2),c=b.length+7>>3;this.unusedBits=(c<<3)-b.length;let d=new Uint8Array(c);b=b.padStart(c<<3,"0").split("").reverse().join("");let e=0;for(;e<c;)d[e]=parseInt(b.slice(e<<3,(e<<3)+8),2),e++;this.value=d.buffer}}class db{buffer;get byteLength(){return this.buffer.byteLength}get byteOffset(){return 0}constructor(a){"number"==typeof a?this.buffer=new ArrayBuffer(a):cF(a)?this.buffer=cI(a):Array.isArray(a)?this.buffer=new Uint8Array(a).buffer:this.buffer=new ArrayBuffer(0)}fromASN(a){if(!(a instanceof bU))throw TypeError("Argument 'asn' is not instance of ASN.1 OctetString");return this.buffer=cI(a.valueBlock.valueHex),this}toASN(){return new bU({valueHex:this.buffer})}toSchema(a){return new bU({name:a})}}let dc={fromASN:a=>a instanceof bQ?null:cI(a.valueBeforeDecodeView),toASN:a=>{if(null===a)return new bQ;let b=bL(a);if(b.result.error)throw Error(b.result.error);return b.result}},dd={fromASN:a=>a.valueBlock.valueHexView.byteLength>=4?a.valueBlock.toString():a.valueBlock.valueDec,toASN:a=>new bZ({value:+a})},de={fromASN:a=>a.valueBlock.valueDec,toASN:a=>new b$({value:a})},df={fromASN:a=>cI(a.valueBlock.valueHexView),toASN:a=>new bZ({valueHex:a})},dg={fromASN:a=>cI(a.valueBlock.valueHexView),toASN:a=>new bW({valueHex:a})},dh={fromASN:a=>a.valueBlock.toString(),toASN:a=>new b1({value:a})},di={fromASN:a=>a.valueBlock.toString(),toASN:a=>new b4({value:a})},dj={fromASN:a=>a.valueBlock.value,toASN:a=>new bS({value:a})},dk={fromASN:a=>cI(a.valueBlock.valueHexView),toASN:a=>new bU({valueHex:a})};function dl(a){return{fromASN:a=>a.valueBlock.value,toASN:b=>new a({value:b})}}let dm=dl(cb),dn=dl(cd),dp=dl(cf),dq=dl(cg),dr=dl(ch),ds=dl(ci),dt=dl(cj),du=dl(ck),dv=dl(cl),dw=dl(cm),dx=dl(cn),dy=dl(co),dz={fromASN:a=>a.toDate(),toASN:a=>new cp({valueDate:a})},dA={fromASN:a=>a.toDate(),toASN:a=>new cq({valueDate:a})},dB={fromASN:()=>null,toASN:()=>new bQ};function dC(a){switch(a){case x.Any:return dc;case x.BitString:return dg;case x.BmpString:return dn;case x.Boolean:return dj;case x.CharacterString:return dy;case x.Enumerated:return de;case x.GeneralString:return dx;case x.GeneralizedTime:return dA;case x.GraphicString:return dv;case x.IA5String:return du;case x.Integer:return dd;case x.Null:return dB;case x.NumericString:return dq;case x.ObjectIdentifier:return dh;case x.RelativeObjectIdentifier:return di;case x.OctetString:return dk;case x.PrintableString:return dr;case x.TeletexString:return ds;case x.UTCTime:return dz;case x.UniversalString:return dp;case x.Utf8String:return dm;case x.VideotexString:return dt;case x.VisibleString:return dw;default:return null}}function dD(a){return"function"==typeof a&&a.prototype?!!a.prototype.toASN&&!!a.prototype.fromASN||dD(a.prototype):!!(a&&"object"==typeof a&&"toASN"in a&&"fromASN"in a)}class dE{items=new WeakMap;has(a){return this.items.has(a)}get(a,b=!1){let c=this.items.get(a);if(!c)throw Error(`Cannot get schema for '${a.prototype.constructor.name}' target`);if(b&&!c.schema)throw Error(`Schema '${a.prototype.constructor.name}' doesn't contain ASN.1 schema. Call 'AsnSchemaStorage.cache'.`);return c}cache(a){let b=this.get(a);b.schema||(b.schema=this.create(a,!0))}createDefault(a){let b={type:w.Sequence,items:{}},c=this.findParentSchema(a);return c&&(Object.assign(b,c),b.items=Object.assign({},b.items,c.items)),b}create(a,b){let c=this.items.get(a)||this.createDefault(a),d=[];for(let a in c.items){let e,f=c.items[a],g=b?a:"";if("number"==typeof f.type){let a=x[f.type],b=a3[a];if(!b)throw Error(`Cannot get ASN1 class by name '${a}'`);e=new b({name:g})}else dD(f.type)?e=new f.type().toSchema(g):f.optional?this.get(f.type).type===w.Choice?e=new cw({name:g}):(e=this.create(f.type,!1)).name=g:e=new cw({name:g});let h=!!f.optional||void 0!==f.defaultValue;if(f.repeated&&(e.name="",e=new("set"===f.repeated?b6:b5)({name:"",value:[new cy({name:g,value:e})]})),null!==f.context&&void 0!==f.context)if(f.implicit)if("number"==typeof f.type||dD(f.type)){let a=f.repeated?bN:bE;d.push(new a({name:g,optional:h,idBlock:{tagClass:3,tagNumber:f.context}}))}else{this.cache(f.type);let a=!!f.repeated,b=a?e:this.get(f.type,!0).schema;b="valueBlock"in b?b.valueBlock.value:b.value,d.push(new bN({name:a?"":g,optional:h,idBlock:{tagClass:3,tagNumber:f.context},value:b}))}else d.push(new bN({optional:h,idBlock:{tagClass:3,tagNumber:f.context},value:[e]}));else e.optional=h,d.push(e)}switch(c.type){case w.Sequence:return new b5({value:d,name:""});case w.Set:return new b6({value:d,name:""});case w.Choice:return new cx({value:d,name:""});default:throw Error("Unsupported ASN1 type in use")}}set(a,b){return this.items.set(a,b),this}findParentSchema(a){let b=Object.getPrototypeOf(a);return b?this.items.get(b)||this.findParentSchema(b):null}}let dF=new dE,dG=a=>b=>{let c;dF.has(b)?c=dF.get(b):(c=dF.createDefault(b),dF.set(b,c)),Object.assign(c,a)},dH=a=>(b,c)=>{let d;dF.has(b.constructor)?d=dF.get(b.constructor):(d=dF.createDefault(b.constructor),dF.set(b.constructor,d));let e=Object.assign({},a);if("number"==typeof e.type&&!e.converter){let d=dC(a.type);if(!d)throw Error(`Cannot get default converter for property '${c}' of ${b.constructor.name}`);e.converter=d}e.raw=a.raw,d.items[c]=e};class dI extends Error{schemas=[]}class dJ{static parse(a,b,c){let d=bL(cI(a),c?.berOptions);if(d.result.error)throw Error(d.result.error);return this.fromASN(d.result,b,c)}static fromASN(a,b,c){try{if(dD(b))return new b().fromASN(a);let d=dF.get(b);dF.cache(b);let e=d.schema,f=this.handleChoiceTypes(a,d,b,e,c);if(f?.result)return f.result;f?.targetSchema&&(e=f.targetSchema);let g=this.handleSequenceTypes(a,d,b,e),h=new b;if(function a(b){if(b){let c=Object.getPrototypeOf(b);return c?.prototype?.constructor===Array||a(c)}return!1}(b))return this.handleArrayTypes(a,d,b,c);return this.processSchemaItems(d,g,h,c),h}catch(a){throw a instanceof dI&&a.schemas.push(b.name),a}}static handleChoiceTypes(a,b,c,d,e){if(a.constructor===bN&&b.type===w.Choice&&3===a.idBlock.tagClass)for(let d in b.items){let f=b.items[d];if(f.context===a.idBlock.tagNumber&&f.implicit&&"function"==typeof f.type&&dF.has(f.type)){let b=dF.get(f.type);if(b&&b.type===w.Sequence){let b=new b5;if("value"in a.valueBlock&&Array.isArray(a.valueBlock.value)&&"value"in b.valueBlock){b.valueBlock.value=a.valueBlock.value;let g=this.fromASN(b,f.type,e),h=new c;return h[d]=g,{result:h}}}}}else if(a.constructor===bN&&b.type!==w.Choice){let c=new bN({idBlock:{tagClass:3,tagNumber:a.idBlock.tagNumber},value:b.schema.valueBlock.value});for(let c in b.items)delete a[c];return{targetSchema:c}}return null}static handleSequenceTypes(a,b,c,d){if(b.type===w.Sequence){let b=cA({},a,d);if(!b.verified)throw new dI(`Data does not match to ${c.name} ASN1 schema.${b.result.error?` ${b.result.error}`:""}`);return b}{let b=cA({},a,d);if(!b.verified)throw new dI(`Data does not match to ${c.name} ASN1 schema.${b.result.error?` ${b.result.error}`:""}`);return b}}static processRepeatedField(a,b,c){let d=a.slice(b);if(1===d.length&&"Sequence"===d[0].constructor.name){let a=d[0];a.valueBlock&&a.valueBlock.value&&Array.isArray(a.valueBlock.value)&&(d=a.valueBlock.value)}if("number"!=typeof c.type)return d.filter(a=>a&&a.valueBlock).map(a=>{try{return this.fromASN(a,c.type)}catch{return}}).filter(a=>void 0!==a);{let a=dC(c.type);if(!a)throw Error(`No converter for ASN.1 type ${c.type}`);return d.filter(a=>a&&a.valueBlock).map(b=>{try{return a.fromASN(b)}catch{return}}).filter(a=>void 0!==a)}}static processPrimitiveField(a,b){let c=dC(b.type);if(!c)throw Error(`No converter for ASN.1 type ${b.type}`);return c.fromASN(a)}static isOptionalChoiceField(a){return a.optional&&"function"==typeof a.type&&dF.has(a.type)&&dF.get(a.type).type===w.Choice}static processOptionalChoiceField(a,b){try{let c=this.fromASN(a,b.type);return{processed:!0,value:c}}catch(a){if(a instanceof dI&&/Wrong values for Choice type/.test(a.message))return{processed:!1};throw a}}static handleArrayTypes(a,b,c,d){if(!("value"in a.valueBlock&&Array.isArray(a.valueBlock.value)))throw Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.");let e=b.itemType;if("number"!=typeof e)return c.from(a.valueBlock.value,a=>this.fromASN(a,e,d));{let b=dC(e);if(!b)throw Error(`Cannot get default converter for array item of ${c.name} ASN1 schema`);return c.from(a.valueBlock.value,a=>b.fromASN(a))}}static processSchemaItems(a,b,c,d){for(let e in a.items){let f,g=b.result[e];if(!g)continue;let h=a.items[e],i=h.type;(f="number"==typeof i||dD(i)?this.processPrimitiveSchemaItem(g,h,i,d):this.processComplexSchemaItem(g,h,i,d))&&"object"==typeof f&&"value"in f&&"raw"in f?(c[e]=f.value,c[`${e}Raw`]=f.raw):c[e]=f}}static processPrimitiveSchemaItem(a,b,c,d){let e=b.converter??(dD(c)?new c:null);if(!e)throw Error("Converter is empty");return b.repeated?this.processRepeatedPrimitiveItem(a,b,e,d):this.processSinglePrimitiveItem(a,b,c,e,d)}static processRepeatedPrimitiveItem(a,b,c,d){if(!b.implicit)return Array.from(a,a=>c.fromASN(a));{let e=new("sequence"===b.repeated?b5:b6);e.valueBlock=a.valueBlock;let f=bL(e.toBER(!1),d?.berOptions);if(-1===f.offset)throw Error(`Cannot parse the child item. ${f.result.error}`);if(!("value"in f.result.valueBlock&&Array.isArray(f.result.valueBlock.value)))throw Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.");return Array.from(f.result.valueBlock.value,a=>c.fromASN(a))}}static processSinglePrimitiveItem(a,b,c,d,e){let f=a;if(b.implicit){let a;if(dD(c))a=new c().toSchema("");else{let b=x[c],d=a3[b];if(!d)throw Error(`Cannot get '${b}' class from asn1js module`);a=new d}a.valueBlock=f.valueBlock,f=bL(a.toBER(!1),e?.berOptions).result}return d.fromASN(f)}static processComplexSchemaItem(a,b,c,d){if(b.repeated){if(!Array.isArray(a))throw Error("Cannot get list of items from the ASN.1 parsed value. ASN.1 value should be iterable.");return Array.from(a,a=>this.fromASN(a,c,d))}{let e=this.handleImplicitTagging(a,b,c);if(this.isOptionalChoiceField(b))try{return this.fromASN(e,c,d)}catch(a){if(a instanceof dI&&/Wrong values for Choice type/.test(a.message))return;throw a}{let f=this.fromASN(e,c,d);return b.raw?{value:f,raw:a.valueBeforeDecodeView}:f}}}static handleImplicitTagging(a,b,c){if(b.implicit&&"number"==typeof b.context){let b=dF.get(c);if(b.type===w.Sequence){let b=new b5;if("value"in a.valueBlock&&Array.isArray(a.valueBlock.value)&&"value"in b.valueBlock)return b.valueBlock.value=a.valueBlock.value,b}else if(b.type===w.Set){let b=new b6;if("value"in a.valueBlock&&Array.isArray(a.valueBlock.value)&&"value"in b.valueBlock)return b.valueBlock.value=a.valueBlock.value,b}}return a}}class dK{static serialize(a){return a instanceof bB?a.toBER(!1):this.toASN(a).toBER(!1)}static toASN(a){let b;if(a&&"object"==typeof a&&dD(a))return a.toASN();if(!(a&&"object"==typeof a))throw TypeError("Parameter 1 should be type of Object.");let c=a.constructor,d=dF.get(c);dF.cache(c);let e=[];if(d.itemType){if(!Array.isArray(a))throw TypeError("Parameter 1 should be type of Array.");if("number"==typeof d.itemType){let b=dC(d.itemType);if(!b)throw Error(`Cannot get default converter for array item of ${c.name} ASN1 schema`);e=a.map(a=>b.toASN(a))}else e=a.map(a=>this.toAsnItem({type:d.itemType},"[]",c,a))}else for(let b in d.items){let f=d.items[b],g=a[b];if(void 0===g||f.defaultValue===g||"object"==typeof f.defaultValue&&"object"==typeof g&&function(a,b){if(!(a&&b)||a.byteLength!==b.byteLength)return!1;let c=new Uint8Array(a),d=new Uint8Array(b);for(let b=0;b<a.byteLength;b++)if(c[b]!==d[b])return!1;return!0}(this.serialize(f.defaultValue),this.serialize(g)))continue;let h=dK.toAsnItem(f,b,c,g);if("number"==typeof f.context)if(f.implicit)if(!f.repeated&&("number"==typeof f.type||dD(f.type))){let a={};a.valueHex=h instanceof bQ?cI(h.valueBeforeDecodeView):h.valueBlock.toBER(),e.push(new bE({optional:f.optional,idBlock:{tagClass:3,tagNumber:f.context},...a}))}else e.push(new bN({optional:f.optional,idBlock:{tagClass:3,tagNumber:f.context},value:h.valueBlock.value}));else e.push(new bN({optional:f.optional,idBlock:{tagClass:3,tagNumber:f.context},value:[h]}));else f.repeated?e=e.concat(h):e.push(h)}switch(d.type){case w.Sequence:b=new b5({value:e});break;case w.Set:b=new b6({value:e});break;case w.Choice:if(!e[0])throw Error(`Schema '${c.name}' has wrong data. Choice cannot be empty.`);b=e[0]}return b}static toAsnItem(a,b,c,d){let e;if("number"==typeof a.type){let f=a.converter;if(!f)throw Error(`Property '${b}' doesn't have converter for type ${x[a.type]} in schema '${c.name}'`);if(a.repeated){if(!Array.isArray(d))throw TypeError("Parameter 'objProp' should be type of Array.");let b=Array.from(d,a=>f.toASN(a));e=new("sequence"===a.repeated?b5:b6)({value:b})}else e=f.toASN(d)}else if(a.repeated){if(!Array.isArray(d))throw TypeError("Parameter 'objProp' should be type of Array.");let b=Array.from(d,a=>this.toASN(a));e=new("sequence"===a.repeated?b5:b6)({value:b})}else e=this.toASN(d);return e}}class dL extends Array{constructor(a=[]){if("number"==typeof a)super(a);else for(let b of(super(),a))this.push(b)}}class dM{static serialize(a){return dK.serialize(a)}static parse(a,b,c){return dJ.parse(a,b,c)}static toString(a,b){let c=bL(cF(a)?cI(a):dM.serialize(a),b?.berOptions);if(-1===c.offset)throw Error(`Cannot decode ASN.1 data. ${c.result.error}`);return c.result.toString()}}function dN(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}function dO(a,b,c,d){if("a"===c&&!d)throw TypeError("Private accessor was defined without a getter");if("function"==typeof b?a!==b||!d:!b.has(a))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===c?d:"a"===c?d.call(a):d?d.value:b.get(a)}function dP(a,b,c,d,e){if("m"===d)throw TypeError("Private method is not writable");if("a"===d&&!e)throw TypeError("Private accessor was defined without a setter");if("function"==typeof b?a!==b||!e:!b.has(a))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===d?e.call(a,c):e?e.value=c:b.set(a,c),c}"function"==typeof SuppressedError&&SuppressedError;class dQ{static isIPv4(a){return/^(\d{1,3}\.){3}\d{1,3}$/.test(a)}static parseIPv4(a){let b=a.split(".");if(4!==b.length)throw Error("Invalid IPv4 address");return b.map(a=>{let b=parseInt(a,10);if(isNaN(b)||b<0||b>255)throw Error("Invalid IPv4 address part");return b})}static parseIPv6(a){let b=this.expandIPv6(a).split(":");if(8!==b.length)throw Error("Invalid IPv6 address");return b.reduce((a,b)=>{let c=parseInt(b,16);if(isNaN(c)||c<0||c>65535)throw Error("Invalid IPv6 address part");return a.push(c>>8&255),a.push(255&c),a},[])}static expandIPv6(a){if(!a.includes("::"))return a;let b=a.split("::");if(b.length>2)throw Error("Invalid IPv6 address");let c=b[0]?b[0].split(":"):[],d=b[1]?b[1].split(":"):[],e=8-(c.length+d.length);if(e<0)throw Error("Invalid IPv6 address");return[...c,...Array(e).fill("0"),...d].join(":")}static formatIPv6(a){let b=[];for(let c=0;c<16;c+=2)b.push((a[c]<<8|a[c+1]).toString(16));return this.compressIPv6(b.join(":"))}static compressIPv6(a){let b=a.split(":"),c=-1,d=0,e=-1,f=0;for(let a=0;a<b.length;a++)"0"===b[a]?(-1===e&&(e=a),f++):(f>d&&(c=e,d=f),e=-1,f=0);if(f>d&&(c=e,d=f),d>1){let a=b.slice(0,c).join(":"),e=b.slice(c+d).join(":");return`${a}::${e}`}return a}static parseCIDR(a){let[b,c]=a.split("/"),d=parseInt(c,10);if(this.isIPv4(b)){if(d<0||d>32)throw Error("Invalid IPv4 prefix length");return[this.parseIPv4(b),d]}if(d<0||d>128)throw Error("Invalid IPv6 prefix length");return[this.parseIPv6(b),d]}static decodeIP(a){if(64===a.length&&0===parseInt(a,16))return"::/0";if(16!==a.length)return a;let b=parseInt(a.slice(8),16).toString(2).split("").reduce((a,b)=>a+ +b,0),c=a.slice(0,8).replace(/(.{2})/g,a=>`${parseInt(a,16)}.`);return c=c.slice(0,-1),`${c}/${b}`}static toString(a){let b=new Uint8Array(a);if(4===b.length)return Array.from(b).join(".");if(16===b.length)return this.formatIPv6(b);if(8===b.length||32===b.length){let a=b.length/2,c=b.slice(0,a),d=b.slice(a);if(b.every(a=>0===a))return 8===b.length?"0.0.0.0/0":"::/0";let e=d.reduce((a,b)=>a+(b.toString(2).match(/1/g)||[]).length,0);if(8===b.length){let a=Array.from(c).join(".");return`${a}/${e}`}{let a=this.formatIPv6(c);return`${a}/${e}`}}return this.decodeIP(cQ(a))}static fromString(a){if(a.includes("/")){let[b,c]=this.parseCIDR(a),d=new Uint8Array(b.length),e=c;for(let a=0;a<d.length;a++)e>=8?(d[a]=255,e-=8):e>0&&(d[a]=255<<8-e,e=0);let f=new Uint8Array(2*b.length);return f.set(b,0),f.set(d,b.length),f.buffer}return new Uint8Array(this.isIPv4(a)?this.parseIPv4(a):this.parseIPv6(a)).buffer}}let dR=class{teletexString;printableString;universalString;utf8String;bmpString;constructor(a={}){Object.assign(this,a)}toString(){return this.bmpString||this.printableString||this.teletexString||this.universalString||this.utf8String||""}};dN([dH({type:x.TeletexString})],dR.prototype,"teletexString",void 0),dN([dH({type:x.PrintableString})],dR.prototype,"printableString",void 0),dN([dH({type:x.UniversalString})],dR.prototype,"universalString",void 0),dN([dH({type:x.Utf8String})],dR.prototype,"utf8String",void 0),dN([dH({type:x.BmpString})],dR.prototype,"bmpString",void 0),dR=dN([dG({type:w.Choice})],dR);let dS=class extends dR{ia5String;anyValue;constructor(a={}){super(a),Object.assign(this,a)}toString(){return this.ia5String||(this.anyValue?cQ(this.anyValue):super.toString())}};dN([dH({type:x.IA5String})],dS.prototype,"ia5String",void 0),dN([dH({type:x.Any})],dS.prototype,"anyValue",void 0),dS=dN([dG({type:w.Choice})],dS);class dT{type="";value=new dS;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.ObjectIdentifier})],dT.prototype,"type",void 0),dN([dH({type:dS})],dT.prototype,"value",void 0);let dU=y=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,y.prototype)}};dU=y=dN([dG({type:w.Set,itemType:dT})],dU);let dV=z=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,z.prototype)}};dV=z=dN([dG({type:w.Sequence,itemType:dU})],dV);let dW=A=class extends dV{constructor(a){super(a),Object.setPrototypeOf(this,A.prototype)}};dW=A=dN([dG({type:w.Sequence})],dW);class dX{typeId="";value=new ArrayBuffer(0);constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.ObjectIdentifier})],dX.prototype,"typeId",void 0),dN([dH({type:x.Any,context:0})],dX.prototype,"value",void 0);class dY{nameAssigner;partyName=new dR;constructor(a={}){Object.assign(this,a)}}dN([dH({type:dR,optional:!0,context:0,implicit:!0})],dY.prototype,"nameAssigner",void 0),dN([dH({type:dR,context:1,implicit:!0})],dY.prototype,"partyName",void 0);let dZ=class{otherName;rfc822Name;dNSName;x400Address;directoryName;ediPartyName;uniformResourceIdentifier;iPAddress;registeredID;constructor(a={}){Object.assign(this,a)}};dN([dH({type:dX,context:0,implicit:!0})],dZ.prototype,"otherName",void 0),dN([dH({type:x.IA5String,context:1,implicit:!0})],dZ.prototype,"rfc822Name",void 0),dN([dH({type:x.IA5String,context:2,implicit:!0})],dZ.prototype,"dNSName",void 0),dN([dH({type:x.Any,context:3,implicit:!0})],dZ.prototype,"x400Address",void 0),dN([dH({type:dW,context:4,implicit:!1})],dZ.prototype,"directoryName",void 0),dN([dH({type:dY,context:5})],dZ.prototype,"ediPartyName",void 0),dN([dH({type:x.IA5String,context:6,implicit:!0})],dZ.prototype,"uniformResourceIdentifier",void 0),dN([dH({type:x.OctetString,context:7,implicit:!0,converter:{fromASN:a=>dQ.toString(dk.fromASN(a)),toASN:a=>dk.toASN(dQ.fromString(a))}})],dZ.prototype,"iPAddress",void 0),dN([dH({type:x.ObjectIdentifier,context:8,implicit:!0})],dZ.prototype,"registeredID",void 0),dZ=dN([dG({type:w.Choice})],dZ);let d$="1.3.6.1.5.5.7",d_=`${d$}.1`,d0=`${d$}.3`,d1=`${d$}.48`,d2=`${d1}.1`,d3=`${d1}.2`,d4=`${d1}.3`,d5=`${d1}.5`,d6="2.5.29",d7=`${d_}.1`;class d8{accessMethod="";accessLocation=new dZ;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.ObjectIdentifier})],d8.prototype,"accessMethod",void 0),dN([dH({type:dZ})],d8.prototype,"accessLocation",void 0);let d9=B=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,B.prototype)}};d9=B=dN([dG({type:w.Sequence,itemType:d8})],d9);let ea=`${d6}.35`;class eb extends db{}class ec{keyIdentifier;authorityCertIssuer;authorityCertSerialNumber;constructor(a={}){a&&Object.assign(this,a)}}dN([dH({type:eb,context:0,optional:!0,implicit:!0})],ec.prototype,"keyIdentifier",void 0),dN([dH({type:dZ,context:1,optional:!0,implicit:!0,repeated:"sequence"})],ec.prototype,"authorityCertIssuer",void 0),dN([dH({type:x.Integer,context:2,optional:!0,implicit:!0,converter:df})],ec.prototype,"authorityCertSerialNumber",void 0);let ed=`${d6}.19`;class ee{cA=!1;pathLenConstraint;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.Boolean,defaultValue:!1})],ee.prototype,"cA",void 0),dN([dH({type:x.Integer,optional:!0})],ee.prototype,"pathLenConstraint",void 0);let ef=C=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,C.prototype)}};ef=C=dN([dG({type:w.Sequence,itemType:dZ})],ef);let eg=`${d6}.29`,eh=D=class extends ef{constructor(a){super(a),Object.setPrototypeOf(this,D.prototype)}};eh=D=dN([dG({type:w.Sequence})],eh);let ei=`${d6}.32`,ej=class{ia5String;visibleString;bmpString;utf8String;constructor(a={}){Object.assign(this,a)}toString(){return this.ia5String||this.visibleString||this.bmpString||this.utf8String||""}};dN([dH({type:x.IA5String})],ej.prototype,"ia5String",void 0),dN([dH({type:x.VisibleString})],ej.prototype,"visibleString",void 0),dN([dH({type:x.BmpString})],ej.prototype,"bmpString",void 0),dN([dH({type:x.Utf8String})],ej.prototype,"utf8String",void 0),ej=dN([dG({type:w.Choice})],ej);class ek{organization=new ej;noticeNumbers=[];constructor(a={}){Object.assign(this,a)}}dN([dH({type:ej})],ek.prototype,"organization",void 0),dN([dH({type:x.Integer,repeated:"sequence"})],ek.prototype,"noticeNumbers",void 0);class el{noticeRef;explicitText;constructor(a={}){Object.assign(this,a)}}dN([dH({type:ek,optional:!0})],el.prototype,"noticeRef",void 0),dN([dH({type:ej,optional:!0})],el.prototype,"explicitText",void 0);let em=class{cPSuri;userNotice;constructor(a={}){Object.assign(this,a)}};dN([dH({type:x.IA5String})],em.prototype,"cPSuri",void 0),dN([dH({type:el})],em.prototype,"userNotice",void 0),em=dN([dG({type:w.Choice})],em);class en{policyQualifierId="";qualifier=new ArrayBuffer(0);constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.ObjectIdentifier})],en.prototype,"policyQualifierId",void 0),dN([dH({type:x.Any})],en.prototype,"qualifier",void 0);class eo{policyIdentifier="";policyQualifiers;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.ObjectIdentifier})],eo.prototype,"policyIdentifier",void 0),dN([dH({type:en,repeated:"sequence",optional:!0})],eo.prototype,"policyQualifiers",void 0);let ep=E=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,E.prototype)}};ep=E=dN([dG({type:w.Sequence,itemType:eo})],ep);let eq=class{value;constructor(a=0){this.value=a}};dN([dH({type:x.Integer})],eq.prototype,"value",void 0),eq=dN([dG({type:w.Choice})],eq);let er=class extends eq{};er=dN([dG({type:w.Choice})],er);let es=`${d6}.31`;(f=G||(G={}))[f.unused=1]="unused",f[f.keyCompromise=2]="keyCompromise",f[f.cACompromise=4]="cACompromise",f[f.affiliationChanged=8]="affiliationChanged",f[f.superseded=16]="superseded",f[f.cessationOfOperation=32]="cessationOfOperation",f[f.certificateHold=64]="certificateHold",f[f.privilegeWithdrawn=128]="privilegeWithdrawn",f[f.aACompromise=256]="aACompromise";class et extends da{toJSON(){let a=[],b=this.toNumber();return b&G.aACompromise&&a.push("aACompromise"),b&G.affiliationChanged&&a.push("affiliationChanged"),b&G.cACompromise&&a.push("cACompromise"),b&G.certificateHold&&a.push("certificateHold"),b&G.cessationOfOperation&&a.push("cessationOfOperation"),b&G.keyCompromise&&a.push("keyCompromise"),b&G.privilegeWithdrawn&&a.push("privilegeWithdrawn"),b&G.superseded&&a.push("superseded"),b&G.unused&&a.push("unused"),a}toString(){return`[${this.toJSON().join(", ")}]`}}let eu=class{fullName;nameRelativeToCRLIssuer;constructor(a={}){Object.assign(this,a)}};dN([dH({type:dZ,context:0,repeated:"sequence",implicit:!0})],eu.prototype,"fullName",void 0),dN([dH({type:dU,context:1,implicit:!0})],eu.prototype,"nameRelativeToCRLIssuer",void 0),eu=dN([dG({type:w.Choice})],eu);class ev{distributionPoint;reasons;cRLIssuer;constructor(a={}){Object.assign(this,a)}}dN([dH({type:eu,context:0,optional:!0})],ev.prototype,"distributionPoint",void 0),dN([dH({type:et,context:1,optional:!0,implicit:!0})],ev.prototype,"reasons",void 0),dN([dH({type:dZ,context:2,optional:!0,repeated:"sequence",implicit:!0})],ev.prototype,"cRLIssuer",void 0);let ew=F=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,F.prototype)}};ew=F=dN([dG({type:w.Sequence,itemType:ev})],ew);let ex=H=class extends ew{constructor(a){super(a),Object.setPrototypeOf(this,H.prototype)}};ex=H=dN([dG({type:w.Sequence,itemType:ev})],ex);class ey{static ONLY=!1;distributionPoint;onlyContainsUserCerts=ey.ONLY;onlyContainsCACerts=ey.ONLY;onlySomeReasons;indirectCRL=ey.ONLY;onlyContainsAttributeCerts=ey.ONLY;constructor(a={}){Object.assign(this,a)}}dN([dH({type:eu,context:0,optional:!0})],ey.prototype,"distributionPoint",void 0),dN([dH({type:x.Boolean,context:1,defaultValue:ey.ONLY,implicit:!0})],ey.prototype,"onlyContainsUserCerts",void 0),dN([dH({type:x.Boolean,context:2,defaultValue:ey.ONLY,implicit:!0})],ey.prototype,"onlyContainsCACerts",void 0),dN([dH({type:et,context:3,optional:!0,implicit:!0})],ey.prototype,"onlySomeReasons",void 0),dN([dH({type:x.Boolean,context:4,defaultValue:ey.ONLY,implicit:!0})],ey.prototype,"indirectCRL",void 0),dN([dH({type:x.Boolean,context:5,defaultValue:ey.ONLY,implicit:!0})],ey.prototype,"onlyContainsAttributeCerts",void 0);let ez=`${d6}.21`;(g=I||(I={}))[g.unspecified=0]="unspecified",g[g.keyCompromise=1]="keyCompromise",g[g.cACompromise=2]="cACompromise",g[g.affiliationChanged=3]="affiliationChanged",g[g.superseded=4]="superseded",g[g.cessationOfOperation=5]="cessationOfOperation",g[g.certificateHold=6]="certificateHold",g[g.removeFromCRL=8]="removeFromCRL",g[g.privilegeWithdrawn=9]="privilegeWithdrawn",g[g.aACompromise=10]="aACompromise";let eA=class{reason=I.unspecified;constructor(a=I.unspecified){this.reason=a}toJSON(){return I[this.reason]}toString(){return this.toJSON()}};dN([dH({type:x.Enumerated})],eA.prototype,"reason",void 0),eA=dN([dG({type:w.Choice})],eA);let eB=`${d6}.37`,eC=J=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,J.prototype)}};eC=J=dN([dG({type:w.Sequence,itemType:x.ObjectIdentifier})],eC);let eD=`${d0}.1`,eE=`${d0}.2`,eF=`${d0}.3`,eG=`${d0}.4`,eH=`${d0}.8`,eI=`${d0}.9`,eJ=class{value;constructor(a=new ArrayBuffer(0)){this.value=a}};dN([dH({type:x.Integer,converter:df})],eJ.prototype,"value",void 0),eJ=dN([dG({type:w.Choice})],eJ);let eK=`${d6}.24`,eL=class{value=new Date;constructor(a){a&&(this.value=a)}};dN([dH({type:x.GeneralizedTime})],eL.prototype,"value",void 0),eL=dN([dG({type:w.Choice})],eL);let eM=`${d6}.18`,eN=K=class extends ef{constructor(a){super(a),Object.setPrototypeOf(this,K.prototype)}};eN=K=dN([dG({type:w.Sequence})],eN);let eO=`${d6}.15`;(h=L||(L={}))[h.digitalSignature=1]="digitalSignature",h[h.nonRepudiation=2]="nonRepudiation",h[h.keyEncipherment=4]="keyEncipherment",h[h.dataEncipherment=8]="dataEncipherment",h[h.keyAgreement=16]="keyAgreement",h[h.keyCertSign=32]="keyCertSign",h[h.cRLSign=64]="cRLSign",h[h.encipherOnly=128]="encipherOnly",h[h.decipherOnly=256]="decipherOnly";class eP extends da{toJSON(){let a=this.toNumber(),b=[];return a&L.cRLSign&&b.push("crlSign"),a&L.dataEncipherment&&b.push("dataEncipherment"),a&L.decipherOnly&&b.push("decipherOnly"),a&L.digitalSignature&&b.push("digitalSignature"),a&L.encipherOnly&&b.push("encipherOnly"),a&L.keyAgreement&&b.push("keyAgreement"),a&L.keyCertSign&&b.push("keyCertSign"),a&L.keyEncipherment&&b.push("keyEncipherment"),a&L.nonRepudiation&&b.push("nonRepudiation"),b}toString(){return`[${this.toJSON().join(", ")}]`}}class eQ{base=new dZ;minimum=0;maximum;constructor(a={}){Object.assign(this,a)}}dN([dH({type:dZ})],eQ.prototype,"base",void 0),dN([dH({type:x.Integer,context:0,defaultValue:0,implicit:!0})],eQ.prototype,"minimum",void 0),dN([dH({type:x.Integer,context:1,optional:!0,implicit:!0})],eQ.prototype,"maximum",void 0);let eR=M=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,M.prototype)}};eR=M=dN([dG({type:w.Sequence,itemType:eQ})],eR);class eS{permittedSubtrees;excludedSubtrees;constructor(a={}){Object.assign(this,a)}}dN([dH({type:eR,context:0,optional:!0,implicit:!0})],eS.prototype,"permittedSubtrees",void 0),dN([dH({type:eR,context:1,optional:!0,implicit:!0})],eS.prototype,"excludedSubtrees",void 0);class eT{requireExplicitPolicy;inhibitPolicyMapping;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.Integer,context:0,implicit:!0,optional:!0,converter:df})],eT.prototype,"requireExplicitPolicy",void 0),dN([dH({type:x.Integer,context:1,implicit:!0,optional:!0,converter:df})],eT.prototype,"inhibitPolicyMapping",void 0);class eU{issuerDomainPolicy="";subjectDomainPolicy="";constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.ObjectIdentifier})],eU.prototype,"issuerDomainPolicy",void 0),dN([dH({type:x.ObjectIdentifier})],eU.prototype,"subjectDomainPolicy",void 0);let eV=N=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,N.prototype)}};eV=N=dN([dG({type:w.Sequence,itemType:eU})],eV);let eW=`${d6}.17`,eX=O=class extends ef{constructor(a){super(a),Object.setPrototypeOf(this,O.prototype)}};eX=O=dN([dG({type:w.Sequence})],eX);class eY{type="";values=[];constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.ObjectIdentifier})],eY.prototype,"type",void 0),dN([dH({type:x.Any,repeated:"set"})],eY.prototype,"values",void 0);let eZ=P=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,P.prototype)}};eZ=P=dN([dG({type:w.Sequence,itemType:eY})],eZ);let e$=`${d6}.14`;class e_ extends eb{}class e0{notBefore;notAfter;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.GeneralizedTime,context:0,implicit:!0,optional:!0})],e0.prototype,"notBefore",void 0),dN([dH({type:x.GeneralizedTime,context:1,implicit:!0,optional:!0})],e0.prototype,"notAfter",void 0),(i=Q||(Q={}))[i.keyUpdateAllowed=1]="keyUpdateAllowed",i[i.newExtensions=2]="newExtensions",i[i.pKIXCertificate=4]="pKIXCertificate";class e1 extends da{toJSON(){let a=[],b=this.toNumber();return b&Q.pKIXCertificate&&a.push("pKIXCertificate"),b&Q.newExtensions&&a.push("newExtensions"),b&Q.keyUpdateAllowed&&a.push("keyUpdateAllowed"),a}toString(){return`[${this.toJSON().join(", ")}]`}}class e2{entrustVers="";entrustInfoFlags=new e1;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.GeneralString})],e2.prototype,"entrustVers",void 0),dN([dH({type:e1})],e2.prototype,"entrustInfoFlags",void 0);let e3=R=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,R.prototype)}};e3=R=dN([dG({type:w.Sequence,itemType:d8})],e3);class e4{algorithm="";parameters;constructor(a={}){Object.assign(this,a)}isEqual(a){return a instanceof e4&&a.algorithm==this.algorithm&&(a.parameters&&this.parameters&&function(a,b,c={}){let d=cH(a),e=cH(b);if(!c.constantTime&&d.byteLength!==e.byteLength)return!1;let f=Math.max(d.byteLength,e.byteLength),g=d.byteLength^e.byteLength;for(let a=0;a<f;a++)g|=(d[a]??0)^(e[a]??0);return 0===g}(a.parameters,this.parameters)||a.parameters===this.parameters)}}dN([dH({type:x.ObjectIdentifier})],e4.prototype,"algorithm",void 0),dN([dH({type:x.Any,optional:!0})],e4.prototype,"parameters",void 0);class e5{algorithm=new e4;subjectPublicKey=new ArrayBuffer(0);constructor(a={}){Object.assign(this,a)}}dN([dH({type:e4})],e5.prototype,"algorithm",void 0),dN([dH({type:x.BitString})],e5.prototype,"subjectPublicKey",void 0);let e6=class{utcTime;generalTime;constructor(a){if(a)if("string"==typeof a||"number"==typeof a||a instanceof Date){let b=new Date(a);b.setMilliseconds(0),b.getUTCFullYear()>2049?this.generalTime=b:this.utcTime=b}else Object.assign(this,a)}getTime(){let a=this.utcTime||this.generalTime;if(!a)throw Error("Cannot get time from CHOICE object");return a}};dN([dH({type:x.UTCTime})],e6.prototype,"utcTime",void 0),dN([dH({type:x.GeneralizedTime})],e6.prototype,"generalTime",void 0),e6=dN([dG({type:w.Choice})],e6);class e7{notBefore=new e6(new Date);notAfter=new e6(new Date);constructor(a){a&&(this.notBefore=new e6(a.notBefore),this.notAfter=new e6(a.notAfter))}}dN([dH({type:e6})],e7.prototype,"notBefore",void 0),dN([dH({type:e6})],e7.prototype,"notAfter",void 0);class e8{static CRITICAL=!1;extnID="";critical=e8.CRITICAL;extnValue=new db;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.ObjectIdentifier})],e8.prototype,"extnID",void 0),dN([dH({type:x.Boolean,defaultValue:e8.CRITICAL})],e8.prototype,"critical",void 0),dN([dH({type:db})],e8.prototype,"extnValue",void 0);let e9=S=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,S.prototype)}};e9=S=dN([dG({type:w.Sequence,itemType:e8})],e9),(j=T||(T={}))[j.v1=0]="v1",j[j.v2=1]="v2",j[j.v3=2]="v3";class fa{version=T.v1;serialNumber=new ArrayBuffer(0);signature=new e4;issuer=new dW;validity=new e7;subject=new dW;subjectPublicKeyInfo=new e5;issuerUniqueID;subjectUniqueID;extensions;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.Integer,context:0,defaultValue:T.v1})],fa.prototype,"version",void 0),dN([dH({type:x.Integer,converter:df})],fa.prototype,"serialNumber",void 0),dN([dH({type:e4})],fa.prototype,"signature",void 0),dN([dH({type:dW})],fa.prototype,"issuer",void 0),dN([dH({type:e7})],fa.prototype,"validity",void 0),dN([dH({type:dW})],fa.prototype,"subject",void 0),dN([dH({type:e5})],fa.prototype,"subjectPublicKeyInfo",void 0),dN([dH({type:x.BitString,context:1,implicit:!0,optional:!0})],fa.prototype,"issuerUniqueID",void 0),dN([dH({type:x.BitString,context:2,implicit:!0,optional:!0})],fa.prototype,"subjectUniqueID",void 0),dN([dH({type:e9,context:3,optional:!0})],fa.prototype,"extensions",void 0);class fb{tbsCertificate=new fa;tbsCertificateRaw;signatureAlgorithm=new e4;signatureValue=new ArrayBuffer(0);constructor(a={}){Object.assign(this,a)}}dN([dH({type:fa,raw:!0})],fb.prototype,"tbsCertificate",void 0),dN([dH({type:e4})],fb.prototype,"signatureAlgorithm",void 0),dN([dH({type:x.BitString})],fb.prototype,"signatureValue",void 0);class fc{userCertificate=new ArrayBuffer(0);revocationDate=new e6;crlEntryExtensions;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.Integer,converter:df})],fc.prototype,"userCertificate",void 0),dN([dH({type:e6})],fc.prototype,"revocationDate",void 0),dN([dH({type:e8,optional:!0,repeated:"sequence"})],fc.prototype,"crlEntryExtensions",void 0);class fd{version;signature=new e4;issuer=new dW;thisUpdate=new e6;nextUpdate;revokedCertificates;crlExtensions;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.Integer,optional:!0})],fd.prototype,"version",void 0),dN([dH({type:e4})],fd.prototype,"signature",void 0),dN([dH({type:dW})],fd.prototype,"issuer",void 0),dN([dH({type:e6})],fd.prototype,"thisUpdate",void 0),dN([dH({type:e6,optional:!0})],fd.prototype,"nextUpdate",void 0),dN([dH({type:fc,repeated:"sequence",optional:!0})],fd.prototype,"revokedCertificates",void 0),dN([dH({type:e8,optional:!0,context:0,repeated:"sequence"})],fd.prototype,"crlExtensions",void 0);class fe{tbsCertList=new fd;tbsCertListRaw;signatureAlgorithm=new e4;signature=new ArrayBuffer(0);constructor(a={}){Object.assign(this,a)}}dN([dH({type:fd,raw:!0})],fe.prototype,"tbsCertList",void 0),dN([dH({type:e4})],fe.prototype,"signatureAlgorithm",void 0),dN([dH({type:x.BitString})],fe.prototype,"signature",void 0);class ff{issuer=new dW;serialNumber=new ArrayBuffer(0);constructor(a={}){Object.assign(this,a)}}dN([dH({type:dW})],ff.prototype,"issuer",void 0),dN([dH({type:x.Integer,converter:df})],ff.prototype,"serialNumber",void 0);let fg=class{subjectKeyIdentifier;issuerAndSerialNumber;constructor(a={}){Object.assign(this,a)}};dN([dH({type:e_,context:0,implicit:!0})],fg.prototype,"subjectKeyIdentifier",void 0),dN([dH({type:ff})],fg.prototype,"issuerAndSerialNumber",void 0),fg=dN([dG({type:w.Choice})],fg),(k=U||(U={}))[k.v0=0]="v0",k[k.v1=1]="v1",k[k.v2=2]="v2",k[k.v3=3]="v3",k[k.v4=4]="v4",k[k.v5=5]="v5";let fh=class extends e4{};fh=dN([dG({type:w.Sequence})],fh);let fi=class extends e4{};fi=dN([dG({type:w.Sequence})],fi);let fj=class extends e4{};fj=dN([dG({type:w.Sequence})],fj);let fk=class extends e4{};fk=dN([dG({type:w.Sequence})],fk);let fl=class extends e4{};fl=dN([dG({type:w.Sequence})],fl);let fm=class extends e4{};fm=dN([dG({type:w.Sequence})],fm);class fn{attrType="";attrValues=[];constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.ObjectIdentifier})],fn.prototype,"attrType",void 0),dN([dH({type:x.Any,repeated:"set"})],fn.prototype,"attrValues",void 0);class fo{version=U.v0;sid=new fg;digestAlgorithm=new fh;signedAttrs;signedAttrsRaw;signatureAlgorithm=new fi;signature=new db;unsignedAttrs;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.Integer})],fo.prototype,"version",void 0),dN([dH({type:fg})],fo.prototype,"sid",void 0),dN([dH({type:fh})],fo.prototype,"digestAlgorithm",void 0),dN([dH({type:fn,repeated:"set",context:0,implicit:!0,optional:!0,raw:!0})],fo.prototype,"signedAttrs",void 0),dN([dH({type:fi})],fo.prototype,"signatureAlgorithm",void 0),dN([dH({type:db})],fo.prototype,"signature",void 0),dN([dH({type:fn,repeated:"set",context:1,implicit:!0,optional:!0})],fo.prototype,"unsignedAttrs",void 0);let fp=V=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,V.prototype)}};fp=V=dN([dG({type:w.Set,itemType:fo})],fp);let fq=class extends fo{};fq=dN([dG({type:w.Sequence})],fq);let fr=class extends e6{};fr=dN([dG({type:w.Choice})],fr);class fs{acIssuer=new dZ;acSerial=0;attrs=[];constructor(a={}){Object.assign(this,a)}}dN([dH({type:dZ})],fs.prototype,"acIssuer",void 0),dN([dH({type:x.Integer})],fs.prototype,"acSerial",void 0),dN([dH({type:eY,repeated:"sequence"})],fs.prototype,"attrs",void 0);let ft=W=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,W.prototype)}};ft=W=dN([dG({type:w.Sequence,itemType:x.ObjectIdentifier})],ft);class fu{pathLenConstraint;permittedAttrs;excludedAttrs;permitUnSpecified=!0;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.Integer,optional:!0})],fu.prototype,"pathLenConstraint",void 0),dN([dH({type:ft,implicit:!0,context:0,optional:!0})],fu.prototype,"permittedAttrs",void 0),dN([dH({type:ft,implicit:!0,context:1,optional:!0})],fu.prototype,"excludedAttrs",void 0),dN([dH({type:x.Boolean,defaultValue:!0})],fu.prototype,"permitUnSpecified",void 0);class fv{issuer=new ef;serial=new ArrayBuffer(0);issuerUID=new ArrayBuffer(0);constructor(a={}){Object.assign(this,a)}}dN([dH({type:ef})],fv.prototype,"issuer",void 0),dN([dH({type:x.Integer,converter:df})],fv.prototype,"serial",void 0),dN([dH({type:x.BitString,optional:!0})],fv.prototype,"issuerUID",void 0),(l=X||(X={}))[l.publicKey=0]="publicKey",l[l.publicKeyCert=1]="publicKeyCert",l[l.otherObjectTypes=2]="otherObjectTypes";class fw{digestedObjectType=X.publicKey;otherObjectTypeID;digestAlgorithm=new e4;objectDigest=new ArrayBuffer(0);constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.Enumerated})],fw.prototype,"digestedObjectType",void 0),dN([dH({type:x.ObjectIdentifier,optional:!0})],fw.prototype,"otherObjectTypeID",void 0),dN([dH({type:e4})],fw.prototype,"digestAlgorithm",void 0),dN([dH({type:x.BitString})],fw.prototype,"objectDigest",void 0);class fx{issuerName;baseCertificateID;objectDigestInfo;constructor(a={}){Object.assign(this,a)}}dN([dH({type:ef,optional:!0})],fx.prototype,"issuerName",void 0),dN([dH({type:fv,context:0,implicit:!0,optional:!0})],fx.prototype,"baseCertificateID",void 0),dN([dH({type:fw,context:1,implicit:!0,optional:!0})],fx.prototype,"objectDigestInfo",void 0);let fy=class{v1Form;v2Form;constructor(a={}){Object.assign(this,a)}};dN([dH({type:dZ,repeated:"sequence"})],fy.prototype,"v1Form",void 0),dN([dH({type:fx,context:0,implicit:!0})],fy.prototype,"v2Form",void 0),fy=dN([dG({type:w.Choice})],fy);class fz{notBeforeTime=new Date;notAfterTime=new Date;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.GeneralizedTime})],fz.prototype,"notBeforeTime",void 0),dN([dH({type:x.GeneralizedTime})],fz.prototype,"notAfterTime",void 0);class fA{baseCertificateID;entityName;objectDigestInfo;constructor(a={}){Object.assign(this,a)}}dN([dH({type:fv,implicit:!0,context:0,optional:!0})],fA.prototype,"baseCertificateID",void 0),dN([dH({type:ef,implicit:!0,context:1,optional:!0})],fA.prototype,"entityName",void 0),dN([dH({type:fw,implicit:!0,context:2,optional:!0})],fA.prototype,"objectDigestInfo",void 0),(m=Y||(Y={}))[m.v2=1]="v2";class fB{version=Y.v2;holder=new fA;issuer=new fy;signature=new e4;serialNumber=new ArrayBuffer(0);attrCertValidityPeriod=new fz;attributes=[];issuerUniqueID;extensions;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.Integer})],fB.prototype,"version",void 0),dN([dH({type:fA})],fB.prototype,"holder",void 0),dN([dH({type:fy})],fB.prototype,"issuer",void 0),dN([dH({type:e4})],fB.prototype,"signature",void 0),dN([dH({type:x.Integer,converter:df})],fB.prototype,"serialNumber",void 0),dN([dH({type:fz})],fB.prototype,"attrCertValidityPeriod",void 0),dN([dH({type:eY,repeated:"sequence"})],fB.prototype,"attributes",void 0),dN([dH({type:x.BitString,optional:!0})],fB.prototype,"issuerUniqueID",void 0),dN([dH({type:e9,optional:!0})],fB.prototype,"extensions",void 0);class fC{acinfo=new fB;signatureAlgorithm=new e4;signatureValue=new ArrayBuffer(0);constructor(a={}){Object.assign(this,a)}}dN([dH({type:fB})],fC.prototype,"acinfo",void 0),dN([dH({type:e4})],fC.prototype,"signatureAlgorithm",void 0),dN([dH({type:x.BitString})],fC.prototype,"signatureValue",void 0),(n=Z||(Z={}))[n.unmarked=1]="unmarked",n[n.unclassified=2]="unclassified",n[n.restricted=4]="restricted",n[n.confidential=8]="confidential",n[n.secret=16]="secret",n[n.topSecret=32]="topSecret";class fD extends da{}class fE{type="";value=new ArrayBuffer(0);constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.ObjectIdentifier,implicit:!0,context:0})],fE.prototype,"type",void 0),dN([dH({type:x.Any,implicit:!0,context:1})],fE.prototype,"value",void 0);class fF{policyId="";classList=new fD(Z.unclassified);securityCategories;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.ObjectIdentifier})],fF.prototype,"policyId",void 0),dN([dH({type:fD,defaultValue:new fD(Z.unclassified)})],fF.prototype,"classList",void 0),dN([dH({type:fE,repeated:"set"})],fF.prototype,"securityCategories",void 0);class fG{cotets;oid;string;constructor(a={}){Object.assign(this,a)}}dN([dH({type:db})],fG.prototype,"cotets",void 0),dN([dH({type:x.ObjectIdentifier})],fG.prototype,"oid",void 0),dN([dH({type:x.Utf8String})],fG.prototype,"string",void 0);class fH{policyAuthority;values=[];constructor(a={}){Object.assign(this,a)}}dN([dH({type:ef,implicit:!0,context:0,optional:!0})],fH.prototype,"policyAuthority",void 0),dN([dH({type:fG,repeated:"sequence"})],fH.prototype,"values",void 0);class fI{targetCertificate=new fv;targetName;certDigestInfo;constructor(a={}){Object.assign(this,a)}}dN([dH({type:fv})],fI.prototype,"targetCertificate",void 0),dN([dH({type:dZ,optional:!0})],fI.prototype,"targetName",void 0),dN([dH({type:fw,optional:!0})],fI.prototype,"certDigestInfo",void 0);let fJ=class{targetName;targetGroup;targetCert;constructor(a={}){Object.assign(this,a)}};dN([dH({type:dZ,context:0,implicit:!0})],fJ.prototype,"targetName",void 0),dN([dH({type:dZ,context:1,implicit:!0})],fJ.prototype,"targetGroup",void 0),dN([dH({type:fI,context:2,implicit:!0})],fJ.prototype,"targetCert",void 0),fJ=dN([dG({type:w.Choice})],fJ);let fK=$=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,$.prototype)}};fK=$=dN([dG({type:w.Sequence,itemType:fJ})],fK);let fL=_=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,_.prototype)}};fL=_=dN([dG({type:w.Sequence,itemType:fK})],fL);class fM{roleAuthority;roleName;constructor(a={}){Object.assign(this,a)}}dN([dH({type:ef,implicit:!0,context:0,optional:!0})],fM.prototype,"roleAuthority",void 0),dN([dH({type:dZ,implicit:!0,context:1})],fM.prototype,"roleName",void 0);class fN{service=new dZ;ident=new dZ;authInfo;constructor(a={}){Object.assign(this,a)}}dN([dH({type:dZ})],fN.prototype,"service",void 0),dN([dH({type:dZ})],fN.prototype,"ident",void 0),dN([dH({type:db,optional:!0})],fN.prototype,"authInfo",void 0);class fO{otherCertFormat="";otherCert=new ArrayBuffer(0);constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.ObjectIdentifier})],fO.prototype,"otherCertFormat",void 0),dN([dH({type:x.Any})],fO.prototype,"otherCert",void 0);let fP=class{certificate;v2AttrCert;other;constructor(a={}){Object.assign(this,a)}};dN([dH({type:fb})],fP.prototype,"certificate",void 0),dN([dH({type:fC,context:2,implicit:!0})],fP.prototype,"v2AttrCert",void 0),dN([dH({type:fO,context:3,implicit:!0})],fP.prototype,"other",void 0),fP=dN([dG({type:w.Choice})],fP);let fQ=aa=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,aa.prototype)}};fQ=aa=dN([dG({type:w.Set,itemType:fP})],fQ);class fR{contentType="";content=new ArrayBuffer(0);constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.ObjectIdentifier})],fR.prototype,"contentType",void 0),dN([dH({type:x.Any,context:0})],fR.prototype,"content",void 0);let fS=class{single;any;constructor(a={}){Object.assign(this,a)}};dN([dH({type:db})],fS.prototype,"single",void 0),dN([dH({type:x.Any})],fS.prototype,"any",void 0),fS=dN([dG({type:w.Choice})],fS);class fT{eContentType="";eContent;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.ObjectIdentifier})],fT.prototype,"eContentType",void 0),dN([dH({type:fS,context:0,optional:!0})],fT.prototype,"eContent",void 0);let fU=class{value;constructedValue;constructor(a={}){Object.assign(this,a)}};dN([dH({type:db,context:0,implicit:!0,optional:!0})],fU.prototype,"value",void 0),dN([dH({type:db,converter:{fromASN:a=>new db(a.getValue()),toASN:a=>a.toASN()},context:0,implicit:!0,optional:!0,repeated:"sequence"})],fU.prototype,"constructedValue",void 0),fU=dN([dG({type:w.Choice})],fU);class fV{contentType="";contentEncryptionAlgorithm=new fk;encryptedContent;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.ObjectIdentifier})],fV.prototype,"contentType",void 0),dN([dH({type:fk})],fV.prototype,"contentEncryptionAlgorithm",void 0),dN([dH({type:fU,optional:!0})],fV.prototype,"encryptedContent",void 0);class fW{keyAttrId="";keyAttr;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.ObjectIdentifier})],fW.prototype,"keyAttrId",void 0),dN([dH({type:x.Any,optional:!0})],fW.prototype,"keyAttr",void 0);class fX{subjectKeyIdentifier=new e_;date;other;constructor(a={}){Object.assign(this,a)}}dN([dH({type:e_})],fX.prototype,"subjectKeyIdentifier",void 0),dN([dH({type:x.GeneralizedTime,optional:!0})],fX.prototype,"date",void 0),dN([dH({type:fW,optional:!0})],fX.prototype,"other",void 0);let fY=class{rKeyId;issuerAndSerialNumber;constructor(a={}){Object.assign(this,a)}};dN([dH({type:fX,context:0,implicit:!0,optional:!0})],fY.prototype,"rKeyId",void 0),dN([dH({type:ff,optional:!0})],fY.prototype,"issuerAndSerialNumber",void 0),fY=dN([dG({type:w.Choice})],fY);class fZ{rid=new fY;encryptedKey=new db;constructor(a={}){Object.assign(this,a)}}dN([dH({type:fY})],fZ.prototype,"rid",void 0),dN([dH({type:db})],fZ.prototype,"encryptedKey",void 0);let f$=ab=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,ab.prototype)}};f$=ab=dN([dG({type:w.Sequence,itemType:fZ})],f$);class f_{algorithm=new e4;publicKey=new ArrayBuffer(0);constructor(a={}){Object.assign(this,a)}}dN([dH({type:e4})],f_.prototype,"algorithm",void 0),dN([dH({type:x.BitString})],f_.prototype,"publicKey",void 0);let f0=class{subjectKeyIdentifier;originatorKey;issuerAndSerialNumber;constructor(a={}){Object.assign(this,a)}};dN([dH({type:e_,context:0,implicit:!0,optional:!0})],f0.prototype,"subjectKeyIdentifier",void 0),dN([dH({type:f_,context:1,implicit:!0,optional:!0})],f0.prototype,"originatorKey",void 0),dN([dH({type:ff,optional:!0})],f0.prototype,"issuerAndSerialNumber",void 0),f0=dN([dG({type:w.Choice})],f0);class f1{version=U.v3;originator=new f0;ukm;keyEncryptionAlgorithm=new fj;recipientEncryptedKeys=new f$;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.Integer})],f1.prototype,"version",void 0),dN([dH({type:f0,context:0})],f1.prototype,"originator",void 0),dN([dH({type:db,context:1,optional:!0})],f1.prototype,"ukm",void 0),dN([dH({type:fj})],f1.prototype,"keyEncryptionAlgorithm",void 0),dN([dH({type:f$})],f1.prototype,"recipientEncryptedKeys",void 0);let f2=class{subjectKeyIdentifier;issuerAndSerialNumber;constructor(a={}){Object.assign(this,a)}};dN([dH({type:e_,context:0,implicit:!0})],f2.prototype,"subjectKeyIdentifier",void 0),dN([dH({type:ff})],f2.prototype,"issuerAndSerialNumber",void 0),f2=dN([dG({type:w.Choice})],f2);class f3{version=U.v0;rid=new f2;keyEncryptionAlgorithm=new fj;encryptedKey=new db;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.Integer})],f3.prototype,"version",void 0),dN([dH({type:f2})],f3.prototype,"rid",void 0),dN([dH({type:fj})],f3.prototype,"keyEncryptionAlgorithm",void 0),dN([dH({type:db})],f3.prototype,"encryptedKey",void 0);class f4{keyIdentifier=new db;date;other;constructor(a={}){Object.assign(this,a)}}dN([dH({type:db})],f4.prototype,"keyIdentifier",void 0),dN([dH({type:x.GeneralizedTime,optional:!0})],f4.prototype,"date",void 0),dN([dH({type:fW,optional:!0})],f4.prototype,"other",void 0);class f5{version=U.v4;kekid=new f4;keyEncryptionAlgorithm=new fj;encryptedKey=new db;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.Integer})],f5.prototype,"version",void 0),dN([dH({type:f4})],f5.prototype,"kekid",void 0),dN([dH({type:fj})],f5.prototype,"keyEncryptionAlgorithm",void 0),dN([dH({type:db})],f5.prototype,"encryptedKey",void 0);class f6{version=U.v0;keyDerivationAlgorithm;keyEncryptionAlgorithm=new fj;encryptedKey=new db;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.Integer})],f6.prototype,"version",void 0),dN([dH({type:fm,context:0,optional:!0})],f6.prototype,"keyDerivationAlgorithm",void 0),dN([dH({type:fj})],f6.prototype,"keyEncryptionAlgorithm",void 0),dN([dH({type:db})],f6.prototype,"encryptedKey",void 0);class f7{oriType="";oriValue=new ArrayBuffer(0);constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.ObjectIdentifier})],f7.prototype,"oriType",void 0),dN([dH({type:x.Any})],f7.prototype,"oriValue",void 0);let f8=class{ktri;kari;kekri;pwri;ori;constructor(a={}){Object.assign(this,a)}};dN([dH({type:f3,optional:!0})],f8.prototype,"ktri",void 0),dN([dH({type:f1,context:1,implicit:!0,optional:!0})],f8.prototype,"kari",void 0),dN([dH({type:f5,context:2,implicit:!0,optional:!0})],f8.prototype,"kekri",void 0),dN([dH({type:f6,context:3,implicit:!0,optional:!0})],f8.prototype,"pwri",void 0),dN([dH({type:f7,context:4,implicit:!0,optional:!0})],f8.prototype,"ori",void 0),f8=dN([dG({type:w.Choice})],f8);let f9=ac=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,ac.prototype)}};f9=ac=dN([dG({type:w.Set,itemType:f8})],f9);class ga{otherRevInfoFormat="";otherRevInfo=new ArrayBuffer(0);constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.ObjectIdentifier})],ga.prototype,"otherRevInfoFormat",void 0),dN([dH({type:x.Any})],ga.prototype,"otherRevInfo",void 0);let gb=class{other=new ga;constructor(a={}){Object.assign(this,a)}};dN([dH({type:ga,context:1,implicit:!0})],gb.prototype,"other",void 0),gb=dN([dG({type:w.Choice})],gb);let gc=ad=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,ad.prototype)}};gc=ad=dN([dG({type:w.Set,itemType:gb})],gc);class gd{certs;crls;constructor(a={}){Object.assign(this,a)}}dN([dH({type:fQ,context:0,implicit:!0,optional:!0})],gd.prototype,"certs",void 0),dN([dH({type:gc,context:1,implicit:!0,optional:!0})],gd.prototype,"crls",void 0);let ge=ae=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,ae.prototype)}};ge=ae=dN([dG({type:w.Set,itemType:fn})],ge);class gf{version=U.v0;originatorInfo;recipientInfos=new f9;encryptedContentInfo=new fV;unprotectedAttrs;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.Integer})],gf.prototype,"version",void 0),dN([dH({type:gd,context:0,implicit:!0,optional:!0})],gf.prototype,"originatorInfo",void 0),dN([dH({type:f9})],gf.prototype,"recipientInfos",void 0),dN([dH({type:fV})],gf.prototype,"encryptedContentInfo",void 0),dN([dH({type:ge,context:1,implicit:!0,optional:!0})],gf.prototype,"unprotectedAttrs",void 0);let gg="1.2.840.113549.1.7.2",gh=af=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,af.prototype)}};gh=af=dN([dG({type:w.Set,itemType:fh})],gh);class gi{version=U.v0;digestAlgorithms=new gh;encapContentInfo=new fT;certificates;crls;signerInfos=new fp;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.Integer})],gi.prototype,"version",void 0),dN([dH({type:gh})],gi.prototype,"digestAlgorithms",void 0),dN([dH({type:fT})],gi.prototype,"encapContentInfo",void 0),dN([dH({type:fQ,context:0,implicit:!0,optional:!0})],gi.prototype,"certificates",void 0),dN([dH({type:gc,context:1,implicit:!0,optional:!0})],gi.prototype,"crls",void 0),dN([dH({type:fp})],gi.prototype,"signerInfos",void 0);let gj="1.2.840.10045.2.1",gk="1.2.840.10045.4.1",gl="1.2.840.10045.4.3.1",gm="1.2.840.10045.4.3.2",gn="1.2.840.10045.4.3.3",go="1.2.840.10045.4.3.4",gp="1.2.840.10045.3.1.7",gq="1.3.132.0.34",gr="1.3.132.0.35";function gs(a){return new e4({algorithm:a})}let gt=gs(gk);gs(gl);let gu=gs(gm),gv=gs(gn),gw=gs(go),gx=class{fieldType;parameters;constructor(a={}){Object.assign(this,a)}};dN([dH({type:x.ObjectIdentifier})],gx.prototype,"fieldType",void 0),dN([dH({type:x.Any})],gx.prototype,"parameters",void 0),gx=dN([dG({type:w.Sequence})],gx);class gy extends db{}let gz=class{a;b;seed;constructor(a={}){Object.assign(this,a)}};dN([dH({type:x.OctetString})],gz.prototype,"a",void 0),dN([dH({type:x.OctetString})],gz.prototype,"b",void 0),dN([dH({type:x.BitString,optional:!0})],gz.prototype,"seed",void 0),gz=dN([dG({type:w.Sequence})],gz),(o=ag||(ag={}))[o.ecpVer1=1]="ecpVer1";let gA=class{version=ag.ecpVer1;fieldID;curve;base;order;cofactor;constructor(a={}){Object.assign(this,a)}};dN([dH({type:x.Integer})],gA.prototype,"version",void 0),dN([dH({type:gx})],gA.prototype,"fieldID",void 0),dN([dH({type:gz})],gA.prototype,"curve",void 0),dN([dH({type:gy})],gA.prototype,"base",void 0),dN([dH({type:x.Integer,converter:df})],gA.prototype,"order",void 0),dN([dH({type:x.Integer,optional:!0})],gA.prototype,"cofactor",void 0),gA=dN([dG({type:w.Sequence})],gA);let gB=class{namedCurve;implicitCurve;specifiedCurve;constructor(a={}){Object.assign(this,a)}};dN([dH({type:x.ObjectIdentifier})],gB.prototype,"namedCurve",void 0),dN([dH({type:x.Null})],gB.prototype,"implicitCurve",void 0),dN([dH({type:gA})],gB.prototype,"specifiedCurve",void 0),gB=dN([dG({type:w.Choice})],gB);class gC{version=1;privateKey=new db;parameters;publicKey;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.Integer})],gC.prototype,"version",void 0),dN([dH({type:db})],gC.prototype,"privateKey",void 0),dN([dH({type:gB,context:0,optional:!0})],gC.prototype,"parameters",void 0),dN([dH({type:x.BitString,context:1,optional:!0})],gC.prototype,"publicKey",void 0);class gD{r=new ArrayBuffer(0);s=new ArrayBuffer(0);constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.Integer,converter:df})],gD.prototype,"r",void 0),dN([dH({type:x.Integer,converter:df})],gD.prototype,"s",void 0);let gE="1.2.840.113549.1.1",gF=`${gE}.1`,gG=`${gE}.7`,gH=`${gE}.9`,gI=`${gE}.10`,gJ=`${gE}.2`,gK=`${gE}.4`,gL=`${gE}.5`,gM=`${gE}.14`,gN=`${gE}.11`,gO=`${gE}.12`,gP=`${gE}.13`,gQ=`${gE}.15`,gR=`${gE}.16`,gS="1.3.14.3.2.26",gT="2.16.840.1.101.3.4.2.4",gU="2.16.840.1.101.3.4.2.1",gV="2.16.840.1.101.3.4.2.2",gW="2.16.840.1.101.3.4.2.3",gX=`${gE}.8`;function gY(a){return new e4({algorithm:a,parameters:null})}gY("1.2.840.113549.2.2"),gY("1.2.840.113549.2.5");let gZ=gY(gS);gY(gT),gY(gU),gY(gV),gY(gW),gY("2.16.840.1.101.3.4.2.5"),gY("2.16.840.1.101.3.4.2.6");let g$=new e4({algorithm:gX,parameters:dM.serialize(gZ)}),g_=new e4({algorithm:gH,parameters:dM.serialize(dk.toASN(new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]).buffer))});gY(gF),gY(gJ),gY(gK),gY(gL),gY(gQ),gY(gR),gY(gO),gY(gP),gY(gQ),gY(gR);class g0{hashAlgorithm=new e4(gZ);maskGenAlgorithm=new e4({algorithm:gX,parameters:dM.serialize(gZ)});pSourceAlgorithm=new e4(g_);constructor(a={}){Object.assign(this,a)}}dN([dH({type:e4,context:0,defaultValue:gZ})],g0.prototype,"hashAlgorithm",void 0),dN([dH({type:e4,context:1,defaultValue:g$})],g0.prototype,"maskGenAlgorithm",void 0),dN([dH({type:e4,context:2,defaultValue:g_})],g0.prototype,"pSourceAlgorithm",void 0),new e4({algorithm:gG,parameters:dM.serialize(new g0)});class g1{hashAlgorithm=new e4(gZ);maskGenAlgorithm=new e4({algorithm:gX,parameters:dM.serialize(gZ)});saltLength=20;trailerField=1;constructor(a={}){Object.assign(this,a)}}dN([dH({type:e4,context:0,defaultValue:gZ})],g1.prototype,"hashAlgorithm",void 0),dN([dH({type:e4,context:1,defaultValue:g$})],g1.prototype,"maskGenAlgorithm",void 0),dN([dH({type:x.Integer,context:2,defaultValue:20})],g1.prototype,"saltLength",void 0),dN([dH({type:x.Integer,context:3,defaultValue:1})],g1.prototype,"trailerField",void 0),new e4({algorithm:gI,parameters:dM.serialize(new g1)});class g2{digestAlgorithm=new e4;digest=new db;constructor(a={}){Object.assign(this,a)}}dN([dH({type:e4})],g2.prototype,"digestAlgorithm",void 0),dN([dH({type:db})],g2.prototype,"digest",void 0);class g3{prime=new ArrayBuffer(0);exponent=new ArrayBuffer(0);coefficient=new ArrayBuffer(0);constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.Integer,converter:df})],g3.prototype,"prime",void 0),dN([dH({type:x.Integer,converter:df})],g3.prototype,"exponent",void 0),dN([dH({type:x.Integer,converter:df})],g3.prototype,"coefficient",void 0);let g4=ah=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,ah.prototype)}};g4=ah=dN([dG({type:w.Sequence,itemType:g3})],g4);class g5{version=0;modulus=new ArrayBuffer(0);publicExponent=new ArrayBuffer(0);privateExponent=new ArrayBuffer(0);prime1=new ArrayBuffer(0);prime2=new ArrayBuffer(0);exponent1=new ArrayBuffer(0);exponent2=new ArrayBuffer(0);coefficient=new ArrayBuffer(0);otherPrimeInfos;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.Integer})],g5.prototype,"version",void 0),dN([dH({type:x.Integer,converter:df})],g5.prototype,"modulus",void 0),dN([dH({type:x.Integer,converter:df})],g5.prototype,"publicExponent",void 0),dN([dH({type:x.Integer,converter:df})],g5.prototype,"privateExponent",void 0),dN([dH({type:x.Integer,converter:df})],g5.prototype,"prime1",void 0),dN([dH({type:x.Integer,converter:df})],g5.prototype,"prime2",void 0),dN([dH({type:x.Integer,converter:df})],g5.prototype,"exponent1",void 0),dN([dH({type:x.Integer,converter:df})],g5.prototype,"exponent2",void 0),dN([dH({type:x.Integer,converter:df})],g5.prototype,"coefficient",void 0),dN([dH({type:g4,optional:!0})],g5.prototype,"otherPrimeInfos",void 0);class g6{modulus=new ArrayBuffer(0);publicExponent=new ArrayBuffer(0);constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.Integer,converter:df})],g6.prototype,"modulus",void 0),dN([dH({type:x.Integer,converter:df})],g6.prototype,"publicExponent",void 0),(p=ai||(ai={}))[p.Transient=0]="Transient",p[p.Singleton=1]="Singleton",p[p.ResolutionScoped=2]="ResolutionScoped",p[p.ContainerScoped=3]="ContainerScoped";let g7=ai;var g8=function(a,b){return(g8=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])})(a,b)};function g9(a,b){function c(){this.constructor=a}g8(a,b),a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)}function ha(a){var b="function"==typeof Symbol&&Symbol.iterator,c=b&&a[b],d=0;if(c)return c.call(a);if(a&&"number"==typeof a.length)return{next:function(){return a&&d>=a.length&&(a=void 0),{value:a&&a[d++],done:!a}}};throw TypeError(b?"Object is not iterable.":"Symbol.iterator is not defined.")}function hb(a,b){var c="function"==typeof Symbol&&a[Symbol.iterator];if(!c)return a;var d,e,f=c.call(a),g=[];try{for(;(void 0===b||b-- >0)&&!(d=f.next()).done;)g.push(d.value)}catch(a){e={error:a}}finally{try{d&&!d.done&&(c=f.return)&&c.call(f)}finally{if(e)throw e.error}}return g}function hc(){for(var a=[],b=0;b<arguments.length;b++)a=a.concat(hb(arguments[b]));return a}function hd(a){return!!a.useClass}function he(a){return!!a.useFactory}var hf=function(){function a(a){this.wrap=a,this.reflectMethods=["get","getPrototypeOf","setPrototypeOf","getOwnPropertyDescriptor","defineProperty","has","set","deleteProperty","apply","construct","ownKeys"]}return a.prototype.createProxy=function(a){var b,c=this,d=!1;return new Proxy({},this.createHandler(function(){return d||(b=a(c.wrap()),d=!0),b}))},a.prototype.createHandler=function(a){var b={};return this.reflectMethods.forEach(function(c){b[c]=function(){for(var b=[],d=0;d<arguments.length;d++)b[d]=arguments[d];return b[0]=a(),Reflect[c].apply(void 0,hc(b))}}),b},a}();function hg(a){return"string"==typeof a||"symbol"==typeof a}function hh(a){return"object"==typeof a&&"token"in a&&"transform"in a}function hi(a){return!!a.useToken}function hj(a){return void 0!=a.useValue}var hk=function(){function a(){this._registryMap=new Map}return a.prototype.entries=function(){return this._registryMap.entries()},a.prototype.getAll=function(a){return this.ensure(a),this._registryMap.get(a)},a.prototype.get=function(a){this.ensure(a);var b=this._registryMap.get(a);return b[b.length-1]||null},a.prototype.set=function(a,b){this.ensure(a),this._registryMap.get(a).push(b)},a.prototype.setAll=function(a,b){this._registryMap.set(a,b)},a.prototype.has=function(a){return this.ensure(a),this._registryMap.get(a).length>0},a.prototype.clear=function(){this._registryMap.clear()},a.prototype.ensure=function(a){this._registryMap.has(a)||this._registryMap.set(a,[])},a}(),hl=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}return g9(b,a),b}(hk);let hm=function(){this.scopedResolutions=new Map};var hn=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}return g9(b,a),b}(hk),ho=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}return g9(b,a),b}(hk);let hp=function(){this.preResolution=new hn,this.postResolution=new ho};var hq=new Map,hr=new(function(){function a(a){this.parent=a,this._registry=new hl,this.interceptors=new hp,this.disposed=!1,this.disposables=new Set}return a.prototype.register=function(a,b,c){if(void 0===c&&(c={lifecycle:g7.Transient}),this.ensureNotDisposed(),d=hd(b)||hj(b)||hi(b)||he(b)?b:{useClass:b},hi(d))for(var d,e=[a],f=d;null!=f;){var g=f.useToken;if(e.includes(g))throw Error("Token registration cycle detected! "+hc(e,[g]).join(" -> "));e.push(g);var h=this._registry.get(g);f=h&&hi(h.provider)?h.provider:null}if((c.lifecycle===g7.Singleton||c.lifecycle==g7.ContainerScoped||c.lifecycle==g7.ResolutionScoped)&&(hj(d)||he(d)))throw Error('Cannot use lifecycle "'+g7[c.lifecycle]+'" with ValueProviders or FactoryProviders');return this._registry.set(a,{provider:d,options:c}),this},a.prototype.registerType=function(a,b){return(this.ensureNotDisposed(),hg(b))?this.register(a,{useToken:b}):this.register(a,{useClass:b})},a.prototype.registerInstance=function(a,b){return this.ensureNotDisposed(),this.register(a,{useValue:b})},a.prototype.registerSingleton=function(a,b){if(this.ensureNotDisposed(),hg(a)){if(hg(b))return this.register(a,{useToken:b},{lifecycle:g7.Singleton});if(b)return this.register(a,{useClass:b},{lifecycle:g7.Singleton});throw Error('Cannot register a type name as a singleton without a "to" token')}var c=a;return b&&!hg(b)&&(c=b),this.register(a,{useClass:c},{lifecycle:g7.Singleton})},a.prototype.resolve=function(a,b,c){void 0===b&&(b=new hm),void 0===c&&(c=!1),this.ensureNotDisposed();var d=this.getRegistration(a);if(!d&&hg(a)){if(c)return;throw Error('Attempted to resolve unregistered dependency token: "'+a.toString()+'"')}if(this.executePreResolutionInterceptor(a,"Single"),d){var e=this.resolveRegistration(d,b);return this.executePostResolutionInterceptor(a,e,"Single"),e}if("function"==typeof a||a instanceof hf){var e=this.construct(a,b);return this.executePostResolutionInterceptor(a,e,"Single"),e}throw Error("Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.")},a.prototype.executePreResolutionInterceptor=function(a,b){var c,d;if(this.interceptors.preResolution.has(a)){var e=[];try{for(var f=ha(this.interceptors.preResolution.getAll(a)),g=f.next();!g.done;g=f.next()){var h=g.value;"Once"!=h.options.frequency&&e.push(h),h.callback(a,b)}}catch(a){c={error:a}}finally{try{g&&!g.done&&(d=f.return)&&d.call(f)}finally{if(c)throw c.error}}this.interceptors.preResolution.setAll(a,e)}},a.prototype.executePostResolutionInterceptor=function(a,b,c){var d,e;if(this.interceptors.postResolution.has(a)){var f=[];try{for(var g=ha(this.interceptors.postResolution.getAll(a)),h=g.next();!h.done;h=g.next()){var i=h.value;"Once"!=i.options.frequency&&f.push(i),i.callback(a,b,c)}}catch(a){d={error:a}}finally{try{h&&!h.done&&(e=g.return)&&e.call(g)}finally{if(d)throw d.error}}this.interceptors.postResolution.setAll(a,f)}},a.prototype.resolveRegistration=function(a,b){if(this.ensureNotDisposed(),a.options.lifecycle===g7.ResolutionScoped&&b.scopedResolutions.has(a))return b.scopedResolutions.get(a);var c,d=a.options.lifecycle===g7.Singleton,e=a.options.lifecycle===g7.ContainerScoped,f=d||e;return c=hj(a.provider)?a.provider.useValue:hi(a.provider)?f?a.instance||(a.instance=this.resolve(a.provider.useToken,b)):this.resolve(a.provider.useToken,b):hd(a.provider)?f?a.instance||(a.instance=this.construct(a.provider.useClass,b)):this.construct(a.provider.useClass,b):he(a.provider)?a.provider.useFactory(this):this.construct(a.provider,b),a.options.lifecycle===g7.ResolutionScoped&&b.scopedResolutions.set(a,c),c},a.prototype.resolveAll=function(a,b,c){var d=this;void 0===b&&(b=new hm),void 0===c&&(c=!1),this.ensureNotDisposed();var e=this.getAllRegistrations(a);if(!e&&hg(a)){if(c)return[];throw Error('Attempted to resolve unregistered dependency token: "'+a.toString()+'"')}if(this.executePreResolutionInterceptor(a,"All"),e){var f=e.map(function(a){return d.resolveRegistration(a,b)});return this.executePostResolutionInterceptor(a,f,"All"),f}var g=[this.construct(a,b)];return this.executePostResolutionInterceptor(a,g,"All"),g},a.prototype.isRegistered=function(a,b){return void 0===b&&(b=!1),this.ensureNotDisposed(),this._registry.has(a)||b&&(this.parent||!1)&&this.parent.isRegistered(a,!0)},a.prototype.reset=function(){this.ensureNotDisposed(),this._registry.clear(),this.interceptors.preResolution.clear(),this.interceptors.postResolution.clear()},a.prototype.clearInstances=function(){var a,b;this.ensureNotDisposed();try{for(var c=ha(this._registry.entries()),d=c.next();!d.done;d=c.next()){var e=hb(d.value,2),f=e[0],g=e[1];this._registry.setAll(f,g.filter(function(a){return!hj(a.provider)}).map(function(a){return a.instance=void 0,a}))}}catch(b){a={error:b}}finally{try{d&&!d.done&&(b=c.return)&&b.call(c)}finally{if(a)throw a.error}}},a.prototype.createChildContainer=function(){this.ensureNotDisposed();var b,c,d=new a(this);try{for(var e=ha(this._registry.entries()),f=e.next();!f.done;f=e.next()){var g=hb(f.value,2),h=g[0],i=g[1];i.some(function(a){return a.options.lifecycle===g7.ContainerScoped})&&d._registry.setAll(h,i.map(function(a){return a.options.lifecycle===g7.ContainerScoped?{provider:a.provider,options:a.options}:a}))}}catch(a){b={error:a}}finally{try{f&&!f.done&&(c=e.return)&&c.call(e)}finally{if(b)throw b.error}}return d},a.prototype.beforeResolution=function(a,b,c){void 0===c&&(c={frequency:"Always"}),this.interceptors.preResolution.set(a,{callback:b,options:c})},a.prototype.afterResolution=function(a,b,c){void 0===c&&(c={frequency:"Always"}),this.interceptors.postResolution.set(a,{callback:b,options:c})},a.prototype.dispose=function(){var a,b,c,d;return a=this,b=void 0,c=void 0,d=function(){var a;return function(a,b){var c,d,e,f,g={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return f={next:h(0),throw:h(1),return:h(2)},"function"==typeof Symbol&&(f[Symbol.iterator]=function(){return this}),f;function h(f){return function(h){var i=[f,h];if(c)throw TypeError("Generator is already executing.");for(;g;)try{if(c=1,d&&(e=2&i[0]?d.return:i[0]?d.throw||((e=d.return)&&e.call(d),0):d.next)&&!(e=e.call(d,i[1])).done)return e;switch(d=0,e&&(i=[2&i[0],e.value]),i[0]){case 0:case 1:e=i;break;case 4:return g.label++,{value:i[1],done:!1};case 5:g.label++,d=i[1],i=[0];continue;case 7:i=g.ops.pop(),g.trys.pop();continue;default:if(!(e=(e=g.trys).length>0&&e[e.length-1])&&(6===i[0]||2===i[0])){g=0;continue}if(3===i[0]&&(!e||i[1]>e[0]&&i[1]<e[3])){g.label=i[1];break}if(6===i[0]&&g.label<e[1]){g.label=e[1],e=i;break}if(e&&g.label<e[2]){g.label=e[2],g.ops.push(i);break}e[2]&&g.ops.pop(),g.trys.pop();continue}i=b.call(a,g)}catch(a){i=[6,a],d=0}finally{c=e=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}}}(this,function(b){switch(b.label){case 0:return this.disposed=!0,a=[],this.disposables.forEach(function(b){var c=b.dispose();c&&a.push(c)}),[4,Promise.all(a)];case 1:return b.sent(),[2]}})},new(c||(c=Promise))(function(e,f){function g(a){try{i(d.next(a))}catch(a){f(a)}}function h(a){try{i(d.throw(a))}catch(a){f(a)}}function i(a){var b;a.done?e(a.value):((b=a.value)instanceof c?b:new c(function(a){a(b)})).then(g,h)}i((d=d.apply(a,b||[])).next())})},a.prototype.getRegistration=function(a){return this.isRegistered(a)?this._registry.get(a):this.parent?this.parent.getRegistration(a):null},a.prototype.getAllRegistrations=function(a){return this.isRegistered(a)?this._registry.getAll(a):this.parent?this.parent.getAllRegistrations(a):null},a.prototype.construct=function(a,b){var c=this;if(a instanceof hf)return a.createProxy(function(a){return c.resolve(a,b)});var d=function(){var d=hq.get(a);if(!d||0===d.length)if(0===a.length)return new a;else throw Error('TypeInfo not known for "'+a.name+'"');var e=d.map(c.resolveParams(b,a));return new(a.bind.apply(a,hc([void 0],e)))}();return"function"!=typeof d.dispose||d.dispose.length>0||this.disposables.add(d),d},a.prototype.resolveParams=function(a,b){var c=this;return function(d,e){var f,g,h,i,j,k,l;try{if("object"==typeof d&&"token"in d&&"multiple"in d)if(hh(d))return d.multiple?(f=c.resolve(d.transform)).transform.apply(f,hc([c.resolveAll(d.token,new hm,d.isOptional)],d.transformArgs)):(g=c.resolve(d.transform)).transform.apply(g,hc([c.resolve(d.token,a,d.isOptional)],d.transformArgs));else return d.multiple?c.resolveAll(d.token,new hm,d.isOptional):c.resolve(d.token,a,d.isOptional);if(hh(d))return(h=c.resolve(d.transform,a)).transform.apply(h,hc([c.resolve(d.token,a)],d.transformArgs));return c.resolve(d,a)}catch(a){throw Error((k="Cannot inject the dependency "+(j=void 0===(i=hb(b.toString().match(/constructor\(([\w, ]+)\)/)||[],2)[1])?null:i,null===j?"at position #"+e:'"'+j.split(",")[e].trim()+'" at position #'+e)+' of "'+b.name+'" constructor. Reason:',void 0===l&&(l=" "),hc([k],a.message.split("\n").map(function(a){return l+a})).join("\n")))}}},a.prototype.ensureNotDisposed=function(){if(this.disposed)throw Error("This container has been disposed, you cannot interact with a disposed container")},a}());let hs=function(a){return function(b){var c,d;hq.set(b,(c=Reflect.getMetadata("design:paramtypes",b)||[],Object.keys(d=Reflect.getOwnMetadata("injectionTokens",b)||{}).forEach(function(a){c[+a]=d[a]}),c)),a&&a.token&&(Array.isArray(a.token)?a.token.forEach(function(a){hr.register(a,b)}):hr.register(a.token,b))}};if("u"<typeof Reflect||!Reflect.getMetadata)throw Error("tsyringe requires a reflect polyfill. Please add 'import \"reflect-metadata\"' to the top of your entry point.");class ht{attrId="";attrValues=[];constructor(a={}){Object.assign(a)}}dN([dH({type:x.ObjectIdentifier})],ht.prototype,"attrId",void 0),dN([dH({type:x.Any,repeated:"set"})],ht.prototype,"attrValues",void 0);let hu=aj=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,aj.prototype)}};hu=aj=dN([dG({type:w.Sequence,itemType:ht})],hu);let hv=ak=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,ak.prototype)}};hv=ak=dN([dG({type:w.Sequence,itemType:fR})],hv);class hw{certId="";certValue=new ArrayBuffer(0);constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.ObjectIdentifier})],hw.prototype,"certId",void 0),dN([dH({type:x.Any,context:0})],hw.prototype,"certValue",void 0);class hx{crlId="";crltValue=new ArrayBuffer(0);constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.ObjectIdentifier})],hx.prototype,"crlId",void 0),dN([dH({type:x.Any,context:0})],hx.prototype,"crltValue",void 0);class hy extends db{}class hz{encryptionAlgorithm=new e4;encryptedData=new hy;constructor(a={}){Object.assign(this,a)}}dN([dH({type:e4})],hz.prototype,"encryptionAlgorithm",void 0),dN([dH({type:hy})],hz.prototype,"encryptedData",void 0),(q=am||(am={}))[q.v1=0]="v1";class hA extends db{}let hB=al=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,al.prototype)}};hB=al=dN([dG({type:w.Sequence,itemType:eY})],hB);class hC{version=am.v1;privateKeyAlgorithm=new e4;privateKey=new hA;attributes;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.Integer})],hC.prototype,"version",void 0),dN([dH({type:e4})],hC.prototype,"privateKeyAlgorithm",void 0),dN([dH({type:hA})],hC.prototype,"privateKey",void 0),dN([dH({type:hB,implicit:!0,context:0,optional:!0})],hC.prototype,"attributes",void 0);let hD=class extends hC{};hD=dN([dG({type:w.Sequence})],hD);let hE=class extends hz{};hE=dN([dG({type:w.Sequence})],hE);class hF{secretTypeId="";secretValue=new ArrayBuffer(0);constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.ObjectIdentifier})],hF.prototype,"secretTypeId",void 0),dN([dH({type:x.Any,context:0})],hF.prototype,"secretValue",void 0);class hG{mac=new g2;macSalt=new db;iterations=1;constructor(a={}){Object.assign(this,a)}}dN([dH({type:g2})],hG.prototype,"mac",void 0),dN([dH({type:db})],hG.prototype,"macSalt",void 0),dN([dH({type:x.Integer,defaultValue:1})],hG.prototype,"iterations",void 0);class hH{version=3;authSafe=new fR;macData=new hG;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.Integer})],hH.prototype,"version",void 0),dN([dH({type:fR})],hH.prototype,"authSafe",void 0),dN([dH({type:hG,optional:!0})],hH.prototype,"macData",void 0);class hI{bagId="";bagValue=new ArrayBuffer(0);bagAttributes;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.ObjectIdentifier})],hI.prototype,"bagId",void 0),dN([dH({type:x.Any,context:0})],hI.prototype,"bagValue",void 0),dN([dH({type:ht,repeated:"set",optional:!0})],hI.prototype,"bagAttributes",void 0);let hJ=an=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,an.prototype)}};hJ=an=dN([dG({type:w.Sequence,itemType:hI})],hJ);let hK="1.2.840.113549.1.9",hL=`${hK}.7`,hM=`${hK}.14`,hN=class extends dR{ia5String;constructor(a={}){super(a)}toString(){return({}).toString(),this.ia5String||super.toString()}};dN([dH({type:x.IA5String})],hN.prototype,"ia5String",void 0),hN=dN([dG({type:w.Choice})],hN);let hO=class extends fR{};hO=dN([dG({type:w.Sequence})],hO);let hP=class extends hH{};hP=dN([dG({type:w.Sequence})],hP);let hQ=class extends hz{};hQ=dN([dG({type:w.Sequence})],hQ);let hR=class{value;constructor(a=""){this.value=a}toString(){return this.value}};dN([dH({type:x.IA5String})],hR.prototype,"value",void 0),hR=dN([dG({type:w.Choice})],hR);let hS=class extends hN{};hS=dN([dG({type:w.Choice})],hS);let hT=class extends dR{};hT=dN([dG({type:w.Choice})],hT);let hU=class{value;constructor(a=new Date){this.value=a}};dN([dH({type:x.GeneralizedTime})],hU.prototype,"value",void 0),hU=dN([dG({type:w.Choice})],hU);let hV=class extends dR{};hV=dN([dG({type:w.Choice})],hV);let hW=class{value;constructor(a="M"){this.value=a}toString(){return this.value}};dN([dH({type:x.PrintableString})],hW.prototype,"value",void 0),hW=dN([dG({type:w.Choice})],hW);let hX=class{value;constructor(a=""){this.value=a}toString(){return this.value}};dN([dH({type:x.PrintableString})],hX.prototype,"value",void 0),hX=dN([dG({type:w.Choice})],hX);let hY=class extends hX{};hY=dN([dG({type:w.Choice})],hY);let hZ=class extends dR{};hZ=dN([dG({type:w.Choice})],hZ);let h$=class{value;constructor(a=""){this.value=a}toString(){return this.value}};dN([dH({type:x.ObjectIdentifier})],h$.prototype,"value",void 0),h$=dN([dG({type:w.Choice})],h$);let h_=class extends e6{};h_=dN([dG({type:w.Choice})],h_);let h0=class{value;constructor(a=0){this.value=a}toString(){return this.value.toString()}};dN([dH({type:x.Integer})],h0.prototype,"value",void 0),h0=dN([dG({type:w.Choice})],h0);let h1=class extends fo{};h1=dN([dG({type:w.Sequence})],h1);let h2=class extends dR{};h2=dN([dG({type:w.Choice})],h2);let h3=ao=class extends e9{constructor(a){super(a),Object.setPrototypeOf(this,ao.prototype)}};h3=ao=dN([dG({type:w.Sequence})],h3);let h4=ap=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,ap.prototype)}};h4=ap=dN([dG({type:w.Set,itemType:fn})],h4);let h5=class{value;constructor(a=""){this.value=a}toString(){return this.value}};dN([dH({type:x.BmpString})],h5.prototype,"value",void 0),h5=dN([dG({type:w.Choice})],h5);let h6=class extends e4{};h6=dN([dG({type:w.Sequence})],h6);let h7=aq=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,aq.prototype)}};h7=aq=dN([dG({type:w.Sequence,itemType:h6})],h7);let h8=ar=class extends dL{constructor(a){super(a),Object.setPrototypeOf(this,ar.prototype)}};h8=ar=dN([dG({type:w.Sequence,itemType:eY})],h8);class h9{version=0;subject=new dW;subjectPKInfo=new e5;attributes=new h8;constructor(a={}){Object.assign(this,a)}}dN([dH({type:x.Integer})],h9.prototype,"version",void 0),dN([dH({type:dW})],h9.prototype,"subject",void 0),dN([dH({type:e5})],h9.prototype,"subjectPKInfo",void 0),dN([dH({type:h8,implicit:!0,context:0,optional:!0})],h9.prototype,"attributes",void 0);class ia{certificationRequestInfo=new h9;certificationRequestInfoRaw;signatureAlgorithm=new e4;signature=new ArrayBuffer(0);constructor(a={}){Object.assign(this,a)}}dN([dH({type:h9,raw:!0})],ia.prototype,"certificationRequestInfo",void 0),dN([dH({type:e4})],ia.prototype,"signatureAlgorithm",void 0),dN([dH({type:x.BitString})],ia.prototype,"signature",void 0);let ib="crypto.algorithm";class ic{getAlgorithms(){return hr.resolveAll(ib)}toAsnAlgorithm(a){for(let b of({...a},this.getAlgorithms())){let c=b.toAsnAlgorithm(a);if(c)return c}if(/^[0-9.]+$/.test(a.name)){let b=new e4({algorithm:a.name});return"parameters"in a&&(b.parameters=a.parameters),b}throw Error("Cannot convert WebCrypto algorithm to ASN.1 algorithm")}toWebAlgorithm(a){for(let b of this.getAlgorithms()){let c=b.toWebAlgorithm(a);if(c)return c}return{name:a.algorithm,parameters:a.parameters}}}let id="crypto.algorithmProvider";hr.registerSingleton(id,ic);let ie="1.3.36.3.3.2.8.1.1",ig=`${ie}.1`,ih=`${ie}.2`,ii=`${ie}.3`,ij=`${ie}.4`,ik=`${ie}.5`,il=`${ie}.6`,im=`${ie}.7`,io=`${ie}.8`,ip=`${ie}.9`,iq=`${ie}.10`,ir=`${ie}.11`,is=`${ie}.12`,it=`${ie}.13`,iu=`${ie}.14`,iv="brainpoolP160r1",iw="brainpoolP160t1",ix="brainpoolP192r1",iy="brainpoolP192t1",iz="brainpoolP224r1",iA="brainpoolP224t1",iB="brainpoolP256r1",iC="brainpoolP256t1",iD="brainpoolP320r1",iE="brainpoolP320t1",iF="brainpoolP384r1",iG="brainpoolP384t1",iH="brainpoolP512r1",iI="brainpoolP512t1",iJ="ECDSA",iK=as=class{toAsnAlgorithm(a){if(a.name.toLowerCase()===iJ.toLowerCase()){if("hash"in a)switch(("string"==typeof a.hash?a.hash:a.hash.name).toLowerCase()){case"sha-1":return gt;case"sha-256":return gu;case"sha-384":return gv;case"sha-512":return gw}else if("namedCurve"in a){let b="";switch(a.namedCurve){case"P-256":b=gp;break;case"K-256":b=as.SECP256K1;break;case"P-384":b=gq;break;case"P-521":b=gr;break;case iv:b=ig;break;case iw:b=ih;break;case ix:b=ii;break;case iy:b=ij;break;case iz:b=ik;break;case iA:b=il;break;case iB:b=im;break;case iC:b=io;break;case iD:b=ip;break;case iE:b=iq;break;case iF:b=ir;break;case iG:b=is;break;case iH:b=it;break;case iI:b=iu}if(b)return new e4({algorithm:gj,parameters:dM.serialize(new gB({namedCurve:b}))})}}return null}toWebAlgorithm(a){switch(a.algorithm){case gk:return{name:iJ,hash:{name:"SHA-1"}};case gm:return{name:iJ,hash:{name:"SHA-256"}};case gn:return{name:iJ,hash:{name:"SHA-384"}};case go:return{name:iJ,hash:{name:"SHA-512"}};case gj:if(!a.parameters)throw TypeError("Cannot get required parameters from EC algorithm");switch(dM.parse(a.parameters,gB).namedCurve){case gp:return{name:iJ,namedCurve:"P-256"};case as.SECP256K1:return{name:iJ,namedCurve:"K-256"};case gq:return{name:iJ,namedCurve:"P-384"};case gr:return{name:iJ,namedCurve:"P-521"};case ig:return{name:iJ,namedCurve:iv};case ih:return{name:iJ,namedCurve:iw};case ii:return{name:iJ,namedCurve:ix};case ij:return{name:iJ,namedCurve:iy};case ik:return{name:iJ,namedCurve:iz};case il:return{name:iJ,namedCurve:iA};case im:return{name:iJ,namedCurve:iB};case io:return{name:iJ,namedCurve:iC};case ip:return{name:iJ,namedCurve:iD};case iq:return{name:iJ,namedCurve:iE};case ir:return{name:iJ,namedCurve:iF};case is:return{name:iJ,namedCurve:iG};case it:return{name:iJ,namedCurve:iH};case iu:return{name:iJ,namedCurve:iI}}}return null}};iK.SECP256K1="1.3.132.0.10",iK=as=dN([hs()],iK),hr.registerSingleton(ib,iK);let iL=Symbol("name"),iM=Symbol("value");class iN{constructor(a,b={},c=""){for(let d in this[iL]=a,this[iM]=c,b)this[d]=b[d]}}iN.NAME=iL,iN.VALUE=iM;class iO{static toTextObject(a){let b=new iN("Algorithm Identifier",{},iP.toString(a.algorithm));if(a.parameters)if(a.algorithm===gj){let c=new iK().toWebAlgorithm(a);c&&"namedCurve"in c?b["Named Curve"]=c.namedCurve:b.Parameters=a.parameters}else b.Parameters=a.parameters;return b}}class iP{static toString(a){let b=this.items[a];return b||a}}iP.items={[gS]:"sha1",[gT]:"sha224",[gU]:"sha256",[gV]:"sha384",[gW]:"sha512",[gF]:"rsaEncryption",[gL]:"sha1WithRSAEncryption",[gM]:"sha224WithRSAEncryption",[gN]:"sha256WithRSAEncryption",[gO]:"sha384WithRSAEncryption",[gP]:"sha512WithRSAEncryption",[gj]:"ecPublicKey",[gk]:"ecdsaWithSHA1",[gl]:"ecdsaWithSHA224",[gm]:"ecdsaWithSHA256",[gn]:"ecdsaWithSHA384",[go]:"ecdsaWithSHA512",[eD]:"TLS WWW server authentication",[eE]:"TLS WWW client authentication",[eF]:"Code Signing",[eG]:"E-mail Protection",[eH]:"Time Stamping",[eI]:"OCSP Signing",[gg]:"Signed Data"};class iQ{static serialize(a){return this.serializeObj(a).join("\n")}static pad(a=0){return"".padStart(2*a," ")}static serializeObj(a,b=0){let c=[],d=this.pad(b++),e="",f=a[iN.VALUE];for(let g in f&&(e=` ${f}`),c.push(`${d}${a[iN.NAME]}:${e}`),d=this.pad(b),a){if("symbol"==typeof g)continue;let e=a[g],f=g?`${g}: `:"";if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)c.push(`${d}${f}${e}`);else if(e instanceof Date)c.push(`${d}${f}${e.toUTCString()}`);else if(Array.isArray(e))for(let a of e)a[iN.NAME]=g,c.push(...this.serializeObj(a,b));else if(e instanceof iN)e[iN.NAME]=g,c.push(...this.serializeObj(e,b));else if(a4.isBufferSource(e))g?(c.push(`${d}${f}`),c.push(...this.serializeBufferSource(e,b+1))):c.push(...this.serializeBufferSource(e,b));else if("toTextObject"in e){let a=e.toTextObject();a[iN.NAME]=g,c.push(...this.serializeObj(a,b))}else throw TypeError("Cannot serialize data in text format. Unsupported type.")}return c}static serializeBufferSource(a,b=0){let c=this.pad(b),d=a4.toUint8Array(a),e=[];for(let a=0;a<d.length;){let b=[];for(let c=0;c<16&&a<d.length;c++){8===c&&b.push("");let e=d[a++].toString(16).padStart(2,"0");b.push(e)}e.push(`${c}${b.join(" ")}`)}return e}static serializeAlgorithm(a){return this.algorithmSerializer.toTextObject(a)}}iQ.oidSerializer=iP,iQ.algorithmSerializer=iO;class iR{get rawData(){return dO(this,at,"f")||dP(this,at,dM.serialize(this.asn),"f"),dO(this,at,"f")}constructor(...a){at.set(this,void 0),a4.isBufferSource(a[0])?(this.asn=dM.parse(a[0],a[1]),dP(this,at,a4.toArrayBuffer(a[0]),"f")):this.asn=a[0],this.onInit(this.asn)}equal(a){return a instanceof iR&&bc(a.rawData,this.rawData)}toString(a="text"){switch(a){case"asn":return dM.toString(this.rawData);case"text":return iQ.serialize(this.toTextObject());case"hex":return bb.ToHex(this.rawData);case"base64":return bb.ToBase64(this.rawData);case"base64url":return bb.ToBase64Url(this.rawData);default:throw TypeError("Argument 'format' is unsupported value")}}getTextName(){return this.constructor.NAME}toTextObject(){let a=this.toTextObjectEmpty();return a[""]=this.rawData,a}toTextObjectEmpty(a){return new iN(this.getTextName(),{},a)}}at=new WeakMap,iR.NAME="ASN";class iS extends iR{constructor(...a){super(a4.isBufferSource(a[0])?a4.toArrayBuffer(a[0]):dM.serialize(new e8({extnID:a[0],critical:a[1],extnValue:new db(a4.toArrayBuffer(a[2]))})),e8)}onInit(a){this.type=a.extnID,this.critical=a.critical,this.value=a.extnValue.buffer}toTextObject(){let a=this.toTextObjectWithoutValue();return a[""]=this.value,a}toTextObjectWithoutValue(){let a=this.toTextObjectEmpty(this.critical?"critical":void 0);return a[iN.NAME]===iS.NAME&&(a[iN.NAME]=iP.toString(this.type)),a}}class iT{static isCryptoKeyPair(a){return a&&a.privateKey&&a.publicKey}static isCryptoKey(a){return a&&a.usages&&a.type&&a.algorithm&&void 0!==a.extractable}constructor(){this.items=new Map,this[au]="CryptoProvider","u">typeof self&&"u">typeof crypto?this.set(iT.DEFAULT,crypto):"u">typeof global&&global.crypto&&global.crypto.subtle&&this.set(iT.DEFAULT,global.crypto)}clear(){this.items.clear()}delete(a){return this.items.delete(a)}forEach(a,b){return this.items.forEach(a,b)}has(a){return this.items.has(a)}get size(){return this.items.size}entries(){return this.items.entries()}keys(){return this.items.keys()}values(){return this.items.values()}[Symbol.iterator](){return this.items[Symbol.iterator]()}get(a=iT.DEFAULT){let b=this.items.get(a.toLowerCase());if(!b)throw Error(`Cannot get Crypto by name '${a}'`);return b}set(a,b){if("string"==typeof a){if(!b)throw TypeError("Argument 'value' is required");this.items.set(a.toLowerCase(),b)}else this.items.set(iT.DEFAULT,a);return this}}au=Symbol.toStringTag,iT.DEFAULT="default";let iU=new iT,iV=/^[0-2](?:\.[1-9][0-9]*)+$/;class iW{constructor(a={}){for(let b in this.items={},a)this.register(b,a[b])}get(a){return this.items[a]||null}findId(a){return new RegExp(iV).test(a)?a:this.get(a)}register(a,b){this.items[a]=b,this.items[b]=a}}let iX=new iW;function iY(a,b){return`\\${bb.ToHex(bb.FromUtf8String(b)).toUpperCase()}`}iX.register("CN","2.5.4.3"),iX.register("L","2.5.4.7"),iX.register("ST","2.5.4.8"),iX.register("O","2.5.4.10"),iX.register("OU","2.5.4.11"),iX.register("C","2.5.4.6"),iX.register("DC","0.9.2342.19200300.100.1.25"),iX.register("E","1.2.840.113549.1.9.1"),iX.register("G","2.5.4.42"),iX.register("I","2.5.4.43"),iX.register("SN","2.5.4.4"),iX.register("T","2.5.4.12");class iZ{static isASCII(a){for(let b=0;b<a.length;b++)if(a.charCodeAt(b)>255)return!1;return!0}static isPrintableString(a){return/^[A-Za-z0-9 '()+,-./:=?]*$/g.test(a)}constructor(a,b={}){for(let a in this.extraNames=new iW,this.asn=new dW,b)if(Object.prototype.hasOwnProperty.call(b,a)){let c=b[a];this.extraNames.register(a,c)}"string"==typeof a?this.asn=this.fromString(a):a instanceof dW?this.asn=a:a4.isBufferSource(a)?this.asn=dM.parse(a,dW):this.asn=this.fromJSON(a)}getField(a){let b=this.extraNames.findId(a)||iX.findId(a),c=[];for(let a of this.asn)for(let d of a)d.type===b&&c.push(d.value.toString());return c}getName(a){return this.extraNames.get(a)||iX.get(a)}toString(){return this.asn.map(a=>a.map(a=>{let b=this.getName(a.type)||a.type,c=a.value.anyValue?`#${bb.ToHex(a.value.anyValue)}`:a.value.toString().replace(/([,+"\\<>;])/g,"\\$1").replace(/^([ #])/,"\\$1").replace(/([ ]$)/,"\\$1").replace(/([\r\n\t])/,iY);return`${b}=${c}`}).join("+")).join(", ")}toJSON(){let a=[];for(let b of this.asn){let c={};for(let a of b){let b=this.getName(a.type)||a.type;null!=c[b]||(c[b]=[]),c[b].push(a.value.anyValue?`#${bb.ToHex(a.value.anyValue)}`:a.value.toString())}a.push(c)}return a}fromString(a){let b=new dW,c=/(\d\.[\d.]*\d|[A-Za-z]+)=((?:"")|(?:".*?[^\\]")|(?:[^,+"\\](?=[,+]|$))|(?:[^,+].*?(?:[^\\][,+]))|(?:))([,+])?/g,d=null,e=",";for(;d=c.exec(`${a},`);){let[,a,c]=d,f=c[c.length-1];(","===f||"+"===f)&&(c=c.slice(0,c.length-1),d[3]=f);let g=d[3];a=this.getTypeOid(a);let h=this.createAttribute(a,c);"+"===e?b[b.length-1].push(h):b.push(new dU([h])),e=g}return b}fromJSON(a){let b=new dW;for(let c of a){let a=new dU;for(let b in c){let d=this.getTypeOid(b);for(let e of c[b]){let b=this.createAttribute(d,e);a.push(b)}}b.push(a)}return b}getTypeOid(a){if(/[\d.]+/.test(a)||(a=this.getName(a)||""),!a)throw Error(`Cannot get OID for name type '${a}'`);return a}createAttribute(a,b){let c=new dT({type:a});if("object"==typeof b)for(let a in b)switch(a){case"ia5String":c.value.ia5String=b[a];break;case"utf8String":c.value.utf8String=b[a];break;case"universalString":c.value.universalString=b[a];break;case"bmpString":c.value.bmpString=b[a];break;case"printableString":c.value.printableString=b[a]}else if("#"===b[0])c.value.anyValue=bb.FromHex(b.slice(1));else{let d=this.processStringValue(b);a===this.getName("E")||a===this.getName("DC")?c.value.ia5String=d:iZ.isPrintableString(d)?c.value.printableString=d:c.value.utf8String=d}return c}processStringValue(a){let b=/"(.*?[^\\])?"/.exec(a);return b&&(a=b[1]),a.replace(/\\0a/ig,"\n").replace(/\\0d/ig,"\r").replace(/\\0g/ig," ").replace(/\\(.)/g,"$1")}toArrayBuffer(){return dM.serialize(this.asn)}async getThumbprint(...a){var b;let c,d="SHA-1";return!(a.length>=1)||(null==(b=a[0])?void 0:b.subtle)?c=a[0]||iU.get():(d=a[0]||d,c=a[1]||iU.get()),await c.subtle.digest(d,this.toArrayBuffer())}}let i$="Cannot initialize GeneralName from ASN.1 data.",i_=`${i$} Unsupported string format in use.`,i0=`${i$} Value doesn't match to GUID regular expression.`,i1=/^([0-9a-f]{8})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{12})$/i,i2="1.3.6.1.4.1.311.25.1",i3="1.3.6.1.4.1.311.20.2.3",i4="dns",i5="dn",i6="email",i7="ip",i8="url",i9="guid",ja="upn",jb="id";class jc extends iR{constructor(...a){let b;if(2===a.length)switch(a[0]){case i5:{let c=new iZ(a[1]).toArrayBuffer(),d=dM.parse(c,dW);b=new dZ({directoryName:d});break}case i4:b=new dZ({dNSName:a[1]});break;case i6:b=new dZ({rfc822Name:a[1]});break;case i9:{let c=RegExp(i1,"i").exec(a[1]);if(!c)throw Error("Cannot parse GUID value. Value doesn't match to regular expression");let d=c.slice(1).map((a,b)=>b<3?bb.ToHex(new Uint8Array(bb.FromHex(a)).reverse()):a).join("");b=new dZ({otherName:new dX({typeId:i2,value:dM.serialize(new db(bb.FromHex(d)))})});break}case i7:b=new dZ({iPAddress:a[1]});break;case jb:b=new dZ({registeredID:a[1]});break;case ja:b=new dZ({otherName:new dX({typeId:i3,value:dM.serialize(dm.toASN(a[1]))})});break;case i8:b=new dZ({uniformResourceIdentifier:a[1]});break;default:throw Error("Cannot create GeneralName. Unsupported type of the name")}else b=a4.isBufferSource(a[0])?dM.parse(a[0],dZ):a[0];super(b)}onInit(a){if(void 0!=a.dNSName)this.type=i4,this.value=a.dNSName;else if(void 0!=a.rfc822Name)this.type=i6,this.value=a.rfc822Name;else if(void 0!=a.iPAddress)this.type=i7,this.value=a.iPAddress;else if(void 0!=a.uniformResourceIdentifier)this.type=i8,this.value=a.uniformResourceIdentifier;else if(void 0!=a.registeredID)this.type=jb,this.value=a.registeredID;else if(void 0!=a.directoryName)this.type=i5,this.value=new iZ(a.directoryName).toString();else if(void 0!=a.otherName)if(a.otherName.typeId===i2){this.type=i9;let b=dM.parse(a.otherName.value,db),c=RegExp(i1,"i").exec(bb.ToHex(b));if(!c)throw Error(i0);this.value=c.slice(1).map((a,b)=>b<3?bb.ToHex(new Uint8Array(bb.FromHex(a)).reverse()):a).join("-")}else if(a.otherName.typeId===i3)this.type=ja,this.value=dM.parse(a.otherName.value,dR).toString();else throw Error(i_);else throw Error(i_)}toJSON(){return{type:this.type,value:this.value}}toTextObject(){let a;switch(this.type){case i5:case i4:case i9:case i7:case jb:case ja:case i8:a=this.type.toUpperCase();break;case i6:a="Email";break;default:throw Error("Unsupported GeneralName type")}let b=this.value;return this.type===jb&&(b=iP.toString(b)),new iN(a,void 0,b)}}class jd extends iR{constructor(a){let b;if(a instanceof ef)b=a;else if(Array.isArray(a)){let c=[];for(let b of a)if(b instanceof dZ)c.push(b);else{let a=dM.parse(new jc(b.type,b.value).rawData,dZ);c.push(a)}b=new ef(c)}else if(a4.isBufferSource(a))b=dM.parse(a,ef);else throw Error("Cannot initialize GeneralNames. Incorrect incoming arguments");super(b)}onInit(a){let b=[];for(let c of a){let a=null;try{a=new jc(c)}catch{continue}b.push(a)}this.items=b}toJSON(){return this.items.map(a=>a.toJSON())}toTextObject(){let a=super.toTextObjectEmpty();for(let b of this.items){let c=b.toTextObject(),d=a[c[iN.NAME]];Array.isArray(d)||(d=[],a[c[iN.NAME]]=d),d.push(c)}return a}}jd.NAME="GeneralNames";let je="-{5}",jf=`${je}BEGIN ([^\\n]+(?=${je}))${je}`,jg=`${je}END \\1${je}`,jh=`${jf}\\n(?:((?:[^:\\n]+: (?:[^\\n]+\\n(?: +[^\\n]+\\n)*))+))?\\n?((?:[a-zA-Z0-9=+/]+\\n)+)${jg}`;class ji{static isPem(a){return"string"==typeof a&&RegExp(jh,"g").test(a.replace(/\r/g,""))}static decodeWithHeaders(a){a=a.replace(/\r/g,"");let b=RegExp(jh,"g"),c=[],d=null;for(;d=b.exec(a);){let a=d[3].replace(RegExp("[\\n]+","g"),""),b={type:d[1],headers:[],rawData:bb.FromBase64(a)},e=d[2];if(e){let a=e.split(RegExp("\\n","g")),c=null;for(let d of a){let[a,e]=d.split(/:(.*)/);if(void 0===e){if(!c)throw Error("Cannot parse PEM string. Incorrect header value");c.value+=a.trim()}else c&&b.headers.push(c),c={key:a,value:e.trim()}}c&&b.headers.push(c)}c.push(b)}return c}static decode(a){return this.decodeWithHeaders(a).map(a=>a.rawData)}static decodeFirst(a){let b=this.decode(a);if(!b.length)throw RangeError("PEM string doesn't contain any objects");return b[0]}static encode(a,b){if(Array.isArray(a)){let c=[];return b?a.forEach(a=>{if(!a4.isBufferSource(a))throw TypeError("Cannot encode array of BufferSource in PEM format. Not all items of the array are BufferSource");c.push(this.encodeStruct({type:b,rawData:a4.toArrayBuffer(a)}))}):a.forEach(a=>{if(!("type"in a))throw TypeError("Cannot encode array of PemStruct in PEM format. Not all items of the array are PemStrut");c.push(this.encodeStruct(a))}),c.join("\n")}if(!b)throw Error("Required argument 'tag' is missed");return this.encodeStruct({type:b,rawData:a4.toArrayBuffer(a)})}static encodeStruct(a){var b;let c,d=a.type.toLocaleUpperCase(),e=[];if(e.push(`-----BEGIN ${d}-----`),null==(b=a.headers)?void 0:b.length){for(let b of a.headers)e.push(`${b.key}: ${b.value}`);e.push("")}let f=bb.ToBase64(a.rawData),g=0,h=[];for(;g<f.length;)if(f.length-g<64?c=f.substring(g):(c=f.substring(g,g+64),g+=64),0!==c.length){if(h.push(c),c.length<64)break}else break;return e.push(...h),e.push(`-----END ${d}-----`),e.join("\n")}}ji.CertificateTag="CERTIFICATE",ji.CrlTag="CRL",ji.CertificateRequestTag="CERTIFICATE REQUEST",ji.PublicKeyTag="PUBLIC KEY",ji.PrivateKeyTag="PRIVATE KEY";class jj extends iR{static isAsnEncoded(a){return a4.isBufferSource(a)||"string"==typeof a}static toArrayBuffer(a){if("string"==typeof a)if(ji.isPem(a))return ji.decode(a)[0];else if(bb.isHex(a))return bb.FromHex(a);else if(bb.isBase64(a))return bb.FromBase64(a);else if(bb.isBase64Url(a))return bb.FromBase64Url(a);else throw TypeError("Unsupported format of 'raw' argument. Must be one of DER, PEM, HEX, Base64, or Base4Url");{let b=a4.toUint8Array(a);if(b.length>0&&48===b[0])return a4.toArrayBuffer(a);let c=bb.ToBinary(a);if(ji.isPem(c))return ji.decode(c)[0];if(bb.isHex(c))return bb.FromHex(c);if(bb.isBase64(c))return bb.FromBase64(c);else if(bb.isBase64Url(c))return bb.FromBase64Url(c);throw TypeError("Unsupported format of 'raw' argument. Must be one of DER, PEM, HEX, Base64, or Base4Url")}}constructor(...a){jj.isAsnEncoded(a[0])?super(jj.toArrayBuffer(a[0]),a[1]):super(a[0])}toString(a="pem"){return"pem"===a?ji.encode(this.rawData,this.tag):super.toString(a)}}class jk extends jj{static async create(a,b=iU.get()){if(a instanceof jk)return a;if(iT.isCryptoKey(a)){if("public"!==a.type)throw TypeError("Public key is required");return new jk(await b.subtle.exportKey("spki",a))}if(a.publicKey)return a.publicKey;if(a4.isBufferSource(a))return new jk(a);throw TypeError("Unsupported PublicKeyType")}constructor(a){jj.isAsnEncoded(a)?super(a,e5):super(a),this.tag=ji.PublicKeyTag}async export(...a){var b;let c,d=["verify"],e={hash:"SHA-256",...this.algorithm};a.length>1?(e=a[0]||e,d=a[1]||d,c=a[2]||iU.get()):c=a[0]||iU.get();let f=this.rawData,g=dM.parse(this.rawData,e5);return g.algorithm.algorithm===gI&&(b=g,b.algorithm=new e4({algorithm:gF,parameters:null}),f=dM.serialize(b)),c.subtle.importKey("spki",f,e,!0,d)}onInit(a){let b=hr.resolve(id),c=this.algorithm=b.toWebAlgorithm(a.algorithm);if(a.algorithm.algorithm===gF){let b=dM.parse(a.subjectPublicKey,g6),d=a4.toUint8Array(b.modulus);c.publicExponent=a4.toUint8Array(b.publicExponent),c.modulusLength=(!d[0]?d.slice(1):d).byteLength<<3}}async getThumbprint(...a){var b;let c,d="SHA-1";return!(a.length>=1)||(null==(b=a[0])?void 0:b.subtle)?c=a[0]||iU.get():(d=a[0]||d,c=a[1]||iU.get()),await c.subtle.digest(d,this.rawData)}async getKeyIdentifier(...a){let b,c="SHA-1";1===a.length?"string"==typeof a[0]?(c=a[0],b=iU.get()):b=a[0]:2===a.length?(c=a[0],b=a[1]):b=iU.get();let d=dM.parse(this.rawData,e5);return await b.subtle.digest(c,d.subjectPublicKey)}toTextObject(){let a=this.toTextObjectEmpty(),b=dM.parse(this.rawData,e5);return a.Algorithm=iQ.serializeAlgorithm(b.algorithm),b.algorithm.algorithm===gj?a["EC Point"]=b.subjectPublicKey:a["Raw Data"]=b.subjectPublicKey,a}}class jl extends iS{static async create(a,b=!1,c=iU.get()){if("name"in a&&"serialNumber"in a)return new jl(a,b);let d=await jk.create(a,c),e=await d.getKeyIdentifier(c);return new jl(bb.ToHex(e),b)}constructor(...a){if(a4.isBufferSource(a[0]))super(a[0]);else if("string"==typeof a[0]){let b=new ec({keyIdentifier:new eb(bb.FromHex(a[0]))});super(ea,a[1],dM.serialize(b))}else{let b=a[0],c=new ec({authorityCertIssuer:b.name instanceof jd?dM.parse(b.name.rawData,ef):b.name,authorityCertSerialNumber:bb.FromHex(b.serialNumber)});super(ea,a[1],dM.serialize(c))}}onInit(a){super.onInit(a);let b=dM.parse(a.extnValue,ec);b.keyIdentifier&&(this.keyId=bb.ToHex(b.keyIdentifier)),(b.authorityCertIssuer||b.authorityCertSerialNumber)&&(this.certId={name:b.authorityCertIssuer||[],serialNumber:b.authorityCertSerialNumber?bb.ToHex(b.authorityCertSerialNumber):""})}toTextObject(){let a=this.toTextObjectWithoutValue(),b=dM.parse(this.value,ec);return b.authorityCertIssuer&&(a["Authority Issuer"]=new jd(b.authorityCertIssuer).toTextObject()),b.authorityCertSerialNumber&&(a["Authority Serial Number"]=b.authorityCertSerialNumber),b.keyIdentifier&&(a[""]=b.keyIdentifier),a}}jl.NAME="Authority Key Identifier";class jm extends iS{constructor(...a){if(a4.isBufferSource(a[0])){super(a[0]);let b=dM.parse(this.value,ee);this.ca=b.cA,this.pathLength=b.pathLenConstraint}else{let b=new ee({cA:a[0],pathLenConstraint:a[1]});super(ed,a[2],dM.serialize(b)),this.ca=a[0],this.pathLength=a[1]}}toTextObject(){let a=this.toTextObjectWithoutValue();return this.ca&&(a.CA=this.ca),void 0!==this.pathLength&&(a["Path Length"]=this.pathLength),a}}jm.NAME="Basic Constraints",(r=av||(av={})).serverAuth="1.3.6.1.5.5.7.3.1",r.clientAuth="1.3.6.1.5.5.7.3.2",r.codeSigning="1.3.6.1.5.5.7.3.3",r.emailProtection="1.3.6.1.5.5.7.3.4",r.timeStamping="1.3.6.1.5.5.7.3.8",r.ocspSigning="1.3.6.1.5.5.7.3.9";class jn extends iS{constructor(...a){if(a4.isBufferSource(a[0])){super(a[0]);let b=dM.parse(this.value,eC);this.usages=b.map(a=>a)}else{let b=new eC(a[0]);super(eB,a[1],dM.serialize(b)),this.usages=a[0]}}toTextObject(){let a=this.toTextObjectWithoutValue();return a[""]=this.usages.map(a=>iP.toString(a)).join(", "),a}}jn.NAME="Extended Key Usages",(s=aw||(aw={}))[s.digitalSignature=1]="digitalSignature",s[s.nonRepudiation=2]="nonRepudiation",s[s.keyEncipherment=4]="keyEncipherment",s[s.dataEncipherment=8]="dataEncipherment",s[s.keyAgreement=16]="keyAgreement",s[s.keyCertSign=32]="keyCertSign",s[s.cRLSign=64]="cRLSign",s[s.encipherOnly=128]="encipherOnly",s[s.decipherOnly=256]="decipherOnly";class jo extends iS{constructor(...a){if(a4.isBufferSource(a[0])){super(a[0]);let b=dM.parse(this.value,eP);this.usages=b.toNumber()}else{let b=new eP(a[0]);super(eO,a[1],dM.serialize(b)),this.usages=a[0]}}toTextObject(){let a=this.toTextObjectWithoutValue(),b=dM.parse(this.value,eP);return a[""]=b.toJSON().join(", "),a}}jo.NAME="Key Usages";class jp extends iS{static async create(a,b=!1,c=iU.get()){let d=await jk.create(a,c),e=await d.getKeyIdentifier(c);return new jp(bb.ToHex(e),b)}constructor(...a){if(a4.isBufferSource(a[0])){super(a[0]);let b=dM.parse(this.value,e_);this.keyId=bb.ToHex(b)}else{let b="string"==typeof a[0]?bb.FromHex(a[0]):a[0],c=new e_(b);super(e$,a[1],dM.serialize(c)),this.keyId=bb.ToHex(b)}}toTextObject(){let a=this.toTextObjectWithoutValue(),b=dM.parse(this.value,e_);return a[""]=b,a}}jp.NAME="Subject Key Identifier";class jq extends iS{constructor(...a){a4.isBufferSource(a[0])?super(a[0]):super(eW,a[1],new jd(a[0]||[]).rawData)}onInit(a){super.onInit(a);let b=dM.parse(a.extnValue,eX);this.names=new jd(b)}toTextObject(){let a=this.toTextObjectWithoutValue(),b=this.names.toTextObject();for(let c in b)a[c]=b[c];return a}}jq.NAME="Subject Alternative Name";class jr{static register(a,b){this.items.set(a,b)}static create(a){let b=new iS(a),c=this.items.get(b.type);return c?new c(a):b}}jr.items=new Map;class js extends iS{constructor(...a){var b;if(a4.isBufferSource(a[0])){super(a[0]);let b=dM.parse(this.value,ep);this.policies=b.map(a=>a.policyIdentifier)}else{let c=a[0],d=null!=(b=a[1])&&b,e=new ep(c.map(a=>new eo({policyIdentifier:a})));super(ei,d,dM.serialize(e)),this.policies=c}}toTextObject(){let a=this.toTextObjectWithoutValue();return a.Policy=this.policies.map(a=>new iN("",{},iP.toString(a))),a}}js.NAME="Certificate Policies",jr.register(ei,js);class jt extends iS{constructor(...a){if(a4.isBufferSource(a[0]))super(a[0]);else if(Array.isArray(a[0])&&"string"==typeof a[0][0]){let b=a[0].map(a=>new ev({distributionPoint:new eu({fullName:[new dZ({uniformResourceIdentifier:a})]})})),c=new ew(b);super(es,a[1],dM.serialize(c))}else{let b=new ew(a[0]);super(es,a[1],dM.serialize(b))}null!=this.distributionPoints||(this.distributionPoints=[])}onInit(a){super.onInit(a);let b=dM.parse(a.extnValue,ew);this.distributionPoints=b}toTextObject(){let a=this.toTextObjectWithoutValue();return a["Distribution Point"]=this.distributionPoints.map(a=>{var b;let c={};return a.distributionPoint&&(c[""]=null==(b=a.distributionPoint.fullName)?void 0:b.map(a=>new jc(a).toString()).join(", ")),a.reasons&&(c.Reasons=a.reasons.toString()),a.cRLIssuer&&(c["CRL Issuer"]=a.cRLIssuer.map(a=>a.toString()).join(", ")),c}),a}}jt.NAME="CRL Distribution Points";class ju extends iS{constructor(...a){if(a4.isBufferSource(a[0]))super(a[0]);else if(a[0]instanceof d9){let b=new d9(a[0]);super(d7,a[1],dM.serialize(b))}else{let b=a[0],c=new d9;jw(c,b,d2,"ocsp"),jw(c,b,d3,"caIssuers"),jw(c,b,d4,"timeStamping"),jw(c,b,d5,"caRepository"),super(d7,a[1],dM.serialize(c))}null!=this.ocsp||(this.ocsp=[]),null!=this.caIssuers||(this.caIssuers=[]),null!=this.timeStamping||(this.timeStamping=[]),null!=this.caRepository||(this.caRepository=[])}onInit(a){super.onInit(a),this.ocsp=[],this.caIssuers=[],this.timeStamping=[],this.caRepository=[],dM.parse(a.extnValue,d9).forEach(a=>{switch(a.accessMethod){case d2:this.ocsp.push(new jc(a.accessLocation));break;case d3:this.caIssuers.push(new jc(a.accessLocation));break;case d4:this.timeStamping.push(new jc(a.accessLocation));break;case d5:this.caRepository.push(new jc(a.accessLocation))}})}toTextObject(){let a=this.toTextObjectWithoutValue();return this.ocsp.length&&jv(a,"OCSP",this.ocsp),this.caIssuers.length&&jv(a,"CA Issuers",this.caIssuers),this.timeStamping.length&&jv(a,"Time Stamping",this.timeStamping),this.caRepository.length&&jv(a,"CA Repository",this.caRepository),a}}function jv(a,b,c){if(1===c.length)a[b]=c[0].toTextObject();else{let d=new iN("");c.forEach((a,b)=>{let c=a.toTextObject(),e=`${c[iN.NAME]} ${b+1}`,f=d[e];Array.isArray(f)||(f=[],d[e]=f),f.push(c)}),a[b]=d}}function jw(a,b,c,d){let e=b[d];e&&(Array.isArray(e)?e:[e]).forEach(b=>{"string"==typeof b&&(b=new jc("url",b)),a.push(new d8({accessMethod:c,accessLocation:dM.parse(b.rawData,dZ)}))})}ju.NAME="Authority Info Access";class jx extends iS{constructor(...a){a4.isBufferSource(a[0])?super(a[0]):super(eM,a[1],new jd(a[0]||[]).rawData)}onInit(a){super.onInit(a);let b=dM.parse(a.extnValue,ef);this.names=new jd(b)}toTextObject(){let a=this.toTextObjectWithoutValue(),b=this.names.toTextObject();for(let c in b)a[c]=b[c];return a}}jx.NAME="Issuer Alternative Name";class jy extends iR{constructor(...a){let b;if(a4.isBufferSource(a[0]))b=a4.toArrayBuffer(a[0]);else{let c=a[0],d=Array.isArray(a[1])?a[1].map(a=>a4.toArrayBuffer(a)):[];b=dM.serialize(new eY({type:c,values:d}))}super(b,eY)}onInit(a){this.type=a.type,this.values=a.values}toTextObject(){let a=this.toTextObjectWithoutValue();return a.Value=this.values.map(a=>new iN("",{"":a})),a}toTextObjectWithoutValue(){let a=this.toTextObjectEmpty();return a[iN.NAME]===jy.NAME&&(a[iN.NAME]=iP.toString(this.type)),a}}jy.NAME="Attribute";class jz extends jy{constructor(...a){if(a4.isBufferSource(a[0]))super(a[0]);else{let b=new h2({printableString:a[0]});super(hL,[dM.serialize(b)])}null!=this.password||(this.password="")}onInit(a){if(super.onInit(a),this.values[0]){let a=dM.parse(this.values[0],h2);this.password=a.toString()}}toTextObject(){let a=this.toTextObjectWithoutValue();return a[iN.VALUE]=this.password,a}}jz.NAME="Challenge Password";class jA extends jy{constructor(...a){if(a4.isBufferSource(a[0]))super(a[0]);else{let b=a[0],c=new e9;for(let a of b)c.push(dM.parse(a.rawData,e8));super(hM,[dM.serialize(c)])}null!=this.items||(this.items=[])}onInit(a){if(super.onInit(a),this.values[0]){let a=dM.parse(this.values[0],e9);this.items=a.map(a=>jr.create(dM.serialize(a)))}}toTextObject(){let a=this.toTextObjectWithoutValue();for(let b of this.items.map(a=>a.toTextObject()))a[b[iN.NAME]]=b;return a}}jA.NAME="Extensions";class jB{static register(a,b){this.items.set(a,b)}static create(a){let b=new jy(a),c=this.items.get(b.type);return c?new c(a):b}}jB.items=new Map;let jC="crypto.signatureFormatter";class jD{toAsnSignature(a,b){return a4.toArrayBuffer(b)}toWebSignature(a,b){return a4.toArrayBuffer(b)}}let jE=ax=class{static createPssParams(a,b){let c=ax.getHashAlgorithm(a);return c?new g1({hashAlgorithm:c,maskGenAlgorithm:new e4({algorithm:gX,parameters:dM.serialize(c)}),saltLength:b}):null}static getHashAlgorithm(a){let b=hr.resolve(id);return"string"==typeof a?b.toAsnAlgorithm({name:a}):"object"==typeof a&&a&&"name"in a?b.toAsnAlgorithm(a):null}toAsnAlgorithm(a){switch(a.name.toLowerCase()){case"rsassa-pkcs1-v1_5":if(!("hash"in a))return new e4({algorithm:gF,parameters:null});{let b;if("string"==typeof a.hash)b=a.hash;else if(a.hash&&"object"==typeof a.hash&&"name"in a.hash&&"string"==typeof a.hash.name)b=a.hash.name.toUpperCase();else throw Error("Cannot get hash algorithm name");switch(b.toLowerCase()){case"sha-1":return new e4({algorithm:gL,parameters:null});case"sha-256":return new e4({algorithm:gN,parameters:null});case"sha-384":return new e4({algorithm:gO,parameters:null});case"sha-512":return new e4({algorithm:gP,parameters:null})}}break;case"rsa-pss":if(!("hash"in a))return new e4({algorithm:gI,parameters:null});{if(!("saltLength"in a&&"number"==typeof a.saltLength))throw Error("Cannot get 'saltLength' from 'alg' argument");let b=ax.createPssParams(a.hash,a.saltLength);if(!b)throw Error("Cannot create PSS parameters");return new e4({algorithm:gI,parameters:dM.serialize(b)})}}return null}toWebAlgorithm(a){switch(a.algorithm){case gF:return{name:"RSASSA-PKCS1-v1_5"};case gL:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-1"}};case gN:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case gO:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-384"}};case gP:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-512"}};case gI:if(!a.parameters)return{name:"RSA-PSS"};{let b=dM.parse(a.parameters,g1);return{name:"RSA-PSS",hash:hr.resolve(id).toWebAlgorithm(b.hashAlgorithm),saltLength:b.saltLength}}}return null}};jE=ax=dN([hs()],jE),hr.registerSingleton(ib,jE);let jF=class{toAsnAlgorithm(a){switch(a.name.toLowerCase()){case"sha-1":return new e4({algorithm:gS});case"sha-256":return new e4({algorithm:gU});case"sha-384":return new e4({algorithm:gV});case"sha-512":return new e4({algorithm:gW})}return null}toWebAlgorithm(a){switch(a.algorithm){case gS:return{name:"SHA-1"};case gU:return{name:"SHA-256"};case gV:return{name:"SHA-384"};case gW:return{name:"SHA-512"}}return null}};jF=dN([hs()],jF),hr.registerSingleton(ib,jF);class jG{addPadding(a,b){let c=a4.toUint8Array(b),d=new Uint8Array(a);return d.set(c,a-c.length),d.buffer}removePadding(a,b=!1){let c=a4.toUint8Array(a);for(let a=0;a<c.length;a++)if(c[a]){c=c.slice(a);break}if(b&&c[0]>127){let a=new Uint8Array(c.length+1);return a.set(c,1),a.buffer}return c.buffer}toAsnSignature(a,b){if("ECDSA"===a.name){let c=a.namedCurve,d=jG.namedCurveSize.get(c)||jG.defaultNamedCurveSize,e=new gD,f=a4.toUint8Array(b);return e.r=this.removePadding(f.slice(0,d),!0),e.s=this.removePadding(f.slice(d,d+d),!0),dM.serialize(e)}return null}toWebSignature(a,b){if("ECDSA"===a.name){let c=dM.parse(b,gD),d=a.namedCurve,e=jG.namedCurveSize.get(d)||jG.defaultNamedCurveSize;return function(...a){let b=new Uint8Array(a.map(a=>a.byteLength).reduce((a,b)=>a+b)),c=0;return a.map(a=>new Uint8Array(a)).forEach(a=>{for(let d of a)b[c++]=d}),b.buffer}(this.addPadding(e,this.removePadding(c.r)),this.addPadding(e,this.removePadding(c.s)))}return null}}jG.namedCurveSize=new Map,jG.defaultNamedCurveSize=32;let jH="1.3.101.110",jI="1.3.101.111",jJ="1.3.101.112",jK="1.3.101.113",jL=class{toAsnAlgorithm(a){let b=null;switch(a.name.toLowerCase()){case"ed25519":b=jJ;break;case"x25519":b=jH;break;case"eddsa":switch(a.namedCurve.toLowerCase()){case"ed25519":b=jJ;break;case"ed448":b=jK}break;case"ecdh-es":switch(a.namedCurve.toLowerCase()){case"x25519":b=jH;break;case"x448":b=jI}}return b?new e4({algorithm:b}):null}toWebAlgorithm(a){switch(a.algorithm){case jJ:return{name:"Ed25519"};case jK:return{name:"EdDSA",namedCurve:"Ed448"};case jH:return{name:"X25519"};case jI:return{name:"ECDH-ES",namedCurve:"X448"}}return null}};jL=dN([hs()],jL),hr.registerSingleton(ib,jL);class jM extends jj{get subjectName(){return dO(this,az,"f")||dP(this,az,new iZ(this.asn.certificationRequestInfo.subject),"f"),dO(this,az,"f")}get subject(){return dO(this,aA,"f")||dP(this,aA,this.subjectName.toString(),"f"),dO(this,aA,"f")}get signatureAlgorithm(){if(!dO(this,aB,"f")){let a=hr.resolve(id);dP(this,aB,a.toWebAlgorithm(this.asn.signatureAlgorithm),"f")}return dO(this,aB,"f")}get signature(){return dO(this,aC,"f")||dP(this,aC,this.asn.signature,"f"),dO(this,aC,"f")}get publicKey(){return dO(this,aD,"f")||dP(this,aD,new jk(this.asn.certificationRequestInfo.subjectPKInfo),"f"),dO(this,aD,"f")}get attributes(){return dO(this,aE,"f")||dP(this,aE,this.asn.certificationRequestInfo.attributes.map(a=>jB.create(dM.serialize(a))),"f"),dO(this,aE,"f")}get extensions(){if(!dO(this,aF,"f")){dP(this,aF,[],"f");let a=this.getAttribute(hM);a instanceof jA&&dP(this,aF,a.items,"f")}return dO(this,aF,"f")}get tbs(){return dO(this,ay,"f")||dP(this,ay,this.asn.certificationRequestInfoRaw||dM.serialize(this.asn.certificationRequestInfo),"f"),dO(this,ay,"f")}constructor(a){let b=jj.isAsnEncoded(a)?[a,ia]:[a];super(b[0],b[1]),ay.set(this,void 0),az.set(this,void 0),aA.set(this,void 0),aB.set(this,void 0),aC.set(this,void 0),aD.set(this,void 0),aE.set(this,void 0),aF.set(this,void 0),this.tag=ji.CertificateRequestTag}onInit(a){}getAttribute(a){for(let b of this.attributes)if(b.type===a)return b;return null}getAttributes(a){return this.attributes.filter(b=>b.type===a)}getExtension(a){for(let b of this.extensions)if(b.type===a)return b;return null}getExtensions(a){return this.extensions.filter(b=>b.type===a)}async verify(a=iU.get()){let b={...this.publicKey.algorithm,...this.signatureAlgorithm},c=await this.publicKey.export(b,["verify"],a),d=hr.resolveAll(jC).reverse(),e=null;for(let a of d)if(e=a.toWebSignature(b,this.signature))break;if(!e)throw Error("Cannot convert WebCrypto signature value to ASN.1 format");return await a.subtle.verify(this.signatureAlgorithm,c,e,this.tbs)}toTextObject(){let a=this.toTextObjectEmpty(),b=dM.parse(this.rawData,ia),c=b.certificationRequestInfo,d=new iN("",{Version:`${T[c.version]} (${c.version})`,Subject:this.subject,"Subject Public Key Info":this.publicKey});if(this.attributes.length){let a=new iN("");for(let b of this.attributes){let c=b.toTextObject();a[c[iN.NAME]]=c}d.Attributes=a}return a.Data=d,a.Signature=new iN("",{Algorithm:iQ.serializeAlgorithm(b.signatureAlgorithm),"":b.signature}),a}}ay=new WeakMap,az=new WeakMap,aA=new WeakMap,aB=new WeakMap,aC=new WeakMap,aD=new WeakMap,aE=new WeakMap,aF=new WeakMap,jM.NAME="PKCS#10 Certificate Request";class jN{static async create(a,b=iU.get()){if(!a.keys.privateKey)throw Error("Bad field 'keys' in 'params' argument. 'privateKey' is empty");if(!a.keys.publicKey)throw Error("Bad field 'keys' in 'params' argument. 'publicKey' is empty");let c=await b.subtle.exportKey("spki",a.keys.publicKey),d=new ia({certificationRequestInfo:new h9({subjectPKInfo:dM.parse(c,e5)})});if(a.name){let b=a.name instanceof iZ?a.name:new iZ(a.name);d.certificationRequestInfo.subject=dM.parse(b.toArrayBuffer(),dW)}if(a.attributes)for(let b of a.attributes)d.certificationRequestInfo.attributes.push(dM.parse(b.rawData,eY));if(a.extensions&&a.extensions.length){let b=new eY({type:hM}),c=new e9;for(let b of a.extensions)c.push(dM.parse(b.rawData,e8));b.values.push(dM.serialize(c)),d.certificationRequestInfo.attributes.push(b)}let e={...a.signingAlgorithm,...a.keys.privateKey.algorithm};d.signatureAlgorithm=hr.resolve(id).toAsnAlgorithm(e);let f=dM.serialize(d.certificationRequestInfo),g=await b.subtle.sign(e,a.keys.privateKey,f),h=hr.resolveAll(jC).reverse(),i=null;for(let a of h)if(i=a.toAsnSignature(e,g))break;if(!i)throw Error("Cannot convert WebCrypto signature value to ASN.1 format");return d.signature=i,new jM(dM.serialize(d))}}class jO extends jj{get publicKey(){return dO(this,aR,"f")||dP(this,aR,new jk(this.asn.tbsCertificate.subjectPublicKeyInfo),"f"),dO(this,aR,"f")}get serialNumber(){if(!dO(this,aH,"f")){let a=new Uint8Array(this.asn.tbsCertificate.serialNumber);a.length>1&&0===a[0]&&a[1]>127&&(a=a.slice(1)),dP(this,aH,bb.ToHex(a),"f")}return dO(this,aH,"f")}get subjectName(){return dO(this,aI,"f")||dP(this,aI,new iZ(this.asn.tbsCertificate.subject),"f"),dO(this,aI,"f")}get subject(){return dO(this,aJ,"f")||dP(this,aJ,this.subjectName.toString(),"f"),dO(this,aJ,"f")}get issuerName(){return dO(this,aK,"f")||dP(this,aK,new iZ(this.asn.tbsCertificate.issuer),"f"),dO(this,aK,"f")}get issuer(){return dO(this,aL,"f")||dP(this,aL,this.issuerName.toString(),"f"),dO(this,aL,"f")}get notBefore(){if(!dO(this,aM,"f")){let a=this.asn.tbsCertificate.validity.notBefore.utcTime||this.asn.tbsCertificate.validity.notBefore.generalTime;if(!a)throw Error("Cannot get 'notBefore' value");dP(this,aM,a,"f")}return dO(this,aM,"f")}get notAfter(){if(!dO(this,aN,"f")){let a=this.asn.tbsCertificate.validity.notAfter.utcTime||this.asn.tbsCertificate.validity.notAfter.generalTime;if(!a)throw Error("Cannot get 'notAfter' value");dP(this,aN,a,"f")}return dO(this,aN,"f")}get signatureAlgorithm(){if(!dO(this,aO,"f")){let a=hr.resolve(id);dP(this,aO,a.toWebAlgorithm(this.asn.signatureAlgorithm),"f")}return dO(this,aO,"f")}get signature(){return dO(this,aP,"f")||dP(this,aP,this.asn.signatureValue,"f"),dO(this,aP,"f")}get extensions(){return!dO(this,aQ,"f")&&(dP(this,aQ,[],"f"),this.asn.tbsCertificate.extensions&&dP(this,aQ,this.asn.tbsCertificate.extensions.map(a=>jr.create(dM.serialize(a))),"f")),dO(this,aQ,"f")}get tbs(){return dO(this,aG,"f")||dP(this,aG,this.asn.tbsCertificateRaw||dM.serialize(this.asn.tbsCertificate),"f"),dO(this,aG,"f")}constructor(a){let b=jj.isAsnEncoded(a)?[a,fb]:[a];super(b[0],b[1]),aG.set(this,void 0),aH.set(this,void 0),aI.set(this,void 0),aJ.set(this,void 0),aK.set(this,void 0),aL.set(this,void 0),aM.set(this,void 0),aN.set(this,void 0),aO.set(this,void 0),aP.set(this,void 0),aQ.set(this,void 0),aR.set(this,void 0),this.tag=ji.CertificateTag}onInit(a){}getExtension(a){for(let b of this.extensions)if("string"==typeof a){if(b.type===a)return b}else if(b instanceof a)return b;return null}getExtensions(a){return this.extensions.filter(b=>"string"==typeof a?b.type===a:b instanceof a)}async verify(a={},b=iU.get()){let c,d,e=a.publicKey;try{if(e)if("publicKey"in e)c={...e.publicKey.algorithm,...this.signatureAlgorithm},d=await e.publicKey.export(c,["verify"],b);else if(e instanceof jk)c={...e.algorithm,...this.signatureAlgorithm},d=await e.export(c,["verify"],b);else if(a4.isBufferSource(e)){let a=new jk(e);c={...a.algorithm,...this.signatureAlgorithm},d=await a.export(c,["verify"],b)}else c={...e.algorithm,...this.signatureAlgorithm},d=e;else c={...this.publicKey.algorithm,...this.signatureAlgorithm},d=await this.publicKey.export(c,["verify"],b)}catch{return!1}let f=hr.resolveAll(jC).reverse(),g=null;for(let a of f)if(g=a.toWebSignature(c,this.signature))break;if(!g)throw Error("Cannot convert ASN.1 signature value to WebCrypto format");let h=await b.subtle.verify(this.signatureAlgorithm,d,g,this.tbs);if(a.signatureOnly)return h;{let b=(a.date||new Date).getTime();return h&&this.notBefore.getTime()<b&&b<this.notAfter.getTime()}}async getThumbprint(...a){let b,c="SHA-1";return a[0]&&(a[0].subtle?b=a[0]:(c=a[0]||c,b=a[1])),null!=b||(b=iU.get()),await b.subtle.digest(c,this.rawData)}async isSelfSigned(a=iU.get()){return this.subject===this.issuer&&await this.verify({signatureOnly:!0},a)}toTextObject(){let a=this.toTextObjectEmpty(),b=dM.parse(this.rawData,fb),c=b.tbsCertificate,d=new iN("",{Version:`${T[c.version]} (${c.version})`,"Serial Number":c.serialNumber,"Signature Algorithm":iQ.serializeAlgorithm(c.signature),Issuer:this.issuer,Validity:new iN("",{"Not Before":c.validity.notBefore.getTime(),"Not After":c.validity.notAfter.getTime()}),Subject:this.subject,"Subject Public Key Info":this.publicKey});if(c.issuerUniqueID&&(d["Issuer Unique ID"]=c.issuerUniqueID),c.subjectUniqueID&&(d["Subject Unique ID"]=c.subjectUniqueID),this.extensions.length){let a=new iN("");for(let b of this.extensions){let c=b.toTextObject();a[c[iN.NAME]]=c}d.Extensions=a}return a.Data=d,a.Signature=new iN("",{Algorithm:iQ.serializeAlgorithm(b.signatureAlgorithm),"":b.signatureValue}),a}}aG=new WeakMap,aH=new WeakMap,aI=new WeakMap,aJ=new WeakMap,aK=new WeakMap,aL=new WeakMap,aM=new WeakMap,aN=new WeakMap,aO=new WeakMap,aP=new WeakMap,aQ=new WeakMap,aR=new WeakMap,jO.NAME="Certificate";class jP extends Array{constructor(a){if(super(),jj.isAsnEncoded(a))this.import(a);else if(a instanceof jO)this.push(a);else if(Array.isArray(a))for(let b of a)this.push(b)}export(a){let b=new gi;b.version=1,b.encapContentInfo.eContentType="1.2.840.113549.1.7.1",b.encapContentInfo.eContent=new fS({single:new db}),b.certificates=new fQ(this.map(a=>new fP({certificate:dM.parse(a.rawData,fb)})));let c=new fR({contentType:gg,content:dM.serialize(b)}),d=dM.serialize(c);return"raw"===a?d:this.toString(a)}import(a){let b=jj.toArrayBuffer(a),c=dM.parse(b,fR);if(c.contentType!==gg)throw TypeError("Cannot parse CMS package. Incoming data is not a SignedData object.");let d=dM.parse(c.content,gi);for(let a of(this.clear(),d.certificates||[]))a.certificate&&this.push(new jO(a.certificate))}clear(){for(;this.pop(););}toString(a="pem"){let b=this.export("raw");switch(a){case"pem":return ji.encode(b,"CMS");case"pem-chain":return this.map(a=>a.toString("pem")).join("\n");case"asn":return dM.toString(b);case"hex":return bb.ToHex(b);case"base64":return bb.ToBase64(b);case"base64url":return bb.ToBase64Url(b);case"text":return iQ.serialize(this.toTextObject());default:throw TypeError("Argument 'format' is unsupported value")}}toTextObject(){let a=dM.parse(this.export("raw"),fR),b=dM.parse(a.content,gi);return new iN("X509Certificates",{"Content Type":iP.toString(a.contentType),Content:new iN("",{Version:`${U[b.version]} (${b.version})`,Certificates:new iN("",{Certificate:this.map(a=>a.toTextObject())})})})}}class jQ{constructor(a={}){this.certificates=[],a.certificates&&(this.certificates=a.certificates)}async build(a,b=iU.get()){let c=new jP(a),d=a;for(;d=await this.findIssuer(d,b);){let a=await d.getThumbprint(b);for(let d of c)if(bc(a,await d.getThumbprint(b)))throw Error("Cannot build a certificate chain. Circular dependency.");c.push(d)}return c}async findIssuer(a,b=iU.get()){if(!await a.isSelfSigned(b)){let c=a.getExtension(ea);for(let d of this.certificates)if(d.subject===a.issuer){if(c){if(c.keyId){let a=d.getExtension(e$);if(a&&a.keyId!==c.keyId)continue}else if(c.certId){let a=d.getExtension(eW);if(a&&!(c.certId.serialNumber===d.serialNumber&&bc(dM.serialize(c.certId.name),dM.serialize(a))))continue}}try{let c={...d.publicKey.algorithm,...a.signatureAlgorithm},e=await d.publicKey.export(c,["verify"],b);if(!await a.verify({publicKey:e,signatureOnly:!0},b))continue}catch{continue}return d}}return null}}function jR(a,b=iU.get()){let c=a4.toUint8Array(bb.FromHex(a||"")),d=c&&c.length&&c.some(a=>a>0)?new Uint8Array(c):void 0;d||(d=b.getRandomValues(new Uint8Array(16)));let e=0;for(;e<d.length-1&&0===d[e];)e++;if((d=d.slice(e))[0]>127){let a=new Uint8Array(d.length+1);a[0]=0,a.set(d,1),d=a}return d.buffer}class jS{static async createSelfSigned(a,b=iU.get()){if(!a.keys.privateKey)throw Error("Bad field 'keys' in 'params' argument. 'privateKey' is empty");if(!a.keys.publicKey)throw Error("Bad field 'keys' in 'params' argument. 'publicKey' is empty");return this.create({serialNumber:a.serialNumber,subject:a.name,issuer:a.name,notBefore:a.notBefore,notAfter:a.notAfter,publicKey:a.keys.publicKey,signingKey:a.keys.privateKey,signingAlgorithm:a.signingAlgorithm,extensions:a.extensions},b)}static async create(a,b=iU.get()){var c;let d;d=a.publicKey instanceof jk?a.publicKey.rawData:"publicKey"in a.publicKey?a.publicKey.publicKey.rawData:a4.isBufferSource(a.publicKey)?a.publicKey:await b.subtle.exportKey("spki",a.publicKey);let e=jR(a.serialNumber,b),f=a.notBefore||new Date,g=a.notAfter||new Date(f.getTime()+31536e6),h=new fb({tbsCertificate:new fa({version:T.v3,serialNumber:e,validity:new e7({notBefore:f,notAfter:g}),extensions:new e9((null==(c=a.extensions)?void 0:c.map(a=>dM.parse(a.rawData,e8)))||[]),subjectPublicKeyInfo:dM.parse(d,e5)})});if(a.subject){let b=a.subject instanceof iZ?a.subject:new iZ(a.subject);h.tbsCertificate.subject=dM.parse(b.toArrayBuffer(),dW)}if(a.issuer){let b=a.issuer instanceof iZ?a.issuer:new iZ(a.issuer);h.tbsCertificate.issuer=dM.parse(b.toArrayBuffer(),dW)}let i={hash:"SHA-256"},j="signingKey"in a?{...i,...a.signingAlgorithm,...a.signingKey.algorithm}:{...i,...a.signingAlgorithm},k=hr.resolve(id);h.tbsCertificate.signature=h.signatureAlgorithm=k.toAsnAlgorithm(j);let l=dM.serialize(h.tbsCertificate),m="signingKey"in a?await b.subtle.sign(j,a.signingKey,l):a.signature,n=hr.resolveAll(jC).reverse(),o=null;for(let a of n)if(o=a.toAsnSignature(j,m))break;if(!o)throw Error("Cannot convert ASN.1 signature value to WebCrypto format");return h.signatureValue=o,new jO(dM.serialize(h))}}(t=aX||(aX={}))[t.unspecified=0]="unspecified",t[t.keyCompromise=1]="keyCompromise",t[t.cACompromise=2]="cACompromise",t[t.affiliationChanged=3]="affiliationChanged",t[t.superseded=4]="superseded",t[t.cessationOfOperation=5]="cessationOfOperation",t[t.certificateHold=6]="certificateHold",t[t.removeFromCRL=8]="removeFromCRL",t[t.privilegeWithdrawn=9]="privilegeWithdrawn",t[t.aACompromise=10]="aACompromise";class jT extends iR{get serialNumber(){return dO(this,aS,"f")||dP(this,aS,bb.ToHex(this.asn.userCertificate),"f"),dO(this,aS,"f")}get revocationDate(){return dO(this,aT,"f")||dP(this,aT,this.asn.revocationDate.getTime(),"f"),dO(this,aT,"f")}get reason(){return void 0===dO(this,aU,"f")&&this.extensions,dO(this,aU,"f")}get invalidity(){return void 0===dO(this,aV,"f")&&this.extensions,dO(this,aV,"f")}get extensions(){return!dO(this,aW,"f")&&(dP(this,aW,[],"f"),this.asn.crlEntryExtensions&&dP(this,aW,this.asn.crlEntryExtensions.map(a=>{let b=jr.create(dM.serialize(a));switch(b.type){case ez:void 0===dO(this,aU,"f")&&dP(this,aU,dM.parse(b.value,eA).reason,"f");break;case eK:void 0===dO(this,aV,"f")&&dP(this,aV,dM.parse(b.value,eL).value,"f")}return b}),"f")),dO(this,aW,"f")}constructor(...a){let b;if(a4.isBufferSource(a[0])?b=a4.toArrayBuffer(a[0]):"string"==typeof a[0]?b=dM.serialize(new fc({userCertificate:jR(a[0]),revocationDate:new e6(a[1]),crlEntryExtensions:a[2]})):a[0]instanceof fc&&(b=a[0]),!b)throw TypeError("Cannot create X509CrlEntry instance. Wrong constructor arguments.");super(b,fc),aS.set(this,void 0),aT.set(this,void 0),aU.set(this,void 0),aV.set(this,void 0),aW.set(this,void 0)}onInit(a){}}aS=new WeakMap,aT=new WeakMap,aU=new WeakMap,aV=new WeakMap,aW=new WeakMap;class jU extends jj{get version(){return this.asn.tbsCertList.version}get signatureAlgorithm(){if(!dO(this,aZ,"f")){let a=hr.resolve(id);dP(this,aZ,a.toWebAlgorithm(this.asn.signatureAlgorithm),"f")}return dO(this,aZ,"f")}get signature(){return this.asn.signature}get issuer(){return this.issuerName.toString()}get issuerName(){return dO(this,a$,"f")||dP(this,a$,new iZ(this.asn.tbsCertList.issuer),"f"),dO(this,a$,"f")}get thisUpdate(){if(!dO(this,a_,"f")){let a=this.asn.tbsCertList.thisUpdate.getTime();if(!a)throw Error("Cannot get 'thisUpdate' value");dP(this,a_,a,"f")}return dO(this,a_,"f")}get nextUpdate(){var a;return void 0===dO(this,a0,"f")&&dP(this,a0,(null==(a=this.asn.tbsCertList.nextUpdate)?void 0:a.getTime())||void 0,"f"),dO(this,a0,"f")}get entries(){var a;return dO(this,a1,"f")||dP(this,a1,(null==(a=this.asn.tbsCertList.revokedCertificates)?void 0:a.map(a=>new jT(a)))||[],"f"),dO(this,a1,"f")}get extensions(){return!dO(this,a2,"f")&&(dP(this,a2,[],"f"),this.asn.tbsCertList.crlExtensions&&dP(this,a2,this.asn.tbsCertList.crlExtensions.map(a=>jr.create(dM.serialize(a))),"f")),dO(this,a2,"f")}get tbs(){return dO(this,aY,"f")||dP(this,aY,this.asn.tbsCertListRaw||dM.serialize(this.asn.tbsCertList),"f"),dO(this,aY,"f")}get tbsCertListSignatureAlgorithm(){return this.asn.tbsCertList.signature}get certListSignatureAlgorithm(){return this.asn.signatureAlgorithm}constructor(a){super(a,jj.isAsnEncoded(a)?fe:void 0),this.tag=ji.CrlTag,aY.set(this,void 0),aZ.set(this,void 0),a$.set(this,void 0),a_.set(this,void 0),a0.set(this,void 0),a1.set(this,void 0),a2.set(this,void 0)}onInit(a){}getExtension(a){for(let b of this.extensions)if("string"==typeof a){if(b.type===a)return b}else if(b instanceof a)return b;return null}getExtensions(a){return this.extensions.filter(b=>"string"==typeof a?b.type===a:b instanceof a)}async verify(a,b=iU.get()){let c,d;if(!this.certListSignatureAlgorithm.isEqual(this.tbsCertListSignatureAlgorithm))throw Error("algorithm identifier in the sequence tbsCertList and CertificateList mismatch");let e=a.publicKey;try{e instanceof jO?(c={...e.publicKey.algorithm,...e.signatureAlgorithm},d=await e.publicKey.export(c,["verify"])):e instanceof jk?(c={...e.algorithm,...this.signatureAlgorithm},d=await e.export(c,["verify"])):(c={...e.algorithm,...this.signatureAlgorithm},d=e)}catch{return!1}let f=hr.resolveAll(jC).reverse(),g=null;for(let a of f)if(g=a.toWebSignature(c,this.signature))break;if(!g)throw Error("Cannot convert ASN.1 signature value to WebCrypto format");return await b.subtle.verify(this.signatureAlgorithm,d,g,this.tbs)}async getThumbprint(...a){let b,c="SHA-1";return a[0]&&(a[0].subtle?b=a[0]:(c=a[0]||c,b=a[1])),null!=b||(b=iU.get()),await b.subtle.digest(c,this.rawData)}findRevoked(a){let b=jR("string"==typeof a?a:a.serialNumber);for(let a of this.asn.tbsCertList.revokedCertificates||[])if(a4.isEqual(a.userCertificate,b))return new jT(dM.serialize(a));return null}}aY=new WeakMap,aZ=new WeakMap,a$=new WeakMap,a_=new WeakMap,a0=new WeakMap,a1=new WeakMap,a2=new WeakMap;class jV{static async create(a,b=iU.get()){var c;let d=a.issuer instanceof iZ?a.issuer:new iZ(a.issuer),e=new fe({tbsCertList:new fd({version:T.v2,issuer:dM.parse(d.toArrayBuffer(),dW),thisUpdate:new e6(a.thisUpdate||new Date)})});if(a.nextUpdate&&(e.tbsCertList.nextUpdate=new e6(a.nextUpdate)),a.extensions&&a.extensions.length&&(e.tbsCertList.crlExtensions=new e9(a.extensions.map(a=>dM.parse(a.rawData,e8))||[])),a.entries&&a.entries.length)for(let b of(e.tbsCertList.revokedCertificates=[],a.entries)){let d=jj.toArrayBuffer(b.serialNumber);if(e.tbsCertList.revokedCertificates.findIndex(a=>bc(a.userCertificate,d))>-1)throw Error(`Certificate serial number ${b.serialNumber} already exists in tbsCertList`);let f=new fc({userCertificate:d,revocationDate:new e6(b.revocationDate||new Date)});if("extensions"in b&&(null==(c=b.extensions)?void 0:c.length)?f.crlEntryExtensions=b.extensions.map(a=>dM.parse(a.rawData,e8)):f.crlEntryExtensions=[],!(b instanceof jT)&&(b.reason&&f.crlEntryExtensions.push(new e8({extnID:ez,critical:!1,extnValue:new db(dM.serialize(new eA(b.reason)))})),b.invalidity&&f.crlEntryExtensions.push(new e8({extnID:eK,critical:!1,extnValue:new db(dM.serialize(new eL(b.invalidity)))})),b.issuer)){let b=a.issuer instanceof iZ?a.issuer:new iZ(a.issuer);f.crlEntryExtensions.push(new e8({extnID:eg,critical:!1,extnValue:new db(dM.serialize(dM.parse(b.toArrayBuffer(),dW)))}))}e.tbsCertList.revokedCertificates.push(f)}let f={...a.signingAlgorithm,...a.signingKey.algorithm},g=hr.resolve(id);e.tbsCertList.signature=e.signatureAlgorithm=g.toAsnAlgorithm(f);let h=dM.serialize(e.tbsCertList),i=await b.subtle.sign(f,a.signingKey,h),j=hr.resolveAll(jC).reverse(),k=null;for(let a of j)if(k=a.toAsnSignature(f,i))break;if(!k)throw Error("Cannot convert ASN.1 signature value to WebCrypto format");return e.signature=k,new jU(dM.serialize(e))}}jr.register(ed,jm),jr.register(eB,jn),jr.register(eO,jo),jr.register(e$,jp),jr.register(ea,jl),jr.register(eW,jq),jr.register(es,jt),jr.register(d7,ju),jr.register(eM,jx),jB.register(hL,jz),jB.register(hM,jA),hr.registerSingleton(jC,jD),hr.registerSingleton(jC,jG),jG.namedCurveSize.set("P-256",32),jG.namedCurveSize.set("K-256",32),jG.namedCurveSize.set("P-384",48),jG.namedCurveSize.set("P-521",66)},94755:(a,b,c)=>{"use strict";c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(50122);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}}};
|