@softistx/alxia-react-router 0.0.0-stage → 0.83.1
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/LICENSE +21 -0
- package/README.md +2085 -2
- package/dist/api-keys/api-keys.d.ts +93 -0
- package/dist/api-keys/api-keys.d.ts.map +1 -0
- package/dist/api-keys/index.d.ts +9 -0
- package/dist/api-keys/index.d.ts.map +1 -0
- package/dist/api-keys/index.js +66 -0
- package/dist/api-keys/index.js.map +10 -0
- package/dist/assets.d.ts +14 -0
- package/dist/assets.d.ts.map +1 -0
- package/dist/chunks/index-0786n4qe.js +25 -0
- package/dist/chunks/index-0786n4qe.js.map +10 -0
- package/dist/chunks/index-1nw5yeek.js +169 -0
- package/dist/chunks/index-1nw5yeek.js.map +11 -0
- package/dist/chunks/index-59vhfj6n.js +10 -0
- package/dist/chunks/index-59vhfj6n.js.map +10 -0
- package/dist/chunks/index-5gqcpyyg.js +34 -0
- package/dist/chunks/index-5gqcpyyg.js.map +10 -0
- package/dist/chunks/index-6jf7zpxz.js +119 -0
- package/dist/chunks/index-6jf7zpxz.js.map +11 -0
- package/dist/chunks/index-8as4j8m3.js +340 -0
- package/dist/chunks/index-8as4j8m3.js.map +16 -0
- package/dist/chunks/index-9xv2a8et.js +108 -0
- package/dist/chunks/index-9xv2a8et.js.map +11 -0
- package/dist/chunks/index-ajtvyq35.js +16 -0
- package/dist/chunks/index-ajtvyq35.js.map +10 -0
- package/dist/chunks/index-c55hxgr5.js +124 -0
- package/dist/chunks/index-c55hxgr5.js.map +14 -0
- package/dist/chunks/index-d42p3mdp.js +19 -0
- package/dist/chunks/index-d42p3mdp.js.map +10 -0
- package/dist/chunks/index-gac44rs5.js +42 -0
- package/dist/chunks/index-gac44rs5.js.map +11 -0
- package/dist/chunks/index-j4ktpcke.js +62 -0
- package/dist/chunks/index-j4ktpcke.js.map +10 -0
- package/dist/chunks/index-mscfme4r.js +12 -0
- package/dist/chunks/index-mscfme4r.js.map +10 -0
- package/dist/chunks/index-pghmb2dm.js +30 -0
- package/dist/chunks/index-pghmb2dm.js.map +10 -0
- package/dist/chunks/index-rfr02vg4.js +40 -0
- package/dist/chunks/index-rfr02vg4.js.map +10 -0
- package/dist/chunks/index-sfhshxqz.js +31 -0
- package/dist/chunks/index-sfhshxqz.js.map +10 -0
- package/dist/chunks/index-skwypsjz.js +357 -0
- package/dist/chunks/index-skwypsjz.js.map +12 -0
- package/dist/chunks/index-sxh06ged.js +118 -0
- package/dist/chunks/index-sxh06ged.js.map +11 -0
- package/dist/chunks/index-t2ph23wk.js +96 -0
- package/dist/chunks/index-t2ph23wk.js.map +13 -0
- package/dist/chunks/index-thyabr5n.js +19 -0
- package/dist/chunks/index-thyabr5n.js.map +10 -0
- package/dist/chunks/index-tx36swjx.js +134 -0
- package/dist/chunks/index-tx36swjx.js.map +11 -0
- package/dist/chunks/index-v2z5k640.js +54 -0
- package/dist/chunks/index-v2z5k640.js.map +11 -0
- package/dist/chunks/index-vr82typq.js +23 -0
- package/dist/chunks/index-vr82typq.js.map +11 -0
- package/dist/chunks/index-whj6h5eg.js +9 -0
- package/dist/chunks/index-whj6h5eg.js.map +10 -0
- package/dist/chunks/index-wyypkfdv.js +130 -0
- package/dist/chunks/index-wyypkfdv.js.map +13 -0
- package/dist/chunks/index-xd5aqy3g.js +90 -0
- package/dist/chunks/index-xd5aqy3g.js.map +10 -0
- package/dist/chunks/index-zdbqzcjp.js +97 -0
- package/dist/chunks/index-zdbqzcjp.js.map +12 -0
- package/dist/chunks/index-zyg8amjc.js +23 -0
- package/dist/chunks/index-zyg8amjc.js.map +10 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +215 -0
- package/dist/cli/index.js.map +13 -0
- package/dist/cli/main.d.ts +13 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/reveal.d.ts +18 -0
- package/dist/cli/reveal.d.ts.map +1 -0
- package/dist/cli/template.d.ts +8 -0
- package/dist/cli/template.d.ts.map +1 -0
- package/dist/context.d.ts +104 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/document/index.d.ts +11 -0
- package/dist/document/index.d.ts.map +1 -0
- package/dist/document/index.js +19 -0
- package/dist/document/index.js.map +9 -0
- package/dist/document/inline-script.d.ts +27 -0
- package/dist/document/inline-script.d.ts.map +1 -0
- package/dist/document/language-store.d.ts +8 -0
- package/dist/document/language-store.d.ts.map +1 -0
- package/dist/document/nonce.d.ts +34 -0
- package/dist/document/nonce.d.ts.map +1 -0
- package/dist/document/page-language.d.ts +39 -0
- package/dist/document/page-language.d.ts.map +1 -0
- package/dist/document/text-direction.d.ts +10 -0
- package/dist/document/text-direction.d.ts.map +1 -0
- package/dist/entry/abort.d.ts +21 -0
- package/dist/entry/abort.d.ts.map +1 -0
- package/dist/entry/create-entry.d.ts +41 -0
- package/dist/entry/create-entry.d.ts.map +1 -0
- package/dist/entry/index.d.ts +8 -0
- package/dist/entry/index.d.ts.map +1 -0
- package/dist/entry/index.js +154 -0
- package/dist/entry/index.js.map +13 -0
- package/dist/entry/root-data.d.ts +27 -0
- package/dist/entry/root-data.d.ts.map +1 -0
- package/dist/entry/whole-page.d.ts +10 -0
- package/dist/entry/whole-page.d.ts.map +1 -0
- package/dist/errors/api-error.d.ts +117 -0
- package/dist/errors/api-error.d.ts.map +1 -0
- package/dist/errors/api-errors.d.ts +122 -0
- package/dist/errors/api-errors.d.ts.map +1 -0
- package/dist/errors/call-failure.d.ts +45 -0
- package/dist/errors/call-failure.d.ts.map +1 -0
- package/dist/errors/catalogue-check.d.ts +24 -0
- package/dist/errors/catalogue-check.d.ts.map +1 -0
- package/dist/errors/catalogue-read.d.ts +33 -0
- package/dist/errors/catalogue-read.d.ts.map +1 -0
- package/dist/errors/catalogue.d.ts +59 -0
- package/dist/errors/catalogue.d.ts.map +1 -0
- package/dist/errors/code-resolver.d.ts +44 -0
- package/dist/errors/code-resolver.d.ts.map +1 -0
- package/dist/errors/cross-site.d.ts +8 -0
- package/dist/errors/cross-site.d.ts.map +1 -0
- package/dist/errors/describe-refusal.d.ts +6 -0
- package/dist/errors/describe-refusal.d.ts.map +1 -0
- package/dist/errors/describe.d.ts +3 -0
- package/dist/errors/describe.d.ts.map +1 -0
- package/dist/errors/fetcher-result.d.ts +33 -0
- package/dist/errors/fetcher-result.d.ts.map +1 -0
- package/dist/errors/field-placement.d.ts +12 -0
- package/dist/errors/field-placement.d.ts.map +1 -0
- package/dist/errors/form-errors.d.ts +8 -0
- package/dist/errors/form-errors.d.ts.map +1 -0
- package/dist/errors/form-refusal.d.ts +25 -0
- package/dist/errors/form-refusal.d.ts.map +1 -0
- package/dist/errors/index.d.ts +21 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +588 -0
- package/dist/errors/index.js.map +26 -0
- package/dist/errors/json-actions.d.ts +38 -0
- package/dist/errors/json-actions.d.ts.map +1 -0
- package/dist/errors/log.d.ts +8 -0
- package/dist/errors/log.d.ts.map +1 -0
- package/dist/errors/message-values.d.ts +11 -0
- package/dist/errors/message-values.d.ts.map +1 -0
- package/dist/errors/messages.d.ts +63 -0
- package/dist/errors/messages.d.ts.map +1 -0
- package/dist/errors/page-path.d.ts +9 -0
- package/dist/errors/page-path.d.ts.map +1 -0
- package/dist/errors/problem-error.d.ts +50 -0
- package/dist/errors/problem-error.d.ts.map +1 -0
- package/dist/errors/provider.d.ts +20 -0
- package/dist/errors/provider.d.ts.map +1 -0
- package/dist/errors/request-id.d.ts +5 -0
- package/dist/errors/request-id.d.ts.map +1 -0
- package/dist/errors/route-error.d.ts +33 -0
- package/dist/errors/route-error.d.ts.map +1 -0
- package/dist/errors/route-refusal.d.ts +20 -0
- package/dist/errors/route-refusal.d.ts.map +1 -0
- package/dist/errors/same-site.d.ts +49 -0
- package/dist/errors/same-site.d.ts.map +1 -0
- package/dist/errors/section-action.d.ts +46 -0
- package/dist/errors/section-action.d.ts.map +1 -0
- package/dist/errors/standard-schema.d.ts +34 -0
- package/dist/errors/standard-schema.d.ts.map +1 -0
- package/dist/errors/submit-form.d.ts +16 -0
- package/dist/errors/submit-form.d.ts.map +1 -0
- package/dist/errors/upstream-headers.d.ts +18 -0
- package/dist/errors/upstream-headers.d.ts.map +1 -0
- package/dist/errors/use-json-fetcher.d.ts +18 -0
- package/dist/errors/use-json-fetcher.d.ts.map +1 -0
- package/dist/fetcher/auth-refusal.d.ts +29 -0
- package/dist/fetcher/auth-refusal.d.ts.map +1 -0
- package/dist/fetcher/index.d.ts +20 -0
- package/dist/fetcher/index.d.ts.map +1 -0
- package/dist/fetcher/index.js +392 -0
- package/dist/fetcher/index.js.map +21 -0
- package/dist/fetcher/section-form.d.ts +24 -0
- package/dist/fetcher/section-form.d.ts.map +1 -0
- package/dist/fetcher/section-reload.d.ts +17 -0
- package/dist/fetcher/section-reload.d.ts.map +1 -0
- package/dist/fetcher/section-save.d.ts +29 -0
- package/dist/fetcher/section-save.d.ts.map +1 -0
- package/dist/fetcher/use-debounced-fetcher.d.ts +57 -0
- package/dist/fetcher/use-debounced-fetcher.d.ts.map +1 -0
- package/dist/fetcher/use-fetcher-answer.d.ts +16 -0
- package/dist/fetcher/use-fetcher-answer.d.ts.map +1 -0
- package/dist/fetcher/use-fetcher-done.d.ts +15 -0
- package/dist/fetcher/use-fetcher-done.d.ts.map +1 -0
- package/dist/fetcher/use-fetcher-promise.d.ts +48 -0
- package/dist/fetcher/use-fetcher-promise.d.ts.map +1 -0
- package/dist/fetcher/use-form-refusal.d.ts +20 -0
- package/dist/fetcher/use-form-refusal.d.ts.map +1 -0
- package/dist/fetcher/use-revalidate-on-focus.d.ts +20 -0
- package/dist/fetcher/use-revalidate-on-focus.d.ts.map +1 -0
- package/dist/fetcher/use-row-save.d.ts +32 -0
- package/dist/fetcher/use-row-save.d.ts.map +1 -0
- package/dist/fetcher/use-section-save.d.ts +46 -0
- package/dist/fetcher/use-section-save.d.ts.map +1 -0
- package/dist/fetcher/use-visible-interval.d.ts +24 -0
- package/dist/fetcher/use-visible-interval.d.ts.map +1 -0
- package/dist/fetcher/use-visible-revalidation.d.ts +10 -0
- package/dist/fetcher/use-visible-revalidation.d.ts.map +1 -0
- package/dist/health.d.ts +21 -0
- package/dist/health.d.ts.map +1 -0
- package/dist/help/check/check.d.ts +35 -0
- package/dist/help/check/check.d.ts.map +1 -0
- package/dist/help/check/index.d.ts +8 -0
- package/dist/help/check/index.d.ts.map +1 -0
- package/dist/help/check/index.js +17 -0
- package/dist/help/check/index.js.map +9 -0
- package/dist/help/check/routes.d.ts +22 -0
- package/dist/help/check/routes.d.ts.map +1 -0
- package/dist/help/guide.d.ts +33 -0
- package/dist/help/guide.d.ts.map +1 -0
- package/dist/help/index.d.ts +16 -0
- package/dist/help/index.d.ts.map +1 -0
- package/dist/help/index.js +192 -0
- package/dist/help/index.js.map +14 -0
- package/dist/help/load.d.ts +39 -0
- package/dist/help/load.d.ts.map +1 -0
- package/dist/help/panel.d.ts +69 -0
- package/dist/help/panel.d.ts.map +1 -0
- package/dist/help/parse-flow.d.ts +27 -0
- package/dist/help/parse-flow.d.ts.map +1 -0
- package/dist/help/react.d.ts +12 -0
- package/dist/help/react.d.ts.map +1 -0
- package/dist/help/resolve.d.ts +24 -0
- package/dist/help/resolve.d.ts.map +1 -0
- package/dist/help/types.d.ts +50 -0
- package/dist/help/types.d.ts.map +1 -0
- package/dist/help/yaml.d.ts +18 -0
- package/dist/help/yaml.d.ts.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +197 -0
- package/dist/index.js.map +14 -0
- package/dist/link/index.d.ts +7 -0
- package/dist/link/index.d.ts.map +1 -0
- package/dist/link/index.js +16 -0
- package/dist/link/index.js.map +10 -0
- package/dist/link/router-link.d.ts +27 -0
- package/dist/link/router-link.d.ts.map +1 -0
- package/dist/lists/connection-page.d.ts +50 -0
- package/dist/lists/connection-page.d.ts.map +1 -0
- package/dist/lists/index.d.ts +13 -0
- package/dist/lists/index.d.ts.map +1 -0
- package/dist/lists/index.js +205 -0
- package/dist/lists/index.js.map +15 -0
- package/dist/lists/newest-first.d.ts +5 -0
- package/dist/lists/newest-first.d.ts.map +1 -0
- package/dist/lists/nodes-of.d.ts +21 -0
- package/dist/lists/nodes-of.d.ts.map +1 -0
- package/dist/lists/or-failed.d.ts +19 -0
- package/dist/lists/or-failed.d.ts.map +1 -0
- package/dist/lists/use-paged-rows.d.ts +40 -0
- package/dist/lists/use-paged-rows.d.ts.map +1 -0
- package/dist/lists/use-same-route-loading.d.ts +8 -0
- package/dist/lists/use-same-route-loading.d.ts.map +1 -0
- package/dist/lists/use-search-change.d.ts +20 -0
- package/dist/lists/use-search-change.d.ts.map +1 -0
- package/dist/mcp/index.d.ts +8 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +105 -0
- package/dist/mcp/index.js.map +11 -0
- package/dist/mcp/mcp-relay.d.ts +58 -0
- package/dist/mcp/mcp-relay.d.ts.map +1 -0
- package/dist/mcp/relay.d.ts +38 -0
- package/dist/mcp/relay.d.ts.map +1 -0
- package/dist/media/client/error.d.ts +29 -0
- package/dist/media/client/error.d.ts.map +1 -0
- package/dist/media/client/index.d.ts +8 -0
- package/dist/media/client/index.d.ts.map +1 -0
- package/dist/media/client/index.js +133 -0
- package/dist/media/client/index.js.map +11 -0
- package/dist/media/client/upload.d.ts +32 -0
- package/dist/media/client/upload.d.ts.map +1 -0
- package/dist/media/forward.d.ts +14 -0
- package/dist/media/forward.d.ts.map +1 -0
- package/dist/media/headers.d.ts +11 -0
- package/dist/media/headers.d.ts.map +1 -0
- package/dist/media/index.d.ts +9 -0
- package/dist/media/index.d.ts.map +1 -0
- package/dist/media/index.js +396 -0
- package/dist/media/index.js.map +16 -0
- package/dist/media/options.d.ts +114 -0
- package/dist/media/options.d.ts.map +1 -0
- package/dist/media/path.d.ts +12 -0
- package/dist/media/path.d.ts.map +1 -0
- package/dist/media/read.d.ts +11 -0
- package/dist/media/read.d.ts.map +1 -0
- package/dist/media/refusal.d.ts +11 -0
- package/dist/media/refusal.d.ts.map +1 -0
- package/dist/media/respond.d.ts +8 -0
- package/dist/media/respond.d.ts.map +1 -0
- package/dist/media/write.d.ts +13 -0
- package/dist/media/write.d.ts.map +1 -0
- package/dist/navigation/index.d.ts +9 -0
- package/dist/navigation/index.d.ts.map +1 -0
- package/dist/navigation/index.js +48 -0
- package/dist/navigation/index.js.map +11 -0
- package/dist/navigation/use-focus-on-navigate.d.ts +16 -0
- package/dist/navigation/use-focus-on-navigate.d.ts.map +1 -0
- package/dist/navigation/use-route-transition.d.ts +19 -0
- package/dist/navigation/use-route-transition.d.ts.map +1 -0
- package/dist/nonce.d.ts +16 -0
- package/dist/nonce.d.ts.map +1 -0
- package/dist/oauth/answer.d.ts +33 -0
- package/dist/oauth/answer.d.ts.map +1 -0
- package/dist/oauth/binding.d.ts +43 -0
- package/dist/oauth/binding.d.ts.map +1 -0
- package/dist/oauth/consent.d.ts +134 -0
- package/dist/oauth/consent.d.ts.map +1 -0
- package/dist/oauth/grants.d.ts +88 -0
- package/dist/oauth/grants.d.ts.map +1 -0
- package/dist/oauth/index.d.ts +16 -0
- package/dist/oauth/index.d.ts.map +1 -0
- package/dist/oauth/index.js +207 -0
- package/dist/oauth/index.js.map +12 -0
- package/dist/oauth/model.d.ts +13 -0
- package/dist/oauth/model.d.ts.map +1 -0
- package/dist/oauth/react/index.d.ts +7 -0
- package/dist/oauth/react/index.d.ts.map +1 -0
- package/dist/oauth/react/index.js +99 -0
- package/dist/oauth/react/index.js.map +10 -0
- package/dist/oauth/react/use-consent.d.ts +52 -0
- package/dist/oauth/react/use-consent.d.ts.map +1 -0
- package/dist/oidc/dpop.d.ts +80 -0
- package/dist/oidc/dpop.d.ts.map +1 -0
- package/dist/oidc/errors.d.ts +16 -0
- package/dist/oidc/errors.d.ts.map +1 -0
- package/dist/oidc/flow.d.ts +59 -0
- package/dist/oidc/flow.d.ts.map +1 -0
- package/dist/oidc/index.d.ts +11 -0
- package/dist/oidc/index.d.ts.map +1 -0
- package/dist/oidc/index.js +742 -0
- package/dist/oidc/index.js.map +15 -0
- package/dist/oidc/oidc.d.ts +132 -0
- package/dist/oidc/oidc.d.ts.map +1 -0
- package/dist/oidc/revoke.d.ts +28 -0
- package/dist/oidc/revoke.d.ts.map +1 -0
- package/dist/oidc/seal.d.ts +20 -0
- package/dist/oidc/seal.d.ts.map +1 -0
- package/dist/pwa/build/build-worker.d.ts +41 -0
- package/dist/pwa/build/build-worker.d.ts.map +1 -0
- package/dist/pwa/build/index.d.ts +9 -0
- package/dist/pwa/build/index.d.ts.map +1 -0
- package/dist/pwa/build/index.js +9 -0
- package/dist/pwa/build/index.js.map +9 -0
- package/dist/pwa/build/precache.d.ts +17 -0
- package/dist/pwa/build/precache.d.ts.map +1 -0
- package/dist/pwa/index.d.ts +16 -0
- package/dist/pwa/index.d.ts.map +1 -0
- package/dist/pwa/index.js +110 -0
- package/dist/pwa/index.js.map +12 -0
- package/dist/pwa/model/caching.d.ts +46 -0
- package/dist/pwa/model/caching.d.ts.map +1 -0
- package/dist/pwa/model/clear-app-caches.d.ts +9 -0
- package/dist/pwa/model/clear-app-caches.d.ts.map +1 -0
- package/dist/pwa/model/font-precache.d.ts +15 -0
- package/dist/pwa/model/font-precache.d.ts.map +1 -0
- package/dist/pwa/model/manifest.d.ts +80 -0
- package/dist/pwa/model/manifest.d.ts.map +1 -0
- package/dist/pwa/model/precache-list.d.ts +40 -0
- package/dist/pwa/model/precache-list.d.ts.map +1 -0
- package/dist/pwa/model/registration.d.ts +39 -0
- package/dist/pwa/model/registration.d.ts.map +1 -0
- package/dist/pwa/model/start-service-worker.d.ts +24 -0
- package/dist/pwa/model/start-service-worker.d.ts.map +1 -0
- package/dist/pwa/model/storable.d.ts +8 -0
- package/dist/pwa/model/storable.d.ts.map +1 -0
- package/dist/pwa/model/theme-color.d.ts +20 -0
- package/dist/pwa/model/theme-color.d.ts.map +1 -0
- package/dist/pwa/model/update-notice.d.ts +38 -0
- package/dist/pwa/model/update-notice.d.ts.map +1 -0
- package/dist/pwa/model/worker-contract.d.ts +61 -0
- package/dist/pwa/model/worker-contract.d.ts.map +1 -0
- package/dist/pwa/react/index.d.ts +9 -0
- package/dist/pwa/react/index.d.ts.map +1 -0
- package/dist/pwa/react/index.js +75 -0
- package/dist/pwa/react/index.js.map +13 -0
- package/dist/pwa/react/use-online.d.ts +6 -0
- package/dist/pwa/react/use-online.d.ts.map +1 -0
- package/dist/pwa/react/use-service-worker.d.ts +33 -0
- package/dist/pwa/react/use-service-worker.d.ts.map +1 -0
- package/dist/pwa/react/use-update-notice.d.ts +14 -0
- package/dist/pwa/react/use-update-notice.d.ts.map +1 -0
- package/dist/pwa/server/index.d.ts +7 -0
- package/dist/pwa/server/index.d.ts.map +1 -0
- package/dist/pwa/server/index.js +18 -0
- package/dist/pwa/server/index.js.map +10 -0
- package/dist/pwa/server/no-cache.d.ts +22 -0
- package/dist/pwa/server/no-cache.d.ts.map +1 -0
- package/dist/pwa/worker/index.d.ts +9 -0
- package/dist/pwa/worker/index.d.ts.map +1 -0
- package/dist/pwa/worker/index.js +144 -0
- package/dist/pwa/worker/index.js.map +12 -0
- package/dist/pwa/worker/injected.d.ts +15 -0
- package/dist/pwa/worker/injected.d.ts.map +1 -0
- package/dist/pwa/worker/plan.d.ts +65 -0
- package/dist/pwa/worker/plan.d.ts.map +1 -0
- package/dist/pwa/worker/scope.d.ts +18 -0
- package/dist/pwa/worker/scope.d.ts.map +1 -0
- package/dist/pwa/worker/start-worker.d.ts +17 -0
- package/dist/pwa/worker/start-worker.d.ts.map +1 -0
- package/dist/react-router.d.ts +68 -0
- package/dist/react-router.d.ts.map +1 -0
- package/dist/server.d.ts +127 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/session/codes.d.ts +9 -0
- package/dist/session/codes.d.ts.map +1 -0
- package/dist/session/cookies.d.ts +128 -0
- package/dist/session/cookies.d.ts.map +1 -0
- package/dist/session/flow-types.d.ts +235 -0
- package/dist/session/flow-types.d.ts.map +1 -0
- package/dist/session/guard.d.ts +10 -0
- package/dist/session/guard.d.ts.map +1 -0
- package/dist/session/index.d.ts +22 -0
- package/dist/session/index.d.ts.map +1 -0
- package/dist/session/index.js +1090 -0
- package/dist/session/index.js.map +27 -0
- package/dist/session/land.d.ts +28 -0
- package/dist/session/land.d.ts.map +1 -0
- package/dist/session/link-json.d.ts +22 -0
- package/dist/session/link-json.d.ts.map +1 -0
- package/dist/session/link-land.d.ts +20 -0
- package/dist/session/link-land.d.ts.map +1 -0
- package/dist/session/link-token.d.ts +24 -0
- package/dist/session/link-token.d.ts.map +1 -0
- package/dist/session/link-types.d.ts +142 -0
- package/dist/session/link-types.d.ts.map +1 -0
- package/dist/session/links.d.ts +14 -0
- package/dist/session/links.d.ts.map +1 -0
- package/dist/session/model/index.d.ts +8 -0
- package/dist/session/model/index.d.ts.map +1 -0
- package/dist/session/model/index.js +35 -0
- package/dist/session/model/index.js.map +9 -0
- package/dist/session/model/link-post.d.ts +35 -0
- package/dist/session/model/link-post.d.ts.map +1 -0
- package/dist/session/model/paths.d.ts +24 -0
- package/dist/session/model/paths.d.ts.map +1 -0
- package/dist/session/model/safe-next.d.ts +15 -0
- package/dist/session/model/safe-next.d.ts.map +1 -0
- package/dist/session/model/second-factor.d.ts +16 -0
- package/dist/session/model/second-factor.d.ts.map +1 -0
- package/dist/session/model/site-path.d.ts +10 -0
- package/dist/session/model/site-path.d.ts.map +1 -0
- package/dist/session/model/step-up-answers.d.ts +45 -0
- package/dist/session/model/step-up-answers.d.ts.map +1 -0
- package/dist/session/model/step-up-props.d.ts +22 -0
- package/dist/session/model/step-up-props.d.ts.map +1 -0
- package/dist/session/model/step-up.d.ts +48 -0
- package/dist/session/model/step-up.d.ts.map +1 -0
- package/dist/session/react/index.d.ts +13 -0
- package/dist/session/react/index.d.ts.map +1 -0
- package/dist/session/react/index.js +196 -0
- package/dist/session/react/index.js.map +14 -0
- package/dist/session/react/step-up/answers.d.ts +9 -0
- package/dist/session/react/step-up/answers.d.ts.map +1 -0
- package/dist/session/react/step-up/dialog-props.d.ts +27 -0
- package/dist/session/react/step-up/dialog-props.d.ts.map +1 -0
- package/dist/session/react/step-up/index.d.ts +7 -0
- package/dist/session/react/step-up/index.d.ts.map +1 -0
- package/dist/session/react/step-up/pending-runs.d.ts +21 -0
- package/dist/session/react/step-up/pending-runs.d.ts.map +1 -0
- package/dist/session/react/step-up/phase.d.ts +8 -0
- package/dist/session/react/step-up/phase.d.ts.map +1 -0
- package/dist/session/react/step-up/use-step-up-replay.d.ts +59 -0
- package/dist/session/react/step-up/use-step-up-replay.d.ts.map +1 -0
- package/dist/session/react/step-up/use-step-up-runner.d.ts +70 -0
- package/dist/session/react/step-up/use-step-up-runner.d.ts.map +1 -0
- package/dist/session/react/step-up/use-step-up.d.ts +51 -0
- package/dist/session/react/step-up/use-step-up.d.ts.map +1 -0
- package/dist/session/react/use-code-field.d.ts +37 -0
- package/dist/session/react/use-code-field.d.ts.map +1 -0
- package/dist/session/react/use-link-fragment.d.ts +22 -0
- package/dist/session/react/use-link-fragment.d.ts.map +1 -0
- package/dist/session/react/use-link-param.d.ts +26 -0
- package/dist/session/react/use-link-param.d.ts.map +1 -0
- package/dist/session/react/use-link-post.d.ts +39 -0
- package/dist/session/react/use-link-post.d.ts.map +1 -0
- package/dist/session/react/use-sign-out.d.ts +46 -0
- package/dist/session/react/use-sign-out.d.ts.map +1 -0
- package/dist/session/second-factor.d.ts +22 -0
- package/dist/session/second-factor.d.ts.map +1 -0
- package/dist/session/serialize.d.ts +42 -0
- package/dist/session/serialize.d.ts.map +1 -0
- package/dist/session/sign-in.d.ts +19 -0
- package/dist/session/sign-in.d.ts.map +1 -0
- package/dist/session/signed.d.ts +44 -0
- package/dist/session/signed.d.ts.map +1 -0
- package/dist/session/social-flow.d.ts +22 -0
- package/dist/session/social-flow.d.ts.map +1 -0
- package/dist/session/social-land.d.ts +31 -0
- package/dist/session/social-land.d.ts.map +1 -0
- package/dist/session/social-types.d.ts +136 -0
- package/dist/session/social-types.d.ts.map +1 -0
- package/dist/session/social.d.ts +32 -0
- package/dist/session/social.d.ts.map +1 -0
- package/dist/session/step-up-codes.d.ts +9 -0
- package/dist/session/step-up-codes.d.ts.map +1 -0
- package/dist/session/step-up-signed-out.d.ts +21 -0
- package/dist/session/step-up-signed-out.d.ts.map +1 -0
- package/dist/session/step-up-types.d.ts +127 -0
- package/dist/session/step-up-types.d.ts.map +1 -0
- package/dist/session/step-up.d.ts +17 -0
- package/dist/session/step-up.d.ts.map +1 -0
- package/dist/session/step.d.ts +22 -0
- package/dist/session/step.d.ts.map +1 -0
- package/dist/session/throttle.d.ts +73 -0
- package/dist/session/throttle.d.ts.map +1 -0
- package/dist/session/timed-wait.d.ts +4 -0
- package/dist/session/timed-wait.d.ts.map +1 -0
- package/dist/session/viewer.d.ts +34 -0
- package/dist/session/viewer.d.ts.map +1 -0
- package/dist/subscription/documents.d.ts +3 -0
- package/dist/subscription/documents.d.ts.map +1 -0
- package/dist/subscription/index.d.ts +7 -0
- package/dist/subscription/index.d.ts.map +1 -0
- package/dist/subscription/index.js +359 -0
- package/dist/subscription/index.js.map +14 -0
- package/dist/subscription/proxy.d.ts +54 -0
- package/dist/subscription/proxy.d.ts.map +1 -0
- package/dist/subscription/react/backoff.d.ts +8 -0
- package/dist/subscription/react/backoff.d.ts.map +1 -0
- package/dist/subscription/react/classify.d.ts +15 -0
- package/dist/subscription/react/classify.d.ts.map +1 -0
- package/dist/subscription/react/controller.d.ts +40 -0
- package/dist/subscription/react/controller.d.ts.map +1 -0
- package/dist/subscription/react/fake-timers.d.ts +8 -0
- package/dist/subscription/react/fake-timers.d.ts.map +1 -0
- package/dist/subscription/react/index.d.ts +15 -0
- package/dist/subscription/react/index.d.ts.map +1 -0
- package/dist/subscription/react/index.js +227 -0
- package/dist/subscription/react/index.js.map +17 -0
- package/dist/subscription/react/reconnect.d.ts +9 -0
- package/dist/subscription/react/reconnect.d.ts.map +1 -0
- package/dist/subscription/react/scheduler.d.ts +13 -0
- package/dist/subscription/react/scheduler.d.ts.map +1 -0
- package/dist/subscription/react/timers.d.ts +7 -0
- package/dist/subscription/react/timers.d.ts.map +1 -0
- package/dist/subscription/react/use-live-subscription.d.ts +36 -0
- package/dist/subscription/react/use-live-subscription.d.ts.map +1 -0
- package/dist/subscription/react/versions.d.ts +6 -0
- package/dist/subscription/react/versions.d.ts.map +1 -0
- package/dist/subscription/read.d.ts +17 -0
- package/dist/subscription/read.d.ts.map +1 -0
- package/dist/subscription/refusal.d.ts +11 -0
- package/dist/subscription/refusal.d.ts.map +1 -0
- package/dist/subscription/relay.d.ts +16 -0
- package/dist/subscription/relay.d.ts.map +1 -0
- package/dist/vite/bun.d.ts +21 -0
- package/dist/vite/bun.d.ts.map +1 -0
- package/dist/vite/bundle.d.ts +33 -0
- package/dist/vite/bundle.d.ts.map +1 -0
- package/dist/vite/compress.d.ts +18 -0
- package/dist/vite/compress.d.ts.map +1 -0
- package/dist/vite/config.d.ts +33 -0
- package/dist/vite/config.d.ts.map +1 -0
- package/dist/vite/dev.d.ts +28 -0
- package/dist/vite/dev.d.ts.map +1 -0
- package/dist/vite/entry.d.ts +20 -0
- package/dist/vite/entry.d.ts.map +1 -0
- package/dist/vite/hosts.d.ts +16 -0
- package/dist/vite/hosts.d.ts.map +1 -0
- package/dist/vite/index.d.ts +68 -0
- package/dist/vite/index.d.ts.map +1 -0
- package/dist/vite/index.js +635 -0
- package/dist/vite/index.js.map +22 -0
- package/dist/vite/inline.d.ts +18 -0
- package/dist/vite/inline.d.ts.map +1 -0
- package/dist/vite/node.d.ts +16 -0
- package/dist/vite/node.d.ts.map +1 -0
- package/dist/vite/preview.d.ts +8 -0
- package/dist/vite/preview.d.ts.map +1 -0
- package/dist/vite/runtime.d.ts +8 -0
- package/dist/vite/runtime.d.ts.map +1 -0
- package/dist/vite/socket.d.ts +75 -0
- package/dist/vite/socket.d.ts.map +1 -0
- package/dist/vite/worker.d.ts +16 -0
- package/dist/vite/worker.d.ts.map +1 -0
- package/dist/with-alxia.d.ts +36 -0
- package/dist/with-alxia.d.ts.map +1 -0
- package/docs/README.md +42 -0
- package/docs/guide/api-keys.md +216 -0
- package/docs/guide/beside-the-pages.md +201 -0
- package/docs/guide/csp-nonce.md +166 -0
- package/docs/guide/customising-the-server.md +324 -0
- package/docs/guide/deploying.md +102 -0
- package/docs/guide/document.md +334 -0
- package/docs/guide/errors.md +1147 -0
- package/docs/guide/fetcher.md +355 -0
- package/docs/guide/getting-started.md +112 -0
- package/docs/guide/help.md +325 -0
- package/docs/guide/how-it-works.md +274 -0
- package/docs/guide/link.md +32 -0
- package/docs/guide/lists.md +225 -0
- package/docs/guide/mcp.md +173 -0
- package/docs/guide/media.md +273 -0
- package/docs/guide/navigation.md +52 -0
- package/docs/guide/oauth.md +342 -0
- package/docs/guide/oidc.md +262 -0
- package/docs/guide/openapi.md +51 -0
- package/docs/guide/pwa.md +670 -0
- package/docs/guide/session.md +2105 -0
- package/docs/guide/subscriptions.md +211 -0
- package/docs/guide/testing.md +42 -0
- package/docs/guide/typing-the-loaders.md +311 -0
- package/docs/guide.md +82 -0
- package/docs/roadmap.md +474 -0
- package/docs/troubleshooting.md +3837 -0
- package/package.json +301 -5
|
@@ -0,0 +1,1090 @@
|
|
|
1
|
+
import {
|
|
2
|
+
nextOf2,
|
|
3
|
+
hasSiteCheck,
|
|
4
|
+
requireSameSite2
|
|
5
|
+
} from "../chunks/index-v2z5k640.js";
|
|
6
|
+
import {
|
|
7
|
+
LINK_JSON_HEADER2,
|
|
8
|
+
sitePath,
|
|
9
|
+
SIGN_IN_PATHS2,
|
|
10
|
+
signInPath2,
|
|
11
|
+
secondFactorPath2
|
|
12
|
+
} from "../chunks/index-t2ph23wk.js";
|
|
13
|
+
import {
|
|
14
|
+
isApiErrorLike2,
|
|
15
|
+
retryAfterOf2,
|
|
16
|
+
isThrottledReason2,
|
|
17
|
+
attemptsLeftOf2,
|
|
18
|
+
routeError2
|
|
19
|
+
} from "../chunks/index-wyypkfdv.js";
|
|
20
|
+
import {
|
|
21
|
+
INVALID_CODE2,
|
|
22
|
+
CHALLENGE_OVER2,
|
|
23
|
+
MAIL_THROTTLED2,
|
|
24
|
+
UNAUTHENTICATED2,
|
|
25
|
+
STEP_UP_REQUIRED2,
|
|
26
|
+
STEP_UP_OVER2
|
|
27
|
+
} from "../chunks/index-vr82typq.js";
|
|
28
|
+
import {
|
|
29
|
+
checkSameSite,
|
|
30
|
+
isCookieName,
|
|
31
|
+
serializeCookie2,
|
|
32
|
+
readCookie2,
|
|
33
|
+
millisOf,
|
|
34
|
+
secondsUntil2,
|
|
35
|
+
sessionCookies2,
|
|
36
|
+
challengeCleared
|
|
37
|
+
} from "../chunks/index-1nw5yeek.js";
|
|
38
|
+
import {
|
|
39
|
+
isCrossSite
|
|
40
|
+
} from "../chunks/index-mscfme4r.js";
|
|
41
|
+
import {
|
|
42
|
+
HOME2,
|
|
43
|
+
safeNext2
|
|
44
|
+
} from "../chunks/index-0786n4qe.js";
|
|
45
|
+
// src/session/link-json.ts
|
|
46
|
+
function handOver(response) {
|
|
47
|
+
const location = response.headers.get("location");
|
|
48
|
+
if (response.status < 300 || response.status >= 400 || location === null) {
|
|
49
|
+
return response;
|
|
50
|
+
}
|
|
51
|
+
const headers = new Headers(response.headers);
|
|
52
|
+
for (const name of [
|
|
53
|
+
"location",
|
|
54
|
+
"content-length",
|
|
55
|
+
"content-type",
|
|
56
|
+
"content-encoding",
|
|
57
|
+
"x-remix-replace",
|
|
58
|
+
"x-remix-reload-document"
|
|
59
|
+
]) {
|
|
60
|
+
headers.delete(name);
|
|
61
|
+
}
|
|
62
|
+
const replace = response.headers.get("x-remix-replace") === "true";
|
|
63
|
+
return Response.json(replace ? { redirect: location, replace } : { redirect: location }, { headers });
|
|
64
|
+
}
|
|
65
|
+
function handingOver(action) {
|
|
66
|
+
return async (args) => {
|
|
67
|
+
const wanted = args.request.headers.get(LINK_JSON_HEADER2) === "json";
|
|
68
|
+
try {
|
|
69
|
+
const result = await action(args);
|
|
70
|
+
return wanted && result instanceof Response ? handOver(result) : result;
|
|
71
|
+
} catch (error) {
|
|
72
|
+
if (wanted && error instanceof Response)
|
|
73
|
+
return handOver(error);
|
|
74
|
+
throw error;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
// src/session/link-token.ts
|
|
79
|
+
import { data, replace } from "react-router";
|
|
80
|
+
|
|
81
|
+
// src/session/guard.ts
|
|
82
|
+
function samesitePost(json, request) {
|
|
83
|
+
json.requireJsonPost(request);
|
|
84
|
+
requireSameSite2(request, json);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// src/session/link-token.ts
|
|
88
|
+
var TOKEN_PAGE_HEADERS = {
|
|
89
|
+
"Referrer-Policy": "no-referrer",
|
|
90
|
+
"X-Robots-Tag": "noindex, nofollow"
|
|
91
|
+
};
|
|
92
|
+
var pathOf = (path, call) => sitePath(path, { label: `${call}: a token page's path` });
|
|
93
|
+
var statePath = (path, state) => `${pathOf(path, "statePath()")}?${new URLSearchParams({ state })}`;
|
|
94
|
+
function withTokenHeaders(headers) {
|
|
95
|
+
const merged = new Headers(headers);
|
|
96
|
+
for (const [name, value] of Object.entries(TOKEN_PAGE_HEADERS)) {
|
|
97
|
+
merged.set(name, value);
|
|
98
|
+
}
|
|
99
|
+
return merged;
|
|
100
|
+
}
|
|
101
|
+
var stateRedirect = (path, state, headers) => replace(statePath(path, state), { headers: withTokenHeaders(headers) });
|
|
102
|
+
var isTokenIssue = (issue) => {
|
|
103
|
+
const first = issue.path?.[0];
|
|
104
|
+
return (typeof first === "object" ? first.key : first) === "token";
|
|
105
|
+
};
|
|
106
|
+
async function linkArgs({ json }, invalidState, schema, request, path) {
|
|
107
|
+
samesitePost(json, request);
|
|
108
|
+
pathOf(path, "linkArgs()");
|
|
109
|
+
const body = await json.readJson(request);
|
|
110
|
+
const result = await schema["~standard"].validate(body);
|
|
111
|
+
if (!result.issues)
|
|
112
|
+
return result.value;
|
|
113
|
+
if (result.issues.some(isTokenIssue)) {
|
|
114
|
+
throw stateRedirect(path, invalidState);
|
|
115
|
+
}
|
|
116
|
+
throw data("Bad link request", { status: 400 });
|
|
117
|
+
}
|
|
118
|
+
var throttleCodes = (codes) => {
|
|
119
|
+
const configured = codes?.mailThrottled ?? MAIL_THROTTLED2;
|
|
120
|
+
return typeof configured === "string" ? [configured] : configured;
|
|
121
|
+
};
|
|
122
|
+
async function spendToken(options, run, { request, language, path, states, fields: shown = [] }) {
|
|
123
|
+
const { errors } = options;
|
|
124
|
+
samesitePost(options.json, request);
|
|
125
|
+
pathOf(path, "spendToken()");
|
|
126
|
+
try {
|
|
127
|
+
return { ok: true, value: await run() };
|
|
128
|
+
} catch (error) {
|
|
129
|
+
const refusal = errors.apiRefusal(error, language);
|
|
130
|
+
if (!refusal)
|
|
131
|
+
throw error;
|
|
132
|
+
const { message, status } = refusal;
|
|
133
|
+
if (isApiErrorLike2(error)) {
|
|
134
|
+
const state = error.code ? states[error.code] : undefined;
|
|
135
|
+
if (state)
|
|
136
|
+
return { ok: false, response: stateRedirect(path, state) };
|
|
137
|
+
if (throttleCodes(options.codes).includes(error.code ?? "")) {
|
|
138
|
+
const retryAfter = retryAfterOf2(error);
|
|
139
|
+
return {
|
|
140
|
+
ok: false,
|
|
141
|
+
refusal: {
|
|
142
|
+
formError: message,
|
|
143
|
+
throttled: true,
|
|
144
|
+
...retryAfter === undefined ? {} : { retryAfter }
|
|
145
|
+
},
|
|
146
|
+
status: 429
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
const fields = errors.fieldErrors(error, language);
|
|
150
|
+
const named = Object.keys(fields);
|
|
151
|
+
if (named.length && named.every((field) => shown.includes(field))) {
|
|
152
|
+
return { ok: false, refusal: { fieldErrors: fields }, status };
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return { ok: false, refusal: { formError: message }, status };
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
var answerOf = (spent) => ("response" in spent) ? spent.response : data(spent.refusal, { status: spent.status });
|
|
159
|
+
// src/session/links.ts
|
|
160
|
+
import { data as data3 } from "react-router";
|
|
161
|
+
|
|
162
|
+
// src/session/link-land.ts
|
|
163
|
+
import { data as data2, replace as replace2 } from "react-router";
|
|
164
|
+
|
|
165
|
+
// src/session/land.ts
|
|
166
|
+
import { redirect } from "react-router";
|
|
167
|
+
async function revokeSession({ options }, request, { context } = {}) {
|
|
168
|
+
samesitePost(options.json, request);
|
|
169
|
+
const token = options.cookies.token(request);
|
|
170
|
+
if (!token)
|
|
171
|
+
return false;
|
|
172
|
+
try {
|
|
173
|
+
await options.revoke(token, request, context);
|
|
174
|
+
} catch {}
|
|
175
|
+
return true;
|
|
176
|
+
}
|
|
177
|
+
var isLive = (answer) => answer.status === "signedIn" && Boolean(answer.token) && Boolean(answer.expiresAt) && millisOf(answer.expiresAt) > Date.now();
|
|
178
|
+
function landing({ options, paths }, answer, next) {
|
|
179
|
+
const { cookies } = options;
|
|
180
|
+
if (isLive(answer)) {
|
|
181
|
+
const headers = new Headers;
|
|
182
|
+
headers.append("Set-Cookie", cookies.commit(answer.token, answer.expiresAt));
|
|
183
|
+
for (const cookie of challengeCleared(cookies)) {
|
|
184
|
+
headers.append("Set-Cookie", cookie);
|
|
185
|
+
}
|
|
186
|
+
for (const cookie of options.clear?.() ?? []) {
|
|
187
|
+
headers.append("Set-Cookie", cookie);
|
|
188
|
+
}
|
|
189
|
+
return redirect(safeNext2(next), { headers });
|
|
190
|
+
}
|
|
191
|
+
if (answer.status === "secondFactor" && answer.challenge && cookies.commitChallenge) {
|
|
192
|
+
return redirect(secondFactorPath2(next, paths.secondFactor), {
|
|
193
|
+
headers: {
|
|
194
|
+
"Set-Cookie": cookies.commitChallenge(answer.challenge, answer.expiresAt)
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
return null;
|
|
199
|
+
}
|
|
200
|
+
async function landReplacing(flow, answer, next, {
|
|
201
|
+
request,
|
|
202
|
+
revokeOn = ["signedIn"],
|
|
203
|
+
context
|
|
204
|
+
}) {
|
|
205
|
+
samesitePost(flow.options.json, request);
|
|
206
|
+
const landed = landing(flow, answer, next);
|
|
207
|
+
if (!landed || answer.status === "other")
|
|
208
|
+
return landed;
|
|
209
|
+
if (!revokeOn.includes(answer.status))
|
|
210
|
+
return landed;
|
|
211
|
+
const hadSession = await revokeSession(flow, request, { context });
|
|
212
|
+
if (hadSession && answer.status !== "signedIn") {
|
|
213
|
+
landed.headers.append("Set-Cookie", flow.options.cookies.destroy());
|
|
214
|
+
}
|
|
215
|
+
return landed;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// src/session/link-land.ts
|
|
219
|
+
async function startOf({ start }, request, token) {
|
|
220
|
+
if (!start)
|
|
221
|
+
return HOME2;
|
|
222
|
+
try {
|
|
223
|
+
return safeNext2(await start(token, request));
|
|
224
|
+
} catch {
|
|
225
|
+
return HOME2;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
async function landByLink(options, answer, {
|
|
229
|
+
request,
|
|
230
|
+
language,
|
|
231
|
+
other,
|
|
232
|
+
context
|
|
233
|
+
}) {
|
|
234
|
+
samesitePost(options.json, request);
|
|
235
|
+
if (answer.status === "other" && other) {
|
|
236
|
+
return stateRedirect(other.path, other.state);
|
|
237
|
+
}
|
|
238
|
+
const next = isLive(answer) ? await startOf(options, request, answer.token) : HOME2;
|
|
239
|
+
const landed = await options.signIn.landReplacing(answer, next, {
|
|
240
|
+
request,
|
|
241
|
+
revokeOn: ["signedIn", "secondFactor"],
|
|
242
|
+
context
|
|
243
|
+
});
|
|
244
|
+
if (!landed) {
|
|
245
|
+
return data2({ formError: options.signIn.unavailable(language) }, { status: 503 });
|
|
246
|
+
}
|
|
247
|
+
const location = landed.headers.get("Location") ?? HOME2;
|
|
248
|
+
return replace2(location, { headers: withTokenHeaders(landed.headers) });
|
|
249
|
+
}
|
|
250
|
+
async function afterReset(options, resetDone, request, { context } = {}) {
|
|
251
|
+
samesitePost(options.json, request);
|
|
252
|
+
await options.signIn.revokeSession(request, { context });
|
|
253
|
+
const headers = withTokenHeaders();
|
|
254
|
+
headers.append("Set-Cookie", options.cookies.destroy());
|
|
255
|
+
for (const cookie of challengeCleared(options.cookies)) {
|
|
256
|
+
headers.append("Set-Cookie", cookie);
|
|
257
|
+
}
|
|
258
|
+
for (const cookie of options.signIn.clear()) {
|
|
259
|
+
headers.append("Set-Cookie", cookie);
|
|
260
|
+
}
|
|
261
|
+
return replace2(resetDone, { headers });
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// src/session/links.ts
|
|
265
|
+
var RESET_DONE = "/sign-in?password-reset=1";
|
|
266
|
+
var worded = ({ wording, errors }, error, language) => wording?.(error, language) ?? errors.apiErrorMessage(error, language);
|
|
267
|
+
async function requestLink(options, run, { request, language }) {
|
|
268
|
+
const { errors } = options;
|
|
269
|
+
samesitePost(options.json, request);
|
|
270
|
+
try {
|
|
271
|
+
await run();
|
|
272
|
+
return data3({ sent: true });
|
|
273
|
+
} catch (error) {
|
|
274
|
+
const api = isApiErrorLike2(error);
|
|
275
|
+
if (api && throttleCodes(options.codes).includes(error.code ?? "")) {
|
|
276
|
+
const retryAfter = retryAfterOf2(error);
|
|
277
|
+
return data3({
|
|
278
|
+
formError: worded(options, error, language),
|
|
279
|
+
throttled: true,
|
|
280
|
+
...retryAfter === undefined ? {} : { retryAfter }
|
|
281
|
+
}, { status: 429 });
|
|
282
|
+
}
|
|
283
|
+
if (api) {
|
|
284
|
+
const email = errors.fieldErrors(error, language)["email"];
|
|
285
|
+
if (email) {
|
|
286
|
+
return data3({ fieldErrors: { email } }, { status: error.status });
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
const refusal = errors.apiRefusal(error, language);
|
|
290
|
+
if (!refusal)
|
|
291
|
+
throw error;
|
|
292
|
+
return data3({ formError: api ? worded(options, error, language) : refusal.message }, { status: refusal.status });
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
function authLinks(links) {
|
|
296
|
+
const { signIn } = links;
|
|
297
|
+
const options = {
|
|
298
|
+
...links,
|
|
299
|
+
cookies: signIn.cookies,
|
|
300
|
+
errors: signIn.errors,
|
|
301
|
+
json: signIn.json
|
|
302
|
+
};
|
|
303
|
+
const resetDone = options.resetDone ?? RESET_DONE;
|
|
304
|
+
sitePath(resetDone, { label: "authLinks(): resetDone", query: true });
|
|
305
|
+
const invalid = options.invalidState ?? "invalid";
|
|
306
|
+
return {
|
|
307
|
+
statePath,
|
|
308
|
+
ended: stateRedirect,
|
|
309
|
+
linkArgs: (schema, request, path) => linkArgs(options, invalid, schema, request, path),
|
|
310
|
+
spendToken: (run, o) => spendToken(options, run, o),
|
|
311
|
+
answerOf,
|
|
312
|
+
landByLink: (answer, o) => landByLink(options, answer, o),
|
|
313
|
+
afterReset: (request, o) => afterReset(options, resetDone, request, o),
|
|
314
|
+
requestLink: (run, o) => requestLink(options, run, o)
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
// src/session/second-factor.ts
|
|
318
|
+
import { data as data4 } from "react-router";
|
|
319
|
+
var MAX_CODE = 40;
|
|
320
|
+
function isMethod(value) {
|
|
321
|
+
return value === "code" || value === "recovery";
|
|
322
|
+
}
|
|
323
|
+
async function readCodeInput({ options }, request) {
|
|
324
|
+
samesitePost(options.json, request);
|
|
325
|
+
const body = await options.json.readJson(request);
|
|
326
|
+
const { kind, code } = body ?? {};
|
|
327
|
+
if (!isMethod(kind) || typeof code !== "string" || code.length > MAX_CODE) {
|
|
328
|
+
throw data4("Bad code request", { status: 400 });
|
|
329
|
+
}
|
|
330
|
+
return { kind, code };
|
|
331
|
+
}
|
|
332
|
+
function codeStep(input, challenge, steps) {
|
|
333
|
+
return input.kind === "code" ? steps.confirm(challenge, input.code) : steps.recover(challenge, input.code);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
// src/session/step.ts
|
|
337
|
+
import { data as data5 } from "react-router";
|
|
338
|
+
function throttledMessage(minutes, language) {
|
|
339
|
+
const french = /^fr(?:[-_]|$)/i.test(language);
|
|
340
|
+
if (minutes === undefined) {
|
|
341
|
+
return french ? "Réessayez plus tard." : "Try again later.";
|
|
342
|
+
}
|
|
343
|
+
return french ? `Trop d'essais, réessayez dans ${minutes} min.` : `Too many tries, wait ${minutes} min.`;
|
|
344
|
+
}
|
|
345
|
+
function codeRefusal({ options, invalidCode, challengeOver }, error, language, whenNone) {
|
|
346
|
+
if (isThrottledReason2(error)) {
|
|
347
|
+
const seconds = retryAfterOf2(error);
|
|
348
|
+
const minutes = seconds === undefined ? undefined : Math.max(1, Math.ceil(seconds / 60));
|
|
349
|
+
return (options.throttled ?? throttledMessage)(minutes, language);
|
|
350
|
+
}
|
|
351
|
+
if (error.code !== invalidCode) {
|
|
352
|
+
return error.code && challengeOver.includes(error.code) ? undefined : options.errors.apiErrorMessage(error, language);
|
|
353
|
+
}
|
|
354
|
+
const message = options.errors.apiErrorMessage(error, language);
|
|
355
|
+
const count = attemptsLeftOf2(error);
|
|
356
|
+
if (count === undefined)
|
|
357
|
+
return message;
|
|
358
|
+
if (count === 0) {
|
|
359
|
+
return whenNone === undefined ? undefined : `${message} ${whenNone}`;
|
|
360
|
+
}
|
|
361
|
+
return `${message} ${options.attemptsLeft(count, language)}`;
|
|
362
|
+
}
|
|
363
|
+
var unavailableMessage = ({ unavailable, errors }, language) => unavailable?.(language) ?? errors.unavailableMessage(language);
|
|
364
|
+
async function signInStep(flow, run, {
|
|
365
|
+
request,
|
|
366
|
+
language,
|
|
367
|
+
next,
|
|
368
|
+
extra,
|
|
369
|
+
refused,
|
|
370
|
+
context
|
|
371
|
+
}) {
|
|
372
|
+
const { errors, json } = flow.options;
|
|
373
|
+
samesitePost(json, request);
|
|
374
|
+
const stay = (formError, status, wait) => data5({ ...extra, formError, ...wait }, { status });
|
|
375
|
+
const unreachable = () => stay(unavailableMessage(flow.options, language), 503);
|
|
376
|
+
let answer;
|
|
377
|
+
try {
|
|
378
|
+
answer = await run();
|
|
379
|
+
} catch (error) {
|
|
380
|
+
const refusal = errors.apiRefusal(error, language);
|
|
381
|
+
if (!refusal)
|
|
382
|
+
throw error;
|
|
383
|
+
if (!isApiErrorLike2(error))
|
|
384
|
+
return unreachable();
|
|
385
|
+
const own = refused?.(error);
|
|
386
|
+
if (own instanceof Response)
|
|
387
|
+
return own;
|
|
388
|
+
const retryAfter = retryAfterOf2(error);
|
|
389
|
+
const wait = isThrottledReason2(error) ? {
|
|
390
|
+
throttled: true,
|
|
391
|
+
...retryAfter === undefined ? {} : { retryAfter }
|
|
392
|
+
} : undefined;
|
|
393
|
+
return stay(own ?? refusal.message, refusal.status, wait);
|
|
394
|
+
}
|
|
395
|
+
return await landReplacing(flow, answer, next, { request, context }) ?? unreachable();
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
// src/session/viewer.ts
|
|
399
|
+
import { redirect as redirect2 } from "react-router";
|
|
400
|
+
var nextParam = (request) => safeNext2(new URL(request.url).searchParams.get("next"));
|
|
401
|
+
function signInRedirect({ options, paths }, request) {
|
|
402
|
+
const { endedParam, cookies } = options;
|
|
403
|
+
const query = endedParam && cookies.read(request) ? { [endedParam]: "1" } : undefined;
|
|
404
|
+
return redirect2(signInPath2(nextOf2(request.url), {
|
|
405
|
+
path: paths.signIn,
|
|
406
|
+
...query && { query }
|
|
407
|
+
}), { headers: { "Set-Cookie": cookies.destroy() } });
|
|
408
|
+
}
|
|
409
|
+
async function viewer({ options }, request, read, token = options.cookies.token(request)) {
|
|
410
|
+
if (!token)
|
|
411
|
+
return;
|
|
412
|
+
try {
|
|
413
|
+
return await read(token);
|
|
414
|
+
} catch (error) {
|
|
415
|
+
return isApiErrorLike2(error) && error.status === 401 ? null : undefined;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
async function requireViewer(context, request, read, expiresAt) {
|
|
419
|
+
const session = context.options.cookies.read(request);
|
|
420
|
+
if (!session)
|
|
421
|
+
throw signInRedirect(context, request);
|
|
422
|
+
let found;
|
|
423
|
+
try {
|
|
424
|
+
found = await read(session.token);
|
|
425
|
+
} catch (error) {
|
|
426
|
+
if (isApiErrorLike2(error) && error.status === 401) {
|
|
427
|
+
throw signInRedirect(context, request);
|
|
428
|
+
}
|
|
429
|
+
throw routeError2(error);
|
|
430
|
+
}
|
|
431
|
+
if (!found)
|
|
432
|
+
throw signInRedirect(context, request);
|
|
433
|
+
return {
|
|
434
|
+
viewer: found,
|
|
435
|
+
headers: context.options.cookies.refreshed(session, expiresAt(found))
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
function nextOfBody(body) {
|
|
439
|
+
if (typeof body !== "object" || body === null)
|
|
440
|
+
return HOME2;
|
|
441
|
+
const { next } = body;
|
|
442
|
+
return typeof next === "string" ? next : HOME2;
|
|
443
|
+
}
|
|
444
|
+
async function signOut(flow, request, {
|
|
445
|
+
to,
|
|
446
|
+
context
|
|
447
|
+
} = {}) {
|
|
448
|
+
const { options, paths } = flow;
|
|
449
|
+
const body = await options.json.readJson(request);
|
|
450
|
+
await revokeSession(flow, request, { context });
|
|
451
|
+
const headers = new Headers;
|
|
452
|
+
headers.append("Set-Cookie", options.cookies.destroy());
|
|
453
|
+
for (const cookie of challengeCleared(options.cookies)) {
|
|
454
|
+
headers.append("Set-Cookie", cookie);
|
|
455
|
+
}
|
|
456
|
+
for (const cookie of options.clear?.() ?? []) {
|
|
457
|
+
headers.append("Set-Cookie", cookie);
|
|
458
|
+
}
|
|
459
|
+
return redirect2(to === undefined ? signInPath2(nextOfBody(body), {
|
|
460
|
+
path: paths.signIn,
|
|
461
|
+
query: { "signed-out": "1" }
|
|
462
|
+
}) : safeNext2(to), { headers });
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
// src/session/sign-in.ts
|
|
466
|
+
function resolve(options) {
|
|
467
|
+
if (options.attemptsLeft === undefined !== !options.cookies.commitChallenge) {
|
|
468
|
+
throw new TypeError("signInFlow(): a second factor needs both the challenge cookie (sessionCookies({ challenge })) and attemptsLeft; without one, give neither.");
|
|
469
|
+
}
|
|
470
|
+
const paths = { ...SIGN_IN_PATHS2, ...options.paths };
|
|
471
|
+
for (const key of ["signIn", "secondFactor"]) {
|
|
472
|
+
sitePath(paths[key], { label: `signInFlow(): paths.${key}` });
|
|
473
|
+
}
|
|
474
|
+
if (!hasSiteCheck(options.json)) {
|
|
475
|
+
throw new TypeError("signInFlow(): json must come from jsonActions(), which carries the site check every step runs; this object has none (a hand-made double?). Pass the app's jsonActions({ origin }) instance, or a spread copy of it.");
|
|
476
|
+
}
|
|
477
|
+
const invalidCode = options.codes?.invalidCode ?? INVALID_CODE2;
|
|
478
|
+
const challengeOver = options.codes?.challengeOver ?? CHALLENGE_OVER2;
|
|
479
|
+
if (challengeOver.includes(invalidCode)) {
|
|
480
|
+
throw new TypeError(`signInFlow(): the code ${JSON.stringify(invalidCode)} is both the wrong-code code (codes.invalidCode) and in codes.challengeOver. A wrong code that leaves tries cannot end the challenge.`);
|
|
481
|
+
}
|
|
482
|
+
return { options, paths, invalidCode, challengeOver };
|
|
483
|
+
}
|
|
484
|
+
function signInFlow(options) {
|
|
485
|
+
const context = resolve(options);
|
|
486
|
+
const { options: o } = context;
|
|
487
|
+
const base = {
|
|
488
|
+
cookies: o.cookies,
|
|
489
|
+
errors: o.errors,
|
|
490
|
+
json: o.json,
|
|
491
|
+
unavailable: (language) => unavailableMessage(o, language),
|
|
492
|
+
clear: () => o.clear?.() ?? [],
|
|
493
|
+
guard: (request) => samesitePost(o.json, request),
|
|
494
|
+
nextParam,
|
|
495
|
+
signInRedirect: (request) => signInRedirect(context, request),
|
|
496
|
+
landing: (answer, next) => landing(context, answer, next),
|
|
497
|
+
landReplacing: (answer, next, o) => landReplacing(context, answer, next, o),
|
|
498
|
+
signInStep: (run, o) => signInStep(context, run, o),
|
|
499
|
+
revokeSession: (request, o) => revokeSession(context, request, o),
|
|
500
|
+
signOut: (request, o) => signOut(context, request, o),
|
|
501
|
+
viewer: (request, read, token) => viewer(context, request, read, token),
|
|
502
|
+
requireViewer: (request, read, expiresAt) => requireViewer(context, request, read, expiresAt)
|
|
503
|
+
};
|
|
504
|
+
if (!o.attemptsLeft)
|
|
505
|
+
return base;
|
|
506
|
+
const wording = { ...context, options: o };
|
|
507
|
+
return {
|
|
508
|
+
...base,
|
|
509
|
+
attemptsLeft: o.attemptsLeft,
|
|
510
|
+
codeRefusal: (error, language, whenNone) => codeRefusal(wording, error, language, whenNone),
|
|
511
|
+
readCodeInput: (request) => readCodeInput(context, request),
|
|
512
|
+
codeStep
|
|
513
|
+
};
|
|
514
|
+
}
|
|
515
|
+
// src/session/signed.ts
|
|
516
|
+
var MIN_SECRET = 32;
|
|
517
|
+
var MAC_LENGTH = 43;
|
|
518
|
+
var DIGITS = /^\d{1,16}$/;
|
|
519
|
+
var encoder = new TextEncoder;
|
|
520
|
+
var base64url = (bytes) => btoa(String.fromCharCode(...bytes)).replaceAll("+", "-").replaceAll("/", "_").replaceAll("=", "");
|
|
521
|
+
var keyOf = (secret) => crypto.subtle.importKey("raw", encoder.encode(secret), { name: "HMAC", hash: "SHA-256" }, false, ["sign"]);
|
|
522
|
+
async function sign(key, payload) {
|
|
523
|
+
const mac = await crypto.subtle.sign("HMAC", key, encoder.encode(payload));
|
|
524
|
+
return base64url(new Uint8Array(mac));
|
|
525
|
+
}
|
|
526
|
+
function sameBytes(a, b) {
|
|
527
|
+
if (a.length !== b.length)
|
|
528
|
+
return false;
|
|
529
|
+
let difference = 0;
|
|
530
|
+
for (let index = 0;index < a.length; index++) {
|
|
531
|
+
difference |= a.charCodeAt(index) ^ b.charCodeAt(index);
|
|
532
|
+
}
|
|
533
|
+
return difference === 0;
|
|
534
|
+
}
|
|
535
|
+
function signedSession(options) {
|
|
536
|
+
const { secret, name: base, maxAge, secure, sameSite = "lax" } = options;
|
|
537
|
+
if (typeof secret !== "string" || secret.length < MIN_SECRET) {
|
|
538
|
+
throw new TypeError(`signedSession(): secret must be a string of at least ${MIN_SECRET} characters.`);
|
|
539
|
+
}
|
|
540
|
+
if (!isCookieName(base) || /^__(?:Host|Secure)-/.test(base)) {
|
|
541
|
+
throw new TypeError(`signedSession(): the name ${JSON.stringify(base)} must be an RFC 6265 token without a __Host- or __Secure- prefix; the package adds __Host- when secure is true.`);
|
|
542
|
+
}
|
|
543
|
+
if (!Number.isInteger(maxAge) || maxAge <= 0) {
|
|
544
|
+
throw new TypeError(`signedSession(): maxAge must be a positive integer of seconds; got ${String(maxAge)}.`);
|
|
545
|
+
}
|
|
546
|
+
checkSameSite("signedSession():", sameSite, secure);
|
|
547
|
+
const name = secure ? `__Host-${base}` : base;
|
|
548
|
+
const key = keyOf(secret);
|
|
549
|
+
return {
|
|
550
|
+
name,
|
|
551
|
+
async commit(now = Date.now()) {
|
|
552
|
+
const nonce = base64url(crypto.getRandomValues(new Uint8Array(16)));
|
|
553
|
+
const payload = `${now + maxAge * 1000}.${nonce}`;
|
|
554
|
+
return serializeCookie2(name, `${payload}.${await sign(await key, payload)}`, {
|
|
555
|
+
maxAge,
|
|
556
|
+
secure,
|
|
557
|
+
sameSite
|
|
558
|
+
});
|
|
559
|
+
},
|
|
560
|
+
destroy: () => serializeCookie2(name, "", { maxAge: 0, secure, sameSite }),
|
|
561
|
+
async valid(request, now = Date.now()) {
|
|
562
|
+
const value = readCookie2(request, name);
|
|
563
|
+
const parts = value?.split(".") ?? [];
|
|
564
|
+
if (parts.length !== 3)
|
|
565
|
+
return false;
|
|
566
|
+
const [digits, nonce, mac] = parts;
|
|
567
|
+
if (mac.length !== MAC_LENGTH || !nonce || !DIGITS.test(digits)) {
|
|
568
|
+
return false;
|
|
569
|
+
}
|
|
570
|
+
const expected = await sign(await key, `${digits}.${nonce}`);
|
|
571
|
+
if (!sameBytes(mac, expected))
|
|
572
|
+
return false;
|
|
573
|
+
return Number(digits) > now;
|
|
574
|
+
}
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
// src/session/social-flow.ts
|
|
578
|
+
var RETURN_MARK = "r1.";
|
|
579
|
+
var LINK_MARK = "r2.l.";
|
|
580
|
+
function packFlow(flow, returnTo, kind = "signIn") {
|
|
581
|
+
const path = Buffer.from(returnTo, "utf8").toString("base64url");
|
|
582
|
+
if (kind === "link")
|
|
583
|
+
return `${LINK_MARK}${path}.${flow}`;
|
|
584
|
+
if (returnTo === "/")
|
|
585
|
+
return flow;
|
|
586
|
+
return `${RETURN_MARK}${path}.${flow}`;
|
|
587
|
+
}
|
|
588
|
+
function behind(value, mark) {
|
|
589
|
+
const end = value.indexOf(".", mark.length);
|
|
590
|
+
if (end <= mark.length)
|
|
591
|
+
return null;
|
|
592
|
+
const path = Buffer.from(value.slice(mark.length, end), "base64url").toString("utf8");
|
|
593
|
+
return { flow: value.slice(end + 1), returnTo: safeNext2(path) };
|
|
594
|
+
}
|
|
595
|
+
function unpackFlow(value) {
|
|
596
|
+
if (value.startsWith(LINK_MARK)) {
|
|
597
|
+
const link = behind(value, LINK_MARK);
|
|
598
|
+
if (link)
|
|
599
|
+
return { ...link, kind: "link" };
|
|
600
|
+
} else if (value.startsWith(RETURN_MARK)) {
|
|
601
|
+
const signIn = behind(value, RETURN_MARK);
|
|
602
|
+
if (signIn)
|
|
603
|
+
return { ...signIn, kind: "signIn" };
|
|
604
|
+
}
|
|
605
|
+
return { flow: value, returnTo: "/", kind: "signIn" };
|
|
606
|
+
}
|
|
607
|
+
function flowCookieOf(flowCookie) {
|
|
608
|
+
const { secure, seconds = 600 } = flowCookie;
|
|
609
|
+
const baseName = flowCookie.name ?? "social_flow";
|
|
610
|
+
if (!isCookieName(baseName) || /^__(?:Host|Secure)-/.test(baseName)) {
|
|
611
|
+
throw new TypeError(`socialRoutes(): flowCookie.name ${JSON.stringify(baseName)} must be an RFC 6265 cookie name with no __Secure- or __Host- prefix (the package adds __Secure- when secure is true).`);
|
|
612
|
+
}
|
|
613
|
+
if (!Number.isFinite(seconds) || seconds <= 0) {
|
|
614
|
+
throw new TypeError(`socialRoutes(): flowCookie.seconds must be a finite number above 0; got ${seconds}.`);
|
|
615
|
+
}
|
|
616
|
+
return { name: `${secure ? "__Secure-" : ""}${baseName}`, seconds, secure };
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
// src/session/social-land.ts
|
|
620
|
+
var found = (location, cookies) => {
|
|
621
|
+
const headers = new Headers({ location });
|
|
622
|
+
for (const cookie of cookies)
|
|
623
|
+
headers.append("set-cookie", cookie);
|
|
624
|
+
return new Response(null, { status: 302, headers });
|
|
625
|
+
};
|
|
626
|
+
var clear = (ctx) => serializeCookie2(ctx.name, "", {
|
|
627
|
+
maxAge: 0,
|
|
628
|
+
path: ctx.base,
|
|
629
|
+
secure: ctx.secure
|
|
630
|
+
});
|
|
631
|
+
function paramsOf(ctx, params) {
|
|
632
|
+
return Object.entries(params ?? {}).filter(([key, value]) => key !== ctx.errorParam && key !== ctx.socialParam && value !== undefined).map(([key, value]) => [key, String(value)]);
|
|
633
|
+
}
|
|
634
|
+
function signInFailed(ctx, code, params) {
|
|
635
|
+
const url = new URLSearchParams({ [ctx.errorParam]: code });
|
|
636
|
+
for (const [key, value] of paramsOf(ctx, params))
|
|
637
|
+
url.set(key, value);
|
|
638
|
+
return found(`${ctx.signIn}?${url}`, [clear(ctx)]);
|
|
639
|
+
}
|
|
640
|
+
function withParam(path, key, value) {
|
|
641
|
+
const url = new URL(path, "http://site.invalid");
|
|
642
|
+
url.searchParams.set(key, value);
|
|
643
|
+
return `${url.pathname}${url.search}${url.hash}`;
|
|
644
|
+
}
|
|
645
|
+
function landOutcome(ctx, outcome, kept) {
|
|
646
|
+
const { cookies, invalid } = ctx;
|
|
647
|
+
if (outcome.kind === "error") {
|
|
648
|
+
return signInFailed(ctx, outcome.code, outcome.params);
|
|
649
|
+
}
|
|
650
|
+
if (outcome.kind === "linked")
|
|
651
|
+
return signInFailed(ctx, invalid);
|
|
652
|
+
if (outcome.kind === "session") {
|
|
653
|
+
if (!outcome.token || !outcome.expiresAt || millisOf(outcome.expiresAt) <= Date.now()) {
|
|
654
|
+
return signInFailed(ctx, invalid);
|
|
655
|
+
}
|
|
656
|
+
return found(safeNext2(outcome.returnTo || kept), [
|
|
657
|
+
clear(ctx),
|
|
658
|
+
cookies.commit(outcome.token, outcome.expiresAt),
|
|
659
|
+
...challengeCleared(cookies)
|
|
660
|
+
]);
|
|
661
|
+
}
|
|
662
|
+
if (!outcome.challenge || !cookies.commitChallenge) {
|
|
663
|
+
return signInFailed(ctx, invalid);
|
|
664
|
+
}
|
|
665
|
+
return found(secondFactorPath2(safeNext2(outcome.returnTo || kept), ctx.secondFactor), [clear(ctx), cookies.commitChallenge(outcome.challenge, outcome.expiresAt)]);
|
|
666
|
+
}
|
|
667
|
+
var linkLanding = (ctx, kept) => kept !== "/" ? kept : ctx.linked ?? "/";
|
|
668
|
+
function landLink(ctx, outcome, kept) {
|
|
669
|
+
const failed = (code, params) => {
|
|
670
|
+
let to = withParam(linkLanding(ctx, kept), ctx.errorParam, code);
|
|
671
|
+
for (const [key, value] of paramsOf(ctx, params)) {
|
|
672
|
+
to = withParam(to, key, value);
|
|
673
|
+
}
|
|
674
|
+
return found(safeNext2(to), [clear(ctx)]);
|
|
675
|
+
};
|
|
676
|
+
if (outcome.kind === "error")
|
|
677
|
+
return failed(outcome.code, outcome.params);
|
|
678
|
+
if (outcome.kind !== "linked")
|
|
679
|
+
return failed(ctx.invalid);
|
|
680
|
+
const to = safeNext2(outcome.returnTo || linkLanding(ctx, kept));
|
|
681
|
+
return found(safeNext2(withParam(to, ctx.socialParam, "linked")), [
|
|
682
|
+
clear(ctx)
|
|
683
|
+
]);
|
|
684
|
+
}
|
|
685
|
+
function linkRefused(ctx, kept, code) {
|
|
686
|
+
return found(safeNext2(withParam(linkLanding(ctx, kept), ctx.errorParam, code)), []);
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
// src/session/social.ts
|
|
690
|
+
var notFound = () => new Response("Not Found", { status: 404 });
|
|
691
|
+
function socialRoutes(options) {
|
|
692
|
+
const path = (key, fallback) => sitePath(options.paths?.[key] ?? fallback, {
|
|
693
|
+
label: `socialRoutes(): paths.${key}`
|
|
694
|
+
});
|
|
695
|
+
const base = path("base", "/auth");
|
|
696
|
+
const { name, seconds, secure } = flowCookieOf(options.flowCookie);
|
|
697
|
+
const land = {
|
|
698
|
+
cookies: options.cookies,
|
|
699
|
+
secondFactor: path("secondFactor", "/sign-in/second-factor"),
|
|
700
|
+
signIn: path("signIn", "/sign-in"),
|
|
701
|
+
linked: options.paths?.linked ? sitePath(options.paths.linked, {
|
|
702
|
+
label: "socialRoutes(): paths.linked"
|
|
703
|
+
}) : undefined,
|
|
704
|
+
errorParam: options.errorParam ?? "error",
|
|
705
|
+
socialParam: options.socialParam ?? "social",
|
|
706
|
+
invalid: options.invalidSessionCode ?? "invalid_session",
|
|
707
|
+
name,
|
|
708
|
+
base,
|
|
709
|
+
secure
|
|
710
|
+
};
|
|
711
|
+
const providers = new Set(options.providers);
|
|
712
|
+
const begin = async (args, kind, call) => {
|
|
713
|
+
const provider = args.params.provider;
|
|
714
|
+
if (provider === undefined || !providers.has(provider) || !call) {
|
|
715
|
+
throw notFound();
|
|
716
|
+
}
|
|
717
|
+
const returnTo = safeNext2(new URL(args.request.url).searchParams.get("next"));
|
|
718
|
+
const { request, context } = args;
|
|
719
|
+
if (kind === "link" && isCrossSite(request)) {
|
|
720
|
+
return linkRefused(land, returnTo, options.crossSiteCode ?? "social_cross_site");
|
|
721
|
+
}
|
|
722
|
+
const started = await call(provider, { request, context, returnTo });
|
|
723
|
+
const keep = serializeCookie2(name, packFlow(started.flow, returnTo, kind), {
|
|
724
|
+
maxAge: seconds,
|
|
725
|
+
path: base,
|
|
726
|
+
secure
|
|
727
|
+
});
|
|
728
|
+
return found(started.url, [keep]);
|
|
729
|
+
};
|
|
730
|
+
return {
|
|
731
|
+
flowCookieName: name,
|
|
732
|
+
start: (args) => begin(args, "signIn", options.start),
|
|
733
|
+
link: (args) => begin(args, "link", options.linkStart),
|
|
734
|
+
async callback(args) {
|
|
735
|
+
const provider = args.params.provider;
|
|
736
|
+
if (provider === undefined || !providers.has(provider))
|
|
737
|
+
throw notFound();
|
|
738
|
+
const raw = readCookie2(args.request, name);
|
|
739
|
+
if (raw === null) {
|
|
740
|
+
return signInFailed(land, options.missingFlowCode ?? "flow_missing");
|
|
741
|
+
}
|
|
742
|
+
const { flow, returnTo, kind } = unpackFlow(raw);
|
|
743
|
+
const outcome = await options.complete({ provider, callbackUrl: args.request.url, flow }, { request: args.request, context: args.context, returnTo, kind });
|
|
744
|
+
return (kind === "link" ? landLink : landOutcome)(land, outcome, returnTo);
|
|
745
|
+
}
|
|
746
|
+
};
|
|
747
|
+
}
|
|
748
|
+
// src/session/step-up.ts
|
|
749
|
+
import { data as data6 } from "react-router";
|
|
750
|
+
|
|
751
|
+
// src/session/step-up-signed-out.ts
|
|
752
|
+
function isSignedOut(error, unauthenticated, from) {
|
|
753
|
+
if (error instanceof Response)
|
|
754
|
+
return from === "request" && error.status === 401;
|
|
755
|
+
return isApiErrorLike2(error) && error.code === unauthenticated;
|
|
756
|
+
}
|
|
757
|
+
function cameFrom(request) {
|
|
758
|
+
const referer = request.headers.get("referer");
|
|
759
|
+
if (referer) {
|
|
760
|
+
try {
|
|
761
|
+
const from = new URL(referer);
|
|
762
|
+
if (from.origin === new URL(request.url).origin) {
|
|
763
|
+
return new Request(from, { headers: request.headers });
|
|
764
|
+
}
|
|
765
|
+
} catch {}
|
|
766
|
+
}
|
|
767
|
+
return request;
|
|
768
|
+
}
|
|
769
|
+
async function signingOut({
|
|
770
|
+
signIn,
|
|
771
|
+
unauthenticated,
|
|
772
|
+
run,
|
|
773
|
+
request
|
|
774
|
+
}, route) {
|
|
775
|
+
let signedOut = false;
|
|
776
|
+
const watched = {
|
|
777
|
+
request: async () => {
|
|
778
|
+
try {
|
|
779
|
+
return await run.request();
|
|
780
|
+
} catch (error) {
|
|
781
|
+
signedOut ||= isSignedOut(error, unauthenticated, "request");
|
|
782
|
+
throw error;
|
|
783
|
+
}
|
|
784
|
+
},
|
|
785
|
+
confirm: async (input) => {
|
|
786
|
+
try {
|
|
787
|
+
return await run.confirm(input);
|
|
788
|
+
} catch (error) {
|
|
789
|
+
signedOut ||= isSignedOut(error, unauthenticated, "confirm");
|
|
790
|
+
throw error;
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
};
|
|
794
|
+
const redirect = () => signIn.signInRedirect(cameFrom(request));
|
|
795
|
+
let answer;
|
|
796
|
+
try {
|
|
797
|
+
answer = await route(watched);
|
|
798
|
+
} catch (error) {
|
|
799
|
+
throw signedOut ? redirect() : error;
|
|
800
|
+
}
|
|
801
|
+
if (signedOut)
|
|
802
|
+
throw redirect();
|
|
803
|
+
return answer;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
// src/session/timed-wait.ts
|
|
807
|
+
var isTimedWait = (error) => error.status === 429 || isThrottledReason2(error);
|
|
808
|
+
|
|
809
|
+
// src/session/step-up.ts
|
|
810
|
+
function resolve2(steps) {
|
|
811
|
+
const invalidCode = steps.codes?.invalidCode ?? INVALID_CODE2;
|
|
812
|
+
const challengeOver = steps.codes?.challengeOver ?? STEP_UP_OVER2;
|
|
813
|
+
if (challengeOver.includes(invalidCode)) {
|
|
814
|
+
throw new TypeError(`stepUpSteps(): the code ${JSON.stringify(invalidCode)} is both the wrong-code code (codes.invalidCode) and in codes.challengeOver. A wrong code that leaves tries cannot end the challenge.`);
|
|
815
|
+
}
|
|
816
|
+
if (steps.onSignedOut === "sign-in" && !steps.signIn.signInRedirect) {
|
|
817
|
+
throw new TypeError("stepUpSteps(): onSignedOut: 'sign-in' needs signIn.signInRedirect, which the sign-in given has not.");
|
|
818
|
+
}
|
|
819
|
+
const { signIn } = steps;
|
|
820
|
+
return {
|
|
821
|
+
options: signIn,
|
|
822
|
+
signInRedirect: signIn.signInRedirect?.bind(signIn),
|
|
823
|
+
steps,
|
|
824
|
+
invalidCode,
|
|
825
|
+
challengeOver,
|
|
826
|
+
stepUpRequired: steps.codes?.stepUpRequired ?? STEP_UP_REQUIRED2,
|
|
827
|
+
mailThrottled: steps.codes?.mailThrottled ?? MAIL_THROTTLED2,
|
|
828
|
+
unauthenticated: steps.codes?.unauthenticated ?? UNAUTHENTICATED2
|
|
829
|
+
};
|
|
830
|
+
}
|
|
831
|
+
function worded2({ steps }, error, language) {
|
|
832
|
+
return steps.wording?.(error, language) ?? steps.signIn.errors.apiErrorMessage(error, language);
|
|
833
|
+
}
|
|
834
|
+
function refusedCode(context, error, language) {
|
|
835
|
+
const { steps } = context;
|
|
836
|
+
const attemptsLeft = attemptsLeftOf2(error);
|
|
837
|
+
if (attemptsLeft === 0) {
|
|
838
|
+
return {
|
|
839
|
+
error: "expired",
|
|
840
|
+
attemptsLeft,
|
|
841
|
+
locked: false,
|
|
842
|
+
message: steps.spent(language)
|
|
843
|
+
};
|
|
844
|
+
}
|
|
845
|
+
const message = codeRefusal(context, error, language, undefined) ?? steps.signIn.errors.apiErrorMessage(error, language);
|
|
846
|
+
return {
|
|
847
|
+
error: "invalid",
|
|
848
|
+
...attemptsLeft === undefined ? {} : { attemptsLeft },
|
|
849
|
+
locked: false,
|
|
850
|
+
message
|
|
851
|
+
};
|
|
852
|
+
}
|
|
853
|
+
function isThrottle(context, error) {
|
|
854
|
+
return error.code === context.mailThrottled || isTimedWait(error);
|
|
855
|
+
}
|
|
856
|
+
async function requestStep(context, run, { request, language }) {
|
|
857
|
+
samesitePost(context.steps.signIn.json, request);
|
|
858
|
+
const intent = "request-step-up";
|
|
859
|
+
try {
|
|
860
|
+
const { challenge, via } = await run();
|
|
861
|
+
return { ok: true, intent, challenge, via };
|
|
862
|
+
} catch (error) {
|
|
863
|
+
const refusal = context.steps.signIn.errors.apiRefusal(error, language);
|
|
864
|
+
if (!refusal)
|
|
865
|
+
throw error;
|
|
866
|
+
const api = isApiErrorLike2(error);
|
|
867
|
+
const message = api ? worded2(context, error, language) : refusal.message;
|
|
868
|
+
const throttled = api && isThrottle(context, error);
|
|
869
|
+
const retryAfter = throttled ? retryAfterOf2(error) : undefined;
|
|
870
|
+
return data6({
|
|
871
|
+
ok: false,
|
|
872
|
+
intent,
|
|
873
|
+
error: throttled ? "throttled" : "failed",
|
|
874
|
+
message,
|
|
875
|
+
...retryAfter === undefined ? {} : { retryAfter }
|
|
876
|
+
}, { status: refusal.status });
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
async function confirmStep(context, run, { request, language }) {
|
|
880
|
+
samesitePost(context.steps.signIn.json, request);
|
|
881
|
+
const intent = "confirm-step-up";
|
|
882
|
+
try {
|
|
883
|
+
await run();
|
|
884
|
+
return { ok: true, intent };
|
|
885
|
+
} catch (error) {
|
|
886
|
+
const refusal = context.steps.signIn.errors.apiRefusal(error, language);
|
|
887
|
+
if (!refusal)
|
|
888
|
+
throw error;
|
|
889
|
+
const stay = (failure) => data6({ ok: false, intent, ...failure }, { status: refusal.status });
|
|
890
|
+
const failed = (message) => stay({ error: "failed", locked: false, message });
|
|
891
|
+
if (!isApiErrorLike2(error))
|
|
892
|
+
return failed(refusal.message);
|
|
893
|
+
if (isTimedWait(error)) {
|
|
894
|
+
const retryAfter = retryAfterOf2(error);
|
|
895
|
+
return stay({
|
|
896
|
+
error: "throttled",
|
|
897
|
+
locked: false,
|
|
898
|
+
message: worded2(context, error, language),
|
|
899
|
+
...retryAfter === undefined ? {} : { retryAfter }
|
|
900
|
+
});
|
|
901
|
+
}
|
|
902
|
+
if (error.code === context.invalidCode) {
|
|
903
|
+
return stay(refusedCode(context, error, language));
|
|
904
|
+
}
|
|
905
|
+
if (error.code && context.challengeOver.includes(error.code)) {
|
|
906
|
+
return stay({
|
|
907
|
+
error: "expired",
|
|
908
|
+
locked: false,
|
|
909
|
+
message: context.steps.wording?.(error, language) ?? context.steps.spent(language)
|
|
910
|
+
});
|
|
911
|
+
}
|
|
912
|
+
return failed(worded2(context, error, language));
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
async function routeStep(context, run, call) {
|
|
916
|
+
const { json } = context.steps.signIn;
|
|
917
|
+
samesitePost(json, call.request);
|
|
918
|
+
if (context.steps.onSignedOut !== "sign-in")
|
|
919
|
+
return routeIntent(context, run, call);
|
|
920
|
+
const redirect = context.signInRedirect;
|
|
921
|
+
if (!redirect)
|
|
922
|
+
return routeIntent(context, run, call);
|
|
923
|
+
return signingOut({
|
|
924
|
+
signIn: { signInRedirect: redirect },
|
|
925
|
+
unauthenticated: context.unauthenticated,
|
|
926
|
+
run,
|
|
927
|
+
request: call.request
|
|
928
|
+
}, (watched) => routeIntent(context, watched, call));
|
|
929
|
+
}
|
|
930
|
+
async function routeIntent(context, run, call) {
|
|
931
|
+
const { json } = context.steps.signIn;
|
|
932
|
+
const body = await json.readJson(call.request);
|
|
933
|
+
if (body?.intent === "request-step-up") {
|
|
934
|
+
return requestStep(context, () => run.request(), call);
|
|
935
|
+
}
|
|
936
|
+
if (body?.intent === "confirm-step-up" && typeof body.challenge === "string" && typeof body.code === "string") {
|
|
937
|
+
const { challenge, code } = body;
|
|
938
|
+
const via = body.via === "email" || body.via === "secondFactor" ? body.via : undefined;
|
|
939
|
+
return confirmStep(context, () => run.confirm({ challenge, code }), {
|
|
940
|
+
...call,
|
|
941
|
+
via
|
|
942
|
+
});
|
|
943
|
+
}
|
|
944
|
+
throw data6("Not a step-up intent", { status: 400 });
|
|
945
|
+
}
|
|
946
|
+
function stepUpSteps(options) {
|
|
947
|
+
const context = resolve2(options);
|
|
948
|
+
return {
|
|
949
|
+
request: (run, o) => requestStep(context, run, o),
|
|
950
|
+
confirm: (run, o) => confirmStep(context, run, o),
|
|
951
|
+
route: (run, o) => routeStep(context, run, o),
|
|
952
|
+
isStepUpRequired: (error) => isApiErrorLike2(error) && error.code === context.stepUpRequired
|
|
953
|
+
};
|
|
954
|
+
}
|
|
955
|
+
// src/session/throttle.ts
|
|
956
|
+
var DEFAULTS = {
|
|
957
|
+
max: 5,
|
|
958
|
+
windowMs: 15 * 60000,
|
|
959
|
+
maxKeys: 1e4,
|
|
960
|
+
globalMax: 100,
|
|
961
|
+
globalWindowMs: 60000,
|
|
962
|
+
maxDelayMs: 3000,
|
|
963
|
+
maxConcurrentVerifies: 2,
|
|
964
|
+
maxQueuedVerifies: 4
|
|
965
|
+
};
|
|
966
|
+
function positive(name, value, allowZero = false) {
|
|
967
|
+
const ok = Number.isInteger(value) && (allowZero ? value >= 0 : value > 0);
|
|
968
|
+
if (!ok) {
|
|
969
|
+
throw new TypeError(`createSignInThrottle(): ${name} must be a positive integer${allowZero ? " or 0" : ""}; got ${String(value)}.`);
|
|
970
|
+
}
|
|
971
|
+
return value;
|
|
972
|
+
}
|
|
973
|
+
function createSignInThrottle(options = {}) {
|
|
974
|
+
const max = positive("max", options.max ?? DEFAULTS.max);
|
|
975
|
+
const windowMs = positive("windowMs", options.windowMs ?? DEFAULTS.windowMs);
|
|
976
|
+
const maxKeys = positive("maxKeys", options.maxKeys ?? DEFAULTS.maxKeys);
|
|
977
|
+
const globalMax = positive("globalMax", options.globalMax ?? DEFAULTS.globalMax);
|
|
978
|
+
const globalWindowMs = positive("globalWindowMs", options.globalWindowMs ?? DEFAULTS.globalWindowMs);
|
|
979
|
+
const mode = options.globalMode ?? "refuse";
|
|
980
|
+
if (mode !== "refuse" && mode !== "delay") {
|
|
981
|
+
throw new TypeError(`createSignInThrottle(): globalMode must be 'refuse' or 'delay'; got ${String(mode)}.`);
|
|
982
|
+
}
|
|
983
|
+
const maxDelayMs = positive("maxDelayMs", options.maxDelayMs ?? DEFAULTS.maxDelayMs);
|
|
984
|
+
const globalKept = mode === "delay" ? globalMax * 2 : globalMax;
|
|
985
|
+
const slots = positive("maxConcurrentVerifies", options.maxConcurrentVerifies ?? DEFAULTS.maxConcurrentVerifies);
|
|
986
|
+
const queueLimit = positive("maxQueuedVerifies", options.maxQueuedVerifies ?? DEFAULTS.maxQueuedVerifies, true);
|
|
987
|
+
const now = options.now ?? Date.now;
|
|
988
|
+
const failures = new Map;
|
|
989
|
+
let global = [];
|
|
990
|
+
const recent = (key, at) => {
|
|
991
|
+
const kept = (failures.get(key) ?? []).filter((time) => at - time < windowMs);
|
|
992
|
+
if (kept.length === 0)
|
|
993
|
+
failures.delete(key);
|
|
994
|
+
return kept;
|
|
995
|
+
};
|
|
996
|
+
const seconds = (ms) => Math.ceil(ms / 1000);
|
|
997
|
+
let running = 0;
|
|
998
|
+
const queue = [];
|
|
999
|
+
const release = () => {
|
|
1000
|
+
const next = queue.shift();
|
|
1001
|
+
if (next)
|
|
1002
|
+
next();
|
|
1003
|
+
else
|
|
1004
|
+
running--;
|
|
1005
|
+
};
|
|
1006
|
+
return {
|
|
1007
|
+
wait(key) {
|
|
1008
|
+
const at = now();
|
|
1009
|
+
let wait = 0;
|
|
1010
|
+
const kept = recent(key, at);
|
|
1011
|
+
if (kept.length >= max) {
|
|
1012
|
+
wait = seconds(windowMs - (at - kept[0]));
|
|
1013
|
+
}
|
|
1014
|
+
global = global.filter((time) => at - time < globalWindowMs);
|
|
1015
|
+
if (mode === "refuse" && global.length >= globalMax) {
|
|
1016
|
+
wait = Math.max(wait, seconds(globalWindowMs - (at - global[0])));
|
|
1017
|
+
}
|
|
1018
|
+
return wait;
|
|
1019
|
+
},
|
|
1020
|
+
globalDelay() {
|
|
1021
|
+
if (mode !== "delay")
|
|
1022
|
+
return 0;
|
|
1023
|
+
const at = now();
|
|
1024
|
+
global = global.filter((time) => at - time < globalWindowMs);
|
|
1025
|
+
if (global.length < globalMax)
|
|
1026
|
+
return 0;
|
|
1027
|
+
const excess = global.length - globalMax + 1;
|
|
1028
|
+
return Math.min(maxDelayMs, Math.ceil(maxDelayMs * excess / globalMax));
|
|
1029
|
+
},
|
|
1030
|
+
fail(key) {
|
|
1031
|
+
const at = now();
|
|
1032
|
+
const kept = [...recent(key, at), at].slice(-max);
|
|
1033
|
+
failures.delete(key);
|
|
1034
|
+
failures.set(key, kept);
|
|
1035
|
+
if (failures.size > maxKeys) {
|
|
1036
|
+
const oldest = failures.keys().next().value;
|
|
1037
|
+
if (oldest !== undefined)
|
|
1038
|
+
failures.delete(oldest);
|
|
1039
|
+
}
|
|
1040
|
+
global = [
|
|
1041
|
+
...global.filter((time) => at - time < globalWindowMs),
|
|
1042
|
+
at
|
|
1043
|
+
].slice(-globalKept);
|
|
1044
|
+
},
|
|
1045
|
+
clear(key) {
|
|
1046
|
+
failures.delete(key);
|
|
1047
|
+
},
|
|
1048
|
+
async verify(task) {
|
|
1049
|
+
if (running >= slots) {
|
|
1050
|
+
if (queue.length >= queueLimit)
|
|
1051
|
+
return { busy: true };
|
|
1052
|
+
await new Promise((resolve) => queue.push(resolve));
|
|
1053
|
+
} else {
|
|
1054
|
+
running++;
|
|
1055
|
+
}
|
|
1056
|
+
try {
|
|
1057
|
+
return { busy: false, value: await task() };
|
|
1058
|
+
} finally {
|
|
1059
|
+
release();
|
|
1060
|
+
}
|
|
1061
|
+
},
|
|
1062
|
+
get size() {
|
|
1063
|
+
return failures.size;
|
|
1064
|
+
}
|
|
1065
|
+
};
|
|
1066
|
+
}
|
|
1067
|
+
export {
|
|
1068
|
+
CHALLENGE_OVER2 as CHALLENGE_OVER,
|
|
1069
|
+
INVALID_CODE2 as INVALID_CODE,
|
|
1070
|
+
MAIL_THROTTLED2 as MAIL_THROTTLED,
|
|
1071
|
+
STEP_UP_OVER2 as STEP_UP_OVER,
|
|
1072
|
+
STEP_UP_REQUIRED2 as STEP_UP_REQUIRED,
|
|
1073
|
+
TOKEN_PAGE_HEADERS,
|
|
1074
|
+
UNAUTHENTICATED2 as UNAUTHENTICATED,
|
|
1075
|
+
authLinks,
|
|
1076
|
+
createSignInThrottle,
|
|
1077
|
+
handOver,
|
|
1078
|
+
handingOver,
|
|
1079
|
+
readCookie2 as readCookie,
|
|
1080
|
+
secondsUntil2 as secondsUntil,
|
|
1081
|
+
serializeCookie2 as serializeCookie,
|
|
1082
|
+
sessionCookies2 as sessionCookies,
|
|
1083
|
+
signInFlow,
|
|
1084
|
+
signedSession,
|
|
1085
|
+
socialRoutes,
|
|
1086
|
+
stepUpSteps
|
|
1087
|
+
};
|
|
1088
|
+
|
|
1089
|
+
//# debugId=7E8FF8875D673BA364756E2164756E21
|
|
1090
|
+
//# sourceMappingURL=index.js.map
|