zudoku 0.0.0-fix-create-zudoku-run-build.eff26864 → 0.0.0-fix-downgrade-openapi-parser.aac00796
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -12
- package/client.d.ts +8 -0
- package/dist/app/entry.server.js +14 -1
- package/dist/app/entry.server.js.map +1 -1
- package/dist/cli/cli.d.ts +9 -0
- package/dist/cli/cli.js +4 -10
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/common/version-check.d.ts +2 -0
- package/dist/cli/common/version-check.js +58 -0
- package/dist/cli/common/version-check.js.map +1 -0
- package/dist/config/config.d.ts +6 -1
- package/dist/config/validators/BuildSchema.d.ts +15 -7
- package/dist/config/validators/BuildSchema.js +19 -2
- package/dist/config/validators/BuildSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.d.ts +184 -24
- package/dist/config/validators/InputNavigationSchema.js +1 -0
- package/dist/config/validators/InputNavigationSchema.js.map +1 -1
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/icon-types.js +39 -0
- package/dist/config/validators/icon-types.js.map +1 -1
- package/dist/config/validators/validate.d.ts +45 -17
- package/dist/config/validators/validate.js +31 -8
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/flat-config.d.ts +357 -0
- package/dist/lib/assets/language-icons/c.d.ts +3 -0
- package/dist/lib/assets/language-icons/c.js +4 -0
- package/dist/lib/assets/language-icons/c.js.map +1 -0
- package/dist/lib/assets/language-icons/commonlisp.d.ts +3 -0
- package/dist/lib/assets/language-icons/commonlisp.js +4 -0
- package/dist/lib/assets/language-icons/commonlisp.js.map +1 -0
- package/dist/lib/assets/language-icons/cpp.d.ts +3 -0
- package/dist/lib/assets/language-icons/cpp.js +4 -0
- package/dist/lib/assets/language-icons/cpp.js.map +1 -0
- package/dist/lib/assets/language-icons/csharp.d.ts +3 -0
- package/dist/lib/assets/language-icons/csharp.js +4 -0
- package/dist/lib/assets/language-icons/csharp.js.map +1 -0
- package/dist/lib/assets/language-icons/css.d.ts +3 -0
- package/dist/lib/assets/language-icons/css.js +4 -0
- package/dist/lib/assets/language-icons/css.js.map +1 -0
- package/dist/lib/assets/language-icons/dart.d.ts +3 -0
- package/dist/lib/assets/language-icons/dart.js +4 -0
- package/dist/lib/assets/language-icons/dart.js.map +1 -0
- package/dist/lib/assets/language-icons/elixir.d.ts +3 -0
- package/dist/lib/assets/language-icons/elixir.js +4 -0
- package/dist/lib/assets/language-icons/elixir.js.map +1 -0
- package/dist/lib/assets/language-icons/go.d.ts +3 -0
- package/dist/lib/assets/language-icons/go.js +4 -0
- package/dist/lib/assets/language-icons/go.js.map +1 -0
- package/dist/lib/assets/language-icons/graphql.d.ts +3 -0
- package/dist/lib/assets/language-icons/graphql.js +4 -0
- package/dist/lib/assets/language-icons/graphql.js.map +1 -0
- package/dist/lib/assets/language-icons/html.d.ts +3 -0
- package/dist/lib/assets/language-icons/html.js +4 -0
- package/dist/lib/assets/language-icons/html.js.map +1 -0
- package/dist/lib/assets/language-icons/java.d.ts +3 -0
- package/dist/lib/assets/language-icons/java.js +4 -0
- package/dist/lib/assets/language-icons/java.js.map +1 -0
- package/dist/lib/assets/language-icons/javascript.d.ts +3 -0
- package/dist/lib/assets/language-icons/javascript.js +4 -0
- package/dist/lib/assets/language-icons/javascript.js.map +1 -0
- package/dist/lib/assets/language-icons/json.d.ts +3 -0
- package/dist/lib/assets/language-icons/json.js +4 -0
- package/dist/lib/assets/language-icons/json.js.map +1 -0
- package/dist/lib/assets/language-icons/kotlin.d.ts +3 -0
- package/dist/lib/assets/language-icons/kotlin.js +4 -0
- package/dist/lib/assets/language-icons/kotlin.js.map +1 -0
- package/dist/lib/assets/language-icons/markdown.d.ts +3 -0
- package/dist/lib/assets/language-icons/markdown.js +4 -0
- package/dist/lib/assets/language-icons/markdown.js.map +1 -0
- package/dist/lib/assets/language-icons/mdx.d.ts +3 -0
- package/dist/lib/assets/language-icons/mdx.js +4 -0
- package/dist/lib/assets/language-icons/mdx.js.map +1 -0
- package/dist/lib/assets/language-icons/objectivec.d.ts +3 -0
- package/dist/lib/assets/language-icons/objectivec.js +4 -0
- package/dist/lib/assets/language-icons/objectivec.js.map +1 -0
- package/dist/lib/assets/language-icons/ocaml.d.ts +3 -0
- package/dist/lib/assets/language-icons/ocaml.js +4 -0
- package/dist/lib/assets/language-icons/ocaml.js.map +1 -0
- package/dist/lib/assets/language-icons/php.d.ts +3 -0
- package/dist/lib/assets/language-icons/php.js +4 -0
- package/dist/lib/assets/language-icons/php.js.map +1 -0
- package/dist/lib/assets/language-icons/powershell.d.ts +3 -0
- package/dist/lib/assets/language-icons/powershell.js +4 -0
- package/dist/lib/assets/language-icons/powershell.js.map +1 -0
- package/dist/lib/assets/language-icons/python.d.ts +3 -0
- package/dist/lib/assets/language-icons/python.js +4 -0
- package/dist/lib/assets/language-icons/python.js.map +1 -0
- package/dist/lib/assets/language-icons/react.d.ts +3 -0
- package/dist/lib/assets/language-icons/react.js +4 -0
- package/dist/lib/assets/language-icons/react.js.map +1 -0
- package/dist/lib/assets/language-icons/ruby.d.ts +3 -0
- package/dist/lib/assets/language-icons/ruby.js +4 -0
- package/dist/lib/assets/language-icons/ruby.js.map +1 -0
- package/dist/lib/assets/language-icons/rust.d.ts +3 -0
- package/dist/lib/assets/language-icons/rust.js +4 -0
- package/dist/lib/assets/language-icons/rust.js.map +1 -0
- package/dist/lib/assets/language-icons/scala.d.ts +3 -0
- package/dist/lib/assets/language-icons/scala.js +4 -0
- package/dist/lib/assets/language-icons/scala.js.map +1 -0
- package/dist/lib/assets/language-icons/shell.d.ts +3 -0
- package/dist/lib/assets/language-icons/shell.js +4 -0
- package/dist/lib/assets/language-icons/shell.js.map +1 -0
- package/dist/lib/assets/language-icons/swift.d.ts +3 -0
- package/dist/lib/assets/language-icons/swift.js +4 -0
- package/dist/lib/assets/language-icons/swift.js.map +1 -0
- package/dist/lib/assets/language-icons/toml.d.ts +3 -0
- package/dist/lib/assets/language-icons/toml.js +4 -0
- package/dist/lib/assets/language-icons/toml.js.map +1 -0
- package/dist/lib/assets/language-icons/typescript.d.ts +3 -0
- package/dist/lib/assets/language-icons/typescript.js +4 -0
- package/dist/lib/assets/language-icons/typescript.js.map +1 -0
- package/dist/lib/assets/language-icons/xml.d.ts +3 -0
- package/dist/lib/assets/language-icons/xml.js +4 -0
- package/dist/lib/assets/language-icons/xml.js.map +1 -0
- package/dist/lib/assets/language-icons/yaml.d.ts +3 -0
- package/dist/lib/assets/language-icons/yaml.js +4 -0
- package/dist/lib/assets/language-icons/yaml.js.map +1 -0
- package/dist/lib/assets/language-icons/zig.d.ts +3 -0
- package/dist/lib/assets/language-icons/zig.js +4 -0
- package/dist/lib/assets/language-icons/zig.js.map +1 -0
- package/dist/lib/authentication/authentication.d.ts +17 -9
- package/dist/lib/authentication/components/OAuthErrorPage.js +1 -1
- package/dist/lib/authentication/components/OAuthErrorPage.js.map +1 -1
- package/dist/lib/authentication/components/SignIn.js +6 -5
- package/dist/lib/authentication/components/SignIn.js.map +1 -1
- package/dist/lib/authentication/components/SignOut.js +6 -6
- package/dist/lib/authentication/components/SignOut.js.map +1 -1
- package/dist/lib/authentication/components/SignUp.js +5 -5
- package/dist/lib/authentication/components/SignUp.js.map +1 -1
- package/dist/lib/authentication/hook.d.ts +3 -2
- package/dist/lib/authentication/hook.js +12 -8
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/auth0.js +8 -4
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/azureb2c.d.ts +4 -4
- package/dist/lib/authentication/providers/azureb2c.js +3 -3
- package/dist/lib/authentication/providers/azureb2c.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.js +2 -2
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +7 -7
- package/dist/lib/authentication/providers/openid.js +5 -3
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.d.ts +8 -0
- package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.js +39 -0
- package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.js.map +1 -0
- package/dist/lib/authentication/providers/supabase.js +35 -31
- package/dist/lib/authentication/providers/supabase.js.map +1 -1
- package/dist/lib/authentication/state.d.ts +5 -7
- package/dist/lib/authentication/state.js +2 -14
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/BuildCheck.js +2 -2
- package/dist/lib/components/BuildCheck.js.map +1 -1
- package/dist/lib/components/Heading.js +1 -5
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/LanguageIcon.d.ts +3 -0
- package/dist/lib/components/LanguageIcon.js +163 -0
- package/dist/lib/components/LanguageIcon.js.map +1 -0
- package/dist/lib/components/Main.js +1 -1
- package/dist/lib/components/Main.js.map +1 -1
- package/dist/lib/components/Meta.js +1 -1
- package/dist/lib/components/Meta.js.map +1 -1
- package/dist/lib/components/Zudoku.js +3 -3
- package/dist/lib/components/cache.d.ts +3 -1
- package/dist/lib/components/cache.js +3 -5
- package/dist/lib/components/cache.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.js +10 -2
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +14 -4
- package/dist/lib/components/index.js +2 -0
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/NavigationItem.js +1 -1
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
- package/dist/lib/components/navigation/Toc.js +1 -1
- package/dist/lib/components/navigation/Toc.js.map +1 -1
- package/dist/lib/core/RouteGuard.d.ts +1 -1
- package/dist/lib/core/RouteGuard.js +6 -14
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +1 -0
- package/dist/lib/core/ZudokuContext.js +2 -0
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/__internal.d.ts +1 -1
- package/dist/lib/hooks/index.d.ts +3 -3
- package/dist/lib/oas/graphql/index.js +37 -2
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.js +7 -1
- package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKeyDialog.d.ts +11 -0
- package/dist/lib/plugins/api-keys/CreateApiKeyDialog.js +9 -0
- package/dist/lib/plugins/api-keys/CreateApiKeyDialog.js.map +1 -0
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +5 -10
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.d.ts +2 -1
- package/dist/lib/plugins/markdown/MdxPage.js +29 -5
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/assets/ChatGPTLogo.d.ts +2 -0
- package/dist/lib/plugins/markdown/assets/ChatGPTLogo.js +3 -0
- package/dist/lib/plugins/markdown/assets/ChatGPTLogo.js.map +1 -0
- package/dist/lib/plugins/markdown/assets/ClaudeLogo.d.ts +2 -0
- package/dist/lib/plugins/markdown/assets/ClaudeLogo.js +3 -0
- package/dist/lib/plugins/markdown/assets/ClaudeLogo.js.map +1 -0
- package/dist/lib/plugins/markdown/index.d.ts +3 -1
- package/dist/lib/plugins/markdown/index.js +1 -1
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/openapi/MCPEndpoint.d.ts +5 -0
- package/dist/lib/plugins/openapi/MCPEndpoint.js +56 -0
- package/dist/lib/plugins/openapi/MCPEndpoint.js.map +1 -0
- package/dist/lib/plugins/openapi/OperationList.d.ts +0 -2
- package/dist/lib/plugins/openapi/OperationList.js +22 -6
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.d.ts +2 -2
- package/dist/lib/plugins/openapi/OperationListItem.js +8 -3
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterList.d.ts +2 -2
- package/dist/lib/plugins/openapi/ParameterList.js +1 -1
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.d.ts +2 -3
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +3 -4
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +1 -3
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +2 -2
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.d.ts +4 -3
- package/dist/lib/plugins/openapi/Sidecar.js +6 -9
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.d.ts +2 -4
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/fragment-masking.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/fragment-masking.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +2 -2
- package/dist/lib/plugins/openapi/graphql/gql.js +3 -2
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +11 -2
- package/dist/lib/plugins/openapi/graphql/graphql.js +11 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +5 -10
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +3 -2
- package/dist/lib/plugins/openapi/playground/BodyPanel.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +1 -1
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +3 -3
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/Playground.js +13 -3
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +3 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +2 -1
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +10 -2
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.d.ts +5 -3
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +33 -19
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.d.ts +5 -3
- package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js +2 -0
- package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.d.ts +2 -1
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.js +2 -2
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +5 -5
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/UnionView.d.ts +2 -1
- package/dist/lib/plugins/openapi/schema/UnionView.js +13 -7
- package/dist/lib/plugins/openapi/schema/UnionView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/union-helpers.js +25 -1
- package/dist/lib/plugins/openapi/schema/union-helpers.js.map +1 -1
- package/dist/lib/plugins/openapi/state.d.ts +5 -3
- package/dist/lib/shiki.d.ts +1 -1
- package/dist/lib/shiki.js +26 -2
- package/dist/lib/shiki.js.map +1 -1
- package/dist/lib/ui/Callout.d.ts +5 -5
- package/dist/lib/ui/Callout.js +5 -5
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/Carousel.js.map +1 -1
- package/dist/lib/ui/CodeBlock.d.ts +1 -1
- package/dist/lib/ui/CodeBlock.js +3 -28
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Dialog.d.ts +12 -18
- package/dist/lib/ui/Dialog.js +30 -17
- package/dist/lib/ui/Dialog.js.map +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.d.ts +3 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js +2 -2
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/dist/lib/ui/ReactComponentDoc.d.ts +20 -0
- package/dist/lib/ui/ReactComponentDoc.js +10 -0
- package/dist/lib/ui/ReactComponentDoc.js.map +1 -0
- package/dist/lib/ui/Secret.d.ts +18 -0
- package/dist/lib/ui/Secret.js +26 -0
- package/dist/lib/ui/Secret.js.map +1 -0
- package/dist/lib/ui/SyntaxHighlight.d.ts +1 -0
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
- package/dist/lib/ui/Value.d.ts +5 -0
- package/dist/lib/ui/Value.js +13 -0
- package/dist/lib/ui/Value.js.map +1 -0
- package/dist/lib/util/MdxComponents.d.ts +2 -1
- package/dist/lib/util/MdxComponents.js +3 -2
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/pastellize.js +4 -4
- package/dist/lib/util/pastellize.js.map +1 -1
- package/dist/lib/util/syncZustandState.d.ts +5 -0
- package/dist/lib/util/syncZustandState.js +14 -0
- package/dist/lib/util/syncZustandState.js.map +1 -0
- package/dist/lib/util/traverse.d.ts +1 -0
- package/dist/lib/util/traverse.js +25 -0
- package/dist/lib/util/traverse.js.map +1 -1
- package/dist/vite/api/SchemaManager.d.ts +3 -1
- package/dist/vite/api/SchemaManager.js +32 -9
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/api/SchemaManager.test.js +2 -2
- package/dist/vite/api/SchemaManager.test.js.map +1 -1
- package/dist/vite/api/schema-codegen.js +60 -41
- package/dist/vite/api/schema-codegen.js.map +1 -1
- package/dist/vite/api/schema-codegen.test.js +75 -2
- package/dist/vite/api/schema-codegen.test.js.map +1 -1
- package/dist/vite/llms.d.ts +12 -0
- package/dist/vite/llms.js +66 -0
- package/dist/vite/llms.js.map +1 -0
- package/dist/vite/plugin-api.js +18 -17
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-docs.d.ts +9 -0
- package/dist/vite/plugin-docs.js +68 -45
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-markdown-export.d.ts +21 -0
- package/dist/vite/plugin-markdown-export.js +141 -0
- package/dist/vite/plugin-markdown-export.js.map +1 -0
- package/dist/vite/plugin-mdx.d.ts +1 -1
- package/dist/vite/plugin-mdx.js +41 -32
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-navigation.js +4 -0
- package/dist/vite/plugin-navigation.js.map +1 -1
- package/dist/vite/plugin.js +2 -0
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender/prerender.js +37 -4
- package/dist/vite/prerender/prerender.js.map +1 -1
- package/dist/zuplo/enrich-with-zuplo-mcp.d.ts +4 -0
- package/dist/zuplo/enrich-with-zuplo-mcp.js +117 -0
- package/dist/zuplo/enrich-with-zuplo-mcp.js.map +1 -0
- package/dist/zuplo/enrich-with-zuplo.d.ts +1 -0
- package/dist/zuplo/enrich-with-zuplo.js +1 -1
- package/dist/zuplo/enrich-with-zuplo.js.map +1 -1
- package/dist/zuplo/with-zuplo-processors.js +2 -0
- package/dist/zuplo/with-zuplo-processors.js.map +1 -1
- package/lib/{Button-B3o-2Xdf.js → Button-DmS4u8Lj.js} +2 -2
- package/lib/{Button-B3o-2Xdf.js.map → Button-DmS4u8Lj.js.map} +1 -1
- package/lib/{Card-CMDQUPM4.js → Card-KFniaZn5.js} +2 -2
- package/lib/{Card-CMDQUPM4.js.map → Card-KFniaZn5.js.map} +1 -1
- package/lib/{CategoryHeading-DCpZu3yG.js → CategoryHeading-DhmodDcq.js} +2 -2
- package/lib/{CategoryHeading-DCpZu3yG.js.map → CategoryHeading-DhmodDcq.js.map} +1 -1
- package/lib/{Command-CUSlH0gJ.js → Command-CUcrW3qs.js} +3 -3
- package/lib/{Command-CUSlH0gJ.js.map → Command-CUcrW3qs.js.map} +1 -1
- package/lib/Dialog-BQciPiHN.js +144 -0
- package/lib/Dialog-BQciPiHN.js.map +1 -0
- package/lib/{Drawer-DJ05s2pH.js → Drawer-Ci7XwhqT.js} +2 -2
- package/lib/{Drawer-DJ05s2pH.js.map → Drawer-Ci7XwhqT.js.map} +1 -1
- package/lib/DropdownMenu-BZ2NKQ3K.js +126 -0
- package/lib/DropdownMenu-BZ2NKQ3K.js.map +1 -0
- package/lib/{Slot-BbdqiRXo.js → ErrorAlert-DE3Sf66a.js} +2176 -2251
- package/lib/ErrorAlert-DE3Sf66a.js.map +1 -0
- package/lib/MdxPage-DZfeC0QY.js +240 -0
- package/lib/MdxPage-DZfeC0QY.js.map +1 -0
- package/lib/{OAuthErrorPage-rAKHHveX.js → OAuthErrorPage-BycMozgn.js} +9 -9
- package/lib/{OAuthErrorPage-rAKHHveX.js.map → OAuthErrorPage-BycMozgn.js.map} +1 -1
- package/lib/{OasProvider-BW4OzAuR.js → OasProvider-Bf5zBDBY.js} +4 -4
- package/lib/{OasProvider-BW4OzAuR.js.map → OasProvider-Bf5zBDBY.js.map} +1 -1
- package/lib/OperationList-Cmiw1xm2.js +5446 -0
- package/lib/OperationList-Cmiw1xm2.js.map +1 -0
- package/lib/{Pagination-ZI2yyuxj.js → Pagination-CJszmeSA.js} +4 -4
- package/lib/{Pagination-ZI2yyuxj.js.map → Pagination-CJszmeSA.js.map} +1 -1
- package/lib/RouteGuard-DhU3LRr1.js +81 -0
- package/lib/RouteGuard-DhU3LRr1.js.map +1 -0
- package/lib/{RouterError-BYHrbLtD.js → RouterError-VDLnrFqF.js} +7 -7
- package/lib/{RouterError-BYHrbLtD.js.map → RouterError-VDLnrFqF.js.map} +1 -1
- package/lib/{SchemaList-C4Sk-tLI.js → SchemaList-xZSf3IMh.js} +10 -10
- package/lib/{SchemaList-C4Sk-tLI.js.map → SchemaList-xZSf3IMh.js.map} +1 -1
- package/lib/SchemaView-tHXTm5oM.js +458 -0
- package/lib/SchemaView-tHXTm5oM.js.map +1 -0
- package/lib/Select-C1DeCqKv.js +372 -0
- package/lib/Select-C1DeCqKv.js.map +1 -0
- package/lib/SignUp-6SGx9Yyq.js +50 -0
- package/lib/SignUp-6SGx9Yyq.js.map +1 -0
- package/lib/{Spinner-mNLZ6awP.js → Spinner-CI6bRyZw.js} +2 -2
- package/lib/{Spinner-mNLZ6awP.js.map → Spinner-CI6bRyZw.js.map} +1 -1
- package/lib/{SyntaxHighlight-CvzJ7DNa.js → SyntaxHighlight-zvlnSnHB.js} +815 -784
- package/lib/SyntaxHighlight-zvlnSnHB.js.map +1 -0
- package/lib/{Toc-BAa-kpqN.js → Toc-Da9yp7lo.js} +6 -6
- package/lib/Toc-Da9yp7lo.js.map +1 -0
- package/lib/ZudokuContext-BUZ5hkWB.js +1508 -0
- package/lib/ZudokuContext-BUZ5hkWB.js.map +1 -0
- package/lib/c-B-NUhs61.js +46 -0
- package/lib/c-B-NUhs61.js.map +1 -0
- package/lib/chunk-PVWAREVJ-BMhpCH5D.js +7965 -0
- package/lib/chunk-PVWAREVJ-BMhpCH5D.js.map +1 -0
- package/lib/{circular-BFte5TUt.js → circular-DvuimBGQ.js} +30 -30
- package/lib/{circular-BFte5TUt.js.map → circular-DvuimBGQ.js.map} +1 -1
- package/lib/commonlisp-De080z23.js +28 -0
- package/lib/commonlisp-De080z23.js.map +1 -0
- package/lib/cpp-79Paht7T.js +53 -0
- package/lib/cpp-79Paht7T.js.map +1 -0
- package/lib/{createServer-B4giw6jv.js → createServer-D9UvCoDf.js} +3411 -3342
- package/lib/createServer-D9UvCoDf.js.map +1 -0
- package/lib/csharp-D8MIL50B.js +53 -0
- package/lib/csharp-D8MIL50B.js.map +1 -0
- package/lib/css-Bt6hr1td.js +54 -0
- package/lib/css-Bt6hr1td.js.map +1 -0
- package/lib/dart-B0vy1jWB.js +60 -0
- package/lib/dart-B0vy1jWB.js.map +1 -0
- package/lib/elixir-Ds8r0sF8.js +25 -0
- package/lib/elixir-Ds8r0sF8.js.map +1 -0
- package/lib/{errors-CjmCml50.js → errors-CuGgh3hf.js} +3 -3
- package/lib/{errors-CjmCml50.js.map → errors-CuGgh3hf.js.map} +1 -1
- package/lib/go-D2VsmIOS.js +25 -0
- package/lib/go-D2VsmIOS.js.map +1 -0
- package/lib/graphql-BtA6M4m5.js +25 -0
- package/lib/graphql-BtA6M4m5.js.map +1 -0
- package/lib/hook-CMeoxziF.js +40 -0
- package/lib/hook-CMeoxziF.js.map +1 -0
- package/lib/html-MGnI2uzP.js +33 -0
- package/lib/html-MGnI2uzP.js.map +1 -0
- package/lib/{index-BuKx9nrj.js → index-B1rmok4X.js} +209 -207
- package/lib/index-B1rmok4X.js.map +1 -0
- package/lib/{index-Dp3Fmnfq.js → index-Cr9_YzOZ.js} +908 -938
- package/lib/index-Cr9_YzOZ.js.map +1 -0
- package/lib/index-CrcNWbel.js.map +1 -1
- package/lib/{index-DmNq2fbN.js → index-nGbmHh_A.js} +2 -2
- package/lib/index-nGbmHh_A.js.map +1 -0
- package/lib/{index-CQGi1b3U.js → index-rYHsvtTo.js} +166 -50
- package/lib/index-rYHsvtTo.js.map +1 -0
- package/lib/index.esm-BYObtETB.js +1294 -0
- package/lib/index.esm-BYObtETB.js.map +1 -0
- package/lib/index.esm-BnYHxCYC.js.map +1 -1
- package/lib/java-CVLzHfb1.js +53 -0
- package/lib/java-CVLzHfb1.js.map +1 -0
- package/lib/javascript-CcmIpL4G.js +10 -0
- package/lib/javascript-CcmIpL4G.js.map +1 -0
- package/lib/json-4AyP4uiY.js +25 -0
- package/lib/json-4AyP4uiY.js.map +1 -0
- package/lib/{jsx-runtime-C5mzlN2N.js → jsx-runtime-BzflLqGi.js} +110 -112
- package/lib/jsx-runtime-BzflLqGi.js.map +1 -0
- package/lib/kotlin-v2plddBQ.js +37 -0
- package/lib/kotlin-v2plddBQ.js.map +1 -0
- package/lib/markdown-DYGWCmGQ.js +25 -0
- package/lib/markdown-DYGWCmGQ.js.map +1 -0
- package/lib/mdx-CHwYvXd4.js +32 -0
- package/lib/mdx-CHwYvXd4.js.map +1 -0
- package/lib/{mutation-CiMUdKRU.js → mutation-BSU0xu4m.js} +2 -2
- package/lib/{mutation-CiMUdKRU.js.map → mutation-BSU0xu4m.js.map} +1 -1
- package/lib/objectivec-HZY8shkd.js +32 -0
- package/lib/objectivec-HZY8shkd.js.map +1 -0
- package/lib/ocaml-DqsdDdwb.js +52 -0
- package/lib/ocaml-DqsdDdwb.js.map +1 -0
- package/lib/php-rQXzo7K_.js +25 -0
- package/lib/php-rQXzo7K_.js.map +1 -0
- package/lib/powershell-CQje9pm1.js +39 -0
- package/lib/powershell-CQje9pm1.js.map +1 -0
- package/lib/processors/traverse.js.map +1 -1
- package/lib/python-QIQAE5Ei.js +32 -0
- package/lib/python-QIQAE5Ei.js.map +1 -0
- package/lib/react-DHpVpxRv.js +24 -0
- package/lib/react-DHpVpxRv.js.map +1 -0
- package/lib/ruby-B2dU8Ny5.js +25 -0
- package/lib/ruby-B2dU8Ny5.js.map +1 -0
- package/lib/rust-DYnLHAi2.js +25 -0
- package/lib/rust-DYnLHAi2.js.map +1 -0
- package/lib/scala-CeKInBR8.js +25 -0
- package/lib/scala-CeKInBR8.js.map +1 -0
- package/lib/shell-HUv9oVtp.js +25 -0
- package/lib/shell-HUv9oVtp.js.map +1 -0
- package/lib/swift-B4z6ig1Z.js +25 -0
- package/lib/swift-B4z6ig1Z.js.map +1 -0
- package/lib/toml-Co9mpdct.js +32 -0
- package/lib/toml-Co9mpdct.js.map +1 -0
- package/lib/typescript-C26xdBDC.js +32 -0
- package/lib/typescript-C26xdBDC.js.map +1 -0
- package/lib/ui/Accordion.js +1 -1
- package/lib/ui/ActionButton.js +3 -3
- package/lib/ui/Alert.js +1 -1
- package/lib/ui/AlertDialog.js +1 -1
- package/lib/ui/Badge.js +1 -1
- package/lib/ui/Breadcrumb.js +1 -1
- package/lib/ui/Button.js +1 -1
- package/lib/ui/Callout.js +19 -19
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js +1 -1
- package/lib/ui/Carousel.js +1 -1
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js +1 -1
- package/lib/ui/CodeBlock.js +217 -6
- package/lib/ui/CodeBlock.js.map +1 -1
- package/lib/ui/Command.js +2 -2
- package/lib/ui/Dialog.js +135 -105
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/Drawer.js +2 -2
- package/lib/ui/DropdownMenu.js +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +23 -20
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/lib/ui/Form.js +2 -2
- package/lib/ui/HoverCard.js +1 -1
- package/lib/ui/Input.js +1 -1
- package/lib/ui/Label.js +1 -1
- package/lib/ui/Pagination.js +1 -1
- package/lib/ui/Popover.js +1 -1
- package/lib/ui/Progress.js +1 -1
- package/lib/ui/RadioGroup.js +1 -1
- package/lib/ui/ReactComponentDoc.js +28 -0
- package/lib/ui/ReactComponentDoc.js.map +1 -0
- package/lib/ui/ScrollArea.js +1 -1
- package/lib/ui/Secret.js +106 -0
- package/lib/ui/Secret.js.map +1 -0
- package/lib/ui/Select.js +1 -1
- package/lib/ui/Skeleton.js +1 -1
- package/lib/ui/Slider.js +1 -1
- package/lib/ui/Stepper.js +1 -1
- package/lib/ui/Switch.js +1 -1
- package/lib/ui/SyntaxHighlight.js +4 -4
- package/lib/ui/Tabs.js +1 -1
- package/lib/ui/Textarea.js +1 -1
- package/lib/ui/Toggle.js +1 -1
- package/lib/ui/ToggleGroup.js +1 -1
- package/lib/ui/Tooltip.js +1 -1
- package/lib/ui/Value.js +39 -0
- package/lib/ui/Value.js.map +1 -0
- package/lib/useCopyToClipboard-B_085nfO.js +14 -0
- package/lib/useCopyToClipboard-B_085nfO.js.map +1 -0
- package/lib/{useExposedProps-BH9aq4MD.js → useExposedProps-U3pmsHaG.js} +34 -34
- package/lib/{useExposedProps-BH9aq4MD.js.map → useExposedProps-U3pmsHaG.js.map} +1 -1
- package/lib/xml-BQOOC04j.js +25 -0
- package/lib/xml-BQOOC04j.js.map +1 -0
- package/lib/yaml-BGsJItKv.js +32 -0
- package/lib/yaml-BGsJItKv.js.map +1 -0
- package/lib/zig-CUV2sTct.js +35 -0
- package/lib/zig-CUV2sTct.js.map +1 -0
- package/lib/zudoku.__internal.js +1050 -940
- package/lib/zudoku.__internal.js.map +1 -1
- package/lib/zudoku.auth-auth0.js +23 -22
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +34 -35
- package/lib/zudoku.auth-azureb2c.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +41 -41
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +104 -108
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.auth-supabase.js +111 -52
- package/lib/zudoku.auth-supabase.js.map +1 -1
- package/lib/zudoku.components.js +21 -20
- package/lib/zudoku.hooks.js +6 -6
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.icons.js +1 -1
- package/lib/zudoku.plugin-api-catalog.js +34 -28
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +302 -327
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +10 -9
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +7 -8
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugin-redirect.js +3 -3
- package/lib/zudoku.plugin-search-inkeep.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +47 -48
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.router.js +2502 -118
- package/lib/zudoku.router.js.map +1 -1
- package/package.json +83 -72
- package/src/app/entry.server.tsx +16 -6
- package/src/app/main.css +71 -19
- package/src/lib/assets/language-icons/c.tsx +31 -0
- package/src/lib/assets/language-icons/commonlisp.tsx +22 -0
- package/src/lib/assets/language-icons/cpp.tsx +35 -0
- package/src/lib/assets/language-icons/csharp.tsx +35 -0
- package/src/lib/assets/language-icons/css.tsx +36 -0
- package/src/lib/assets/language-icons/dart.tsx +39 -0
- package/src/lib/assets/language-icons/elixir.tsx +19 -0
- package/src/lib/assets/language-icons/go.tsx +19 -0
- package/src/lib/assets/language-icons/graphql.tsx +19 -0
- package/src/lib/assets/language-icons/html.tsx +24 -0
- package/src/lib/assets/language-icons/java.tsx +35 -0
- package/src/lib/assets/language-icons/javascript.tsx +11 -0
- package/src/lib/assets/language-icons/json.tsx +19 -0
- package/src/lib/assets/language-icons/kotlin.tsx +30 -0
- package/src/lib/assets/language-icons/markdown.tsx +19 -0
- package/src/lib/assets/language-icons/mdx.tsx +23 -0
- package/src/lib/assets/language-icons/objectivec.tsx +23 -0
- package/src/lib/assets/language-icons/ocaml.tsx +34 -0
- package/src/lib/assets/language-icons/php.tsx +19 -0
- package/src/lib/assets/language-icons/powershell.tsx +27 -0
- package/src/lib/assets/language-icons/python.tsx +23 -0
- package/src/lib/assets/language-icons/react.tsx +21 -0
- package/src/lib/assets/language-icons/ruby.tsx +19 -0
- package/src/lib/assets/language-icons/rust.tsx +19 -0
- package/src/lib/assets/language-icons/scala.tsx +19 -0
- package/src/lib/assets/language-icons/shell.tsx +19 -0
- package/src/lib/assets/language-icons/swift.tsx +19 -0
- package/src/lib/assets/language-icons/toml.tsx +23 -0
- package/src/lib/assets/language-icons/typescript.tsx +23 -0
- package/src/lib/assets/language-icons/xml.tsx +19 -0
- package/src/lib/assets/language-icons/yaml.tsx +23 -0
- package/src/lib/assets/language-icons/zig.tsx +32 -0
- package/src/lib/authentication/authentication.ts +22 -4
- package/src/lib/authentication/components/OAuthErrorPage.tsx +1 -1
- package/src/lib/authentication/components/SignIn.tsx +7 -5
- package/src/lib/authentication/components/SignOut.tsx +7 -6
- package/src/lib/authentication/components/SignUp.tsx +5 -8
- package/src/lib/authentication/hook.ts +21 -10
- package/src/lib/authentication/providers/auth0.tsx +9 -4
- package/src/lib/authentication/providers/azureb2c.tsx +10 -3
- package/src/lib/authentication/providers/clerk.tsx +9 -2
- package/src/lib/authentication/providers/openid.tsx +20 -15
- package/src/lib/authentication/providers/supabase/SupabaseAuthUI.tsx +75 -0
- package/src/lib/authentication/providers/supabase.tsx +59 -43
- package/src/lib/authentication/state.ts +3 -23
- package/src/lib/authentication/use-broadcast/LICENSE.md +12 -3
- package/src/lib/components/BuildCheck.tsx +12 -10
- package/src/lib/components/Heading.tsx +2 -6
- package/src/lib/components/LanguageIcon.tsx +181 -0
- package/src/lib/components/Main.tsx +1 -1
- package/src/lib/components/Meta.tsx +13 -0
- package/src/lib/components/Zudoku.tsx +3 -3
- package/src/lib/components/cache.ts +9 -5
- package/src/lib/components/context/ZudokuContext.ts +11 -2
- package/src/lib/components/index.ts +2 -0
- package/src/lib/components/navigation/NavigationItem.tsx +1 -1
- package/src/lib/components/navigation/Toc.tsx +3 -3
- package/src/lib/core/RouteGuard.tsx +33 -13
- package/src/lib/core/ZudokuContext.ts +3 -0
- package/src/lib/oas/graphql/index.ts +37 -2
- package/src/lib/plugins/api-catalog/Catalog.tsx +7 -0
- package/src/lib/plugins/api-keys/CreateApiKeyDialog.tsx +49 -0
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +18 -64
- package/src/lib/plugins/markdown/MdxPage.tsx +126 -9
- package/src/lib/plugins/markdown/assets/ChatGPTLogo.tsx +11 -0
- package/src/lib/plugins/markdown/assets/ClaudeLogo.tsx +19 -0
- package/src/lib/plugins/markdown/index.tsx +5 -7
- package/src/lib/plugins/openapi/MCPEndpoint.tsx +273 -0
- package/src/lib/plugins/openapi/OperationList.tsx +30 -10
- package/src/lib/plugins/openapi/OperationListItem.tsx +107 -81
- package/src/lib/plugins/openapi/ParameterList.tsx +3 -5
- package/src/lib/plugins/openapi/ParameterListItem.tsx +3 -9
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +6 -11
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +3 -2
- package/src/lib/plugins/openapi/Sidecar.tsx +10 -10
- package/src/lib/plugins/openapi/SidecarExamples.tsx +2 -9
- package/src/lib/plugins/openapi/graphql/fragment-masking.ts +2 -1
- package/src/lib/plugins/openapi/graphql/gql.ts +7 -6
- package/src/lib/plugins/openapi/graphql/graphql.ts +26 -3
- package/src/lib/plugins/openapi/index.tsx +10 -30
- package/src/lib/plugins/openapi/interfaces.ts +3 -2
- package/src/lib/plugins/openapi/playground/BodyPanel.tsx +2 -2
- package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +2 -2
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +3 -3
- package/src/lib/plugins/openapi/playground/Playground.tsx +16 -5
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +13 -2
- package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +20 -1
- package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +2 -2
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +124 -52
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +1 -1
- package/src/lib/plugins/openapi/playground/useRememberSkipLoginDialog.tsx +3 -0
- package/src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.tsx +11 -4
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +18 -12
- package/src/lib/plugins/openapi/schema/UnionView.tsx +56 -36
- package/src/lib/plugins/openapi/schema/union-helpers.ts +30 -2
- package/src/lib/shiki.ts +29 -2
- package/src/lib/ui/Callout.tsx +10 -5
- package/src/lib/ui/Carousel.tsx +0 -1
- package/src/lib/ui/CodeBlock.tsx +7 -42
- package/src/lib/ui/Dialog.tsx +112 -106
- package/src/lib/ui/EmbeddedCodeBlock.tsx +6 -3
- package/src/lib/ui/ReactComponentDoc.tsx +68 -0
- package/src/lib/ui/Secret.tsx +123 -0
- package/src/lib/ui/SyntaxHighlight.tsx +6 -1
- package/src/lib/ui/Value.tsx +42 -0
- package/src/lib/util/MdxComponents.tsx +3 -2
- package/src/lib/util/pastellize.ts +4 -4
- package/src/lib/util/syncZustandState.ts +22 -0
- package/src/lib/util/traverse.ts +36 -0
- package/src/shiki/langs/hurl.js +1 -0
- package/src/shiki/langs/kdl.js +1 -0
- package/src/shiki/langs/pkl.js +1 -0
- package/src/shiki/langs/rosmsg.js +1 -0
- package/lib/CodeBlock-CX_J17Hf.js +0 -98
- package/lib/CodeBlock-CX_J17Hf.js.map +0 -1
- package/lib/Dialog-BmgXWOaz.js +0 -114
- package/lib/Dialog-BmgXWOaz.js.map +0 -1
- package/lib/MdxPage-yXbTtcWf.js +0 -111
- package/lib/MdxPage-yXbTtcWf.js.map +0 -1
- package/lib/OperationList-CWxpdIbO.js +0 -5165
- package/lib/OperationList-CWxpdIbO.js.map +0 -1
- package/lib/RouteGuard-BIksrt_C.js +0 -56
- package/lib/RouteGuard-BIksrt_C.js.map +0 -1
- package/lib/SchemaView-B2BeAuci.js +0 -429
- package/lib/SchemaView-B2BeAuci.js.map +0 -1
- package/lib/Select-DWh0wSay.js +0 -273
- package/lib/Select-DWh0wSay.js.map +0 -1
- package/lib/SignUp-CznaQsRx.js +0 -56
- package/lib/SignUp-CznaQsRx.js.map +0 -1
- package/lib/Slot-BbdqiRXo.js.map +0 -1
- package/lib/SyntaxHighlight-CvzJ7DNa.js.map +0 -1
- package/lib/Toc-BAa-kpqN.js.map +0 -1
- package/lib/ZudokuContext-BR-lnR7O.js +0 -1285
- package/lib/ZudokuContext-BR-lnR7O.js.map +0 -1
- package/lib/chunk-QMGIS6GS-DqecZ6nq.js +0 -9204
- package/lib/chunk-QMGIS6GS-DqecZ6nq.js.map +0 -1
- package/lib/createServer-B4giw6jv.js.map +0 -1
- package/lib/hook-B4Q30zMI.js +0 -247
- package/lib/hook-B4Q30zMI.js.map +0 -1
- package/lib/index-BuKx9nrj.js.map +0 -1
- package/lib/index-CQGi1b3U.js.map +0 -1
- package/lib/index-DmNq2fbN.js.map +0 -1
- package/lib/index-Dp3Fmnfq.js.map +0 -1
- package/lib/index.esm-CdzlRw50.js +0 -1254
- package/lib/index.esm-CdzlRw50.js.map +0 -1
- package/lib/jsx-runtime-C5mzlN2N.js.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { j as at } from "./jsx-runtime-
|
|
2
|
-
import { Fragment as
|
|
3
|
-
import {
|
|
4
|
-
import { c as
|
|
5
|
-
import { g as
|
|
6
|
-
import {
|
|
7
|
-
import { EmbeddedCodeBlock as
|
|
8
|
-
function
|
|
9
|
-
}
|
|
10
|
-
function
|
|
11
|
-
}
|
|
12
|
-
function
|
|
1
|
+
import { j as at } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
+
import { createElement as os, Fragment as ss, memo as as } from "react";
|
|
3
|
+
import { a as is } from "./ZudokuContext-BUZ5hkWB.js";
|
|
4
|
+
import { c as Ir } from "./cn-dYga0KKN.js";
|
|
5
|
+
import { g as ls, i as us } from "./invariant-Bm-FVUQE.js";
|
|
6
|
+
import { CodeBlock as cs } from "./ui/CodeBlock.js";
|
|
7
|
+
import { EmbeddedCodeBlock as hs } from "./ui/EmbeddedCodeBlock.js";
|
|
8
|
+
function rh() {
|
|
9
|
+
}
|
|
10
|
+
function oh() {
|
|
11
|
+
}
|
|
12
|
+
function sh(t) {
|
|
13
13
|
const e = [], n = String(t || "");
|
|
14
14
|
let r = n.indexOf(","), o = 0, s = !1;
|
|
15
15
|
for (; !s; ) {
|
|
@@ -19,22 +19,22 @@ function nh(t) {
|
|
|
19
19
|
}
|
|
20
20
|
return e;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function Nr(t, e) {
|
|
23
23
|
const n = e || {};
|
|
24
24
|
return (t[t.length - 1] === "" ? [...t, ""] : t).join(
|
|
25
25
|
(n.padRight ? " " : "") + "," + (n.padLeft === !1 ? "" : " ")
|
|
26
26
|
).trim();
|
|
27
27
|
}
|
|
28
|
-
const
|
|
28
|
+
const fs = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, ps = /^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, ds = {};
|
|
29
29
|
function In(t, e) {
|
|
30
|
-
return (
|
|
30
|
+
return (ds.jsx ? ps : fs).test(t);
|
|
31
31
|
}
|
|
32
|
-
const
|
|
32
|
+
const gs = /[ \t\n\f\r]/g;
|
|
33
33
|
function Ct(t) {
|
|
34
34
|
return typeof t == "object" ? t.type === "text" ? Nn(t.value) : !1 : Nn(t);
|
|
35
35
|
}
|
|
36
36
|
function Nn(t) {
|
|
37
|
-
return t.replace(
|
|
37
|
+
return t.replace(gs, "") === "";
|
|
38
38
|
}
|
|
39
39
|
let qe = class {
|
|
40
40
|
/**
|
|
@@ -54,7 +54,7 @@ let qe = class {
|
|
|
54
54
|
qe.prototype.normal = {};
|
|
55
55
|
qe.prototype.property = {};
|
|
56
56
|
qe.prototype.space = void 0;
|
|
57
|
-
function
|
|
57
|
+
function Lr(t, e) {
|
|
58
58
|
const n = {}, r = {};
|
|
59
59
|
for (const o of t)
|
|
60
60
|
Object.assign(n, o.property), Object.assign(r, o.normal);
|
|
@@ -88,10 +88,10 @@ W.prototype.overloadedBoolean = !1;
|
|
|
88
88
|
W.prototype.property = "";
|
|
89
89
|
W.prototype.spaceSeparated = !1;
|
|
90
90
|
W.prototype.space = void 0;
|
|
91
|
-
let
|
|
92
|
-
const x = ye(), $ = ye(),
|
|
91
|
+
let ms = 0;
|
|
92
|
+
const x = ye(), $ = ye(), Pr = ye(), b = ye(), I = ye(), xe = ye(), q = ye();
|
|
93
93
|
function ye() {
|
|
94
|
-
return 2 ** ++
|
|
94
|
+
return 2 ** ++ms;
|
|
95
95
|
}
|
|
96
96
|
const Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
97
97
|
__proto__: null,
|
|
@@ -100,7 +100,7 @@ const Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
100
100
|
commaOrSpaceSeparated: q,
|
|
101
101
|
commaSeparated: xe,
|
|
102
102
|
number: b,
|
|
103
|
-
overloadedBoolean:
|
|
103
|
+
overloadedBoolean: Pr,
|
|
104
104
|
spaceSeparated: I
|
|
105
105
|
}, Symbol.toStringTag, { value: "Module" })), At = (
|
|
106
106
|
/** @type {ReadonlyArray<keyof typeof types>} */
|
|
@@ -146,7 +146,7 @@ function Ie(t) {
|
|
|
146
146
|
}
|
|
147
147
|
return new qe(e, n, t.space);
|
|
148
148
|
}
|
|
149
|
-
const
|
|
149
|
+
const $r = Ie({
|
|
150
150
|
properties: {
|
|
151
151
|
ariaActiveDescendant: null,
|
|
152
152
|
ariaAtomic: $,
|
|
@@ -202,13 +202,13 @@ const Pr = Ie({
|
|
|
202
202
|
return e === "role" ? e : "aria-" + e.slice(4).toLowerCase();
|
|
203
203
|
}
|
|
204
204
|
});
|
|
205
|
-
function
|
|
205
|
+
function Tr(t, e) {
|
|
206
206
|
return e in t ? t[e] : e;
|
|
207
207
|
}
|
|
208
|
-
function
|
|
209
|
-
return
|
|
208
|
+
function Mr(t, e) {
|
|
209
|
+
return Tr(t, e.toLowerCase());
|
|
210
210
|
}
|
|
211
|
-
const
|
|
211
|
+
const ys = Ie({
|
|
212
212
|
attributes: {
|
|
213
213
|
acceptcharset: "accept-charset",
|
|
214
214
|
classname: "class",
|
|
@@ -256,7 +256,7 @@ const ms = Ie({
|
|
|
256
256
|
dir: null,
|
|
257
257
|
dirName: null,
|
|
258
258
|
disabled: x,
|
|
259
|
-
download:
|
|
259
|
+
download: Pr,
|
|
260
260
|
draggable: $,
|
|
261
261
|
encType: null,
|
|
262
262
|
enterKeyHint: null,
|
|
@@ -568,8 +568,8 @@ const ms = Ie({
|
|
|
568
568
|
unselectable: null
|
|
569
569
|
},
|
|
570
570
|
space: "html",
|
|
571
|
-
transform:
|
|
572
|
-
}),
|
|
571
|
+
transform: Mr
|
|
572
|
+
}), bs = Ie({
|
|
573
573
|
attributes: {
|
|
574
574
|
accentHeight: "accent-height",
|
|
575
575
|
alignmentBaseline: "alignment-baseline",
|
|
@@ -1127,8 +1127,8 @@ const ms = Ie({
|
|
|
1127
1127
|
zoomAndPan: null
|
|
1128
1128
|
},
|
|
1129
1129
|
space: "svg",
|
|
1130
|
-
transform:
|
|
1131
|
-
}),
|
|
1130
|
+
transform: Tr
|
|
1131
|
+
}), Or = Ie({
|
|
1132
1132
|
properties: {
|
|
1133
1133
|
xLinkActuate: null,
|
|
1134
1134
|
xLinkArcRole: null,
|
|
@@ -1142,18 +1142,18 @@ const ms = Ie({
|
|
|
1142
1142
|
transform(t, e) {
|
|
1143
1143
|
return "xlink:" + e.slice(5).toLowerCase();
|
|
1144
1144
|
}
|
|
1145
|
-
}),
|
|
1145
|
+
}), Dr = Ie({
|
|
1146
1146
|
attributes: { xmlnsxlink: "xmlns:xlink" },
|
|
1147
1147
|
properties: { xmlnsXLink: null, xmlns: null },
|
|
1148
1148
|
space: "xmlns",
|
|
1149
|
-
transform:
|
|
1150
|
-
}),
|
|
1149
|
+
transform: Mr
|
|
1150
|
+
}), Gr = Ie({
|
|
1151
1151
|
properties: { xmlBase: null, xmlLang: null, xmlSpace: null },
|
|
1152
1152
|
space: "xml",
|
|
1153
1153
|
transform(t, e) {
|
|
1154
1154
|
return "xml:" + e.slice(3).toLowerCase();
|
|
1155
1155
|
}
|
|
1156
|
-
}),
|
|
1156
|
+
}), ws = {
|
|
1157
1157
|
classId: "classID",
|
|
1158
1158
|
dataType: "datatype",
|
|
1159
1159
|
itemId: "itemID",
|
|
@@ -1171,20 +1171,20 @@ const ms = Ie({
|
|
|
1171
1171
|
xLinkTitle: "xlinkTitle",
|
|
1172
1172
|
xLinkType: "xlinkType",
|
|
1173
1173
|
xmlnsXLink: "xmlnsXlink"
|
|
1174
|
-
},
|
|
1175
|
-
function
|
|
1174
|
+
}, Cs = /[A-Z]/g, Pn = /-[a-z]/g, _s = /^data[-\w.:]+$/i;
|
|
1175
|
+
function Ss(t, e) {
|
|
1176
1176
|
const n = zt(e);
|
|
1177
1177
|
let r = e, o = W;
|
|
1178
1178
|
if (n in t.normal)
|
|
1179
1179
|
return t.property[t.normal[n]];
|
|
1180
|
-
if (n.length > 4 && n.slice(0, 4) === "data" &&
|
|
1180
|
+
if (n.length > 4 && n.slice(0, 4) === "data" && _s.test(e)) {
|
|
1181
1181
|
if (e.charAt(4) === "-") {
|
|
1182
|
-
const s = e.slice(5).replace(Pn,
|
|
1182
|
+
const s = e.slice(5).replace(Pn, vs);
|
|
1183
1183
|
r = "data" + s.charAt(0).toUpperCase() + s.slice(1);
|
|
1184
1184
|
} else {
|
|
1185
1185
|
const s = e.slice(4);
|
|
1186
1186
|
if (!Pn.test(s)) {
|
|
1187
|
-
let a = s.replace(
|
|
1187
|
+
let a = s.replace(Cs, ks);
|
|
1188
1188
|
a.charAt(0) !== "-" && (a = "-" + a), e = "data" + a;
|
|
1189
1189
|
}
|
|
1190
1190
|
}
|
|
@@ -1192,22 +1192,22 @@ function _s(t, e) {
|
|
|
1192
1192
|
}
|
|
1193
1193
|
return new o(r, e);
|
|
1194
1194
|
}
|
|
1195
|
-
function
|
|
1195
|
+
function ks(t) {
|
|
1196
1196
|
return "-" + t.toLowerCase();
|
|
1197
1197
|
}
|
|
1198
|
-
function
|
|
1198
|
+
function vs(t) {
|
|
1199
1199
|
return t.charAt(1).toUpperCase();
|
|
1200
1200
|
}
|
|
1201
|
-
const
|
|
1202
|
-
function
|
|
1201
|
+
const xs = Lr([$r, ys, Or, Dr, Gr], "html"), fn = Lr([$r, bs, Or, Dr, Gr], "svg");
|
|
1202
|
+
function uh(t) {
|
|
1203
1203
|
const e = String(t || "").trim();
|
|
1204
1204
|
return e ? e.split(/[ \t\n\r\f]+/g) : [];
|
|
1205
1205
|
}
|
|
1206
|
-
function
|
|
1206
|
+
function Fr(t) {
|
|
1207
1207
|
return t.join(" ").trim();
|
|
1208
1208
|
}
|
|
1209
1209
|
var we = {}, Rt, $n;
|
|
1210
|
-
function
|
|
1210
|
+
function Es() {
|
|
1211
1211
|
if ($n) return Rt;
|
|
1212
1212
|
$n = 1;
|
|
1213
1213
|
var t = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, e = /\n/g, n = /^\s*/, r = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, o = /^:\s*/, s = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, a = /^[;\s]*/, i = /^\s+|\s+$/g, l = `
|
|
@@ -1297,14 +1297,14 @@ function xs() {
|
|
|
1297
1297
|
return Rt;
|
|
1298
1298
|
}
|
|
1299
1299
|
var Tn;
|
|
1300
|
-
function
|
|
1300
|
+
function As() {
|
|
1301
1301
|
if (Tn) return we;
|
|
1302
1302
|
Tn = 1;
|
|
1303
1303
|
var t = we && we.__importDefault || function(r) {
|
|
1304
1304
|
return r && r.__esModule ? r : { default: r };
|
|
1305
1305
|
};
|
|
1306
1306
|
Object.defineProperty(we, "__esModule", { value: !0 }), we.default = n;
|
|
1307
|
-
var e = t(
|
|
1307
|
+
var e = t(Es());
|
|
1308
1308
|
function n(r, o) {
|
|
1309
1309
|
var s = null;
|
|
1310
1310
|
if (!r || typeof r != "string")
|
|
@@ -1320,7 +1320,7 @@ function Es() {
|
|
|
1320
1320
|
return we;
|
|
1321
1321
|
}
|
|
1322
1322
|
var Me = {}, Mn;
|
|
1323
|
-
function
|
|
1323
|
+
function Rs() {
|
|
1324
1324
|
if (Mn) return Me;
|
|
1325
1325
|
Mn = 1, Object.defineProperty(Me, "__esModule", { value: !0 }), Me.camelCase = void 0;
|
|
1326
1326
|
var t = /^--[a-zA-Z0-9_-]+$/, e = /-([a-z])/g, n = /^[^-]+$/, r = /^-(webkit|moz|ms|o|khtml)-/, o = /^-(ms)-/, s = function(u) {
|
|
@@ -1335,12 +1335,12 @@ function As() {
|
|
|
1335
1335
|
return Me.camelCase = l, Me;
|
|
1336
1336
|
}
|
|
1337
1337
|
var Oe, On;
|
|
1338
|
-
function
|
|
1338
|
+
function Is() {
|
|
1339
1339
|
if (On) return Oe;
|
|
1340
1340
|
On = 1;
|
|
1341
1341
|
var t = Oe && Oe.__importDefault || function(o) {
|
|
1342
1342
|
return o && o.__esModule ? o : { default: o };
|
|
1343
|
-
}, e = t(
|
|
1343
|
+
}, e = t(As()), n = Rs();
|
|
1344
1344
|
function r(o, s) {
|
|
1345
1345
|
var a = {};
|
|
1346
1346
|
return !o || typeof o != "string" || (0, e.default)(o, function(i, l) {
|
|
@@ -1349,9 +1349,9 @@ function Rs() {
|
|
|
1349
1349
|
}
|
|
1350
1350
|
return r.default = r, Oe = r, Oe;
|
|
1351
1351
|
}
|
|
1352
|
-
var
|
|
1353
|
-
const
|
|
1354
|
-
function
|
|
1352
|
+
var Ns = Is();
|
|
1353
|
+
const Ls = /* @__PURE__ */ ls(Ns), Ps = jr("end"), Br = jr("start");
|
|
1354
|
+
function jr(t) {
|
|
1355
1355
|
return e;
|
|
1356
1356
|
function e(n) {
|
|
1357
1357
|
const r = n && n.position && n.position[t] || {};
|
|
@@ -1363,12 +1363,12 @@ function Br(t) {
|
|
|
1363
1363
|
};
|
|
1364
1364
|
}
|
|
1365
1365
|
}
|
|
1366
|
-
function
|
|
1367
|
-
const e =
|
|
1366
|
+
function ch(t) {
|
|
1367
|
+
const e = Br(t), n = Ps(t);
|
|
1368
1368
|
if (e && n)
|
|
1369
1369
|
return { start: e, end: n };
|
|
1370
1370
|
}
|
|
1371
|
-
function
|
|
1371
|
+
function $s(t) {
|
|
1372
1372
|
return !t || typeof t != "object" ? "" : "position" in t || "type" in t ? Dn(t.position) : "start" in t || "end" in t ? Dn(t) : "line" in t || "column" in t ? Wt(t) : "";
|
|
1373
1373
|
}
|
|
1374
1374
|
function Wt(t) {
|
|
@@ -1451,7 +1451,7 @@ class H extends Error {
|
|
|
1451
1451
|
l && (s.place = l.position);
|
|
1452
1452
|
}
|
|
1453
1453
|
const i = s.place && "start" in s.place ? s.place.start : s.place;
|
|
1454
|
-
this.ancestors = s.ancestors || void 0, this.cause = s.cause || void 0, this.column = i ? i.column : void 0, this.fatal = void 0, this.file, this.message = o, this.line = i ? i.line : void 0, this.name =
|
|
1454
|
+
this.ancestors = s.ancestors || void 0, this.cause = s.cause || void 0, this.column = i ? i.column : void 0, this.fatal = void 0, this.file, this.message = o, this.line = i ? i.line : void 0, this.name = $s(s.place) || "1:1", this.place = s.place || void 0, this.reason = this.message, this.ruleId = s.ruleId || void 0, this.source = s.source || void 0, this.stack = a && s.cause && typeof s.cause.stack == "string" ? s.cause.stack : "", this.actual, this.expected, this.note, this.url;
|
|
1455
1455
|
}
|
|
1456
1456
|
}
|
|
1457
1457
|
H.prototype.file = "";
|
|
@@ -1467,8 +1467,8 @@ H.prototype.fatal = void 0;
|
|
|
1467
1467
|
H.prototype.place = void 0;
|
|
1468
1468
|
H.prototype.ruleId = void 0;
|
|
1469
1469
|
H.prototype.source = void 0;
|
|
1470
|
-
const pn = {}.hasOwnProperty,
|
|
1471
|
-
function
|
|
1470
|
+
const pn = {}.hasOwnProperty, Ts = /* @__PURE__ */ new Map(), Ms = /[A-Z]/g, Os = /* @__PURE__ */ new Set(["table", "tbody", "thead", "tfoot", "tr"]), Ds = /* @__PURE__ */ new Set(["td", "th"]), Ur = "https://github.com/syntax-tree/hast-util-to-jsx-runtime";
|
|
1471
|
+
function Gs(t, e) {
|
|
1472
1472
|
if (!e || e.Fragment === void 0)
|
|
1473
1473
|
throw new TypeError("Expected `Fragment` in options");
|
|
1474
1474
|
const n = e.filePath || void 0;
|
|
@@ -1478,13 +1478,13 @@ function Ds(t, e) {
|
|
|
1478
1478
|
throw new TypeError(
|
|
1479
1479
|
"Expected `jsxDEV` in options when `development: true`"
|
|
1480
1480
|
);
|
|
1481
|
-
r =
|
|
1481
|
+
r = Vs(n, e.jsxDEV);
|
|
1482
1482
|
} else {
|
|
1483
1483
|
if (typeof e.jsx != "function")
|
|
1484
1484
|
throw new TypeError("Expected `jsx` in production options");
|
|
1485
1485
|
if (typeof e.jsxs != "function")
|
|
1486
1486
|
throw new TypeError("Expected `jsxs` in production options");
|
|
1487
|
-
r =
|
|
1487
|
+
r = Ws(n, e.jsx, e.jsxs);
|
|
1488
1488
|
}
|
|
1489
1489
|
const o = {
|
|
1490
1490
|
Fragment: e.Fragment,
|
|
@@ -1497,10 +1497,10 @@ function Ds(t, e) {
|
|
|
1497
1497
|
ignoreInvalidStyle: e.ignoreInvalidStyle || !1,
|
|
1498
1498
|
passKeys: e.passKeys !== !1,
|
|
1499
1499
|
passNode: e.passNode || !1,
|
|
1500
|
-
schema: e.space === "svg" ? fn :
|
|
1500
|
+
schema: e.space === "svg" ? fn : xs,
|
|
1501
1501
|
stylePropertyNameCase: e.stylePropertyNameCase || "dom",
|
|
1502
1502
|
tableCellAlignToStyle: e.tableCellAlignToStyle !== !1
|
|
1503
|
-
}, s =
|
|
1503
|
+
}, s = zr(o, t, void 0);
|
|
1504
1504
|
return s && typeof s != "string" ? s : o.create(
|
|
1505
1505
|
t,
|
|
1506
1506
|
o.Fragment,
|
|
@@ -1508,31 +1508,31 @@ function Ds(t, e) {
|
|
|
1508
1508
|
void 0
|
|
1509
1509
|
);
|
|
1510
1510
|
}
|
|
1511
|
-
function
|
|
1511
|
+
function zr(t, e, n) {
|
|
1512
1512
|
if (e.type === "element")
|
|
1513
|
-
return
|
|
1513
|
+
return Fs(t, e, n);
|
|
1514
1514
|
if (e.type === "mdxFlowExpression" || e.type === "mdxTextExpression")
|
|
1515
|
-
return
|
|
1515
|
+
return Bs(t, e);
|
|
1516
1516
|
if (e.type === "mdxJsxFlowElement" || e.type === "mdxJsxTextElement")
|
|
1517
|
-
return
|
|
1517
|
+
return Us(t, e, n);
|
|
1518
1518
|
if (e.type === "mdxjsEsm")
|
|
1519
|
-
return
|
|
1519
|
+
return js(t, e);
|
|
1520
1520
|
if (e.type === "root")
|
|
1521
|
-
return
|
|
1521
|
+
return zs(t, e, n);
|
|
1522
1522
|
if (e.type === "text")
|
|
1523
|
-
return
|
|
1523
|
+
return Hs(t, e);
|
|
1524
1524
|
}
|
|
1525
|
-
function
|
|
1525
|
+
function Fs(t, e, n) {
|
|
1526
1526
|
const r = t.schema;
|
|
1527
1527
|
let o = r;
|
|
1528
1528
|
e.tagName.toLowerCase() === "svg" && r.space === "html" && (o = fn, t.schema = o), t.ancestors.push(e);
|
|
1529
|
-
const s =
|
|
1529
|
+
const s = Wr(t, e.tagName, !1), a = qs(t, e);
|
|
1530
1530
|
let i = gn(t, e);
|
|
1531
|
-
return
|
|
1531
|
+
return Os.has(e.tagName) && (i = i.filter(function(l) {
|
|
1532
1532
|
return typeof l == "string" ? !Ct(l) : !0;
|
|
1533
|
-
})),
|
|
1533
|
+
})), Hr(t, a, s, e), dn(a, i), t.ancestors.pop(), t.schema = r, t.create(e, s, a, n);
|
|
1534
1534
|
}
|
|
1535
|
-
function
|
|
1535
|
+
function Bs(t, e) {
|
|
1536
1536
|
if (e.data && e.data.estree && t.evaluater) {
|
|
1537
1537
|
const r = e.data.estree.body[0];
|
|
1538
1538
|
return r.type, /** @type {Child | undefined} */
|
|
@@ -1540,7 +1540,7 @@ function Fs(t, e) {
|
|
|
1540
1540
|
}
|
|
1541
1541
|
je(t, e.position);
|
|
1542
1542
|
}
|
|
1543
|
-
function
|
|
1543
|
+
function js(t, e) {
|
|
1544
1544
|
if (e.data && e.data.estree && t.evaluater)
|
|
1545
1545
|
return (
|
|
1546
1546
|
/** @type {Child | undefined} */
|
|
@@ -1548,21 +1548,21 @@ function Bs(t, e) {
|
|
|
1548
1548
|
);
|
|
1549
1549
|
je(t, e.position);
|
|
1550
1550
|
}
|
|
1551
|
-
function
|
|
1551
|
+
function Us(t, e, n) {
|
|
1552
1552
|
const r = t.schema;
|
|
1553
1553
|
let o = r;
|
|
1554
1554
|
e.name === "svg" && r.space === "html" && (o = fn, t.schema = o), t.ancestors.push(e);
|
|
1555
|
-
const s = e.name === null ? t.Fragment :
|
|
1556
|
-
return
|
|
1555
|
+
const s = e.name === null ? t.Fragment : Wr(t, e.name, !0), a = Xs(t, e), i = gn(t, e);
|
|
1556
|
+
return Hr(t, a, s, e), dn(a, i), t.ancestors.pop(), t.schema = r, t.create(e, s, a, n);
|
|
1557
1557
|
}
|
|
1558
|
-
function
|
|
1558
|
+
function zs(t, e, n) {
|
|
1559
1559
|
const r = {};
|
|
1560
1560
|
return dn(r, gn(t, e)), t.create(e, t.Fragment, r, n);
|
|
1561
1561
|
}
|
|
1562
|
-
function
|
|
1562
|
+
function Hs(t, e) {
|
|
1563
1563
|
return e.value;
|
|
1564
1564
|
}
|
|
1565
|
-
function
|
|
1565
|
+
function Hr(t, e, n, r) {
|
|
1566
1566
|
typeof n != "string" && n !== t.Fragment && t.passNode && (e.node = r);
|
|
1567
1567
|
}
|
|
1568
1568
|
function dn(t, e) {
|
|
@@ -1571,17 +1571,17 @@ function dn(t, e) {
|
|
|
1571
1571
|
n && (t.children = n);
|
|
1572
1572
|
}
|
|
1573
1573
|
}
|
|
1574
|
-
function
|
|
1574
|
+
function Ws(t, e, n) {
|
|
1575
1575
|
return r;
|
|
1576
1576
|
function r(o, s, a, i) {
|
|
1577
1577
|
const u = Array.isArray(a.children) ? n : e;
|
|
1578
1578
|
return i ? u(s, a, i) : u(s, a);
|
|
1579
1579
|
}
|
|
1580
1580
|
}
|
|
1581
|
-
function
|
|
1581
|
+
function Vs(t, e) {
|
|
1582
1582
|
return n;
|
|
1583
1583
|
function n(r, o, s, a) {
|
|
1584
|
-
const i = Array.isArray(s.children), l =
|
|
1584
|
+
const i = Array.isArray(s.children), l = Br(r);
|
|
1585
1585
|
return e(
|
|
1586
1586
|
o,
|
|
1587
1587
|
s,
|
|
@@ -1596,15 +1596,15 @@ function Ws(t, e) {
|
|
|
1596
1596
|
);
|
|
1597
1597
|
}
|
|
1598
1598
|
}
|
|
1599
|
-
function
|
|
1599
|
+
function qs(t, e) {
|
|
1600
1600
|
const n = {};
|
|
1601
1601
|
let r, o;
|
|
1602
1602
|
for (o in e.properties)
|
|
1603
1603
|
if (o !== "children" && pn.call(e.properties, o)) {
|
|
1604
|
-
const s =
|
|
1604
|
+
const s = Ks(t, o, e.properties[o]);
|
|
1605
1605
|
if (s) {
|
|
1606
1606
|
const [a, i] = s;
|
|
1607
|
-
t.tableCellAlignToStyle && a === "align" && typeof i == "string" &&
|
|
1607
|
+
t.tableCellAlignToStyle && a === "align" && typeof i == "string" && Ds.has(e.tagName) ? r = i : n[a] = i;
|
|
1608
1608
|
}
|
|
1609
1609
|
}
|
|
1610
1610
|
if (r) {
|
|
@@ -1616,7 +1616,7 @@ function Vs(t, e) {
|
|
|
1616
1616
|
}
|
|
1617
1617
|
return n;
|
|
1618
1618
|
}
|
|
1619
|
-
function
|
|
1619
|
+
function Xs(t, e) {
|
|
1620
1620
|
const n = {};
|
|
1621
1621
|
for (const r of e.attributes)
|
|
1622
1622
|
if (r.type === "mdxJsxExpressionAttribute")
|
|
@@ -1651,7 +1651,7 @@ function qs(t, e) {
|
|
|
1651
1651
|
function gn(t, e) {
|
|
1652
1652
|
const n = [];
|
|
1653
1653
|
let r = -1;
|
|
1654
|
-
const o = t.passKeys ? /* @__PURE__ */ new Map() :
|
|
1654
|
+
const o = t.passKeys ? /* @__PURE__ */ new Map() : Ts;
|
|
1655
1655
|
for (; ++r < e.children.length; ) {
|
|
1656
1656
|
const s = e.children[r];
|
|
1657
1657
|
let a;
|
|
@@ -1662,27 +1662,27 @@ function gn(t, e) {
|
|
|
1662
1662
|
a = l + "-" + u, o.set(l, u + 1);
|
|
1663
1663
|
}
|
|
1664
1664
|
}
|
|
1665
|
-
const i =
|
|
1665
|
+
const i = zr(t, s, a);
|
|
1666
1666
|
i !== void 0 && n.push(i);
|
|
1667
1667
|
}
|
|
1668
1668
|
return n;
|
|
1669
1669
|
}
|
|
1670
|
-
function
|
|
1671
|
-
const r =
|
|
1670
|
+
function Ks(t, e, n) {
|
|
1671
|
+
const r = Ss(t.schema, e);
|
|
1672
1672
|
if (!(n == null || typeof n == "number" && Number.isNaN(n))) {
|
|
1673
|
-
if (Array.isArray(n) && (n = r.commaSeparated ?
|
|
1674
|
-
let o = typeof n == "object" ? n :
|
|
1675
|
-
return t.stylePropertyNameCase === "css" && (o =
|
|
1673
|
+
if (Array.isArray(n) && (n = r.commaSeparated ? Nr(n) : Fr(n)), r.property === "style") {
|
|
1674
|
+
let o = typeof n == "object" ? n : Ys(t, String(n));
|
|
1675
|
+
return t.stylePropertyNameCase === "css" && (o = Js(o)), ["style", o];
|
|
1676
1676
|
}
|
|
1677
1677
|
return [
|
|
1678
|
-
t.elementAttributeNameCase === "react" && r.space ?
|
|
1678
|
+
t.elementAttributeNameCase === "react" && r.space ? ws[r.property] || r.property : r.attribute,
|
|
1679
1679
|
n
|
|
1680
1680
|
];
|
|
1681
1681
|
}
|
|
1682
1682
|
}
|
|
1683
|
-
function
|
|
1683
|
+
function Ys(t, e) {
|
|
1684
1684
|
try {
|
|
1685
|
-
return
|
|
1685
|
+
return Ls(e, { reactCompat: !0 });
|
|
1686
1686
|
} catch (n) {
|
|
1687
1687
|
if (t.ignoreInvalidStyle)
|
|
1688
1688
|
return {};
|
|
@@ -1695,10 +1695,10 @@ function Ks(t, e) {
|
|
|
1695
1695
|
ruleId: "style",
|
|
1696
1696
|
source: "hast-util-to-jsx-runtime"
|
|
1697
1697
|
});
|
|
1698
|
-
throw o.file = t.filePath || void 0, o.url =
|
|
1698
|
+
throw o.file = t.filePath || void 0, o.url = Ur + "#cannot-parse-style-attribute", o;
|
|
1699
1699
|
}
|
|
1700
1700
|
}
|
|
1701
|
-
function
|
|
1701
|
+
function Wr(t, e, n) {
|
|
1702
1702
|
let r;
|
|
1703
1703
|
if (!n)
|
|
1704
1704
|
r = { type: "Literal", value: e };
|
|
@@ -1739,23 +1739,23 @@ function je(t, e) {
|
|
|
1739
1739
|
source: "hast-util-to-jsx-runtime"
|
|
1740
1740
|
}
|
|
1741
1741
|
);
|
|
1742
|
-
throw n.file = t.filePath || void 0, n.url =
|
|
1742
|
+
throw n.file = t.filePath || void 0, n.url = Ur + "#cannot-handle-mdx-estrees-without-createevaluater", n;
|
|
1743
1743
|
}
|
|
1744
|
-
function
|
|
1744
|
+
function Js(t) {
|
|
1745
1745
|
const e = {};
|
|
1746
1746
|
let n;
|
|
1747
1747
|
for (n in t)
|
|
1748
|
-
pn.call(t, n) && (e[
|
|
1748
|
+
pn.call(t, n) && (e[Zs(n)] = t[n]);
|
|
1749
1749
|
return e;
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1752
|
-
let e = t.replace(
|
|
1751
|
+
function Zs(t) {
|
|
1752
|
+
let e = t.replace(Ms, Qs);
|
|
1753
1753
|
return e.slice(0, 3) === "ms-" && (e = "-" + e), e;
|
|
1754
1754
|
}
|
|
1755
|
-
function
|
|
1755
|
+
function Qs(t) {
|
|
1756
1756
|
return "-" + t.toLowerCase();
|
|
1757
1757
|
}
|
|
1758
|
-
const
|
|
1758
|
+
const Vr = (
|
|
1759
1759
|
// Note: overloads in JSDoc can’t yet use different `@template`s.
|
|
1760
1760
|
/**
|
|
1761
1761
|
* @type {(
|
|
@@ -1770,23 +1770,23 @@ const Wr = (
|
|
|
1770
1770
|
* @param {Test} [test]
|
|
1771
1771
|
* @returns {Check}
|
|
1772
1772
|
*/
|
|
1773
|
-
function(t) {
|
|
1773
|
+
(function(t) {
|
|
1774
1774
|
if (t == null)
|
|
1775
|
-
return
|
|
1775
|
+
return ra;
|
|
1776
1776
|
if (typeof t == "function")
|
|
1777
1777
|
return _t(t);
|
|
1778
1778
|
if (typeof t == "object")
|
|
1779
|
-
return Array.isArray(t) ?
|
|
1779
|
+
return Array.isArray(t) ? ea(t) : ta(t);
|
|
1780
1780
|
if (typeof t == "string")
|
|
1781
|
-
return
|
|
1781
|
+
return na(t);
|
|
1782
1782
|
throw new Error("Expected function, string, or object as test");
|
|
1783
|
-
}
|
|
1783
|
+
})
|
|
1784
1784
|
);
|
|
1785
|
-
function
|
|
1785
|
+
function ea(t) {
|
|
1786
1786
|
const e = [];
|
|
1787
1787
|
let n = -1;
|
|
1788
1788
|
for (; ++n < t.length; )
|
|
1789
|
-
e[n] =
|
|
1789
|
+
e[n] = Vr(t[n]);
|
|
1790
1790
|
return _t(r);
|
|
1791
1791
|
function r(...o) {
|
|
1792
1792
|
let s = -1;
|
|
@@ -1795,7 +1795,7 @@ function Qs(t) {
|
|
|
1795
1795
|
return !1;
|
|
1796
1796
|
}
|
|
1797
1797
|
}
|
|
1798
|
-
function
|
|
1798
|
+
function ta(t) {
|
|
1799
1799
|
const e = (
|
|
1800
1800
|
/** @type {Record<string, unknown>} */
|
|
1801
1801
|
t
|
|
@@ -1813,7 +1813,7 @@ function ea(t) {
|
|
|
1813
1813
|
return !0;
|
|
1814
1814
|
}
|
|
1815
1815
|
}
|
|
1816
|
-
function
|
|
1816
|
+
function na(t) {
|
|
1817
1817
|
return _t(e);
|
|
1818
1818
|
function e(n) {
|
|
1819
1819
|
return n && n.type === t;
|
|
@@ -1822,7 +1822,7 @@ function ta(t) {
|
|
|
1822
1822
|
function _t(t) {
|
|
1823
1823
|
return e;
|
|
1824
1824
|
function e(n, r, o) {
|
|
1825
|
-
return !!(
|
|
1825
|
+
return !!(oa(n) && t.call(
|
|
1826
1826
|
this,
|
|
1827
1827
|
n,
|
|
1828
1828
|
typeof r == "number" ? r : void 0,
|
|
@@ -1830,17 +1830,17 @@ function _t(t) {
|
|
|
1830
1830
|
));
|
|
1831
1831
|
}
|
|
1832
1832
|
}
|
|
1833
|
-
function
|
|
1833
|
+
function ra() {
|
|
1834
1834
|
return !0;
|
|
1835
1835
|
}
|
|
1836
|
-
function
|
|
1836
|
+
function oa(t) {
|
|
1837
1837
|
return t !== null && typeof t == "object" && "type" in t;
|
|
1838
1838
|
}
|
|
1839
|
-
const
|
|
1840
|
-
function
|
|
1839
|
+
const qr = [], sa = !0, Fn = !1, aa = "skip";
|
|
1840
|
+
function ia(t, e, n, r) {
|
|
1841
1841
|
let o;
|
|
1842
1842
|
typeof e == "function" && typeof n != "function" ? (r = n, n = e) : o = e;
|
|
1843
|
-
const s =
|
|
1843
|
+
const s = Vr(o), a = r ? -1 : 1;
|
|
1844
1844
|
i(t, void 0, [])();
|
|
1845
1845
|
function i(l, u, c) {
|
|
1846
1846
|
const h = (
|
|
@@ -1861,15 +1861,15 @@ function aa(t, e, n, r) {
|
|
|
1861
1861
|
}
|
|
1862
1862
|
return p;
|
|
1863
1863
|
function p() {
|
|
1864
|
-
let d =
|
|
1865
|
-
if ((!e || s(l, u, c[c.length - 1] || void 0)) && (d =
|
|
1864
|
+
let d = qr, f, g, C;
|
|
1865
|
+
if ((!e || s(l, u, c[c.length - 1] || void 0)) && (d = la(n(l, c)), d[0] === Fn))
|
|
1866
1866
|
return d;
|
|
1867
1867
|
if ("children" in l && l.children) {
|
|
1868
1868
|
const y = (
|
|
1869
1869
|
/** @type {UnistParent} */
|
|
1870
1870
|
l
|
|
1871
1871
|
);
|
|
1872
|
-
if (y.children && d[0] !==
|
|
1872
|
+
if (y.children && d[0] !== aa)
|
|
1873
1873
|
for (g = (r ? y.children.length : -1) + a, C = c.concat(y); g > -1 && g < y.children.length; ) {
|
|
1874
1874
|
const m = y.children[g];
|
|
1875
1875
|
if (f = i(m, g, C)(), f[0] === Fn)
|
|
@@ -1881,19 +1881,19 @@ function aa(t, e, n, r) {
|
|
|
1881
1881
|
}
|
|
1882
1882
|
}
|
|
1883
1883
|
}
|
|
1884
|
-
function
|
|
1885
|
-
return Array.isArray(t) ? t : typeof t == "number" ? [
|
|
1884
|
+
function la(t) {
|
|
1885
|
+
return Array.isArray(t) ? t : typeof t == "number" ? [sa, t] : t == null ? qr : [t];
|
|
1886
1886
|
}
|
|
1887
|
-
function
|
|
1887
|
+
function Xr(t, e, n, r) {
|
|
1888
1888
|
let o, s, a;
|
|
1889
|
-
typeof e == "function" && typeof n != "function" ? (s = void 0, a = e, o = n) : (s = e, a = n, o = r),
|
|
1889
|
+
typeof e == "function" && typeof n != "function" ? (s = void 0, a = e, o = n) : (s = e, a = n, o = r), ia(t, s, i, o);
|
|
1890
1890
|
function i(l, u) {
|
|
1891
1891
|
const c = u[u.length - 1], h = c ? c.children.indexOf(l) : void 0;
|
|
1892
1892
|
return a(l, h, c);
|
|
1893
1893
|
}
|
|
1894
1894
|
}
|
|
1895
1895
|
const Bn = {}.hasOwnProperty;
|
|
1896
|
-
function
|
|
1896
|
+
function ua(t, e) {
|
|
1897
1897
|
const n = e || {};
|
|
1898
1898
|
function r(o, ...s) {
|
|
1899
1899
|
let a = r.invalid;
|
|
@@ -1907,7 +1907,7 @@ function la(t, e) {
|
|
|
1907
1907
|
}
|
|
1908
1908
|
return r.handlers = n.handlers || {}, r.invalid = n.invalid, r.unknown = n.unknown, r;
|
|
1909
1909
|
}
|
|
1910
|
-
const
|
|
1910
|
+
const ca = [
|
|
1911
1911
|
"area",
|
|
1912
1912
|
"base",
|
|
1913
1913
|
"basefont",
|
|
@@ -1943,33 +1943,33 @@ let F = class extends Error {
|
|
|
1943
1943
|
super(e), this.name = "ShikiError";
|
|
1944
1944
|
}
|
|
1945
1945
|
};
|
|
1946
|
-
function
|
|
1946
|
+
function ha(t) {
|
|
1947
1947
|
return mn(t);
|
|
1948
1948
|
}
|
|
1949
1949
|
function mn(t) {
|
|
1950
|
-
return Array.isArray(t) ?
|
|
1950
|
+
return Array.isArray(t) ? fa(t) : t instanceof RegExp ? t : typeof t == "object" ? pa(t) : t;
|
|
1951
1951
|
}
|
|
1952
|
-
function
|
|
1952
|
+
function fa(t) {
|
|
1953
1953
|
let e = [];
|
|
1954
1954
|
for (let n = 0, r = t.length; n < r; n++)
|
|
1955
1955
|
e[n] = mn(t[n]);
|
|
1956
1956
|
return e;
|
|
1957
1957
|
}
|
|
1958
|
-
function
|
|
1958
|
+
function pa(t) {
|
|
1959
1959
|
let e = {};
|
|
1960
1960
|
for (let n in t)
|
|
1961
1961
|
e[n] = mn(t[n]);
|
|
1962
1962
|
return e;
|
|
1963
1963
|
}
|
|
1964
|
-
function
|
|
1964
|
+
function Kr(t, ...e) {
|
|
1965
1965
|
return e.forEach((n) => {
|
|
1966
1966
|
for (let r in n)
|
|
1967
1967
|
t[r] = n[r];
|
|
1968
1968
|
}), t;
|
|
1969
1969
|
}
|
|
1970
|
-
function
|
|
1970
|
+
function Yr(t) {
|
|
1971
1971
|
const e = ~t.lastIndexOf("/") || ~t.lastIndexOf("\\");
|
|
1972
|
-
return e === 0 ? t : ~e === t.length - 1 ?
|
|
1972
|
+
return e === 0 ? t : ~e === t.length - 1 ? Yr(t.substring(0, t.length - 1)) : t.substr(~e + 1);
|
|
1973
1973
|
}
|
|
1974
1974
|
var It = /\$(\d+)|\${(\d+):\/(downcase|upcase)}/g, Je = class {
|
|
1975
1975
|
static hasCaptures(t) {
|
|
@@ -1995,10 +1995,10 @@ var It = /\$(\d+)|\${(\d+):\/(downcase|upcase)}/g, Je = class {
|
|
|
1995
1995
|
});
|
|
1996
1996
|
}
|
|
1997
1997
|
};
|
|
1998
|
-
function
|
|
1998
|
+
function Jr(t, e) {
|
|
1999
1999
|
return t < e ? -1 : t > e ? 1 : 0;
|
|
2000
2000
|
}
|
|
2001
|
-
function
|
|
2001
|
+
function Zr(t, e) {
|
|
2002
2002
|
if (t === null && e === null)
|
|
2003
2003
|
return 0;
|
|
2004
2004
|
if (!t)
|
|
@@ -2008,7 +2008,7 @@ function Jr(t, e) {
|
|
|
2008
2008
|
let n = t.length, r = e.length;
|
|
2009
2009
|
if (n === r) {
|
|
2010
2010
|
for (let o = 0; o < n; o++) {
|
|
2011
|
-
let s =
|
|
2011
|
+
let s = Jr(t[o], e[o]);
|
|
2012
2012
|
if (s !== 0)
|
|
2013
2013
|
return s;
|
|
2014
2014
|
}
|
|
@@ -2019,10 +2019,10 @@ function Jr(t, e) {
|
|
|
2019
2019
|
function Un(t) {
|
|
2020
2020
|
return !!(/^#[0-9a-f]{6}$/i.test(t) || /^#[0-9a-f]{8}$/i.test(t) || /^#[0-9a-f]{3}$/i.test(t) || /^#[0-9a-f]{4}$/i.test(t));
|
|
2021
2021
|
}
|
|
2022
|
-
function
|
|
2022
|
+
function Qr(t) {
|
|
2023
2023
|
return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, "\\$&");
|
|
2024
2024
|
}
|
|
2025
|
-
var
|
|
2025
|
+
var eo = class {
|
|
2026
2026
|
constructor(t) {
|
|
2027
2027
|
this.fn = t;
|
|
2028
2028
|
}
|
|
@@ -2038,12 +2038,12 @@ var Qr = class {
|
|
|
2038
2038
|
this._colorMap = t, this._defaults = e, this._root = n;
|
|
2039
2039
|
}
|
|
2040
2040
|
static createFromRawTheme(t, e) {
|
|
2041
|
-
return this.createFromParsedTheme(
|
|
2041
|
+
return this.createFromParsedTheme(ma(t), e);
|
|
2042
2042
|
}
|
|
2043
2043
|
static createFromParsedTheme(t, e) {
|
|
2044
|
-
return
|
|
2044
|
+
return ba(t, e);
|
|
2045
2045
|
}
|
|
2046
|
-
_cachedMatchRoot = new
|
|
2046
|
+
_cachedMatchRoot = new eo(
|
|
2047
2047
|
(t) => this._root.match(t)
|
|
2048
2048
|
);
|
|
2049
2049
|
getColorMap() {
|
|
@@ -2056,9 +2056,9 @@ var Qr = class {
|
|
|
2056
2056
|
if (t === null)
|
|
2057
2057
|
return this._defaults;
|
|
2058
2058
|
const e = t.scopeName, r = this._cachedMatchRoot.get(e).find(
|
|
2059
|
-
(o) =>
|
|
2059
|
+
(o) => da(t.parent, o.parentScopes)
|
|
2060
2060
|
);
|
|
2061
|
-
return r ? new
|
|
2061
|
+
return r ? new to(
|
|
2062
2062
|
r.fontStyle,
|
|
2063
2063
|
r.foreground,
|
|
2064
2064
|
r.background
|
|
@@ -2103,7 +2103,7 @@ var Qr = class {
|
|
|
2103
2103
|
return r === e ? n.reverse() : void 0;
|
|
2104
2104
|
}
|
|
2105
2105
|
};
|
|
2106
|
-
function
|
|
2106
|
+
function da(t, e) {
|
|
2107
2107
|
if (e.length === 0)
|
|
2108
2108
|
return !0;
|
|
2109
2109
|
for (let n = 0; n < e.length; n++) {
|
|
@@ -2113,7 +2113,7 @@ function pa(t, e) {
|
|
|
2113
2113
|
return !1;
|
|
2114
2114
|
r = e[++n], o = !0;
|
|
2115
2115
|
}
|
|
2116
|
-
for (; t && !
|
|
2116
|
+
for (; t && !ga(t.scopeName, r); ) {
|
|
2117
2117
|
if (o)
|
|
2118
2118
|
return !1;
|
|
2119
2119
|
t = t.parent;
|
|
@@ -2124,15 +2124,15 @@ function pa(t, e) {
|
|
|
2124
2124
|
}
|
|
2125
2125
|
return !0;
|
|
2126
2126
|
}
|
|
2127
|
-
function
|
|
2127
|
+
function ga(t, e) {
|
|
2128
2128
|
return e === t || t.startsWith(e) && t[e.length] === ".";
|
|
2129
2129
|
}
|
|
2130
|
-
var
|
|
2130
|
+
var to = class {
|
|
2131
2131
|
constructor(t, e, n) {
|
|
2132
2132
|
this.fontStyle = t, this.foregroundId = e, this.backgroundId = n;
|
|
2133
2133
|
}
|
|
2134
2134
|
};
|
|
2135
|
-
function
|
|
2135
|
+
function ma(t) {
|
|
2136
2136
|
if (!t)
|
|
2137
2137
|
return [];
|
|
2138
2138
|
if (!t.settings || !Array.isArray(t.settings))
|
|
@@ -2173,7 +2173,7 @@ function ga(t) {
|
|
|
2173
2173
|
typeof a.settings.background == "string" && Un(a.settings.background) && (c = a.settings.background);
|
|
2174
2174
|
for (let h = 0, p = i.length; h < p; h++) {
|
|
2175
2175
|
let f = i[h].trim().split(" "), g = f[f.length - 1], C = null;
|
|
2176
|
-
f.length > 1 && (C = f.slice(0, f.length - 1), C.reverse()), n[r++] = new
|
|
2176
|
+
f.length > 1 && (C = f.slice(0, f.length - 1), C.reverse()), n[r++] = new ya(
|
|
2177
2177
|
g,
|
|
2178
2178
|
C,
|
|
2179
2179
|
o,
|
|
@@ -2185,29 +2185,29 @@ function ga(t) {
|
|
|
2185
2185
|
}
|
|
2186
2186
|
return n;
|
|
2187
2187
|
}
|
|
2188
|
-
var
|
|
2188
|
+
var ya = class {
|
|
2189
2189
|
constructor(t, e, n, r, o, s) {
|
|
2190
2190
|
this.scope = t, this.parentScopes = e, this.index = n, this.fontStyle = r, this.foreground = o, this.background = s;
|
|
2191
2191
|
}
|
|
2192
2192
|
}, z = /* @__PURE__ */ ((t) => (t[t.NotSet = -1] = "NotSet", t[t.None = 0] = "None", t[t.Italic = 1] = "Italic", t[t.Bold = 2] = "Bold", t[t.Underline = 4] = "Underline", t[t.Strikethrough = 8] = "Strikethrough", t))(z || {});
|
|
2193
|
-
function
|
|
2193
|
+
function ba(t, e) {
|
|
2194
2194
|
t.sort((l, u) => {
|
|
2195
|
-
let c =
|
|
2196
|
-
return c !== 0 || (c =
|
|
2195
|
+
let c = Jr(l.scope, u.scope);
|
|
2196
|
+
return c !== 0 || (c = Zr(l.parentScopes, u.parentScopes), c !== 0) ? c : l.index - u.index;
|
|
2197
2197
|
});
|
|
2198
2198
|
let n = 0, r = "#000000", o = "#ffffff";
|
|
2199
2199
|
for (; t.length >= 1 && t[0].scope === ""; ) {
|
|
2200
2200
|
let l = t.shift();
|
|
2201
2201
|
l.fontStyle !== -1 && (n = l.fontStyle), l.foreground !== null && (r = l.foreground), l.background !== null && (o = l.background);
|
|
2202
2202
|
}
|
|
2203
|
-
let s = new
|
|
2203
|
+
let s = new wa(e), a = new to(n, s.getId(r), s.getId(o)), i = new _a(new Vt(0, null, -1, 0, 0), []);
|
|
2204
2204
|
for (let l = 0, u = t.length; l < u; l++) {
|
|
2205
2205
|
let c = t[l];
|
|
2206
2206
|
i.insert(0, c.scope, c.parentScopes, c.fontStyle, s.getId(c.foreground), s.getId(c.background));
|
|
2207
2207
|
}
|
|
2208
2208
|
return new it(s, a, i);
|
|
2209
2209
|
}
|
|
2210
|
-
var
|
|
2210
|
+
var wa = class {
|
|
2211
2211
|
_isFrozen;
|
|
2212
2212
|
_lastColorId;
|
|
2213
2213
|
_id2color;
|
|
@@ -2234,17 +2234,17 @@ var ba = class {
|
|
|
2234
2234
|
getColorMap() {
|
|
2235
2235
|
return this._id2color.slice(0);
|
|
2236
2236
|
}
|
|
2237
|
-
},
|
|
2237
|
+
}, Ca = Object.freeze([]), Vt = class no {
|
|
2238
2238
|
scopeDepth;
|
|
2239
2239
|
parentScopes;
|
|
2240
2240
|
fontStyle;
|
|
2241
2241
|
foreground;
|
|
2242
2242
|
background;
|
|
2243
2243
|
constructor(e, n, r, o, s) {
|
|
2244
|
-
this.scopeDepth = e, this.parentScopes = n ||
|
|
2244
|
+
this.scopeDepth = e, this.parentScopes = n || Ca, this.fontStyle = r, this.foreground = o, this.background = s;
|
|
2245
2245
|
}
|
|
2246
2246
|
clone() {
|
|
2247
|
-
return new
|
|
2247
|
+
return new no(this.scopeDepth, this.parentScopes, this.fontStyle, this.foreground, this.background);
|
|
2248
2248
|
}
|
|
2249
2249
|
static cloneArr(e) {
|
|
2250
2250
|
let n = [];
|
|
@@ -2255,7 +2255,7 @@ var ba = class {
|
|
|
2255
2255
|
acceptOverwrite(e, n, r, o) {
|
|
2256
2256
|
this.scopeDepth > e ? console.log("how did this happen?") : this.scopeDepth = e, n !== -1 && (this.fontStyle = n), r !== 0 && (this.foreground = r), o !== 0 && (this.background = o);
|
|
2257
2257
|
}
|
|
2258
|
-
},
|
|
2258
|
+
}, _a = class qt {
|
|
2259
2259
|
constructor(e, n = [], r = {}) {
|
|
2260
2260
|
this._mainRule = e, this._children = r, this._rulesWithParentScopes = n;
|
|
2261
2261
|
}
|
|
@@ -2298,7 +2298,7 @@ var ba = class {
|
|
|
2298
2298
|
}
|
|
2299
2299
|
for (let a = 0, i = this._rulesWithParentScopes.length; a < i; a++) {
|
|
2300
2300
|
let l = this._rulesWithParentScopes[a];
|
|
2301
|
-
if (
|
|
2301
|
+
if (Zr(l.parentScopes, n) === 0) {
|
|
2302
2302
|
l.acceptOverwrite(e, r, o, s);
|
|
2303
2303
|
return;
|
|
2304
2304
|
}
|
|
@@ -2347,7 +2347,7 @@ var ba = class {
|
|
|
2347
2347
|
}
|
|
2348
2348
|
};
|
|
2349
2349
|
function lt(t, e) {
|
|
2350
|
-
const n = [], r =
|
|
2350
|
+
const n = [], r = Sa(t);
|
|
2351
2351
|
let o = r.next();
|
|
2352
2352
|
for (; o !== null; ) {
|
|
2353
2353
|
let l = 0;
|
|
@@ -2412,7 +2412,7 @@ function lt(t, e) {
|
|
|
2412
2412
|
function zn(t) {
|
|
2413
2413
|
return !!t && !!t.match(/[\w\.:]+/);
|
|
2414
2414
|
}
|
|
2415
|
-
function
|
|
2415
|
+
function Sa(t) {
|
|
2416
2416
|
let e = /([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g, n = e.exec(t);
|
|
2417
2417
|
return {
|
|
2418
2418
|
next: () => {
|
|
@@ -2423,7 +2423,7 @@ function _a(t) {
|
|
|
2423
2423
|
}
|
|
2424
2424
|
};
|
|
2425
2425
|
}
|
|
2426
|
-
function
|
|
2426
|
+
function ro(t) {
|
|
2427
2427
|
typeof t.dispose == "function" && t.dispose();
|
|
2428
2428
|
}
|
|
2429
2429
|
var Ue = class {
|
|
@@ -2433,14 +2433,14 @@ var Ue = class {
|
|
|
2433
2433
|
toKey() {
|
|
2434
2434
|
return this.scopeName;
|
|
2435
2435
|
}
|
|
2436
|
-
},
|
|
2436
|
+
}, ka = class {
|
|
2437
2437
|
constructor(t, e) {
|
|
2438
2438
|
this.scopeName = t, this.ruleName = e;
|
|
2439
2439
|
}
|
|
2440
2440
|
toKey() {
|
|
2441
2441
|
return `${this.scopeName}#${this.ruleName}`;
|
|
2442
2442
|
}
|
|
2443
|
-
},
|
|
2443
|
+
}, va = class {
|
|
2444
2444
|
_references = [];
|
|
2445
2445
|
_seenReferenceKeys = /* @__PURE__ */ new Set();
|
|
2446
2446
|
get references() {
|
|
@@ -2451,7 +2451,7 @@ var Ue = class {
|
|
|
2451
2451
|
const e = t.toKey();
|
|
2452
2452
|
this._seenReferenceKeys.has(e) || (this._seenReferenceKeys.add(e), this._references.push(t));
|
|
2453
2453
|
}
|
|
2454
|
-
},
|
|
2454
|
+
}, xa = class {
|
|
2455
2455
|
constructor(t, e) {
|
|
2456
2456
|
this.repo = t, this.initialScopeName = e, this.seenFullScopeRequests.add(this.initialScopeName), this.Q = [new Ue(this.initialScopeName)];
|
|
2457
2457
|
}
|
|
@@ -2461,9 +2461,9 @@ var Ue = class {
|
|
|
2461
2461
|
processQueue() {
|
|
2462
2462
|
const t = this.Q;
|
|
2463
2463
|
this.Q = [];
|
|
2464
|
-
const e = new
|
|
2464
|
+
const e = new va();
|
|
2465
2465
|
for (const n of t)
|
|
2466
|
-
|
|
2466
|
+
Ea(n, this.initialScopeName, this.repo, e);
|
|
2467
2467
|
for (const n of e.references)
|
|
2468
2468
|
if (n instanceof Ue) {
|
|
2469
2469
|
if (this.seenFullScopeRequests.has(n.scopeName))
|
|
@@ -2476,7 +2476,7 @@ var Ue = class {
|
|
|
2476
2476
|
}
|
|
2477
2477
|
}
|
|
2478
2478
|
};
|
|
2479
|
-
function
|
|
2479
|
+
function Ea(t, e, n, r) {
|
|
2480
2480
|
const o = n.lookup(t.scopeName);
|
|
2481
2481
|
if (!o) {
|
|
2482
2482
|
if (t.scopeName === e)
|
|
@@ -2516,12 +2516,12 @@ function ut(t, e, n) {
|
|
|
2516
2516
|
if (n.visitedRule.has(r))
|
|
2517
2517
|
continue;
|
|
2518
2518
|
n.visitedRule.add(r);
|
|
2519
|
-
const o = r.repository ?
|
|
2519
|
+
const o = r.repository ? Kr({}, e.repository, r.repository) : e.repository;
|
|
2520
2520
|
Array.isArray(r.patterns) && ut(r.patterns, { ...e, repository: o }, n);
|
|
2521
2521
|
const s = r.include;
|
|
2522
2522
|
if (!s)
|
|
2523
2523
|
continue;
|
|
2524
|
-
const a =
|
|
2524
|
+
const a = oo(s);
|
|
2525
2525
|
switch (a.kind) {
|
|
2526
2526
|
case 0:
|
|
2527
2527
|
ot({ ...e, selfGrammar: e.baseGrammar }, n);
|
|
@@ -2539,47 +2539,47 @@ function ut(t, e, n) {
|
|
|
2539
2539
|
const l = { baseGrammar: e.baseGrammar, selfGrammar: i, repository: o };
|
|
2540
2540
|
a.kind === 4 ? Xt(a.ruleName, l, n) : ot(l, n);
|
|
2541
2541
|
} else
|
|
2542
|
-
a.kind === 4 ? n.add(new
|
|
2542
|
+
a.kind === 4 ? n.add(new ka(a.scopeName, a.ruleName)) : n.add(new Ue(a.scopeName));
|
|
2543
2543
|
break;
|
|
2544
2544
|
}
|
|
2545
2545
|
}
|
|
2546
2546
|
}
|
|
2547
|
-
var
|
|
2547
|
+
var Aa = class {
|
|
2548
2548
|
kind = 0;
|
|
2549
|
-
}, Aa = class {
|
|
2550
|
-
kind = 1;
|
|
2551
2549
|
}, Ra = class {
|
|
2550
|
+
kind = 1;
|
|
2551
|
+
}, Ia = class {
|
|
2552
2552
|
constructor(t) {
|
|
2553
2553
|
this.ruleName = t;
|
|
2554
2554
|
}
|
|
2555
2555
|
kind = 2;
|
|
2556
|
-
},
|
|
2556
|
+
}, Na = class {
|
|
2557
2557
|
constructor(t) {
|
|
2558
2558
|
this.scopeName = t;
|
|
2559
2559
|
}
|
|
2560
2560
|
kind = 3;
|
|
2561
|
-
},
|
|
2561
|
+
}, La = class {
|
|
2562
2562
|
constructor(t, e) {
|
|
2563
2563
|
this.scopeName = t, this.ruleName = e;
|
|
2564
2564
|
}
|
|
2565
2565
|
kind = 4;
|
|
2566
2566
|
};
|
|
2567
|
-
function
|
|
2567
|
+
function oo(t) {
|
|
2568
2568
|
if (t === "$base")
|
|
2569
|
-
return new Ea();
|
|
2570
|
-
if (t === "$self")
|
|
2571
2569
|
return new Aa();
|
|
2570
|
+
if (t === "$self")
|
|
2571
|
+
return new Ra();
|
|
2572
2572
|
const e = t.indexOf("#");
|
|
2573
2573
|
if (e === -1)
|
|
2574
|
-
return new
|
|
2574
|
+
return new Na(t);
|
|
2575
2575
|
if (e === 0)
|
|
2576
|
-
return new
|
|
2576
|
+
return new Ia(t.substring(1));
|
|
2577
2577
|
{
|
|
2578
2578
|
const n = t.substring(0, e), r = t.substring(e + 1);
|
|
2579
|
-
return new
|
|
2579
|
+
return new La(n, r);
|
|
2580
2580
|
}
|
|
2581
2581
|
}
|
|
2582
|
-
var
|
|
2582
|
+
var Pa = /\\(\d+)/, Hn = /\\(\d+)/g, $a = -1, so = -2;
|
|
2583
2583
|
var Xe = class {
|
|
2584
2584
|
$location;
|
|
2585
2585
|
id;
|
|
@@ -2591,7 +2591,7 @@ var Xe = class {
|
|
|
2591
2591
|
this.$location = t, this.id = e, this._name = n || null, this._nameIsCapturing = Je.hasCaptures(this._name), this._contentName = r || null, this._contentNameIsCapturing = Je.hasCaptures(this._contentName);
|
|
2592
2592
|
}
|
|
2593
2593
|
get debugName() {
|
|
2594
|
-
const t = this.$location ? `${
|
|
2594
|
+
const t = this.$location ? `${Yr(this.$location.filename)}:${this.$location.line}` : "unknown";
|
|
2595
2595
|
return `${this.constructor.name}#${this.id} @ ${t}`;
|
|
2596
2596
|
}
|
|
2597
2597
|
getName(t, e) {
|
|
@@ -2600,7 +2600,7 @@ var Xe = class {
|
|
|
2600
2600
|
getContentName(t, e) {
|
|
2601
2601
|
return !this._contentNameIsCapturing || this._contentName === null ? this._contentName : Je.replaceCaptures(this._contentName, t, e);
|
|
2602
2602
|
}
|
|
2603
|
-
},
|
|
2603
|
+
}, Ta = class extends Xe {
|
|
2604
2604
|
retokenizeCapturedWithRuleId;
|
|
2605
2605
|
constructor(t, e, n, r, o) {
|
|
2606
2606
|
super(t, e, n, r), this.retokenizeCapturedWithRuleId = o;
|
|
@@ -2616,7 +2616,7 @@ var Xe = class {
|
|
|
2616
2616
|
compileAG(t, e, n, r) {
|
|
2617
2617
|
throw new Error("Not supported!");
|
|
2618
2618
|
}
|
|
2619
|
-
},
|
|
2619
|
+
}, Ma = class extends Xe {
|
|
2620
2620
|
_match;
|
|
2621
2621
|
captures;
|
|
2622
2622
|
_cachedCompiledPatterns;
|
|
@@ -2718,7 +2718,7 @@ var Xe = class {
|
|
|
2718
2718
|
_cachedCompiledPatterns;
|
|
2719
2719
|
_cachedCompiledWhilePatterns;
|
|
2720
2720
|
constructor(t, e, n, r, o, s, a, i, l) {
|
|
2721
|
-
super(t, e, n, r), this._begin = new ze(o, this.id), this.beginCaptures = s, this.whileCaptures = i, this._while = new ze(a,
|
|
2721
|
+
super(t, e, n, r), this._begin = new ze(o, this.id), this.beginCaptures = s, this.whileCaptures = i, this._while = new ze(a, so), this.whileHasBackReferences = this._while.hasBackReferences, this.patterns = l.patterns, this.hasMissingPatterns = l.hasMissingPatterns, this._cachedCompiledPatterns = null, this._cachedCompiledWhilePatterns = null;
|
|
2722
2722
|
}
|
|
2723
2723
|
dispose() {
|
|
2724
2724
|
this._cachedCompiledPatterns && (this._cachedCompiledPatterns.dispose(), this._cachedCompiledPatterns = null), this._cachedCompiledWhilePatterns && (this._cachedCompiledWhilePatterns.dispose(), this._cachedCompiledWhilePatterns = null);
|
|
@@ -2758,14 +2758,14 @@ var Xe = class {
|
|
|
2758
2758
|
_getCachedCompiledWhilePatterns(t, e) {
|
|
2759
2759
|
return this._cachedCompiledWhilePatterns || (this._cachedCompiledWhilePatterns = new He(), this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences ? this._while.clone() : this._while)), this._while.hasBackReferences && this._cachedCompiledWhilePatterns.setSource(0, e || ""), this._cachedCompiledWhilePatterns;
|
|
2760
2760
|
}
|
|
2761
|
-
},
|
|
2761
|
+
}, ao = class U {
|
|
2762
2762
|
static createCaptureRule(e, n, r, o, s) {
|
|
2763
|
-
return e.registerRule((a) => new
|
|
2763
|
+
return e.registerRule((a) => new Ta(n, a, r, o, s));
|
|
2764
2764
|
}
|
|
2765
2765
|
static getCompiledRuleId(e, n, r) {
|
|
2766
2766
|
return e.id || n.registerRule((o) => {
|
|
2767
2767
|
if (e.id = o, e.match)
|
|
2768
|
-
return new
|
|
2768
|
+
return new Ma(
|
|
2769
2769
|
e.$vscodeTextmateLocation,
|
|
2770
2770
|
e.id,
|
|
2771
2771
|
e.name,
|
|
@@ -2773,7 +2773,7 @@ var Xe = class {
|
|
|
2773
2773
|
U._compileCaptures(e.captures, n, r)
|
|
2774
2774
|
);
|
|
2775
2775
|
if (typeof e.begin > "u") {
|
|
2776
|
-
e.repository && (r =
|
|
2776
|
+
e.repository && (r = Kr({}, r, e.repository));
|
|
2777
2777
|
let s = e.patterns;
|
|
2778
2778
|
return typeof s > "u" && e.include && (s = [{ include: e.include }]), new Wn(
|
|
2779
2779
|
e.$vscodeTextmateLocation,
|
|
@@ -2836,7 +2836,7 @@ var Xe = class {
|
|
|
2836
2836
|
const i = e[s];
|
|
2837
2837
|
let l = -1;
|
|
2838
2838
|
if (i.include) {
|
|
2839
|
-
const u =
|
|
2839
|
+
const u = oo(i.include);
|
|
2840
2840
|
switch (u.kind) {
|
|
2841
2841
|
case 0:
|
|
2842
2842
|
case 1:
|
|
@@ -2872,7 +2872,7 @@ var Xe = class {
|
|
|
2872
2872
|
hasMissingPatterns: (e ? e.length : 0) !== o.length
|
|
2873
2873
|
};
|
|
2874
2874
|
}
|
|
2875
|
-
}, ze = class
|
|
2875
|
+
}, ze = class io {
|
|
2876
2876
|
source;
|
|
2877
2877
|
ruleId;
|
|
2878
2878
|
hasAnchor;
|
|
@@ -2890,10 +2890,10 @@ var Xe = class {
|
|
|
2890
2890
|
this.hasAnchor = a, o === 0 ? this.source = e : (s.push(e.substring(o, r)), this.source = s.join(""));
|
|
2891
2891
|
} else
|
|
2892
2892
|
this.hasAnchor = !1, this.source = e;
|
|
2893
|
-
this.hasAnchor ? this._anchorCache = this._buildAnchorCache() : this._anchorCache = null, this.ruleId = n, typeof this.source == "string" ? this.hasBackReferences =
|
|
2893
|
+
this.hasAnchor ? this._anchorCache = this._buildAnchorCache() : this._anchorCache = null, this.ruleId = n, typeof this.source == "string" ? this.hasBackReferences = Pa.test(this.source) : this.hasBackReferences = !1;
|
|
2894
2894
|
}
|
|
2895
2895
|
clone() {
|
|
2896
|
-
return new
|
|
2896
|
+
return new io(this.source, this.ruleId);
|
|
2897
2897
|
}
|
|
2898
2898
|
setSource(e) {
|
|
2899
2899
|
this.source !== e && (this.source = e, this.hasAnchor && (this._anchorCache = this._buildAnchorCache()));
|
|
@@ -2902,7 +2902,7 @@ var Xe = class {
|
|
|
2902
2902
|
if (typeof this.source != "string")
|
|
2903
2903
|
throw new Error("This method should only be called if the source is a string");
|
|
2904
2904
|
let r = n.map((o) => e.substring(o.start, o.end));
|
|
2905
|
-
return Hn.lastIndex = 0, this.source.replace(Hn, (o, s) =>
|
|
2905
|
+
return Hn.lastIndex = 0, this.source.replace(Hn, (o, s) => Qr(r[parseInt(s, 10)] || ""));
|
|
2906
2906
|
}
|
|
2907
2907
|
_buildAnchorCache() {
|
|
2908
2908
|
if (typeof this.source != "string")
|
|
@@ -2991,7 +2991,7 @@ var Xe = class {
|
|
|
2991
2991
|
constructor(t, e) {
|
|
2992
2992
|
this.languageId = t, this.tokenType = e;
|
|
2993
2993
|
}
|
|
2994
|
-
},
|
|
2994
|
+
}, Oa = class Yt {
|
|
2995
2995
|
_defaultAttributes;
|
|
2996
2996
|
_embeddedLanguagesMatcher;
|
|
2997
2997
|
constructor(e, n) {
|
|
@@ -2999,7 +2999,7 @@ var Xe = class {
|
|
|
2999
2999
|
e,
|
|
3000
3000
|
8
|
|
3001
3001
|
/* NotSet */
|
|
3002
|
-
), this._embeddedLanguagesMatcher = new
|
|
3002
|
+
), this._embeddedLanguagesMatcher = new Da(Object.entries(n || {}));
|
|
3003
3003
|
}
|
|
3004
3004
|
getDefaultAttributes() {
|
|
3005
3005
|
return this._defaultAttributes;
|
|
@@ -3008,7 +3008,7 @@ var Xe = class {
|
|
|
3008
3008
|
return e === null ? Yt._NULL_SCOPE_METADATA : this._getBasicScopeAttributes.get(e);
|
|
3009
3009
|
}
|
|
3010
3010
|
static _NULL_SCOPE_METADATA = new Lt(0, 0);
|
|
3011
|
-
_getBasicScopeAttributes = new
|
|
3011
|
+
_getBasicScopeAttributes = new eo((e) => {
|
|
3012
3012
|
const n = this._scopeToLanguage(e), r = this._toStandardTokenType(e);
|
|
3013
3013
|
return new Lt(n, r);
|
|
3014
3014
|
});
|
|
@@ -3036,7 +3036,7 @@ var Xe = class {
|
|
|
3036
3036
|
throw new Error("Unexpected match for standard token type!");
|
|
3037
3037
|
}
|
|
3038
3038
|
static STANDARD_TOKEN_TYPE_REGEXP = /\b(comment|string|regex|meta\.embedded)\b/;
|
|
3039
|
-
},
|
|
3039
|
+
}, Da = class {
|
|
3040
3040
|
values;
|
|
3041
3041
|
scopesRegExp;
|
|
3042
3042
|
constructor(t) {
|
|
@@ -3045,7 +3045,7 @@ var Xe = class {
|
|
|
3045
3045
|
else {
|
|
3046
3046
|
this.values = new Map(t);
|
|
3047
3047
|
const e = t.map(
|
|
3048
|
-
([n, r]) =>
|
|
3048
|
+
([n, r]) => Qr(n)
|
|
3049
3049
|
);
|
|
3050
3050
|
e.sort(), e.reverse(), this.scopesRegExp = new RegExp(
|
|
3051
3051
|
`^((${e.join(")|(")}))($|\\.)`,
|
|
@@ -3067,11 +3067,11 @@ var qn = class {
|
|
|
3067
3067
|
this.stack = t, this.stoppedEarly = e;
|
|
3068
3068
|
}
|
|
3069
3069
|
};
|
|
3070
|
-
function
|
|
3070
|
+
function lo(t, e, n, r, o, s, a, i) {
|
|
3071
3071
|
const l = e.content.length;
|
|
3072
3072
|
let u = !1, c = -1;
|
|
3073
3073
|
if (a) {
|
|
3074
|
-
const d =
|
|
3074
|
+
const d = Ga(
|
|
3075
3075
|
t,
|
|
3076
3076
|
e,
|
|
3077
3077
|
n,
|
|
@@ -3089,7 +3089,7 @@ function io(t, e, n, r, o, s, a, i) {
|
|
|
3089
3089
|
}
|
|
3090
3090
|
return new qn(o, !1);
|
|
3091
3091
|
function p() {
|
|
3092
|
-
const d =
|
|
3092
|
+
const d = Fa(
|
|
3093
3093
|
t,
|
|
3094
3094
|
e,
|
|
3095
3095
|
n,
|
|
@@ -3102,7 +3102,7 @@ function io(t, e, n, r, o, s, a, i) {
|
|
|
3102
3102
|
return;
|
|
3103
3103
|
}
|
|
3104
3104
|
const f = d.captureIndices, g = d.matchedRuleId, C = f && f.length > 0 ? f[0].end > r : !1;
|
|
3105
|
-
if (g ===
|
|
3105
|
+
if (g === $a) {
|
|
3106
3106
|
const y = o.getRule(t);
|
|
3107
3107
|
s.produce(o, f[0].start), o = o.withContentNameScopesList(o.nameScopesList), Ge(
|
|
3108
3108
|
t,
|
|
@@ -3203,7 +3203,7 @@ function io(t, e, n, r, o, s, a, i) {
|
|
|
3203
3203
|
f[0].end > r && (r = f[0].end, n = !1);
|
|
3204
3204
|
}
|
|
3205
3205
|
}
|
|
3206
|
-
function
|
|
3206
|
+
function Ga(t, e, n, r, o, s) {
|
|
3207
3207
|
let a = o.beginRuleCapturedEOL ? 0 : -1;
|
|
3208
3208
|
const i = [];
|
|
3209
3209
|
for (let l = o; l; l = l.pop()) {
|
|
@@ -3214,9 +3214,9 @@ function Da(t, e, n, r, o, s) {
|
|
|
3214
3214
|
});
|
|
3215
3215
|
}
|
|
3216
3216
|
for (let l = i.pop(); l; l = i.pop()) {
|
|
3217
|
-
const { ruleScanner: u, findOptions: c } =
|
|
3217
|
+
const { ruleScanner: u, findOptions: c } = Ua(l.rule, t, l.stack.endRule, n, r === a), h = u.findNextMatchSync(e, r, c);
|
|
3218
3218
|
if (h) {
|
|
3219
|
-
if (h.ruleId !==
|
|
3219
|
+
if (h.ruleId !== so) {
|
|
3220
3220
|
o = l.stack.pop();
|
|
3221
3221
|
break;
|
|
3222
3222
|
}
|
|
@@ -3228,11 +3228,11 @@ function Da(t, e, n, r, o, s) {
|
|
|
3228
3228
|
}
|
|
3229
3229
|
return { stack: o, linePos: r, anchorPosition: a, isFirstLine: n };
|
|
3230
3230
|
}
|
|
3231
|
-
function
|
|
3232
|
-
const a =
|
|
3231
|
+
function Fa(t, e, n, r, o, s) {
|
|
3232
|
+
const a = Ba(t, e, n, r, o, s), i = t.getInjections();
|
|
3233
3233
|
if (i.length === 0)
|
|
3234
3234
|
return a;
|
|
3235
|
-
const l =
|
|
3235
|
+
const l = ja(i, t, e, n, r, o, s);
|
|
3236
3236
|
if (!l)
|
|
3237
3237
|
return a;
|
|
3238
3238
|
if (!a)
|
|
@@ -3240,21 +3240,21 @@ function Ga(t, e, n, r, o, s) {
|
|
|
3240
3240
|
const u = a.captureIndices[0].start, c = l.captureIndices[0].start;
|
|
3241
3241
|
return c < u || l.priorityMatch && c === u ? l : a;
|
|
3242
3242
|
}
|
|
3243
|
-
function
|
|
3244
|
-
const a = o.getRule(t), { ruleScanner: i, findOptions: l } =
|
|
3243
|
+
function Ba(t, e, n, r, o, s) {
|
|
3244
|
+
const a = o.getRule(t), { ruleScanner: i, findOptions: l } = uo(a, t, o.endRule, n, r === s), u = i.findNextMatchSync(e, r, l);
|
|
3245
3245
|
return u ? {
|
|
3246
3246
|
captureIndices: u.captureIndices,
|
|
3247
3247
|
matchedRuleId: u.ruleId
|
|
3248
3248
|
} : null;
|
|
3249
3249
|
}
|
|
3250
|
-
function
|
|
3250
|
+
function ja(t, e, n, r, o, s, a) {
|
|
3251
3251
|
let i = Number.MAX_VALUE, l = null, u, c = 0;
|
|
3252
3252
|
const h = s.contentNameScopesList.getScopeNames();
|
|
3253
3253
|
for (let p = 0, d = t.length; p < d; p++) {
|
|
3254
3254
|
const f = t[p];
|
|
3255
3255
|
if (!f.matcher(h))
|
|
3256
3256
|
continue;
|
|
3257
|
-
const g = e.getRule(f.ruleId), { ruleScanner: C, findOptions: y } =
|
|
3257
|
+
const g = e.getRule(f.ruleId), { ruleScanner: C, findOptions: y } = uo(g, e, null, r, o === a), m = C.findNextMatchSync(n, o, y);
|
|
3258
3258
|
if (!m)
|
|
3259
3259
|
continue;
|
|
3260
3260
|
const _ = m.captureIndices[0].start;
|
|
@@ -3267,14 +3267,14 @@ function Ba(t, e, n, r, o, s, a) {
|
|
|
3267
3267
|
matchedRuleId: u
|
|
3268
3268
|
} : null;
|
|
3269
3269
|
}
|
|
3270
|
-
function
|
|
3270
|
+
function uo(t, e, n, r, o) {
|
|
3271
3271
|
return {
|
|
3272
3272
|
ruleScanner: t.compileAG(e, n, r, o),
|
|
3273
3273
|
findOptions: 0
|
|
3274
3274
|
/* None */
|
|
3275
3275
|
};
|
|
3276
3276
|
}
|
|
3277
|
-
function
|
|
3277
|
+
function Ua(t, e, n, r, o) {
|
|
3278
3278
|
return {
|
|
3279
3279
|
ruleScanner: t.compileWhileAG(e, n, r, o),
|
|
3280
3280
|
findOptions: 0
|
|
@@ -3298,7 +3298,7 @@ function Ge(t, e, n, r, o, s, a) {
|
|
|
3298
3298
|
o.produceFromScopes(u[u.length - 1].scopes, u[u.length - 1].endPos), u.pop();
|
|
3299
3299
|
if (u.length > 0 ? o.produceFromScopes(u[u.length - 1].scopes, d.start) : o.produce(r, d.start), p.retokenizeCapturedWithRuleId) {
|
|
3300
3300
|
const g = p.getName(i, a), C = r.contentNameScopesList.pushAttributed(g, t), y = p.getContentName(i, a), m = C.pushAttributed(y, t), _ = r.push(p.retokenizeCapturedWithRuleId, d.start, -1, !1, null, C, m), S = t.createOnigString(i.substring(0, d.end));
|
|
3301
|
-
|
|
3301
|
+
lo(
|
|
3302
3302
|
t,
|
|
3303
3303
|
S,
|
|
3304
3304
|
n && d.start === 0,
|
|
@@ -3308,27 +3308,27 @@ function Ge(t, e, n, r, o, s, a) {
|
|
|
3308
3308
|
!1,
|
|
3309
3309
|
/* no time limit */
|
|
3310
3310
|
0
|
|
3311
|
-
),
|
|
3311
|
+
), ro(S);
|
|
3312
3312
|
continue;
|
|
3313
3313
|
}
|
|
3314
3314
|
const f = p.getName(i, a);
|
|
3315
3315
|
if (f !== null) {
|
|
3316
3316
|
const C = (u.length > 0 ? u[u.length - 1].scopes : r.contentNameScopesList).pushAttributed(f, t);
|
|
3317
|
-
u.push(new
|
|
3317
|
+
u.push(new za(C, d.end));
|
|
3318
3318
|
}
|
|
3319
3319
|
}
|
|
3320
3320
|
for (; u.length > 0; )
|
|
3321
3321
|
o.produceFromScopes(u[u.length - 1].scopes, u[u.length - 1].endPos), u.pop();
|
|
3322
3322
|
}
|
|
3323
|
-
var
|
|
3323
|
+
var za = class {
|
|
3324
3324
|
scopes;
|
|
3325
3325
|
endPos;
|
|
3326
3326
|
constructor(t, e) {
|
|
3327
3327
|
this.scopes = t, this.endPos = e;
|
|
3328
3328
|
}
|
|
3329
3329
|
};
|
|
3330
|
-
function
|
|
3331
|
-
return new
|
|
3330
|
+
function Ha(t, e, n, r, o, s, a, i) {
|
|
3331
|
+
return new Va(
|
|
3332
3332
|
t,
|
|
3333
3333
|
e,
|
|
3334
3334
|
n,
|
|
@@ -3340,7 +3340,7 @@ function za(t, e, n, r, o, s, a, i) {
|
|
|
3340
3340
|
);
|
|
3341
3341
|
}
|
|
3342
3342
|
function Xn(t, e, n, r, o) {
|
|
3343
|
-
const s = lt(e, ht), a =
|
|
3343
|
+
const s = lt(e, ht), a = ao.getCompiledRuleId(n, r, o.repository);
|
|
3344
3344
|
for (const i of s)
|
|
3345
3345
|
t.push({
|
|
3346
3346
|
debugSelector: e,
|
|
@@ -3356,12 +3356,12 @@ function ht(t, e) {
|
|
|
3356
3356
|
let n = 0;
|
|
3357
3357
|
return t.every((r) => {
|
|
3358
3358
|
for (let o = n; o < e.length; o++)
|
|
3359
|
-
if (
|
|
3359
|
+
if (Wa(e[o], r))
|
|
3360
3360
|
return n = o + 1, !0;
|
|
3361
3361
|
return !1;
|
|
3362
3362
|
});
|
|
3363
3363
|
}
|
|
3364
|
-
function
|
|
3364
|
+
function Wa(t, e) {
|
|
3365
3365
|
if (!t)
|
|
3366
3366
|
return !1;
|
|
3367
3367
|
if (t === e)
|
|
@@ -3369,9 +3369,9 @@ function Ha(t, e) {
|
|
|
3369
3369
|
const n = e.length;
|
|
3370
3370
|
return t.length > n && t.substr(0, n) === e && t[n] === ".";
|
|
3371
3371
|
}
|
|
3372
|
-
var
|
|
3372
|
+
var Va = class {
|
|
3373
3373
|
constructor(t, e, n, r, o, s, a, i) {
|
|
3374
|
-
if (this._rootScopeName = t, this.balancedBracketSelectors = s, this._onigLib = i, this._basicScopeAttributesProvider = new
|
|
3374
|
+
if (this._rootScopeName = t, this.balancedBracketSelectors = s, this._onigLib = i, this._basicScopeAttributesProvider = new Oa(
|
|
3375
3375
|
n,
|
|
3376
3376
|
r
|
|
3377
3377
|
), this._rootId = -1, this._lastRuleId = 0, this._ruleId2desc = [null], this._includedGrammars = {}, this._grammarRepository = a, this._grammar = Kn(e, null), this._injections = null, this._tokenTypeMatchers = [], o)
|
|
@@ -3481,7 +3481,7 @@ var Wa = class {
|
|
|
3481
3481
|
};
|
|
3482
3482
|
}
|
|
3483
3483
|
_tokenize(t, e, n, r) {
|
|
3484
|
-
this._rootId === -1 && (this._rootId =
|
|
3484
|
+
this._rootId === -1 && (this._rootId = ao.getCompiledRuleId(
|
|
3485
3485
|
this._grammar.repository.$self,
|
|
3486
3486
|
this,
|
|
3487
3487
|
this._grammar.repository
|
|
@@ -3523,12 +3523,12 @@ var Wa = class {
|
|
|
3523
3523
|
o = !1, e.reset();
|
|
3524
3524
|
t = t + `
|
|
3525
3525
|
`;
|
|
3526
|
-
const s = this.createOnigString(t), a = s.content.length, i = new
|
|
3526
|
+
const s = this.createOnigString(t), a = s.content.length, i = new Xa(
|
|
3527
3527
|
n,
|
|
3528
3528
|
t,
|
|
3529
3529
|
this._tokenTypeMatchers,
|
|
3530
3530
|
this.balancedBracketSelectors
|
|
3531
|
-
), l =
|
|
3531
|
+
), l = lo(
|
|
3532
3532
|
this,
|
|
3533
3533
|
s,
|
|
3534
3534
|
o,
|
|
@@ -3538,7 +3538,7 @@ var Wa = class {
|
|
|
3538
3538
|
!0,
|
|
3539
3539
|
r
|
|
3540
3540
|
);
|
|
3541
|
-
return
|
|
3541
|
+
return ro(s), {
|
|
3542
3542
|
lineLength: a,
|
|
3543
3543
|
lineTokens: i,
|
|
3544
3544
|
ruleStack: l.stack,
|
|
@@ -3547,7 +3547,7 @@ var Wa = class {
|
|
|
3547
3547
|
}
|
|
3548
3548
|
};
|
|
3549
3549
|
function Kn(t, e) {
|
|
3550
|
-
return t =
|
|
3550
|
+
return t = ha(t), t.repository = t.repository || {}, t.repository.$self = {
|
|
3551
3551
|
$vscodeTextmateLocation: t.$vscodeTextmateLocation,
|
|
3552
3552
|
patterns: t.patterns,
|
|
3553
3553
|
name: t.scopeName
|
|
@@ -3804,7 +3804,7 @@ var Fe = class ne {
|
|
|
3804
3804
|
Fe.fromExtension(r, n.contentNameScopesList)
|
|
3805
3805
|
);
|
|
3806
3806
|
}
|
|
3807
|
-
},
|
|
3807
|
+
}, qa = class {
|
|
3808
3808
|
balancedBracketScopes;
|
|
3809
3809
|
unbalancedBracketScopes;
|
|
3810
3810
|
allowAny = !1;
|
|
@@ -3830,7 +3830,7 @@ var Fe = class ne {
|
|
|
3830
3830
|
return !0;
|
|
3831
3831
|
return this.allowAny;
|
|
3832
3832
|
}
|
|
3833
|
-
},
|
|
3833
|
+
}, Xa = class {
|
|
3834
3834
|
constructor(t, e, n, r) {
|
|
3835
3835
|
this.balancedBracketSelectors = r, this._emitBinaryTokens = t, this._tokenTypeOverrides = n, this._lineText = null, this._tokens = [], this._binaryTokens = [], this._lastTokenEndIndex = 0;
|
|
3836
3836
|
}
|
|
@@ -3904,7 +3904,7 @@ var Fe = class ne {
|
|
|
3904
3904
|
n[r] = this._binaryTokens[r];
|
|
3905
3905
|
return n;
|
|
3906
3906
|
}
|
|
3907
|
-
},
|
|
3907
|
+
}, Ka = class {
|
|
3908
3908
|
constructor(t, e) {
|
|
3909
3909
|
this._onigLib = e, this._theme = t;
|
|
3910
3910
|
}
|
|
@@ -3960,7 +3960,7 @@ var Fe = class ne {
|
|
|
3960
3960
|
let s = this._rawGrammars.get(t);
|
|
3961
3961
|
if (!s)
|
|
3962
3962
|
return null;
|
|
3963
|
-
this._grammars.set(t,
|
|
3963
|
+
this._grammars.set(t, Ha(
|
|
3964
3964
|
t,
|
|
3965
3965
|
s,
|
|
3966
3966
|
e,
|
|
@@ -3973,12 +3973,12 @@ var Fe = class ne {
|
|
|
3973
3973
|
}
|
|
3974
3974
|
return this._grammars.get(t);
|
|
3975
3975
|
}
|
|
3976
|
-
},
|
|
3976
|
+
}, Ya = class {
|
|
3977
3977
|
_options;
|
|
3978
3978
|
_syncRegistry;
|
|
3979
3979
|
_ensureGrammarCache;
|
|
3980
3980
|
constructor(e) {
|
|
3981
|
-
this._options = e, this._syncRegistry = new
|
|
3981
|
+
this._options = e, this._syncRegistry = new Ka(
|
|
3982
3982
|
it.createFromRawTheme(e.theme, e.colorMap),
|
|
3983
3983
|
e.onigLib
|
|
3984
3984
|
), this._ensureGrammarCache = /* @__PURE__ */ new Map();
|
|
@@ -4015,7 +4015,7 @@ var Fe = class ne {
|
|
|
4015
4015
|
n,
|
|
4016
4016
|
r.embeddedLanguages,
|
|
4017
4017
|
r.tokenTypes,
|
|
4018
|
-
new
|
|
4018
|
+
new qa(
|
|
4019
4019
|
r.balancedBracketSelectors || [],
|
|
4020
4020
|
r.unbalancedBracketSelectors || []
|
|
4021
4021
|
)
|
|
@@ -4028,7 +4028,7 @@ var Fe = class ne {
|
|
|
4028
4028
|
return this._loadGrammar(e, 0, null, null, null);
|
|
4029
4029
|
}
|
|
4030
4030
|
_loadGrammar(e, n, r, o, s) {
|
|
4031
|
-
const a = new
|
|
4031
|
+
const a = new xa(this._syncRegistry, e);
|
|
4032
4032
|
for (; a.Q.length > 0; )
|
|
4033
4033
|
a.Q.map((i) => this._loadSingleGrammar(i.scopeName)), a.processQueue();
|
|
4034
4034
|
return this._grammarForScopeName(
|
|
@@ -4086,7 +4086,7 @@ class Ke {
|
|
|
4086
4086
|
Ke.prototype.normal = {};
|
|
4087
4087
|
Ke.prototype.property = {};
|
|
4088
4088
|
Ke.prototype.space = void 0;
|
|
4089
|
-
function
|
|
4089
|
+
function co(t, e) {
|
|
4090
4090
|
const n = {}, r = {};
|
|
4091
4091
|
for (const o of t)
|
|
4092
4092
|
Object.assign(n, o.property), Object.assign(r, o.normal);
|
|
@@ -4120,10 +4120,10 @@ V.prototype.overloadedBoolean = !1;
|
|
|
4120
4120
|
V.prototype.property = "";
|
|
4121
4121
|
V.prototype.spaceSeparated = !1;
|
|
4122
4122
|
V.prototype.space = void 0;
|
|
4123
|
-
let
|
|
4123
|
+
let Ja = 0;
|
|
4124
4124
|
const E = be(), T = be(), en = be(), w = be(), N = be(), Ee = be(), X = be();
|
|
4125
4125
|
function be() {
|
|
4126
|
-
return 2 ** ++
|
|
4126
|
+
return 2 ** ++Ja;
|
|
4127
4127
|
}
|
|
4128
4128
|
const tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4129
4129
|
__proto__: null,
|
|
@@ -4178,7 +4178,7 @@ function Ne(t) {
|
|
|
4178
4178
|
}
|
|
4179
4179
|
return new Ke(e, n, t.space);
|
|
4180
4180
|
}
|
|
4181
|
-
const
|
|
4181
|
+
const ho = Ne({
|
|
4182
4182
|
properties: {
|
|
4183
4183
|
ariaActiveDescendant: null,
|
|
4184
4184
|
ariaAtomic: T,
|
|
@@ -4234,13 +4234,13 @@ const co = Ne({
|
|
|
4234
4234
|
return e === "role" ? e : "aria-" + e.slice(4).toLowerCase();
|
|
4235
4235
|
}
|
|
4236
4236
|
});
|
|
4237
|
-
function
|
|
4237
|
+
function fo(t, e) {
|
|
4238
4238
|
return e in t ? t[e] : e;
|
|
4239
4239
|
}
|
|
4240
|
-
function
|
|
4241
|
-
return
|
|
4240
|
+
function po(t, e) {
|
|
4241
|
+
return fo(t, e.toLowerCase());
|
|
4242
4242
|
}
|
|
4243
|
-
const
|
|
4243
|
+
const Za = Ne({
|
|
4244
4244
|
attributes: {
|
|
4245
4245
|
acceptcharset: "accept-charset",
|
|
4246
4246
|
classname: "class",
|
|
@@ -4600,8 +4600,8 @@ const Ja = Ne({
|
|
|
4600
4600
|
unselectable: null
|
|
4601
4601
|
},
|
|
4602
4602
|
space: "html",
|
|
4603
|
-
transform:
|
|
4604
|
-
}),
|
|
4603
|
+
transform: po
|
|
4604
|
+
}), Qa = Ne({
|
|
4605
4605
|
attributes: {
|
|
4606
4606
|
accentHeight: "accent-height",
|
|
4607
4607
|
alignmentBaseline: "alignment-baseline",
|
|
@@ -5159,8 +5159,8 @@ const Ja = Ne({
|
|
|
5159
5159
|
zoomAndPan: null
|
|
5160
5160
|
},
|
|
5161
5161
|
space: "svg",
|
|
5162
|
-
transform:
|
|
5163
|
-
}),
|
|
5162
|
+
transform: fo
|
|
5163
|
+
}), go = Ne({
|
|
5164
5164
|
properties: {
|
|
5165
5165
|
xLinkActuate: null,
|
|
5166
5166
|
xLinkArcRole: null,
|
|
@@ -5174,31 +5174,31 @@ const Ja = Ne({
|
|
|
5174
5174
|
transform(t, e) {
|
|
5175
5175
|
return "xlink:" + e.slice(5).toLowerCase();
|
|
5176
5176
|
}
|
|
5177
|
-
}),
|
|
5177
|
+
}), mo = Ne({
|
|
5178
5178
|
attributes: { xmlnsxlink: "xmlns:xlink" },
|
|
5179
5179
|
properties: { xmlnsXLink: null, xmlns: null },
|
|
5180
5180
|
space: "xmlns",
|
|
5181
|
-
transform:
|
|
5182
|
-
}),
|
|
5181
|
+
transform: po
|
|
5182
|
+
}), yo = Ne({
|
|
5183
5183
|
properties: { xmlBase: null, xmlLang: null, xmlSpace: null },
|
|
5184
5184
|
space: "xml",
|
|
5185
5185
|
transform(t, e) {
|
|
5186
5186
|
return "xml:" + e.slice(3).toLowerCase();
|
|
5187
5187
|
}
|
|
5188
|
-
}),
|
|
5189
|
-
function
|
|
5188
|
+
}), ei = /[A-Z]/g, Jn = /-[a-z]/g, ti = /^data[-\w.:]+$/i;
|
|
5189
|
+
function ni(t, e) {
|
|
5190
5190
|
const n = Qt(e);
|
|
5191
5191
|
let r = e, o = V;
|
|
5192
5192
|
if (n in t.normal)
|
|
5193
5193
|
return t.property[t.normal[n]];
|
|
5194
|
-
if (n.length > 4 && n.slice(0, 4) === "data" &&
|
|
5194
|
+
if (n.length > 4 && n.slice(0, 4) === "data" && ti.test(e)) {
|
|
5195
5195
|
if (e.charAt(4) === "-") {
|
|
5196
|
-
const s = e.slice(5).replace(Jn,
|
|
5196
|
+
const s = e.slice(5).replace(Jn, oi);
|
|
5197
5197
|
r = "data" + s.charAt(0).toUpperCase() + s.slice(1);
|
|
5198
5198
|
} else {
|
|
5199
5199
|
const s = e.slice(4);
|
|
5200
5200
|
if (!Jn.test(s)) {
|
|
5201
|
-
let a = s.replace(
|
|
5201
|
+
let a = s.replace(ei, ri);
|
|
5202
5202
|
a.charAt(0) !== "-" && (a = "-" + a), e = "data" + a;
|
|
5203
5203
|
}
|
|
5204
5204
|
}
|
|
@@ -5206,23 +5206,23 @@ function ti(t, e) {
|
|
|
5206
5206
|
}
|
|
5207
5207
|
return new o(r, e);
|
|
5208
5208
|
}
|
|
5209
|
-
function
|
|
5209
|
+
function ri(t) {
|
|
5210
5210
|
return "-" + t.toLowerCase();
|
|
5211
5211
|
}
|
|
5212
|
-
function
|
|
5212
|
+
function oi(t) {
|
|
5213
5213
|
return t.charAt(1).toUpperCase();
|
|
5214
5214
|
}
|
|
5215
|
-
const
|
|
5215
|
+
const si = co([ho, Za, go, mo, yo], "html"), bo = co([ho, Qa, go, mo, yo], "svg"), ai = /["&'<>`]/g, ii = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, li = (
|
|
5216
5216
|
// eslint-disable-next-line no-control-regex, unicorn/no-hex-escape
|
|
5217
5217
|
/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g
|
|
5218
|
-
),
|
|
5219
|
-
function
|
|
5218
|
+
), ui = /[|\\{}()[\]^$+*?.]/g, Zn = /* @__PURE__ */ new WeakMap();
|
|
5219
|
+
function ci(t, e) {
|
|
5220
5220
|
if (t = t.replace(
|
|
5221
|
-
e.subset ?
|
|
5221
|
+
e.subset ? hi(e.subset) : ai,
|
|
5222
5222
|
r
|
|
5223
5223
|
), e.subset || e.escapeOnly)
|
|
5224
5224
|
return t;
|
|
5225
|
-
return t.replace(
|
|
5225
|
+
return t.replace(ii, n).replace(li, r);
|
|
5226
5226
|
function n(o, s, a) {
|
|
5227
5227
|
return e.format(
|
|
5228
5228
|
(o.charCodeAt(0) - 55296) * 1024 + o.charCodeAt(1) - 56320 + 65536,
|
|
@@ -5238,28 +5238,28 @@ function ui(t, e) {
|
|
|
5238
5238
|
);
|
|
5239
5239
|
}
|
|
5240
5240
|
}
|
|
5241
|
-
function
|
|
5241
|
+
function hi(t) {
|
|
5242
5242
|
let e = Zn.get(t);
|
|
5243
|
-
return e || (e =
|
|
5243
|
+
return e || (e = fi(t), Zn.set(t, e)), e;
|
|
5244
5244
|
}
|
|
5245
|
-
function
|
|
5245
|
+
function fi(t) {
|
|
5246
5246
|
const e = [];
|
|
5247
5247
|
let n = -1;
|
|
5248
5248
|
for (; ++n < t.length; )
|
|
5249
|
-
e.push(t[n].replace(
|
|
5249
|
+
e.push(t[n].replace(ui, "\\$&"));
|
|
5250
5250
|
return new RegExp("(?:" + e.join("|") + ")", "g");
|
|
5251
5251
|
}
|
|
5252
|
-
const
|
|
5253
|
-
function
|
|
5252
|
+
const pi = /[\dA-Fa-f]/;
|
|
5253
|
+
function di(t, e, n) {
|
|
5254
5254
|
const r = "&#x" + t.toString(16).toUpperCase();
|
|
5255
|
-
return n && e && !
|
|
5255
|
+
return n && e && !pi.test(String.fromCharCode(e)) ? r : r + ";";
|
|
5256
5256
|
}
|
|
5257
|
-
const
|
|
5258
|
-
function
|
|
5257
|
+
const gi = /\d/;
|
|
5258
|
+
function mi(t, e, n) {
|
|
5259
5259
|
const r = "&#" + String(t);
|
|
5260
|
-
return n && e && !
|
|
5260
|
+
return n && e && !gi.test(String.fromCharCode(e)) ? r : r + ";";
|
|
5261
5261
|
}
|
|
5262
|
-
const
|
|
5262
|
+
const yi = [
|
|
5263
5263
|
"AElig",
|
|
5264
5264
|
"AMP",
|
|
5265
5265
|
"Aacute",
|
|
@@ -5619,7 +5619,7 @@ const mi = [
|
|
|
5619
5619
|
lsaquo: "‹",
|
|
5620
5620
|
rsaquo: "›",
|
|
5621
5621
|
euro: "€"
|
|
5622
|
-
},
|
|
5622
|
+
}, bi = [
|
|
5623
5623
|
"cent",
|
|
5624
5624
|
"copy",
|
|
5625
5625
|
"divide",
|
|
@@ -5628,60 +5628,60 @@ const mi = [
|
|
|
5628
5628
|
"not",
|
|
5629
5629
|
"para",
|
|
5630
5630
|
"times"
|
|
5631
|
-
],
|
|
5631
|
+
], wo = {}.hasOwnProperty, nn = {};
|
|
5632
5632
|
let Ze;
|
|
5633
5633
|
for (Ze in $t)
|
|
5634
|
-
|
|
5635
|
-
const
|
|
5636
|
-
function
|
|
5634
|
+
wo.call($t, Ze) && (nn[$t[Ze]] = Ze);
|
|
5635
|
+
const wi = /[^\dA-Za-z]/;
|
|
5636
|
+
function Ci(t, e, n, r) {
|
|
5637
5637
|
const o = String.fromCharCode(t);
|
|
5638
|
-
if (
|
|
5638
|
+
if (wo.call(nn, o)) {
|
|
5639
5639
|
const s = nn[o], a = "&" + s;
|
|
5640
|
-
return n &&
|
|
5640
|
+
return n && yi.includes(s) && !bi.includes(s) && (!r || e && e !== 61 && wi.test(String.fromCharCode(e))) ? a : a + ";";
|
|
5641
5641
|
}
|
|
5642
5642
|
return "";
|
|
5643
5643
|
}
|
|
5644
|
-
function
|
|
5645
|
-
let r =
|
|
5646
|
-
if ((n.useNamedReferences || n.useShortestReferences) && (o =
|
|
5644
|
+
function _i(t, e, n) {
|
|
5645
|
+
let r = di(t, e, n.omitOptionalSemicolons), o;
|
|
5646
|
+
if ((n.useNamedReferences || n.useShortestReferences) && (o = Ci(
|
|
5647
5647
|
t,
|
|
5648
5648
|
e,
|
|
5649
5649
|
n.omitOptionalSemicolons,
|
|
5650
5650
|
n.attribute
|
|
5651
5651
|
)), (n.useShortestReferences || !o) && n.useShortestReferences) {
|
|
5652
|
-
const s =
|
|
5652
|
+
const s = mi(t, e, n.omitOptionalSemicolons);
|
|
5653
5653
|
s.length < r.length && (r = s);
|
|
5654
5654
|
}
|
|
5655
5655
|
return o && (!n.useShortestReferences || o.length < r.length) ? o : r;
|
|
5656
5656
|
}
|
|
5657
5657
|
function Ae(t, e) {
|
|
5658
|
-
return
|
|
5658
|
+
return ci(t, Object.assign({ format: _i }, e));
|
|
5659
5659
|
}
|
|
5660
|
-
const
|
|
5661
|
-
function
|
|
5660
|
+
const Si = /^>|^->|<!--|-->|--!>|<!-$/g, ki = [">"], vi = ["<", ">"];
|
|
5661
|
+
function xi(t, e, n, r) {
|
|
5662
5662
|
return r.settings.bogusComments ? "<?" + Ae(
|
|
5663
5663
|
t.value,
|
|
5664
5664
|
Object.assign({}, r.settings.characterReferences, {
|
|
5665
|
-
subset:
|
|
5665
|
+
subset: ki
|
|
5666
5666
|
})
|
|
5667
|
-
) + ">" : "<!--" + t.value.replace(
|
|
5667
|
+
) + ">" : "<!--" + t.value.replace(Si, o) + "-->";
|
|
5668
5668
|
function o(s) {
|
|
5669
5669
|
return Ae(
|
|
5670
5670
|
s,
|
|
5671
5671
|
Object.assign({}, r.settings.characterReferences, {
|
|
5672
|
-
subset:
|
|
5672
|
+
subset: vi
|
|
5673
5673
|
})
|
|
5674
5674
|
);
|
|
5675
5675
|
}
|
|
5676
5676
|
}
|
|
5677
|
-
function
|
|
5677
|
+
function Ei(t, e, n, r) {
|
|
5678
5678
|
return "<!" + (r.settings.upperDoctype ? "DOCTYPE" : "doctype") + (r.settings.tightDoctype ? "" : " ") + "html>";
|
|
5679
5679
|
}
|
|
5680
|
-
const O =
|
|
5681
|
-
function
|
|
5680
|
+
const O = _o(1), Co = _o(-1), Ai = [];
|
|
5681
|
+
function _o(t) {
|
|
5682
5682
|
return e;
|
|
5683
5683
|
function e(n, r, o) {
|
|
5684
|
-
const s = n ? n.children :
|
|
5684
|
+
const s = n ? n.children : Ai;
|
|
5685
5685
|
let a = (r || 0) + t, i = s[a];
|
|
5686
5686
|
if (!o)
|
|
5687
5687
|
for (; i && Ct(i); )
|
|
@@ -5689,60 +5689,60 @@ function Co(t) {
|
|
|
5689
5689
|
return i;
|
|
5690
5690
|
}
|
|
5691
5691
|
}
|
|
5692
|
-
const
|
|
5693
|
-
function
|
|
5692
|
+
const Ri = {}.hasOwnProperty;
|
|
5693
|
+
function So(t) {
|
|
5694
5694
|
return e;
|
|
5695
5695
|
function e(n, r, o) {
|
|
5696
|
-
return
|
|
5696
|
+
return Ri.call(t, n.tagName) && t[n.tagName](n, r, o);
|
|
5697
5697
|
}
|
|
5698
5698
|
}
|
|
5699
|
-
const bn =
|
|
5700
|
-
body:
|
|
5699
|
+
const bn = So({
|
|
5700
|
+
body: Ni,
|
|
5701
5701
|
caption: Tt,
|
|
5702
5702
|
colgroup: Tt,
|
|
5703
|
-
dd:
|
|
5704
|
-
dt:
|
|
5703
|
+
dd: Ti,
|
|
5704
|
+
dt: $i,
|
|
5705
5705
|
head: Tt,
|
|
5706
|
-
html:
|
|
5707
|
-
li:
|
|
5708
|
-
optgroup:
|
|
5709
|
-
option:
|
|
5710
|
-
p:
|
|
5706
|
+
html: Ii,
|
|
5707
|
+
li: Pi,
|
|
5708
|
+
optgroup: Mi,
|
|
5709
|
+
option: Oi,
|
|
5710
|
+
p: Li,
|
|
5711
5711
|
rp: Qn,
|
|
5712
5712
|
rt: Qn,
|
|
5713
|
-
tbody:
|
|
5713
|
+
tbody: Gi,
|
|
5714
5714
|
td: er,
|
|
5715
|
-
tfoot:
|
|
5715
|
+
tfoot: Fi,
|
|
5716
5716
|
th: er,
|
|
5717
|
-
thead:
|
|
5718
|
-
tr:
|
|
5717
|
+
thead: Di,
|
|
5718
|
+
tr: Bi
|
|
5719
5719
|
});
|
|
5720
5720
|
function Tt(t, e, n) {
|
|
5721
5721
|
const r = O(n, e, !0);
|
|
5722
5722
|
return !r || r.type !== "comment" && !(r.type === "text" && Ct(r.value.charAt(0)));
|
|
5723
5723
|
}
|
|
5724
|
-
function
|
|
5724
|
+
function Ii(t, e, n) {
|
|
5725
5725
|
const r = O(n, e);
|
|
5726
5726
|
return !r || r.type !== "comment";
|
|
5727
5727
|
}
|
|
5728
|
-
function
|
|
5728
|
+
function Ni(t, e, n) {
|
|
5729
5729
|
const r = O(n, e);
|
|
5730
5730
|
return !r || r.type !== "comment";
|
|
5731
5731
|
}
|
|
5732
|
-
function
|
|
5732
|
+
function Li(t, e, n) {
|
|
5733
5733
|
const r = O(n, e);
|
|
5734
5734
|
return r ? r.type === "element" && (r.tagName === "address" || r.tagName === "article" || r.tagName === "aside" || r.tagName === "blockquote" || r.tagName === "details" || r.tagName === "div" || r.tagName === "dl" || r.tagName === "fieldset" || r.tagName === "figcaption" || r.tagName === "figure" || r.tagName === "footer" || r.tagName === "form" || r.tagName === "h1" || r.tagName === "h2" || r.tagName === "h3" || r.tagName === "h4" || r.tagName === "h5" || r.tagName === "h6" || r.tagName === "header" || r.tagName === "hgroup" || r.tagName === "hr" || r.tagName === "main" || r.tagName === "menu" || r.tagName === "nav" || r.tagName === "ol" || r.tagName === "p" || r.tagName === "pre" || r.tagName === "section" || r.tagName === "table" || r.tagName === "ul") : !n || // Confusing parent.
|
|
5735
5735
|
!(n.type === "element" && (n.tagName === "a" || n.tagName === "audio" || n.tagName === "del" || n.tagName === "ins" || n.tagName === "map" || n.tagName === "noscript" || n.tagName === "video"));
|
|
5736
5736
|
}
|
|
5737
|
-
function
|
|
5737
|
+
function Pi(t, e, n) {
|
|
5738
5738
|
const r = O(n, e);
|
|
5739
5739
|
return !r || r.type === "element" && r.tagName === "li";
|
|
5740
5740
|
}
|
|
5741
|
-
function
|
|
5741
|
+
function $i(t, e, n) {
|
|
5742
5742
|
const r = O(n, e);
|
|
5743
5743
|
return !!(r && r.type === "element" && (r.tagName === "dt" || r.tagName === "dd"));
|
|
5744
5744
|
}
|
|
5745
|
-
function
|
|
5745
|
+
function Ti(t, e, n) {
|
|
5746
5746
|
const r = O(n, e);
|
|
5747
5747
|
return !r || r.type === "element" && (r.tagName === "dt" || r.tagName === "dd");
|
|
5748
5748
|
}
|
|
@@ -5750,26 +5750,26 @@ function Qn(t, e, n) {
|
|
|
5750
5750
|
const r = O(n, e);
|
|
5751
5751
|
return !r || r.type === "element" && (r.tagName === "rp" || r.tagName === "rt");
|
|
5752
5752
|
}
|
|
5753
|
-
function
|
|
5753
|
+
function Mi(t, e, n) {
|
|
5754
5754
|
const r = O(n, e);
|
|
5755
5755
|
return !r || r.type === "element" && r.tagName === "optgroup";
|
|
5756
5756
|
}
|
|
5757
|
-
function
|
|
5757
|
+
function Oi(t, e, n) {
|
|
5758
5758
|
const r = O(n, e);
|
|
5759
5759
|
return !r || r.type === "element" && (r.tagName === "option" || r.tagName === "optgroup");
|
|
5760
5760
|
}
|
|
5761
|
-
function
|
|
5761
|
+
function Di(t, e, n) {
|
|
5762
5762
|
const r = O(n, e);
|
|
5763
5763
|
return !!(r && r.type === "element" && (r.tagName === "tbody" || r.tagName === "tfoot"));
|
|
5764
5764
|
}
|
|
5765
|
-
function
|
|
5765
|
+
function Gi(t, e, n) {
|
|
5766
5766
|
const r = O(n, e);
|
|
5767
5767
|
return !r || r.type === "element" && (r.tagName === "tbody" || r.tagName === "tfoot");
|
|
5768
5768
|
}
|
|
5769
|
-
function
|
|
5769
|
+
function Fi(t, e, n) {
|
|
5770
5770
|
return !O(n, e);
|
|
5771
5771
|
}
|
|
5772
|
-
function
|
|
5772
|
+
function Bi(t, e, n) {
|
|
5773
5773
|
const r = O(n, e);
|
|
5774
5774
|
return !r || r.type === "element" && r.tagName === "tr";
|
|
5775
5775
|
}
|
|
@@ -5777,18 +5777,18 @@ function er(t, e, n) {
|
|
|
5777
5777
|
const r = O(n, e);
|
|
5778
5778
|
return !r || r.type === "element" && (r.tagName === "td" || r.tagName === "th");
|
|
5779
5779
|
}
|
|
5780
|
-
const
|
|
5781
|
-
body:
|
|
5782
|
-
colgroup:
|
|
5783
|
-
head:
|
|
5784
|
-
html:
|
|
5785
|
-
tbody:
|
|
5780
|
+
const ji = So({
|
|
5781
|
+
body: Hi,
|
|
5782
|
+
colgroup: Wi,
|
|
5783
|
+
head: zi,
|
|
5784
|
+
html: Ui,
|
|
5785
|
+
tbody: Vi
|
|
5786
5786
|
});
|
|
5787
|
-
function
|
|
5787
|
+
function Ui(t) {
|
|
5788
5788
|
const e = O(t, -1);
|
|
5789
5789
|
return !e || e.type !== "comment";
|
|
5790
5790
|
}
|
|
5791
|
-
function
|
|
5791
|
+
function zi(t) {
|
|
5792
5792
|
const e = /* @__PURE__ */ new Set();
|
|
5793
5793
|
for (const r of t.children)
|
|
5794
5794
|
if (r.type === "element" && (r.tagName === "base" || r.tagName === "title")) {
|
|
@@ -5798,16 +5798,16 @@ function Ui(t) {
|
|
|
5798
5798
|
const n = t.children[0];
|
|
5799
5799
|
return !n || n.type === "element";
|
|
5800
5800
|
}
|
|
5801
|
-
function
|
|
5801
|
+
function Hi(t) {
|
|
5802
5802
|
const e = O(t, -1, !0);
|
|
5803
5803
|
return !e || e.type !== "comment" && !(e.type === "text" && Ct(e.value.charAt(0))) && !(e.type === "element" && (e.tagName === "meta" || e.tagName === "link" || e.tagName === "script" || e.tagName === "style" || e.tagName === "template"));
|
|
5804
5804
|
}
|
|
5805
|
-
function
|
|
5806
|
-
const r =
|
|
5805
|
+
function Wi(t, e, n) {
|
|
5806
|
+
const r = Co(n, e), o = O(t, -1, !0);
|
|
5807
5807
|
return n && r && r.type === "element" && r.tagName === "colgroup" && bn(r, n.children.indexOf(r), n) ? !1 : !!(o && o.type === "element" && o.tagName === "col");
|
|
5808
5808
|
}
|
|
5809
|
-
function
|
|
5810
|
-
const r =
|
|
5809
|
+
function Vi(t, e, n) {
|
|
5810
|
+
const r = Co(n, e), o = O(t, -1);
|
|
5811
5811
|
return n && r && r.type === "element" && (r.tagName === "thead" || r.tagName === "tbody") && bn(r, n.children.indexOf(r), n) ? !1 : !!(o && o.type === "element" && o.tagName === "tr");
|
|
5812
5812
|
}
|
|
5813
5813
|
const Qe = {
|
|
@@ -5840,24 +5840,24 @@ const Qe = {
|
|
|
5840
5840
|
['\0"&'.split(""), "\0\"&'`".split("")]
|
|
5841
5841
|
]
|
|
5842
5842
|
};
|
|
5843
|
-
function
|
|
5843
|
+
function qi(t, e, n, r) {
|
|
5844
5844
|
const o = r.schema, s = o.space === "svg" ? !1 : r.settings.omitOptionalTags;
|
|
5845
5845
|
let a = o.space === "svg" ? r.settings.closeEmptyElements : r.settings.voids.includes(t.tagName.toLowerCase());
|
|
5846
5846
|
const i = [];
|
|
5847
5847
|
let l;
|
|
5848
|
-
o.space === "html" && t.tagName === "svg" && (r.schema =
|
|
5849
|
-
const u =
|
|
5848
|
+
o.space === "html" && t.tagName === "svg" && (r.schema = bo);
|
|
5849
|
+
const u = Xi(r, t.properties), c = r.all(
|
|
5850
5850
|
o.space === "html" && t.tagName === "template" ? t.content : t
|
|
5851
5851
|
);
|
|
5852
|
-
return r.schema = o, c && (a = !1), (u || !s || !
|
|
5852
|
+
return r.schema = o, c && (a = !1), (u || !s || !ji(t, e, n)) && (i.push("<", t.tagName, u ? " " + u : ""), a && (o.space === "svg" || r.settings.closeSelfClosing) && (l = u.charAt(u.length - 1), (!r.settings.tightSelfClosing || l === "/" || l && l !== '"' && l !== "'") && i.push(" "), i.push("/")), i.push(">")), i.push(c), !a && (!s || !bn(t, e, n)) && i.push("</" + t.tagName + ">"), i.join("");
|
|
5853
5853
|
}
|
|
5854
|
-
function
|
|
5854
|
+
function Xi(t, e) {
|
|
5855
5855
|
const n = [];
|
|
5856
5856
|
let r = -1, o;
|
|
5857
5857
|
if (e) {
|
|
5858
5858
|
for (o in e)
|
|
5859
5859
|
if (e[o] !== null && e[o] !== void 0) {
|
|
5860
|
-
const s =
|
|
5860
|
+
const s = Ki(t, o, e[o]);
|
|
5861
5861
|
s && n.push(s);
|
|
5862
5862
|
}
|
|
5863
5863
|
}
|
|
@@ -5867,8 +5867,8 @@ function qi(t, e) {
|
|
|
5867
5867
|
}
|
|
5868
5868
|
return n.join("");
|
|
5869
5869
|
}
|
|
5870
|
-
function
|
|
5871
|
-
const r =
|
|
5870
|
+
function Ki(t, e, n) {
|
|
5871
|
+
const r = ni(t.schema, e), o = t.settings.allowParseErrors && t.schema.space === "html" ? 0 : 1, s = t.settings.allowDangerousCharacters ? 0 : 1;
|
|
5872
5872
|
let a = t.quote, i;
|
|
5873
5873
|
if (r.overloadedBoolean && (n === r.attribute || n === "") ? n = !0 : (r.boolean || r.overloadedBoolean) && (typeof n != "string" || n === r.attribute || n === "") && (n = !!n), n == null || n === !1 || typeof n == "number" && Number.isNaN(n))
|
|
5874
5874
|
return "";
|
|
@@ -5879,7 +5879,7 @@ function Xi(t, e, n) {
|
|
|
5879
5879
|
subset: Qe.name[o][s]
|
|
5880
5880
|
})
|
|
5881
5881
|
);
|
|
5882
|
-
return n === !0 || (n = Array.isArray(n) ? (r.commaSeparated ?
|
|
5882
|
+
return n === !0 || (n = Array.isArray(n) ? (r.commaSeparated ? Nr : Fr)(n, {
|
|
5883
5883
|
padLeft: !t.settings.tightCommaSeparatedLists
|
|
5884
5884
|
}) : String(n), t.settings.collapseEmptyAttributes && !n) ? l : (t.settings.preferUnquoted && (i = Ae(
|
|
5885
5885
|
n,
|
|
@@ -5896,44 +5896,44 @@ function Xi(t, e, n) {
|
|
|
5896
5896
|
})
|
|
5897
5897
|
) + a), l + (i && "=" + i));
|
|
5898
5898
|
}
|
|
5899
|
-
const
|
|
5900
|
-
function
|
|
5899
|
+
const Yi = ["<", "&"];
|
|
5900
|
+
function ko(t, e, n, r) {
|
|
5901
5901
|
return n && n.type === "element" && (n.tagName === "script" || n.tagName === "style") ? t.value : Ae(
|
|
5902
5902
|
t.value,
|
|
5903
5903
|
Object.assign({}, r.settings.characterReferences, {
|
|
5904
|
-
subset:
|
|
5904
|
+
subset: Yi
|
|
5905
5905
|
})
|
|
5906
5906
|
);
|
|
5907
5907
|
}
|
|
5908
|
-
function Yi(t, e, n, r) {
|
|
5909
|
-
return r.settings.allowDangerousHtml ? t.value : So(t, e, n, r);
|
|
5910
|
-
}
|
|
5911
5908
|
function Ji(t, e, n, r) {
|
|
5909
|
+
return r.settings.allowDangerousHtml ? t.value : ko(t, e, n, r);
|
|
5910
|
+
}
|
|
5911
|
+
function Zi(t, e, n, r) {
|
|
5912
5912
|
return r.all(t);
|
|
5913
5913
|
}
|
|
5914
|
-
const
|
|
5915
|
-
invalid:
|
|
5916
|
-
unknown:
|
|
5917
|
-
handlers: { comment:
|
|
5914
|
+
const Qi = ua("type", {
|
|
5915
|
+
invalid: el,
|
|
5916
|
+
unknown: tl,
|
|
5917
|
+
handlers: { comment: xi, doctype: Ei, element: qi, raw: Ji, root: Zi, text: ko }
|
|
5918
5918
|
});
|
|
5919
|
-
function
|
|
5919
|
+
function el(t) {
|
|
5920
5920
|
throw new Error("Expected node, not `" + t + "`");
|
|
5921
5921
|
}
|
|
5922
|
-
function
|
|
5922
|
+
function tl(t) {
|
|
5923
5923
|
const e = (
|
|
5924
5924
|
/** @type {Nodes} */
|
|
5925
5925
|
t
|
|
5926
5926
|
);
|
|
5927
5927
|
throw new Error("Cannot compile unknown node `" + e.type + "`");
|
|
5928
5928
|
}
|
|
5929
|
-
const
|
|
5930
|
-
function
|
|
5931
|
-
const n = e ||
|
|
5929
|
+
const nl = {}, rl = {}, ol = [];
|
|
5930
|
+
function sl(t, e) {
|
|
5931
|
+
const n = e || nl, r = n.quote || '"', o = r === '"' ? "'" : '"';
|
|
5932
5932
|
if (r !== '"' && r !== "'")
|
|
5933
5933
|
throw new Error("Invalid quote `" + r + "`, expected `'` or `\"`");
|
|
5934
5934
|
return {
|
|
5935
|
-
one:
|
|
5936
|
-
all:
|
|
5935
|
+
one: al,
|
|
5936
|
+
all: il,
|
|
5937
5937
|
settings: {
|
|
5938
5938
|
omitOptionalTags: n.omitOptionalTags || !1,
|
|
5939
5939
|
allowParseErrors: n.allowParseErrors || !1,
|
|
@@ -5948,12 +5948,12 @@ function ol(t, e) {
|
|
|
5948
5948
|
tightSelfClosing: n.tightSelfClosing || !1,
|
|
5949
5949
|
collapseEmptyAttributes: n.collapseEmptyAttributes || !1,
|
|
5950
5950
|
allowDangerousHtml: n.allowDangerousHtml || !1,
|
|
5951
|
-
voids: n.voids ||
|
|
5952
|
-
characterReferences: n.characterReferences ||
|
|
5951
|
+
voids: n.voids || ca,
|
|
5952
|
+
characterReferences: n.characterReferences || rl,
|
|
5953
5953
|
closeSelfClosing: n.closeSelfClosing || !1,
|
|
5954
5954
|
closeEmptyElements: n.closeEmptyElements || !1
|
|
5955
5955
|
},
|
|
5956
|
-
schema: n.space === "svg" ?
|
|
5956
|
+
schema: n.space === "svg" ? bo : si,
|
|
5957
5957
|
quote: r,
|
|
5958
5958
|
alternative: o
|
|
5959
5959
|
}.one(
|
|
@@ -5962,11 +5962,11 @@ function ol(t, e) {
|
|
|
5962
5962
|
void 0
|
|
5963
5963
|
);
|
|
5964
5964
|
}
|
|
5965
|
-
function
|
|
5966
|
-
return
|
|
5965
|
+
function al(t, e, n) {
|
|
5966
|
+
return Qi(t, e, n, this);
|
|
5967
5967
|
}
|
|
5968
|
-
function
|
|
5969
|
-
const e = [], n = t && t.children ||
|
|
5968
|
+
function il(t) {
|
|
5969
|
+
const e = [], n = t && t.children || ol;
|
|
5970
5970
|
let r = -1;
|
|
5971
5971
|
for (; ++r < n.length; )
|
|
5972
5972
|
e[r] = this.one(n[r], r, t);
|
|
@@ -5981,25 +5981,25 @@ function ft(t, e) {
|
|
|
5981
5981
|
function ue(t, e) {
|
|
5982
5982
|
return t && (e?.[t?.toLowerCase()] || t);
|
|
5983
5983
|
}
|
|
5984
|
-
function
|
|
5984
|
+
function ll(t) {
|
|
5985
5985
|
return Array.isArray(t) ? t : [t];
|
|
5986
5986
|
}
|
|
5987
|
-
async function
|
|
5987
|
+
async function vo(t) {
|
|
5988
5988
|
return Promise.resolve(typeof t == "function" ? t() : t).then((e) => e.default || e);
|
|
5989
5989
|
}
|
|
5990
5990
|
function wn(t) {
|
|
5991
5991
|
return !t || ["plaintext", "txt", "text", "plain"].includes(t);
|
|
5992
5992
|
}
|
|
5993
|
-
function
|
|
5993
|
+
function xo(t) {
|
|
5994
5994
|
return t === "ansi" || wn(t);
|
|
5995
5995
|
}
|
|
5996
5996
|
function Cn(t) {
|
|
5997
5997
|
return t === "none";
|
|
5998
5998
|
}
|
|
5999
|
-
function
|
|
5999
|
+
function ul(t) {
|
|
6000
6000
|
return Cn(t);
|
|
6001
6001
|
}
|
|
6002
|
-
function
|
|
6002
|
+
function Eo(t, e) {
|
|
6003
6003
|
if (!e)
|
|
6004
6004
|
return t;
|
|
6005
6005
|
t.properties ||= {}, t.properties.class ||= [], typeof t.properties.class == "string" && (t.properties.class = t.properties.class.split(/\s+/g)), Array.isArray(t.properties.class) || (t.properties.class = []);
|
|
@@ -6018,7 +6018,7 @@ function St(t, e = !1) {
|
|
|
6018
6018
|
}
|
|
6019
6019
|
return o;
|
|
6020
6020
|
}
|
|
6021
|
-
function
|
|
6021
|
+
function cl(t) {
|
|
6022
6022
|
const e = St(t, !0).map(([o]) => o);
|
|
6023
6023
|
function n(o) {
|
|
6024
6024
|
if (o === t.length)
|
|
@@ -6046,8 +6046,8 @@ function ul(t) {
|
|
|
6046
6046
|
posToIndex: r
|
|
6047
6047
|
};
|
|
6048
6048
|
}
|
|
6049
|
-
const _n = "light-dark()",
|
|
6050
|
-
function
|
|
6049
|
+
const _n = "light-dark()", hl = ["color", "background-color"];
|
|
6050
|
+
function fl(t, e) {
|
|
6051
6051
|
let n = 0;
|
|
6052
6052
|
const r = [];
|
|
6053
6053
|
for (const o of e)
|
|
@@ -6062,14 +6062,14 @@ function hl(t, e) {
|
|
|
6062
6062
|
offset: t.offset + n
|
|
6063
6063
|
}), r;
|
|
6064
6064
|
}
|
|
6065
|
-
function
|
|
6065
|
+
function pl(t, e) {
|
|
6066
6066
|
const n = Array.from(e instanceof Set ? e : new Set(e)).sort((r, o) => r - o);
|
|
6067
6067
|
return n.length ? t.map((r) => r.flatMap((o) => {
|
|
6068
6068
|
const s = n.filter((a) => o.offset < a && a < o.offset + o.content.length).map((a) => a - o.offset).sort((a, i) => a - i);
|
|
6069
|
-
return s.length ?
|
|
6069
|
+
return s.length ? fl(o, s) : o;
|
|
6070
6070
|
})) : t;
|
|
6071
6071
|
}
|
|
6072
|
-
function
|
|
6072
|
+
function dl(t, e, n, r, o = "css-vars") {
|
|
6073
6073
|
const s = {
|
|
6074
6074
|
content: t.content,
|
|
6075
6075
|
explanation: t.explanation,
|
|
@@ -6081,7 +6081,7 @@ function pl(t, e, n, r, o = "css-vars") {
|
|
|
6081
6081
|
return a.forEach((c, h) => {
|
|
6082
6082
|
for (const p of i) {
|
|
6083
6083
|
const d = c[p] || "inherit";
|
|
6084
|
-
if (h === 0 && r &&
|
|
6084
|
+
if (h === 0 && r && hl.includes(p))
|
|
6085
6085
|
if (r === _n && a.length > 1) {
|
|
6086
6086
|
const f = e.findIndex((m) => m === "light"), g = e.findIndex((m) => m === "dark");
|
|
6087
6087
|
if (f === -1 || g === -1)
|
|
@@ -6107,12 +6107,12 @@ function pt(t) {
|
|
|
6107
6107
|
function rn(t) {
|
|
6108
6108
|
return typeof t == "string" ? t : Object.entries(t).map(([e, n]) => `${e}:${n}`).join(";");
|
|
6109
6109
|
}
|
|
6110
|
-
const
|
|
6110
|
+
const Ao = /* @__PURE__ */ new WeakMap();
|
|
6111
6111
|
function kt(t, e) {
|
|
6112
|
-
|
|
6112
|
+
Ao.set(t, e);
|
|
6113
6113
|
}
|
|
6114
6114
|
function We(t) {
|
|
6115
|
-
return
|
|
6115
|
+
return Ao.get(t);
|
|
6116
6116
|
}
|
|
6117
6117
|
class Le {
|
|
6118
6118
|
/**
|
|
@@ -6134,7 +6134,7 @@ class Le {
|
|
|
6134
6134
|
*/
|
|
6135
6135
|
static initial(e, n) {
|
|
6136
6136
|
return new Le(
|
|
6137
|
-
Object.fromEntries(
|
|
6137
|
+
Object.fromEntries(ll(n).map((r) => [r, Zt])),
|
|
6138
6138
|
e
|
|
6139
6139
|
);
|
|
6140
6140
|
}
|
|
@@ -6155,7 +6155,7 @@ class Le {
|
|
|
6155
6155
|
return this._stacks[e];
|
|
6156
6156
|
}
|
|
6157
6157
|
getScopes(e = this.theme) {
|
|
6158
|
-
return
|
|
6158
|
+
return gl(this._stacks[e]);
|
|
6159
6159
|
}
|
|
6160
6160
|
toJSON() {
|
|
6161
6161
|
return {
|
|
@@ -6166,7 +6166,7 @@ class Le {
|
|
|
6166
6166
|
};
|
|
6167
6167
|
}
|
|
6168
6168
|
}
|
|
6169
|
-
function
|
|
6169
|
+
function gl(t) {
|
|
6170
6170
|
const e = [], n = /* @__PURE__ */ new Set();
|
|
6171
6171
|
function r(o) {
|
|
6172
6172
|
if (n.has(o))
|
|
@@ -6177,12 +6177,12 @@ function dl(t) {
|
|
|
6177
6177
|
}
|
|
6178
6178
|
return r(t), e;
|
|
6179
6179
|
}
|
|
6180
|
-
function
|
|
6180
|
+
function ml(t, e) {
|
|
6181
6181
|
if (!(t instanceof Le))
|
|
6182
6182
|
throw new F("Invalid grammar state");
|
|
6183
6183
|
return t.getInternalStack(e);
|
|
6184
6184
|
}
|
|
6185
|
-
function
|
|
6185
|
+
function yl() {
|
|
6186
6186
|
const t = /* @__PURE__ */ new WeakMap();
|
|
6187
6187
|
function e(n) {
|
|
6188
6188
|
if (!t.has(n.meta)) {
|
|
@@ -6198,20 +6198,22 @@ function ml() {
|
|
|
6198
6198
|
const i = o.lines[a.line];
|
|
6199
6199
|
if (i === void 0)
|
|
6200
6200
|
throw new F(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${o.lines.length}`);
|
|
6201
|
-
|
|
6201
|
+
let l = a.character;
|
|
6202
|
+
if (l < 0 && (l = i.length + l), l < 0 || l > i.length)
|
|
6202
6203
|
throw new F(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${i.length}`);
|
|
6203
6204
|
return {
|
|
6204
6205
|
...a,
|
|
6205
|
-
|
|
6206
|
+
character: l,
|
|
6207
|
+
offset: o.posToIndex(a.line, l)
|
|
6206
6208
|
};
|
|
6207
6209
|
}
|
|
6208
6210
|
};
|
|
6209
|
-
const o =
|
|
6211
|
+
const o = cl(n.source), s = (n.options.decorations || []).map((a) => ({
|
|
6210
6212
|
...a,
|
|
6211
6213
|
start: r(a.start),
|
|
6212
6214
|
end: r(a.end)
|
|
6213
6215
|
}));
|
|
6214
|
-
|
|
6216
|
+
bl(s), t.set(n.meta, {
|
|
6215
6217
|
decorations: s,
|
|
6216
6218
|
converter: o,
|
|
6217
6219
|
source: n.source
|
|
@@ -6225,7 +6227,7 @@ function ml() {
|
|
|
6225
6227
|
if (!this.options.decorations?.length)
|
|
6226
6228
|
return;
|
|
6227
6229
|
const o = e(this).decorations.flatMap((a) => [a.start.offset, a.end.offset]);
|
|
6228
|
-
return
|
|
6230
|
+
return pl(n, o);
|
|
6229
6231
|
},
|
|
6230
6232
|
code(n) {
|
|
6231
6233
|
if (!this.options.decorations?.length)
|
|
@@ -6238,7 +6240,7 @@ function ml() {
|
|
|
6238
6240
|
let g = "", C = -1, y = -1;
|
|
6239
6241
|
if (h === 0 && (C = 0), p === 0 && (y = 0), p === Number.POSITIVE_INFINITY && (y = f.children.length), C === -1 || y === -1)
|
|
6240
6242
|
for (let _ = 0; _ < f.children.length; _++)
|
|
6241
|
-
g +=
|
|
6243
|
+
g += Ro(f.children[_]), C === -1 && g.length === h && (C = _ + 1), y === -1 && g.length === p && (y = _ + 1);
|
|
6242
6244
|
if (C === -1)
|
|
6243
6245
|
throw new F(`Failed to find start index for decoration ${JSON.stringify(d.start)}`);
|
|
6244
6246
|
if (y === -1)
|
|
@@ -6267,7 +6269,7 @@ function ml() {
|
|
|
6267
6269
|
...c.properties,
|
|
6268
6270
|
...d,
|
|
6269
6271
|
class: c.properties.class
|
|
6270
|
-
}, h.properties?.class &&
|
|
6272
|
+
}, h.properties?.class && Eo(c, h.properties.class), c = f(c, p) || c, c;
|
|
6271
6273
|
}
|
|
6272
6274
|
const l = [], u = r.decorations.sort((c, h) => h.start.offset - c.start.offset || c.end.offset - h.end.offset);
|
|
6273
6275
|
for (const c of u) {
|
|
@@ -6285,7 +6287,7 @@ function ml() {
|
|
|
6285
6287
|
}
|
|
6286
6288
|
};
|
|
6287
6289
|
}
|
|
6288
|
-
function
|
|
6290
|
+
function bl(t) {
|
|
6289
6291
|
for (let e = 0; e < t.length; e++) {
|
|
6290
6292
|
const n = t[e];
|
|
6291
6293
|
if (n.start.offset > n.end.offset)
|
|
@@ -6300,18 +6302,36 @@ function yl(t) {
|
|
|
6300
6302
|
}
|
|
6301
6303
|
}
|
|
6302
6304
|
}
|
|
6303
|
-
function
|
|
6304
|
-
return t.type === "text" ? t.value : t.type === "element" ? t.children.map(
|
|
6305
|
+
function Ro(t) {
|
|
6306
|
+
return t.type === "text" ? t.value : t.type === "element" ? t.children.map(Ro).join("") : "";
|
|
6305
6307
|
}
|
|
6306
|
-
const
|
|
6307
|
-
/* @__PURE__ */
|
|
6308
|
+
const wl = [
|
|
6309
|
+
/* @__PURE__ */ yl()
|
|
6308
6310
|
];
|
|
6309
6311
|
function dt(t) {
|
|
6312
|
+
const e = Cl(t.transformers || []);
|
|
6310
6313
|
return [
|
|
6311
|
-
...
|
|
6312
|
-
...
|
|
6314
|
+
...e.pre,
|
|
6315
|
+
...e.normal,
|
|
6316
|
+
...e.post,
|
|
6317
|
+
...wl
|
|
6313
6318
|
];
|
|
6314
6319
|
}
|
|
6320
|
+
function Cl(t) {
|
|
6321
|
+
const e = [], n = [], r = [];
|
|
6322
|
+
for (const o of t)
|
|
6323
|
+
switch (o.enforce) {
|
|
6324
|
+
case "pre":
|
|
6325
|
+
e.push(o);
|
|
6326
|
+
break;
|
|
6327
|
+
case "post":
|
|
6328
|
+
n.push(o);
|
|
6329
|
+
break;
|
|
6330
|
+
default:
|
|
6331
|
+
r.push(o);
|
|
6332
|
+
}
|
|
6333
|
+
return { pre: e, post: n, normal: r };
|
|
6334
|
+
}
|
|
6315
6335
|
var de = [
|
|
6316
6336
|
"black",
|
|
6317
6337
|
"red",
|
|
@@ -6338,7 +6358,7 @@ var de = [
|
|
|
6338
6358
|
8: "hidden",
|
|
6339
6359
|
9: "strikethrough"
|
|
6340
6360
|
};
|
|
6341
|
-
function
|
|
6361
|
+
function _l(t, e) {
|
|
6342
6362
|
const n = t.indexOf("\x1B", e);
|
|
6343
6363
|
if (n !== -1 && t[n + 1] === "[") {
|
|
6344
6364
|
const r = t.indexOf("m", n);
|
|
@@ -6367,7 +6387,7 @@ function tr(t) {
|
|
|
6367
6387
|
return { type: "table", index: Number(n) };
|
|
6368
6388
|
}
|
|
6369
6389
|
}
|
|
6370
|
-
function
|
|
6390
|
+
function Sl(t) {
|
|
6371
6391
|
const e = [];
|
|
6372
6392
|
for (; t.length > 0; ) {
|
|
6373
6393
|
const n = t.shift();
|
|
@@ -6435,21 +6455,21 @@ function Cl(t) {
|
|
|
6435
6455
|
}
|
|
6436
6456
|
return e;
|
|
6437
6457
|
}
|
|
6438
|
-
function
|
|
6458
|
+
function kl() {
|
|
6439
6459
|
let t = null, e = null, n = /* @__PURE__ */ new Set();
|
|
6440
6460
|
return {
|
|
6441
6461
|
parse(r) {
|
|
6442
6462
|
const o = [];
|
|
6443
6463
|
let s = 0;
|
|
6444
6464
|
do {
|
|
6445
|
-
const a =
|
|
6465
|
+
const a = _l(r, s), i = a.sequence ? r.substring(s, a.startPosition) : r.substring(s);
|
|
6446
6466
|
if (i.length > 0 && o.push({
|
|
6447
6467
|
value: i,
|
|
6448
6468
|
foreground: t,
|
|
6449
6469
|
background: e,
|
|
6450
6470
|
decorations: new Set(n)
|
|
6451
6471
|
}), a.sequence) {
|
|
6452
|
-
const l =
|
|
6472
|
+
const l = Sl(a.sequence);
|
|
6453
6473
|
for (const u of l)
|
|
6454
6474
|
u.type === "resetAll" ? (t = null, e = null, n.clear()) : u.type === "resetForegroundColor" ? t = null : u.type === "resetBackgroundColor" ? e = null : u.type === "resetDecoration" && n.delete(u.value);
|
|
6455
6475
|
for (const u of l)
|
|
@@ -6461,7 +6481,7 @@ function _l() {
|
|
|
6461
6481
|
}
|
|
6462
6482
|
};
|
|
6463
6483
|
}
|
|
6464
|
-
var
|
|
6484
|
+
var vl = {
|
|
6465
6485
|
black: "#000000",
|
|
6466
6486
|
red: "#bb0000",
|
|
6467
6487
|
green: "#00bb00",
|
|
@@ -6479,7 +6499,7 @@ var Sl = {
|
|
|
6479
6499
|
brightCyan: "#55ffff",
|
|
6480
6500
|
brightWhite: "#ffffff"
|
|
6481
6501
|
};
|
|
6482
|
-
function
|
|
6502
|
+
function xl(t = vl) {
|
|
6483
6503
|
function e(i) {
|
|
6484
6504
|
return t[i];
|
|
6485
6505
|
}
|
|
@@ -6520,19 +6540,19 @@ function kl(t = Sl) {
|
|
|
6520
6540
|
value: a
|
|
6521
6541
|
};
|
|
6522
6542
|
}
|
|
6523
|
-
function
|
|
6524
|
-
const r = ft(t, n), o = St(e), s =
|
|
6543
|
+
function El(t, e, n) {
|
|
6544
|
+
const r = ft(t, n), o = St(e), s = xl(
|
|
6525
6545
|
Object.fromEntries(
|
|
6526
6546
|
de.map((i) => [
|
|
6527
6547
|
i,
|
|
6528
6548
|
t.colors?.[`terminal.ansi${i[0].toUpperCase()}${i.substring(1)}`]
|
|
6529
6549
|
])
|
|
6530
6550
|
)
|
|
6531
|
-
), a =
|
|
6551
|
+
), a = kl();
|
|
6532
6552
|
return o.map(
|
|
6533
6553
|
(i) => a.parse(i[0]).map((l) => {
|
|
6534
6554
|
let u, c;
|
|
6535
|
-
l.decorations.has("reverse") ? (u = l.background ? s.value(l.background) : t.bg, c = l.foreground ? s.value(l.foreground) : t.fg) : (u = l.foreground ? s.value(l.foreground) : t.fg, c = l.background ? s.value(l.background) : void 0), u = ue(u, r), c = ue(c, r), l.decorations.has("dim") && (u =
|
|
6555
|
+
l.decorations.has("reverse") ? (u = l.background ? s.value(l.background) : t.bg, c = l.foreground ? s.value(l.foreground) : t.fg) : (u = l.foreground ? s.value(l.foreground) : t.fg, c = l.background ? s.value(l.background) : void 0), u = ue(u, r), c = ue(c, r), l.decorations.has("dim") && (u = Al(u));
|
|
6536
6556
|
let h = z.None;
|
|
6537
6557
|
return l.decorations.has("bold") && (h |= z.Bold), l.decorations.has("italic") && (h |= z.Italic), l.decorations.has("underline") && (h |= z.Underline), l.decorations.has("strikethrough") && (h |= z.Strikethrough), {
|
|
6538
6558
|
content: l.value,
|
|
@@ -6545,7 +6565,7 @@ function vl(t, e, n) {
|
|
|
6545
6565
|
})
|
|
6546
6566
|
);
|
|
6547
6567
|
}
|
|
6548
|
-
function
|
|
6568
|
+
function Al(t) {
|
|
6549
6569
|
const e = t.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);
|
|
6550
6570
|
if (e)
|
|
6551
6571
|
if (e[3]) {
|
|
@@ -6564,7 +6584,7 @@ function Sn(t, e, n = {}) {
|
|
|
6564
6584
|
return St(e).map((l) => [{ content: l[0], offset: l[1] }]);
|
|
6565
6585
|
const { theme: s, colorMap: a } = t.setTheme(o);
|
|
6566
6586
|
if (r === "ansi")
|
|
6567
|
-
return
|
|
6587
|
+
return El(s, e, n);
|
|
6568
6588
|
const i = t.getLanguage(r);
|
|
6569
6589
|
if (n.grammarState) {
|
|
6570
6590
|
if (n.grammarState.lang !== i.name)
|
|
@@ -6572,9 +6592,9 @@ function Sn(t, e, n = {}) {
|
|
|
6572
6592
|
if (!n.grammarState.themes.includes(s.name))
|
|
6573
6593
|
throw new F(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`);
|
|
6574
6594
|
}
|
|
6575
|
-
return
|
|
6595
|
+
return Il(e, i, s, a, n);
|
|
6576
6596
|
}
|
|
6577
|
-
function
|
|
6597
|
+
function Rl(...t) {
|
|
6578
6598
|
if (t.length === 2)
|
|
6579
6599
|
return We(t[1]);
|
|
6580
6600
|
const [e, n, r = {}] = t, {
|
|
@@ -6592,7 +6612,7 @@ function El(...t) {
|
|
|
6592
6612
|
a.name
|
|
6593
6613
|
);
|
|
6594
6614
|
}
|
|
6595
|
-
function
|
|
6615
|
+
function Il(t, e, n, r, o) {
|
|
6596
6616
|
const s = gt(t, e, n, r, o), a = new Le(
|
|
6597
6617
|
gt(t, e, n, r, o).stateStack,
|
|
6598
6618
|
e.name,
|
|
@@ -6605,7 +6625,7 @@ function gt(t, e, n, r, o) {
|
|
|
6605
6625
|
tokenizeMaxLineLength: a = 0,
|
|
6606
6626
|
tokenizeTimeLimit: i = 500
|
|
6607
6627
|
} = o, l = St(t);
|
|
6608
|
-
let u = o.grammarState ?
|
|
6628
|
+
let u = o.grammarState ? ml(o.grammarState, n.name) ?? Zt : o.grammarContextCode != null ? gt(
|
|
6609
6629
|
o.grammarContextCode,
|
|
6610
6630
|
e,
|
|
6611
6631
|
n,
|
|
@@ -6677,9 +6697,9 @@ function gt(t, e, n, r, o) {
|
|
|
6677
6697
|
);
|
|
6678
6698
|
R += G.length, ce.explanation.push({
|
|
6679
6699
|
content: G,
|
|
6680
|
-
scopes: o.includeExplanation === "scopeName" ?
|
|
6700
|
+
scopes: o.includeExplanation === "scopeName" ? Nl(
|
|
6681
6701
|
k.scopes
|
|
6682
|
-
) :
|
|
6702
|
+
) : Ll(
|
|
6683
6703
|
te,
|
|
6684
6704
|
k.scopes
|
|
6685
6705
|
)
|
|
@@ -6695,16 +6715,16 @@ function gt(t, e, n, r, o) {
|
|
|
6695
6715
|
stateStack: u
|
|
6696
6716
|
};
|
|
6697
6717
|
}
|
|
6698
|
-
function
|
|
6718
|
+
function Nl(t) {
|
|
6699
6719
|
return t.map((e) => ({ scopeName: e }));
|
|
6700
6720
|
}
|
|
6701
|
-
function
|
|
6721
|
+
function Ll(t, e) {
|
|
6702
6722
|
const n = [];
|
|
6703
6723
|
for (let r = 0, o = e.length; r < o; r++) {
|
|
6704
6724
|
const s = e[r];
|
|
6705
6725
|
n[r] = {
|
|
6706
6726
|
scopeName: s,
|
|
6707
|
-
themeMatches:
|
|
6727
|
+
themeMatches: $l(t, s, e.slice(0, r))
|
|
6708
6728
|
};
|
|
6709
6729
|
}
|
|
6710
6730
|
return n;
|
|
@@ -6712,7 +6732,7 @@ function Il(t, e) {
|
|
|
6712
6732
|
function nr(t, e) {
|
|
6713
6733
|
return t === e || e.substring(0, t.length) === t && e[t.length] === ".";
|
|
6714
6734
|
}
|
|
6715
|
-
function
|
|
6735
|
+
function Pl(t, e, n) {
|
|
6716
6736
|
if (!nr(t[t.length - 1], e))
|
|
6717
6737
|
return !1;
|
|
6718
6738
|
let r = t.length - 2, o = n.length - 1;
|
|
@@ -6720,17 +6740,17 @@ function Nl(t, e, n) {
|
|
|
6720
6740
|
nr(t[r], n[o]) && (r -= 1), o -= 1;
|
|
6721
6741
|
return r === -1;
|
|
6722
6742
|
}
|
|
6723
|
-
function
|
|
6743
|
+
function $l(t, e, n) {
|
|
6724
6744
|
const r = [];
|
|
6725
6745
|
for (const { selectors: o, settings: s } of t)
|
|
6726
6746
|
for (const a of o)
|
|
6727
|
-
if (
|
|
6747
|
+
if (Pl(a, e, n)) {
|
|
6728
6748
|
r.push(s);
|
|
6729
6749
|
break;
|
|
6730
6750
|
}
|
|
6731
6751
|
return r;
|
|
6732
6752
|
}
|
|
6733
|
-
function
|
|
6753
|
+
function Io(t, e, n) {
|
|
6734
6754
|
const r = Object.entries(n.themes).filter((l) => l[1]).map((l) => ({ color: l[0], theme: l[1] })), o = r.map((l) => {
|
|
6735
6755
|
const u = Sn(t, e, {
|
|
6736
6756
|
...n,
|
|
@@ -6741,7 +6761,7 @@ function Ro(t, e, n) {
|
|
|
6741
6761
|
state: c,
|
|
6742
6762
|
theme: h
|
|
6743
6763
|
};
|
|
6744
|
-
}), s =
|
|
6764
|
+
}), s = Tl(
|
|
6745
6765
|
...o.map((l) => l.tokens)
|
|
6746
6766
|
), a = s[0].map(
|
|
6747
6767
|
(l, u) => l.map((c, h) => {
|
|
@@ -6766,7 +6786,7 @@ function Ro(t, e, n) {
|
|
|
6766
6786
|
) : void 0;
|
|
6767
6787
|
return i && kt(a, i), a;
|
|
6768
6788
|
}
|
|
6769
|
-
function
|
|
6789
|
+
function Tl(...t) {
|
|
6770
6790
|
const e = t.map(() => []), n = t.length;
|
|
6771
6791
|
for (let r = 0; r < t[0].length; r++) {
|
|
6772
6792
|
const o = t.map((l) => l[r]), s = e.map(() => []);
|
|
@@ -6799,7 +6819,7 @@ function mt(t, e, n) {
|
|
|
6799
6819
|
} = n, p = Object.entries(n.themes).filter((y) => y[1]).map((y) => ({ color: y[0], theme: y[1] })).sort((y, m) => y.color === u ? -1 : m.color === u ? 1 : 0);
|
|
6800
6820
|
if (p.length === 0)
|
|
6801
6821
|
throw new F("`themes` option must not be empty");
|
|
6802
|
-
const d =
|
|
6822
|
+
const d = Io(
|
|
6803
6823
|
t,
|
|
6804
6824
|
e,
|
|
6805
6825
|
n
|
|
@@ -6807,7 +6827,7 @@ function mt(t, e, n) {
|
|
|
6807
6827
|
if (l = We(d), u && _n !== u && !p.find((y) => y.color === u))
|
|
6808
6828
|
throw new F(`\`themes\` option must contain the defaultColor key \`${u}\``);
|
|
6809
6829
|
const f = p.map((y) => t.getTheme(y.theme)), g = p.map((y) => y.color);
|
|
6810
|
-
s = d.map((y) => y.map((m) =>
|
|
6830
|
+
s = d.map((y) => y.map((m) => dl(m, g, c, u, h))), l && kt(s, l);
|
|
6811
6831
|
const C = p.map((y) => ft(y.theme, n));
|
|
6812
6832
|
o = rr(p, f, C, c, u, "fg", h), r = rr(p, f, C, c, u, "bg", h), a = `shiki-themes ${f.map((y) => y.name).join(" ")}`, i = u ? void 0 : [o, r].join(";");
|
|
6813
6833
|
} else if ("theme" in n) {
|
|
@@ -6867,7 +6887,7 @@ function yt(t, e, n, r = {
|
|
|
6867
6887
|
mergeWhitespaces: h = !0,
|
|
6868
6888
|
mergeSameStyleTokens: p = !1
|
|
6869
6889
|
} = n;
|
|
6870
|
-
h === !0 ? s =
|
|
6890
|
+
h === !0 ? s = Ol(s) : h === "never" && (s = Dl(s)), p && (s = Gl(s));
|
|
6871
6891
|
const d = {
|
|
6872
6892
|
...r,
|
|
6873
6893
|
get source() {
|
|
@@ -6876,7 +6896,7 @@ function yt(t, e, n, r = {
|
|
|
6876
6896
|
};
|
|
6877
6897
|
for (const f of dt(n))
|
|
6878
6898
|
s = f.tokens?.call(d, s) || s;
|
|
6879
|
-
return
|
|
6899
|
+
return Ml(
|
|
6880
6900
|
s,
|
|
6881
6901
|
{
|
|
6882
6902
|
...n,
|
|
@@ -6889,7 +6909,7 @@ function yt(t, e, n, r = {
|
|
|
6889
6909
|
c
|
|
6890
6910
|
);
|
|
6891
6911
|
}
|
|
6892
|
-
function
|
|
6912
|
+
function Ml(t, e, n, r = We(t)) {
|
|
6893
6913
|
const o = dt(e), s = [], a = {
|
|
6894
6914
|
type: "root",
|
|
6895
6915
|
children: []
|
|
@@ -6922,7 +6942,7 @@ function $l(t, e, n, r = We(t)) {
|
|
|
6922
6942
|
const h = [], p = {
|
|
6923
6943
|
...n,
|
|
6924
6944
|
structure: i,
|
|
6925
|
-
addClassToHast:
|
|
6945
|
+
addClassToHast: Eo,
|
|
6926
6946
|
get source() {
|
|
6927
6947
|
return n.source;
|
|
6928
6948
|
},
|
|
@@ -6987,7 +7007,7 @@ function $l(t, e, n, r = We(t)) {
|
|
|
6987
7007
|
d = f?.root?.call(p, d) || d;
|
|
6988
7008
|
return r && kt(d, r), d;
|
|
6989
7009
|
}
|
|
6990
|
-
function
|
|
7010
|
+
function Ol(t) {
|
|
6991
7011
|
return t.map((e) => {
|
|
6992
7012
|
const n = [];
|
|
6993
7013
|
let r = "", o = 0;
|
|
@@ -7007,7 +7027,7 @@ function Tl(t) {
|
|
|
7007
7027
|
}), n;
|
|
7008
7028
|
});
|
|
7009
7029
|
}
|
|
7010
|
-
function
|
|
7030
|
+
function Dl(t) {
|
|
7011
7031
|
return t.map((e) => e.flatMap((n) => {
|
|
7012
7032
|
if (n.content.match(/^\s+$/))
|
|
7013
7033
|
return n;
|
|
@@ -7031,7 +7051,7 @@ function Ml(t) {
|
|
|
7031
7051
|
}), i;
|
|
7032
7052
|
}));
|
|
7033
7053
|
}
|
|
7034
|
-
function
|
|
7054
|
+
function Gl(t) {
|
|
7035
7055
|
return t.map((e) => {
|
|
7036
7056
|
const n = [];
|
|
7037
7057
|
for (const r of e) {
|
|
@@ -7045,15 +7065,15 @@ function Ol(t) {
|
|
|
7045
7065
|
return n;
|
|
7046
7066
|
});
|
|
7047
7067
|
}
|
|
7048
|
-
const
|
|
7049
|
-
function
|
|
7068
|
+
const Fl = sl;
|
|
7069
|
+
function Bl(t, e, n) {
|
|
7050
7070
|
const r = {
|
|
7051
7071
|
meta: {},
|
|
7052
7072
|
options: n,
|
|
7053
7073
|
codeToHast: (s, a) => yt(t, s, a),
|
|
7054
7074
|
codeToTokens: (s, a) => mt(t, s, a)
|
|
7055
7075
|
};
|
|
7056
|
-
let o =
|
|
7076
|
+
let o = Fl(yt(t, e, n, r));
|
|
7057
7077
|
for (const s of dt(n))
|
|
7058
7078
|
o = s.postprocess?.call(r, o, n) || o;
|
|
7059
7079
|
return o;
|
|
@@ -7117,28 +7137,28 @@ function kn(t) {
|
|
|
7117
7137
|
value: !0
|
|
7118
7138
|
}), e;
|
|
7119
7139
|
}
|
|
7120
|
-
async function
|
|
7140
|
+
async function No(t) {
|
|
7121
7141
|
return Array.from(new Set((await Promise.all(
|
|
7122
|
-
t.filter((e) => !
|
|
7142
|
+
t.filter((e) => !xo(e)).map(async (e) => await vo(e).then((n) => Array.isArray(n) ? n : [n]))
|
|
7123
7143
|
)).flat()));
|
|
7124
7144
|
}
|
|
7125
|
-
async function
|
|
7145
|
+
async function Lo(t) {
|
|
7126
7146
|
return (await Promise.all(
|
|
7127
7147
|
t.map(
|
|
7128
|
-
async (n) =>
|
|
7148
|
+
async (n) => ul(n) ? null : kn(await vo(n))
|
|
7129
7149
|
)
|
|
7130
7150
|
)).filter((n) => !!n);
|
|
7131
7151
|
}
|
|
7132
|
-
let
|
|
7133
|
-
function
|
|
7134
|
-
e >
|
|
7152
|
+
let jl = 3;
|
|
7153
|
+
function Ul(t, e = 3) {
|
|
7154
|
+
e > jl || console.trace(`[SHIKI DEPRECATE]: ${t}`);
|
|
7135
7155
|
}
|
|
7136
7156
|
class ve extends Error {
|
|
7137
7157
|
constructor(e) {
|
|
7138
7158
|
super(e), this.name = "ShikiError";
|
|
7139
7159
|
}
|
|
7140
7160
|
}
|
|
7141
|
-
class
|
|
7161
|
+
class zl extends Ya {
|
|
7142
7162
|
constructor(e, n, r, o = {}) {
|
|
7143
7163
|
super(e), this._resolver = e, this._themes = n, this._langs = r, this._alias = o, this._themes.map((s) => this.loadTheme(s)), this.loadLanguages(this._langs);
|
|
7144
7164
|
}
|
|
@@ -7225,7 +7245,7 @@ class jl extends Ka {
|
|
|
7225
7245
|
this._langGraph.set(n, this._langMap.get(n));
|
|
7226
7246
|
}
|
|
7227
7247
|
}
|
|
7228
|
-
class
|
|
7248
|
+
class Hl {
|
|
7229
7249
|
_langs = /* @__PURE__ */ new Map();
|
|
7230
7250
|
_scopeToLang = /* @__PURE__ */ new Map();
|
|
7231
7251
|
_injections = /* @__PURE__ */ new Map();
|
|
@@ -7263,12 +7283,12 @@ class Ul {
|
|
|
7263
7283
|
}
|
|
7264
7284
|
}
|
|
7265
7285
|
let De = 0;
|
|
7266
|
-
function
|
|
7286
|
+
function Wl(t) {
|
|
7267
7287
|
De += 1, t.warnings !== !1 && De >= 10 && De % 10 === 0 && console.warn(`[Shiki] ${De} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);
|
|
7268
7288
|
let e = !1;
|
|
7269
7289
|
if (!t.engine)
|
|
7270
7290
|
throw new ve("`engine` option is required for synchronous mode");
|
|
7271
|
-
const n = (t.langs || []).flat(1), r = (t.themes || []).flat(1).map(kn), o = new
|
|
7291
|
+
const n = (t.langs || []).flat(1), r = (t.themes || []).flat(1).map(kn), o = new Hl(t.engine, n), s = new zl(o, r, n, t.langAlias);
|
|
7272
7292
|
let a;
|
|
7273
7293
|
function i(m) {
|
|
7274
7294
|
C();
|
|
@@ -7306,7 +7326,7 @@ function zl(t) {
|
|
|
7306
7326
|
C(), s.loadLanguages(m.flat(1));
|
|
7307
7327
|
}
|
|
7308
7328
|
async function d(...m) {
|
|
7309
|
-
return p(await
|
|
7329
|
+
return p(await No(m));
|
|
7310
7330
|
}
|
|
7311
7331
|
function f(...m) {
|
|
7312
7332
|
C();
|
|
@@ -7314,7 +7334,7 @@ function zl(t) {
|
|
|
7314
7334
|
s.loadTheme(_);
|
|
7315
7335
|
}
|
|
7316
7336
|
async function g(...m) {
|
|
7317
|
-
return C(), f(await
|
|
7337
|
+
return C(), f(await Lo(m));
|
|
7318
7338
|
}
|
|
7319
7339
|
function C() {
|
|
7320
7340
|
if (e)
|
|
@@ -7337,55 +7357,55 @@ function zl(t) {
|
|
|
7337
7357
|
[Symbol.dispose]: y
|
|
7338
7358
|
};
|
|
7339
7359
|
}
|
|
7340
|
-
async function
|
|
7341
|
-
t.engine ||
|
|
7360
|
+
async function Vl(t) {
|
|
7361
|
+
t.engine || Ul("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");
|
|
7342
7362
|
const [
|
|
7343
7363
|
e,
|
|
7344
7364
|
n,
|
|
7345
7365
|
r
|
|
7346
7366
|
] = await Promise.all([
|
|
7347
|
-
|
|
7348
|
-
|
|
7367
|
+
Lo(t.themes || []),
|
|
7368
|
+
No(t.langs || []),
|
|
7349
7369
|
t.engine
|
|
7350
7370
|
]);
|
|
7351
|
-
return
|
|
7371
|
+
return Wl({
|
|
7352
7372
|
...t,
|
|
7353
7373
|
themes: e,
|
|
7354
7374
|
langs: n,
|
|
7355
7375
|
engine: r
|
|
7356
7376
|
});
|
|
7357
7377
|
}
|
|
7358
|
-
async function
|
|
7359
|
-
const e = await
|
|
7378
|
+
async function ql(t) {
|
|
7379
|
+
const e = await Vl(t);
|
|
7360
7380
|
return {
|
|
7361
|
-
getLastGrammarState: (...n) =>
|
|
7381
|
+
getLastGrammarState: (...n) => Rl(e, ...n),
|
|
7362
7382
|
codeToTokensBase: (n, r) => Sn(e, n, r),
|
|
7363
|
-
codeToTokensWithThemes: (n, r) =>
|
|
7383
|
+
codeToTokensWithThemes: (n, r) => Io(e, n, r),
|
|
7364
7384
|
codeToTokens: (n, r) => mt(e, n, r),
|
|
7365
7385
|
codeToHast: (n, r) => yt(e, n, r),
|
|
7366
|
-
codeToHtml: (n, r) =>
|
|
7386
|
+
codeToHtml: (n, r) => Bl(e, n, r),
|
|
7367
7387
|
getBundledLanguages: () => ({}),
|
|
7368
7388
|
getBundledThemes: () => ({}),
|
|
7369
7389
|
...e,
|
|
7370
7390
|
getInternalContext: () => e
|
|
7371
7391
|
};
|
|
7372
7392
|
}
|
|
7373
|
-
function
|
|
7374
|
-
return "children" in t ?
|
|
7393
|
+
function Po(t) {
|
|
7394
|
+
return "children" in t ? $o(t) : "value" in t ? t.value : "";
|
|
7375
7395
|
}
|
|
7376
|
-
function
|
|
7377
|
-
return t.type === "text" ? t.value : "children" in t ?
|
|
7396
|
+
function Xl(t) {
|
|
7397
|
+
return t.type === "text" ? t.value : "children" in t ? $o(t) : "";
|
|
7378
7398
|
}
|
|
7379
|
-
function
|
|
7399
|
+
function $o(t) {
|
|
7380
7400
|
let e = -1;
|
|
7381
7401
|
const n = [];
|
|
7382
7402
|
for (; ++e < t.children.length; )
|
|
7383
|
-
n[e] =
|
|
7403
|
+
n[e] = Xl(t.children[e]);
|
|
7384
7404
|
return n.join("");
|
|
7385
7405
|
}
|
|
7386
|
-
const
|
|
7406
|
+
const Kl = {
|
|
7387
7407
|
"tailing-curly-colon": (t, e) => {
|
|
7388
|
-
const n =
|
|
7408
|
+
const n = Po(e), r = n.match(/(.+)\{:([\w-]+)\}$/);
|
|
7389
7409
|
if (r)
|
|
7390
7410
|
return {
|
|
7391
7411
|
type: "inline",
|
|
@@ -7393,7 +7413,7 @@ const ql = {
|
|
|
7393
7413
|
lang: r.at(2)
|
|
7394
7414
|
};
|
|
7395
7415
|
}
|
|
7396
|
-
}, ir = "language-",
|
|
7416
|
+
}, ir = "language-", Yl = (t, e) => {
|
|
7397
7417
|
const n = e.children[0];
|
|
7398
7418
|
if (!n || n.type !== "element" || n.tagName !== "code" || !n.properties)
|
|
7399
7419
|
return;
|
|
@@ -7403,11 +7423,11 @@ const ql = {
|
|
|
7403
7423
|
return {
|
|
7404
7424
|
type: "pre",
|
|
7405
7425
|
lang: typeof o == "string" ? o.slice(ir.length) : void 0,
|
|
7406
|
-
code:
|
|
7426
|
+
code: Po(n),
|
|
7407
7427
|
meta: n.data?.meta ?? n.properties.metastring?.toString() ?? ""
|
|
7408
7428
|
};
|
|
7409
|
-
},
|
|
7410
|
-
function
|
|
7429
|
+
}, Jl = "language-";
|
|
7430
|
+
function Zl(t, e) {
|
|
7411
7431
|
const {
|
|
7412
7432
|
addLanguageClass: n = !1,
|
|
7413
7433
|
parseMetaString: r,
|
|
@@ -7438,7 +7458,7 @@ function Yl(t, e) {
|
|
|
7438
7458
|
{
|
|
7439
7459
|
name: "rehype-shiki:code-language-class",
|
|
7440
7460
|
code(S) {
|
|
7441
|
-
return this.addClassToHast(S, `${
|
|
7461
|
+
return this.addClassToHast(S, `${Jl}${d}`), S;
|
|
7442
7462
|
}
|
|
7443
7463
|
}
|
|
7444
7464
|
]), l && f.endsWith(`
|
|
@@ -7455,21 +7475,21 @@ function Yl(t, e) {
|
|
|
7455
7475
|
}
|
|
7456
7476
|
return (d) => {
|
|
7457
7477
|
const f = [];
|
|
7458
|
-
if (
|
|
7478
|
+
if (Xr(d, "element", (g, C, y) => {
|
|
7459
7479
|
let m;
|
|
7460
7480
|
if (!y || C == null)
|
|
7461
7481
|
return;
|
|
7462
7482
|
if (g.tagName === "pre")
|
|
7463
|
-
m =
|
|
7483
|
+
m = Yl;
|
|
7464
7484
|
else if (g.tagName === "code" && u)
|
|
7465
|
-
m =
|
|
7485
|
+
m = Kl[u];
|
|
7466
7486
|
else
|
|
7467
7487
|
return;
|
|
7468
7488
|
const _ = m(d, g);
|
|
7469
7489
|
if (!_)
|
|
7470
7490
|
return;
|
|
7471
7491
|
let S, A = !1;
|
|
7472
|
-
if (_.lang ? t.getLoadedLanguages().includes(_.lang) ||
|
|
7492
|
+
if (_.lang ? t.getLoadedLanguages().includes(_.lang) || xo(_.lang) ? S = _.lang : c ? (A = !0, S = _.lang) : a && (S = a) : S = s, !S)
|
|
7473
7493
|
return;
|
|
7474
7494
|
const D = _.meta ? r?.(_.meta, g, d) : void 0, L = (j) => {
|
|
7475
7495
|
const Z = p(j, _.code, _.meta, D ?? {});
|
|
@@ -7502,7 +7522,7 @@ function Yl(t, e) {
|
|
|
7502
7522
|
}
|
|
7503
7523
|
};
|
|
7504
7524
|
}
|
|
7505
|
-
function
|
|
7525
|
+
function Ql(t) {
|
|
7506
7526
|
if (!t)
|
|
7507
7527
|
return null;
|
|
7508
7528
|
const e = t.match(/\{([\d,-]+)\}/);
|
|
@@ -7512,7 +7532,7 @@ function Jl(t) {
|
|
|
7512
7532
|
}) : null;
|
|
7513
7533
|
}
|
|
7514
7534
|
const lr = Symbol("highlighted-lines");
|
|
7515
|
-
function
|
|
7535
|
+
function eu(t = {}) {
|
|
7516
7536
|
const {
|
|
7517
7537
|
className: e = "highlighted"
|
|
7518
7538
|
} = t;
|
|
@@ -7522,14 +7542,14 @@ function Zl(t = {}) {
|
|
|
7522
7542
|
if (!this.options.meta?.__raw)
|
|
7523
7543
|
return;
|
|
7524
7544
|
const o = this.meta;
|
|
7525
|
-
return o[lr] ??=
|
|
7545
|
+
return o[lr] ??= Ql(this.options.meta.__raw), (o[lr] ?? []).includes(r) && this.addClassToHast(n, e), n;
|
|
7526
7546
|
}
|
|
7527
7547
|
};
|
|
7528
7548
|
}
|
|
7529
|
-
function
|
|
7549
|
+
function tu(t) {
|
|
7530
7550
|
return t ? Array.from(t.matchAll(/\/((?:\\.|[^/])+)\//g)).map((n) => n[1].replace(/\\(.)/g, "$1")) : [];
|
|
7531
7551
|
}
|
|
7532
|
-
function
|
|
7552
|
+
function nu(t = {}) {
|
|
7533
7553
|
const {
|
|
7534
7554
|
className: e = "highlighted-word"
|
|
7535
7555
|
} = t;
|
|
@@ -7538,10 +7558,10 @@ function eu(t = {}) {
|
|
|
7538
7558
|
preprocess(n, r) {
|
|
7539
7559
|
if (!this.options.meta?.__raw)
|
|
7540
7560
|
return;
|
|
7541
|
-
const o =
|
|
7561
|
+
const o = tu(this.options.meta.__raw);
|
|
7542
7562
|
r.decorations ||= [];
|
|
7543
7563
|
for (const s of o) {
|
|
7544
|
-
const a =
|
|
7564
|
+
const a = ru(n, s);
|
|
7545
7565
|
for (const i of a)
|
|
7546
7566
|
r.decorations.push({
|
|
7547
7567
|
start: i,
|
|
@@ -7554,7 +7574,7 @@ function eu(t = {}) {
|
|
|
7554
7574
|
}
|
|
7555
7575
|
};
|
|
7556
7576
|
}
|
|
7557
|
-
function
|
|
7577
|
+
function ru(t, e) {
|
|
7558
7578
|
const n = [];
|
|
7559
7579
|
let r = 0;
|
|
7560
7580
|
for (; ; ) {
|
|
@@ -7569,7 +7589,7 @@ function Pe(t) {
|
|
|
7569
7589
|
if ([...t].length !== 1) throw new Error(`Expected "${t}" to be a single code point`);
|
|
7570
7590
|
return t.codePointAt(0);
|
|
7571
7591
|
}
|
|
7572
|
-
function
|
|
7592
|
+
function ou(t, e, n) {
|
|
7573
7593
|
return t.has(e) || t.set(e, n), t.get(e);
|
|
7574
7594
|
}
|
|
7575
7595
|
const vn = /* @__PURE__ */ new Set(["alnum", "alpha", "ascii", "blank", "cntrl", "digit", "graph", "lower", "print", "punct", "space", "upper", "word", "xdigit"]), B = String.raw;
|
|
@@ -7577,9 +7597,9 @@ function $e(t, e) {
|
|
|
7577
7597
|
if (t == null) throw new Error(e ?? "Value expected");
|
|
7578
7598
|
return t;
|
|
7579
7599
|
}
|
|
7580
|
-
const
|
|
7600
|
+
const To = B`\[\^?`, Mo = `c.? | C(?:-.?)?|${B`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${B`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${B`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${B`o\{[^\}]*\}?`}|${B`\d{1,3}`}`, xn = /[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/, et = new RegExp(B`
|
|
7581
7601
|
\\ (?:
|
|
7582
|
-
${
|
|
7602
|
+
${Mo}
|
|
7583
7603
|
| [gk]<[^>]*>?
|
|
7584
7604
|
| [gk]'[^']*'?
|
|
7585
7605
|
| .
|
|
@@ -7597,22 +7617,22 @@ const $o = B`\[\^?`, To = `c.? | C(?:-.?)?|${B`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x
|
|
|
7597
7617
|
| \*[^\)]*\)?
|
|
7598
7618
|
)?
|
|
7599
7619
|
| (?:${xn.source})+
|
|
7600
|
-
| ${
|
|
7620
|
+
| ${To}
|
|
7601
7621
|
| .
|
|
7602
7622
|
`.replace(/\s+/g, ""), "gsu"), Ot = new RegExp(B`
|
|
7603
7623
|
\\ (?:
|
|
7604
|
-
${
|
|
7624
|
+
${Mo}
|
|
7605
7625
|
| .
|
|
7606
7626
|
)
|
|
7607
7627
|
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
7608
|
-
| ${
|
|
7628
|
+
| ${To}
|
|
7609
7629
|
| &&
|
|
7610
7630
|
| .
|
|
7611
7631
|
`.replace(/\s+/g, ""), "gsu");
|
|
7612
|
-
function
|
|
7632
|
+
function su(t, e = {}) {
|
|
7613
7633
|
const n = { flags: "", ...e, rules: { captureGroup: !1, singleline: !1, ...e.rules } };
|
|
7614
7634
|
if (typeof t != "string") throw new Error("String expected as pattern");
|
|
7615
|
-
const r =
|
|
7635
|
+
const r = vu(n.flags), o = [r.extended], s = { captureGroup: n.rules.captureGroup, getCurrentModX() {
|
|
7616
7636
|
return o.at(-1);
|
|
7617
7637
|
}, numOpenGroups: 0, popModX() {
|
|
7618
7638
|
o.pop();
|
|
@@ -7623,7 +7643,7 @@ function ru(t, e = {}) {
|
|
|
7623
7643
|
}, singleline: n.rules.singleline };
|
|
7624
7644
|
let a = [], i;
|
|
7625
7645
|
for (et.lastIndex = 0; i = et.exec(t); ) {
|
|
7626
|
-
const h =
|
|
7646
|
+
const h = au(s, t, i[0], et.lastIndex);
|
|
7627
7647
|
h.tokens ? a.push(...h.tokens) : h.token && a.push(h.token), h.lastIndex !== void 0 && (et.lastIndex = h.lastIndex);
|
|
7628
7648
|
}
|
|
7629
7649
|
const l = [];
|
|
@@ -7634,39 +7654,39 @@ function ru(t, e = {}) {
|
|
|
7634
7654
|
h.kind = "capturing", h.number = p + 1;
|
|
7635
7655
|
});
|
|
7636
7656
|
const c = u || l.length;
|
|
7637
|
-
return { tokens: a.map((h) => h.type === "EscapedNumber" ?
|
|
7657
|
+
return { tokens: a.map((h) => h.type === "EscapedNumber" ? Eu(h, c) : h).flat(), flags: r };
|
|
7638
7658
|
}
|
|
7639
|
-
function
|
|
7659
|
+
function au(t, e, n, r) {
|
|
7640
7660
|
const [o, s] = n;
|
|
7641
7661
|
if (n === "[" || n === "[^") {
|
|
7642
|
-
const a =
|
|
7662
|
+
const a = iu(e, n, r);
|
|
7643
7663
|
return { tokens: a.tokens, lastIndex: a.lastIndex };
|
|
7644
7664
|
}
|
|
7645
7665
|
if (o === "\\") {
|
|
7646
7666
|
if ("AbBGyYzZ".includes(s)) return { token: ur(n, n) };
|
|
7647
7667
|
if (/^\\g[<']/.test(n)) {
|
|
7648
7668
|
if (!/^\\g(?:<[^>]+>|'[^']+')$/.test(n)) throw new Error(`Invalid group name "${n}"`);
|
|
7649
|
-
return { token:
|
|
7669
|
+
return { token: yu(n) };
|
|
7650
7670
|
}
|
|
7651
7671
|
if (/^\\k[<']/.test(n)) {
|
|
7652
7672
|
if (!/^\\k(?:<[^>]+>|'[^']+')$/.test(n)) throw new Error(`Invalid group name "${n}"`);
|
|
7653
|
-
return { token:
|
|
7673
|
+
return { token: Do(n) };
|
|
7654
7674
|
}
|
|
7655
|
-
if (s === "K") return { token:
|
|
7675
|
+
if (s === "K") return { token: Go("keep", n) };
|
|
7656
7676
|
if (s === "N" || s === "R") return { token: ge("newline", n, { negate: s === "N" }) };
|
|
7657
7677
|
if (s === "O") return { token: ge("any", n) };
|
|
7658
7678
|
if (s === "X") return { token: ge("text_segment", n) };
|
|
7659
|
-
const a =
|
|
7679
|
+
const a = Oo(n, { inCharClass: !1 });
|
|
7660
7680
|
return Array.isArray(a) ? { tokens: a } : { token: a };
|
|
7661
7681
|
}
|
|
7662
7682
|
if (o === "(") {
|
|
7663
|
-
if (s === "*") return { token:
|
|
7683
|
+
if (s === "*") return { token: _u(n) };
|
|
7664
7684
|
if (n === "(?{") throw new Error(`Unsupported callout "${n}"`);
|
|
7665
7685
|
if (n.startsWith("(?#")) {
|
|
7666
7686
|
if (e[r] !== ")") throw new Error('Unclosed comment group "(?#"');
|
|
7667
7687
|
return { lastIndex: r + 1 };
|
|
7668
7688
|
}
|
|
7669
|
-
if (/^\(\?[-imx]+[:)]$/.test(n)) return { token:
|
|
7689
|
+
if (/^\(\?[-imx]+[:)]$/.test(n)) return { token: Cu(n, t) };
|
|
7670
7690
|
if (t.pushModX(t.getCurrentModX()), t.numOpenGroups++, n === "(" && !t.captureGroup || n === "(?:") return { token: Se("group", n) };
|
|
7671
7691
|
if (n === "(?>") return { token: Se("atomic", n) };
|
|
7672
7692
|
if (n === "(?=" || n === "(?!" || n === "(?<=" || n === "(?<!") return { token: Se(n[2] === "<" ? "lookbehind" : "lookahead", n, { negate: n.endsWith("!") }) };
|
|
@@ -7679,7 +7699,7 @@ function ou(t, e, n, r) {
|
|
|
7679
7699
|
}
|
|
7680
7700
|
if (n === ")") {
|
|
7681
7701
|
if (t.popModX(), t.numOpenGroups--, t.numOpenGroups < 0) throw new Error('Unmatched ")"');
|
|
7682
|
-
return { token:
|
|
7702
|
+
return { token: du(n) };
|
|
7683
7703
|
}
|
|
7684
7704
|
if (t.getCurrentModX()) {
|
|
7685
7705
|
if (n === "#") {
|
|
@@ -7697,9 +7717,9 @@ function ou(t, e, n, r) {
|
|
|
7697
7717
|
const a = t.singleline ? { "^": B`\A`, $: B`\Z` }[n] : n;
|
|
7698
7718
|
return { token: ur(a, n) };
|
|
7699
7719
|
}
|
|
7700
|
-
return n === "|" ? { token:
|
|
7720
|
+
return n === "|" ? { token: uu(n) } : xn.test(n) ? { tokens: Au(n) } : { token: se(Pe(n), n) };
|
|
7701
7721
|
}
|
|
7702
|
-
function
|
|
7722
|
+
function iu(t, e, n) {
|
|
7703
7723
|
const r = [cr(e[1] === "^", e)];
|
|
7704
7724
|
let o = 1, s;
|
|
7705
7725
|
for (Ot.lastIndex = n; s = Ot.exec(t); ) {
|
|
@@ -7707,31 +7727,31 @@ function su(t, e, n) {
|
|
|
7707
7727
|
if (a[0] === "[" && a[1] !== ":") o++, r.push(cr(a[1] === "^", a));
|
|
7708
7728
|
else if (a === "]") {
|
|
7709
7729
|
if (r.at(-1).type === "CharacterClassOpen") r.push(se(93, a));
|
|
7710
|
-
else if (o--, r.push(
|
|
7730
|
+
else if (o--, r.push(cu(a)), !o) break;
|
|
7711
7731
|
} else {
|
|
7712
|
-
const i =
|
|
7732
|
+
const i = lu(a);
|
|
7713
7733
|
Array.isArray(i) ? r.push(...i) : r.push(i);
|
|
7714
7734
|
}
|
|
7715
7735
|
}
|
|
7716
7736
|
return { tokens: r, lastIndex: Ot.lastIndex || t.length };
|
|
7717
7737
|
}
|
|
7718
|
-
function
|
|
7719
|
-
if (t[0] === "\\") return
|
|
7738
|
+
function lu(t) {
|
|
7739
|
+
if (t[0] === "\\") return Oo(t, { inCharClass: !0 });
|
|
7720
7740
|
if (t[0] === "[") {
|
|
7721
7741
|
const e = /\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(t);
|
|
7722
7742
|
if (!e || !vn.has(e.groups.name)) throw new Error(`Invalid POSIX class "${t}"`);
|
|
7723
7743
|
return ge("posix", t, { value: e.groups.name, negate: !!e.groups.negate });
|
|
7724
7744
|
}
|
|
7725
|
-
return t === "-" ?
|
|
7745
|
+
return t === "-" ? hu(t) : t === "&&" ? fu(t) : se(Pe(t), t);
|
|
7726
7746
|
}
|
|
7727
|
-
function
|
|
7747
|
+
function Oo(t, { inCharClass: e }) {
|
|
7728
7748
|
const n = t[1];
|
|
7729
|
-
if (n === "c" || n === "C") return
|
|
7730
|
-
if ("dDhHsSwW".includes(n)) return
|
|
7749
|
+
if (n === "c" || n === "C") return wu(t);
|
|
7750
|
+
if ("dDhHsSwW".includes(n)) return Su(t);
|
|
7731
7751
|
if (t.startsWith(B`\o{`)) throw new Error(`Incomplete, invalid, or unsupported octal code point "${t}"`);
|
|
7732
7752
|
if (/^\\[pP]\{/.test(t)) {
|
|
7733
7753
|
if (t.length === 3) throw new Error(`Incomplete or invalid Unicode property "${t}"`);
|
|
7734
|
-
return
|
|
7754
|
+
return ku(t);
|
|
7735
7755
|
}
|
|
7736
7756
|
if (/^\\x[89A-Fa-f]\p{AHex}/u.test(t)) try {
|
|
7737
7757
|
const r = t.split(/\\x/).slice(1).map((a) => parseInt(a, 16)), o = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }).decode(new Uint8Array(r)), s = new TextEncoder();
|
|
@@ -7742,33 +7762,33 @@ function Mo(t, { inCharClass: e }) {
|
|
|
7742
7762
|
} catch {
|
|
7743
7763
|
throw new Error(`Multibyte code "${t}" incomplete or invalid in Oniguruma`);
|
|
7744
7764
|
}
|
|
7745
|
-
if (n === "u" || n === "x") return se(
|
|
7765
|
+
if (n === "u" || n === "x") return se(xu(t), t);
|
|
7746
7766
|
if (hr.has(n)) return se(hr.get(n), t);
|
|
7747
|
-
if (/\d/.test(n)) return
|
|
7767
|
+
if (/\d/.test(n)) return pu(e, t);
|
|
7748
7768
|
if (t === "\\") throw new Error(B`Incomplete escape "\"`);
|
|
7749
7769
|
if (n === "M") throw new Error(`Unsupported meta "${t}"`);
|
|
7750
7770
|
if ([...t].length === 2) return se(t.codePointAt(1), t);
|
|
7751
7771
|
throw new Error(`Unexpected escape "${t}"`);
|
|
7752
7772
|
}
|
|
7753
|
-
function
|
|
7773
|
+
function uu(t) {
|
|
7754
7774
|
return { type: "Alternator", raw: t };
|
|
7755
7775
|
}
|
|
7756
7776
|
function ur(t, e) {
|
|
7757
7777
|
return { type: "Assertion", kind: t, raw: e };
|
|
7758
7778
|
}
|
|
7759
|
-
function
|
|
7779
|
+
function Do(t) {
|
|
7760
7780
|
return { type: "Backreference", raw: t };
|
|
7761
7781
|
}
|
|
7762
7782
|
function se(t, e) {
|
|
7763
7783
|
return { type: "Character", value: t, raw: e };
|
|
7764
7784
|
}
|
|
7765
|
-
function
|
|
7785
|
+
function cu(t) {
|
|
7766
7786
|
return { type: "CharacterClassClose", raw: t };
|
|
7767
7787
|
}
|
|
7768
|
-
function
|
|
7788
|
+
function hu(t) {
|
|
7769
7789
|
return { type: "CharacterClassHyphen", raw: t };
|
|
7770
7790
|
}
|
|
7771
|
-
function
|
|
7791
|
+
function fu(t) {
|
|
7772
7792
|
return { type: "CharacterClassIntersector", raw: t };
|
|
7773
7793
|
}
|
|
7774
7794
|
function cr(t, e) {
|
|
@@ -7777,48 +7797,48 @@ function cr(t, e) {
|
|
|
7777
7797
|
function ge(t, e, n = {}) {
|
|
7778
7798
|
return { type: "CharacterSet", kind: t, ...n, raw: e };
|
|
7779
7799
|
}
|
|
7780
|
-
function
|
|
7800
|
+
function Go(t, e, n = {}) {
|
|
7781
7801
|
return t === "keep" ? { type: "Directive", kind: t, raw: e } : { type: "Directive", kind: t, flags: $e(n.flags), raw: e };
|
|
7782
7802
|
}
|
|
7783
|
-
function
|
|
7803
|
+
function pu(t, e) {
|
|
7784
7804
|
return { type: "EscapedNumber", inCharClass: t, raw: e };
|
|
7785
7805
|
}
|
|
7786
|
-
function
|
|
7806
|
+
function du(t) {
|
|
7787
7807
|
return { type: "GroupClose", raw: t };
|
|
7788
7808
|
}
|
|
7789
7809
|
function Se(t, e, n = {}) {
|
|
7790
7810
|
return { type: "GroupOpen", kind: t, ...n, raw: e };
|
|
7791
7811
|
}
|
|
7792
|
-
function
|
|
7812
|
+
function gu(t, e, n, r) {
|
|
7793
7813
|
return { type: "NamedCallout", kind: t, tag: e, arguments: n, raw: r };
|
|
7794
7814
|
}
|
|
7795
|
-
function
|
|
7815
|
+
function mu(t, e, n, r) {
|
|
7796
7816
|
return { type: "Quantifier", kind: t, min: e, max: n, raw: r };
|
|
7797
7817
|
}
|
|
7798
|
-
function
|
|
7818
|
+
function yu(t) {
|
|
7799
7819
|
return { type: "Subroutine", raw: t };
|
|
7800
7820
|
}
|
|
7801
|
-
const
|
|
7802
|
-
function
|
|
7821
|
+
const bu = /* @__PURE__ */ new Set(["COUNT", "CMP", "ERROR", "FAIL", "MAX", "MISMATCH", "SKIP", "TOTAL_COUNT"]), hr = /* @__PURE__ */ new Map([["a", 7], ["b", 8], ["e", 27], ["f", 12], ["n", 10], ["r", 13], ["t", 9], ["v", 11]]);
|
|
7822
|
+
function wu(t) {
|
|
7803
7823
|
const e = t[1] === "c" ? t[2] : t[3];
|
|
7804
7824
|
if (!e || !/[A-Za-z]/.test(e)) throw new Error(`Unsupported control character "${t}"`);
|
|
7805
7825
|
return se(Pe(e.toUpperCase()) - 64, t);
|
|
7806
7826
|
}
|
|
7807
|
-
function
|
|
7827
|
+
function Cu(t, e) {
|
|
7808
7828
|
let { on: n, off: r } = /^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(t).groups;
|
|
7809
7829
|
r ??= "";
|
|
7810
7830
|
const o = (e.getCurrentModX() || n.includes("x")) && !r.includes("x"), s = pr(n), a = pr(r), i = {};
|
|
7811
|
-
if (s && (i.enable = s), a && (i.disable = a), t.endsWith(")")) return e.replaceCurrentModX(o),
|
|
7831
|
+
if (s && (i.enable = s), a && (i.disable = a), t.endsWith(")")) return e.replaceCurrentModX(o), Go("flags", t, { flags: i });
|
|
7812
7832
|
if (t.endsWith(":")) return e.pushModX(o), e.numOpenGroups++, Se("group", t, { ...(s || a) && { flags: i } });
|
|
7813
7833
|
throw new Error(`Unexpected flag modifier "${t}"`);
|
|
7814
7834
|
}
|
|
7815
|
-
function
|
|
7835
|
+
function _u(t) {
|
|
7816
7836
|
const e = /\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(t);
|
|
7817
7837
|
if (!e) throw new Error(`Incomplete or invalid named callout "${t}"`);
|
|
7818
7838
|
const { name: n, tag: r, args: o } = e.groups;
|
|
7819
7839
|
if (!n) throw new Error(`Invalid named callout "${t}"`);
|
|
7820
7840
|
if (r === "") throw new Error(`Named callout tag with empty value not allowed "${t}"`);
|
|
7821
|
-
const s = o ? o.split(",").filter((c) => c !== "").map((c) => /^[+-]?\d+$/.test(c) ? +c : c) : [], [a, i, l] = s, u =
|
|
7841
|
+
const s = o ? o.split(",").filter((c) => c !== "").map((c) => /^[+-]?\d+$/.test(c) ? +c : c) : [], [a, i, l] = s, u = bu.has(n) ? n.toLowerCase() : "custom";
|
|
7822
7842
|
switch (u) {
|
|
7823
7843
|
case "fail":
|
|
7824
7844
|
case "mismatch":
|
|
@@ -7850,7 +7870,7 @@ function wu(t) {
|
|
|
7850
7870
|
default:
|
|
7851
7871
|
throw new Error(`Unexpected named callout kind "${u}"`);
|
|
7852
7872
|
}
|
|
7853
|
-
return
|
|
7873
|
+
return gu(u, r ?? null, o?.split(",") ?? null, t);
|
|
7854
7874
|
}
|
|
7855
7875
|
function fr(t) {
|
|
7856
7876
|
let e = null, n, r;
|
|
@@ -7862,13 +7882,13 @@ function fr(t) {
|
|
|
7862
7882
|
e = "lazy";
|
|
7863
7883
|
} else e || (e = "greedy");
|
|
7864
7884
|
} else n = t[0] === "+" ? 1 : 0, r = t[0] === "?" ? 1 : 1 / 0, e = t[1] === "+" ? "possessive" : t[1] === "?" ? "lazy" : "greedy";
|
|
7865
|
-
return
|
|
7885
|
+
return mu(e, n, r, t);
|
|
7866
7886
|
}
|
|
7867
|
-
function
|
|
7887
|
+
function Su(t) {
|
|
7868
7888
|
const e = t[1].toLowerCase();
|
|
7869
7889
|
return ge({ d: "digit", h: "hex", s: "space", w: "word" }[e], t, { negate: t[1] !== e });
|
|
7870
7890
|
}
|
|
7871
|
-
function
|
|
7891
|
+
function ku(t) {
|
|
7872
7892
|
const { p: e, neg: n, value: r } = /^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(t).groups;
|
|
7873
7893
|
return ge("property", t, { value: r, negate: e === "P" && !n || e === "p" && !!n });
|
|
7874
7894
|
}
|
|
@@ -7876,7 +7896,7 @@ function pr(t) {
|
|
|
7876
7896
|
const e = {};
|
|
7877
7897
|
return t.includes("i") && (e.ignoreCase = !0), t.includes("m") && (e.dotAll = !0), t.includes("x") && (e.extended = !0), Object.keys(e).length ? e : null;
|
|
7878
7898
|
}
|
|
7879
|
-
function
|
|
7899
|
+
function vu(t) {
|
|
7880
7900
|
const e = { ignoreCase: !1, dotAll: !1, extended: !1, digitIsAscii: !1, posixIsAscii: !1, spaceIsAscii: !1, wordIsAscii: !1, textSegmentMode: null };
|
|
7881
7901
|
for (let n = 0; n < t.length; n++) {
|
|
7882
7902
|
const r = t[n];
|
|
@@ -7890,14 +7910,14 @@ function Su(t) {
|
|
|
7890
7910
|
}
|
|
7891
7911
|
return e;
|
|
7892
7912
|
}
|
|
7893
|
-
function
|
|
7913
|
+
function xu(t) {
|
|
7894
7914
|
if (/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(t)) throw new Error(`Incomplete or invalid escape "${t}"`);
|
|
7895
7915
|
const e = t[2] === "{" ? /^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(t).groups.hex : t.slice(2);
|
|
7896
7916
|
return parseInt(e, 16);
|
|
7897
7917
|
}
|
|
7898
|
-
function
|
|
7918
|
+
function Eu(t, e) {
|
|
7899
7919
|
const { raw: n, inCharClass: r } = t, o = n.slice(1);
|
|
7900
|
-
if (!r && (o !== "0" && o.length === 1 || o[0] !== "0" && +o <= e)) return [
|
|
7920
|
+
if (!r && (o !== "0" && o.length === 1 || o[0] !== "0" && +o <= e)) return [Do(n)];
|
|
7901
7921
|
const s = [], a = o.match(/^[0-7]+|\d/g);
|
|
7902
7922
|
for (let i = 0; i < a.length; i++) {
|
|
7903
7923
|
const l = a[i];
|
|
@@ -7909,7 +7929,7 @@ function vu(t, e) {
|
|
|
7909
7929
|
}
|
|
7910
7930
|
return s;
|
|
7911
7931
|
}
|
|
7912
|
-
function
|
|
7932
|
+
function Au(t) {
|
|
7913
7933
|
const e = [], n = new RegExp(xn, "gy");
|
|
7914
7934
|
let r;
|
|
7915
7935
|
for (; r = n.exec(t); ) {
|
|
@@ -7928,48 +7948,48 @@ function xu(t) {
|
|
|
7928
7948
|
}
|
|
7929
7949
|
return e;
|
|
7930
7950
|
}
|
|
7931
|
-
function
|
|
7951
|
+
function Fo(t, e) {
|
|
7932
7952
|
if (!Array.isArray(t.body)) throw new Error("Expected node with body array");
|
|
7933
7953
|
if (t.body.length !== 1) return !1;
|
|
7934
7954
|
const n = t.body[0];
|
|
7935
7955
|
return !e || Object.keys(e).every((r) => e[r] === n[r]);
|
|
7936
7956
|
}
|
|
7937
|
-
function
|
|
7938
|
-
return
|
|
7957
|
+
function Ru(t) {
|
|
7958
|
+
return Iu.has(t.type);
|
|
7939
7959
|
}
|
|
7940
|
-
const
|
|
7941
|
-
function
|
|
7942
|
-
const n = { flags: "", normalizeUnknownPropertyNames: !1, skipBackrefValidation: !1, skipLookbehindValidation: !1, skipPropertyNameValidation: !1, unicodePropertyMap: null, ...e, rules: { captureGroup: !1, singleline: !1, ...e.rules } }, r =
|
|
7960
|
+
const Iu = /* @__PURE__ */ new Set(["AbsenceFunction", "Backreference", "CapturingGroup", "Character", "CharacterClass", "CharacterSet", "Group", "Quantifier", "Subroutine"]);
|
|
7961
|
+
function Bo(t, e = {}) {
|
|
7962
|
+
const n = { flags: "", normalizeUnknownPropertyNames: !1, skipBackrefValidation: !1, skipLookbehindValidation: !1, skipPropertyNameValidation: !1, unicodePropertyMap: null, ...e, rules: { captureGroup: !1, singleline: !1, ...e.rules } }, r = su(t, { flags: n.flags, rules: { captureGroup: n.rules.captureGroup, singleline: n.rules.singleline } }), o = (p, d) => {
|
|
7943
7963
|
const f = r.tokens[s.nextIndex];
|
|
7944
7964
|
switch (s.parent = p, s.nextIndex++, f.type) {
|
|
7945
7965
|
case "Alternator":
|
|
7946
7966
|
return me();
|
|
7947
7967
|
case "Assertion":
|
|
7948
|
-
return
|
|
7968
|
+
return Nu(f);
|
|
7949
7969
|
case "Backreference":
|
|
7950
|
-
return
|
|
7970
|
+
return Lu(f, s);
|
|
7951
7971
|
case "Character":
|
|
7952
7972
|
return vt(f.value, { useLastValid: !!d.isCheckingRangeEnd });
|
|
7953
7973
|
case "CharacterClassHyphen":
|
|
7954
|
-
return
|
|
7974
|
+
return Pu(f, s, d);
|
|
7955
7975
|
case "CharacterClassOpen":
|
|
7956
|
-
return
|
|
7976
|
+
return $u(f, s, d);
|
|
7957
7977
|
case "CharacterSet":
|
|
7958
|
-
return
|
|
7978
|
+
return Tu(f, s);
|
|
7959
7979
|
case "Directive":
|
|
7960
|
-
return
|
|
7980
|
+
return Bu(f.kind, { flags: f.flags });
|
|
7961
7981
|
case "GroupOpen":
|
|
7962
|
-
return
|
|
7982
|
+
return Mu(f, s, d);
|
|
7963
7983
|
case "NamedCallout":
|
|
7964
|
-
return
|
|
7984
|
+
return Uu(f.kind, f.tag, f.arguments);
|
|
7965
7985
|
case "Quantifier":
|
|
7966
|
-
return
|
|
7986
|
+
return Ou(f, s);
|
|
7967
7987
|
case "Subroutine":
|
|
7968
|
-
return
|
|
7988
|
+
return Du(f, s);
|
|
7969
7989
|
default:
|
|
7970
7990
|
throw new Error(`Unexpected token type "${f.type}"`);
|
|
7971
7991
|
}
|
|
7972
|
-
}, s = { capturingGroups: [], hasNumberedRef: !1, namedGroupsByName: /* @__PURE__ */ new Map(), nextIndex: 0, normalizeUnknownPropertyNames: n.normalizeUnknownPropertyNames, parent: null, skipBackrefValidation: n.skipBackrefValidation, skipLookbehindValidation: n.skipLookbehindValidation, skipPropertyNameValidation: n.skipPropertyNameValidation, subroutines: [], tokens: r.tokens, unicodePropertyMap: n.unicodePropertyMap, walk: o }, a =
|
|
7992
|
+
}, s = { capturingGroups: [], hasNumberedRef: !1, namedGroupsByName: /* @__PURE__ */ new Map(), nextIndex: 0, normalizeUnknownPropertyNames: n.normalizeUnknownPropertyNames, parent: null, skipBackrefValidation: n.skipBackrefValidation, skipLookbehindValidation: n.skipLookbehindValidation, skipPropertyNameValidation: n.skipPropertyNameValidation, subroutines: [], tokens: r.tokens, unicodePropertyMap: n.unicodePropertyMap, walk: o }, a = Hu(ju(r.flags));
|
|
7973
7993
|
let i = a.body[0];
|
|
7974
7994
|
for (; s.nextIndex < r.tokens.length; ) {
|
|
7975
7995
|
const p = o(i, {});
|
|
@@ -7986,10 +8006,10 @@ function Fo(t, e = {}) {
|
|
|
7986
8006
|
} else throw new Error(B`Subroutine uses a group name that's not defined "\g<${p}>"`);
|
|
7987
8007
|
return a;
|
|
7988
8008
|
}
|
|
7989
|
-
function
|
|
8009
|
+
function Nu({ kind: t }) {
|
|
7990
8010
|
return on($e({ "^": "line_start", $: "line_end", "\\A": "string_start", "\\b": "word_boundary", "\\B": "word_boundary", "\\G": "search_start", "\\y": "text_segment_boundary", "\\Y": "text_segment_boundary", "\\z": "string_end", "\\Z": "string_end_newline" }[t], `Unexpected assertion kind "${t}"`), { negate: t === B`\B` || t === B`\Y` });
|
|
7991
8011
|
}
|
|
7992
|
-
function
|
|
8012
|
+
function Lu({ raw: t }, e) {
|
|
7993
8013
|
const n = /^\\k[<']/.test(t), r = n ? t.slice(3, -1) : t.slice(1), o = (s, a = !1) => {
|
|
7994
8014
|
const i = e.capturingGroups.length;
|
|
7995
8015
|
let l = !1;
|
|
@@ -8006,16 +8026,16 @@ function Iu({ raw: t }, e) {
|
|
|
8006
8026
|
}
|
|
8007
8027
|
return o(+r);
|
|
8008
8028
|
}
|
|
8009
|
-
function
|
|
8029
|
+
function Pu(t, e, n) {
|
|
8010
8030
|
const { tokens: r, walk: o } = e, s = e.parent, a = s.body.at(-1), i = r[e.nextIndex];
|
|
8011
8031
|
if (!n.isCheckingRangeEnd && a && a.type !== "CharacterClass" && a.type !== "CharacterClassRange" && i && i.type !== "CharacterClassOpen" && i.type !== "CharacterClassClose" && i.type !== "CharacterClassIntersector") {
|
|
8012
8032
|
const l = o(s, { ...n, isCheckingRangeEnd: !0 });
|
|
8013
|
-
if (a.type === "Character" && l.type === "Character") return s.body.pop(),
|
|
8033
|
+
if (a.type === "Character" && l.type === "Character") return s.body.pop(), Fu(a, l);
|
|
8014
8034
|
throw new Error("Invalid character class range");
|
|
8015
8035
|
}
|
|
8016
8036
|
return vt(Pe("-"));
|
|
8017
8037
|
}
|
|
8018
|
-
function
|
|
8038
|
+
function $u({ negate: t }, e, n) {
|
|
8019
8039
|
const { tokens: r, walk: o } = e, s = r[e.nextIndex], a = [st()];
|
|
8020
8040
|
let i = mr(s);
|
|
8021
8041
|
for (; i.type !== "CharacterClassClose"; ) {
|
|
@@ -8029,18 +8049,18 @@ function Lu({ negate: t }, e, n) {
|
|
|
8029
8049
|
const l = st({ negate: t });
|
|
8030
8050
|
return a.length === 1 ? l.body = a[0].body : (l.kind = "intersection", l.body = a.map((u) => u.body.length === 1 ? u.body[0] : u)), e.nextIndex++, l;
|
|
8031
8051
|
}
|
|
8032
|
-
function
|
|
8052
|
+
function Tu({ kind: t, negate: e, value: n }, r) {
|
|
8033
8053
|
const { normalizeUnknownPropertyNames: o, skipPropertyNameValidation: s, unicodePropertyMap: a } = r;
|
|
8034
8054
|
if (t === "property") {
|
|
8035
8055
|
const i = xt(n);
|
|
8036
8056
|
if (vn.has(i) && !a?.has(i)) t = "posix", n = i;
|
|
8037
8057
|
else return ke(n, { negate: e, normalizeUnknownPropertyNames: o, skipPropertyNameValidation: s, unicodePropertyMap: a });
|
|
8038
8058
|
}
|
|
8039
|
-
return t === "posix" ?
|
|
8059
|
+
return t === "posix" ? zu(n, { negate: e }) : an(t, { negate: e });
|
|
8040
8060
|
}
|
|
8041
|
-
function
|
|
8042
|
-
const { tokens: r, capturingGroups: o, namedGroupsByName: s, skipLookbehindValidation: a, walk: i } = e, l =
|
|
8043
|
-
if (l.type === "CapturingGroup" && (o.push(l), l.name &&
|
|
8061
|
+
function Mu(t, e, n) {
|
|
8062
|
+
const { tokens: r, capturingGroups: o, namedGroupsByName: s, skipLookbehindValidation: a, walk: i } = e, l = Wu(t), u = l.type === "AbsenceFunction", c = gr(l), h = c && l.negate;
|
|
8063
|
+
if (l.type === "CapturingGroup" && (o.push(l), l.name && ou(s, l.name, []).push(l)), u && n.isInAbsenceFunction) throw new Error("Nested absence function not supported by Oniguruma");
|
|
8044
8064
|
let p = yr(r[e.nextIndex]);
|
|
8045
8065
|
for (; p.type !== "GroupClose"; ) {
|
|
8046
8066
|
if (p.type === "Alternator") l.body.push(me()), e.nextIndex++;
|
|
@@ -8057,13 +8077,13 @@ function $u(t, e, n) {
|
|
|
8057
8077
|
}
|
|
8058
8078
|
return e.nextIndex++, l;
|
|
8059
8079
|
}
|
|
8060
|
-
function
|
|
8080
|
+
function Ou({ kind: t, min: e, max: n }, r) {
|
|
8061
8081
|
const o = r.parent, s = o.body.at(-1);
|
|
8062
|
-
if (!s || !
|
|
8063
|
-
const a =
|
|
8082
|
+
if (!s || !Ru(s)) throw new Error("Quantifier requires a repeatable token");
|
|
8083
|
+
const a = Uo(t, e, n, s);
|
|
8064
8084
|
return o.body.pop(), a;
|
|
8065
8085
|
}
|
|
8066
|
-
function
|
|
8086
|
+
function Du({ raw: t }, e) {
|
|
8067
8087
|
const { capturingGroups: n, subroutines: r } = e;
|
|
8068
8088
|
let o = t.slice(3, -1);
|
|
8069
8089
|
const s = /^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(o);
|
|
@@ -8071,14 +8091,14 @@ function Mu({ raw: t }, e) {
|
|
|
8071
8091
|
const i = +s.groups.num, l = n.length;
|
|
8072
8092
|
if (e.hasNumberedRef = !0, o = { "": i, "+": l + i, "-": l + 1 - i }[s.groups.sign], o < 1) throw new Error("Invalid subroutine number");
|
|
8073
8093
|
} else o === "0" && (o = 0);
|
|
8074
|
-
const a =
|
|
8094
|
+
const a = zo(o);
|
|
8075
8095
|
return r.push(a), a;
|
|
8076
8096
|
}
|
|
8077
|
-
function
|
|
8097
|
+
function Gu(t, e) {
|
|
8078
8098
|
return { type: "AbsenceFunction", kind: t, body: Ye(e?.body) };
|
|
8079
8099
|
}
|
|
8080
8100
|
function me(t) {
|
|
8081
|
-
return { type: "Alternative", body:
|
|
8101
|
+
return { type: "Alternative", body: Ho(t?.body) };
|
|
8082
8102
|
}
|
|
8083
8103
|
function on(t, e) {
|
|
8084
8104
|
const n = { type: "Assertion", kind: t };
|
|
@@ -8088,9 +8108,9 @@ function sn(t, e) {
|
|
|
8088
8108
|
const n = !!e?.orphan;
|
|
8089
8109
|
return { type: "Backreference", ref: t, ...n && { orphan: n } };
|
|
8090
8110
|
}
|
|
8091
|
-
function
|
|
8111
|
+
function jo(t, e) {
|
|
8092
8112
|
const n = { name: void 0, isSubroutined: !1, ...e };
|
|
8093
|
-
if (n.name !== void 0 && !
|
|
8113
|
+
if (n.name !== void 0 && !Vu(n.name)) throw new Error(`Group name "${n.name}" invalid in Oniguruma`);
|
|
8094
8114
|
return { type: "CapturingGroup", number: t, ...n.name && { name: n.name }, ...n.isSubroutined && { isSubroutined: n.isSubroutined }, body: Ye(e?.body) };
|
|
8095
8115
|
}
|
|
8096
8116
|
function vt(t, e) {
|
|
@@ -8104,9 +8124,9 @@ function vt(t, e) {
|
|
|
8104
8124
|
}
|
|
8105
8125
|
function st(t) {
|
|
8106
8126
|
const e = { kind: "union", negate: !1, ...t };
|
|
8107
|
-
return { type: "CharacterClass", kind: e.kind, negate: e.negate, body:
|
|
8127
|
+
return { type: "CharacterClass", kind: e.kind, negate: e.negate, body: Ho(t?.body) };
|
|
8108
8128
|
}
|
|
8109
|
-
function
|
|
8129
|
+
function Fu(t, e) {
|
|
8110
8130
|
if (e.value < t.value) throw new Error("Character class range out of order");
|
|
8111
8131
|
return { type: "CharacterClassRange", min: t, max: e };
|
|
8112
8132
|
}
|
|
@@ -8114,12 +8134,12 @@ function an(t, e) {
|
|
|
8114
8134
|
const n = !!e?.negate, r = { type: "CharacterSet", kind: t };
|
|
8115
8135
|
return (t === "digit" || t === "hex" || t === "newline" || t === "space" || t === "word") && (r.negate = n), (t === "text_segment" || t === "newline" && !n) && (r.variableLength = !0), r;
|
|
8116
8136
|
}
|
|
8117
|
-
function
|
|
8137
|
+
function Bu(t, e = {}) {
|
|
8118
8138
|
if (t === "keep") return { type: "Directive", kind: t };
|
|
8119
8139
|
if (t === "flags") return { type: "Directive", kind: t, flags: $e(e.flags) };
|
|
8120
8140
|
throw new Error(`Unexpected directive kind "${t}"`);
|
|
8121
8141
|
}
|
|
8122
|
-
function
|
|
8142
|
+
function ju(t) {
|
|
8123
8143
|
return { type: "Flags", ...t };
|
|
8124
8144
|
}
|
|
8125
8145
|
function Q(t) {
|
|
@@ -8131,41 +8151,41 @@ function pe(t) {
|
|
|
8131
8151
|
const e = { behind: !1, negate: !1, ...t };
|
|
8132
8152
|
return { type: "LookaroundAssertion", kind: e.behind ? "lookbehind" : "lookahead", negate: e.negate, body: Ye(t?.body) };
|
|
8133
8153
|
}
|
|
8134
|
-
function
|
|
8154
|
+
function Uu(t, e, n) {
|
|
8135
8155
|
return { type: "NamedCallout", kind: t, tag: e, arguments: n };
|
|
8136
8156
|
}
|
|
8137
|
-
function
|
|
8157
|
+
function zu(t, e) {
|
|
8138
8158
|
const n = !!e?.negate;
|
|
8139
8159
|
if (!vn.has(t)) throw new Error(`Invalid POSIX class "${t}"`);
|
|
8140
8160
|
return { type: "CharacterSet", kind: "posix", value: t, negate: n };
|
|
8141
8161
|
}
|
|
8142
|
-
function
|
|
8162
|
+
function Uo(t, e, n, r) {
|
|
8143
8163
|
if (e > n) throw new Error("Invalid reversed quantifier range");
|
|
8144
8164
|
return { type: "Quantifier", kind: t, min: e, max: n, body: r };
|
|
8145
8165
|
}
|
|
8146
|
-
function
|
|
8166
|
+
function Hu(t, e) {
|
|
8147
8167
|
return { type: "Regex", body: Ye(e?.body), flags: t };
|
|
8148
8168
|
}
|
|
8149
|
-
function
|
|
8169
|
+
function zo(t) {
|
|
8150
8170
|
return { type: "Subroutine", ref: t };
|
|
8151
8171
|
}
|
|
8152
8172
|
function ke(t, e) {
|
|
8153
8173
|
const n = { negate: !1, normalizeUnknownPropertyNames: !1, skipPropertyNameValidation: !1, unicodePropertyMap: null, ...e };
|
|
8154
8174
|
let r = n.unicodePropertyMap?.get(xt(t));
|
|
8155
8175
|
if (!r) {
|
|
8156
|
-
if (n.normalizeUnknownPropertyNames) r =
|
|
8176
|
+
if (n.normalizeUnknownPropertyNames) r = qu(t);
|
|
8157
8177
|
else if (n.unicodePropertyMap && !n.skipPropertyNameValidation) throw new Error(B`Invalid Unicode property "\p{${t}}"`);
|
|
8158
8178
|
}
|
|
8159
8179
|
return { type: "CharacterSet", kind: "property", value: r ?? t, negate: n.negate };
|
|
8160
8180
|
}
|
|
8161
|
-
function
|
|
8181
|
+
function Wu({ flags: t, kind: e, name: n, negate: r, number: o }) {
|
|
8162
8182
|
switch (e) {
|
|
8163
8183
|
case "absence_repeater":
|
|
8164
|
-
return
|
|
8184
|
+
return Gu("repeater");
|
|
8165
8185
|
case "atomic":
|
|
8166
8186
|
return Q({ atomic: !0 });
|
|
8167
8187
|
case "capturing":
|
|
8168
|
-
return
|
|
8188
|
+
return jo(o, { name: n });
|
|
8169
8189
|
case "group":
|
|
8170
8190
|
return Q({ flags: t });
|
|
8171
8191
|
case "lookahead":
|
|
@@ -8180,7 +8200,7 @@ function Ye(t) {
|
|
|
8180
8200
|
else if (!Array.isArray(t) || !t.length || !t.every((e) => e.type === "Alternative")) throw new Error("Invalid body; expected array of one or more Alternative nodes");
|
|
8181
8201
|
return t;
|
|
8182
8202
|
}
|
|
8183
|
-
function
|
|
8203
|
+
function Ho(t) {
|
|
8184
8204
|
if (t === void 0) t = [];
|
|
8185
8205
|
else if (!Array.isArray(t) || !t.every((e) => !!e.type)) throw new Error("Invalid body; expected array of nodes");
|
|
8186
8206
|
return t;
|
|
@@ -8191,10 +8211,10 @@ function dr(t) {
|
|
|
8191
8211
|
function gr(t) {
|
|
8192
8212
|
return t.type === "LookaroundAssertion" && t.kind === "lookbehind";
|
|
8193
8213
|
}
|
|
8194
|
-
function
|
|
8214
|
+
function Vu(t) {
|
|
8195
8215
|
return /^[\p{Alpha}\p{Pc}][^)]*$/u.test(t);
|
|
8196
8216
|
}
|
|
8197
|
-
function
|
|
8217
|
+
function qu(t) {
|
|
8198
8218
|
return t.trim().replace(/[- _]+/g, "_").replace(/[A-Z][a-z]+(?=[A-Z])/g, "$&_").replace(/[A-Za-z]+/g, (e) => e[0].toUpperCase() + e.slice(1).toLowerCase());
|
|
8199
8219
|
}
|
|
8200
8220
|
function xt(t) {
|
|
@@ -8281,12 +8301,12 @@ function Ce(t) {
|
|
|
8281
8301
|
if (typeof t != "number") throw new Error("Numeric key expected");
|
|
8282
8302
|
return t;
|
|
8283
8303
|
}
|
|
8284
|
-
const
|
|
8285
|
-
function
|
|
8304
|
+
const Xu = String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;
|
|
8305
|
+
function Ku(t, e) {
|
|
8286
8306
|
for (let n = 0; n < t.length; n++)
|
|
8287
8307
|
t[n] >= e && t[n]++;
|
|
8288
8308
|
}
|
|
8289
|
-
function
|
|
8309
|
+
function Yu(t, e, n, r) {
|
|
8290
8310
|
return t.slice(0, e) + r + t.slice(e + n.length);
|
|
8291
8311
|
}
|
|
8292
8312
|
const J = Object.freeze({
|
|
@@ -8309,10 +8329,10 @@ function En(t, e, n, r) {
|
|
|
8309
8329
|
}
|
|
8310
8330
|
return i;
|
|
8311
8331
|
}
|
|
8312
|
-
function
|
|
8332
|
+
function Wo(t, e, n, r) {
|
|
8313
8333
|
En(t, e, n, r);
|
|
8314
8334
|
}
|
|
8315
|
-
function
|
|
8335
|
+
function Ju(t, e, n = 0, r) {
|
|
8316
8336
|
if (!new RegExp(e, "su").test(t))
|
|
8317
8337
|
return null;
|
|
8318
8338
|
const o = new RegExp(`${e}|(?<$skip>\\\\?.)`, "gsu");
|
|
@@ -8327,9 +8347,9 @@ function Ku(t, e, n = 0, r) {
|
|
|
8327
8347
|
return null;
|
|
8328
8348
|
}
|
|
8329
8349
|
function nt(t, e, n) {
|
|
8330
|
-
return !!
|
|
8350
|
+
return !!Ju(t, e, 0, n);
|
|
8331
8351
|
}
|
|
8332
|
-
function
|
|
8352
|
+
function Zu(t, e) {
|
|
8333
8353
|
const n = /\\?./gsu;
|
|
8334
8354
|
n.lastIndex = e;
|
|
8335
8355
|
let r = t.length, o = 0, s = 1, a;
|
|
@@ -8348,8 +8368,8 @@ function Yu(t, e) {
|
|
|
8348
8368
|
}
|
|
8349
8369
|
return t.slice(e, r);
|
|
8350
8370
|
}
|
|
8351
|
-
const br = new RegExp(String.raw`(?<noncapturingStart>${
|
|
8352
|
-
function
|
|
8371
|
+
const br = new RegExp(String.raw`(?<noncapturingStart>${Xu})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`, "gsu");
|
|
8372
|
+
function Qu(t, e) {
|
|
8353
8373
|
const n = e?.hiddenCaptures ?? [];
|
|
8354
8374
|
let r = e?.captureTransfers ?? /* @__PURE__ */ new Map();
|
|
8355
8375
|
if (!/\(\?>/.test(t))
|
|
@@ -8379,7 +8399,7 @@ function Ju(t, e) {
|
|
|
8379
8399
|
if (!d) {
|
|
8380
8400
|
u++;
|
|
8381
8401
|
const S = l + u;
|
|
8382
|
-
if (t = `${t.slice(0, c)}${s}${t.slice(c + o.length, y)}))<$$${S}>)${t.slice(y + 1)}`, h = !0, i.push(S),
|
|
8402
|
+
if (t = `${t.slice(0, c)}${s}${t.slice(c + o.length, y)}))<$$${S}>)${t.slice(y + 1)}`, h = !0, i.push(S), Ku(n, S), r.size) {
|
|
8383
8403
|
const A = /* @__PURE__ */ new Map();
|
|
8384
8404
|
r.forEach((D, L) => {
|
|
8385
8405
|
A.set(
|
|
@@ -8413,7 +8433,7 @@ function Ju(t, e) {
|
|
|
8413
8433
|
hiddenCaptures: n
|
|
8414
8434
|
};
|
|
8415
8435
|
}
|
|
8416
|
-
const
|
|
8436
|
+
const Vo = String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`, Dt = new RegExp(String.raw`
|
|
8417
8437
|
\\(?: \d+
|
|
8418
8438
|
| c[A-Za-z]
|
|
8419
8439
|
| [gk]<[^>]+>
|
|
@@ -8426,11 +8446,11 @@ const Wo = String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`, Dt = new RegExp(String.raw`
|
|
|
8426
8446
|
| [A-Za-z\-]+:
|
|
8427
8447
|
| \(DEFINE\)
|
|
8428
8448
|
))?
|
|
8429
|
-
| (?<qBase>${
|
|
8449
|
+
| (?<qBase>${Vo})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
8430
8450
|
| \\?.
|
|
8431
8451
|
`.replace(/\s+/g, ""), "gsu");
|
|
8432
|
-
function
|
|
8433
|
-
if (!new RegExp(`${
|
|
8452
|
+
function ec(t) {
|
|
8453
|
+
if (!new RegExp(`${Vo}\\+`).test(t))
|
|
8434
8454
|
return {
|
|
8435
8455
|
pattern: t
|
|
8436
8456
|
};
|
|
@@ -8448,7 +8468,7 @@ function Zu(t) {
|
|
|
8448
8468
|
throw new Error(`Invalid quantifier "${i}"`);
|
|
8449
8469
|
let p = -1;
|
|
8450
8470
|
if (/^\{\d+\}$/.test(u))
|
|
8451
|
-
t =
|
|
8471
|
+
t = Yu(t, l + u.length, c, "");
|
|
8452
8472
|
else {
|
|
8453
8473
|
if (o === ")" || o === "]") {
|
|
8454
8474
|
const d = o === ")" ? n : r;
|
|
@@ -8467,8 +8487,8 @@ function Zu(t) {
|
|
|
8467
8487
|
pattern: t
|
|
8468
8488
|
};
|
|
8469
8489
|
}
|
|
8470
|
-
const Y = String.raw,
|
|
8471
|
-
function
|
|
8490
|
+
const Y = String.raw, tc = Y`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`, ln = Y`\(\?R=(?<rDepth>[^\)]+)\)|${tc}`, Et = Y`\(\?<(?![=!])(?<captureName>[^>]+)>`, qo = Y`${Et}|(?<unnamed>\()(?!\?)`, he = new RegExp(Y`${Et}|${ln}|\(\?|\\?.`, "gsu"), Gt = "Cannot use multiple overlapping recursions";
|
|
8491
|
+
function nc(t, e) {
|
|
8472
8492
|
const { hiddenCaptures: n, mode: r } = {
|
|
8473
8493
|
hiddenCaptures: [],
|
|
8474
8494
|
mode: "plugin",
|
|
@@ -8532,7 +8552,7 @@ function ec(t, e) {
|
|
|
8532
8552
|
}
|
|
8533
8553
|
if (!m)
|
|
8534
8554
|
throw new Error(Y`Recursive \g cannot be used outside the referenced group "${r === "external" ? C : Y`\g<${C}&R=${y}>`}"`);
|
|
8535
|
-
const _ = i.get(C), S =
|
|
8555
|
+
const _ = i.get(C), S = Zu(t, _);
|
|
8536
8556
|
if (a && nt(S, Y`${Et}|\((?!\?)`, J.DEFAULT))
|
|
8537
8557
|
throw new Error(
|
|
8538
8558
|
// When used in `external` mode by transpilers other than Regex+, backrefs might have
|
|
@@ -8583,7 +8603,7 @@ function wr(t) {
|
|
|
8583
8603
|
}
|
|
8584
8604
|
function Cr(t, e, n, r, o, s, a) {
|
|
8585
8605
|
const i = /* @__PURE__ */ new Set();
|
|
8586
|
-
r &&
|
|
8606
|
+
r && Wo(t + e, Et, ({ groups: { captureName: u } }) => {
|
|
8587
8607
|
i.add(u);
|
|
8588
8608
|
}, J.DEFAULT);
|
|
8589
8609
|
const l = [
|
|
@@ -8602,14 +8622,14 @@ function _r(t, e, n, r, o, s, a) {
|
|
|
8602
8622
|
const h = l(c);
|
|
8603
8623
|
u += En(
|
|
8604
8624
|
t,
|
|
8605
|
-
Y`${
|
|
8625
|
+
Y`${qo}|\\k<(?<backref>[^>]+)>`,
|
|
8606
8626
|
({ 0: p, groups: { captureName: d, unnamed: f, backref: g } }) => {
|
|
8607
8627
|
if (g && r && !r.has(g))
|
|
8608
8628
|
return p;
|
|
8609
8629
|
const C = `_$${h}`;
|
|
8610
8630
|
if (f || d) {
|
|
8611
8631
|
const y = a + s.length + 1;
|
|
8612
|
-
return s.push(y),
|
|
8632
|
+
return s.push(y), rc(o, y), f ? p : `(?<${d}${C}>`;
|
|
8613
8633
|
}
|
|
8614
8634
|
return Y`\k<${g}${C}>`;
|
|
8615
8635
|
},
|
|
@@ -8618,14 +8638,14 @@ function _r(t, e, n, r, o, s, a) {
|
|
|
8618
8638
|
}
|
|
8619
8639
|
return u;
|
|
8620
8640
|
}
|
|
8621
|
-
function
|
|
8641
|
+
function rc(t, e) {
|
|
8622
8642
|
for (let n = 0; n < t.length; n++)
|
|
8623
8643
|
t[n] >= e && t[n]++;
|
|
8624
8644
|
}
|
|
8625
8645
|
function Sr(t, e, n, r, o, s) {
|
|
8626
8646
|
if (t.size && r) {
|
|
8627
8647
|
let a = 0;
|
|
8628
|
-
|
|
8648
|
+
Wo(e, qo, () => a++, J.DEFAULT);
|
|
8629
8649
|
const i = s - a + o, l = /* @__PURE__ */ new Map();
|
|
8630
8650
|
return t.forEach((u, c) => {
|
|
8631
8651
|
const h = (r - a * n) / n, p = a * n, d = c > i + a ? c + r : c, f = [];
|
|
@@ -8684,7 +8704,7 @@ function Ve(t, e, n) {
|
|
|
8684
8704
|
function un(t, e) {
|
|
8685
8705
|
return kr[t] >= kr[e];
|
|
8686
8706
|
}
|
|
8687
|
-
function
|
|
8707
|
+
function oc(t, e) {
|
|
8688
8708
|
if (t == null)
|
|
8689
8709
|
throw new Error(e ?? "Value expected");
|
|
8690
8710
|
return t;
|
|
@@ -8693,7 +8713,7 @@ var kr = {
|
|
|
8693
8713
|
ES2025: 2025,
|
|
8694
8714
|
ES2024: 2024,
|
|
8695
8715
|
ES2018: 2018
|
|
8696
|
-
},
|
|
8716
|
+
}, sc = (
|
|
8697
8717
|
/** @type {const} */
|
|
8698
8718
|
{
|
|
8699
8719
|
auto: "auto",
|
|
@@ -8702,10 +8722,10 @@ var kr = {
|
|
|
8702
8722
|
ES2018: "ES2018"
|
|
8703
8723
|
}
|
|
8704
8724
|
);
|
|
8705
|
-
function
|
|
8725
|
+
function Xo(t = {}) {
|
|
8706
8726
|
if ({}.toString.call(t) !== "[object Object]")
|
|
8707
8727
|
throw new Error("Unexpected options");
|
|
8708
|
-
if (t.target !== void 0 && !
|
|
8728
|
+
if (t.target !== void 0 && !sc[t.target])
|
|
8709
8729
|
throw new Error(`Unexpected target "${t.target}"`);
|
|
8710
8730
|
const e = {
|
|
8711
8731
|
// Sets the level of emulation rigor/strictness.
|
|
@@ -8749,16 +8769,16 @@ function qo(t = {}) {
|
|
|
8749
8769
|
};
|
|
8750
8770
|
return e.target === "auto" && (e.target = ae.flagGroups ? "ES2025" : ae.unicodeSets ? "ES2024" : "ES2018"), e;
|
|
8751
8771
|
}
|
|
8752
|
-
var
|
|
8772
|
+
var ac = "[ -\r ]", ic = /* @__PURE__ */ new Set([
|
|
8753
8773
|
M(304),
|
|
8754
8774
|
// İ
|
|
8755
8775
|
M(305)
|
|
8756
8776
|
// ı
|
|
8757
8777
|
]), re = v`[\p{L}\p{M}\p{N}\p{Pc}]`;
|
|
8758
|
-
function
|
|
8759
|
-
if (
|
|
8778
|
+
function Ko(t) {
|
|
8779
|
+
if (ic.has(t))
|
|
8760
8780
|
return [t];
|
|
8761
|
-
const e = /* @__PURE__ */ new Set(), n = t.toLowerCase(), r = n.toUpperCase(), o =
|
|
8781
|
+
const e = /* @__PURE__ */ new Set(), n = t.toLowerCase(), r = n.toUpperCase(), o = cc.get(n), s = lc.get(n), a = uc.get(n);
|
|
8762
8782
|
return [...r].length === 1 && e.add(r), a && e.add(a), o && e.add(o), e.add(n), s && e.add(s), [...e];
|
|
8763
8783
|
}
|
|
8764
8784
|
var An = /* @__PURE__ */ new Map(
|
|
@@ -8853,12 +8873,12 @@ Variation_Selector VS
|
|
|
8853
8873
|
White_Space space
|
|
8854
8874
|
XID_Continue XIDC
|
|
8855
8875
|
XID_Start XIDS`.split(/\s/).map((t) => [xt(t), t])
|
|
8856
|
-
),
|
|
8876
|
+
), lc = /* @__PURE__ */ new Map([
|
|
8857
8877
|
["s", M(383)],
|
|
8858
8878
|
// s, ſ
|
|
8859
8879
|
[M(383), "s"]
|
|
8860
8880
|
// ſ, s
|
|
8861
|
-
]),
|
|
8881
|
+
]), uc = /* @__PURE__ */ new Map([
|
|
8862
8882
|
[M(223), M(7838)],
|
|
8863
8883
|
// ß, ẞ
|
|
8864
8884
|
[M(107), M(8490)],
|
|
@@ -8867,7 +8887,7 @@ XID_Start XIDS`.split(/\s/).map((t) => [xt(t), t])
|
|
|
8867
8887
|
// å, Å (Angstrom)
|
|
8868
8888
|
[M(969), M(8486)]
|
|
8869
8889
|
// ω, Ω (Ohm)
|
|
8870
|
-
]),
|
|
8890
|
+
]), cc = new Map([
|
|
8871
8891
|
ie(453),
|
|
8872
8892
|
ie(456),
|
|
8873
8893
|
ie(459),
|
|
@@ -8878,7 +8898,7 @@ XID_Start XIDS`.split(/\s/).map((t) => [xt(t), t])
|
|
|
8878
8898
|
ie(8124),
|
|
8879
8899
|
ie(8140),
|
|
8880
8900
|
ie(8188)
|
|
8881
|
-
]),
|
|
8901
|
+
]), hc = /* @__PURE__ */ new Map([
|
|
8882
8902
|
["alnum", v`[\p{Alpha}\p{Nd}]`],
|
|
8883
8903
|
["alpha", v`\p{Alpha}`],
|
|
8884
8904
|
["ascii", v`\p{ASCII}`],
|
|
@@ -8895,7 +8915,7 @@ XID_Start XIDS`.split(/\s/).map((t) => [xt(t), t])
|
|
|
8895
8915
|
["word", v`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],
|
|
8896
8916
|
["xdigit", v`\p{AHex}`]
|
|
8897
8917
|
]);
|
|
8898
|
-
function
|
|
8918
|
+
function fc(t, e) {
|
|
8899
8919
|
const n = [];
|
|
8900
8920
|
for (let r = t; r <= e; r++)
|
|
8901
8921
|
n.push(r);
|
|
@@ -8906,9 +8926,9 @@ function ie(t) {
|
|
|
8906
8926
|
return [e.toLowerCase(), e];
|
|
8907
8927
|
}
|
|
8908
8928
|
function Ft(t, e) {
|
|
8909
|
-
return
|
|
8929
|
+
return fc(t, e).map((n) => ie(n));
|
|
8910
8930
|
}
|
|
8911
|
-
var
|
|
8931
|
+
var Yo = /* @__PURE__ */ new Set([
|
|
8912
8932
|
"Lower",
|
|
8913
8933
|
"Lowercase",
|
|
8914
8934
|
"Upper",
|
|
@@ -8924,7 +8944,7 @@ var Ko = /* @__PURE__ */ new Set([
|
|
|
8924
8944
|
// generally extreme edge cases and using such properties case insensitively generally produces
|
|
8925
8945
|
// undesired behavior anyway
|
|
8926
8946
|
]);
|
|
8927
|
-
function
|
|
8947
|
+
function pc(t, e) {
|
|
8928
8948
|
const n = {
|
|
8929
8949
|
// A couple edge cases exist where options `accuracy` and `bestEffortTarget` are used:
|
|
8930
8950
|
// - `CharacterSet` kind `text_segment` (`\X`): An exact representation would require heavy
|
|
@@ -8938,7 +8958,7 @@ function hc(t, e) {
|
|
|
8938
8958
|
bestEffortTarget: "ES2025",
|
|
8939
8959
|
...e
|
|
8940
8960
|
};
|
|
8941
|
-
|
|
8961
|
+
Jo(t);
|
|
8942
8962
|
const r = {
|
|
8943
8963
|
accuracy: n.accuracy,
|
|
8944
8964
|
asciiWordBoundaries: n.asciiWordBoundaries,
|
|
@@ -8955,7 +8975,7 @@ function hc(t, e) {
|
|
|
8955
8975
|
spaceIsAscii: t.flags.spaceIsAscii,
|
|
8956
8976
|
wordIsAscii: t.flags.wordIsAscii
|
|
8957
8977
|
};
|
|
8958
|
-
Be(t,
|
|
8978
|
+
Be(t, dc, r);
|
|
8959
8979
|
const o = {
|
|
8960
8980
|
dotAll: t.flags.dotAll,
|
|
8961
8981
|
ignoreCase: t.flags.ignoreCase
|
|
@@ -8970,16 +8990,16 @@ function hc(t, e) {
|
|
|
8970
8990
|
reffedNodesByReferencer: /* @__PURE__ */ new Map(),
|
|
8971
8991
|
subroutineRefMap: r.subroutineRefMap
|
|
8972
8992
|
};
|
|
8973
|
-
Be(t,
|
|
8993
|
+
Be(t, gc, s);
|
|
8974
8994
|
const a = {
|
|
8975
8995
|
groupsByName: s.groupsByName,
|
|
8976
8996
|
highestOrphanBackref: 0,
|
|
8977
8997
|
numCapturesToLeft: 0,
|
|
8978
8998
|
reffedNodesByReferencer: s.reffedNodesByReferencer
|
|
8979
8999
|
};
|
|
8980
|
-
return Be(t,
|
|
9000
|
+
return Be(t, mc, a), t._originMap = s.groupOriginByCopy, t._strategy = r.strategy, t;
|
|
8981
9001
|
}
|
|
8982
|
-
var
|
|
9002
|
+
var dc = {
|
|
8983
9003
|
AbsenceFunction({ node: t, parent: e, replaceWith: n }) {
|
|
8984
9004
|
const { body: r, kind: o } = t;
|
|
8985
9005
|
if (o === "repeater") {
|
|
@@ -8991,7 +9011,7 @@ var fc = {
|
|
|
8991
9011
|
);
|
|
8992
9012
|
const a = Q();
|
|
8993
9013
|
a.body[0].body.push(
|
|
8994
|
-
|
|
9014
|
+
Uo("greedy", 0, 1 / 0, s)
|
|
8995
9015
|
), n(P(a, e), { traverse: !0 });
|
|
8996
9016
|
} else
|
|
8997
9017
|
throw new Error('Unsupported absence function "(?~|"');
|
|
@@ -9006,7 +9026,7 @@ var fc = {
|
|
|
9006
9026
|
},
|
|
9007
9027
|
exit({ node: t }, { flagDirectivesByAlt: e }) {
|
|
9008
9028
|
if (e.get(t)?.length) {
|
|
9009
|
-
const n =
|
|
9029
|
+
const n = Qo(e.get(t));
|
|
9010
9030
|
if (n) {
|
|
9011
9031
|
const r = Q({ flags: n });
|
|
9012
9032
|
r.body[0].body = t.body, t.body = [P(r, t)];
|
|
@@ -9031,7 +9051,7 @@ var fc = {
|
|
|
9031
9051
|
o.flags.sticky = !0, s();
|
|
9032
9052
|
else {
|
|
9033
9053
|
const f = r[n - 1];
|
|
9034
|
-
if (f &&
|
|
9054
|
+
if (f && Sc(f))
|
|
9035
9055
|
a(P(pe({ negate: !0 }), e));
|
|
9036
9056
|
else {
|
|
9037
9057
|
if (h)
|
|
@@ -9070,7 +9090,7 @@ var fc = {
|
|
|
9070
9090
|
return;
|
|
9071
9091
|
}
|
|
9072
9092
|
if (a && (l === "space" || c === "space")) {
|
|
9073
|
-
n(P(Ut(oe(
|
|
9093
|
+
n(P(Ut(oe(ac), u), e));
|
|
9074
9094
|
return;
|
|
9075
9095
|
}
|
|
9076
9096
|
if (i && (l === "word" || c === "word")) {
|
|
@@ -9108,7 +9128,7 @@ var fc = {
|
|
|
9108
9128
|
}[c];
|
|
9109
9129
|
u && (h = `\0-${M(h.codePointAt(0) - 1)}${M(h.codePointAt(2) + 1)}-`), n(P(oe(`[${h}]`), e));
|
|
9110
9130
|
} else
|
|
9111
|
-
n(P(Ut(oe(
|
|
9131
|
+
n(P(Ut(oe(hc.get(c)), u), e));
|
|
9112
9132
|
else if (l === "property")
|
|
9113
9133
|
An.has(xt(c)) || (t.key = "sc");
|
|
9114
9134
|
else if (l === "space")
|
|
@@ -9129,7 +9149,7 @@ var fc = {
|
|
|
9129
9149
|
}
|
|
9130
9150
|
else if (i === "keep") {
|
|
9131
9151
|
const u = n.body[0], h = n.body.length === 1 && // Not emulatable if within a `CapturingGroup`
|
|
9132
|
-
|
|
9152
|
+
Fo(u, { type: "Group" }) && u.body[0].body.length === 1 ? u.body[0] : n;
|
|
9133
9153
|
if (e.parent !== h || h.body.length > 1)
|
|
9134
9154
|
throw new Error(v`Uses "\K" in a way that's unsupported`);
|
|
9135
9155
|
const p = pe({ behind: !0 });
|
|
@@ -9216,7 +9236,7 @@ var fc = {
|
|
|
9216
9236
|
if (s.body.length === 1 && s.body[0].kind === "search_start")
|
|
9217
9237
|
s.body.pop();
|
|
9218
9238
|
else {
|
|
9219
|
-
const a =
|
|
9239
|
+
const a = ts(s.body);
|
|
9220
9240
|
a ? (r = !0, Array.isArray(a) ? n.push(...a) : n.push(a)) : o = !0;
|
|
9221
9241
|
}
|
|
9222
9242
|
r && !o && n.forEach((s) => e.add(s));
|
|
@@ -9230,7 +9250,7 @@ var fc = {
|
|
|
9230
9250
|
let { ref: n } = t;
|
|
9231
9251
|
typeof n == "string" && !jt(n) && (n = Bt(n, e), t.ref = n);
|
|
9232
9252
|
}
|
|
9233
|
-
},
|
|
9253
|
+
}, gc = {
|
|
9234
9254
|
Backreference({ node: t }, { multiplexCapturesToLeftByRef: e, reffedNodesByReferencer: n }) {
|
|
9235
9255
|
const { orphan: r, ref: o } = t;
|
|
9236
9256
|
r || n.set(t, [...e.get(o).map(({ node: s }) => s)]);
|
|
@@ -9306,27 +9326,27 @@ var fc = {
|
|
|
9306
9326
|
}
|
|
9307
9327
|
const a = r.subroutineRefMap.get(s), i = s === 0, l = i ? vr(0) : (
|
|
9308
9328
|
// The reffed group might itself contain subroutines, which are expanded during sub-traversal
|
|
9309
|
-
|
|
9329
|
+
Zo(a, r.groupOriginByCopy, null)
|
|
9310
9330
|
);
|
|
9311
9331
|
let u = l;
|
|
9312
9332
|
if (!i) {
|
|
9313
|
-
const c =
|
|
9333
|
+
const c = Qo(wc(
|
|
9314
9334
|
a,
|
|
9315
9335
|
(p) => p.type === "Group" && !!p.flags
|
|
9316
9336
|
)), h = c ? bt(r.globalFlags, c) : r.globalFlags;
|
|
9317
|
-
|
|
9318
|
-
flags:
|
|
9337
|
+
yc(h, r.currentFlags) || (u = Q({
|
|
9338
|
+
flags: Cc(h)
|
|
9319
9339
|
}), u.body[0].body.push(l));
|
|
9320
9340
|
}
|
|
9321
9341
|
n(P(u, e), { traverse: !i });
|
|
9322
9342
|
}
|
|
9323
|
-
},
|
|
9343
|
+
}, mc = {
|
|
9324
9344
|
Backreference({ node: t, parent: e, replaceWith: n }, r) {
|
|
9325
9345
|
if (t.orphan) {
|
|
9326
9346
|
r.highestOrphanBackref = Math.max(r.highestOrphanBackref, t.ref);
|
|
9327
9347
|
return;
|
|
9328
9348
|
}
|
|
9329
|
-
const s = r.reffedNodesByReferencer.get(t).filter((a) =>
|
|
9349
|
+
const s = r.reffedNodesByReferencer.get(t).filter((a) => bc(a, t));
|
|
9330
9350
|
if (!s.length)
|
|
9331
9351
|
n(P(pe({ negate: !0 }), e));
|
|
9332
9352
|
else if (s.length > 1) {
|
|
@@ -9347,7 +9367,7 @@ var fc = {
|
|
|
9347
9367
|
exit({ node: t }, e) {
|
|
9348
9368
|
const n = Math.max(e.highestOrphanBackref - e.numCapturesToLeft, 0);
|
|
9349
9369
|
for (let r = 0; r < n; r++) {
|
|
9350
|
-
const o =
|
|
9370
|
+
const o = jo();
|
|
9351
9371
|
t.body.at(-1).body.push(o);
|
|
9352
9372
|
}
|
|
9353
9373
|
}
|
|
@@ -9356,17 +9376,17 @@ var fc = {
|
|
|
9356
9376
|
!t.isRecursive || t.ref === 0 || (t.ref = e.reffedNodesByReferencer.get(t).number);
|
|
9357
9377
|
}
|
|
9358
9378
|
};
|
|
9359
|
-
function
|
|
9379
|
+
function Jo(t) {
|
|
9360
9380
|
Be(t, {
|
|
9361
9381
|
"*"({ node: e, parent: n }) {
|
|
9362
9382
|
e.parent = n;
|
|
9363
9383
|
}
|
|
9364
9384
|
});
|
|
9365
9385
|
}
|
|
9366
|
-
function
|
|
9386
|
+
function yc(t, e) {
|
|
9367
9387
|
return t.dotAll === e.dotAll && t.ignoreCase === e.ignoreCase;
|
|
9368
9388
|
}
|
|
9369
|
-
function
|
|
9389
|
+
function bc(t, e) {
|
|
9370
9390
|
let n = e;
|
|
9371
9391
|
do {
|
|
9372
9392
|
if (n.type === "Regex")
|
|
@@ -9375,27 +9395,27 @@ function mc(t, e) {
|
|
|
9375
9395
|
continue;
|
|
9376
9396
|
if (n === t)
|
|
9377
9397
|
return !1;
|
|
9378
|
-
const r =
|
|
9398
|
+
const r = es(n.parent);
|
|
9379
9399
|
for (const o of r) {
|
|
9380
9400
|
if (o === n)
|
|
9381
9401
|
break;
|
|
9382
|
-
if (o === t ||
|
|
9402
|
+
if (o === t || ns(o, t))
|
|
9383
9403
|
return !0;
|
|
9384
9404
|
}
|
|
9385
9405
|
} while (n = n.parent);
|
|
9386
9406
|
throw new Error("Unexpected path");
|
|
9387
9407
|
}
|
|
9388
|
-
function
|
|
9408
|
+
function Zo(t, e, n, r) {
|
|
9389
9409
|
const o = Array.isArray(t) ? [] : {};
|
|
9390
9410
|
for (const [s, a] of Object.entries(t))
|
|
9391
|
-
s === "parent" ? o.parent = Array.isArray(n) ? r : n : a && typeof a == "object" ? o[s] =
|
|
9411
|
+
s === "parent" ? o.parent = Array.isArray(n) ? r : n : a && typeof a == "object" ? o[s] = Zo(a, e, o, n) : (s === "type" && a === "CapturingGroup" && e.set(o, e.get(t) ?? t), o[s] = a);
|
|
9392
9412
|
return o;
|
|
9393
9413
|
}
|
|
9394
9414
|
function vr(t) {
|
|
9395
|
-
const e =
|
|
9415
|
+
const e = zo(t);
|
|
9396
9416
|
return e.isRecursive = !0, e;
|
|
9397
9417
|
}
|
|
9398
|
-
function
|
|
9418
|
+
function wc(t, e) {
|
|
9399
9419
|
const n = [];
|
|
9400
9420
|
for (; t = t.parent; )
|
|
9401
9421
|
(!e || e(t)) && n.push(t);
|
|
@@ -9407,7 +9427,7 @@ function Bt(t, e) {
|
|
|
9407
9427
|
const n = `$${e.size}_${t.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug, "_")}`;
|
|
9408
9428
|
return e.set(t, n), n;
|
|
9409
9429
|
}
|
|
9410
|
-
function
|
|
9430
|
+
function Qo(t) {
|
|
9411
9431
|
const e = ["dotAll", "ignoreCase"], n = { enable: {}, disable: {} };
|
|
9412
9432
|
return t.forEach(({ flags: r }) => {
|
|
9413
9433
|
e.forEach((o) => {
|
|
@@ -9415,18 +9435,18 @@ function Zo(t) {
|
|
|
9415
9435
|
});
|
|
9416
9436
|
}), Object.keys(n.enable).length || delete n.enable, Object.keys(n.disable).length || delete n.disable, n.enable || n.disable ? n : null;
|
|
9417
9437
|
}
|
|
9418
|
-
function
|
|
9438
|
+
function Cc({ dotAll: t, ignoreCase: e }) {
|
|
9419
9439
|
const n = {};
|
|
9420
9440
|
return (t || e) && (n.enable = {}, t && (n.enable.dotAll = !0), e && (n.enable.ignoreCase = !0)), (!t || !e) && (n.disable = {}, !t && (n.disable.dotAll = !0), !e && (n.disable.ignoreCase = !0)), n;
|
|
9421
9441
|
}
|
|
9422
|
-
function
|
|
9442
|
+
function es(t) {
|
|
9423
9443
|
if (!t)
|
|
9424
9444
|
throw new Error("Node expected");
|
|
9425
9445
|
const { body: e } = t;
|
|
9426
9446
|
return Array.isArray(e) ? e : e ? [e] : null;
|
|
9427
9447
|
}
|
|
9428
|
-
function
|
|
9429
|
-
const e = t.find((n) => n.kind === "search_start" ||
|
|
9448
|
+
function ts(t) {
|
|
9449
|
+
const e = t.find((n) => n.kind === "search_start" || kc(n, { negate: !1 }) || !_c(n));
|
|
9430
9450
|
if (!e)
|
|
9431
9451
|
return null;
|
|
9432
9452
|
if (e.kind === "search_start")
|
|
@@ -9436,7 +9456,7 @@ function es(t) {
|
|
|
9436
9456
|
if (e.type === "CapturingGroup" || e.type === "Group") {
|
|
9437
9457
|
const n = [];
|
|
9438
9458
|
for (const r of e.body) {
|
|
9439
|
-
const o =
|
|
9459
|
+
const o = ts(r.body);
|
|
9440
9460
|
if (!o)
|
|
9441
9461
|
return null;
|
|
9442
9462
|
Array.isArray(o) ? n.push(...o) : n.push(o);
|
|
@@ -9445,17 +9465,17 @@ function es(t) {
|
|
|
9445
9465
|
}
|
|
9446
9466
|
return null;
|
|
9447
9467
|
}
|
|
9448
|
-
function
|
|
9449
|
-
const n =
|
|
9468
|
+
function ns(t, e) {
|
|
9469
|
+
const n = es(t) ?? [];
|
|
9450
9470
|
for (const r of n)
|
|
9451
|
-
if (r === e ||
|
|
9471
|
+
if (r === e || ns(r, e))
|
|
9452
9472
|
return !0;
|
|
9453
9473
|
return !1;
|
|
9454
9474
|
}
|
|
9455
|
-
function
|
|
9475
|
+
function _c({ type: t }) {
|
|
9456
9476
|
return t === "Assertion" || t === "Directive" || t === "LookaroundAssertion";
|
|
9457
9477
|
}
|
|
9458
|
-
function
|
|
9478
|
+
function Sc(t) {
|
|
9459
9479
|
const e = [
|
|
9460
9480
|
"Character",
|
|
9461
9481
|
"CharacterClass",
|
|
@@ -9463,12 +9483,12 @@ function Cc(t) {
|
|
|
9463
9483
|
];
|
|
9464
9484
|
return e.includes(t.type) || t.type === "Quantifier" && t.min && e.includes(t.body.type);
|
|
9465
9485
|
}
|
|
9466
|
-
function
|
|
9486
|
+
function kc(t, e) {
|
|
9467
9487
|
const n = {
|
|
9468
9488
|
negate: null,
|
|
9469
9489
|
...e
|
|
9470
9490
|
};
|
|
9471
|
-
return t.type === "LookaroundAssertion" && (n.negate === null || t.negate === n.negate) && t.body.length === 1 &&
|
|
9491
|
+
return t.type === "LookaroundAssertion" && (n.negate === null || t.negate === n.negate) && t.body.length === 1 && Fo(t.body[0], {
|
|
9472
9492
|
type: "Assertion",
|
|
9473
9493
|
kind: "search_start"
|
|
9474
9494
|
});
|
|
@@ -9477,7 +9497,7 @@ function jt(t) {
|
|
|
9477
9497
|
return /^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(t);
|
|
9478
9498
|
}
|
|
9479
9499
|
function oe(t, e) {
|
|
9480
|
-
const r =
|
|
9500
|
+
const r = Bo(t, {
|
|
9481
9501
|
...e,
|
|
9482
9502
|
// Providing a custom set of Unicode property names avoids converting some JS Unicode
|
|
9483
9503
|
// properties (ex: `\p{Alpha}`) to Onig POSIX classes
|
|
@@ -9492,16 +9512,16 @@ function le(t, e) {
|
|
|
9492
9512
|
return t.parent = e, t;
|
|
9493
9513
|
}
|
|
9494
9514
|
function P(t, e) {
|
|
9495
|
-
return
|
|
9515
|
+
return Jo(t), t.parent = e, t;
|
|
9496
9516
|
}
|
|
9497
|
-
function
|
|
9498
|
-
const n =
|
|
9517
|
+
function vc(t, e) {
|
|
9518
|
+
const n = Xo(e), r = un(n.target, "ES2024"), o = un(n.target, "ES2025"), s = n.rules.recursionLimit;
|
|
9499
9519
|
if (!Number.isInteger(s) || s < 2 || s > 20)
|
|
9500
9520
|
throw new Error("Invalid recursionLimit; use 2-20");
|
|
9501
9521
|
let a = null, i = null;
|
|
9502
9522
|
if (!o) {
|
|
9503
9523
|
const d = [t.flags.ignoreCase];
|
|
9504
|
-
Be(t,
|
|
9524
|
+
Be(t, xc, {
|
|
9505
9525
|
getCurrentModI: () => d.at(-1),
|
|
9506
9526
|
popModI() {
|
|
9507
9527
|
d.pop();
|
|
@@ -9541,7 +9561,7 @@ function Sc(t, e) {
|
|
|
9541
9561
|
verbose: n.verbose
|
|
9542
9562
|
};
|
|
9543
9563
|
function h(d) {
|
|
9544
|
-
return c.lastNode = u, u = d,
|
|
9564
|
+
return c.lastNode = u, u = d, oc(Ec[d.type], `Unexpected node type "${d.type}"`)(d, c, h);
|
|
9545
9565
|
}
|
|
9546
9566
|
const p = {
|
|
9547
9567
|
pattern: t.body.map(h).join("|"),
|
|
@@ -9553,7 +9573,7 @@ function Sc(t, e) {
|
|
|
9553
9573
|
d.hidden && p._hiddenCaptures.push(f), d.transferTo && Ve(p._captureTransfers, d.transferTo, []).push(f);
|
|
9554
9574
|
}), p;
|
|
9555
9575
|
}
|
|
9556
|
-
var
|
|
9576
|
+
var xc = {
|
|
9557
9577
|
"*": {
|
|
9558
9578
|
enter({ node: t }, e) {
|
|
9559
9579
|
if (Er(t)) {
|
|
@@ -9574,12 +9594,12 @@ var kc = {
|
|
|
9574
9594
|
Rn(M(t.value)) && e.setHasCasedChar();
|
|
9575
9595
|
},
|
|
9576
9596
|
CharacterClassRange({ node: t, skip: e }, n) {
|
|
9577
|
-
e(),
|
|
9597
|
+
e(), rs(t, { firstOnly: !0 }).length && n.setHasCasedChar();
|
|
9578
9598
|
},
|
|
9579
9599
|
CharacterSet({ node: t }, e) {
|
|
9580
|
-
t.kind === "property" &&
|
|
9600
|
+
t.kind === "property" && Yo.has(t.value) && e.setHasCasedChar();
|
|
9581
9601
|
}
|
|
9582
|
-
},
|
|
9602
|
+
}, Ec = {
|
|
9583
9603
|
/**
|
|
9584
9604
|
@param {AlternativeNode} node
|
|
9585
9605
|
*/
|
|
@@ -9627,7 +9647,7 @@ var kc = {
|
|
|
9627
9647
|
if (r !== n)
|
|
9628
9648
|
return r;
|
|
9629
9649
|
if (e.useAppliedIgnoreCase && e.currentFlags.ignoreCase && Rn(n)) {
|
|
9630
|
-
const o =
|
|
9650
|
+
const o = Ko(n);
|
|
9631
9651
|
return e.inCharClass ? o.join("") : o.length > 1 ? `[${o.join("")}]` : o[0];
|
|
9632
9652
|
}
|
|
9633
9653
|
return n;
|
|
@@ -9684,8 +9704,8 @@ var kc = {
|
|
|
9684
9704
|
useFlagV: e.useFlagV
|
|
9685
9705
|
}, s = _e(n, o), a = _e(r, o), i = /* @__PURE__ */ new Set();
|
|
9686
9706
|
if (e.useAppliedIgnoreCase && e.currentFlags.ignoreCase) {
|
|
9687
|
-
const l =
|
|
9688
|
-
|
|
9707
|
+
const l = rs(t);
|
|
9708
|
+
Lc(l).forEach((c) => {
|
|
9689
9709
|
i.add(
|
|
9690
9710
|
Array.isArray(c) ? `${_e(c[0], o)}-${_e(c[1], o)}` : _e(c, o)
|
|
9691
9711
|
);
|
|
@@ -9705,7 +9725,7 @@ var kc = {
|
|
|
9705
9725
|
if (t === "digit")
|
|
9706
9726
|
return e ? v`\D` : v`\d`;
|
|
9707
9727
|
if (t === "property") {
|
|
9708
|
-
if (o.useAppliedIgnoreCase && o.currentFlags.ignoreCase &&
|
|
9728
|
+
if (o.useAppliedIgnoreCase && o.currentFlags.ignoreCase && Yo.has(n))
|
|
9709
9729
|
throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);
|
|
9710
9730
|
return `${e ? v`\P` : v`\p`}{${r ? `${r}=` : ""}${n}}`;
|
|
9711
9731
|
}
|
|
@@ -9733,7 +9753,7 @@ var kc = {
|
|
|
9733
9753
|
const a = o.currentFlags;
|
|
9734
9754
|
n && (o.currentFlags = bt(a, n));
|
|
9735
9755
|
const i = e.map(s).join("|"), l = !o.verbose && e.length === 1 && // Single alt
|
|
9736
|
-
r.type !== "Quantifier" && !t && (!o.useFlagMods || !n) ? i : `(?${
|
|
9756
|
+
r.type !== "Quantifier" && !t && (!o.useFlagMods || !n) ? i : `(?${Pc(t, n, o.useFlagMods)}${i})`;
|
|
9737
9757
|
return o.currentFlags = a, l;
|
|
9738
9758
|
},
|
|
9739
9759
|
/**
|
|
@@ -9746,7 +9766,7 @@ var kc = {
|
|
|
9746
9766
|
@param {QuantifierNode} node
|
|
9747
9767
|
*/
|
|
9748
9768
|
Quantifier(t, e, n) {
|
|
9749
|
-
return n(t.body) +
|
|
9769
|
+
return n(t.body) + $c(t);
|
|
9750
9770
|
},
|
|
9751
9771
|
/**
|
|
9752
9772
|
@param {SubroutineNode & {isRecursive: true}} node
|
|
@@ -9757,7 +9777,7 @@ var kc = {
|
|
|
9757
9777
|
const r = n.recursionLimit;
|
|
9758
9778
|
return e === 0 ? `(?R=${r})` : v`\g<${e}&R=${r}>`;
|
|
9759
9779
|
}
|
|
9760
|
-
},
|
|
9780
|
+
}, Ac = /* @__PURE__ */ new Set([
|
|
9761
9781
|
"$",
|
|
9762
9782
|
"(",
|
|
9763
9783
|
")",
|
|
@@ -9772,7 +9792,7 @@ var kc = {
|
|
|
9772
9792
|
"{",
|
|
9773
9793
|
"|",
|
|
9774
9794
|
"}"
|
|
9775
|
-
]),
|
|
9795
|
+
]), Rc = /* @__PURE__ */ new Set([
|
|
9776
9796
|
"-",
|
|
9777
9797
|
"\\",
|
|
9778
9798
|
"]",
|
|
@@ -9780,7 +9800,7 @@ var kc = {
|
|
|
9780
9800
|
// Literal `[` doesn't require escaping with flag u, but this can help work around regex source
|
|
9781
9801
|
// linters and regex syntax processors that expect unescaped `[` to create a nested class
|
|
9782
9802
|
"["
|
|
9783
|
-
]),
|
|
9803
|
+
]), Ic = /* @__PURE__ */ new Set([
|
|
9784
9804
|
"(",
|
|
9785
9805
|
")",
|
|
9786
9806
|
"-",
|
|
@@ -9828,11 +9848,11 @@ var kc = {
|
|
|
9828
9848
|
// paragraph separator
|
|
9829
9849
|
[65279, v`\uFEFF`]
|
|
9830
9850
|
// ZWNBSP/BOM
|
|
9831
|
-
]),
|
|
9851
|
+
]), Nc = /^\p{Cased}$/u;
|
|
9832
9852
|
function Rn(t) {
|
|
9833
|
-
return
|
|
9853
|
+
return Nc.test(t);
|
|
9834
9854
|
}
|
|
9835
|
-
function
|
|
9855
|
+
function rs(t, e) {
|
|
9836
9856
|
const n = !!e?.firstOnly, r = t.min.value, o = t.max.value, s = [];
|
|
9837
9857
|
if (r < 65 && (o === 65535 || o >= 131071) || r === 65536 && o >= 131071)
|
|
9838
9858
|
return s;
|
|
@@ -9840,7 +9860,7 @@ function ns(t, e) {
|
|
|
9840
9860
|
const i = M(a);
|
|
9841
9861
|
if (!Rn(i))
|
|
9842
9862
|
continue;
|
|
9843
|
-
const l =
|
|
9863
|
+
const l = Ko(i).filter((u) => {
|
|
9844
9864
|
const c = u.codePointAt(0);
|
|
9845
9865
|
return c < r || c > o;
|
|
9846
9866
|
});
|
|
@@ -9856,20 +9876,20 @@ function _e(t, { escDigit: e, inCharClass: n, useFlagV: r }) {
|
|
|
9856
9876
|
// Control chars, etc.; condition modeled on the Chrome developer console's display for strings
|
|
9857
9877
|
t < 32 || t > 126 && t < 160 || // Unicode planes 4-16; unassigned, special purpose, and private use area
|
|
9858
9878
|
t > 262143 || // Avoid corrupting a preceding backref by immediately following it with a literal digit
|
|
9859
|
-
e &&
|
|
9879
|
+
e && Tc(t)
|
|
9860
9880
|
)
|
|
9861
9881
|
return t > 255 ? `\\u{${t.toString(16).toUpperCase()}}` : `\\x${t.toString(16).toUpperCase().padStart(2, "0")}`;
|
|
9862
|
-
const o = n ? r ?
|
|
9882
|
+
const o = n ? r ? Ic : Rc : Ac, s = M(t);
|
|
9863
9883
|
return (o.has(s) ? "\\" : "") + s;
|
|
9864
9884
|
}
|
|
9865
|
-
function
|
|
9885
|
+
function Lc(t) {
|
|
9866
9886
|
const e = t.map((o) => o.codePointAt(0)).sort((o, s) => o - s), n = [];
|
|
9867
9887
|
let r = null;
|
|
9868
9888
|
for (let o = 0; o < e.length; o++)
|
|
9869
9889
|
e[o + 1] === e[o] + 1 ? r ??= e[o] : r === null ? n.push(e[o]) : (n.push([r, e[o]]), r = null);
|
|
9870
9890
|
return n;
|
|
9871
9891
|
}
|
|
9872
|
-
function
|
|
9892
|
+
function Pc(t, e, n) {
|
|
9873
9893
|
if (t)
|
|
9874
9894
|
return ">";
|
|
9875
9895
|
let r = "";
|
|
@@ -9879,7 +9899,7 @@ function Nc(t, e, n) {
|
|
|
9879
9899
|
}
|
|
9880
9900
|
return `${r}:`;
|
|
9881
9901
|
}
|
|
9882
|
-
function
|
|
9902
|
+
function $c({ kind: t, max: e, min: n }) {
|
|
9883
9903
|
let r;
|
|
9884
9904
|
return !n && e === 1 ? r = "?" : !n && e === 1 / 0 ? r = "*" : n === 1 && e === 1 / 0 ? r = "+" : n === e ? r = `{${n}}` : r = `{${n},${e === 1 / 0 ? "" : e}}`, r + {
|
|
9885
9905
|
greedy: "",
|
|
@@ -9890,13 +9910,13 @@ function Lc({ kind: t, max: e, min: n }) {
|
|
|
9890
9910
|
function Er({ type: t }) {
|
|
9891
9911
|
return t === "CapturingGroup" || t === "Group" || t === "LookaroundAssertion";
|
|
9892
9912
|
}
|
|
9893
|
-
function
|
|
9913
|
+
function Tc(t) {
|
|
9894
9914
|
return t > 47 && t < 58;
|
|
9895
9915
|
}
|
|
9896
9916
|
function Ar({ type: t, value: e }) {
|
|
9897
9917
|
return t === "Character" && e === 45;
|
|
9898
9918
|
}
|
|
9899
|
-
var
|
|
9919
|
+
var Mc = class cn extends RegExp {
|
|
9900
9920
|
/**
|
|
9901
9921
|
@type {Map<number, {
|
|
9902
9922
|
hidden?: true;
|
|
@@ -9954,7 +9974,7 @@ var $c = class cn extends RegExp {
|
|
|
9954
9974
|
transfers: [],
|
|
9955
9975
|
...r
|
|
9956
9976
|
};
|
|
9957
|
-
super(o ? "" : e, n), this.#r = e, this.#t =
|
|
9977
|
+
super(o ? "" : e, n), this.#r = e, this.#t = Dc(s.hiddenCaptures, s.transfers), this.#o = s.strategy, this.rawOptions = r ?? {};
|
|
9958
9978
|
}
|
|
9959
9979
|
o || (this.#e = this);
|
|
9960
9980
|
}
|
|
@@ -9973,7 +9993,7 @@ var $c = class cn extends RegExp {
|
|
|
9973
9993
|
if (this.#o === "clip_search" && n && r) {
|
|
9974
9994
|
this.lastIndex = 0;
|
|
9975
9995
|
const o = this.#s(e.slice(r));
|
|
9976
|
-
return o && (
|
|
9996
|
+
return o && (Oc(o, r, e, this.hasIndices), this.lastIndex += r), o;
|
|
9977
9997
|
}
|
|
9978
9998
|
return this.#s(e);
|
|
9979
9999
|
}
|
|
@@ -9999,7 +10019,7 @@ var $c = class cn extends RegExp {
|
|
|
9999
10019
|
if (!u)
|
|
10000
10020
|
throw new Error(`Invalid capture transfer to "${u}"`);
|
|
10001
10021
|
if (n[u] = r[a], this.hasIndices && (n.indices[u] = o[a]), n.groups) {
|
|
10002
|
-
this.#n || (this.#n =
|
|
10022
|
+
this.#n || (this.#n = Gc(this.source));
|
|
10003
10023
|
const c = this.#n.get(l);
|
|
10004
10024
|
c && (n.groups[c] = r[a], this.hasIndices && (n.indices.groups[c] = o[a]));
|
|
10005
10025
|
}
|
|
@@ -10008,7 +10028,7 @@ var $c = class cn extends RegExp {
|
|
|
10008
10028
|
return n;
|
|
10009
10029
|
}
|
|
10010
10030
|
};
|
|
10011
|
-
function
|
|
10031
|
+
function Oc(t, e, n, r) {
|
|
10012
10032
|
if (t.index += e, t.input = n, r) {
|
|
10013
10033
|
const o = t.indices;
|
|
10014
10034
|
for (let a = 0; a < o.length; a++) {
|
|
@@ -10022,7 +10042,7 @@ function Tc(t, e, n, r) {
|
|
|
10022
10042
|
});
|
|
10023
10043
|
}
|
|
10024
10044
|
}
|
|
10025
|
-
function
|
|
10045
|
+
function Dc(t, e) {
|
|
10026
10046
|
const n = /* @__PURE__ */ new Map();
|
|
10027
10047
|
for (const r of t)
|
|
10028
10048
|
n.set(r, {
|
|
@@ -10033,7 +10053,7 @@ function Mc(t, e) {
|
|
|
10033
10053
|
Ve(n, s, {}).transferTo = r;
|
|
10034
10054
|
return n;
|
|
10035
10055
|
}
|
|
10036
|
-
function
|
|
10056
|
+
function Gc(t) {
|
|
10037
10057
|
const e = /(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu, n = /* @__PURE__ */ new Map();
|
|
10038
10058
|
let r = 0, o = 0, s;
|
|
10039
10059
|
for (; s = e.exec(t); ) {
|
|
@@ -10042,12 +10062,12 @@ function Oc(t) {
|
|
|
10042
10062
|
}
|
|
10043
10063
|
return n;
|
|
10044
10064
|
}
|
|
10045
|
-
function
|
|
10046
|
-
const n =
|
|
10047
|
-
return n.options ? new
|
|
10065
|
+
function Fc(t, e) {
|
|
10066
|
+
const n = Bc(t, e);
|
|
10067
|
+
return n.options ? new Mc(n.pattern, n.flags, n.options) : new RegExp(n.pattern, n.flags);
|
|
10048
10068
|
}
|
|
10049
|
-
function
|
|
10050
|
-
const n =
|
|
10069
|
+
function Bc(t, e) {
|
|
10070
|
+
const n = Xo(e), r = Bo(t, {
|
|
10051
10071
|
flags: n.flags,
|
|
10052
10072
|
normalizeUnknownPropertyNames: !0,
|
|
10053
10073
|
rules: {
|
|
@@ -10056,16 +10076,16 @@ function Gc(t, e) {
|
|
|
10056
10076
|
},
|
|
10057
10077
|
skipBackrefValidation: n.rules.allowOrphanBackrefs,
|
|
10058
10078
|
unicodePropertyMap: An
|
|
10059
|
-
}), o =
|
|
10079
|
+
}), o = pc(r, {
|
|
10060
10080
|
accuracy: n.accuracy,
|
|
10061
10081
|
asciiWordBoundaries: n.rules.asciiWordBoundaries,
|
|
10062
10082
|
avoidSubclass: n.avoidSubclass,
|
|
10063
10083
|
bestEffortTarget: n.target
|
|
10064
|
-
}), s =
|
|
10084
|
+
}), s = vc(o, n), a = nc(s.pattern, {
|
|
10065
10085
|
captureTransfers: s._captureTransfers,
|
|
10066
10086
|
hiddenCaptures: s._hiddenCaptures,
|
|
10067
10087
|
mode: "external"
|
|
10068
|
-
}), i =
|
|
10088
|
+
}), i = ec(a.pattern), l = Qu(i.pattern, {
|
|
10069
10089
|
captureTransfers: a.captureTransfers,
|
|
10070
10090
|
hiddenCaptures: a.hiddenCaptures
|
|
10071
10091
|
}), u = {
|
|
@@ -10087,7 +10107,7 @@ function Gc(t, e) {
|
|
|
10087
10107
|
return u;
|
|
10088
10108
|
}
|
|
10089
10109
|
const Rr = 4294967295;
|
|
10090
|
-
class
|
|
10110
|
+
class jc {
|
|
10091
10111
|
constructor(e, n = {}) {
|
|
10092
10112
|
this.patterns = e, this.options = n;
|
|
10093
10113
|
const {
|
|
@@ -10161,8 +10181,8 @@ class Fc {
|
|
|
10161
10181
|
return null;
|
|
10162
10182
|
}
|
|
10163
10183
|
}
|
|
10164
|
-
function
|
|
10165
|
-
return
|
|
10184
|
+
function Uc(t, e) {
|
|
10185
|
+
return Fc(
|
|
10166
10186
|
t,
|
|
10167
10187
|
{
|
|
10168
10188
|
global: !0,
|
|
@@ -10188,7 +10208,7 @@ function Bc(t, e) {
|
|
|
10188
10208
|
}
|
|
10189
10209
|
);
|
|
10190
10210
|
}
|
|
10191
|
-
function
|
|
10211
|
+
function zc(t = {}) {
|
|
10192
10212
|
const e = Object.assign(
|
|
10193
10213
|
{
|
|
10194
10214
|
target: "auto",
|
|
@@ -10196,9 +10216,9 @@ function jc(t = {}) {
|
|
|
10196
10216
|
},
|
|
10197
10217
|
t
|
|
10198
10218
|
);
|
|
10199
|
-
return e.regexConstructor ||= (n) =>
|
|
10219
|
+
return e.regexConstructor ||= (n) => Uc(n, { target: e.target }), {
|
|
10200
10220
|
createScanner(n) {
|
|
10201
|
-
return new
|
|
10221
|
+
return new jc(n, e);
|
|
10202
10222
|
},
|
|
10203
10223
|
createString(n) {
|
|
10204
10224
|
return {
|
|
@@ -10207,8 +10227,8 @@ function jc(t = {}) {
|
|
|
10207
10227
|
}
|
|
10208
10228
|
};
|
|
10209
10229
|
}
|
|
10210
|
-
const
|
|
10211
|
-
engine:
|
|
10230
|
+
const Hc = "overflow-x-auto scrollbar not-inline", Wc = zc({ forgiving: !0 }), Vc = await ql({
|
|
10231
|
+
engine: Wc,
|
|
10212
10232
|
langAlias: {
|
|
10213
10233
|
markup: "html",
|
|
10214
10234
|
svg: "xml",
|
|
@@ -10228,7 +10248,7 @@ const Uc = jc({ forgiving: !0 }), zc = await Wl({
|
|
|
10228
10248
|
fallbackLanguage: "text",
|
|
10229
10249
|
inline: "tailing-curly-colon",
|
|
10230
10250
|
addLanguageClass: !0,
|
|
10231
|
-
transformers: [
|
|
10251
|
+
transformers: [eu(), nu()],
|
|
10232
10252
|
parseMetaString: (t) => {
|
|
10233
10253
|
const e = t.matchAll(
|
|
10234
10254
|
/([a-z0-9]+)(?:=(["'])(.*?)\2|=(.*?)(?:\s|$)|(?:\s|$))/gi
|
|
@@ -10240,66 +10260,77 @@ const Uc = jc({ forgiving: !0 }), zc = await Wl({
|
|
|
10240
10260
|
})
|
|
10241
10261
|
);
|
|
10242
10262
|
}
|
|
10243
|
-
},
|
|
10244
|
-
|
|
10263
|
+
}, qc = () => (t) => {
|
|
10264
|
+
Xr(t, "element", (e, n, r) => {
|
|
10245
10265
|
if (e.tagName !== "code") return;
|
|
10246
10266
|
const o = r?.type === "element" && r.tagName === "pre";
|
|
10247
10267
|
e.properties.inline = JSON.stringify(!o), o && (e.properties = {
|
|
10248
10268
|
...e.properties,
|
|
10249
10269
|
...structuredClone(r.properties),
|
|
10250
|
-
class:
|
|
10270
|
+
class: Ir(e.properties.class, r.properties.class)
|
|
10251
10271
|
}, r.properties = {});
|
|
10252
10272
|
});
|
|
10253
|
-
},
|
|
10273
|
+
}, ph = (t = wt.themes, e = Vc) => [
|
|
10254
10274
|
[
|
|
10255
|
-
|
|
10275
|
+
Zl,
|
|
10256
10276
|
e,
|
|
10257
10277
|
{ ...wt, themes: t }
|
|
10258
10278
|
],
|
|
10259
|
-
|
|
10260
|
-
],
|
|
10279
|
+
qc
|
|
10280
|
+
], Xc = (t, e, n = "text", r = wt.themes) => {
|
|
10261
10281
|
const o = t.codeToHast(e, {
|
|
10262
10282
|
lang: n,
|
|
10263
10283
|
...wt,
|
|
10264
10284
|
themes: r
|
|
10265
10285
|
});
|
|
10266
|
-
return
|
|
10267
|
-
|
|
10286
|
+
return Gs(o, {
|
|
10287
|
+
Fragment: ss,
|
|
10288
|
+
jsx: at.jsx,
|
|
10289
|
+
jsxs: at.jsxs,
|
|
10290
|
+
components: {
|
|
10291
|
+
code: (s) => os("code", {
|
|
10292
|
+
...s,
|
|
10293
|
+
className: Ir(s.className, Hc)
|
|
10294
|
+
})
|
|
10295
|
+
}
|
|
10296
|
+
});
|
|
10297
|
+
}, Kc = as(
|
|
10268
10298
|
({ code: t, children: e, embedded: n, ...r }) => {
|
|
10269
|
-
const { syntaxHighlighting: o } =
|
|
10270
|
-
|
|
10271
|
-
const s =
|
|
10299
|
+
const { syntaxHighlighting: o } = is().options;
|
|
10300
|
+
us(o?.highlighter, "Highlighter not found");
|
|
10301
|
+
const s = Xc(
|
|
10272
10302
|
o.highlighter,
|
|
10273
10303
|
t ?? e,
|
|
10274
10304
|
r.language,
|
|
10275
10305
|
o.themes
|
|
10276
10306
|
);
|
|
10277
|
-
return n ? /* @__PURE__ */ at.jsx(
|
|
10307
|
+
return n ? /* @__PURE__ */ at.jsx(hs, { ...r, children: s }) : /* @__PURE__ */ at.jsx(cs, { ...r, children: s });
|
|
10278
10308
|
}
|
|
10279
10309
|
);
|
|
10280
|
-
|
|
10310
|
+
Kc.displayName = "SyntaxHighlight";
|
|
10281
10311
|
export {
|
|
10282
10312
|
Fn as E,
|
|
10283
|
-
|
|
10313
|
+
Hc as H,
|
|
10314
|
+
Kc as S,
|
|
10284
10315
|
H as V,
|
|
10285
|
-
|
|
10286
|
-
|
|
10287
|
-
|
|
10288
|
-
|
|
10289
|
-
|
|
10290
|
-
|
|
10291
|
-
|
|
10292
|
-
|
|
10293
|
-
|
|
10294
|
-
|
|
10295
|
-
|
|
10296
|
-
|
|
10297
|
-
|
|
10298
|
-
|
|
10299
|
-
|
|
10300
|
-
|
|
10301
|
-
|
|
10302
|
-
|
|
10303
|
-
|
|
10316
|
+
Ps as a,
|
|
10317
|
+
ch as b,
|
|
10318
|
+
uh as c,
|
|
10319
|
+
sh as d,
|
|
10320
|
+
Nr as e,
|
|
10321
|
+
Fr as f,
|
|
10322
|
+
Vr as g,
|
|
10323
|
+
ca as h,
|
|
10324
|
+
ia as i,
|
|
10325
|
+
jn as j,
|
|
10326
|
+
ph as k,
|
|
10327
|
+
Xc as l,
|
|
10328
|
+
rh as o,
|
|
10329
|
+
Br as p,
|
|
10330
|
+
$s as s,
|
|
10331
|
+
Gs as t,
|
|
10332
|
+
oh as u,
|
|
10333
|
+
Xr as v,
|
|
10334
|
+
ua as z
|
|
10304
10335
|
};
|
|
10305
|
-
//# sourceMappingURL=SyntaxHighlight-
|
|
10336
|
+
//# sourceMappingURL=SyntaxHighlight-zvlnSnHB.js.map
|