zudoku 0.1.1-dev.9 → 0.3.0-dev.3
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/dist/app/App.js +15 -6
- package/dist/app/App.js.map +1 -1
- package/dist/app/main.js +10 -2
- package/dist/app/main.js.map +1 -1
- package/dist/cli/build/handler.js +3 -1
- package/dist/cli/build/handler.js.map +1 -1
- package/dist/cli/common/analytics/lib.js +1 -1
- package/dist/cli/common/analytics/lib.js.map +1 -1
- package/dist/cli/common/logger.js +3 -1
- package/dist/cli/common/logger.js.map +1 -1
- package/dist/cli/common/outdated.js +4 -4
- package/dist/cli/common/outdated.js.map +1 -1
- package/dist/cli/common/output.js +4 -4
- package/dist/cli/common/output.js.map +1 -1
- package/dist/cli/common/utils/box.js +2 -2
- package/dist/cli/common/utils/box.js.map +1 -1
- package/dist/cli/dev/handler.js +4 -2
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/config/config.d.ts +30 -6
- package/dist/config/validators/auth.d.ts +2 -0
- package/dist/config/validators/auth.js +2 -0
- package/dist/config/validators/auth.js.map +1 -0
- package/dist/config/validators/validate.d.ts +2 -0
- package/dist/config/validators/validate.js +4 -0
- package/dist/config/validators/validate.js.map +1 -0
- package/dist/index.d.ts +2 -6
- package/dist/index.js +1 -5
- package/dist/index.js.map +1 -1
- package/dist/lib/authentication/Callback.d.ts +3 -0
- package/dist/lib/authentication/Callback.js +34 -0
- package/dist/lib/authentication/Callback.js.map +1 -0
- package/dist/lib/authentication/authentication.d.ts +14 -0
- package/dist/lib/authentication/authentication.js.map +1 -0
- package/dist/lib/authentication/errors.d.ts +15 -0
- package/dist/lib/authentication/errors.js +10 -0
- package/dist/lib/authentication/errors.js.map +1 -0
- package/dist/lib/authentication/hook.d.ts +7 -0
- package/dist/lib/authentication/hook.js +29 -0
- package/dist/lib/authentication/hook.js.map +1 -0
- package/dist/lib/authentication/providers/auth0.d.ts +4 -0
- package/dist/lib/authentication/providers/auth0.js +40 -0
- package/dist/lib/authentication/providers/auth0.js.map +1 -0
- package/dist/lib/authentication/providers/clerk.d.ts +4 -0
- package/dist/lib/authentication/providers/clerk.js +54 -0
- package/dist/lib/authentication/providers/clerk.js.map +1 -0
- package/dist/lib/authentication/providers/openid.d.ts +35 -0
- package/dist/lib/authentication/providers/openid.js +204 -0
- package/dist/lib/authentication/providers/openid.js.map +1 -0
- package/dist/lib/authentication/state.d.ts +13 -0
- package/dist/lib/authentication/state.js +5 -0
- package/dist/lib/authentication/state.js.map +1 -0
- package/dist/{app → lib}/components/AnchorLink.js.map +1 -1
- package/dist/{app → lib}/components/CategoryHeading.js.map +1 -1
- package/dist/lib/components/DevPortal.d.ts +25 -0
- package/dist/lib/components/DevPortal.js +32 -0
- package/dist/lib/components/DevPortal.js.map +1 -0
- package/dist/{app → lib}/components/Dialog.d.ts +2 -2
- package/dist/{app → lib}/components/Dialog.js +3 -3
- package/dist/lib/components/Dialog.js.map +1 -0
- package/dist/lib/components/Header.d.ts +1 -0
- package/dist/lib/components/Header.js +15 -0
- package/dist/lib/components/Header.js.map +1 -0
- package/dist/{app → lib/components}/Heading.js +2 -2
- package/dist/lib/components/Heading.js.map +1 -0
- package/dist/{app → lib}/components/Input.js.map +1 -1
- package/dist/{app → lib}/components/Layout.js +4 -7
- package/dist/lib/components/Layout.js.map +1 -0
- package/dist/lib/components/Link.d.ts +1 -0
- package/dist/lib/components/Link.js +2 -0
- package/dist/lib/components/Link.js.map +1 -0
- package/dist/{app → lib}/components/Markdown.js.map +1 -1
- package/dist/lib/components/Router.d.ts +4 -0
- package/dist/lib/components/Router.js +20 -0
- package/dist/lib/components/Router.js.map +1 -0
- package/dist/lib/components/Select.d.ts +13 -0
- package/dist/lib/components/Select.js +27 -0
- package/dist/lib/components/Select.js.map +1 -0
- package/dist/lib/components/Spinner.d.ts +3 -0
- package/dist/lib/components/Spinner.js +4 -0
- package/dist/lib/components/Spinner.js.map +1 -0
- package/dist/{app → lib}/components/SyntaxHighlight.d.ts +2 -1
- package/dist/{app → lib}/components/SyntaxHighlight.js +4 -1
- package/dist/lib/components/SyntaxHighlight.js.map +1 -0
- package/dist/{app → lib}/components/TopNavigation.js.map +1 -1
- package/dist/{app → lib}/components/context/ComponentsContext.d.ts +1 -1
- package/dist/{app → lib}/components/context/ComponentsContext.js.map +1 -1
- package/dist/{app → lib}/components/context/DevPortalProvider.js +1 -1
- package/dist/lib/components/context/DevPortalProvider.js.map +1 -0
- package/dist/lib/components/context/PluginSystem.js.map +1 -0
- package/dist/{app → lib}/components/context/ThemeContext.js +1 -1
- package/dist/{app → lib}/components/context/ThemeContext.js.map +1 -1
- package/dist/{app → lib}/components/context/ViewportAnchorContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +3 -0
- package/dist/lib/components/index.js +4 -0
- package/dist/lib/components/index.js.map +1 -0
- package/dist/{app → lib}/components/navigation/SideNavigation.js +1 -1
- package/dist/{app → lib}/components/navigation/SideNavigation.js.map +1 -1
- package/dist/{app → lib}/components/navigation/SideNavigationCategory.js +1 -1
- package/dist/{app → lib}/components/navigation/SideNavigationCategory.js.map +1 -1
- package/dist/{app → lib}/components/navigation/SideNavigationItem.d.ts +2 -1
- package/dist/{app → lib}/components/navigation/SideNavigationItem.js +12 -6
- package/dist/lib/components/navigation/SideNavigationItem.js.map +1 -0
- package/dist/{app → lib}/components/navigation/SideNavigationWrapper.d.ts +3 -0
- package/dist/lib/components/navigation/SideNavigationWrapper.js +7 -0
- package/dist/lib/components/navigation/SideNavigationWrapper.js.map +1 -0
- package/dist/{app → lib}/components/navigation/useNavigationCollapsibleState.js.map +1 -1
- package/dist/{app → lib}/components/navigation/util.js.map +1 -1
- package/dist/{app → lib}/core/DevPortalContext.d.ts +10 -32
- package/dist/lib/core/DevPortalContext.js +48 -0
- package/dist/lib/core/DevPortalContext.js.map +1 -0
- package/dist/{app → lib}/core/helmet.js.map +1 -1
- package/dist/lib/core/icons.js.map +1 -0
- package/dist/{app → lib}/core/plugins.d.ts +2 -7
- package/dist/{app → lib}/core/plugins.js +1 -1
- package/dist/{app → lib}/core/plugins.js.map +1 -1
- package/dist/lib/core/router.js.map +1 -0
- package/dist/{app → lib}/oas/graphql/index.js +2 -2
- package/dist/lib/oas/graphql/index.js.map +1 -0
- package/dist/{app → lib}/oas/parser/dereference/index.js.map +1 -1
- package/dist/{app → lib}/oas/parser/dereference/resolveRef.js.map +1 -1
- package/dist/{app → lib}/oas/parser/index.js.map +1 -1
- package/dist/{app → lib}/oas/parser/upgrade/index.js.map +1 -1
- package/dist/lib/plugins/api-key/CreateApiKey.d.ts +5 -0
- package/dist/lib/plugins/api-key/CreateApiKey.js +37 -0
- package/dist/lib/plugins/api-key/CreateApiKey.js.map +1 -0
- package/dist/lib/plugins/api-key/SettingsApiKeys.d.ts +5 -0
- package/dist/lib/plugins/api-key/SettingsApiKeys.js +38 -0
- package/dist/lib/plugins/api-key/SettingsApiKeys.js.map +1 -0
- package/dist/lib/plugins/api-key/index.d.ts +30 -0
- package/dist/lib/plugins/api-key/index.js +67 -0
- package/dist/lib/plugins/api-key/index.js.map +1 -0
- package/dist/lib/plugins/index.d.ts +4 -0
- package/dist/lib/plugins/index.js +5 -0
- package/dist/lib/plugins/index.js.map +1 -0
- package/dist/lib/plugins/markdown/MdxPage.d.ts +5 -0
- package/dist/lib/plugins/markdown/MdxPage.js +60 -0
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -0
- package/dist/{app → lib}/plugins/markdown/Toc.js.map +1 -1
- package/dist/{app → lib}/plugins/markdown/generateRoutes.js +1 -6
- package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -0
- package/dist/{app → lib}/plugins/markdown/index.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/ColorizedParam.d.ts +1 -2
- package/dist/{app → lib}/plugins/openapi/ColorizedParam.js +2 -2
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -0
- package/dist/lib/plugins/openapi/MakeRequest.js +43 -0
- package/dist/lib/plugins/openapi/MakeRequest.js.map +1 -0
- package/dist/{app → lib}/plugins/openapi/MethodBadge.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/OperationList.js +12 -3
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -0
- package/dist/lib/plugins/openapi/OperationListItem.js +17 -0
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -0
- package/dist/{app → lib}/plugins/openapi/ParameterList.d.ts +2 -2
- package/dist/lib/plugins/openapi/ParameterList.js +5 -0
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -0
- package/dist/lib/plugins/openapi/ParameterListItem.js +13 -0
- package/dist/{app → lib}/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/RequestBodySidecarBox.js +1 -1
- package/dist/{app → lib}/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/ResponsesSidecarBox.js +3 -3
- package/dist/{app → lib}/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaListView.d.ts +7 -0
- package/dist/lib/plugins/openapi/SchemaListView.js +43 -0
- package/dist/lib/plugins/openapi/SchemaListView.js.map +1 -0
- package/dist/{app → lib}/plugins/openapi/Select.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/Sidecar.js +15 -15
- package/dist/{app → lib}/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/SidecarBox.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/graphql/fragment-masking.d.ts +1 -1
- package/dist/{app → lib}/plugins/openapi/graphql/fragment-masking.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/graphql/gql.d.ts +5 -5
- package/dist/{app → lib}/plugins/openapi/graphql/gql.js +2 -3
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -0
- package/dist/{app → lib}/plugins/openapi/graphql/graphql.d.ts +9 -0
- package/dist/{app → lib}/plugins/openapi/graphql/graphql.js +50 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -0
- package/dist/lib/plugins/openapi/graphql/index.js.map +1 -0
- package/dist/{app → lib}/plugins/openapi/index.js +3 -1
- package/dist/lib/plugins/openapi/index.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Editor.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/Editor.js +5 -0
- package/dist/lib/plugins/openapi/playground/Editor.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Headers.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/Headers.js +15 -0
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/InlineInput.d.ts +4 -0
- package/dist/lib/plugins/openapi/playground/InlineInput.js +3 -0
- package/dist/lib/plugins/openapi/playground/InlineInput.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/PathParams.d.ts +6 -0
- package/dist/lib/plugins/openapi/playground/PathParams.js +21 -0
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +31 -0
- package/dist/lib/plugins/openapi/playground/Playground.js +97 -0
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +5 -0
- package/dist/lib/plugins/openapi/playground/QueryParams.js +22 -0
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/UrlDisplay.d.ts +4 -0
- package/dist/lib/plugins/openapi/playground/UrlDisplay.js +22 -0
- package/dist/lib/plugins/openapi/playground/UrlDisplay.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/createUrl.d.ts +2 -0
- package/dist/lib/plugins/openapi/playground/createUrl.js +15 -0
- package/dist/lib/plugins/openapi/playground/createUrl.js.map +1 -0
- package/dist/{app → lib}/plugins/openapi/util/generateSchemaExample.d.ts +1 -1
- package/dist/{app → lib}/plugins/openapi/util/generateSchemaExample.js +17 -9
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -0
- package/dist/{app → lib}/plugins/openapi/util/urql.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/worker/createSharedWorkerClient.js +2 -1
- package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.js.map +1 -0
- package/dist/lib/plugins/openapi/worker/shared-worker.d.ts +1 -0
- package/dist/lib/plugins/openapi/worker/shared-worker.js +6 -0
- package/dist/lib/plugins/openapi/worker/shared-worker.js.map +1 -0
- package/dist/{app → lib}/plugins/openapi/worker/worker.js.map +1 -1
- package/dist/lib/plugins/openapi-worker.d.ts +1 -0
- package/dist/lib/plugins/openapi-worker.js +2 -0
- package/dist/lib/plugins/openapi-worker.js.map +1 -0
- package/dist/{app → lib}/plugins/redirect/index.d.ts +1 -2
- package/dist/{app → lib}/plugins/redirect/index.js.map +1 -1
- package/dist/lib/ui/Button.d.ts +7 -0
- package/dist/lib/ui/Button.js +11 -0
- package/dist/lib/ui/Button.js.map +1 -0
- package/dist/{app → lib}/ui/Callout.js.map +1 -1
- package/dist/{app → lib}/ui/Card.js.map +1 -1
- package/dist/{app → lib}/ui/Note.js.map +1 -1
- package/dist/{app → lib}/ui/Tabs.d.ts +2 -2
- package/dist/{app → lib}/ui/Tabs.js +2 -2
- package/dist/{app → lib}/ui/Tabs.js.map +1 -1
- package/dist/lib/ui/button-variants.d.ts +4 -0
- package/dist/{app/ui/Button.js → lib/ui/button-variants.js} +2 -12
- package/dist/lib/ui/button-variants.js.map +1 -0
- package/dist/{app → lib}/util/MdxComponents.js +9 -9
- package/dist/lib/util/MdxComponents.js.map +1 -0
- package/dist/{app → lib}/util/cn.js.map +1 -1
- package/dist/lib/util/createVariantComponent.d.ts +9 -0
- package/dist/lib/util/createVariantComponent.js +17 -0
- package/dist/lib/util/createVariantComponent.js.map +1 -0
- package/dist/{app → lib}/util/createWaitForNotify.js.map +1 -1
- package/dist/{app → lib}/util/groupBy.js.map +1 -1
- package/dist/{app → lib}/util/joinPath.js.map +1 -1
- package/dist/{app → lib}/util/pastellize.js.map +1 -1
- package/dist/lib/util/slugify.js.map +1 -0
- package/dist/{app → lib}/util/traverseNavigation.js.map +1 -1
- package/dist/{app → lib}/util/useScrollToAnchor.js.map +1 -1
- package/dist/{app → lib}/util/useScrollToTop.js.map +1 -1
- package/dist/ts.js +1 -2
- package/dist/ts.js.map +1 -1
- package/dist/vite/build.js +2 -8
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/common.d.ts +1 -0
- package/dist/vite/common.js +5 -0
- package/dist/vite/common.js.map +1 -0
- package/dist/vite/config.d.ts +9 -2
- package/dist/vite/config.js +69 -28
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/dev-server.d.ts +2 -0
- package/dist/vite/dev-server.js +30 -10
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/plugin-api-keys.d.ts +4 -0
- package/dist/vite/plugin-api-keys.js +33 -0
- package/dist/vite/plugin-api-keys.js.map +1 -0
- package/dist/vite/plugin-api.js +4 -2
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.js +3 -2
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.d.ts +4 -0
- package/dist/vite/plugin-component.js +16 -0
- package/dist/vite/plugin-component.js.map +1 -0
- package/dist/vite/plugin-config.d.ts +1 -0
- package/dist/vite/plugin-config.js +4 -3
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-docs.js +4 -2
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-docs.test.js +1 -2
- package/dist/vite/plugin-docs.test.js.map +1 -1
- package/dist/vite/plugin-html.js +0 -3
- package/dist/vite/plugin-html.js.map +1 -1
- package/dist/vite/plugin-mdx.js +3 -1
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-metadata.d.ts +6 -0
- package/dist/vite/plugin-metadata.js +24 -0
- package/dist/vite/plugin-metadata.js.map +1 -0
- package/dist/vite/plugin-openapi-worker.d.ts +4 -0
- package/dist/vite/plugin-openapi-worker.js +28 -0
- package/dist/vite/plugin-openapi-worker.js.map +1 -0
- package/dist/vite/plugin-redirect.d.ts +4 -0
- package/dist/vite/plugin-redirect.js +32 -0
- package/dist/vite/plugin-redirect.js.map +1 -0
- package/dist/vite/plugin.js +8 -0
- package/dist/vite/plugin.js.map +1 -1
- package/lib/Spinner-7LezPqGn.js +8393 -0
- package/lib/_commonjsHelpers-BkfeUUK-.js +28 -0
- package/lib/assets/index-BPdJm2ty.js +4764 -0
- package/lib/assets/worker-BCcpCNJ7.js +14473 -0
- package/lib/clerk-Wslx_mPo.js +19685 -0
- package/lib/index-DNx3xWa2.js +3461 -0
- package/lib/prism-bash.min-DadFsM4Z.js +6 -0
- package/lib/prism-java.min-d5iT_mOd.js +6 -0
- package/lib/prism-json.min-B1GJqK1k.js +1 -0
- package/lib/prism-markup-templating-DZrrEs0A.js +61 -0
- package/lib/prism-php.min-o7FpoMP_.js +10 -0
- package/lib/prism-ruby.min-C7LwcKyz.js +9 -0
- package/lib/state-oycsxkHz.js +287 -0
- package/lib/urql-DMlBWUKL.js +1591 -0
- package/lib/zudoku.auth-auth0.js +26 -0
- package/lib/zudoku.auth-clerk.js +47 -0
- package/lib/zudoku.auth-openid.js +1058 -0
- package/lib/zudoku.components.js +925 -0
- package/lib/zudoku.openapi-worker.js +225 -0
- package/lib/zudoku.plugins.js +19863 -0
- package/package.json +69 -39
- package/src/app/App.tsx +16 -6
- package/src/app/main.css +1 -0
- package/src/app/main.tsx +12 -3
- package/src/lib/authentication/Callback.tsx +60 -0
- package/src/lib/authentication/authentication.ts +19 -0
- package/src/lib/authentication/errors.ts +21 -0
- package/src/lib/authentication/hook.ts +33 -0
- package/src/lib/authentication/providers/auth0.tsx +52 -0
- package/src/lib/authentication/providers/clerk.tsx +64 -0
- package/src/lib/authentication/providers/openid.tsx +312 -0
- package/src/lib/authentication/state.ts +19 -0
- package/src/{app → lib/components}/DevPortal.tsx +30 -42
- package/src/{app → lib}/components/Dialog.tsx +37 -37
- package/src/{app → lib}/components/Header.tsx +25 -20
- package/src/{app → lib/components}/Heading.tsx +2 -2
- package/src/{app → lib}/components/Layout.tsx +18 -12
- package/src/lib/components/Link.tsx +1 -0
- package/src/lib/components/Router.tsx +28 -0
- package/src/lib/components/Select.tsx +157 -0
- package/src/lib/components/Spinner.tsx +5 -0
- package/src/{app → lib}/components/SyntaxHighlight.tsx +10 -3
- package/src/{app → lib}/components/context/DevPortalProvider.ts +1 -1
- package/src/lib/components/index.ts +3 -0
- package/src/{app → lib}/components/navigation/SideNavigation.tsx +4 -1
- package/src/{app → lib}/components/navigation/SideNavigationCategory.tsx +3 -1
- package/src/{app → lib}/components/navigation/SideNavigationItem.tsx +16 -7
- package/src/lib/components/navigation/SideNavigationWrapper.tsx +24 -0
- package/src/{app → lib}/core/DevPortalContext.ts +28 -64
- package/src/{app → lib}/core/plugins.ts +5 -5
- package/src/{app → lib}/oas/graphql/index.ts +2 -2
- package/src/lib/plugins/api-key/CreateApiKey.tsx +100 -0
- package/src/lib/plugins/api-key/SettingsApiKeys.tsx +125 -0
- package/src/lib/plugins/api-key/index.tsx +115 -0
- package/src/lib/plugins/index.ts +4 -0
- package/src/{app → lib}/plugins/markdown/MdxPage.tsx +32 -10
- package/src/{app → lib}/plugins/markdown/generateRoutes.tsx +1 -16
- package/src/{app → lib}/plugins/openapi/ColorizedParam.tsx +1 -3
- package/src/lib/plugins/openapi/MakeRequest.tsx +63 -0
- package/src/{app → lib}/plugins/openapi/OperationList.tsx +14 -4
- package/src/{app → lib}/plugins/openapi/OperationListItem.tsx +40 -6
- package/src/{app → lib}/plugins/openapi/ParameterList.tsx +4 -4
- package/src/{app → lib}/plugins/openapi/ParameterListItem.tsx +5 -2
- package/src/{app → lib}/plugins/openapi/RequestBodySidecarBox.tsx +1 -1
- package/src/{app → lib}/plugins/openapi/ResponsesSidecarBox.tsx +2 -3
- package/src/lib/plugins/openapi/SchemaListView.tsx +228 -0
- package/src/{app → lib}/plugins/openapi/Sidecar.tsx +23 -23
- package/src/{app → lib}/plugins/openapi/graphql/gql.ts +7 -7
- package/src/{app → lib}/plugins/openapi/graphql/graphql.ts +59 -0
- package/src/{app → lib}/plugins/openapi/index.tsx +8 -2
- package/src/lib/plugins/openapi/playground/Editor.tsx +4 -0
- package/src/lib/plugins/openapi/playground/Headers.tsx +60 -0
- package/src/lib/plugins/openapi/playground/InlineInput.tsx +6 -0
- package/src/lib/plugins/openapi/playground/PathParams.tsx +63 -0
- package/src/lib/plugins/openapi/playground/Playground.tsx +366 -0
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +89 -0
- package/src/lib/plugins/openapi/playground/UrlDisplay.tsx +32 -0
- package/src/lib/plugins/openapi/playground/createUrl.ts +22 -0
- package/src/{app → lib}/plugins/openapi/util/generateSchemaExample.ts +22 -9
- package/src/{app → lib}/plugins/openapi/worker/createSharedWorkerClient.ts +2 -1
- package/src/lib/plugins/openapi/worker/shared-worker.ts +5 -0
- package/src/lib/plugins/openapi-worker.ts +1 -0
- package/src/{app → lib}/plugins/redirect/index.tsx +1 -1
- package/src/lib/ui/Button.tsx +25 -0
- package/src/{app → lib}/ui/Tabs.tsx +2 -2
- package/src/{app/ui/Button.tsx → lib/ui/button-variants.ts} +4 -29
- package/src/{app → lib}/util/MdxComponents.tsx +33 -8
- package/src/{app → lib}/util/createVariantComponent.tsx +12 -7
- package/dist/app/DevPortal.d.ts +0 -25
- package/dist/app/DevPortal.js +0 -41
- package/dist/app/DevPortal.js.map +0 -1
- package/dist/app/Heading.js.map +0 -1
- package/dist/app/authentication/authentication.d.ts +0 -13
- package/dist/app/authentication/authentication.js.map +0 -1
- package/dist/app/authentication/clerk.d.ts +0 -5
- package/dist/app/authentication/clerk.js +0 -36
- package/dist/app/authentication/clerk.js.map +0 -1
- package/dist/app/authentication/openid.d.ts +0 -11
- package/dist/app/authentication/openid.js +0 -118
- package/dist/app/authentication/openid.js.map +0 -1
- package/dist/app/components/Dialog.js.map +0 -1
- package/dist/app/components/DynamicIcon.d.ts +0 -6
- package/dist/app/components/DynamicIcon.js +0 -6
- package/dist/app/components/DynamicIcon.js.map +0 -1
- package/dist/app/components/Header.d.ts +0 -1
- package/dist/app/components/Header.js +0 -15
- package/dist/app/components/Header.js.map +0 -1
- package/dist/app/components/Layout.js.map +0 -1
- package/dist/app/components/SyntaxHighlight.js.map +0 -1
- package/dist/app/components/context/DevPortalProvider.js.map +0 -1
- package/dist/app/components/context/PluginSystem.js.map +0 -1
- package/dist/app/components/navigation/SideNavigationItem.js.map +0 -1
- package/dist/app/components/navigation/SideNavigationWrapper.js +0 -6
- package/dist/app/components/navigation/SideNavigationWrapper.js.map +0 -1
- package/dist/app/core/DevPortalContext.js +0 -68
- package/dist/app/core/DevPortalContext.js.map +0 -1
- package/dist/app/core/icons.js.map +0 -1
- package/dist/app/core/router.js.map +0 -1
- package/dist/app/core/types/combine.d.ts +0 -4
- package/dist/app/core/types/combine.js +0 -2
- package/dist/app/core/types/combine.js.map +0 -1
- package/dist/app/oas/graphql/index.js.map +0 -1
- package/dist/app/oas/graphql/server.d.ts +0 -1
- package/dist/app/oas/graphql/server.js +0 -8
- package/dist/app/oas/graphql/server.js.map +0 -1
- package/dist/app/plugins/api-key/SettingsApiKeys.d.ts +0 -4
- package/dist/app/plugins/api-key/SettingsApiKeys.js +0 -7
- package/dist/app/plugins/api-key/SettingsApiKeys.js.map +0 -1
- package/dist/app/plugins/api-key/index.d.ts +0 -32
- package/dist/app/plugins/api-key/index.js +0 -55
- package/dist/app/plugins/api-key/index.js.map +0 -1
- package/dist/app/plugins/markdown/MdxPage.d.ts +0 -3
- package/dist/app/plugins/markdown/MdxPage.js +0 -55
- package/dist/app/plugins/markdown/MdxPage.js.map +0 -1
- package/dist/app/plugins/markdown/generateRoutes.js.map +0 -1
- package/dist/app/plugins/openapi/ColorizedParam.js.map +0 -1
- package/dist/app/plugins/openapi/MakeRequest.js +0 -23
- package/dist/app/plugins/openapi/MakeRequest.js.map +0 -1
- package/dist/app/plugins/openapi/OperationList.js.map +0 -1
- package/dist/app/plugins/openapi/OperationListItem.js +0 -15
- package/dist/app/plugins/openapi/OperationListItem.js.map +0 -1
- package/dist/app/plugins/openapi/ParameterList.js +0 -5
- package/dist/app/plugins/openapi/ParameterList.js.map +0 -1
- package/dist/app/plugins/openapi/ParameterListItem.js +0 -13
- package/dist/app/plugins/openapi/graphql/gql.js.map +0 -1
- package/dist/app/plugins/openapi/graphql/graphql.js.map +0 -1
- package/dist/app/plugins/openapi/graphql/index.js.map +0 -1
- package/dist/app/plugins/openapi/index.js.map +0 -1
- package/dist/app/plugins/openapi/playground/Playground.d.ts +0 -8
- package/dist/app/plugins/openapi/playground/Playground.js +0 -98
- package/dist/app/plugins/openapi/playground/Playground.js.map +0 -1
- package/dist/app/plugins/openapi/util/generateSchemaExample.js.map +0 -1
- package/dist/app/plugins/openapi/worker/createSharedWorkerClient.js.map +0 -1
- package/dist/app/ui/Button.d.ts +0 -11
- package/dist/app/ui/Button.js.map +0 -1
- package/dist/app/util/MdxComponents.js.map +0 -1
- package/dist/app/util/createVariantComponent.d.ts +0 -15
- package/dist/app/util/createVariantComponent.js +0 -12
- package/dist/app/util/createVariantComponent.js.map +0 -1
- package/dist/app/util/slugify.js.map +0 -1
- package/dist/auth.d.ts +0 -2
- package/dist/auth.js +0 -3
- package/dist/auth.js.map +0 -1
- package/dist/plugins.d.ts +0 -4
- package/dist/plugins.js +0 -6
- package/dist/plugins.js.map +0 -1
- package/src/app/authentication/authentication.ts +0 -18
- package/src/app/authentication/clerk.ts +0 -47
- package/src/app/authentication/openid.ts +0 -192
- package/src/app/components/DynamicIcon.tsx +0 -60
- package/src/app/components/navigation/SideNavigationWrapper.tsx +0 -15
- package/src/app/core/types/combine.ts +0 -16
- package/src/app/oas/graphql/server.ts +0 -10
- package/src/app/plugins/api-key/SettingsApiKeys.tsx +0 -22
- package/src/app/plugins/api-key/index.tsx +0 -123
- package/src/app/plugins/openapi/MakeRequest.tsx +0 -49
- package/src/app/plugins/openapi/playground/Playground.tsx +0 -309
- package/src/app/plugins/openapi/queries.graphql +0 -6
- package/dist/{app → lib}/authentication/authentication.js +0 -0
- package/dist/{app → lib}/components/AnchorLink.d.ts +0 -0
- package/dist/{app → lib}/components/AnchorLink.js +0 -0
- package/dist/{app → lib}/components/CategoryHeading.d.ts +0 -0
- package/dist/{app → lib}/components/CategoryHeading.js +0 -0
- package/dist/{app → lib/components}/Heading.d.ts +0 -0
- package/dist/{app → lib}/components/Input.d.ts +0 -0
- package/dist/{app → lib}/components/Input.js +0 -0
- package/dist/{app → lib}/components/Layout.d.ts +0 -0
- package/dist/{app → lib}/components/Markdown.d.ts +0 -0
- package/dist/{app → lib}/components/Markdown.js +0 -0
- package/dist/{app → lib}/components/TopNavigation.d.ts +0 -0
- package/dist/{app → lib}/components/TopNavigation.js +0 -0
- package/dist/{app → lib}/components/context/ComponentsContext.js +0 -0
- package/dist/{app → lib}/components/context/DevPortalProvider.d.ts +0 -0
- package/dist/{app → lib}/components/context/PluginSystem.d.ts +0 -0
- package/dist/{app → lib}/components/context/PluginSystem.js +0 -0
- package/dist/{app → lib}/components/context/ThemeContext.d.ts +0 -0
- package/dist/{app → lib}/components/context/ViewportAnchorContext.d.ts +0 -0
- package/dist/{app → lib}/components/context/ViewportAnchorContext.js +0 -0
- package/dist/{app → lib}/components/navigation/SideNavigation.d.ts +0 -0
- package/dist/{app → lib}/components/navigation/SideNavigationCategory.d.ts +0 -0
- package/dist/{app → lib}/components/navigation/useNavigationCollapsibleState.d.ts +0 -0
- package/dist/{app → lib}/components/navigation/useNavigationCollapsibleState.js +0 -0
- package/dist/{app → lib}/components/navigation/util.d.ts +0 -0
- package/dist/{app → lib}/components/navigation/util.js +0 -0
- package/dist/{app → lib}/core/helmet.d.ts +0 -0
- package/dist/{app → lib}/core/helmet.js +0 -0
- package/dist/{app → lib}/core/icons.d.ts +0 -0
- package/dist/{app → lib}/core/icons.js +0 -0
- package/dist/{app → lib}/core/router.d.ts +0 -0
- package/dist/{app → lib}/core/router.js +0 -0
- package/dist/{app → lib}/oas/graphql/index.d.ts +0 -0
- package/dist/{app → lib}/oas/parser/dereference/index.d.ts +0 -0
- package/dist/{app → lib}/oas/parser/dereference/index.js +0 -0
- package/dist/{app → lib}/oas/parser/dereference/resolveRef.d.ts +0 -0
- package/dist/{app → lib}/oas/parser/dereference/resolveRef.js +0 -0
- package/dist/{app → lib}/oas/parser/index.d.ts +0 -0
- package/dist/{app → lib}/oas/parser/index.js +0 -0
- package/dist/{app → lib}/oas/parser/upgrade/index.d.ts +0 -0
- package/dist/{app → lib}/oas/parser/upgrade/index.js +0 -0
- package/dist/{app → lib}/plugins/markdown/Toc.d.ts +0 -0
- package/dist/{app → lib}/plugins/markdown/Toc.js +0 -0
- package/dist/{app → lib}/plugins/markdown/generateRoutes.d.ts +0 -0
- package/dist/{app → lib}/plugins/markdown/index.d.ts +0 -0
- package/dist/{app → lib}/plugins/markdown/index.js +0 -0
- package/dist/{app → lib}/plugins/openapi/MakeRequest.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/MethodBadge.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/MethodBadge.js +0 -0
- package/dist/{app → lib}/plugins/openapi/OperationList.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/OperationListItem.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/ParameterListItem.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/RequestBodySidecarBox.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/ResponsesSidecarBox.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/Select.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/Select.js +0 -0
- package/dist/{app → lib}/plugins/openapi/Sidecar.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/SidecarBox.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/SidecarBox.js +0 -0
- package/dist/{app → lib}/plugins/openapi/graphql/fragment-masking.js +0 -0
- package/dist/{app → lib}/plugins/openapi/graphql/index.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/graphql/index.js +0 -0
- package/dist/{app → lib}/plugins/openapi/index.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/util/urql.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/util/urql.js +0 -0
- package/dist/{app → lib}/plugins/openapi/worker/createSharedWorkerClient.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/worker/worker.d.ts +0 -0
- package/dist/{app → lib}/plugins/openapi/worker/worker.js +0 -0
- package/dist/{app → lib}/plugins/redirect/index.js +0 -0
- package/dist/{app → lib}/ui/Callout.d.ts +0 -0
- package/dist/{app → lib}/ui/Callout.js +0 -0
- package/dist/{app → lib}/ui/Card.d.ts +0 -0
- package/dist/{app → lib}/ui/Card.js +0 -0
- package/dist/{app → lib}/ui/Note.d.ts +0 -0
- package/dist/{app → lib}/ui/Note.js +0 -0
- package/dist/{app → lib}/util/MdxComponents.d.ts +0 -0
- package/dist/{app → lib}/util/cn.d.ts +0 -0
- package/dist/{app → lib}/util/cn.js +0 -0
- package/dist/{app → lib}/util/createWaitForNotify.d.ts +0 -0
- package/dist/{app → lib}/util/createWaitForNotify.js +0 -0
- package/dist/{app → lib}/util/groupBy.d.ts +0 -0
- package/dist/{app → lib}/util/groupBy.js +0 -0
- package/dist/{app → lib}/util/joinPath.d.ts +0 -0
- package/dist/{app → lib}/util/joinPath.js +0 -0
- package/dist/{app → lib}/util/pastellize.d.ts +0 -0
- package/dist/{app → lib}/util/pastellize.js +0 -0
- package/dist/{app → lib}/util/slugify.d.ts +0 -0
- package/dist/{app → lib}/util/slugify.js +0 -0
- package/dist/{app → lib}/util/traverseNavigation.d.ts +0 -0
- package/dist/{app → lib}/util/traverseNavigation.js +0 -0
- package/dist/{app → lib}/util/useScrollToAnchor.d.ts +0 -0
- package/dist/{app → lib}/util/useScrollToAnchor.js +0 -0
- package/dist/{app → lib}/util/useScrollToTop.d.ts +0 -0
- package/dist/{app → lib}/util/useScrollToTop.js +0 -0
- package/src/{app → lib}/components/AnchorLink.tsx +0 -0
- package/src/{app → lib}/components/CategoryHeading.tsx +1 -1
- package/src/{app → lib}/components/Input.tsx +0 -0
- package/src/{app → lib}/components/Markdown.tsx +0 -0
- package/src/{app → lib}/components/TopNavigation.tsx +0 -0
- package/src/{app → lib}/components/context/ComponentsContext.tsx +0 -0
- package/src/{app → lib}/components/context/PluginSystem.ts +0 -0
- package/src/{app → lib}/components/context/ThemeContext.tsx +1 -1
- package/src/{app → lib}/components/context/ViewportAnchorContext.tsx +0 -0
- package/src/{app → lib}/components/navigation/useNavigationCollapsibleState.ts +0 -0
- package/src/{app → lib}/components/navigation/util.ts +0 -0
- package/src/{app → lib}/core/helmet.ts +0 -0
- package/src/{app → lib}/core/icons.tsx +0 -0
- package/src/{app → lib}/core/router.tsx +0 -0
- package/src/{app → lib}/oas/parser/dereference/index.ts +0 -0
- package/src/{app → lib}/oas/parser/dereference/resolveRef.ts +0 -0
- package/src/{app → lib}/oas/parser/index.ts +0 -0
- package/src/{app → lib}/oas/parser/schemas/v3.0.json +0 -0
- package/src/{app → lib}/oas/parser/schemas/v3.1.json +0 -0
- package/src/{app → lib}/oas/parser/upgrade/index.ts +0 -0
- package/src/{app → lib}/plugins/markdown/Toc.tsx +0 -0
- package/src/{app → lib}/plugins/markdown/index.tsx +0 -0
- package/src/{app → lib}/plugins/openapi/MethodBadge.tsx +0 -0
- package/src/{app → lib}/plugins/openapi/Select.tsx +0 -0
- package/src/{app → lib}/plugins/openapi/SidecarBox.tsx +0 -0
- package/src/{app → lib}/plugins/openapi/graphql/fragment-masking.ts +1 -1
- /package/src/{app → lib}/plugins/openapi/graphql/index.ts +0 -0
- /package/src/{app → lib}/plugins/openapi/util/urql.ts +0 -0
- /package/src/{app → lib}/plugins/openapi/worker/worker.ts +0 -0
- /package/src/{app → lib}/ui/Callout.tsx +0 -0
- /package/src/{app → lib}/ui/Card.tsx +0 -0
- /package/src/{app → lib}/ui/Note.tsx +0 -0
- /package/src/{app → lib}/util/cn.ts +0 -0
- /package/src/{app → lib}/util/createWaitForNotify.ts +0 -0
- /package/src/{app → lib}/util/groupBy.ts +0 -0
- /package/src/{app → lib}/util/joinPath.tsx +0 -0
- /package/src/{app → lib}/util/pastellize.ts +0 -0
- /package/src/{app → lib}/util/slugify.ts +0 -0
- /package/src/{app → lib}/util/traverseNavigation.ts +0 -0
- /package/src/{app → lib}/util/useScrollToAnchor.ts +0 -0
- /package/src/{app → lib}/util/useScrollToTop.ts +0 -0
|
@@ -0,0 +1,1591 @@
|
|
|
1
|
+
import * as F from "react";
|
|
2
|
+
var Q = {
|
|
3
|
+
NAME: "Name",
|
|
4
|
+
DOCUMENT: "Document",
|
|
5
|
+
OPERATION_DEFINITION: "OperationDefinition",
|
|
6
|
+
VARIABLE_DEFINITION: "VariableDefinition",
|
|
7
|
+
SELECTION_SET: "SelectionSet",
|
|
8
|
+
FIELD: "Field",
|
|
9
|
+
ARGUMENT: "Argument",
|
|
10
|
+
FRAGMENT_SPREAD: "FragmentSpread",
|
|
11
|
+
INLINE_FRAGMENT: "InlineFragment",
|
|
12
|
+
FRAGMENT_DEFINITION: "FragmentDefinition",
|
|
13
|
+
VARIABLE: "Variable",
|
|
14
|
+
INT: "IntValue",
|
|
15
|
+
FLOAT: "FloatValue",
|
|
16
|
+
STRING: "StringValue",
|
|
17
|
+
BOOLEAN: "BooleanValue",
|
|
18
|
+
NULL: "NullValue",
|
|
19
|
+
ENUM: "EnumValue",
|
|
20
|
+
LIST: "ListValue",
|
|
21
|
+
OBJECT: "ObjectValue",
|
|
22
|
+
OBJECT_FIELD: "ObjectField",
|
|
23
|
+
DIRECTIVE: "Directive",
|
|
24
|
+
NAMED_TYPE: "NamedType",
|
|
25
|
+
LIST_TYPE: "ListType",
|
|
26
|
+
NON_NULL_TYPE: "NonNullType"
|
|
27
|
+
};
|
|
28
|
+
class he extends Error {
|
|
29
|
+
constructor(r, t, n, a, i, o, s) {
|
|
30
|
+
super(r), this.name = "GraphQLError", this.message = r, i && (this.path = i), t && (this.nodes = Array.isArray(t) ? t : [t]), n && (this.source = n), a && (this.positions = a), o && (this.originalError = o);
|
|
31
|
+
var c = s;
|
|
32
|
+
if (!c && o) {
|
|
33
|
+
var l = o.extensions;
|
|
34
|
+
l && typeof l == "object" && (c = l);
|
|
35
|
+
}
|
|
36
|
+
this.extensions = c || {};
|
|
37
|
+
}
|
|
38
|
+
toJSON() {
|
|
39
|
+
return {
|
|
40
|
+
...this,
|
|
41
|
+
message: this.message
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
toString() {
|
|
45
|
+
return this.message;
|
|
46
|
+
}
|
|
47
|
+
get [Symbol.toStringTag]() {
|
|
48
|
+
return "GraphQLError";
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
var x, d;
|
|
52
|
+
function b(e) {
|
|
53
|
+
return new he(`Syntax Error: Unexpected token at ${d} in ${e}`);
|
|
54
|
+
}
|
|
55
|
+
function V(e) {
|
|
56
|
+
if (e.lastIndex = d, e.test(x))
|
|
57
|
+
return x.slice(d, d = e.lastIndex);
|
|
58
|
+
}
|
|
59
|
+
var Z = / +(?=[^\s])/y;
|
|
60
|
+
function Ke(e) {
|
|
61
|
+
for (var r = e.split(`
|
|
62
|
+
`), t = "", n = 0, a = 0, i = r.length - 1, o = 0; o < r.length; o++)
|
|
63
|
+
Z.lastIndex = 0, Z.test(r[o]) && (o && (!n || Z.lastIndex < n) && (n = Z.lastIndex), a = a || o, i = o);
|
|
64
|
+
for (var s = a; s <= i; s++)
|
|
65
|
+
s !== a && (t += `
|
|
66
|
+
`), t += r[s].slice(n).replace(/\\"""/g, '"""');
|
|
67
|
+
return t;
|
|
68
|
+
}
|
|
69
|
+
function m() {
|
|
70
|
+
for (var e = 0 | x.charCodeAt(d++); e === 9 || e === 10 || e === 13 || e === 32 || e === 35 || e === 44 || e === 65279; e = 0 | x.charCodeAt(d++))
|
|
71
|
+
if (e === 35)
|
|
72
|
+
for (; (e = x.charCodeAt(d++)) !== 10 && e !== 13; )
|
|
73
|
+
;
|
|
74
|
+
d--;
|
|
75
|
+
}
|
|
76
|
+
var A = /[_A-Za-z]\w*/y, ce = new RegExp("(?:(null|true|false)|\\$(" + A.source + ')|(-?\\d+)((?:\\.\\d+)?[eE][+-]?\\d+|\\.\\d+)?|("""(?:"""|(?:[\\s\\S]*?[^\\\\])"""))|("(?:"|[^\\r\\n]*?[^\\\\]"))|(' + A.source + "))", "y"), $ = function(e) {
|
|
77
|
+
return e[e.Const = 1] = "Const", e[e.Var = 2] = "Var", e[e.Int = 3] = "Int", e[e.Float = 4] = "Float", e[e.BlockString = 5] = "BlockString", e[e.String = 6] = "String", e[e.Enum = 7] = "Enum", e;
|
|
78
|
+
}($ || {}), Xe = /\\/g;
|
|
79
|
+
function te(e) {
|
|
80
|
+
var r, t;
|
|
81
|
+
if (ce.lastIndex = d, x.charCodeAt(d) === 91) {
|
|
82
|
+
d++, m();
|
|
83
|
+
for (var n = []; x.charCodeAt(d) !== 93; )
|
|
84
|
+
n.push(te(e));
|
|
85
|
+
return d++, m(), {
|
|
86
|
+
kind: "ListValue",
|
|
87
|
+
values: n
|
|
88
|
+
};
|
|
89
|
+
} else if (x.charCodeAt(d) === 123) {
|
|
90
|
+
d++, m();
|
|
91
|
+
for (var a = []; x.charCodeAt(d) !== 125; ) {
|
|
92
|
+
if ((r = V(A)) == null || (m(), x.charCodeAt(d++) !== 58))
|
|
93
|
+
throw b("ObjectField");
|
|
94
|
+
m(), a.push({
|
|
95
|
+
kind: "ObjectField",
|
|
96
|
+
name: {
|
|
97
|
+
kind: "Name",
|
|
98
|
+
value: r
|
|
99
|
+
},
|
|
100
|
+
value: te(e)
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
return d++, m(), {
|
|
104
|
+
kind: "ObjectValue",
|
|
105
|
+
fields: a
|
|
106
|
+
};
|
|
107
|
+
} else if ((t = ce.exec(x)) != null) {
|
|
108
|
+
if (d = ce.lastIndex, m(), (r = t[$.Const]) != null)
|
|
109
|
+
return r === "null" ? {
|
|
110
|
+
kind: "NullValue"
|
|
111
|
+
} : {
|
|
112
|
+
kind: "BooleanValue",
|
|
113
|
+
value: r === "true"
|
|
114
|
+
};
|
|
115
|
+
if ((r = t[$.Var]) != null) {
|
|
116
|
+
if (e)
|
|
117
|
+
throw b("Variable");
|
|
118
|
+
return {
|
|
119
|
+
kind: "Variable",
|
|
120
|
+
name: {
|
|
121
|
+
kind: "Name",
|
|
122
|
+
value: r
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
} else if ((r = t[$.Int]) != null) {
|
|
126
|
+
var i;
|
|
127
|
+
return (i = t[$.Float]) != null ? {
|
|
128
|
+
kind: "FloatValue",
|
|
129
|
+
value: r + i
|
|
130
|
+
} : {
|
|
131
|
+
kind: "IntValue",
|
|
132
|
+
value: r
|
|
133
|
+
};
|
|
134
|
+
} else {
|
|
135
|
+
if ((r = t[$.BlockString]) != null)
|
|
136
|
+
return {
|
|
137
|
+
kind: "StringValue",
|
|
138
|
+
value: Ke(r.slice(3, -3)),
|
|
139
|
+
block: !0
|
|
140
|
+
};
|
|
141
|
+
if ((r = t[$.String]) != null)
|
|
142
|
+
return {
|
|
143
|
+
kind: "StringValue",
|
|
144
|
+
value: Xe.test(r) ? JSON.parse(r) : r.slice(1, -1),
|
|
145
|
+
block: !1
|
|
146
|
+
};
|
|
147
|
+
if ((r = t[$.Enum]) != null)
|
|
148
|
+
return {
|
|
149
|
+
kind: "EnumValue",
|
|
150
|
+
value: r
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
throw b("Value");
|
|
155
|
+
}
|
|
156
|
+
function Be(e) {
|
|
157
|
+
if (x.charCodeAt(d) === 40) {
|
|
158
|
+
var r = [];
|
|
159
|
+
d++, m();
|
|
160
|
+
var t;
|
|
161
|
+
do {
|
|
162
|
+
if ((t = V(A)) == null || (m(), x.charCodeAt(d++) !== 58))
|
|
163
|
+
throw b("Argument");
|
|
164
|
+
m(), r.push({
|
|
165
|
+
kind: "Argument",
|
|
166
|
+
name: {
|
|
167
|
+
kind: "Name",
|
|
168
|
+
value: t
|
|
169
|
+
},
|
|
170
|
+
value: te(e)
|
|
171
|
+
});
|
|
172
|
+
} while (x.charCodeAt(d) !== 41);
|
|
173
|
+
return d++, m(), r;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
function B(e) {
|
|
177
|
+
if (x.charCodeAt(d) === 64) {
|
|
178
|
+
var r = [], t;
|
|
179
|
+
do {
|
|
180
|
+
if (d++, (t = V(A)) == null)
|
|
181
|
+
throw b("Directive");
|
|
182
|
+
m(), r.push({
|
|
183
|
+
kind: "Directive",
|
|
184
|
+
name: {
|
|
185
|
+
kind: "Name",
|
|
186
|
+
value: t
|
|
187
|
+
},
|
|
188
|
+
arguments: Be(e)
|
|
189
|
+
});
|
|
190
|
+
} while (x.charCodeAt(d) === 64);
|
|
191
|
+
return r;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
function er() {
|
|
195
|
+
for (var e, r = 0; x.charCodeAt(d) === 91; )
|
|
196
|
+
r++, d++, m();
|
|
197
|
+
if ((e = V(A)) == null)
|
|
198
|
+
throw b("NamedType");
|
|
199
|
+
m();
|
|
200
|
+
var t = {
|
|
201
|
+
kind: "NamedType",
|
|
202
|
+
name: {
|
|
203
|
+
kind: "Name",
|
|
204
|
+
value: e
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
do
|
|
208
|
+
if (x.charCodeAt(d) === 33 && (d++, m(), t = {
|
|
209
|
+
kind: "NonNullType",
|
|
210
|
+
type: t
|
|
211
|
+
}), r) {
|
|
212
|
+
if (x.charCodeAt(d++) !== 93)
|
|
213
|
+
throw b("NamedType");
|
|
214
|
+
m(), t = {
|
|
215
|
+
kind: "ListType",
|
|
216
|
+
type: t
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
while (r--);
|
|
220
|
+
return t;
|
|
221
|
+
}
|
|
222
|
+
var fe = new RegExp("(?:(\\.{3})|(" + A.source + "))", "y"), ye = function(e) {
|
|
223
|
+
return e[e.Spread = 1] = "Spread", e[e.Name = 2] = "Name", e;
|
|
224
|
+
}(ye || {});
|
|
225
|
+
function ne() {
|
|
226
|
+
var e = [], r, t;
|
|
227
|
+
do
|
|
228
|
+
if (fe.lastIndex = d, (t = fe.exec(x)) != null) {
|
|
229
|
+
if (d = fe.lastIndex, t[ye.Spread] != null) {
|
|
230
|
+
m();
|
|
231
|
+
var n = V(A);
|
|
232
|
+
if (n != null && n !== "on")
|
|
233
|
+
m(), e.push({
|
|
234
|
+
kind: "FragmentSpread",
|
|
235
|
+
name: {
|
|
236
|
+
kind: "Name",
|
|
237
|
+
value: n
|
|
238
|
+
},
|
|
239
|
+
directives: B(!1)
|
|
240
|
+
});
|
|
241
|
+
else {
|
|
242
|
+
if (m(), n === "on") {
|
|
243
|
+
if ((n = V(A)) == null)
|
|
244
|
+
throw b("NamedType");
|
|
245
|
+
m();
|
|
246
|
+
}
|
|
247
|
+
var a = B(!1);
|
|
248
|
+
if (x.charCodeAt(d++) !== 123)
|
|
249
|
+
throw b("InlineFragment");
|
|
250
|
+
m(), e.push({
|
|
251
|
+
kind: "InlineFragment",
|
|
252
|
+
typeCondition: n ? {
|
|
253
|
+
kind: "NamedType",
|
|
254
|
+
name: {
|
|
255
|
+
kind: "Name",
|
|
256
|
+
value: n
|
|
257
|
+
}
|
|
258
|
+
} : void 0,
|
|
259
|
+
directives: a,
|
|
260
|
+
selectionSet: ne()
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
} else if ((r = t[ye.Name]) != null) {
|
|
264
|
+
var i = void 0;
|
|
265
|
+
if (m(), x.charCodeAt(d) === 58) {
|
|
266
|
+
if (d++, m(), i = r, (r = V(A)) == null)
|
|
267
|
+
throw b("Field");
|
|
268
|
+
m();
|
|
269
|
+
}
|
|
270
|
+
var o = Be(!1);
|
|
271
|
+
m();
|
|
272
|
+
var s = B(!1), c = void 0;
|
|
273
|
+
x.charCodeAt(d) === 123 && (d++, m(), c = ne()), e.push({
|
|
274
|
+
kind: "Field",
|
|
275
|
+
alias: i ? {
|
|
276
|
+
kind: "Name",
|
|
277
|
+
value: i
|
|
278
|
+
} : void 0,
|
|
279
|
+
name: {
|
|
280
|
+
kind: "Name",
|
|
281
|
+
value: r
|
|
282
|
+
},
|
|
283
|
+
arguments: o,
|
|
284
|
+
directives: s,
|
|
285
|
+
selectionSet: c
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
} else
|
|
289
|
+
throw b("SelectionSet");
|
|
290
|
+
while (x.charCodeAt(d) !== 125);
|
|
291
|
+
return d++, m(), {
|
|
292
|
+
kind: "SelectionSet",
|
|
293
|
+
selections: e
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
function rr() {
|
|
297
|
+
var e, r;
|
|
298
|
+
if ((e = V(A)) == null || (m(), V(A) !== "on") || (m(), (r = V(A)) == null))
|
|
299
|
+
throw b("FragmentDefinition");
|
|
300
|
+
m();
|
|
301
|
+
var t = B(!1);
|
|
302
|
+
if (x.charCodeAt(d++) !== 123)
|
|
303
|
+
throw b("FragmentDefinition");
|
|
304
|
+
return m(), {
|
|
305
|
+
kind: "FragmentDefinition",
|
|
306
|
+
name: {
|
|
307
|
+
kind: "Name",
|
|
308
|
+
value: e
|
|
309
|
+
},
|
|
310
|
+
typeCondition: {
|
|
311
|
+
kind: "NamedType",
|
|
312
|
+
name: {
|
|
313
|
+
kind: "Name",
|
|
314
|
+
value: r
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
directives: t,
|
|
318
|
+
selectionSet: ne()
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
var tr = /(?:query|mutation|subscription|fragment)/y;
|
|
322
|
+
function nr(e) {
|
|
323
|
+
var r, t, n;
|
|
324
|
+
if (e && (m(), r = V(A), t = function() {
|
|
325
|
+
if (m(), x.charCodeAt(d) === 40) {
|
|
326
|
+
var i = [];
|
|
327
|
+
d++, m();
|
|
328
|
+
var o;
|
|
329
|
+
do {
|
|
330
|
+
if (x.charCodeAt(d++) !== 36 || (o = V(A)) == null)
|
|
331
|
+
throw b("Variable");
|
|
332
|
+
if (m(), x.charCodeAt(d++) !== 58)
|
|
333
|
+
throw b("VariableDefinition");
|
|
334
|
+
m();
|
|
335
|
+
var s = er(), c = void 0;
|
|
336
|
+
x.charCodeAt(d) === 61 && (d++, m(), c = te(!0)), m(), i.push({
|
|
337
|
+
kind: "VariableDefinition",
|
|
338
|
+
variable: {
|
|
339
|
+
kind: "Variable",
|
|
340
|
+
name: {
|
|
341
|
+
kind: "Name",
|
|
342
|
+
value: o
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
type: s,
|
|
346
|
+
defaultValue: c,
|
|
347
|
+
directives: B(!0)
|
|
348
|
+
});
|
|
349
|
+
} while (x.charCodeAt(d) !== 41);
|
|
350
|
+
return d++, m(), i;
|
|
351
|
+
}
|
|
352
|
+
}(), n = B(!1)), x.charCodeAt(d) === 123)
|
|
353
|
+
return d++, m(), {
|
|
354
|
+
kind: "OperationDefinition",
|
|
355
|
+
operation: e || "query",
|
|
356
|
+
name: r ? {
|
|
357
|
+
kind: "Name",
|
|
358
|
+
value: r
|
|
359
|
+
} : void 0,
|
|
360
|
+
variableDefinitions: t,
|
|
361
|
+
directives: n,
|
|
362
|
+
selectionSet: ne()
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
function ar(e, r) {
|
|
366
|
+
return x = typeof e.body == "string" ? e.body : e, d = 0, function() {
|
|
367
|
+
var n, a;
|
|
368
|
+
m();
|
|
369
|
+
var i = [];
|
|
370
|
+
do
|
|
371
|
+
if ((n = V(tr)) === "fragment")
|
|
372
|
+
m(), i.push(rr());
|
|
373
|
+
else if ((a = nr(n)) != null)
|
|
374
|
+
i.push(a);
|
|
375
|
+
else
|
|
376
|
+
throw b("Document");
|
|
377
|
+
while (d < x.length);
|
|
378
|
+
return {
|
|
379
|
+
kind: "Document",
|
|
380
|
+
definitions: i
|
|
381
|
+
};
|
|
382
|
+
}();
|
|
383
|
+
}
|
|
384
|
+
function _(e, r, t) {
|
|
385
|
+
for (var n = "", a = 0; a < e.length; a++)
|
|
386
|
+
a && (n += r), n += t(e[a]);
|
|
387
|
+
return n;
|
|
388
|
+
}
|
|
389
|
+
function ir(e) {
|
|
390
|
+
return JSON.stringify(e);
|
|
391
|
+
}
|
|
392
|
+
function or(e) {
|
|
393
|
+
return `"""
|
|
394
|
+
` + e.replace(/"""/g, '\\"""') + `
|
|
395
|
+
"""`;
|
|
396
|
+
}
|
|
397
|
+
var P = `
|
|
398
|
+
`, E = {
|
|
399
|
+
OperationDefinition(e) {
|
|
400
|
+
var r = e.operation;
|
|
401
|
+
return e.name && (r += " " + e.name.value), e.variableDefinitions && e.variableDefinitions.length && (e.name || (r += " "), r += "(" + _(e.variableDefinitions, ", ", E.VariableDefinition) + ")"), e.directives && e.directives.length && (r += " " + _(e.directives, " ", E.Directive)), r !== "query" ? r + " " + E.SelectionSet(e.selectionSet) : E.SelectionSet(e.selectionSet);
|
|
402
|
+
},
|
|
403
|
+
VariableDefinition(e) {
|
|
404
|
+
var r = E.Variable(e.variable) + ": " + R(e.type);
|
|
405
|
+
return e.defaultValue && (r += " = " + R(e.defaultValue)), e.directives && e.directives.length && (r += " " + _(e.directives, " ", E.Directive)), r;
|
|
406
|
+
},
|
|
407
|
+
Field(e) {
|
|
408
|
+
var r = e.alias ? e.alias.value + ": " + e.name.value : e.name.value;
|
|
409
|
+
if (e.arguments && e.arguments.length) {
|
|
410
|
+
var t = _(e.arguments, ", ", E.Argument);
|
|
411
|
+
r.length + t.length + 2 > 80 ? r += "(" + (P += " ") + _(e.arguments, P, E.Argument) + (P = P.slice(0, -2)) + ")" : r += "(" + t + ")";
|
|
412
|
+
}
|
|
413
|
+
return e.directives && e.directives.length && (r += " " + _(e.directives, " ", E.Directive)), e.selectionSet && (r += " " + E.SelectionSet(e.selectionSet)), r;
|
|
414
|
+
},
|
|
415
|
+
StringValue(e) {
|
|
416
|
+
return e.block ? or(e.value).replace(/\n/g, P) : ir(e.value);
|
|
417
|
+
},
|
|
418
|
+
BooleanValue: (e) => "" + e.value,
|
|
419
|
+
NullValue: (e) => "null",
|
|
420
|
+
IntValue: (e) => e.value,
|
|
421
|
+
FloatValue: (e) => e.value,
|
|
422
|
+
EnumValue: (e) => e.value,
|
|
423
|
+
Name: (e) => e.value,
|
|
424
|
+
Variable: (e) => "$" + e.name.value,
|
|
425
|
+
ListValue: (e) => "[" + _(e.values, ", ", R) + "]",
|
|
426
|
+
ObjectValue: (e) => "{" + _(e.fields, ", ", E.ObjectField) + "}",
|
|
427
|
+
ObjectField: (e) => e.name.value + ": " + R(e.value),
|
|
428
|
+
Document(e) {
|
|
429
|
+
return !e.definitions || !e.definitions.length ? "" : _(e.definitions, `
|
|
430
|
+
|
|
431
|
+
`, R);
|
|
432
|
+
},
|
|
433
|
+
SelectionSet: (e) => "{" + (P += " ") + _(e.selections, P, R) + (P = P.slice(0, -2)) + "}",
|
|
434
|
+
Argument: (e) => e.name.value + ": " + R(e.value),
|
|
435
|
+
FragmentSpread(e) {
|
|
436
|
+
var r = "..." + e.name.value;
|
|
437
|
+
return e.directives && e.directives.length && (r += " " + _(e.directives, " ", E.Directive)), r;
|
|
438
|
+
},
|
|
439
|
+
InlineFragment(e) {
|
|
440
|
+
var r = "...";
|
|
441
|
+
return e.typeCondition && (r += " on " + e.typeCondition.name.value), e.directives && e.directives.length && (r += " " + _(e.directives, " ", E.Directive)), r += " " + E.SelectionSet(e.selectionSet);
|
|
442
|
+
},
|
|
443
|
+
FragmentDefinition(e) {
|
|
444
|
+
var r = "fragment " + e.name.value;
|
|
445
|
+
return r += " on " + e.typeCondition.name.value, e.directives && e.directives.length && (r += " " + _(e.directives, " ", E.Directive)), r + " " + E.SelectionSet(e.selectionSet);
|
|
446
|
+
},
|
|
447
|
+
Directive(e) {
|
|
448
|
+
var r = "@" + e.name.value;
|
|
449
|
+
return e.arguments && e.arguments.length && (r += "(" + _(e.arguments, ", ", E.Argument) + ")"), r;
|
|
450
|
+
},
|
|
451
|
+
NamedType: (e) => e.name.value,
|
|
452
|
+
ListType: (e) => "[" + R(e.type) + "]",
|
|
453
|
+
NonNullType: (e) => R(e.type) + "!"
|
|
454
|
+
}, R = (e) => E[e.kind](e);
|
|
455
|
+
function sr(e) {
|
|
456
|
+
return P = `
|
|
457
|
+
`, E[e.kind] ? E[e.kind](e) : "";
|
|
458
|
+
}
|
|
459
|
+
var we = () => {
|
|
460
|
+
}, q = we;
|
|
461
|
+
function T(e) {
|
|
462
|
+
return {
|
|
463
|
+
tag: 0,
|
|
464
|
+
0: e
|
|
465
|
+
};
|
|
466
|
+
}
|
|
467
|
+
function H(e) {
|
|
468
|
+
return {
|
|
469
|
+
tag: 1,
|
|
470
|
+
0: e
|
|
471
|
+
};
|
|
472
|
+
}
|
|
473
|
+
var Se = () => typeof Symbol == "function" && Symbol.asyncIterator || "@@asyncIterator", ur = (e) => e;
|
|
474
|
+
function I(e) {
|
|
475
|
+
return (r) => (t) => {
|
|
476
|
+
var n = q;
|
|
477
|
+
r((a) => {
|
|
478
|
+
a === 0 ? t(0) : a.tag === 0 ? (n = a[0], t(a)) : e(a[0]) ? t(a) : n(0);
|
|
479
|
+
});
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
function K(e) {
|
|
483
|
+
return (r) => (t) => r((n) => {
|
|
484
|
+
n === 0 || n.tag === 0 ? t(n) : t(H(e(n[0])));
|
|
485
|
+
});
|
|
486
|
+
}
|
|
487
|
+
function ae(e) {
|
|
488
|
+
return (r) => (t) => {
|
|
489
|
+
var n = [], a = q, i = !1, o = !1;
|
|
490
|
+
r((s) => {
|
|
491
|
+
o || (s === 0 ? (o = !0, n.length || t(0)) : s.tag === 0 ? a = s[0] : (i = !1, function(l) {
|
|
492
|
+
var p = q;
|
|
493
|
+
l((f) => {
|
|
494
|
+
if (f === 0) {
|
|
495
|
+
if (n.length) {
|
|
496
|
+
var h = n.indexOf(p);
|
|
497
|
+
h > -1 && (n = n.slice()).splice(h, 1), n.length || (o ? t(0) : i || (i = !0, a(0)));
|
|
498
|
+
}
|
|
499
|
+
} else f.tag === 0 ? (n.push(p = f[0]), p(0)) : n.length && (t(f), p(0));
|
|
500
|
+
});
|
|
501
|
+
}(e(s[0])), i || (i = !0, a(0))));
|
|
502
|
+
}), t(T((s) => {
|
|
503
|
+
if (s === 1) {
|
|
504
|
+
o || (o = !0, a(1));
|
|
505
|
+
for (var c = 0, l = n, p = n.length; c < p; c++)
|
|
506
|
+
l[c](1);
|
|
507
|
+
n.length = 0;
|
|
508
|
+
} else {
|
|
509
|
+
!o && !i ? (i = !0, a(0)) : i = !1;
|
|
510
|
+
for (var f = 0, h = n, k = n.length; f < k; f++)
|
|
511
|
+
h[f](0);
|
|
512
|
+
}
|
|
513
|
+
}));
|
|
514
|
+
};
|
|
515
|
+
}
|
|
516
|
+
function lr(e) {
|
|
517
|
+
return ae(ur)(e);
|
|
518
|
+
}
|
|
519
|
+
function z(e) {
|
|
520
|
+
return lr(vr(e));
|
|
521
|
+
}
|
|
522
|
+
function be(e) {
|
|
523
|
+
return (r) => (t) => {
|
|
524
|
+
var n = !1;
|
|
525
|
+
r((a) => {
|
|
526
|
+
if (!n) if (a === 0)
|
|
527
|
+
n = !0, t(0), e();
|
|
528
|
+
else if (a.tag === 0) {
|
|
529
|
+
var i = a[0];
|
|
530
|
+
t(T((o) => {
|
|
531
|
+
o === 1 ? (n = !0, i(1), e()) : i(o);
|
|
532
|
+
}));
|
|
533
|
+
} else
|
|
534
|
+
t(a);
|
|
535
|
+
});
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
function G(e) {
|
|
539
|
+
return (r) => (t) => {
|
|
540
|
+
var n = !1;
|
|
541
|
+
r((a) => {
|
|
542
|
+
if (!n) if (a === 0)
|
|
543
|
+
n = !0, t(0);
|
|
544
|
+
else if (a.tag === 0) {
|
|
545
|
+
var i = a[0];
|
|
546
|
+
t(T((o) => {
|
|
547
|
+
o === 1 && (n = !0), i(o);
|
|
548
|
+
}));
|
|
549
|
+
} else
|
|
550
|
+
e(a[0]), t(a);
|
|
551
|
+
});
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
function De(e) {
|
|
555
|
+
return (r) => (t) => r((n) => {
|
|
556
|
+
n === 0 ? t(0) : n.tag === 0 ? (t(n), e()) : t(n);
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
function Y(e) {
|
|
560
|
+
var r = [], t = q, n = !1;
|
|
561
|
+
return (a) => {
|
|
562
|
+
r.push(a), r.length === 1 && e((i) => {
|
|
563
|
+
if (i === 0) {
|
|
564
|
+
for (var o = 0, s = r, c = r.length; o < c; o++)
|
|
565
|
+
s[o](0);
|
|
566
|
+
r.length = 0;
|
|
567
|
+
} else if (i.tag === 0)
|
|
568
|
+
t = i[0];
|
|
569
|
+
else {
|
|
570
|
+
n = !1;
|
|
571
|
+
for (var l = 0, p = r, f = r.length; l < f; l++)
|
|
572
|
+
p[l](i);
|
|
573
|
+
}
|
|
574
|
+
}), a(T((i) => {
|
|
575
|
+
if (i === 1) {
|
|
576
|
+
var o = r.indexOf(a);
|
|
577
|
+
o > -1 && (r = r.slice()).splice(o, 1), r.length || t(1);
|
|
578
|
+
} else n || (n = !0, t(0));
|
|
579
|
+
}));
|
|
580
|
+
};
|
|
581
|
+
}
|
|
582
|
+
function Ae(e) {
|
|
583
|
+
return (r) => (t) => {
|
|
584
|
+
var n = q, a = q, i = !1, o = !1, s = !1, c = !1;
|
|
585
|
+
r((l) => {
|
|
586
|
+
c || (l === 0 ? (c = !0, s || t(0)) : l.tag === 0 ? n = l[0] : (s && (a(1), a = q), i ? i = !1 : (i = !0, n(0)), function(f) {
|
|
587
|
+
s = !0, f((h) => {
|
|
588
|
+
s && (h === 0 ? (s = !1, c ? t(0) : i || (i = !0, n(0))) : h.tag === 0 ? (o = !1, (a = h[0])(0)) : (t(h), o ? o = !1 : a(0)));
|
|
589
|
+
});
|
|
590
|
+
}(e(l[0]))));
|
|
591
|
+
}), t(T((l) => {
|
|
592
|
+
l === 1 ? (c || (c = !0, n(1)), s && (s = !1, a(1))) : (!c && !i && (i = !0, n(0)), s && !o && (o = !0, a(0)));
|
|
593
|
+
}));
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
function Ge(e) {
|
|
597
|
+
return (r) => (t) => {
|
|
598
|
+
var n = q, a = !1, i = 0;
|
|
599
|
+
r((o) => {
|
|
600
|
+
a || (o === 0 ? (a = !0, t(0)) : o.tag === 0 ? n = o[0] : i++ < e ? (t(o), !a && i >= e && (a = !0, t(0), n(1))) : t(o));
|
|
601
|
+
}), t(T((o) => {
|
|
602
|
+
o === 1 && !a ? (a = !0, n(1)) : o === 0 && !a && i < e && n(0);
|
|
603
|
+
}));
|
|
604
|
+
};
|
|
605
|
+
}
|
|
606
|
+
function Je(e) {
|
|
607
|
+
return (r) => (t) => {
|
|
608
|
+
var n = q, a = q, i = !1;
|
|
609
|
+
r((o) => {
|
|
610
|
+
i || (o === 0 ? (i = !0, a(1), t(0)) : o.tag === 0 ? (n = o[0], e((s) => {
|
|
611
|
+
s === 0 || (s.tag === 0 ? (a = s[0])(0) : (i = !0, a(1), n(1), t(0)));
|
|
612
|
+
})) : t(o));
|
|
613
|
+
}), t(T((o) => {
|
|
614
|
+
o === 1 && !i ? (i = !0, n(1), a(1)) : i || n(0);
|
|
615
|
+
}));
|
|
616
|
+
};
|
|
617
|
+
}
|
|
618
|
+
function Ue(e, r) {
|
|
619
|
+
return (t) => (n) => {
|
|
620
|
+
var a = q, i = !1;
|
|
621
|
+
t((o) => {
|
|
622
|
+
i || (o === 0 ? (i = !0, n(0)) : o.tag === 0 ? (a = o[0], n(o)) : e(o[0]) ? n(o) : (i = !0, r && n(o), n(0), a(1)));
|
|
623
|
+
});
|
|
624
|
+
};
|
|
625
|
+
}
|
|
626
|
+
function cr(e) {
|
|
627
|
+
return (r) => e()(r);
|
|
628
|
+
}
|
|
629
|
+
function ze(e) {
|
|
630
|
+
return (r) => {
|
|
631
|
+
var t = e[Se()] && e[Se()]() || e, n = !1, a = !1, i = !1, o;
|
|
632
|
+
r(T(async (s) => {
|
|
633
|
+
if (s === 1)
|
|
634
|
+
n = !0, t.return && t.return();
|
|
635
|
+
else if (a)
|
|
636
|
+
i = !0;
|
|
637
|
+
else {
|
|
638
|
+
for (i = a = !0; i && !n; )
|
|
639
|
+
if ((o = await t.next()).done)
|
|
640
|
+
n = !0, t.return && await t.return(), r(0);
|
|
641
|
+
else
|
|
642
|
+
try {
|
|
643
|
+
i = !1, r(H(o.value));
|
|
644
|
+
} catch (c) {
|
|
645
|
+
if (t.throw)
|
|
646
|
+
(n = !!(await t.throw(c)).done) && r(0);
|
|
647
|
+
else
|
|
648
|
+
throw c;
|
|
649
|
+
}
|
|
650
|
+
a = !1;
|
|
651
|
+
}
|
|
652
|
+
}));
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
function fr(e) {
|
|
656
|
+
return e[Symbol.asyncIterator] ? ze(e) : (r) => {
|
|
657
|
+
var t = e[Symbol.iterator](), n = !1, a = !1, i = !1, o;
|
|
658
|
+
r(T((s) => {
|
|
659
|
+
if (s === 1)
|
|
660
|
+
n = !0, t.return && t.return();
|
|
661
|
+
else if (a)
|
|
662
|
+
i = !0;
|
|
663
|
+
else {
|
|
664
|
+
for (i = a = !0; i && !n; )
|
|
665
|
+
if ((o = t.next()).done)
|
|
666
|
+
n = !0, t.return && t.return(), r(0);
|
|
667
|
+
else
|
|
668
|
+
try {
|
|
669
|
+
i = !1, r(H(o.value));
|
|
670
|
+
} catch (c) {
|
|
671
|
+
if (t.throw)
|
|
672
|
+
(n = !!t.throw(c).done) && r(0);
|
|
673
|
+
else
|
|
674
|
+
throw c;
|
|
675
|
+
}
|
|
676
|
+
a = !1;
|
|
677
|
+
}
|
|
678
|
+
}));
|
|
679
|
+
};
|
|
680
|
+
}
|
|
681
|
+
var vr = fr;
|
|
682
|
+
function U(e) {
|
|
683
|
+
return (r) => {
|
|
684
|
+
var t = !1;
|
|
685
|
+
r(T((n) => {
|
|
686
|
+
n === 1 ? t = !0 : t || (t = !0, r(H(e)), r(0));
|
|
687
|
+
}));
|
|
688
|
+
};
|
|
689
|
+
}
|
|
690
|
+
function Ye(e) {
|
|
691
|
+
return (r) => {
|
|
692
|
+
var t = !1, n = e({
|
|
693
|
+
next(a) {
|
|
694
|
+
t || r(H(a));
|
|
695
|
+
},
|
|
696
|
+
complete() {
|
|
697
|
+
t || (t = !0, r(0));
|
|
698
|
+
}
|
|
699
|
+
});
|
|
700
|
+
r(T((a) => {
|
|
701
|
+
a === 1 && !t && (t = !0, n());
|
|
702
|
+
}));
|
|
703
|
+
};
|
|
704
|
+
}
|
|
705
|
+
function _e() {
|
|
706
|
+
var e, r;
|
|
707
|
+
return {
|
|
708
|
+
source: Y(Ye((t) => (e = t.next, r = t.complete, we))),
|
|
709
|
+
next(t) {
|
|
710
|
+
e && e(t);
|
|
711
|
+
},
|
|
712
|
+
complete() {
|
|
713
|
+
r && r();
|
|
714
|
+
}
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
function Ie(e) {
|
|
718
|
+
return Ye((r) => (e.then((t) => {
|
|
719
|
+
Promise.resolve(t).then(() => {
|
|
720
|
+
r.next(t), r.complete();
|
|
721
|
+
});
|
|
722
|
+
}), we));
|
|
723
|
+
}
|
|
724
|
+
function M(e) {
|
|
725
|
+
return (r) => {
|
|
726
|
+
var t = q, n = !1;
|
|
727
|
+
return r((a) => {
|
|
728
|
+
a === 0 ? n = !0 : a.tag === 0 ? (t = a[0])(0) : n || (e(a[0]), t(0));
|
|
729
|
+
}), {
|
|
730
|
+
unsubscribe() {
|
|
731
|
+
n || (n = !0, t(1));
|
|
732
|
+
}
|
|
733
|
+
};
|
|
734
|
+
};
|
|
735
|
+
}
|
|
736
|
+
function dr(e) {
|
|
737
|
+
M((r) => {
|
|
738
|
+
})(e);
|
|
739
|
+
}
|
|
740
|
+
function pr(e) {
|
|
741
|
+
return new Promise((r) => {
|
|
742
|
+
var t = q, n;
|
|
743
|
+
e((a) => {
|
|
744
|
+
a === 0 ? Promise.resolve(n).then(r) : a.tag === 0 ? (t = a[0])(0) : (n = a[0], t(0));
|
|
745
|
+
});
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
var hr = (e) => e && e.message && (e.extensions || e.name === "GraphQLError") ? e : typeof e == "object" && e.message ? new he(e.message, e.nodes, e.source, e.positions, e.path, e, e.extensions || {}) : new he(e);
|
|
749
|
+
class Ee extends Error {
|
|
750
|
+
constructor(r) {
|
|
751
|
+
var t = (r.graphQLErrors || []).map(hr), n = ((a, i) => {
|
|
752
|
+
var o = "";
|
|
753
|
+
if (a)
|
|
754
|
+
return `[Network] ${a.message}`;
|
|
755
|
+
if (i)
|
|
756
|
+
for (var s of i)
|
|
757
|
+
o && (o += `
|
|
758
|
+
`), o += `[GraphQL] ${s.message}`;
|
|
759
|
+
return o;
|
|
760
|
+
})(r.networkError, t);
|
|
761
|
+
super(n), this.name = "CombinedError", this.message = n, this.graphQLErrors = t, this.networkError = r.networkError, this.response = r.response;
|
|
762
|
+
}
|
|
763
|
+
toString() {
|
|
764
|
+
return this.message;
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
var X = (e, r) => {
|
|
768
|
+
for (var t = 0 | (r || 5381), n = 0, a = 0 | e.length; n < a; n++)
|
|
769
|
+
t = (t << 5) + t + e.charCodeAt(n);
|
|
770
|
+
return t;
|
|
771
|
+
}, L = /* @__PURE__ */ new Set(), Ce = /* @__PURE__ */ new WeakMap(), j = (e, r) => {
|
|
772
|
+
if (e === null || L.has(e))
|
|
773
|
+
return "null";
|
|
774
|
+
if (typeof e != "object")
|
|
775
|
+
return JSON.stringify(e) || "";
|
|
776
|
+
if (e.toJSON)
|
|
777
|
+
return j(e.toJSON(), r);
|
|
778
|
+
if (Array.isArray(e)) {
|
|
779
|
+
var t = "[";
|
|
780
|
+
for (var n of e)
|
|
781
|
+
t.length > 1 && (t += ","), t += j(n, r) || "null";
|
|
782
|
+
return t += "]";
|
|
783
|
+
} else if (!r && (oe !== J && e instanceof oe || se !== J && e instanceof se))
|
|
784
|
+
return "null";
|
|
785
|
+
var a = Object.keys(e).sort();
|
|
786
|
+
if (!a.length && e.constructor && Object.getPrototypeOf(e).constructor !== Object.prototype.constructor) {
|
|
787
|
+
var i = Ce.get(e) || Math.random().toString(36).slice(2);
|
|
788
|
+
return Ce.set(e, i), j({
|
|
789
|
+
__key: i
|
|
790
|
+
}, r);
|
|
791
|
+
}
|
|
792
|
+
L.add(e);
|
|
793
|
+
var o = "{";
|
|
794
|
+
for (var s of a) {
|
|
795
|
+
var c = j(e[s], r);
|
|
796
|
+
c && (o.length > 1 && (o += ","), o += j(s, r) + ":" + c);
|
|
797
|
+
}
|
|
798
|
+
return L.delete(e), o += "}";
|
|
799
|
+
}, me = (e, r, t) => {
|
|
800
|
+
if (!(t == null || typeof t != "object" || t.toJSON || L.has(t))) if (Array.isArray(t))
|
|
801
|
+
for (var n = 0, a = t.length; n < a; n++)
|
|
802
|
+
me(e, `${r}.${n}`, t[n]);
|
|
803
|
+
else if (t instanceof oe || t instanceof se)
|
|
804
|
+
e.set(r, t);
|
|
805
|
+
else {
|
|
806
|
+
L.add(t);
|
|
807
|
+
for (var i of Object.keys(t))
|
|
808
|
+
me(e, `${r}.${i}`, t[i]);
|
|
809
|
+
}
|
|
810
|
+
}, ie = (e, r) => (L.clear(), j(e, r || !1));
|
|
811
|
+
class J {
|
|
812
|
+
}
|
|
813
|
+
var oe = typeof File < "u" ? File : J, se = typeof Blob < "u" ? Blob : J, yr = /("{3}[\s\S]*"{3}|"(?:\\.|[^"])*")/g, mr = /(?:#[^\n\r]+)?(?:[\r\n]+|$)/g, gr = (e, r) => r % 2 == 0 ? e.replace(mr, `
|
|
814
|
+
`) : e, Ve = (e) => e.split(yr).map(gr).join("").trim(), qe = /* @__PURE__ */ new Map(), ee = /* @__PURE__ */ new Map(), Oe = (e) => {
|
|
815
|
+
var r;
|
|
816
|
+
return typeof e == "string" ? r = Ve(e) : e.loc && ee.get(e.__key) === e ? r = e.loc.source.body : (r = qe.get(e) || Ve(sr(e)), qe.set(e, r)), typeof e != "string" && !e.loc && (e.loc = {
|
|
817
|
+
start: 0,
|
|
818
|
+
end: r.length,
|
|
819
|
+
source: {
|
|
820
|
+
body: r,
|
|
821
|
+
name: "gql",
|
|
822
|
+
locationOffset: {
|
|
823
|
+
line: 1,
|
|
824
|
+
column: 1
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
}), r;
|
|
828
|
+
}, Te = (e) => {
|
|
829
|
+
var r;
|
|
830
|
+
if (e.documentId)
|
|
831
|
+
r = X(e.documentId);
|
|
832
|
+
else if (r = X(Oe(e)), e.definitions) {
|
|
833
|
+
var t = He(e);
|
|
834
|
+
t && (r = X(`
|
|
835
|
+
# ${t}`, r));
|
|
836
|
+
}
|
|
837
|
+
return r;
|
|
838
|
+
}, We = (e) => {
|
|
839
|
+
var r, t;
|
|
840
|
+
return typeof e == "string" ? (r = Te(e), t = ee.get(r) || ar(e)) : (r = e.__key || Te(e), t = ee.get(r) || e), t.loc || Oe(t), t.__key = r, ee.set(r, t), t;
|
|
841
|
+
}, re = (e, r, t) => {
|
|
842
|
+
var n = r || {}, a = We(e), i = ie(n, !0), o = a.__key;
|
|
843
|
+
return i !== "{}" && (o = X(i, o)), {
|
|
844
|
+
key: o,
|
|
845
|
+
query: a,
|
|
846
|
+
variables: n,
|
|
847
|
+
extensions: t
|
|
848
|
+
};
|
|
849
|
+
}, He = (e) => {
|
|
850
|
+
for (var r of e.definitions)
|
|
851
|
+
if (r.kind === Q.OPERATION_DEFINITION)
|
|
852
|
+
return r.name ? r.name.value : void 0;
|
|
853
|
+
}, kr = (e) => {
|
|
854
|
+
for (var r of e.definitions)
|
|
855
|
+
if (r.kind === Q.OPERATION_DEFINITION)
|
|
856
|
+
return r.operation;
|
|
857
|
+
}, ge = (e, r, t) => {
|
|
858
|
+
if (!("data" in r || "errors" in r && Array.isArray(r.errors)))
|
|
859
|
+
throw new Error("No Content");
|
|
860
|
+
var n = e.kind === "subscription";
|
|
861
|
+
return {
|
|
862
|
+
operation: e,
|
|
863
|
+
data: r.data,
|
|
864
|
+
error: Array.isArray(r.errors) ? new Ee({
|
|
865
|
+
graphQLErrors: r.errors,
|
|
866
|
+
response: t
|
|
867
|
+
}) : void 0,
|
|
868
|
+
extensions: r.extensions ? {
|
|
869
|
+
...r.extensions
|
|
870
|
+
} : void 0,
|
|
871
|
+
hasNext: r.hasNext == null ? n : r.hasNext,
|
|
872
|
+
stale: !1
|
|
873
|
+
};
|
|
874
|
+
}, ke = (e, r) => {
|
|
875
|
+
if (typeof e == "object" && e != null && (!e.constructor || e.constructor === Object || Array.isArray(e))) {
|
|
876
|
+
e = Array.isArray(e) ? [...e] : {
|
|
877
|
+
...e
|
|
878
|
+
};
|
|
879
|
+
for (var t of Object.keys(r))
|
|
880
|
+
e[t] = ke(e[t], r[t]);
|
|
881
|
+
return e;
|
|
882
|
+
}
|
|
883
|
+
return r;
|
|
884
|
+
}, xr = (e, r, t, n) => {
|
|
885
|
+
var a = e.error ? e.error.graphQLErrors : [], i = !!e.extensions || !!(r.payload || r).extensions, o = {
|
|
886
|
+
...e.extensions,
|
|
887
|
+
...(r.payload || r).extensions
|
|
888
|
+
}, s = r.incremental;
|
|
889
|
+
"path" in r && (s = [r]);
|
|
890
|
+
var c = {
|
|
891
|
+
data: e.data
|
|
892
|
+
};
|
|
893
|
+
if (s) {
|
|
894
|
+
var l = function(f) {
|
|
895
|
+
Array.isArray(f.errors) && a.push(...f.errors), f.extensions && (Object.assign(o, f.extensions), i = !0);
|
|
896
|
+
var h = "data", k = c, y = [];
|
|
897
|
+
if (f.path)
|
|
898
|
+
y = f.path;
|
|
899
|
+
else if (n) {
|
|
900
|
+
var N = n.find((g) => g.id === f.id);
|
|
901
|
+
f.subPath ? y = [...N.path, ...f.subPath] : y = N.path;
|
|
902
|
+
}
|
|
903
|
+
for (var O = 0, S = y.length; O < S; h = y[O++])
|
|
904
|
+
k = k[h] = Array.isArray(k[h]) ? [...k[h]] : {
|
|
905
|
+
...k[h]
|
|
906
|
+
};
|
|
907
|
+
if (f.items)
|
|
908
|
+
for (var w = +h >= 0 ? h : 0, D = 0, u = f.items.length; D < u; D++)
|
|
909
|
+
k[w + D] = ke(k[w + D], f.items[D]);
|
|
910
|
+
else f.data !== void 0 && (k[h] = ke(k[h], f.data));
|
|
911
|
+
};
|
|
912
|
+
for (var p of s)
|
|
913
|
+
l(p);
|
|
914
|
+
} else
|
|
915
|
+
c.data = (r.payload || r).data || e.data, a = r.errors || r.payload && r.payload.errors || a;
|
|
916
|
+
return {
|
|
917
|
+
operation: e.operation,
|
|
918
|
+
data: c.data,
|
|
919
|
+
error: a.length ? new Ee({
|
|
920
|
+
graphQLErrors: a,
|
|
921
|
+
response: t
|
|
922
|
+
}) : void 0,
|
|
923
|
+
extensions: i ? o : void 0,
|
|
924
|
+
hasNext: r.hasNext != null ? r.hasNext : e.hasNext,
|
|
925
|
+
stale: !1
|
|
926
|
+
};
|
|
927
|
+
}, Nr = (e, r, t) => ({
|
|
928
|
+
operation: e,
|
|
929
|
+
data: void 0,
|
|
930
|
+
error: new Ee({
|
|
931
|
+
networkError: r,
|
|
932
|
+
response: t
|
|
933
|
+
}),
|
|
934
|
+
extensions: void 0,
|
|
935
|
+
hasNext: !1,
|
|
936
|
+
stale: !1
|
|
937
|
+
});
|
|
938
|
+
function wr(e) {
|
|
939
|
+
var r = {
|
|
940
|
+
query: void 0,
|
|
941
|
+
documentId: void 0,
|
|
942
|
+
operationName: He(e.query),
|
|
943
|
+
variables: e.variables || void 0,
|
|
944
|
+
extensions: e.extensions
|
|
945
|
+
};
|
|
946
|
+
return "documentId" in e.query && e.query.documentId && (!e.query.definitions || !e.query.definitions.length) ? r.documentId = e.query.documentId : (!e.extensions || !e.extensions.persistedQuery || e.extensions.persistedQuery.miss) && (r.query = Oe(e.query)), r;
|
|
947
|
+
}
|
|
948
|
+
var br = (e, r) => {
|
|
949
|
+
var t = e.kind === "query" && e.context.preferGetMethod;
|
|
950
|
+
if (!t || !r)
|
|
951
|
+
return e.context.url;
|
|
952
|
+
var n = Er(e.context.url);
|
|
953
|
+
for (var a in r) {
|
|
954
|
+
var i = r[a];
|
|
955
|
+
i && n[1].set(a, typeof i == "object" ? ie(i) : i);
|
|
956
|
+
}
|
|
957
|
+
var o = n.join("?");
|
|
958
|
+
return o.length > 2047 && t !== "force" ? (e.context.preferGetMethod = !1, e.context.url) : o;
|
|
959
|
+
}, Er = (e) => {
|
|
960
|
+
var r = e.indexOf("?");
|
|
961
|
+
return r > -1 ? [e.slice(0, r), new URLSearchParams(e.slice(r + 1))] : [e, new URLSearchParams()];
|
|
962
|
+
}, Or = (e, r) => {
|
|
963
|
+
if (r && !(e.kind === "query" && e.context.preferGetMethod)) {
|
|
964
|
+
var t = ie(r), n = ((s) => {
|
|
965
|
+
var c = /* @__PURE__ */ new Map();
|
|
966
|
+
return (oe !== J || se !== J) && (L.clear(), me(c, "variables", s)), c;
|
|
967
|
+
})(r.variables);
|
|
968
|
+
if (n.size) {
|
|
969
|
+
var a = new FormData();
|
|
970
|
+
a.append("operations", t), a.append("map", ie({
|
|
971
|
+
...[...n.keys()].map((s) => [s])
|
|
972
|
+
}));
|
|
973
|
+
var i = 0;
|
|
974
|
+
for (var o of n.values())
|
|
975
|
+
a.append("" + i++, o);
|
|
976
|
+
return a;
|
|
977
|
+
}
|
|
978
|
+
return t;
|
|
979
|
+
}
|
|
980
|
+
}, Sr = (e, r) => {
|
|
981
|
+
var t = {
|
|
982
|
+
accept: e.kind === "subscription" ? "text/event-stream, multipart/mixed" : "application/graphql-response+json, application/graphql+json, application/json, text/event-stream, multipart/mixed"
|
|
983
|
+
}, n = (typeof e.context.fetchOptions == "function" ? e.context.fetchOptions() : e.context.fetchOptions) || {};
|
|
984
|
+
if (n.headers)
|
|
985
|
+
if (((o) => "has" in o && !Object.keys(o).length)(n.headers))
|
|
986
|
+
n.headers.forEach((o, s) => {
|
|
987
|
+
t[s] = o;
|
|
988
|
+
});
|
|
989
|
+
else if (Array.isArray(n.headers))
|
|
990
|
+
n.headers.forEach((o, s) => {
|
|
991
|
+
Array.isArray(o) ? t[o[0]] ? t[o[0]] = `${t[o[0]]},${o[1]}` : t[o[0]] = o[1] : t[s] = o;
|
|
992
|
+
});
|
|
993
|
+
else
|
|
994
|
+
for (var a in n.headers)
|
|
995
|
+
t[a.toLowerCase()] = n.headers[a];
|
|
996
|
+
var i = Or(e, r);
|
|
997
|
+
return typeof i == "string" && !t["content-type"] && (t["content-type"] = "application/json"), {
|
|
998
|
+
...n,
|
|
999
|
+
method: i ? "POST" : "GET",
|
|
1000
|
+
body: i,
|
|
1001
|
+
headers: t
|
|
1002
|
+
};
|
|
1003
|
+
}, Dr = typeof TextDecoder < "u" ? new TextDecoder() : null, Ar = /boundary="?([^=";]+)"?/i, _r = /data: ?([^\n]+)/, Pe = (e) => e.constructor.name === "Buffer" ? e.toString() : Dr.decode(e);
|
|
1004
|
+
async function* Fe(e) {
|
|
1005
|
+
if (e.body[Symbol.asyncIterator])
|
|
1006
|
+
for await (var r of e.body)
|
|
1007
|
+
yield Pe(r);
|
|
1008
|
+
else {
|
|
1009
|
+
var t = e.body.getReader(), n;
|
|
1010
|
+
try {
|
|
1011
|
+
for (; !(n = await t.read()).done; )
|
|
1012
|
+
yield Pe(n.value);
|
|
1013
|
+
} finally {
|
|
1014
|
+
t.cancel();
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
async function* Re(e, r) {
|
|
1019
|
+
var t = "", n;
|
|
1020
|
+
for await (var a of e)
|
|
1021
|
+
for (t += a; (n = t.indexOf(r)) > -1; )
|
|
1022
|
+
yield t.slice(0, n), t = t.slice(n + r.length);
|
|
1023
|
+
}
|
|
1024
|
+
async function* Ir(e, r, t) {
|
|
1025
|
+
var n = !0, a = null, i;
|
|
1026
|
+
try {
|
|
1027
|
+
yield await Promise.resolve();
|
|
1028
|
+
var o = (i = await (e.context.fetch || fetch)(r, t)).headers.get("Content-Type") || "", s;
|
|
1029
|
+
/multipart\/mixed/i.test(o) ? s = async function* (f, h) {
|
|
1030
|
+
var k = f.match(Ar), y = "--" + (k ? k[1] : "-"), N = !0, O;
|
|
1031
|
+
for await (var S of Re(Fe(h), `\r
|
|
1032
|
+
` + y)) {
|
|
1033
|
+
if (N) {
|
|
1034
|
+
N = !1;
|
|
1035
|
+
var w = S.indexOf(y);
|
|
1036
|
+
if (w > -1)
|
|
1037
|
+
S = S.slice(w + y.length);
|
|
1038
|
+
else
|
|
1039
|
+
continue;
|
|
1040
|
+
}
|
|
1041
|
+
try {
|
|
1042
|
+
yield O = JSON.parse(S.slice(S.indexOf(`\r
|
|
1043
|
+
\r
|
|
1044
|
+
`) + 4));
|
|
1045
|
+
} catch (D) {
|
|
1046
|
+
if (!O)
|
|
1047
|
+
throw D;
|
|
1048
|
+
}
|
|
1049
|
+
if (O && O.hasNext === !1)
|
|
1050
|
+
break;
|
|
1051
|
+
}
|
|
1052
|
+
O && O.hasNext !== !1 && (yield {
|
|
1053
|
+
hasNext: !1
|
|
1054
|
+
});
|
|
1055
|
+
}(o, i) : /text\/event-stream/i.test(o) ? s = async function* (f) {
|
|
1056
|
+
var h;
|
|
1057
|
+
for await (var k of Re(Fe(f), `
|
|
1058
|
+
|
|
1059
|
+
`)) {
|
|
1060
|
+
var y = k.match(_r);
|
|
1061
|
+
if (y) {
|
|
1062
|
+
var N = y[1];
|
|
1063
|
+
try {
|
|
1064
|
+
yield h = JSON.parse(N);
|
|
1065
|
+
} catch (O) {
|
|
1066
|
+
if (!h)
|
|
1067
|
+
throw O;
|
|
1068
|
+
}
|
|
1069
|
+
if (h && h.hasNext === !1)
|
|
1070
|
+
break;
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
h && h.hasNext !== !1 && (yield {
|
|
1074
|
+
hasNext: !1
|
|
1075
|
+
});
|
|
1076
|
+
}(i) : /text\//i.test(o) ? s = async function* (f) {
|
|
1077
|
+
var h = await f.text();
|
|
1078
|
+
try {
|
|
1079
|
+
var k = JSON.parse(h);
|
|
1080
|
+
process.env.NODE_ENV !== "production" && console.warn('Found response with content-type "text/plain" but it had a valid "application/json" response.'), yield k;
|
|
1081
|
+
} catch {
|
|
1082
|
+
throw new Error(h);
|
|
1083
|
+
}
|
|
1084
|
+
}(i) : s = async function* (f) {
|
|
1085
|
+
yield JSON.parse(await f.text());
|
|
1086
|
+
}(i);
|
|
1087
|
+
var c;
|
|
1088
|
+
for await (var l of s)
|
|
1089
|
+
l.pending && !a ? c = l.pending : l.pending && (c = [...c, ...l.pending]), a = a ? xr(a, l, i, c) : ge(e, l, i), n = !1, yield a, n = !0;
|
|
1090
|
+
a || (yield a = ge(e, {}, i));
|
|
1091
|
+
} catch (p) {
|
|
1092
|
+
if (!n)
|
|
1093
|
+
throw p;
|
|
1094
|
+
yield Nr(e, i && (i.status < 200 || i.status >= 300) && i.statusText ? new Error(i.statusText) : p, i);
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
function Cr(e, r, t) {
|
|
1098
|
+
var n;
|
|
1099
|
+
return typeof AbortController < "u" && (t.signal = (n = new AbortController()).signal), be(() => {
|
|
1100
|
+
n && n.abort();
|
|
1101
|
+
})(I((a) => !!a)(ze(Ir(e, r, t))));
|
|
1102
|
+
}
|
|
1103
|
+
var xe = (e, r) => {
|
|
1104
|
+
if (Array.isArray(e))
|
|
1105
|
+
for (var t of e)
|
|
1106
|
+
xe(t, r);
|
|
1107
|
+
else if (typeof e == "object" && e !== null)
|
|
1108
|
+
for (var n in e)
|
|
1109
|
+
n === "__typename" && typeof e[n] == "string" ? r.add(e[n]) : xe(e[n], r);
|
|
1110
|
+
return r;
|
|
1111
|
+
}, Ne = (e) => {
|
|
1112
|
+
if ("definitions" in e) {
|
|
1113
|
+
var r = [];
|
|
1114
|
+
for (var t of e.definitions) {
|
|
1115
|
+
var n = Ne(t);
|
|
1116
|
+
r.push(n);
|
|
1117
|
+
}
|
|
1118
|
+
return {
|
|
1119
|
+
...e,
|
|
1120
|
+
definitions: r
|
|
1121
|
+
};
|
|
1122
|
+
}
|
|
1123
|
+
if ("directives" in e && e.directives && e.directives.length) {
|
|
1124
|
+
var a = [], i = {};
|
|
1125
|
+
for (var o of e.directives) {
|
|
1126
|
+
var s = o.name.value;
|
|
1127
|
+
s[0] !== "_" ? a.push(o) : s = s.slice(1), i[s] = o;
|
|
1128
|
+
}
|
|
1129
|
+
e = {
|
|
1130
|
+
...e,
|
|
1131
|
+
directives: a,
|
|
1132
|
+
_directives: i
|
|
1133
|
+
};
|
|
1134
|
+
}
|
|
1135
|
+
if ("selectionSet" in e) {
|
|
1136
|
+
var c = [], l = e.kind === Q.OPERATION_DEFINITION;
|
|
1137
|
+
if (e.selectionSet) {
|
|
1138
|
+
for (var p of e.selectionSet.selections || []) {
|
|
1139
|
+
l = l || p.kind === Q.FIELD && p.name.value === "__typename" && !p.alias;
|
|
1140
|
+
var f = Ne(p);
|
|
1141
|
+
c.push(f);
|
|
1142
|
+
}
|
|
1143
|
+
return l || c.push({
|
|
1144
|
+
kind: Q.FIELD,
|
|
1145
|
+
name: {
|
|
1146
|
+
kind: Q.NAME,
|
|
1147
|
+
value: "__typename"
|
|
1148
|
+
},
|
|
1149
|
+
_generated: !0
|
|
1150
|
+
}), {
|
|
1151
|
+
...e,
|
|
1152
|
+
selectionSet: {
|
|
1153
|
+
...e.selectionSet,
|
|
1154
|
+
selections: c
|
|
1155
|
+
}
|
|
1156
|
+
};
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
return e;
|
|
1160
|
+
}, $e = /* @__PURE__ */ new Map(), Vr = (e) => {
|
|
1161
|
+
var r = We(e), t = $e.get(r.__key);
|
|
1162
|
+
return t || ($e.set(r.__key, t = Ne(r)), Object.defineProperty(t, "__key", {
|
|
1163
|
+
value: r.__key,
|
|
1164
|
+
enumerable: !1
|
|
1165
|
+
})), t;
|
|
1166
|
+
};
|
|
1167
|
+
function Le(e) {
|
|
1168
|
+
var r = (t) => e(t);
|
|
1169
|
+
return r.toPromise = () => pr(Ge(1)(I((t) => !t.stale && !t.hasNext)(r))), r.then = (t, n) => r.toPromise().then(t, n), r.subscribe = (t) => M(t)(r), r;
|
|
1170
|
+
}
|
|
1171
|
+
function W(e, r, t) {
|
|
1172
|
+
return {
|
|
1173
|
+
...r,
|
|
1174
|
+
kind: e,
|
|
1175
|
+
context: r.context ? {
|
|
1176
|
+
...r.context,
|
|
1177
|
+
...t
|
|
1178
|
+
} : t || r.context
|
|
1179
|
+
};
|
|
1180
|
+
}
|
|
1181
|
+
var Me = (e, r) => W(e.kind, e, {
|
|
1182
|
+
meta: {
|
|
1183
|
+
...e.context.meta,
|
|
1184
|
+
...r
|
|
1185
|
+
}
|
|
1186
|
+
}), qr = () => {
|
|
1187
|
+
}, ve = ({ kind: e }) => e !== "mutation" && e !== "query", Tr = (e) => {
|
|
1188
|
+
var r = Vr(e.query);
|
|
1189
|
+
if (r !== e.query) {
|
|
1190
|
+
var t = W(e.kind, e);
|
|
1191
|
+
return t.query = r, t;
|
|
1192
|
+
} else
|
|
1193
|
+
return e;
|
|
1194
|
+
}, Pr = ({ forward: e, client: r, dispatchDebug: t }) => {
|
|
1195
|
+
var n = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), i = (o) => o.kind === "query" && o.context.requestPolicy !== "network-only" && (o.context.requestPolicy === "cache-only" || n.has(o.key));
|
|
1196
|
+
return (o) => {
|
|
1197
|
+
var s = K((l) => {
|
|
1198
|
+
var p = n.get(l.key);
|
|
1199
|
+
process.env.NODE_ENV !== "production" && t({
|
|
1200
|
+
operation: l,
|
|
1201
|
+
...p ? {
|
|
1202
|
+
type: "cacheHit",
|
|
1203
|
+
message: "The result was successfully retried from the cache"
|
|
1204
|
+
} : {
|
|
1205
|
+
type: "cacheMiss",
|
|
1206
|
+
message: "The result could not be retrieved from the cache"
|
|
1207
|
+
},
|
|
1208
|
+
source: "cacheExchange"
|
|
1209
|
+
});
|
|
1210
|
+
var f = p || ge(l, {
|
|
1211
|
+
data: null
|
|
1212
|
+
});
|
|
1213
|
+
return f = {
|
|
1214
|
+
...f,
|
|
1215
|
+
operation: process.env.NODE_ENV !== "production" ? Me(l, {
|
|
1216
|
+
cacheOutcome: p ? "hit" : "miss"
|
|
1217
|
+
}) : l
|
|
1218
|
+
}, l.context.requestPolicy === "cache-and-network" && (f.stale = !0, je(r, l)), f;
|
|
1219
|
+
})(I((l) => !ve(l) && i(l))(o)), c = G((l) => {
|
|
1220
|
+
var { operation: p } = l;
|
|
1221
|
+
if (p) {
|
|
1222
|
+
var f = p.context.additionalTypenames || [];
|
|
1223
|
+
if (l.operation.kind !== "subscription" && (f = ((g) => [...xe(g, /* @__PURE__ */ new Set())])(l.data).concat(f)), l.operation.kind === "mutation" || l.operation.kind === "subscription") {
|
|
1224
|
+
var h = /* @__PURE__ */ new Set();
|
|
1225
|
+
process.env.NODE_ENV !== "production" && t({
|
|
1226
|
+
type: "cacheInvalidation",
|
|
1227
|
+
message: `The following typenames have been invalidated: ${f}`,
|
|
1228
|
+
operation: p,
|
|
1229
|
+
data: {
|
|
1230
|
+
typenames: f,
|
|
1231
|
+
response: l
|
|
1232
|
+
},
|
|
1233
|
+
source: "cacheExchange"
|
|
1234
|
+
});
|
|
1235
|
+
for (var k = 0; k < f.length; k++) {
|
|
1236
|
+
var y = f[k], N = a.get(y);
|
|
1237
|
+
N || a.set(y, N = /* @__PURE__ */ new Set());
|
|
1238
|
+
for (var O of N.values())
|
|
1239
|
+
h.add(O);
|
|
1240
|
+
N.clear();
|
|
1241
|
+
}
|
|
1242
|
+
for (var S of h.values())
|
|
1243
|
+
n.has(S) && (p = n.get(S).operation, n.delete(S), je(r, p));
|
|
1244
|
+
} else if (p.kind === "query" && l.data) {
|
|
1245
|
+
n.set(p.key, l);
|
|
1246
|
+
for (var w = 0; w < f.length; w++) {
|
|
1247
|
+
var D = f[w], u = a.get(D);
|
|
1248
|
+
u || a.set(D, u = /* @__PURE__ */ new Set()), u.add(p.key);
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
})(e(I((l) => l.kind !== "query" || l.context.requestPolicy !== "cache-only")(K((l) => process.env.NODE_ENV !== "production" ? Me(l, {
|
|
1253
|
+
cacheOutcome: "miss"
|
|
1254
|
+
}) : l)(z([K(Tr)(I((l) => !ve(l) && !i(l))(o)), I((l) => ve(l))(o)])))));
|
|
1255
|
+
return z([s, c]);
|
|
1256
|
+
};
|
|
1257
|
+
}, je = (e, r) => e.reexecuteOperation(W(r.kind, r, {
|
|
1258
|
+
requestPolicy: "network-only"
|
|
1259
|
+
})), Fr = ({ forward: e, dispatchDebug: r }) => (t) => {
|
|
1260
|
+
var n = ae((i) => {
|
|
1261
|
+
var o = wr(i), s = br(i, o), c = Sr(i, o);
|
|
1262
|
+
process.env.NODE_ENV !== "production" && r({
|
|
1263
|
+
type: "fetchRequest",
|
|
1264
|
+
message: "A fetch request is being executed.",
|
|
1265
|
+
operation: i,
|
|
1266
|
+
data: {
|
|
1267
|
+
url: s,
|
|
1268
|
+
fetchOptions: c
|
|
1269
|
+
},
|
|
1270
|
+
source: "fetchExchange"
|
|
1271
|
+
});
|
|
1272
|
+
var l = Je(I((p) => p.kind === "teardown" && p.key === i.key)(t))(Cr(i, s, c));
|
|
1273
|
+
return process.env.NODE_ENV !== "production" ? G((p) => {
|
|
1274
|
+
var f = p.data ? void 0 : p.error;
|
|
1275
|
+
process.env.NODE_ENV !== "production" && r({
|
|
1276
|
+
type: f ? "fetchError" : "fetchSuccess",
|
|
1277
|
+
message: `A ${f ? "failed" : "successful"} fetch response has been returned.`,
|
|
1278
|
+
operation: i,
|
|
1279
|
+
data: {
|
|
1280
|
+
url: s,
|
|
1281
|
+
fetchOptions: c,
|
|
1282
|
+
value: f || p
|
|
1283
|
+
},
|
|
1284
|
+
source: "fetchExchange"
|
|
1285
|
+
});
|
|
1286
|
+
})(l) : l;
|
|
1287
|
+
})(I((i) => i.kind !== "teardown" && (i.kind !== "subscription" || !!i.context.fetchSubscriptions))(t)), a = e(I((i) => i.kind === "teardown" || i.kind === "subscription" && !i.context.fetchSubscriptions)(t));
|
|
1288
|
+
return z([n, a]);
|
|
1289
|
+
}, Rr = (e) => ({ client: r, forward: t, dispatchDebug: n }) => e.reduceRight((a, i) => {
|
|
1290
|
+
var o = !1;
|
|
1291
|
+
return i({
|
|
1292
|
+
client: r,
|
|
1293
|
+
forward(s) {
|
|
1294
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1295
|
+
if (o)
|
|
1296
|
+
throw new Error("forward() must only be called once in each Exchange.");
|
|
1297
|
+
o = !0;
|
|
1298
|
+
}
|
|
1299
|
+
return Y(a(Y(s)));
|
|
1300
|
+
},
|
|
1301
|
+
dispatchDebug(s) {
|
|
1302
|
+
process.env.NODE_ENV !== "production" && n({
|
|
1303
|
+
timestamp: Date.now(),
|
|
1304
|
+
source: i.name,
|
|
1305
|
+
...s
|
|
1306
|
+
});
|
|
1307
|
+
}
|
|
1308
|
+
});
|
|
1309
|
+
}, t), $r = ({ onOperation: e, onResult: r, onError: t }) => ({ forward: n }) => (a) => ae((i) => {
|
|
1310
|
+
t && i.error && t(i.error, i.operation);
|
|
1311
|
+
var o = r && r(i) || i;
|
|
1312
|
+
return "then" in o ? Ie(o) : U(o);
|
|
1313
|
+
})(n(ae((i) => {
|
|
1314
|
+
var o = e && e(i) || i;
|
|
1315
|
+
return "then" in o ? Ie(o) : U(o);
|
|
1316
|
+
})(a))), Lr = ({ dispatchDebug: e }) => (r) => (process.env.NODE_ENV !== "production" && (r = G((t) => {
|
|
1317
|
+
if (t.kind !== "teardown" && process.env.NODE_ENV !== "production") {
|
|
1318
|
+
var n = `No exchange has handled operations of kind "${t.kind}". Check whether you've added an exchange responsible for these operations.`;
|
|
1319
|
+
process.env.NODE_ENV !== "production" && e({
|
|
1320
|
+
type: "fallbackCatch",
|
|
1321
|
+
message: n,
|
|
1322
|
+
operation: t,
|
|
1323
|
+
source: "fallbackExchange"
|
|
1324
|
+
}), console.warn(n);
|
|
1325
|
+
}
|
|
1326
|
+
})(r)), I((t) => !1)(r)), Mr = function e(r) {
|
|
1327
|
+
if (process.env.NODE_ENV !== "production" && !r.url)
|
|
1328
|
+
throw new Error("You are creating an urql-client without a url.");
|
|
1329
|
+
var t = 0, n = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(), o = [], s = {
|
|
1330
|
+
url: r.url,
|
|
1331
|
+
fetchSubscriptions: r.fetchSubscriptions,
|
|
1332
|
+
fetchOptions: r.fetchOptions,
|
|
1333
|
+
fetch: r.fetch,
|
|
1334
|
+
preferGetMethod: r.preferGetMethod,
|
|
1335
|
+
requestPolicy: r.requestPolicy || "cache-first"
|
|
1336
|
+
}, c = _e();
|
|
1337
|
+
function l(u) {
|
|
1338
|
+
(u.kind === "mutation" || u.kind === "teardown" || !i.has(u.key)) && (u.kind === "teardown" ? i.delete(u.key) : u.kind !== "mutation" && i.add(u.key), c.next(u));
|
|
1339
|
+
}
|
|
1340
|
+
var p = !1;
|
|
1341
|
+
function f(u) {
|
|
1342
|
+
if (u && l(u), !p) {
|
|
1343
|
+
for (p = !0; p && (u = o.shift()); )
|
|
1344
|
+
l(u);
|
|
1345
|
+
p = !1;
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
var h = (u) => {
|
|
1349
|
+
var g = Je(I((v) => v.kind === "teardown" && v.key === u.key)(c.source))(I((v) => v.operation.kind === u.kind && v.operation.key === u.key && (!v.operation.context._instance || v.operation.context._instance === u.context._instance))(D));
|
|
1350
|
+
return u.kind !== "query" ? g = Ue((v) => !!v.hasNext, !0)(g) : g = Ae((v) => {
|
|
1351
|
+
var C = U(v);
|
|
1352
|
+
return v.stale || v.hasNext ? C : z([C, K(() => (v.stale = !0, v))(Ge(1)(I((le) => le.key === u.key)(c.source)))]);
|
|
1353
|
+
})(g), u.kind !== "mutation" ? g = be(() => {
|
|
1354
|
+
i.delete(u.key), n.delete(u.key), a.delete(u.key), p = !1;
|
|
1355
|
+
for (var v = o.length - 1; v >= 0; v--)
|
|
1356
|
+
o[v].key === u.key && o.splice(v, 1);
|
|
1357
|
+
l(W("teardown", u, u.context));
|
|
1358
|
+
})(G((v) => {
|
|
1359
|
+
if (v.stale) {
|
|
1360
|
+
if (!v.hasNext)
|
|
1361
|
+
i.delete(u.key);
|
|
1362
|
+
else
|
|
1363
|
+
for (var C of o)
|
|
1364
|
+
if (C.key === v.operation.key) {
|
|
1365
|
+
i.delete(C.key);
|
|
1366
|
+
break;
|
|
1367
|
+
}
|
|
1368
|
+
} else v.hasNext || i.delete(u.key);
|
|
1369
|
+
n.set(u.key, v);
|
|
1370
|
+
})(g)) : g = De(() => {
|
|
1371
|
+
l(u);
|
|
1372
|
+
})(g), Y(g);
|
|
1373
|
+
}, k = this instanceof e ? this : Object.create(e.prototype), y = Object.assign(k, {
|
|
1374
|
+
suspense: !!r.suspense,
|
|
1375
|
+
operations$: c.source,
|
|
1376
|
+
reexecuteOperation(u) {
|
|
1377
|
+
if (u.kind === "teardown")
|
|
1378
|
+
f(u);
|
|
1379
|
+
else if (u.kind === "mutation")
|
|
1380
|
+
o.push(u), Promise.resolve().then(f);
|
|
1381
|
+
else if (a.has(u.key)) {
|
|
1382
|
+
for (var g = !1, v = 0; v < o.length; v++)
|
|
1383
|
+
o[v].key === u.key && (o[v] = u, g = !0);
|
|
1384
|
+
g || i.has(u.key) && u.context.requestPolicy !== "network-only" ? (i.delete(u.key), Promise.resolve().then(f)) : (o.push(u), Promise.resolve().then(f));
|
|
1385
|
+
}
|
|
1386
|
+
},
|
|
1387
|
+
createRequestOperation(u, g, v) {
|
|
1388
|
+
v || (v = {});
|
|
1389
|
+
var C;
|
|
1390
|
+
if (process.env.NODE_ENV !== "production" && u !== "teardown" && (C = kr(g.query)) !== u)
|
|
1391
|
+
throw new Error(`Expected operation of type "${u}" but found "${C}"`);
|
|
1392
|
+
return W(u, g, {
|
|
1393
|
+
_instance: u === "mutation" ? t = t + 1 | 0 : void 0,
|
|
1394
|
+
...s,
|
|
1395
|
+
...v,
|
|
1396
|
+
requestPolicy: v.requestPolicy || s.requestPolicy,
|
|
1397
|
+
suspense: v.suspense || v.suspense !== !1 && y.suspense
|
|
1398
|
+
});
|
|
1399
|
+
},
|
|
1400
|
+
executeRequestOperation(u) {
|
|
1401
|
+
return u.kind === "mutation" ? Le(h(u)) : Le(cr(() => {
|
|
1402
|
+
var g = a.get(u.key);
|
|
1403
|
+
g || a.set(u.key, g = h(u)), g = De(() => {
|
|
1404
|
+
f(u);
|
|
1405
|
+
})(g);
|
|
1406
|
+
var v = n.get(u.key);
|
|
1407
|
+
return u.kind === "query" && v && (v.stale || v.hasNext) ? Ae(U)(z([g, I((C) => C === n.get(u.key))(U(v))])) : g;
|
|
1408
|
+
}));
|
|
1409
|
+
},
|
|
1410
|
+
executeQuery(u, g) {
|
|
1411
|
+
var v = y.createRequestOperation("query", u, g);
|
|
1412
|
+
return y.executeRequestOperation(v);
|
|
1413
|
+
},
|
|
1414
|
+
executeSubscription(u, g) {
|
|
1415
|
+
var v = y.createRequestOperation("subscription", u, g);
|
|
1416
|
+
return y.executeRequestOperation(v);
|
|
1417
|
+
},
|
|
1418
|
+
executeMutation(u, g) {
|
|
1419
|
+
var v = y.createRequestOperation("mutation", u, g);
|
|
1420
|
+
return y.executeRequestOperation(v);
|
|
1421
|
+
},
|
|
1422
|
+
readQuery(u, g, v) {
|
|
1423
|
+
var C = null;
|
|
1424
|
+
return M((le) => {
|
|
1425
|
+
C = le;
|
|
1426
|
+
})(y.query(u, g, v)).unsubscribe(), C;
|
|
1427
|
+
},
|
|
1428
|
+
query: (u, g, v) => y.executeQuery(re(u, g), v),
|
|
1429
|
+
subscription: (u, g, v) => y.executeSubscription(re(u, g), v),
|
|
1430
|
+
mutation: (u, g, v) => y.executeMutation(re(u, g), v)
|
|
1431
|
+
}), N = qr;
|
|
1432
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1433
|
+
var { next: O, source: S } = _e();
|
|
1434
|
+
y.subscribeToDebugTarget = (u) => M(u)(S), N = O;
|
|
1435
|
+
}
|
|
1436
|
+
var w = Rr(r.exchanges), D = Y(w({
|
|
1437
|
+
client: y,
|
|
1438
|
+
dispatchDebug: N,
|
|
1439
|
+
forward: Lr({
|
|
1440
|
+
dispatchDebug: N
|
|
1441
|
+
})
|
|
1442
|
+
})(c.source));
|
|
1443
|
+
return dr(D), y;
|
|
1444
|
+
}, Ze = {}, ue = F.createContext(Ze), jr = ue.Provider;
|
|
1445
|
+
ue.Consumer;
|
|
1446
|
+
ue.displayName = "UrqlContext";
|
|
1447
|
+
var Qr = () => {
|
|
1448
|
+
var e = F.useContext(ue);
|
|
1449
|
+
if (e === Ze && process.env.NODE_ENV !== "production") {
|
|
1450
|
+
var r = "No client has been specified using urql's Provider. please create a client and add a Provider.";
|
|
1451
|
+
throw console.error(r), new Error(r);
|
|
1452
|
+
}
|
|
1453
|
+
return e;
|
|
1454
|
+
}, Br = {
|
|
1455
|
+
fetching: !1,
|
|
1456
|
+
stale: !1,
|
|
1457
|
+
error: void 0,
|
|
1458
|
+
data: void 0,
|
|
1459
|
+
extensions: void 0,
|
|
1460
|
+
operation: void 0
|
|
1461
|
+
}, Gr = (e, r) => e === r || !(!e || !r || e.key !== r.key), de = (e, r) => {
|
|
1462
|
+
var t = {
|
|
1463
|
+
...e,
|
|
1464
|
+
...r,
|
|
1465
|
+
data: r.data !== void 0 || r.error ? r.data : e.data,
|
|
1466
|
+
fetching: !!r.fetching,
|
|
1467
|
+
stale: !!r.stale
|
|
1468
|
+
};
|
|
1469
|
+
return ((n, a) => {
|
|
1470
|
+
for (var i in n)
|
|
1471
|
+
if (!(i in a))
|
|
1472
|
+
return !0;
|
|
1473
|
+
for (var o in a)
|
|
1474
|
+
if (o === "operation" ? !Gr(n[o], a[o]) : n[o] !== a[o])
|
|
1475
|
+
return !0;
|
|
1476
|
+
return !1;
|
|
1477
|
+
})(e, t) ? t : e;
|
|
1478
|
+
}, Jr = (e, r) => {
|
|
1479
|
+
for (var t = 0, n = r.length; t < n; t++)
|
|
1480
|
+
if (e[t] !== r[t])
|
|
1481
|
+
return !0;
|
|
1482
|
+
return !1;
|
|
1483
|
+
}, pe = F.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
1484
|
+
function Qe(e, r) {
|
|
1485
|
+
process.env.NODE_ENV !== "production" && pe && pe.ReactCurrentOwner && pe.ReactCurrentOwner.current ? Promise.resolve(r).then(e) : e(r);
|
|
1486
|
+
}
|
|
1487
|
+
function Ur(e, r) {
|
|
1488
|
+
var t = F.useRef(void 0);
|
|
1489
|
+
return F.useMemo(() => {
|
|
1490
|
+
var n = re(e, r);
|
|
1491
|
+
return t.current !== void 0 && t.current.key === n.key ? t.current : (t.current = n, n);
|
|
1492
|
+
}, [e, r]);
|
|
1493
|
+
}
|
|
1494
|
+
var zr = (e) => {
|
|
1495
|
+
if (!e._react) {
|
|
1496
|
+
var r = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Map();
|
|
1497
|
+
e.operations$ && M((n) => {
|
|
1498
|
+
n.kind === "teardown" && r.has(n.key) && (r.delete(n.key), t.delete(n.key));
|
|
1499
|
+
})(e.operations$), e._react = {
|
|
1500
|
+
get: (n) => t.get(n),
|
|
1501
|
+
set(n, a) {
|
|
1502
|
+
r.delete(n), t.set(n, a);
|
|
1503
|
+
},
|
|
1504
|
+
dispose(n) {
|
|
1505
|
+
r.add(n);
|
|
1506
|
+
}
|
|
1507
|
+
};
|
|
1508
|
+
}
|
|
1509
|
+
return e._react;
|
|
1510
|
+
}, Yr = (e, r) => r && r.suspense !== void 0 ? !!r.suspense : e.suspense;
|
|
1511
|
+
function Wr(e) {
|
|
1512
|
+
var r = Qr(), t = zr(r), n = Yr(r, e.context), a = Ur(e.query, e.variables), i = F.useMemo(() => {
|
|
1513
|
+
if (e.pause)
|
|
1514
|
+
return null;
|
|
1515
|
+
var h = r.executeQuery(a, {
|
|
1516
|
+
requestPolicy: e.requestPolicy,
|
|
1517
|
+
...e.context
|
|
1518
|
+
});
|
|
1519
|
+
return n ? G((k) => {
|
|
1520
|
+
t.set(a.key, k);
|
|
1521
|
+
})(h) : h;
|
|
1522
|
+
}, [t, r, a, n, e.pause, e.requestPolicy, e.context]), o = F.useCallback((h, k) => {
|
|
1523
|
+
if (!h)
|
|
1524
|
+
return {
|
|
1525
|
+
fetching: !1
|
|
1526
|
+
};
|
|
1527
|
+
var y = t.get(a.key);
|
|
1528
|
+
if (y) {
|
|
1529
|
+
if (k && y != null && "then" in y)
|
|
1530
|
+
throw y;
|
|
1531
|
+
} else {
|
|
1532
|
+
var N, O = M((w) => {
|
|
1533
|
+
y = w, N && N(y);
|
|
1534
|
+
})(Ue(() => k && !N || !y)(h));
|
|
1535
|
+
if (y == null && k) {
|
|
1536
|
+
var S = new Promise((w) => {
|
|
1537
|
+
N = w;
|
|
1538
|
+
});
|
|
1539
|
+
throw t.set(a.key, S), S;
|
|
1540
|
+
} else
|
|
1541
|
+
O.unsubscribe();
|
|
1542
|
+
}
|
|
1543
|
+
return y || {
|
|
1544
|
+
fetching: !0
|
|
1545
|
+
};
|
|
1546
|
+
}, [t, a]), s = [r, a, e.requestPolicy, e.context, e.pause], [c, l] = F.useState(() => [i, de(Br, o(i, n)), s]), p = c[1];
|
|
1547
|
+
i !== c[0] && Jr(c[2], s) && l([i, p = de(c[1], o(i, n)), s]), F.useEffect(() => {
|
|
1548
|
+
var h = c[0], k = c[2][1], y = !1, N = (S) => {
|
|
1549
|
+
y = !0, Qe(l, (w) => {
|
|
1550
|
+
var D = de(w[1], S);
|
|
1551
|
+
return w[1] !== D ? [w[0], D, w[2]] : w;
|
|
1552
|
+
});
|
|
1553
|
+
};
|
|
1554
|
+
if (h) {
|
|
1555
|
+
var O = M(N)(be(() => {
|
|
1556
|
+
N({
|
|
1557
|
+
fetching: !1
|
|
1558
|
+
});
|
|
1559
|
+
})(h));
|
|
1560
|
+
return y || N({
|
|
1561
|
+
fetching: !0
|
|
1562
|
+
}), () => {
|
|
1563
|
+
t.dispose(k.key), O.unsubscribe();
|
|
1564
|
+
};
|
|
1565
|
+
} else
|
|
1566
|
+
N({
|
|
1567
|
+
fetching: !1
|
|
1568
|
+
});
|
|
1569
|
+
}, [t, c[0], c[2][1]]);
|
|
1570
|
+
var f = F.useCallback((h) => {
|
|
1571
|
+
var k = {
|
|
1572
|
+
requestPolicy: e.requestPolicy,
|
|
1573
|
+
...e.context,
|
|
1574
|
+
...h
|
|
1575
|
+
};
|
|
1576
|
+
Qe(l, (y) => [n ? G((N) => {
|
|
1577
|
+
t.set(a.key, N);
|
|
1578
|
+
})(r.executeQuery(a, k)) : r.executeQuery(a, k), y[1], s]);
|
|
1579
|
+
}, [r, t, a, n, e.requestPolicy, e.context, e.pause]);
|
|
1580
|
+
return [p, f];
|
|
1581
|
+
}
|
|
1582
|
+
const Hr = Wr, Zr = jr, Kr = Pr, Xr = Fr, et = $r, rt = Mr;
|
|
1583
|
+
export {
|
|
1584
|
+
rt as C,
|
|
1585
|
+
Zr as P,
|
|
1586
|
+
Hr as a,
|
|
1587
|
+
Kr as c,
|
|
1588
|
+
Xr as f,
|
|
1589
|
+
et as m,
|
|
1590
|
+
Wr as u
|
|
1591
|
+
};
|