@tonyclaw/agent-inspector 2.0.0
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/.output/cli.js +1611 -0
- package/.output/nitro.json +17 -0
- package/.output/public/assets/CompareDrawer-CU5ZrWcL.js +1 -0
- package/.output/public/assets/ProxyViewerContainer-pEBqVp1d.js +101 -0
- package/.output/public/assets/ReplayDialog-F58yNg5j.js +1 -0
- package/.output/public/assets/RequestAnatomy-C9lT0qE_.js +1 -0
- package/.output/public/assets/ResponseView-DHJq6bnz.js +1 -0
- package/.output/public/assets/StreamingChunkSequence-BTgfpFUT.js +1 -0
- package/.output/public/assets/_sessionId-DsNRbnNm.js +1 -0
- package/.output/public/assets/alibaba-TTwafVwX.svg +1 -0
- package/.output/public/assets/index-CpWG2hFn.css +1 -0
- package/.output/public/assets/index-DmBV8Gve.js +1 -0
- package/.output/public/assets/json-viewer-CZVYLR8j.js +14 -0
- package/.output/public/assets/main-DHs7FBK3.js +18 -0
- package/.output/public/assets/minimax-BPMzvuL-.jpeg +0 -0
- package/.output/public/assets/qwen-CONDcHqt.png +0 -0
- package/.output/public/assets/zhipuai-BPNAnxo-.svg +219 -0
- package/.output/server/_chunks/ssr-renderer.mjs +22 -0
- package/.output/server/_libs/@radix-ui/react-accessible-icon+[...].mjs +1 -0
- package/.output/server/_libs/@radix-ui/react-dismissable-layer+[...].mjs +210 -0
- package/.output/server/_libs/@radix-ui/react-navigation-menu+[...].mjs +2 -0
- package/.output/server/_libs/@radix-ui/react-one-time-password-field+[...].mjs +2 -0
- package/.output/server/_libs/@radix-ui/react-password-toggle-field+[...].mjs +2 -0
- package/.output/server/_libs/@radix-ui/react-use-callback-ref+[...].mjs +11 -0
- package/.output/server/_libs/@radix-ui/react-use-controllable-state+[...].mjs +69 -0
- package/.output/server/_libs/@radix-ui/react-use-effect-event+[...].mjs +1 -0
- package/.output/server/_libs/@radix-ui/react-use-escape-keydown+[...].mjs +17 -0
- package/.output/server/_libs/@radix-ui/react-use-is-hydrated+[...].mjs +1 -0
- package/.output/server/_libs/@radix-ui/react-use-layout-effect+[...].mjs +6 -0
- package/.output/server/_libs/@radix-ui/react-visually-hidden+[...].mjs +34 -0
- package/.output/server/_libs/ajv-formats.mjs +330 -0
- package/.output/server/_libs/ajv.mjs +11444 -0
- package/.output/server/_libs/aria-hidden.mjs +122 -0
- package/.output/server/_libs/atomically.mjs +152 -0
- package/.output/server/_libs/bail.mjs +8 -0
- package/.output/server/_libs/cfworker__json-schema.mjs +1 -0
- package/.output/server/_libs/character-entities.mjs +2130 -0
- package/.output/server/_libs/class-variance-authority.mjs +44 -0
- package/.output/server/_libs/clsx.mjs +16 -0
- package/.output/server/_libs/comma-separated-tokens.mjs +10 -0
- package/.output/server/_libs/conf.mjs +635 -0
- package/.output/server/_libs/cookie-es.mjs +58 -0
- package/.output/server/_libs/core-util-is.mjs +75 -0
- package/.output/server/_libs/croner.mjs +1 -0
- package/.output/server/_libs/crossws.mjs +1 -0
- package/.output/server/_libs/debounce-fn.mjs +69 -0
- package/.output/server/_libs/decode-named-character-reference+[...].mjs +8 -0
- package/.output/server/_libs/dequal.mjs +27 -0
- package/.output/server/_libs/detect-node-es.mjs +1 -0
- package/.output/server/_libs/devlop.mjs +8 -0
- package/.output/server/_libs/diff.mjs +320 -0
- package/.output/server/_libs/dot-prop.mjs +265 -0
- package/.output/server/_libs/env-paths.mjs +57 -0
- package/.output/server/_libs/estree-util-is-identifier-name.mjs +11 -0
- package/.output/server/_libs/extend.mjs +97 -0
- package/.output/server/_libs/fast-deep-equal.mjs +38 -0
- package/.output/server/_libs/fast-uri.mjs +812 -0
- package/.output/server/_libs/floating-ui__core.mjs +725 -0
- package/.output/server/_libs/floating-ui__dom.mjs +622 -0
- package/.output/server/_libs/floating-ui__react-dom.mjs +292 -0
- package/.output/server/_libs/floating-ui__utils.mjs +320 -0
- package/.output/server/_libs/get-nonce.mjs +9 -0
- package/.output/server/_libs/h3-v2.mjs +276 -0
- package/.output/server/_libs/h3.mjs +408 -0
- package/.output/server/_libs/hast-util-to-jsx-runtime.mjs +388 -0
- package/.output/server/_libs/hast-util-whitespace.mjs +10 -0
- package/.output/server/_libs/hookable.mjs +1 -0
- package/.output/server/_libs/html-url-attributes.mjs +26 -0
- package/.output/server/_libs/immediate.mjs +74 -0
- package/.output/server/_libs/inherits.mjs +50 -0
- package/.output/server/_libs/inline-style-parser.mjs +142 -0
- package/.output/server/_libs/is-plain-obj.mjs +10 -0
- package/.output/server/_libs/isarray.mjs +14 -0
- package/.output/server/_libs/isbot.mjs +20 -0
- package/.output/server/_libs/json-schema-traverse.mjs +180 -0
- package/.output/server/_libs/jszip.mjs +3051 -0
- package/.output/server/_libs/lie.mjs +273 -0
- package/.output/server/_libs/lucide-react.mjs +492 -0
- package/.output/server/_libs/mdast-util-from-markdown.mjs +717 -0
- package/.output/server/_libs/mdast-util-to-hast.mjs +710 -0
- package/.output/server/_libs/mdast-util-to-string.mjs +38 -0
- package/.output/server/_libs/micromark-core-commonmark.mjs +2259 -0
- package/.output/server/_libs/micromark-factory-destination.mjs +94 -0
- package/.output/server/_libs/micromark-factory-label.mjs +63 -0
- package/.output/server/_libs/micromark-factory-space.mjs +24 -0
- package/.output/server/_libs/micromark-factory-title.mjs +65 -0
- package/.output/server/_libs/micromark-factory-whitespace.mjs +22 -0
- package/.output/server/_libs/micromark-util-character.mjs +44 -0
- package/.output/server/_libs/micromark-util-chunked.mjs +36 -0
- package/.output/server/_libs/micromark-util-classify-character+[...].mjs +12 -0
- package/.output/server/_libs/micromark-util-combine-extensions+[...].mjs +41 -0
- package/.output/server/_libs/micromark-util-decode-numeric-character-reference+[...].mjs +19 -0
- package/.output/server/_libs/micromark-util-decode-string.mjs +21 -0
- package/.output/server/_libs/micromark-util-encode.mjs +1 -0
- package/.output/server/_libs/micromark-util-html-tag-name.mjs +69 -0
- package/.output/server/_libs/micromark-util-normalize-identifier+[...].mjs +6 -0
- package/.output/server/_libs/micromark-util-resolve-all.mjs +15 -0
- package/.output/server/_libs/micromark-util-sanitize-uri.mjs +41 -0
- package/.output/server/_libs/micromark-util-subtokenize.mjs +346 -0
- package/.output/server/_libs/micromark.mjs +906 -0
- package/.output/server/_libs/mimic-function.mjs +47 -0
- package/.output/server/_libs/modelcontextprotocol__server.mjs +9738 -0
- package/.output/server/_libs/ocache.mjs +1 -0
- package/.output/server/_libs/ohash.mjs +1 -0
- package/.output/server/_libs/pako.mjs +4223 -0
- package/.output/server/_libs/process-nextick-args.mjs +48 -0
- package/.output/server/_libs/property-information.mjs +1209 -0
- package/.output/server/_libs/radix-ui.mjs +1 -0
- package/.output/server/_libs/radix-ui__number.mjs +6 -0
- package/.output/server/_libs/radix-ui__primitive.mjs +11 -0
- package/.output/server/_libs/radix-ui__react-accordion.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-alert-dialog.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-arrow.mjs +23 -0
- package/.output/server/_libs/radix-ui__react-aspect-ratio.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-avatar.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-checkbox.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-collapsible.mjs +144 -0
- package/.output/server/_libs/radix-ui__react-collection.mjs +69 -0
- package/.output/server/_libs/radix-ui__react-compose-refs.mjs +39 -0
- package/.output/server/_libs/radix-ui__react-context-menu.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-context.mjs +78 -0
- package/.output/server/_libs/radix-ui__react-dialog.mjs +325 -0
- package/.output/server/_libs/radix-ui__react-direction.mjs +9 -0
- package/.output/server/_libs/radix-ui__react-dropdown-menu.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-focus-guards.mjs +29 -0
- package/.output/server/_libs/radix-ui__react-focus-scope.mjs +206 -0
- package/.output/server/_libs/radix-ui__react-form.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-hover-card.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-id.mjs +14 -0
- package/.output/server/_libs/radix-ui__react-label.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-menu.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-menubar.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-popover.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-popper.mjs +286 -0
- package/.output/server/_libs/radix-ui__react-portal.mjs +16 -0
- package/.output/server/_libs/radix-ui__react-presence.mjs +128 -0
- package/.output/server/_libs/radix-ui__react-primitive.mjs +42 -0
- package/.output/server/_libs/radix-ui__react-progress.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-radio-group.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-roving-focus.mjs +224 -0
- package/.output/server/_libs/radix-ui__react-scroll-area.mjs +721 -0
- package/.output/server/_libs/radix-ui__react-select.mjs +1163 -0
- package/.output/server/_libs/radix-ui__react-separator.mjs +28 -0
- package/.output/server/_libs/radix-ui__react-slider.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-slot.mjs +99 -0
- package/.output/server/_libs/radix-ui__react-switch.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-tabs.mjs +189 -0
- package/.output/server/_libs/radix-ui__react-toast.mjs +2 -0
- package/.output/server/_libs/radix-ui__react-toggle-group.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-toggle.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-toolbar.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-tooltip.mjs +495 -0
- package/.output/server/_libs/radix-ui__react-use-previous.mjs +14 -0
- package/.output/server/_libs/radix-ui__react-use-size.mjs +39 -0
- package/.output/server/_libs/react-dom.mjs +10781 -0
- package/.output/server/_libs/react-markdown.mjs +147 -0
- package/.output/server/_libs/react-remove-scroll-bar.mjs +82 -0
- package/.output/server/_libs/react-remove-scroll.mjs +328 -0
- package/.output/server/_libs/react-style-singleton.mjs +69 -0
- package/.output/server/_libs/react.mjs +515 -0
- package/.output/server/_libs/readable-stream.mjs +1518 -0
- package/.output/server/_libs/remark-parse.mjs +19 -0
- package/.output/server/_libs/remark-rehype.mjs +21 -0
- package/.output/server/_libs/rou3.mjs +14 -0
- package/.output/server/_libs/safe-buffer.mjs +64 -0
- package/.output/server/_libs/semver.mjs +1938 -0
- package/.output/server/_libs/seroval-plugins.mjs +58 -0
- package/.output/server/_libs/seroval.mjs +1765 -0
- package/.output/server/_libs/setimmediate.mjs +152 -0
- package/.output/server/_libs/space-separated-tokens.mjs +6 -0
- package/.output/server/_libs/srvx.mjs +1029 -0
- package/.output/server/_libs/stubborn-fs.mjs +91 -0
- package/.output/server/_libs/stubborn-utils.mjs +66 -0
- package/.output/server/_libs/style-to-js.mjs +72 -0
- package/.output/server/_libs/style-to-object.mjs +38 -0
- package/.output/server/_libs/swr.mjs +939 -0
- package/.output/server/_libs/tailwind-merge.mjs +3010 -0
- package/.output/server/_libs/tanstack__history.mjs +217 -0
- package/.output/server/_libs/tanstack__react-router.mjs +1480 -0
- package/.output/server/_libs/tanstack__react-store.mjs +1 -0
- package/.output/server/_libs/tanstack__react-virtual.mjs +44 -0
- package/.output/server/_libs/tanstack__router-core.mjs +4827 -0
- package/.output/server/_libs/tanstack__store.mjs +1 -0
- package/.output/server/_libs/tanstack__virtual-core.mjs +1225 -0
- package/.output/server/_libs/tiny-invariant.mjs +12 -0
- package/.output/server/_libs/tiny-warning.mjs +5 -0
- package/.output/server/_libs/trim-lines.mjs +41 -0
- package/.output/server/_libs/trough.mjs +85 -0
- package/.output/server/_libs/tslib.mjs +1 -0
- package/.output/server/_libs/ufo.mjs +54 -0
- package/.output/server/_libs/uint8array-extras.mjs +69 -0
- package/.output/server/_libs/ungap__structured-clone.mjs +212 -0
- package/.output/server/_libs/unified.mjs +661 -0
- package/.output/server/_libs/unist-util-is.mjs +100 -0
- package/.output/server/_libs/unist-util-position.mjs +27 -0
- package/.output/server/_libs/unist-util-stringify-position.mjs +27 -0
- package/.output/server/_libs/unist-util-visit-parents.mjs +82 -0
- package/.output/server/_libs/unist-util-visit.mjs +24 -0
- package/.output/server/_libs/unstorage.mjs +1 -0
- package/.output/server/_libs/use-callback-ref.mjs +66 -0
- package/.output/server/_libs/use-sidecar.mjs +106 -0
- package/.output/server/_libs/use-sync-external-store.mjs +64 -0
- package/.output/server/_libs/util-deprecate.mjs +12 -0
- package/.output/server/_libs/vfile-message.mjs +138 -0
- package/.output/server/_libs/vfile.mjs +467 -0
- package/.output/server/_libs/when-exit.mjs +53 -0
- package/.output/server/_libs/zod.mjs +4524 -0
- package/.output/server/_sessionId-wMLPvC5g.mjs +123 -0
- package/.output/server/_ssr/CompareDrawer-BU4V0uVf.mjs +1041 -0
- package/.output/server/_ssr/ProxyViewerContainer-BnRwFEnn.mjs +5972 -0
- package/.output/server/_ssr/ReplayDialog-C7dn9pd_.mjs +322 -0
- package/.output/server/_ssr/RequestAnatomy-C1rWpe9-.mjs +353 -0
- package/.output/server/_ssr/ResponseView-hGpPaYsf.mjs +602 -0
- package/.output/server/_ssr/StreamingChunkSequence-BRWI1r_G.mjs +302 -0
- package/.output/server/_ssr/index-BKURLVPz.mjs +118 -0
- package/.output/server/_ssr/index.mjs +1184 -0
- package/.output/server/_ssr/json-viewer-BBd2DtQP.mjs +515 -0
- package/.output/server/_ssr/router-BcZ0D6AB.mjs +6317 -0
- package/.output/server/_ssr/start-HYkvq4Ni.mjs +4 -0
- package/.output/server/_tanstack-start-manifest_v-1y8ZVxRI.mjs +4 -0
- package/.output/server/index.mjs +436 -0
- package/.output/server/node_modules/tslib/modules/index.js +70 -0
- package/.output/server/node_modules/tslib/modules/package.json +3 -0
- package/.output/server/node_modules/tslib/package.json +47 -0
- package/.output/server/node_modules/tslib/tslib.js +484 -0
- package/.output/server/package.json +9 -0
- package/LICENSE +21 -0
- package/README.md +52 -0
- package/package.json +110 -0
- package/src/assets/favicon.svg +31 -0
- package/src/assets/logos/alibaba.svg +1 -0
- package/src/assets/logos/anthropic.svg +1 -0
- package/src/assets/logos/claude-code.svg +4 -0
- package/src/assets/logos/deepseek.svg +1 -0
- package/src/assets/logos/mcp.png +0 -0
- package/src/assets/logos/minimax.jpeg +0 -0
- package/src/assets/logos/openai.svg +1 -0
- package/src/assets/logos/opencode.svg +4 -0
- package/src/assets/logos/qwen.png +0 -0
- package/src/assets/logos/zhipuai.svg +219 -0
- package/src/cli/detect-tools.ts +147 -0
- package/src/cli/doctor.ts +521 -0
- package/src/cli/onboard.ts +224 -0
- package/src/cli/templates/command-onboard.ts +17 -0
- package/src/cli/templates/skill-onboard.ts +547 -0
- package/src/cli.ts +345 -0
- package/src/components/OnboardingBanner.tsx +67 -0
- package/src/components/ProxyViewer.tsx +545 -0
- package/src/components/ProxyViewerContainer.tsx +363 -0
- package/src/components/providers/ImportWizardDialog.tsx +349 -0
- package/src/components/providers/ProviderCard.tsx +474 -0
- package/src/components/providers/ProviderForm.tsx +494 -0
- package/src/components/providers/ProviderLogo.tsx +117 -0
- package/src/components/providers/ProvidersPanel.tsx +619 -0
- package/src/components/providers/SettingsDialog.tsx +202 -0
- package/src/components/proxy-viewer/CompareDrawer.tsx +893 -0
- package/src/components/proxy-viewer/ConversationGroup.tsx +107 -0
- package/src/components/proxy-viewer/ConversationHeader.tsx +300 -0
- package/src/components/proxy-viewer/LogEntry.tsx +543 -0
- package/src/components/proxy-viewer/LogEntryHeader.tsx +501 -0
- package/src/components/proxy-viewer/ReplayDialog.tsx +218 -0
- package/src/components/proxy-viewer/ResponseView.tsx +171 -0
- package/src/components/proxy-viewer/StreamingChunkSequence.tsx +188 -0
- package/src/components/proxy-viewer/ThreadConnector.tsx +136 -0
- package/src/components/proxy-viewer/TurnGroup.tsx +337 -0
- package/src/components/proxy-viewer/anatomy/RequestAnatomy.tsx +98 -0
- package/src/components/proxy-viewer/anatomy/SegmentBar.tsx +196 -0
- package/src/components/proxy-viewer/anatomy/tokenEstimate.ts +53 -0
- package/src/components/proxy-viewer/anatomy/types.ts +39 -0
- package/src/components/proxy-viewer/anatomy/useAnatomyJump.ts +114 -0
- package/src/components/proxy-viewer/cacheTrend.ts +50 -0
- package/src/components/proxy-viewer/diff/DiffView.tsx +321 -0
- package/src/components/proxy-viewer/diff/computeDiff.ts +178 -0
- package/src/components/proxy-viewer/diff/index.ts +3 -0
- package/src/components/proxy-viewer/formats/anthropic/ContentBlocks.tsx +157 -0
- package/src/components/proxy-viewer/formats/anthropic/ResponseView.tsx +66 -0
- package/src/components/proxy-viewer/formats/anthropic/thinkingExtract.ts +21 -0
- package/src/components/proxy-viewer/formats/index.tsx +33 -0
- package/src/components/proxy-viewer/formats/openai/ResponseView.tsx +170 -0
- package/src/components/proxy-viewer/index.ts +9 -0
- package/src/components/proxy-viewer/lazy.ts +37 -0
- package/src/components/proxy-viewer/log-formats/anthropic.ts +194 -0
- package/src/components/proxy-viewer/log-formats/index.ts +23 -0
- package/src/components/proxy-viewer/log-formats/openai.ts +167 -0
- package/src/components/proxy-viewer/log-formats/types.ts +40 -0
- package/src/components/proxy-viewer/log-formats/unknown.ts +18 -0
- package/src/components/proxy-viewer/logEntryVisibility.ts +39 -0
- package/src/components/proxy-viewer/requestDiff.ts +277 -0
- package/src/components/proxy-viewer/useCopyFeedback.ts +36 -0
- package/src/components/proxy-viewer/useKeyboardNavigation.ts +190 -0
- package/src/components/proxy-viewer/viewerState.ts +66 -0
- package/src/components/ui/badge.tsx +47 -0
- package/src/components/ui/button.tsx +47 -0
- package/src/components/ui/collapsible.tsx +21 -0
- package/src/components/ui/confirm-dialog.tsx +51 -0
- package/src/components/ui/crab-logo.tsx +95 -0
- package/src/components/ui/crab-variants.tsx +467 -0
- package/src/components/ui/dialog.tsx +129 -0
- package/src/components/ui/json-expansion-button.tsx +56 -0
- package/src/components/ui/json-viewer-bulk.ts +97 -0
- package/src/components/ui/json-viewer.tsx +494 -0
- package/src/components/ui/mcp-logo.tsx +20 -0
- package/src/components/ui/scroll-area.tsx +54 -0
- package/src/components/ui/select.tsx +178 -0
- package/src/components/ui/separator.tsx +28 -0
- package/src/components/ui/tabs.tsx +88 -0
- package/src/components/ui/tooltip.tsx +51 -0
- package/src/index.css +11 -0
- package/src/knowledge/candidateStore.ts +63 -0
- package/src/knowledge/distiller.ts +98 -0
- package/src/knowledge/openclawClient.ts +118 -0
- package/src/knowledge/redactor.ts +80 -0
- package/src/knowledge/types.ts +84 -0
- package/src/lib/apiClient.ts +49 -0
- package/src/lib/export-logs.ts +51 -0
- package/src/lib/mask.ts +4 -0
- package/src/lib/objectUtils.ts +22 -0
- package/src/lib/providerContract.ts +26 -0
- package/src/lib/providerTestContract.ts +107 -0
- package/src/lib/runtimeConfig.ts +25 -0
- package/src/lib/serverPort.ts +41 -0
- package/src/lib/sessionUrl.ts +44 -0
- package/src/lib/stopReason.ts +58 -0
- package/src/lib/useOnboarding.ts +80 -0
- package/src/lib/useProviders.ts +30 -0
- package/src/lib/useStripConfig.ts +108 -0
- package/src/lib/utils.ts +21 -0
- package/src/mcp/loopback.ts +76 -0
- package/src/mcp/previewExtractor.ts +166 -0
- package/src/mcp/server.ts +396 -0
- package/src/mcp/toolHandlers.ts +341 -0
- package/src/proxy/chunkStorage.ts +112 -0
- package/src/proxy/claudeCodeStrip.ts +99 -0
- package/src/proxy/config.ts +172 -0
- package/src/proxy/constants.ts +47 -0
- package/src/proxy/dataDir.ts +86 -0
- package/src/proxy/formats/anthropic/anthropicProvider.ts +75 -0
- package/src/proxy/formats/anthropic/handler.ts +71 -0
- package/src/proxy/formats/anthropic/index.ts +14 -0
- package/src/proxy/formats/anthropic/register.ts +4 -0
- package/src/proxy/formats/anthropic/schemas.ts +237 -0
- package/src/proxy/formats/anthropic/stream.ts +205 -0
- package/src/proxy/formats/handler.ts +46 -0
- package/src/proxy/formats/index.ts +12 -0
- package/src/proxy/formats/jsonSchema.ts +36 -0
- package/src/proxy/formats/openai/alibabaProvider.ts +38 -0
- package/src/proxy/formats/openai/handler.ts +96 -0
- package/src/proxy/formats/openai/index.ts +25 -0
- package/src/proxy/formats/openai/provider.ts +50 -0
- package/src/proxy/formats/openai/register.ts +4 -0
- package/src/proxy/formats/openai/schemas.ts +187 -0
- package/src/proxy/formats/openai/stream.ts +206 -0
- package/src/proxy/formats/protocol.ts +50 -0
- package/src/proxy/formats/providerRegistry.ts +51 -0
- package/src/proxy/formats/providers/index.ts +3 -0
- package/src/proxy/formats/registry.ts +66 -0
- package/src/proxy/handler.ts +334 -0
- package/src/proxy/logFinalizer.ts +305 -0
- package/src/proxy/logFinalizer.worker.ts +24 -0
- package/src/proxy/logIndex.ts +268 -0
- package/src/proxy/logger.ts +179 -0
- package/src/proxy/openaiOrphanToolStrip.ts +142 -0
- package/src/proxy/providerImporters.ts +491 -0
- package/src/proxy/providers.ts +613 -0
- package/src/proxy/schemas.ts +209 -0
- package/src/proxy/sessionProcess.ts +140 -0
- package/src/proxy/sessionRuntime.ts +85 -0
- package/src/proxy/sessionSupervisor.ts +283 -0
- package/src/proxy/sessionWorkerEntry.ts +26 -0
- package/src/proxy/socketTracker.ts +255 -0
- package/src/proxy/store.ts +412 -0
- package/src/proxy/upstream.ts +90 -0
- package/src/router.tsx +16 -0
- package/src/routes/__root.tsx +45 -0
- package/src/routes/api/config.paths.ts +14 -0
- package/src/routes/api/config.ts +53 -0
- package/src/routes/api/health.ts +15 -0
- package/src/routes/api/knowledge.candidates.$candidateId.promote.ts +32 -0
- package/src/routes/api/knowledge.candidates.ts +10 -0
- package/src/routes/api/knowledge.project-context.ts +18 -0
- package/src/routes/api/knowledge.search.ts +31 -0
- package/src/routes/api/knowledge.sessions.$sessionId.candidates.ts +16 -0
- package/src/routes/api/logs.$id.chunks.ts +36 -0
- package/src/routes/api/logs.$id.replay.ts +191 -0
- package/src/routes/api/logs.$id.ts +22 -0
- package/src/routes/api/logs.stream.ts +74 -0
- package/src/routes/api/logs.ts +59 -0
- package/src/routes/api/mcp.ts +25 -0
- package/src/routes/api/models.ts +10 -0
- package/src/routes/api/providers.$providerId.test.log.ts +293 -0
- package/src/routes/api/providers.$providerId.ts +50 -0
- package/src/routes/api/providers.export.ts +26 -0
- package/src/routes/api/providers.import.ts +47 -0
- package/src/routes/api/providers.scan.ts +23 -0
- package/src/routes/api/providers.ts +45 -0
- package/src/routes/api/sessions.ts +17 -0
- package/src/routes/index.tsx +6 -0
- package/src/routes/proxy/$.ts +15 -0
- package/src/routes/session/$sessionId.tsx +23 -0
- package/styles/globals.css +188 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{g as Dt,j as A,r as G}from"./main-DHs7FBK3.js";import{_ as zr,b as Ae,s as $n,i as _t,j as Ot,S as vr,h as Lr,t as Dr,u as _r,v as Or,$ as Rr}from"./ProxyViewerContainer-pEBqVp1d.js";function Fr(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const jr=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Mr=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Br={};function Yn(e,n){return(Br.jsx?Mr:jr).test(e)}const Vr=/[ \t\n\f\r]/g;function Hr(e){return typeof e=="object"?e.type==="text"?Wn(e.value):!1:Wn(e)}function Wn(e){return e.replace(Vr,"")===""}class qe{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}qe.prototype.normal={};qe.prototype.property={};qe.prototype.space=void 0;function Rt(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new qe(t,r,n)}function gn(e){return e.toLowerCase()}class ee{constructor(n,t){this.attribute=t,this.property=n}}ee.prototype.attribute="";ee.prototype.booleanish=!1;ee.prototype.boolean=!1;ee.prototype.commaOrSpaceSeparated=!1;ee.prototype.commaSeparated=!1;ee.prototype.defined=!1;ee.prototype.mustUseProperty=!1;ee.prototype.number=!1;ee.prototype.overloadedBoolean=!1;ee.prototype.property="";ee.prototype.spaceSeparated=!1;ee.prototype.space=void 0;let Ur=0;const D=we(),W=we(),yn=we(),k=we(),$=we(),Pe=we(),te=we();function we(){return 2**++Ur}const xn=Object.freeze(Object.defineProperty({__proto__:null,boolean:D,booleanish:W,commaOrSpaceSeparated:te,commaSeparated:Pe,number:k,overloadedBoolean:yn,spaceSeparated:$},Symbol.toStringTag,{value:"Module"})),tn=Object.keys(xn);class Tn extends ee{constructor(n,t,r,i){let l=-1;if(super(n,t),Xn(this,"space",i),typeof r=="number")for(;++l<tn.length;){const o=tn[l];Xn(this,tn[l],(r&xn[o])===xn[o])}}}Tn.prototype.defined=!0;function Xn(e,n,t){t&&(e[n]=t)}function ze(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const l=new Tn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),n[r]=l,t[gn(r)]=r,t[gn(l.attribute)]=r}return new qe(n,t,e.space)}const Ft=ze({properties:{ariaActiveDescendant:null,ariaAtomic:W,ariaAutoComplete:null,ariaBusy:W,ariaChecked:W,ariaColCount:k,ariaColIndex:k,ariaColSpan:k,ariaControls:$,ariaCurrent:null,ariaDescribedBy:$,ariaDetails:null,ariaDisabled:W,ariaDropEffect:$,ariaErrorMessage:null,ariaExpanded:W,ariaFlowTo:$,ariaGrabbed:W,ariaHasPopup:null,ariaHidden:W,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:$,ariaLevel:k,ariaLive:null,ariaModal:W,ariaMultiLine:W,ariaMultiSelectable:W,ariaOrientation:null,ariaOwns:$,ariaPlaceholder:null,ariaPosInSet:k,ariaPressed:W,ariaReadOnly:W,ariaRelevant:null,ariaRequired:W,ariaRoleDescription:$,ariaRowCount:k,ariaRowIndex:k,ariaRowSpan:k,ariaSelected:W,ariaSetSize:k,ariaSort:null,ariaValueMax:k,ariaValueMin:k,ariaValueNow:k,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function jt(e,n){return n in e?e[n]:n}function Mt(e,n){return jt(e,n.toLowerCase())}const qr=ze({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Pe,acceptCharset:$,accessKey:$,action:null,allow:null,allowFullScreen:D,allowPaymentRequest:D,allowUserMedia:D,alt:null,as:null,async:D,autoCapitalize:null,autoComplete:$,autoFocus:D,autoPlay:D,blocking:$,capture:null,charSet:null,checked:D,cite:null,className:$,cols:k,colSpan:null,content:null,contentEditable:W,controls:D,controlsList:$,coords:k|Pe,crossOrigin:null,data:null,dateTime:null,decoding:null,default:D,defer:D,dir:null,dirName:null,disabled:D,download:yn,draggable:W,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:D,formTarget:null,headers:$,height:k,hidden:yn,high:k,href:null,hrefLang:null,htmlFor:$,httpEquiv:$,id:null,imageSizes:null,imageSrcSet:null,inert:D,inputMode:null,integrity:null,is:null,isMap:D,itemId:null,itemProp:$,itemRef:$,itemScope:D,itemType:$,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:D,low:k,manifest:null,max:null,maxLength:k,media:null,method:null,min:null,minLength:k,multiple:D,muted:D,name:null,nonce:null,noModule:D,noValidate:D,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:D,optimum:k,pattern:null,ping:$,placeholder:null,playsInline:D,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:D,referrerPolicy:null,rel:$,required:D,reversed:D,rows:k,rowSpan:k,sandbox:$,scope:null,scoped:D,seamless:D,selected:D,shadowRootClonable:D,shadowRootDelegatesFocus:D,shadowRootMode:null,shape:null,size:k,sizes:null,slot:null,span:k,spellCheck:W,src:null,srcDoc:null,srcLang:null,srcSet:null,start:k,step:null,style:null,tabIndex:k,target:null,title:null,translate:null,type:null,typeMustMatch:D,useMap:null,value:W,width:k,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:$,axis:null,background:null,bgColor:null,border:k,borderColor:null,bottomMargin:k,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:D,declare:D,event:null,face:null,frame:null,frameBorder:null,hSpace:k,leftMargin:k,link:null,longDesc:null,lowSrc:null,marginHeight:k,marginWidth:k,noResize:D,noHref:D,noShade:D,noWrap:D,object:null,profile:null,prompt:null,rev:null,rightMargin:k,rules:null,scheme:null,scrolling:W,standby:null,summary:null,text:null,topMargin:k,valueType:null,version:null,vAlign:null,vLink:null,vSpace:k,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:D,disableRemotePlayback:D,prefix:null,property:null,results:k,security:null,unselectable:null},space:"html",transform:Mt}),$r=ze({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:te,accentHeight:k,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:k,amplitude:k,arabicForm:null,ascent:k,attributeName:null,attributeType:null,azimuth:k,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:k,by:null,calcMode:null,capHeight:k,className:$,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:k,diffuseConstant:k,direction:null,display:null,dur:null,divisor:k,dominantBaseline:null,download:D,dx:null,dy:null,edgeMode:null,editable:null,elevation:k,enableBackground:null,end:null,event:null,exponent:k,externalResourcesRequired:null,fill:null,fillOpacity:k,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Pe,g2:Pe,glyphName:Pe,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:k,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:k,horizOriginX:k,horizOriginY:k,id:null,ideographic:k,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:k,k,k1:k,k2:k,k3:k,k4:k,kernelMatrix:te,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:k,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:k,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:k,overlineThickness:k,paintOrder:null,panose1:null,path:null,pathLength:k,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:$,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:k,pointsAtY:k,pointsAtZ:k,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:te,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:te,rev:te,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:te,requiredFeatures:te,requiredFonts:te,requiredFormats:te,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:k,specularExponent:k,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:k,strikethroughThickness:k,string:null,stroke:null,strokeDashArray:te,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:k,strokeOpacity:k,strokeWidth:null,style:null,surfaceScale:k,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:te,tabIndex:k,tableValues:null,target:null,targetX:k,targetY:k,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:te,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:k,underlineThickness:k,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:k,values:null,vAlphabetic:k,vMathematical:k,vectorEffect:null,vHanging:k,vIdeographic:k,version:null,vertAdvY:k,vertOriginX:k,vertOriginY:k,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:k,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:jt}),Bt=ze({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Vt=ze({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Mt}),Ht=ze({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),Yr={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Wr=/[A-Z]/g,Jn=/-[a-z]/g,Xr=/^data[-\w.:]+$/i;function Jr(e,n){const t=gn(n);let r=n,i=ee;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Xr.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(Jn,Kr);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!Jn.test(l)){let o=l.replace(Wr,Qr);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}i=Tn}return new i(r,n)}function Qr(e){return"-"+e.toLowerCase()}function Kr(e){return e.charAt(1).toUpperCase()}const Gr=Rt([Ft,qr,Bt,Vt,Ht],"html"),An=Rt([Ft,$r,Bt,Vt,Ht],"svg");function Zr(e){return e.join(" ").trim()}var Ie={},rn,Qn;function ei(){if(Qn)return rn;Qn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,a=/^\s+|\s+$/g,c=`
|
|
2
|
+
`,u="/",s="*",p="",d="comment",f="declaration";function b(T,y){if(typeof T!="string")throw new TypeError("First argument must be a string");if(!T)return[];y=y||{};var z=1,E=1;function j(I){var C=I.match(n);C&&(z+=C.length);var U=I.lastIndexOf(c);E=~U?I.length-U:E+I.length}function M(){var I={line:z,column:E};return function(C){return C.position=new x(I),R(),C}}function x(I){this.start=I,this.end={line:z,column:E},this.source=y.source}x.prototype.content=T;function O(I){var C=new Error(y.source+":"+z+":"+E+": "+I);if(C.reason=I,C.filename=y.source,C.line=z,C.column=E,C.source=T,!y.silent)throw C}function V(I){var C=I.exec(T);if(C){var U=C[0];return j(U),T=T.slice(U.length),C}}function R(){V(t)}function B(I){var C;for(I=I||[];C=P();)C!==!1&&I.push(C);return I}function P(){var I=M();if(!(u!=T.charAt(0)||s!=T.charAt(1))){for(var C=2;p!=T.charAt(C)&&(s!=T.charAt(C)||u!=T.charAt(C+1));)++C;if(C+=2,p===T.charAt(C-1))return O("End of comment missing");var U=T.slice(2,C-2);return E+=2,j(U),T=T.slice(C),E+=2,I({type:d,comment:U})}}function N(){var I=M(),C=V(r);if(C){if(P(),!V(i))return O("property missing ':'");var U=V(l),X=I({type:f,property:S(C[0].replace(e,p)),value:U?S(U[0].replace(e,p)):p});return V(o),X}}function H(){var I=[];B(I);for(var C;C=N();)C!==!1&&(I.push(C),B(I));return I}return R(),H()}function S(T){return T?T.replace(a,p):p}return rn=b,rn}var Kn;function ni(){if(Kn)return Ie;Kn=1;var e=Ie&&Ie.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.default=t;const n=e(ei());function t(r,i){let l=null;if(!r||typeof r!="string")return l;const o=(0,n.default)(r),a=typeof i=="function";return o.forEach(c=>{if(c.type!=="declaration")return;const{property:u,value:s}=c;a?i(u,s,c):s&&(l=l||{},l[u]=s)}),l}return Ie}var Oe={},Gn;function ti(){if(Gn)return Oe;Gn=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(u){return!u||t.test(u)||e.test(u)},o=function(u,s){return s.toUpperCase()},a=function(u,s){return"".concat(s,"-")},c=function(u,s){return s===void 0&&(s={}),l(u)?u:(u=u.toLowerCase(),s.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(n,o))};return Oe.camelCase=c,Oe}var Re,Zn;function ri(){if(Zn)return Re;Zn=1;var e=Re&&Re.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(ni()),t=ti();function r(i,l){var o={};return!i||typeof i!="string"||(0,n.default)(i,function(a,c){a&&c&&(o[(0,t.camelCase)(a,l)]=c)}),o}return r.default=r,Re=r,Re}var ii=ri();const li=Dt(ii),Ut=qt("end"),Pn=qt("start");function qt(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function oi(e){const n=Pn(e),t=Ut(e);if(n&&t)return{start:n,end:t}}function Be(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?et(e.position):"start"in e||"end"in e?et(e):"line"in e||"column"in e?kn(e):""}function kn(e){return nt(e&&e.line)+":"+nt(e&&e.column)}function et(e){return kn(e&&e.start)+"-"+kn(e&&e.end)}function nt(e){return e&&typeof e=="number"?e:1}class Q extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",l={},o=!1;if(t&&("line"in t&&"column"in t?l={place:t}:"start"in t&&"end"in t?l={place:t}:"type"in t?l={ancestors:[t],place:t.position}:l={...t}),typeof n=="string"?i=n:!l.cause&&n&&(o=!0,i=n.message,l.cause=n),!l.ruleId&&!l.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?l.ruleId=r:(l.source=r.slice(0,c),l.ruleId=r.slice(c+1))}if(!l.place&&l.ancestors&&l.ancestors){const c=l.ancestors[l.ancestors.length-1];c&&(l.place=c.position)}const a=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=Be(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Q.prototype.file="";Q.prototype.name="";Q.prototype.reason="";Q.prototype.message="";Q.prototype.stack="";Q.prototype.column=void 0;Q.prototype.line=void 0;Q.prototype.ancestors=void 0;Q.prototype.cause=void 0;Q.prototype.fatal=void 0;Q.prototype.place=void 0;Q.prototype.ruleId=void 0;Q.prototype.source=void 0;const Nn={}.hasOwnProperty,ai=new Map,ui=/[A-Z]/g,si=new Set(["table","tbody","thead","tfoot","tr"]),ci=new Set(["td","th"]),$t="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function pi(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=ki(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=xi(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?An:Gr,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},l=Yt(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function Yt(e,n,t){if(n.type==="element")return fi(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return hi(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return di(e,n,t);if(n.type==="mdxjsEsm")return mi(e,n);if(n.type==="root")return gi(e,n,t);if(n.type==="text")return yi(e,n)}function fi(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=An,e.schema=i),e.ancestors.push(n);const l=Xt(e,n.tagName,!1),o=bi(e,n);let a=vn(e,n);return si.has(n.tagName)&&(a=a.filter(function(c){return typeof c=="string"?!Hr(c):!0})),Wt(e,o,l,n),zn(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function hi(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ue(e,n.position)}function mi(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Ue(e,n.position)}function di(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=An,e.schema=i),e.ancestors.push(n);const l=n.name===null?e.Fragment:Xt(e,n.name,!0),o=wi(e,n),a=vn(e,n);return Wt(e,o,l,n),zn(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function gi(e,n,t){const r={};return zn(r,vn(e,n)),e.create(n,e.Fragment,r,t)}function yi(e,n){return n.value}function Wt(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function zn(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function xi(e,n,t){return r;function r(i,l,o,a){const u=Array.isArray(o.children)?t:n;return a?u(l,o,a):u(l,o)}}function ki(e,n){return t;function t(r,i,l,o){const a=Array.isArray(l.children),c=Pn(r);return n(i,l,o,a,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function bi(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&Nn.call(n.properties,i)){const l=Si(e,i,n.properties[i]);if(l){const[o,a]=l;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&ci.has(n.tagName)?r=a:t[o]=a}}if(r){const l=t.style||(t.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function wi(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const a=o.properties[0];a.type,Object.assign(t,e.evaluater.evaluateExpression(a.argument))}else Ue(e,n.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,l=e.evaluater.evaluateExpression(a.expression)}else Ue(e,n.position);else l=r.value===null?!0:r.value;t[i]=l}return t}function vn(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:ai;for(;++r<n.children.length;){const l=n.children[r];let o;if(e.passKeys){const c=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(c){const u=i.get(c)||0;o=c+"-"+u,i.set(c,u+1)}}const a=Yt(e,l,o);a!==void 0&&t.push(a)}return t}function Si(e,n,t){const r=Jr(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?Fr(t):Zr(t)),r.property==="style"){let i=typeof t=="object"?t:Ci(e,String(t));return e.stylePropertyNameCase==="css"&&(i=Ei(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Yr[r.property]||r.property:r.attribute,t]}}function Ci(e,n){try{return li(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,i=new Q("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=$t+"#cannot-parse-style-attribute",i}}function Xt(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let l=-1,o;for(;++l<i.length;){const a=Yn(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};o=o?{type:"MemberExpression",object:o,property:a,computed:!!(l&&a.type==="Literal"),optional:!1}:a}r=o}else r=Yn(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return Nn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ue(e)}function Ue(e,n){const t=new Q("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=$t+"#cannot-handle-mdx-estrees-without-createevaluater",t}function Ei(e){const n={};let t;for(t in e)Nn.call(e,t)&&(n[Ii(t)]=e[t]);return n}function Ii(e){let n=e.replace(ui,Ti);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function Ti(e){return"-"+e.toLowerCase()}const ln={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Ai={};function Pi(e,n){const t=Ai,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Jt(e,r,i)}function Jt(e,n,t){if(Ni(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return tt(e.children,n,t)}return Array.isArray(e)?tt(e,n,t):""}function tt(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=Jt(e[i],n,t);return r.join("")}function Ni(e){return!!(e&&typeof e=="object")}const rt=document.createElement("i");function Ln(e){const n="&"+e+";";rt.innerHTML=n;const t=rt.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function pe(e,n,t,r){const i=e.length;let l=0,o;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);l<r.length;)o=r.slice(l,l+1e4),o.unshift(n,0),e.splice(...o),l+=1e4,n+=1e4}function ie(e,n){return e.length>0?(pe(e,e.length,0,n),e):n}const it={}.hasOwnProperty;function zi(e){const n={};let t=-1;for(;++t<e.length;)vi(n,e[t]);return n}function vi(e,n){let t;for(t in n){const i=(it.call(e,t)?e[t]:void 0)||(e[t]={}),l=n[t];let o;if(l)for(o in l){it.call(i,o)||(i[o]=[]);const a=l[o];Li(i[o],Array.isArray(a)?a:a?[a]:[])}}}function Li(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);pe(e,0,0,r)}function Qt(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Ne(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ce=xe(/[A-Za-z]/),re=xe(/[\dA-Za-z]/),Di=xe(/[#-'*+\--9=?A-Z^-~]/);function bn(e){return e!==null&&(e<32||e===127)}const wn=xe(/\d/),_i=xe(/[\dA-Fa-f]/),Oi=xe(/[!-/:-@[-`{-~]/);function v(e){return e!==null&&e<-2}function Z(e){return e!==null&&(e<0||e===32)}function F(e){return e===-2||e===-1||e===32}const Ri=xe(new RegExp("\\p{P}|\\p{S}","u")),Fi=xe(/\s/);function xe(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function ve(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const l=e.charCodeAt(t);let o="";if(l===37&&re(e.charCodeAt(t+1))&&re(e.charCodeAt(t+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const a=e.charCodeAt(t+1);l<56320&&a>56319&&a<57344?(o=String.fromCharCode(l,a),i=1):o="�"}else o=String.fromCharCode(l);o&&(n.push(e.slice(r,t),encodeURIComponent(o)),r=t+i+1,o=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function Y(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(c){return F(c)?(e.enter(t),a(c)):n(c)}function a(c){return F(c)&&l++<i?(e.consume(c),a):(e.exit(t),n(c))}}const ji={tokenize:Mi};function Mi(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Y(e,n,"linePrefix")}function i(a){return e.enter("paragraph"),l(a)}function l(a){const c=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=c),t=c,o(a)}function o(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return v(a)?(e.consume(a),e.exit("chunkText"),l):(e.consume(a),o)}}const Bi={tokenize:Vi},lt={tokenize:Hi};function Vi(e){const n=this,t=[];let r=0,i,l,o;return a;function a(E){if(r<t.length){const j=t[r];return n.containerState=j[1],e.attempt(j[0].continuation,c,u)(E)}return u(E)}function c(E){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&z();const j=n.events.length;let M=j,x;for(;M--;)if(n.events[M][0]==="exit"&&n.events[M][1].type==="chunkFlow"){x=n.events[M][1].end;break}y(r);let O=j;for(;O<n.events.length;)n.events[O][1].end={...x},O++;return pe(n.events,M+1,0,n.events.slice(j)),n.events.length=O,u(E)}return a(E)}function u(E){if(r===t.length){if(!i)return d(E);if(i.currentConstruct&&i.currentConstruct.concrete)return b(E);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(lt,s,p)(E)}function s(E){return i&&z(),y(r),d(E)}function p(E){return n.parser.lazy[n.now().line]=r!==t.length,o=n.now().offset,b(E)}function d(E){return n.containerState={},e.attempt(lt,f,b)(E)}function f(E){return r++,t.push([n.currentConstruct,n.containerState]),d(E)}function b(E){if(E===null){i&&z(),y(0),e.consume(E);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),S(E)}function S(E){if(E===null){T(e.exit("chunkFlow"),!0),y(0),e.consume(E);return}return v(E)?(e.consume(E),T(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(E),S)}function T(E,j){const M=n.sliceStream(E);if(j&&M.push(null),E.previous=l,l&&(l.next=E),l=E,i.defineSkip(E.start),i.write(M),n.parser.lazy[E.start.line]){let x=i.events.length;for(;x--;)if(i.events[x][1].start.offset<o&&(!i.events[x][1].end||i.events[x][1].end.offset>o))return;const O=n.events.length;let V=O,R,B;for(;V--;)if(n.events[V][0]==="exit"&&n.events[V][1].type==="chunkFlow"){if(R){B=n.events[V][1].end;break}R=!0}for(y(r),x=O;x<n.events.length;)n.events[x][1].end={...B},x++;pe(n.events,V+1,0,n.events.slice(O)),n.events.length=x}}function y(E){let j=t.length;for(;j-- >E;){const M=t[j];n.containerState=M[1],M[0].exit.call(n,e)}t.length=E}function z(){i.write([null]),l=void 0,i=void 0,n.containerState._closeFlow=void 0}}function Hi(e,n,t){return Y(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ot(e){if(e===null||Z(e)||Fi(e))return 1;if(Ri(e))return 2}function Dn(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(n=l(n,t),r.push(l))}return n}const Sn={name:"attention",resolveAll:Ui,tokenize:qi};function Ui(e,n){let t=-1,r,i,l,o,a,c,u,s;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const p={...e[r][1].end},d={...e[t][1].start};at(p,-c),at(d,c),o={type:c>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},a={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:d},l={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:c>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[t][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=ie(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=ie(u,[["enter",i,n],["enter",o,n],["exit",o,n],["enter",l,n]]),u=ie(u,Dn(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=ie(u,[["exit",l,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(s=2,u=ie(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):s=0,pe(e,r-1,t-r+3,u),t=r+u.length-s-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function qi(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ot(r);let l;return o;function o(c){return l=c,e.enter("attentionSequence"),a(c)}function a(c){if(c===l)return e.consume(c),a;const u=e.exit("attentionSequence"),s=ot(c),p=!s||s===2&&i||t.includes(c),d=!i||i===2&&s||t.includes(r);return u._open=!!(l===42?p:p&&(i||!d)),u._close=!!(l===42?d:d&&(s||!p)),n(c)}}function at(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const $i={name:"autolink",tokenize:Yi};function Yi(e,n,t){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(f){return ce(f)?(e.consume(f),o):f===64?t(f):u(f)}function o(f){return f===43||f===45||f===46||re(f)?(r=1,a(f)):u(f)}function a(f){return f===58?(e.consume(f),r=0,c):(f===43||f===45||f===46||re(f))&&r++<32?(e.consume(f),a):(r=0,u(f))}function c(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),n):f===null||f===32||f===60||bn(f)?t(f):(e.consume(f),c)}function u(f){return f===64?(e.consume(f),s):Di(f)?(e.consume(f),u):t(f)}function s(f){return re(f)?p(f):t(f)}function p(f){return f===46?(e.consume(f),r=0,s):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),n):d(f)}function d(f){if((f===45||re(f))&&r++<63){const b=f===45?d:p;return e.consume(f),b}return t(f)}}const Ze={partial:!0,tokenize:Wi};function Wi(e,n,t){return r;function r(l){return F(l)?Y(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||v(l)?n(l):t(l)}}const Kt={continuation:{tokenize:Ji},exit:Qi,name:"blockQuote",tokenize:Xi};function Xi(e,n,t){const r=this;return i;function i(o){if(o===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return t(o)}function l(o){return F(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(o))}}function Ji(e,n,t){const r=this;return i;function i(o){return F(o)?Y(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt(Kt,n,t)(o)}}function Qi(e){e.exit("blockQuote")}const Gt={name:"characterEscape",tokenize:Ki};function Ki(e,n,t){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return Oi(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(l)}}const Zt={name:"characterReference",tokenize:Gi};function Gi(e,n,t){const r=this;let i=0,l,o;return a;function a(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),c}function c(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),l=31,o=re,s(p))}function u(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=_i,s):(e.enter("characterReferenceValue"),l=7,o=wn,s(p))}function s(p){if(p===59&&i){const d=e.exit("characterReferenceValue");return o===re&&!Ln(r.sliceSerialize(d))?t(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return o(p)&&i++<l?(e.consume(p),s):t(p)}}const ut={partial:!0,tokenize:el},st={concrete:!0,name:"codeFenced",tokenize:Zi};function Zi(e,n,t){const r=this,i={partial:!0,tokenize:M};let l=0,o=0,a;return c;function c(x){return u(x)}function u(x){const O=r.events[r.events.length-1];return l=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,a=x,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s(x)}function s(x){return x===a?(o++,e.consume(x),s):o<3?t(x):(e.exit("codeFencedFenceSequence"),F(x)?Y(e,p,"whitespace")(x):p(x))}function p(x){return x===null||v(x)?(e.exit("codeFencedFence"),r.interrupt?n(x):e.check(ut,S,j)(x)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(x))}function d(x){return x===null||v(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(x)):F(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Y(e,f,"whitespace")(x)):x===96&&x===a?t(x):(e.consume(x),d)}function f(x){return x===null||v(x)?p(x):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(x))}function b(x){return x===null||v(x)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(x)):x===96&&x===a?t(x):(e.consume(x),b)}function S(x){return e.attempt(i,j,T)(x)}function T(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),y}function y(x){return l>0&&F(x)?Y(e,z,"linePrefix",l+1)(x):z(x)}function z(x){return x===null||v(x)?e.check(ut,S,j)(x):(e.enter("codeFlowValue"),E(x))}function E(x){return x===null||v(x)?(e.exit("codeFlowValue"),z(x)):(e.consume(x),E)}function j(x){return e.exit("codeFenced"),n(x)}function M(x,O,V){let R=0;return B;function B(C){return x.enter("lineEnding"),x.consume(C),x.exit("lineEnding"),P}function P(C){return x.enter("codeFencedFence"),F(C)?Y(x,N,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):N(C)}function N(C){return C===a?(x.enter("codeFencedFenceSequence"),H(C)):V(C)}function H(C){return C===a?(R++,x.consume(C),H):R>=o?(x.exit("codeFencedFenceSequence"),F(C)?Y(x,I,"whitespace")(C):I(C)):V(C)}function I(C){return C===null||v(C)?(x.exit("codeFencedFence"),O(C)):V(C)}}}function el(e,n,t){const r=this;return i;function i(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}const on={name:"codeIndented",tokenize:tl},nl={partial:!0,tokenize:rl};function tl(e,n,t){const r=this;return i;function i(u){return e.enter("codeIndented"),Y(e,l,"linePrefix",5)(u)}function l(u){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?o(u):t(u)}function o(u){return u===null?c(u):v(u)?e.attempt(nl,o,c)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||v(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),a)}function c(u){return e.exit("codeIndented"),n(u)}}function rl(e,n,t){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):v(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Y(e,l,"linePrefix",5)(o)}function l(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(o):v(o)?i(o):t(o)}}const il={name:"codeText",previous:ol,resolve:ll,tokenize:al};function ll(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),n-=r-i-2,r=i+2),i=void 0);return e}function ol(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function al(e,n,t){let r=0,i,l;return o;function o(p){return e.enter("codeText"),e.enter("codeTextSequence"),a(p)}function a(p){return p===96?(e.consume(p),r++,a):(e.exit("codeTextSequence"),c(p))}function c(p){return p===null?t(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),c):p===96?(l=e.enter("codeTextSequence"),i=0,s(p)):v(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(p))}function u(p){return p===null||p===32||p===96||v(p)?(e.exit("codeTextData"),c(p)):(e.consume(p),u)}function s(p){return p===96?(e.consume(p),i++,s):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(p)):(l.type="codeTextData",u(p))}}class ul{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Fe(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Fe(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Fe(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);Fe(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Fe(this.left,t.reverse())}}}function Fe(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function er(e){const n={};let t=-1,r,i,l,o,a,c,u;const s=new ul(e);for(;++t<s.length;){for(;t in n;)t=n[t];if(r=s.get(t),t&&r[1].type==="chunkFlow"&&s.get(t-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,l=0,l<c.length&&c[l][1].type==="lineEndingBlank"&&(l+=2),l<c.length&&c[l][1].type==="content"))for(;++l<c.length&&c[l][1].type!=="content";)c[l][1].type==="chunkText"&&(c[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,sl(s,t)),t=n[t],u=!0);else if(r[1]._container){for(l=t,i=void 0;l--;)if(o=s.get(l),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(s.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=l);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...s.get(i)[1].start},a=s.slice(i,t),a.unshift(r),s.splice(i,t-i+1,a))}}return pe(e,0,Number.POSITIVE_INFINITY,s.slice(0)),!u}function sl(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const l=[];let o=t._tokenizer;o||(o=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,c=[],u={};let s,p,d=-1,f=t,b=0,S=0;const T=[S];for(;f;){for(;e.get(++i)[1]!==f;);l.push(i),f._tokenizer||(s=r.sliceStream(f),f.next||s.push(null),p&&o.defineSkip(f.start),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(s),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),p=f,f=f.next}for(f=t;++d<a.length;)a[d][0]==="exit"&&a[d-1][0]==="enter"&&a[d][1].type===a[d-1][1].type&&a[d][1].start.line!==a[d][1].end.line&&(S=d+1,T.push(S),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(o.events=[],f?(f._tokenizer=void 0,f.previous=void 0):T.pop(),d=T.length;d--;){const y=a.slice(T[d],T[d+1]),z=l.pop();c.push([z,z+y.length-1]),e.splice(z,2,y)}for(c.reverse(),d=-1;++d<c.length;)u[b+c[d][0]]=b+c[d][1],b+=c[d][1]-c[d][0]-1;return u}const cl={resolve:fl,tokenize:hl},pl={partial:!0,tokenize:ml};function fl(e){return er(e),e}function hl(e,n){let t;return r;function r(a){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?l(a):v(a)?e.check(pl,o,l)(a):(e.consume(a),i)}function l(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function o(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function ml(e,n,t){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Y(e,l,"linePrefix")}function l(o){if(o===null||v(o))return t(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}function nr(e,n,t,r,i,l,o,a,c){const u=c||Number.POSITIVE_INFINITY;let s=0;return p;function p(y){return y===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(y),e.exit(l),d):y===null||y===32||y===41||bn(y)?t(y):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),S(y))}function d(y){return y===62?(e.enter(l),e.consume(y),e.exit(l),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(e.exit("chunkString"),e.exit(a),d(y)):y===null||y===60||v(y)?t(y):(e.consume(y),y===92?b:f)}function b(y){return y===60||y===62||y===92?(e.consume(y),f):f(y)}function S(y){return!s&&(y===null||y===41||Z(y))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),n(y)):s<u&&y===40?(e.consume(y),s++,S):y===41?(e.consume(y),s--,S):y===null||y===32||y===40||bn(y)?t(y):(e.consume(y),y===92?T:S)}function T(y){return y===40||y===41||y===92?(e.consume(y),S):S(y)}}function tr(e,n,t,r,i,l){const o=this;let a=0,c;return u;function u(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(l),s}function s(f){return a>999||f===null||f===91||f===93&&!c||f===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?t(f):f===93?(e.exit(l),e.enter(i),e.consume(f),e.exit(i),e.exit(r),n):v(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),s):(e.enter("chunkString",{contentType:"string"}),p(f))}function p(f){return f===null||f===91||f===93||v(f)||a++>999?(e.exit("chunkString"),s(f)):(e.consume(f),c||(c=!F(f)),f===92?d:p)}function d(f){return f===91||f===92||f===93?(e.consume(f),a++,p):p(f)}}function rr(e,n,t,r,i,l){let o;return a;function a(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),o=d===40?41:d,c):t(d)}function c(d){return d===o?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),n):(e.enter(l),u(d))}function u(d){return d===o?(e.exit(l),c(o)):d===null?t(d):v(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Y(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),s(d))}function s(d){return d===o||d===null||v(d)?(e.exit("chunkString"),u(d)):(e.consume(d),d===92?p:s)}function p(d){return d===o||d===92?(e.consume(d),s):s(d)}}function Ve(e,n){let t;return r;function r(i){return v(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):F(i)?Y(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const dl={name:"definition",tokenize:yl},gl={partial:!0,tokenize:xl};function yl(e,n,t){const r=this;let i;return l;function l(f){return e.enter("definition"),o(f)}function o(f){return tr.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return i=Ne(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),c):t(f)}function c(f){return Z(f)?Ve(e,u)(f):u(f)}function u(f){return nr(e,s,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function s(f){return e.attempt(gl,p,p)(f)}function p(f){return F(f)?Y(e,d,"whitespace")(f):d(f)}function d(f){return f===null||v(f)?(e.exit("definition"),r.parser.defined.push(i),n(f)):t(f)}}function xl(e,n,t){return r;function r(a){return Z(a)?Ve(e,i)(a):t(a)}function i(a){return rr(e,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function l(a){return F(a)?Y(e,o,"whitespace")(a):o(a)}function o(a){return a===null||v(a)?n(a):t(a)}}const kl={name:"hardBreakEscape",tokenize:bl};function bl(e,n,t){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return v(l)?(e.exit("hardBreakEscape"),n(l)):t(l)}}const wl={name:"headingAtx",resolve:Sl,tokenize:Cl};function Sl(e,n){let t=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},l={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},pe(e,r,t-r+1,[["enter",i,n],["enter",l,n],["exit",l,n],["exit",i,n]])),e}function Cl(e,n,t){let r=0;return i;function i(s){return e.enter("atxHeading"),l(s)}function l(s){return e.enter("atxHeadingSequence"),o(s)}function o(s){return s===35&&r++<6?(e.consume(s),o):s===null||Z(s)?(e.exit("atxHeadingSequence"),a(s)):t(s)}function a(s){return s===35?(e.enter("atxHeadingSequence"),c(s)):s===null||v(s)?(e.exit("atxHeading"),n(s)):F(s)?Y(e,a,"whitespace")(s):(e.enter("atxHeadingText"),u(s))}function c(s){return s===35?(e.consume(s),c):(e.exit("atxHeadingSequence"),a(s))}function u(s){return s===null||s===35||Z(s)?(e.exit("atxHeadingText"),a(s)):(e.consume(s),u)}}const El=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ct=["pre","script","style","textarea"],Il={concrete:!0,name:"htmlFlow",resolveTo:Pl,tokenize:Nl},Tl={partial:!0,tokenize:vl},Al={partial:!0,tokenize:zl};function Pl(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Nl(e,n,t){const r=this;let i,l,o,a,c;return u;function u(m){return s(m)}function s(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),p}function p(m){return m===33?(e.consume(m),d):m===47?(e.consume(m),l=!0,S):m===63?(e.consume(m),i=3,r.interrupt?n:h):ce(m)?(e.consume(m),o=String.fromCharCode(m),T):t(m)}function d(m){return m===45?(e.consume(m),i=2,f):m===91?(e.consume(m),i=5,a=0,b):ce(m)?(e.consume(m),i=4,r.interrupt?n:h):t(m)}function f(m){return m===45?(e.consume(m),r.interrupt?n:h):t(m)}function b(m){const ae="CDATA[";return m===ae.charCodeAt(a++)?(e.consume(m),a===ae.length?r.interrupt?n:N:b):t(m)}function S(m){return ce(m)?(e.consume(m),o=String.fromCharCode(m),T):t(m)}function T(m){if(m===null||m===47||m===62||Z(m)){const ae=m===47,ke=o.toLowerCase();return!ae&&!l&&ct.includes(ke)?(i=1,r.interrupt?n(m):N(m)):El.includes(o.toLowerCase())?(i=6,ae?(e.consume(m),y):r.interrupt?n(m):N(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(m):l?z(m):E(m))}return m===45||re(m)?(e.consume(m),o+=String.fromCharCode(m),T):t(m)}function y(m){return m===62?(e.consume(m),r.interrupt?n:N):t(m)}function z(m){return F(m)?(e.consume(m),z):B(m)}function E(m){return m===47?(e.consume(m),B):m===58||m===95||ce(m)?(e.consume(m),j):F(m)?(e.consume(m),E):B(m)}function j(m){return m===45||m===46||m===58||m===95||re(m)?(e.consume(m),j):M(m)}function M(m){return m===61?(e.consume(m),x):F(m)?(e.consume(m),M):E(m)}function x(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),c=m,O):F(m)?(e.consume(m),x):V(m)}function O(m){return m===c?(e.consume(m),c=null,R):m===null||v(m)?t(m):(e.consume(m),O)}function V(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||Z(m)?M(m):(e.consume(m),V)}function R(m){return m===47||m===62||F(m)?E(m):t(m)}function B(m){return m===62?(e.consume(m),P):t(m)}function P(m){return m===null||v(m)?N(m):F(m)?(e.consume(m),P):t(m)}function N(m){return m===45&&i===2?(e.consume(m),U):m===60&&i===1?(e.consume(m),X):m===62&&i===4?(e.consume(m),oe):m===63&&i===3?(e.consume(m),h):m===93&&i===5?(e.consume(m),fe):v(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Tl,he,H)(m)):m===null||v(m)?(e.exit("htmlFlowData"),H(m)):(e.consume(m),N)}function H(m){return e.check(Al,I,he)(m)}function I(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),C}function C(m){return m===null||v(m)?H(m):(e.enter("htmlFlowData"),N(m))}function U(m){return m===45?(e.consume(m),h):N(m)}function X(m){return m===47?(e.consume(m),o="",le):N(m)}function le(m){if(m===62){const ae=o.toLowerCase();return ct.includes(ae)?(e.consume(m),oe):N(m)}return ce(m)&&o.length<8?(e.consume(m),o+=String.fromCharCode(m),le):N(m)}function fe(m){return m===93?(e.consume(m),h):N(m)}function h(m){return m===62?(e.consume(m),oe):m===45&&i===2?(e.consume(m),h):N(m)}function oe(m){return m===null||v(m)?(e.exit("htmlFlowData"),he(m)):(e.consume(m),oe)}function he(m){return e.exit("htmlFlow"),n(m)}}function zl(e,n,t){const r=this;return i;function i(o){return v(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):t(o)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function vl(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ze,n,t)}}const Ll={name:"htmlText",tokenize:Dl};function Dl(e,n,t){const r=this;let i,l,o;return a;function a(h){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(h),c}function c(h){return h===33?(e.consume(h),u):h===47?(e.consume(h),M):h===63?(e.consume(h),E):ce(h)?(e.consume(h),V):t(h)}function u(h){return h===45?(e.consume(h),s):h===91?(e.consume(h),l=0,b):ce(h)?(e.consume(h),z):t(h)}function s(h){return h===45?(e.consume(h),f):t(h)}function p(h){return h===null?t(h):h===45?(e.consume(h),d):v(h)?(o=p,X(h)):(e.consume(h),p)}function d(h){return h===45?(e.consume(h),f):p(h)}function f(h){return h===62?U(h):h===45?d(h):p(h)}function b(h){const oe="CDATA[";return h===oe.charCodeAt(l++)?(e.consume(h),l===oe.length?S:b):t(h)}function S(h){return h===null?t(h):h===93?(e.consume(h),T):v(h)?(o=S,X(h)):(e.consume(h),S)}function T(h){return h===93?(e.consume(h),y):S(h)}function y(h){return h===62?U(h):h===93?(e.consume(h),y):S(h)}function z(h){return h===null||h===62?U(h):v(h)?(o=z,X(h)):(e.consume(h),z)}function E(h){return h===null?t(h):h===63?(e.consume(h),j):v(h)?(o=E,X(h)):(e.consume(h),E)}function j(h){return h===62?U(h):E(h)}function M(h){return ce(h)?(e.consume(h),x):t(h)}function x(h){return h===45||re(h)?(e.consume(h),x):O(h)}function O(h){return v(h)?(o=O,X(h)):F(h)?(e.consume(h),O):U(h)}function V(h){return h===45||re(h)?(e.consume(h),V):h===47||h===62||Z(h)?R(h):t(h)}function R(h){return h===47?(e.consume(h),U):h===58||h===95||ce(h)?(e.consume(h),B):v(h)?(o=R,X(h)):F(h)?(e.consume(h),R):U(h)}function B(h){return h===45||h===46||h===58||h===95||re(h)?(e.consume(h),B):P(h)}function P(h){return h===61?(e.consume(h),N):v(h)?(o=P,X(h)):F(h)?(e.consume(h),P):R(h)}function N(h){return h===null||h===60||h===61||h===62||h===96?t(h):h===34||h===39?(e.consume(h),i=h,H):v(h)?(o=N,X(h)):F(h)?(e.consume(h),N):(e.consume(h),I)}function H(h){return h===i?(e.consume(h),i=void 0,C):h===null?t(h):v(h)?(o=H,X(h)):(e.consume(h),H)}function I(h){return h===null||h===34||h===39||h===60||h===61||h===96?t(h):h===47||h===62||Z(h)?R(h):(e.consume(h),I)}function C(h){return h===47||h===62||Z(h)?R(h):t(h)}function U(h){return h===62?(e.consume(h),e.exit("htmlTextData"),e.exit("htmlText"),n):t(h)}function X(h){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),le}function le(h){return F(h)?Y(e,fe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h):fe(h)}function fe(h){return e.enter("htmlTextData"),o(h)}}const _n={name:"labelEnd",resolveAll:Fl,resolveTo:jl,tokenize:Ml},_l={tokenize:Bl},Ol={tokenize:Vl},Rl={tokenize:Hl};function Fl(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&pe(e,0,e.length,t),e}function jl(e,n){let t=e.length,r=0,i,l,o,a;for(;t--;)if(i=e[t][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=t);const c={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[l][1].start},end:{...e[o][1].end}},s={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",c,n],["enter",u,n]],a=ie(a,e.slice(l+1,l+r+3)),a=ie(a,[["enter",s,n]]),a=ie(a,Dn(n.parser.constructs.insideSpan.null,e.slice(l+r+4,o-3),n)),a=ie(a,[["exit",s,n],e[o-2],e[o-1],["exit",u,n]]),a=ie(a,e.slice(o+1)),a=ie(a,[["exit",c,n]]),pe(e,l,e.length,a),e}function Ml(e,n,t){const r=this;let i=r.events.length,l,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return a;function a(d){return l?l._inactive?p(d):(o=r.parser.defined.includes(Ne(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),c):t(d)}function c(d){return d===40?e.attempt(_l,s,o?s:p)(d):d===91?e.attempt(Ol,s,o?u:p)(d):o?s(d):p(d)}function u(d){return e.attempt(Rl,s,p)(d)}function s(d){return n(d)}function p(d){return l._balanced=!0,t(d)}}function Bl(e,n,t){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),i}function i(p){return Z(p)?Ve(e,l)(p):l(p)}function l(p){return p===41?s(p):nr(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function o(p){return Z(p)?Ve(e,c)(p):s(p)}function a(p){return t(p)}function c(p){return p===34||p===39||p===40?rr(e,u,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):s(p)}function u(p){return Z(p)?Ve(e,s)(p):s(p)}function s(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),n):t(p)}}function Vl(e,n,t){const r=this;return i;function i(a){return tr.call(r,e,l,o,"reference","referenceMarker","referenceString")(a)}function l(a){return r.parser.defined.includes(Ne(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):t(a)}function o(a){return t(a)}}function Hl(e,n,t){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),n):t(l)}}const Ul={name:"labelStartImage",resolveAll:_n.resolveAll,tokenize:ql};function ql(e,n,t){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),l}function l(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),o):t(a)}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}const $l={name:"labelStartLink",resolveAll:_n.resolveAll,tokenize:Yl};function Yl(e,n,t){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),l}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(o):n(o)}}const an={name:"lineEnding",tokenize:Wl};function Wl(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Y(e,n,"linePrefix")}}const Qe={name:"thematicBreak",tokenize:Xl};function Xl(e,n,t){let r=0,i;return l;function l(u){return e.enter("thematicBreak"),o(u)}function o(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||v(u))?(e.exit("thematicBreak"),n(u)):t(u)}function c(u){return u===i?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),F(u)?Y(e,a,"whitespace")(u):a(u))}}const K={continuation:{tokenize:Gl},exit:eo,name:"list",tokenize:Kl},Jl={partial:!0,tokenize:no},Ql={partial:!0,tokenize:Zl};function Kl(e,n,t){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(f){const b=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:wn(f)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Qe,t,u)(f):u(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(f)}return t(f)}function c(f){return wn(f)&&++o<10?(e.consume(f),c):(!r.interrupt||o<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),u(f)):t(f)}function u(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(Ze,r.interrupt?t:s,e.attempt(Jl,d,p))}function s(f){return r.containerState.initialBlankLine=!0,l++,d(f)}function p(f){return F(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),d):t(f)}function d(f){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(f)}}function Gl(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Ze,i,l);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Y(e,n,"listItemIndent",r.containerState.size+1)(a)}function l(a){return r.containerState.furtherBlankLines||!F(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Ql,n,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Y(e,e.attempt(K,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Zl(e,n,t){const r=this;return Y(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(l):t(l)}}function eo(e){e.exit(this.containerState.type)}function no(e,n,t){const r=this;return Y(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!F(l)&&o&&o[1].type==="listItemPrefixWhitespace"?n(l):t(l)}}const pt={name:"setextUnderline",resolveTo:to,tokenize:ro};function to(e,n){let t=e.length,r,i,l;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!l&&e[t][1].type==="definition"&&(l=t);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,n]),e.splice(l+1,0,["exit",e[r][1],n]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,n]),e}function ro(e,n,t){const r=this;let i;return l;function l(u){let s=r.events.length,p;for(;s--;)if(r.events[s][1].type!=="lineEnding"&&r.events[s][1].type!=="linePrefix"&&r.events[s][1].type!=="content"){p=r.events[s][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),i=u,o(u)):t(u)}function o(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),F(u)?Y(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||v(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const io={tokenize:lo};function lo(e){const n=this,t=e.attempt(Ze,r,e.attempt(this.parser.constructs.flowInitial,i,Y(e,e.attempt(this.parser.constructs.flow,i,e.attempt(cl,i)),"linePrefix")));return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const oo={resolveAll:lr()},ao=ir("string"),uo=ir("text");function ir(e){return{resolveAll:lr(e==="text"?so:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],l=t.attempt(i,o,a);return o;function o(s){return u(s)?l(s):a(s)}function a(s){if(s===null){t.consume(s);return}return t.enter("data"),t.consume(s),c}function c(s){return u(s)?(t.exit("data"),l(s)):(t.consume(s),c)}function u(s){if(s===null)return!0;const p=i[s];let d=-1;if(p)for(;++d<p.length;){const f=p[d];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function lr(e){return n;function n(t,r){let i=-1,l;for(;++i<=t.length;)l===void 0?t[i]&&t[i][1].type==="data"&&(l=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==l+2&&(t[l][1].end=t[i-1][1].end,t.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(t,r):t}}function so(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],i=n.sliceStream(r);let l=i.length,o=-1,a=0,c;for(;l--;){const u=i[l];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(u===-2)c=!0,a++;else if(u!==-1){l++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(a=0),a){const u={type:t===e.length||c||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?o:r.start._bufferIndex+o,_index:r.start._index+l,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(t,0,["enter",u,n],["exit",u,n]),t+=2)}t++}return e}const co={42:K,43:K,45:K,48:K,49:K,50:K,51:K,52:K,53:K,54:K,55:K,56:K,57:K,62:Kt},po={91:dl},fo={[-2]:on,[-1]:on,32:on},ho={35:wl,42:Qe,45:[pt,Qe],60:Il,61:pt,95:Qe,96:st,126:st},mo={38:Zt,92:Gt},go={[-5]:an,[-4]:an,[-3]:an,33:Ul,38:Zt,42:Sn,60:[$i,Ll],91:$l,92:[kl,Gt],93:_n,95:Sn,96:il},yo={null:[Sn,oo]},xo={null:[42,95]},ko={null:[]},bo=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:xo,contentInitial:po,disable:ko,document:co,flow:ho,flowInitial:fo,insideSpan:yo,string:mo,text:go},Symbol.toStringTag,{value:"Module"}));function wo(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},l=[];let o=[],a=[];const c={attempt:O(M),check:O(x),consume:z,enter:E,exit:j,interrupt:O(x,{interrupt:!0})},u={code:null,containerState:{},defineSkip:S,events:[],now:b,parser:e,previous:null,sliceSerialize:d,sliceStream:f,write:p};let s=n.tokenize.call(u,c);return n.resolveAll&&l.push(n),u;function p(P){return o=ie(o,P),T(),o[o.length-1]!==null?[]:(V(n,0),u.events=Dn(l,u.events,u),u.events)}function d(P,N){return Co(f(P),N)}function f(P){return So(o,P)}function b(){const{_bufferIndex:P,_index:N,line:H,column:I,offset:C}=r;return{_bufferIndex:P,_index:N,line:H,column:I,offset:C}}function S(P){i[P.line]=P.column,B()}function T(){let P;for(;r._index<o.length;){const N=o[r._index];if(typeof N=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<N.length;)y(N.charCodeAt(r._bufferIndex));else y(N)}}function y(P){s=s(P)}function z(P){v(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,B()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=P}function E(P,N){const H=N||{};return H.type=P,H.start=b(),u.events.push(["enter",H,u]),a.push(H),H}function j(P){const N=a.pop();return N.end=b(),u.events.push(["exit",N,u]),N}function M(P,N){V(P,N.from)}function x(P,N){N.restore()}function O(P,N){return H;function H(I,C,U){let X,le,fe,h;return Array.isArray(I)?he(I):"tokenize"in I?he([I]):oe(I);function oe(J){return Le;function Le(ge){const Se=ge!==null&&J[ge],Ce=ge!==null&&J.null,Ye=[...Array.isArray(Se)?Se:Se?[Se]:[],...Array.isArray(Ce)?Ce:Ce?[Ce]:[]];return he(Ye)(ge)}}function he(J){return X=J,le=0,J.length===0?U:m(J[le])}function m(J){return Le;function Le(ge){return h=R(),fe=J,J.partial||(u.currentConstruct=J),J.name&&u.parser.constructs.disable.null.includes(J.name)?ke():J.tokenize.call(N?Object.assign(Object.create(u),N):u,c,ae,ke)(ge)}}function ae(J){return P(fe,h),C}function ke(J){return h.restore(),++le<X.length?m(X[le]):U}}}function V(P,N){P.resolveAll&&!l.includes(P)&&l.push(P),P.resolve&&pe(u.events,N,u.events.length-N,P.resolve(u.events.slice(N),u)),P.resolveTo&&(u.events=P.resolveTo(u.events,u))}function R(){const P=b(),N=u.previous,H=u.currentConstruct,I=u.events.length,C=Array.from(a);return{from:I,restore:U};function U(){r=P,u.previous=N,u.currentConstruct=H,u.events.length=I,a=C,B()}}function B(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function So(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,l=n.end._bufferIndex;let o;if(t===i)o=[e[t].slice(r,l)];else{if(o=e.slice(t,i),r>-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function Co(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const l=e[t];let o;if(typeof l=="string")o=l;else switch(l){case-5:{o="\r";break}case-4:{o=`
|
|
3
|
+
`;break}case-3:{o=`\r
|
|
4
|
+
`;break}case-2:{o=n?" ":" ";break}case-1:{if(!n&&i)continue;o=" ";break}default:o=String.fromCharCode(l)}i=l===-2,r.push(o)}return r.join("")}function Eo(e){const r={constructs:zi([bo,...(e||{}).extensions||[]]),content:i(ji),defined:[],document:i(Bi),flow:i(io),lazy:{},string:i(ao),text:i(uo)};return r;function i(l){return o;function o(a){return wo(r,l,a)}}}function Io(e){for(;!er(e););return e}const ft=/[\0\t\n\r]/g;function To(){let e=1,n="",t=!0,r;return i;function i(l,o,a){const c=[];let u,s,p,d,f;for(l=n+(typeof l=="string"?l.toString():new TextDecoder(o||void 0).decode(l)),p=0,n="",t&&(l.charCodeAt(0)===65279&&p++,t=void 0);p<l.length;){if(ft.lastIndex=p,u=ft.exec(l),d=u&&u.index!==void 0?u.index:l.length,f=l.charCodeAt(d),!u){n=l.slice(p);break}if(f===10&&p===d&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),p<d&&(c.push(l.slice(p,d)),e+=d-p),f){case 0:{c.push(65533),e++;break}case 9:{for(s=Math.ceil(e/4)*4,c.push(-2);e++<s;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}p=d+1}return a&&(r&&c.push(-5),n&&c.push(n),c.push(null)),c}}const Ao=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Po(e){return e.replace(Ao,No)}function No(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),l=i===120||i===88;return Qt(t.slice(l?2:1),l?16:10)}return Ln(t)||e}const or={}.hasOwnProperty;function zo(e,n,t){return typeof n!="string"&&(t=n,n=void 0),vo(t)(Io(Eo(t).document().write(To()(e,n,!0))))}function vo(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Un),autolinkProtocol:R,autolinkEmail:R,atxHeading:l(Bn),blockQuote:l(Ce),characterEscape:R,characterReference:R,codeFenced:l(Ye),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:l(Ye,o),codeText:l(wr,o),codeTextData:R,data:R,codeFlowValue:R,definition:l(Sr),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:l(Cr),hardBreakEscape:l(Vn),hardBreakTrailing:l(Vn),htmlFlow:l(Hn,o),htmlFlowData:R,htmlText:l(Hn,o),htmlTextData:R,image:l(Er),label:o,link:l(Un),listItem:l(Ir),listItemValue:d,listOrdered:l(qn,p),listUnordered:l(qn),paragraph:l(Tr),reference:m,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:l(Bn),strong:l(Ar),thematicBreak:l(Nr)},exit:{atxHeading:c(),atxHeadingSequence:M,autolink:c(),autolinkEmail:Se,autolinkProtocol:ge,blockQuote:c(),characterEscapeValue:B,characterReferenceMarkerHexadecimal:ke,characterReferenceMarkerNumeric:ke,characterReferenceValue:J,characterReference:Le,codeFenced:c(T),codeFencedFence:S,codeFencedFenceInfo:f,codeFencedFenceMeta:b,codeFlowValue:B,codeIndented:c(y),codeText:c(C),codeTextData:B,data:B,definition:c(),definitionDestinationString:j,definitionLabelString:z,definitionTitleString:E,emphasis:c(),hardBreakEscape:c(N),hardBreakTrailing:c(N),htmlFlow:c(H),htmlFlowData:B,htmlText:c(I),htmlTextData:B,image:c(X),label:fe,labelText:le,lineEnding:P,link:c(U),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ae,resourceDestinationString:h,resourceTitleString:oe,resource:he,setextHeading:c(V),setextHeadingLineSequence:O,setextHeadingText:x,strong:c(),thematicBreak:c()}};ar(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(g){let w={type:"root",children:[]};const L={stack:[w],tokenStack:[],config:n,enter:a,exit:u,buffer:o,resume:s,data:t},_=[];let q=-1;for(;++q<g.length;)if(g[q][1].type==="listOrdered"||g[q][1].type==="listUnordered")if(g[q][0]==="enter")_.push(q);else{const ue=_.pop();q=i(g,ue,q)}for(q=-1;++q<g.length;){const ue=n[g[q][0]];or.call(ue,g[q][1].type)&&ue[g[q][1].type].call(Object.assign({sliceSerialize:g[q][2].sliceSerialize},L),g[q][1])}if(L.tokenStack.length>0){const ue=L.tokenStack[L.tokenStack.length-1];(ue[1]||ht).call(L,void 0,ue[0])}for(w.position={start:ye(g.length>0?g[0][1].start:{line:1,column:1,offset:0}),end:ye(g.length>0?g[g.length-2][1].end:{line:1,column:1,offset:0})},q=-1;++q<n.transforms.length;)w=n.transforms[q](w)||w;return w}function i(g,w,L){let _=w-1,q=-1,ue=!1,be,me,De,_e;for(;++_<=L;){const ne=g[_];switch(ne[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ne[0]==="enter"?q++:q--,_e=void 0;break}case"lineEndingBlank":{ne[0]==="enter"&&(be&&!_e&&!q&&!De&&(De=_),_e=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:_e=void 0}if(!q&&ne[0]==="enter"&&ne[1].type==="listItemPrefix"||q===-1&&ne[0]==="exit"&&(ne[1].type==="listUnordered"||ne[1].type==="listOrdered")){if(be){let Ee=_;for(me=void 0;Ee--;){const de=g[Ee];if(de[1].type==="lineEnding"||de[1].type==="lineEndingBlank"){if(de[0]==="exit")continue;me&&(g[me][1].type="lineEndingBlank",ue=!0),de[1].type="lineEnding",me=Ee}else if(!(de[1].type==="linePrefix"||de[1].type==="blockQuotePrefix"||de[1].type==="blockQuotePrefixWhitespace"||de[1].type==="blockQuoteMarker"||de[1].type==="listItemIndent"))break}De&&(!me||De<me)&&(be._spread=!0),be.end=Object.assign({},me?g[me][1].start:ne[1].end),g.splice(me||_,0,["exit",be,ne[2]]),_++,L++}if(ne[1].type==="listItemPrefix"){const Ee={type:"listItem",_spread:!1,start:Object.assign({},ne[1].start),end:void 0};be=Ee,g.splice(_,0,["enter",Ee,ne[2]]),_++,L++,De=void 0,_e=!0}}}return g[w][1]._spread=ue,L}function l(g,w){return L;function L(_){a.call(this,g(_),_),w&&w.call(this,_)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(g,w,L){this.stack[this.stack.length-1].children.push(g),this.stack.push(g),this.tokenStack.push([w,L||void 0]),g.position={start:ye(w.start),end:void 0}}function c(g){return w;function w(L){g&&g.call(this,L),u.call(this,L)}}function u(g,w){const L=this.stack.pop(),_=this.tokenStack.pop();if(_)_[0].type!==g.type&&(w?w.call(this,g,_[0]):(_[1]||ht).call(this,g,_[0]));else throw new Error("Cannot close `"+g.type+"` ("+Be({start:g.start,end:g.end})+"): it’s not open");L.position.end=ye(g.end)}function s(){return Pi(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function d(g){if(this.data.expectingFirstListItemValue){const w=this.stack[this.stack.length-2];w.start=Number.parseInt(this.sliceSerialize(g),10),this.data.expectingFirstListItemValue=void 0}}function f(){const g=this.resume(),w=this.stack[this.stack.length-1];w.lang=g}function b(){const g=this.resume(),w=this.stack[this.stack.length-1];w.meta=g}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const g=this.resume(),w=this.stack[this.stack.length-1];w.value=g.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const g=this.resume(),w=this.stack[this.stack.length-1];w.value=g.replace(/(\r?\n|\r)$/g,"")}function z(g){const w=this.resume(),L=this.stack[this.stack.length-1];L.label=w,L.identifier=Ne(this.sliceSerialize(g)).toLowerCase()}function E(){const g=this.resume(),w=this.stack[this.stack.length-1];w.title=g}function j(){const g=this.resume(),w=this.stack[this.stack.length-1];w.url=g}function M(g){const w=this.stack[this.stack.length-1];if(!w.depth){const L=this.sliceSerialize(g).length;w.depth=L}}function x(){this.data.setextHeadingSlurpLineEnding=!0}function O(g){const w=this.stack[this.stack.length-1];w.depth=this.sliceSerialize(g).codePointAt(0)===61?1:2}function V(){this.data.setextHeadingSlurpLineEnding=void 0}function R(g){const L=this.stack[this.stack.length-1].children;let _=L[L.length-1];(!_||_.type!=="text")&&(_=Pr(),_.position={start:ye(g.start),end:void 0},L.push(_)),this.stack.push(_)}function B(g){const w=this.stack.pop();w.value+=this.sliceSerialize(g),w.position.end=ye(g.end)}function P(g){const w=this.stack[this.stack.length-1];if(this.data.atHardBreak){const L=w.children[w.children.length-1];L.position.end=ye(g.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(w.type)&&(R.call(this,g),B.call(this,g))}function N(){this.data.atHardBreak=!0}function H(){const g=this.resume(),w=this.stack[this.stack.length-1];w.value=g}function I(){const g=this.resume(),w=this.stack[this.stack.length-1];w.value=g}function C(){const g=this.resume(),w=this.stack[this.stack.length-1];w.value=g}function U(){const g=this.stack[this.stack.length-1];if(this.data.inReference){const w=this.data.referenceType||"shortcut";g.type+="Reference",g.referenceType=w,delete g.url,delete g.title}else delete g.identifier,delete g.label;this.data.referenceType=void 0}function X(){const g=this.stack[this.stack.length-1];if(this.data.inReference){const w=this.data.referenceType||"shortcut";g.type+="Reference",g.referenceType=w,delete g.url,delete g.title}else delete g.identifier,delete g.label;this.data.referenceType=void 0}function le(g){const w=this.sliceSerialize(g),L=this.stack[this.stack.length-2];L.label=Po(w),L.identifier=Ne(w).toLowerCase()}function fe(){const g=this.stack[this.stack.length-1],w=this.resume(),L=this.stack[this.stack.length-1];if(this.data.inReference=!0,L.type==="link"){const _=g.children;L.children=_}else L.alt=w}function h(){const g=this.resume(),w=this.stack[this.stack.length-1];w.url=g}function oe(){const g=this.resume(),w=this.stack[this.stack.length-1];w.title=g}function he(){this.data.inReference=void 0}function m(){this.data.referenceType="collapsed"}function ae(g){const w=this.resume(),L=this.stack[this.stack.length-1];L.label=w,L.identifier=Ne(this.sliceSerialize(g)).toLowerCase(),this.data.referenceType="full"}function ke(g){this.data.characterReferenceType=g.type}function J(g){const w=this.sliceSerialize(g),L=this.data.characterReferenceType;let _;L?(_=Qt(w,L==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):_=Ln(w);const q=this.stack[this.stack.length-1];q.value+=_}function Le(g){const w=this.stack.pop();w.position.end=ye(g.end)}function ge(g){B.call(this,g);const w=this.stack[this.stack.length-1];w.url=this.sliceSerialize(g)}function Se(g){B.call(this,g);const w=this.stack[this.stack.length-1];w.url="mailto:"+this.sliceSerialize(g)}function Ce(){return{type:"blockquote",children:[]}}function Ye(){return{type:"code",lang:null,meta:null,value:""}}function wr(){return{type:"inlineCode",value:""}}function Sr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Cr(){return{type:"emphasis",children:[]}}function Bn(){return{type:"heading",depth:0,children:[]}}function Vn(){return{type:"break"}}function Hn(){return{type:"html",value:""}}function Er(){return{type:"image",title:null,url:"",alt:null}}function Un(){return{type:"link",title:null,url:"",children:[]}}function qn(g){return{type:"list",ordered:g.type==="listOrdered",start:null,spread:g._spread,children:[]}}function Ir(g){return{type:"listItem",spread:g._spread,checked:null,children:[]}}function Tr(){return{type:"paragraph",children:[]}}function Ar(){return{type:"strong",children:[]}}function Pr(){return{type:"text",value:""}}function Nr(){return{type:"thematicBreak"}}}function ye(e){return{line:e.line,column:e.column,offset:e.offset}}function ar(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?ar(e,r):Lo(e,r)}}function Lo(e,n){let t;for(t in n)if(or.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function ht(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Be({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Be({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Be({start:n.start,end:n.end})+") is still open")}function Do(e){const n=this;n.parser=t;function t(r){return zo(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function _o(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function Oo(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
|
|
5
|
+
`}]}function Ro(e,n){const t=n.value?n.value+`
|
|
6
|
+
`:"",r={},i=n.lang?n.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(l.data={meta:n.meta}),e.patch(n,l),l=e.applyData(n,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(n,l),l}function Fo(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function jo(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Mo(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),i=ve(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let o,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=l+1,a+=1,e.footnoteCounts.set(r,a);const c={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+i,id:t+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(n,u),e.applyData(n,u)}function Bo(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Vo(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function ur(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const i=e.all(n),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function Ho(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return ur(e,n);const i={src:ve(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,l),e.applyData(n,l)}function Uo(e,n){const t={src:ve(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function qo(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function $o(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return ur(e,n);const i={href:ve(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function Yo(e,n){const t={href:ve(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Wo(e,n,t){const r=e.all(n),i=t?Xo(t):sr(n),l={},o=[];if(typeof n.checked=="boolean"){const s=r[0];let p;s&&s.type==="element"&&s.tagName==="p"?p=s:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const s=r[a];(i||a!==0||s.type!=="element"||s.tagName!=="p")&&o.push({type:"text",value:`
|
|
7
|
+
`}),s.type==="element"&&s.tagName==="p"&&!i?o.push(...s.children):o.push(s)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
|
|
8
|
+
`});const u={type:"element",tagName:"li",properties:l,children:o};return e.patch(n,u),e.applyData(n,u)}function Xo(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r<t.length;)n=sr(t[r])}return n}function sr(e){const n=e.spread;return n??e.children.length>1}function Jo(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const l={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,l),e.applyData(n,l)}function Qo(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Ko(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function Go(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Zo(e,n){const t=e.all(n),r=t.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],o),i.push(o)}if(t.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},a=Pn(n.children[1]),c=Ut(n.children[n.children.length-1]);a&&c&&(o.position={start:a,end:c}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,l),e.applyData(n,l)}function ea(e,n,t){const r=t?t.children:void 0,l=(r?r.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,a=o?o.length:n.children.length;let c=-1;const u=[];for(;++c<a;){const p=n.children[c],d={},f=o?o[c]:void 0;f&&(d.align=f);let b={type:"element",tagName:l,properties:d,children:[]};p&&(b.children=e.all(p),e.patch(p,b),b=e.applyData(p,b)),u.push(b)}const s={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(n,s),e.applyData(n,s)}function na(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const mt=9,dt=32;function ta(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),i=0;const l=[];for(;r;)l.push(gt(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return l.push(gt(n.slice(i),i>0,!1)),l.join("")}function gt(e,n,t){let r=0,i=e.length;if(n){let l=e.codePointAt(r);for(;l===mt||l===dt;)r++,l=e.codePointAt(r)}if(t){let l=e.codePointAt(i-1);for(;l===mt||l===dt;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function ra(e,n){const t={type:"text",value:ta(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function ia(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const la={blockquote:_o,break:Oo,code:Ro,delete:Fo,emphasis:jo,footnoteReference:Mo,heading:Bo,html:Vo,imageReference:Ho,image:Uo,inlineCode:qo,linkReference:$o,link:Yo,listItem:Wo,list:Jo,paragraph:Qo,root:Ko,strong:Go,table:Zo,tableCell:na,tableRow:ea,text:ra,thematicBreak:ia,toml:We,yaml:We,definition:We,footnoteDefinition:We};function We(){}const cr=-1,en=0,He=1,Ke=2,On=3,Rn=4,Fn=5,jn=6,pr=7,fr=8,yt=typeof self=="object"?self:globalThis,oa=(e,n)=>{const t=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,o]=n[i];switch(l){case en:case cr:return t(o,i);case He:{const a=t([],i);for(const c of o)a.push(r(c));return a}case Ke:{const a=t({},i);for(const[c,u]of o)a[r(c)]=r(u);return a}case On:return t(new Date(o),i);case Rn:{const{source:a,flags:c}=o;return t(new RegExp(a,c),i)}case Fn:{const a=t(new Map,i);for(const[c,u]of o)a.set(r(c),r(u));return a}case jn:{const a=t(new Set,i);for(const c of o)a.add(r(c));return a}case pr:{const{name:a,message:c}=o;return t(new yt[a](c),i)}case fr:return t(BigInt(o),i);case"BigInt":return t(Object(BigInt(o)),i);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:a}=new Uint8Array(o);return t(new DataView(a),o)}}return t(new yt[l](o),i)};return r},xt=e=>oa(new Map,e)(0),Te="",{toString:aa}={},{keys:ua}=Object,je=e=>{const n=typeof e;if(n!=="object"||!e)return[en,n];const t=aa.call(e).slice(8,-1);switch(t){case"Array":return[He,Te];case"Object":return[Ke,Te];case"Date":return[On,Te];case"RegExp":return[Rn,Te];case"Map":return[Fn,Te];case"Set":return[jn,Te];case"DataView":return[He,t]}return t.includes("Array")?[He,t]:t.includes("Error")?[pr,t]:[Ke,t]},Xe=([e,n])=>e===en&&(n==="function"||n==="symbol"),sa=(e,n,t,r)=>{const i=(o,a)=>{const c=r.push(o)-1;return t.set(a,c),c},l=o=>{if(t.has(o))return t.get(o);let[a,c]=je(o);switch(a){case en:{let s=o;switch(c){case"bigint":a=fr,s=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);s=null;break;case"undefined":return i([cr],o)}return i([a,s],o)}case He:{if(c){let d=o;return c==="DataView"?d=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(d=new Uint8Array(o)),i([c,[...d]],o)}const s=[],p=i([a,s],o);for(const d of o)s.push(l(d));return p}case Ke:{if(c)switch(c){case"BigInt":return i([c,o.toString()],o);case"Boolean":case"Number":case"String":return i([c,o.valueOf()],o)}if(n&&"toJSON"in o)return l(o.toJSON());const s=[],p=i([a,s],o);for(const d of ua(o))(e||!Xe(je(o[d])))&&s.push([l(d),l(o[d])]);return p}case On:return i([a,o.toISOString()],o);case Rn:{const{source:s,flags:p}=o;return i([a,{source:s,flags:p}],o)}case Fn:{const s=[],p=i([a,s],o);for(const[d,f]of o)(e||!(Xe(je(d))||Xe(je(f))))&&s.push([l(d),l(f)]);return p}case jn:{const s=[],p=i([a,s],o);for(const d of o)(e||!Xe(je(d)))&&s.push(l(d));return p}}const{message:u}=o;return i([a,{name:c,message:u}],o)};return l},kt=(e,{json:n,lossy:t}={})=>{const r=[];return sa(!(n||t),!!n,new Map,r)(e),r},Ge=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?xt(kt(e,n)):structuredClone(e):(e,n)=>xt(kt(e,n));function ca(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function pa(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function fa(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||ca,r=e.options.footnoteBackLabel||pa,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let c=-1;for(;++c<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[c]);if(!u)continue;const s=e.all(u),p=String(u.identifier).toUpperCase(),d=ve(p.toLowerCase());let f=0;const b=[],S=e.footnoteCounts.get(p);for(;S!==void 0&&++f<=S;){b.length>0&&b.push({type:"text",value:" "});let z=typeof t=="string"?t:t(c,f);typeof z=="string"&&(z={type:"text",value:z}),b.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+d+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,f),className:["data-footnote-backref"]},children:Array.isArray(z)?z:[z]})}const T=s[s.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const z=T.children[T.children.length-1];z&&z.type==="text"?z.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...b)}else s.push(...b);const y={type:"element",tagName:"li",properties:{id:n+"fn-"+d},children:e.wrap(s,!0)};e.patch(u,y),a.push(y)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Ge(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
9
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
|
|
10
|
+
`}]}}const hr=(function(e){if(e==null)return ga;if(typeof e=="function")return nn(e);if(typeof e=="object")return Array.isArray(e)?ha(e):ma(e);if(typeof e=="string")return da(e);throw new Error("Expected function, string, or object as test")});function ha(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=hr(e[t]);return nn(r);function r(...i){let l=-1;for(;++l<n.length;)if(n[l].apply(this,i))return!0;return!1}}function ma(e){const n=e;return nn(t);function t(r){const i=r;let l;for(l in e)if(i[l]!==n[l])return!1;return!0}}function da(e){return nn(n);function n(t){return t&&t.type===e}}function nn(e){return n;function n(t,r,i){return!!(ya(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function ga(){return!0}function ya(e){return e!==null&&typeof e=="object"&&"type"in e}const mr=[],xa=!0,bt=!1,ka="skip";function ba(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;const l=hr(i),o=r?-1:1;a(e,void 0,[])();function a(c,u,s){const p=c&&typeof c=="object"?c:{};if(typeof p.type=="string"){const f=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(c.type+(f?"<"+f+">":""))+")"})}return d;function d(){let f=mr,b,S,T;if((!n||l(c,u,s[s.length-1]||void 0))&&(f=wa(t(c,s)),f[0]===bt))return f;if("children"in c&&c.children){const y=c;if(y.children&&f[0]!==ka)for(S=(r?y.children.length:-1)+o,T=s.concat(y);S>-1&&S<y.children.length;){const z=y.children[S];if(b=a(z,S,T)(),b[0]===bt)return b;S=typeof b[1]=="number"?b[1]:S+o}}return f}}}function wa(e){return Array.isArray(e)?e:typeof e=="number"?[xa,e]:e==null?mr:[e]}function dr(e,n,t,r){let i,l,o;typeof n=="function"&&typeof t!="function"?(l=void 0,o=n,i=t):(l=n,o=t,i=r),ba(e,l,a,i);function a(c,u){const s=u[u.length-1],p=s?s.children.indexOf(c):void 0;return o(c,p,s)}}const Cn={}.hasOwnProperty,Sa={};function Ca(e,n){const t=n||Sa,r=new Map,i=new Map,l=new Map,o={...la,...t.handlers},a={all:u,applyData:Ia,definitionById:r,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:o,one:c,options:t,patch:Ea,wrap:Aa};return dr(e,function(s){if(s.type==="definition"||s.type==="footnoteDefinition"){const p=s.type==="definition"?r:i,d=String(s.identifier).toUpperCase();p.has(d)||p.set(d,s)}}),a;function c(s,p){const d=s.type,f=a.handlers[d];if(Cn.call(a.handlers,d)&&f)return f(a,s,p);if(a.options.passThrough&&a.options.passThrough.includes(d)){if("children"in s){const{children:S,...T}=s,y=Ge(T);return y.children=a.all(s),y}return Ge(s)}return(a.options.unknownHandler||Ta)(a,s,p)}function u(s){const p=[];if("children"in s){const d=s.children;let f=-1;for(;++f<d.length;){const b=a.one(d[f],s);if(b){if(f&&d[f-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=wt(b.value)),!Array.isArray(b)&&b.type==="element")){const S=b.children[0];S&&S.type==="text"&&(S.value=wt(S.value))}Array.isArray(b)?p.push(...b):p.push(b)}}}return p}}function Ea(e,n){e.position&&(n.position=oi(e))}function Ia(e,n){let t=n;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{const o="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:o}}t.type==="element"&&l&&Object.assign(t.properties,Ge(l)),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function Ta(e,n){const t=n.data||{},r="value"in n&&!(Cn.call(t,"hProperties")||Cn.call(t,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Aa(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
|
|
11
|
+
`});++r<e.length;)r&&t.push({type:"text",value:`
|
|
12
|
+
`}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
|
|
13
|
+
`}),t}function wt(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function St(e,n){const t=Ca(e,n),r=t.one(e,void 0),i=fa(t),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
|
|
14
|
+
`},i),l}function Pa(e,n){return e&&"run"in e?async function(t,r){const i=St(t,{file:r,...n});await e.run(i,r)}:function(t,r){return St(t,{file:r,...e||n})}}function Ct(e){if(e)throw e}var un,Et;function Na(){if(Et)return un;Et=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):n.call(u)==="[object Array]"},l=function(u){if(!u||n.call(u)!=="[object Object]")return!1;var s=e.call(u,"constructor"),p=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!s&&!p)return!1;var d;for(d in u);return typeof d>"u"||e.call(u,d)},o=function(u,s){t&&s.name==="__proto__"?t(u,s.name,{enumerable:!0,configurable:!0,value:s.newValue,writable:!0}):u[s.name]=s.newValue},a=function(u,s){if(s==="__proto__")if(e.call(u,s)){if(r)return r(u,s).value}else return;return u[s]};return un=function c(){var u,s,p,d,f,b,S=arguments[0],T=1,y=arguments.length,z=!1;for(typeof S=="boolean"&&(z=S,S=arguments[1]||{},T=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});T<y;++T)if(u=arguments[T],u!=null)for(s in u)p=a(S,s),d=a(u,s),S!==d&&(z&&d&&(l(d)||(f=i(d)))?(f?(f=!1,b=p&&i(p)?p:[]):b=p&&l(p)?p:{},o(S,{name:s,newValue:c(z,b,d)})):typeof d<"u"&&o(S,{name:s,newValue:d}));return S},un}var za=Na();const sn=Dt(za);function En(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function va(){const e=[],n={run:t,use:r};return n;function t(...i){let l=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(c,...u){const s=e[++l];let p=-1;if(c){o(c);return}for(;++p<i.length;)(u[p]===null||u[p]===void 0)&&(u[p]=i[p]);i=u,s?La(s,a)(...u):o(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function La(e,n){let t;return r;function r(...o){const a=e.length>o.length;let c;a&&o.push(i);try{c=e.apply(this,o)}catch(u){const s=u;if(a&&t)throw s;return i(s)}a||(c&&c.then&&typeof c.then=="function"?c.then(l,i):c instanceof Error?i(c):l(c))}function i(o,...a){t||(t=!0,n(o,...a))}function l(o){i(null,o)}}const se={basename:Da,dirname:_a,extname:Oa,join:Ra,sep:"/"};function Da(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');$e(e);let t=0,r=-1,i=e.length,l;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let o=-1,a=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else o<0&&(l=!0,o=i+1),a>-1&&(e.codePointAt(i)===n.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return t===r?r=o:r<0&&(r=e.length),e.slice(t,r)}function _a(e){if($e(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Oa(e){$e(e);let n=e.length,t=-1,r=0,i=-1,l=0,o;for(;n--;){const a=e.codePointAt(n);if(a===47){if(o){r=n+1;break}continue}t<0&&(o=!0,t=n+1),a===46?i<0?i=n:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||t<0||l===0||l===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function Ra(...e){let n=-1,t;for(;++n<e.length;)$e(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":Fa(t)}function Fa(e){$e(e);const n=e.codePointAt(0)===47;let t=ja(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function ja(e,n){let t="",r=0,i=-1,l=0,o=-1,a,c;for(;++o<=e.length;){if(o<e.length)a=e.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||l===1))if(i!==o-1&&l===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",r=0):(t=t.slice(0,c),r=t.length-1-t.lastIndexOf("/")),i=o,l=0;continue}}else if(t.length>0){t="",r=0,i=o,l=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,o):t=e.slice(i+1,o),r=o-i-1;i=o,l=0}else a===46&&l>-1?l++:l=-1}return t}function $e(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Ma={cwd:Ba};function Ba(){return"/"}function In(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Va(e){if(typeof e=="string")e=new URL(e);else if(!In(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return Ha(e)}function Ha(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){const r=n.codePointAt(t+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(n)}const cn=["history","path","basename","stem","extname","dirname"];class gr{constructor(n){let t;n?In(n)?t={path:n}:typeof n=="string"||Ua(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":Ma.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<cn.length;){const l=cn[r];l in t&&t[l]!==void 0&&t[l]!==null&&(this[l]=l==="history"?[...t[l]]:t[l])}let i;for(i in t)cn.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?se.basename(this.path):void 0}set basename(n){fn(n,"basename"),pn(n,"basename"),this.path=se.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?se.dirname(this.path):void 0}set dirname(n){It(this.basename,"dirname"),this.path=se.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?se.extname(this.path):void 0}set extname(n){if(pn(n,"extname"),It(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=se.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){In(n)&&(n=Va(n)),fn(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?se.basename(this.path,this.extname):void 0}set stem(n){fn(n,"stem"),pn(n,"stem"),this.path=se.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){const i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){const i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){const i=new Q(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function pn(e,n){if(e&&e.includes(se.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+se.sep+"`")}function fn(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function It(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function Ua(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const qa=(function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l}),$a={}.hasOwnProperty;class Mn extends qa{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=va()}copy(){const n=new Mn;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(sn(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(dn("data",this.frozen),this.namespace[n]=t,this):$a.call(this.namespace,n)&&this.namespace[n]||void 0:n?(dn("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=Je(n),r=this.parser||this.Parser;return hn("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),hn("process",this.parser||this.Parser),mn("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(l,o){const a=Je(n),c=r.parse(a);r.run(c,a,function(s,p,d){if(s||!p||!d)return u(s);const f=p,b=r.stringify(f,d);Xa(b)?d.value=b:d.result=b,u(s,d)});function u(s,p){s||!p?o(s):l?l(p):t(void 0,p)}}}processSync(n){let t=!1,r;return this.freeze(),hn("processSync",this.parser||this.Parser),mn("processSync",this.compiler||this.Compiler),this.process(n,i),At("processSync","process",t),r;function i(l,o){t=!0,Ct(l),r=o}}run(n,t,r){Tt(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?l(void 0,r):new Promise(l);function l(o,a){const c=Je(t);i.run(n,c,u);function u(s,p,d){const f=p||n;s?a(s):o?o(f):r(void 0,f,d)}}}runSync(n,t){let r=!1,i;return this.run(n,t,l),At("runSync","run",r),i;function l(o,a){Ct(o),i=a,r=!0}}stringify(n,t){this.freeze();const r=Je(t),i=this.compiler||this.Compiler;return mn("stringify",i),Tt(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if(dn("use",this.frozen),n!=null)if(typeof n=="function")c(n,t);else if(typeof n=="object")Array.isArray(n)?a(n):o(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function l(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[s,...p]=u;c(s,p)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(u.plugins),u.settings&&(i.settings=sn(!0,i.settings,u.settings))}function a(u){let s=-1;if(u!=null)if(Array.isArray(u))for(;++s<u.length;){const p=u[s];l(p)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,s){let p=-1,d=-1;for(;++p<r.length;)if(r[p][0]===u){d=p;break}if(d===-1)r.push([u,...s]);else if(s.length>0){let[f,...b]=s;const S=r[d][1];En(S)&&En(f)&&(f=sn(!0,S,f)),r[d]=[u,f,...b]}}}}const Ya=new Mn().freeze();function hn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function mn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function dn(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Tt(e){if(!En(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function At(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Je(e){return Wa(e)?e:new gr(e)}function Wa(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Xa(e){return typeof e=="string"||Ja(e)}function Ja(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Qa="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Pt=[],Nt={allowDangerousHtml:!0},Ka=/^(https?|ircs?|mailto|xmpp)$/i,Ga=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function zt(e){const n=Za(e),t=eu(e);return nu(n.runSync(n.parse(t),t),e)}function Za(e){const n=e.rehypePlugins||Pt,t=e.remarkPlugins||Pt,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Nt}:Nt;return Ya().use(Do).use(t).use(Pa,r).use(n)}function eu(e){const n=e.children||"",t=new gr;return typeof n=="string"&&(t.value=n),t}function nu(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,l=n.disallowedElements,o=n.skipHtml,a=n.unwrapDisallowed,c=n.urlTransform||tu;for(const s of Ga)Object.hasOwn(n,s.from)&&(""+s.from+(s.to?"use `"+s.to+"` instead":"remove it")+Qa+s.id,void 0);return dr(e,u),pi(e,{Fragment:A.Fragment,components:i,ignoreInvalidStyle:!0,jsx:A.jsx,jsxs:A.jsxs,passKeys:!0,passNode:!0});function u(s,p,d){if(s.type==="raw"&&d&&typeof p=="number")return o?d.children.splice(p,1):d.children[p]={type:"text",value:s.value},p;if(s.type==="element"){let f;for(f in ln)if(Object.hasOwn(ln,f)&&Object.hasOwn(s.properties,f)){const b=s.properties[f],S=ln[f];(S===null||S.includes(s.tagName))&&(s.properties[f]=c(String(b||""),f,s))}}if(s.type==="element"){let f=t?!t.includes(s.tagName):l?l.includes(s.tagName):!1;if(!f&&r&&typeof p=="number"&&(f=!r(s,p,d)),f&&d&&typeof p=="number")return a&&s.children?d.children.splice(p,1,...s.children):d.children.splice(p,1),p}}}function tu(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return n===-1||i!==-1&&n>i||t!==-1&&n>t||r!==-1&&n>r||Ka.test(e.slice(0,n))?e:""}function yr(e){if(e===null)return"null";if(Array.isArray(e))return"array";switch(typeof e){case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"object":return"object";case"bigint":case"symbol":case"undefined":case"function":return"object"}}function Me(e){return e!==null&&(Array.isArray(e)||typeof e=="object")}function xr(e){return Array.isArray(e)?e.map((n,t)=>[String(t),n]):typeof e=="object"&&e!==null?Object.entries(e):[]}const vt=120;function ru({text:e}){const[n,t]=G.useState(!1);return e.length>vt?A.jsxs("span",{className:"text-emerald-400 break-all",children:['"',n?A.jsx("span",{className:"cursor-pointer prose prose-sm dark:prose-invert inline max-w-none [&_p]:inline [&_p]:my-0 [&_code]:text-emerald-300 [&_a]:text-emerald-300",onClick:i=>{i.stopPropagation(),t(!1)},onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&(i.stopPropagation(),t(!1))},role:"button",tabIndex:0,children:A.jsx(zt,{children:e})}):A.jsxs(Dr,{delayDuration:300,children:[A.jsxs(_r,{onClick:i=>{i.stopPropagation(),t(!0)},className:"text-left cursor-pointer",children:[A.jsx("span",{children:e.slice(0,vt)}),A.jsx("span",{className:"text-emerald-400/50",children:"…"})]}),A.jsxs(Or,{side:"bottom",className:"max-w-md text-xs p-2 break-words whitespace-pre-wrap",children:[e.slice(0,500),e.length>500?"…":""]})]}),'"']}):A.jsxs("span",{className:"text-emerald-400 break-all",children:['"',A.jsx("span",{className:"prose prose-sm dark:prose-invert inline max-w-none [&_p]:inline [&_p]:my-0 [&_code]:text-emerald-300 [&_a]:text-emerald-300",children:A.jsx(zt,{children:e})}),'"']})}function kr({value:e}){if(e===null)return A.jsx("span",{className:"text-rose-400 italic",children:"null"});switch(typeof e){case"string":return A.jsx(ru,{text:e});case"number":return A.jsx("span",{className:"text-amber-400",children:e});case"boolean":return A.jsx("span",{className:"text-blue-400",children:e?"true":"false"});case"object":case"bigint":case"symbol":case"undefined":case"function":return A.jsx("span",{className:"text-muted-foreground",children:JSON.stringify(e)})}}function Lt({value:e}){const[n,t]=G.useState(!1);function r(i){i.stopPropagation(),window.navigator.clipboard.writeText(JSON.stringify(e,null,2)).then(()=>{t(!0),setTimeout(()=>{t(!1)},2e3)})}return A.jsx("button",{type:"button",onClick:r,className:"inline-flex items-center gap-1 text-[10px] text-muted-foreground hover:text-foreground transition-colors",title:"Copy JSON",children:n?A.jsx(_t,{className:"size-3 text-green-500"}):A.jsx(Ot,{className:"size-3"})})}function iu({value:e}){const[n,t]=G.useState(!1);function r(i){i.stopPropagation(),window.navigator.clipboard.writeText(JSON.stringify(e,null,2)).then(()=>{t(!0),setTimeout(()=>{t(!1)},2e3)})}return A.jsx("button",{type:"button",onClick:r,className:"opacity-0 group-hover/row:opacity-100 hover:bg-muted p-0.5 rounded transition-opacity shrink-0",title:"Copy to clipboard",children:n?A.jsx(_t,{className:"size-3 text-green-500"}):A.jsx(Ot,{className:"size-3 text-muted-foreground"})})}function lu({onClick:e}){return A.jsx("button",{type:"button",onClick:e,className:"opacity-0 group-hover/row:opacity-100 hover:bg-muted p-0.5 rounded transition-opacity shrink-0",title:"Expand all descendants",children:A.jsx(Rr,{className:"size-3.5 text-muted-foreground"})})}const ou=G.memo(function e({name:n,value:t,level:r,defaultExpandDepth:i,isArrayItem:l,path:o,expandTargetPath:a,anatomyPaths:c}){const u=G.useMemo(()=>a===null?!1:o===""?a.length>0:a===o||a.startsWith(`${o}/`),[a,o]),s=r<i||u&&Me(t),[p,d]=G.useState(s);G.useEffect(()=>{u&&Me(t)&&!p&&d(!0)},[a]);const[f,b]=G.useState(0),[S,T]=G.useState(null),y=Me(t),z=S===Number.POSITIVE_INFINITY,E=G.useMemo(()=>xr(t),[t]),j=G.useMemo(()=>E.some(([,I])=>Me(I)),[E]),M=yr(t),x=M==="array"?"[":"{",O=M==="array"?"]":"}",V=c!==null&&c.has(o);function R(){d(!0),T(Number.POSITIVE_INFINITY),b(I=>I+1)}function B(){d(!1),T(0),b(I=>I+1)}function P(){z?B():d(!p)}function N(I){I.stopPropagation(),R()}const H=S??i;return A.jsxs("div",{className:Ae(r>0&&"border-l border-border/50 ml-2"),children:[A.jsxs("div",{className:Ae("flex items-start gap-1 py-0.5 px-1 -ml-1 rounded-sm group/row",y&&"cursor-pointer hover:bg-muted/50"),"data-anatomy-path":V?o:void 0,onClick:y?P:void 0,onKeyDown:y?I=>{(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),P())}:void 0,onDoubleClick:y&&j?()=>R():void 0,role:y?"button":void 0,tabIndex:y?0:void 0,children:[y?A.jsx("span",{className:"w-4 h-5 flex items-center justify-center shrink-0",children:p?A.jsx(vr,{className:"size-3 text-muted-foreground"}):A.jsx(Lr,{className:"size-3 text-muted-foreground"})}):A.jsx("span",{className:"w-4 shrink-0"}),A.jsx("span",{className:Ae("shrink-0",l?"text-muted-foreground":"text-cyan-400"),children:l?n:`"${n}"`}),A.jsx("span",{className:"text-muted-foreground shrink-0",children:y?"":":"}),y?A.jsxs("span",{className:"text-muted-foreground",children:[x,A.jsxs("span",{className:"text-muted-foreground/60 text-xs",children:[" ",E.length," ",E.length===1?"item":"items"," ",O]})]}):A.jsx("span",{className:"min-w-0",children:A.jsx(kr,{value:t})}),y&&j&&!z&&A.jsx(lu,{onClick:N}),A.jsx(iu,{value:t})]}),y&&p&&A.jsxs("div",{className:"pl-4",children:[E.map(([I,C])=>A.jsx(e,{name:I,value:C,level:r+1,defaultExpandDepth:H,isArrayItem:M==="array",path:o===""?`/${I}`:`${o}/${I}`,expandTargetPath:a,anatomyPaths:c},I)),A.jsx("div",{className:"text-muted-foreground py-0.5 px-1",children:O})]},f)]})});function br({data:e,defaultExpandDepth:n=0,className:t,showCopy:r=!1,bulkDepth:i,bulkRevision:l,anatomyPaths:o=null,expandToPath:a=null}){const c=Me(e),u=G.useMemo(()=>xr(e),[e]),s=i??n,p=l??0;if(!c)return A.jsx($n,{children:A.jsx("div",{className:Ae("font-mono text-xs leading-relaxed",t),children:A.jsxs("div",{className:"flex items-center gap-1",children:[A.jsx(kr,{value:e}),r&&A.jsx(Lt,{value:e})]})})});const f=yr(e)==="array";return A.jsx($n,{children:A.jsxs("div",{className:Ae("font-mono text-xs leading-relaxed",t),children:[r&&A.jsx("div",{className:"mb-2 flex items-center justify-end gap-2",children:A.jsx(Lt,{value:e})}),A.jsx("div",{children:u.map(([b,S])=>A.jsx(ou,{name:b,value:S,level:0,defaultExpandDepth:s,isArrayItem:f,path:`/${b}`,expandTargetPath:a,anatomyPaths:o},b))},p)]})})}const au=G.memo(function({text:n,defaultExpandDepth:t=0,className:r,bulkDepth:i,bulkRevision:l}){const o=G.useMemo(()=>zr(n),[n]);return o.kind==="json"?A.jsx(br,{data:o.data,defaultExpandDepth:t,className:r,bulkDepth:i,bulkRevision:l}):A.jsx("pre",{className:Ae("font-mono text-xs whitespace-pre-wrap break-words",r),children:n})}),cu=Object.freeze(Object.defineProperty({__proto__:null,JsonViewer:br,JsonViewerFromString:au},Symbol.toStringTag,{value:"Module"}));export{au as J,zt as M,br as a,cu as j};
|