nuxt-ignis 0.4.0 → 0.5.0-rc.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/.data/content/contents.sqlite +0 -0
- package/.nuxt/app.config.mjs +8 -3
- package/.nuxt/components.d.ts +297 -747
- package/.nuxt/content/components.ts +117 -116
- package/.nuxt/dev/index.mjs +1027 -345
- package/.nuxt/dev/index.mjs.map +1 -1
- package/.nuxt/dist/server/client.manifest.json +2 -2
- package/.nuxt/dist/server/client.manifest.mjs +2 -2
- package/.nuxt/eslint-typegen.d.ts +85 -16
- package/.nuxt/eslint.config.d.mts +3 -3
- package/.nuxt/eslint.config.mjs +11 -11
- package/.nuxt/i18n-route-resources.mjs +3 -0
- package/.nuxt/imports.d.ts +79 -86
- package/.nuxt/manifest/latest.json +1 -1
- package/.nuxt/manifest/meta/dev.json +1 -1
- package/.nuxt/mdc-highlighter.mjs +1 -1
- package/.nuxt/mdc-image-component.mjs +1 -1
- package/.nuxt/mdc-imports.mjs +1 -1
- package/.nuxt/module/nuxt-robots.d.ts +12 -12
- package/.nuxt/module/nuxt-seo-utils.assets.d.ts +1 -1
- package/.nuxt/module/nuxt-seo-utils.d.ts +10 -10
- package/.nuxt/module/nuxt-site-config.d.ts +8 -8
- package/.nuxt/module/nuxt-sitemap.d.ts +48 -0
- package/.nuxt/nitro.json +5 -5
- package/.nuxt/nuxt.d.ts +18 -22
- package/.nuxt/nuxt.json +2 -2
- package/.nuxt/nuxt.node.d.ts +28 -0
- package/.nuxt/nuxt.shared.d.ts +5 -0
- package/.nuxt/tsconfig.app.json +459 -0
- package/.nuxt/tsconfig.json +283 -301
- package/.nuxt/tsconfig.node.json +218 -0
- package/.nuxt/tsconfig.server.json +193 -166
- package/.nuxt/tsconfig.shared.json +278 -0
- package/.nuxt/types/app.config.d.ts +8 -2
- package/.nuxt/types/build.d.ts +3 -2
- package/.nuxt/types/components.d.ts +321 -0
- package/.nuxt/types/i18n-plugin.d.ts +25 -6
- package/.nuxt/types/imports.d.ts +390 -398
- package/.nuxt/types/modules.d.ts +579 -0
- package/.nuxt/types/neon.d.ts +11 -8
- package/.nuxt/types/nitro-imports.d.ts +394 -355
- package/.nuxt/types/nitro-middleware.d.ts +5 -0
- package/.nuxt/types/nitro-nuxt.d.ts +28 -2
- package/.nuxt/types/nitro-routes.d.ts +28 -25
- package/.nuxt/types/plugins.d.ts +42 -39
- package/.nuxt/types/runtime-config.d.ts +1018 -0
- package/.nuxt/types/ui.d.ts +3 -3
- package/.nuxt/ui/button.ts +42 -42
- package/.nuxt/ui/command-palette.ts +2 -1
- package/.nuxt/ui/drawer.ts +1 -1
- package/.nuxt/ui/file-upload.ts +290 -0
- package/.nuxt/ui/index.ts +1 -0
- package/.nuxt/ui/input.ts +1 -1
- package/.nuxt/ui/kbd.ts +167 -3
- package/.nuxt/ui/select.ts +7 -7
- package/.nuxt/ui/table.ts +8 -0
- package/.nuxt/ui/tabs.ts +4 -2
- package/.nuxt/ui/textarea.ts +1 -1
- package/.nuxt/ui/toast.ts +8 -15
- package/.nuxt/ui/tooltip.ts +1 -1
- package/.nuxt/ui-image-component.ts +1 -1
- package/.output/nitro.json +15 -0
- package/.output/public/__nuxt_content/content/sql_dump.txt +1 -0
- package/.output/public/_fonts/EP1810cmAtyahQPDHB6nvBzRkIG5RcNv4u5vTy1aYHU-6h0m1Bf2RaAhaXNIrP4eW5ztakwJFN8JcCXPea_zL8E.woff2 +0 -0
- package/.output/public/_fonts/JNWOTRocaYj0gq52vW_s7sHAdSMUetrRmhhggCVxyZ0-8R9ucQ623nsXJTayzizuOYtVntUNPQzR8aWYpk8a8d8.woff2 +0 -0
- package/.output/public/_fonts/XbAtjIvy1UErjg9eu_v7X3zPLS_AwsmqVsR9fG-JB6o-s6NA3uLuPs0vnwZNhOTJ1g_7NVire0Uvng_2zP6mjNQ.woff2 +0 -0
- package/.output/public/_fonts/ZLm6CLvwhQbamZ73M80jbqz7DuOkHlT_HRyXHG7YfVs-t7L_F0sYO8m44V7ZmFyCOiGNJDIBFFLVfLeLwCIUhsI.woff2 +0 -0
- package/.output/public/_fonts/aPa9az0DeE4U5rqM-Ov0Vl_obQis_d6sScLNygGkvxw-4s8awL3_7NCZIzHTaY2tD681prJPuNHGqkbChz7OJeE.woff2 +0 -0
- package/.output/public/_fonts/kgyHMsxRmhh06xcV0yKMKdTKQBsQpXGi7erqwaqgjXg-BgCmQXkW3N6talUbQSKexB2sHUT0qGEzmM4uMcnDAbI.woff +0 -0
- package/.output/public/_ignis-config.json +201 -0
- package/.output/public/_nuxt/1soVlS0z.js +1 -0
- package/.output/public/_nuxt/B7rsWaa2.js +1 -0
- package/.output/public/_nuxt/BA2WKEAc.js +1 -0
- package/.output/public/_nuxt/BE_a_Zhd.js +1 -0
- package/.output/public/_nuxt/BFreiu22.js +1 -0
- package/.output/public/_nuxt/BLcTglbc.js +1 -0
- package/.output/public/_nuxt/Bhd4_yFT.js +1 -0
- package/.output/public/_nuxt/Bi2eMDmd.js +1 -0
- package/.output/public/_nuxt/BiUZ9mZX.js +1 -0
- package/.output/public/_nuxt/Bm30MqE0.js +1 -0
- package/.output/public/_nuxt/Bnm5Nral.js +1 -0
- package/.output/public/_nuxt/BrY1radz.js +35 -0
- package/.output/public/_nuxt/Bs3IGOdt.js +1 -0
- package/.output/public/_nuxt/ByaiRTkI.js +1 -0
- package/.output/public/_nuxt/CA578xwz.js +1 -0
- package/.output/public/_nuxt/CDttUXKg.js +1 -0
- package/.output/public/_nuxt/CSN71QT8.js +1 -0
- package/.output/public/_nuxt/CmzFGS1a.js +90 -0
- package/.output/public/_nuxt/CqCaqSd2.js +1 -0
- package/.output/public/_nuxt/D8v-efI7.js +1 -0
- package/.output/public/_nuxt/DR4hWRk7.js +1 -0
- package/.output/public/_nuxt/DRroQ-Xq.js +1 -0
- package/.output/public/_nuxt/DStnBfJS.js +1 -0
- package/.output/public/_nuxt/DXBpKbsa.js +6759 -0
- package/.output/public/_nuxt/DXTYyv-V.js +1 -0
- package/.output/public/_nuxt/DXbccJ2T.js +1 -0
- package/.output/public/_nuxt/DeS1g0YT.js +1 -0
- package/.output/public/_nuxt/Deb6R53f.js +1 -0
- package/.output/public/_nuxt/DiDHllLr.js +1 -0
- package/.output/public/_nuxt/DyCICqRh.js +1 -0
- package/.output/public/_nuxt/DzT4wm3Y.js +1 -0
- package/.output/public/_nuxt/E8nje24C.js +1 -0
- package/.output/public/_nuxt/ProsePre.D5orA6B_.css +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -0
- package/.output/public/_nuxt/builds/meta/9a624d26-216d-4e69-b3a7-54b68357876f.json +1 -0
- package/.output/public/_nuxt/dJ-vStNn.js +1 -0
- package/.output/public/_nuxt/entry.jMyW6Sg0.css +1 -0
- package/.output/public/_nuxt/error-404.BGUbR0Uk.css +1 -0
- package/.output/public/_nuxt/error-500.CQfkKpQ2.css +1 -0
- package/.output/public/_nuxt/sHsV3x2B.js +1 -0
- package/.output/public/_nuxt/sQEqbbg2.js +1 -0
- package/.output/public/_nuxt/vueform.ChEauysg.css +1 -0
- package/.output/public/favicon.ico +0 -0
- package/.output/public/nuxt-ignis.png +0 -0
- package/.output/public/unsplash.jpg +0 -0
- package/.output/server/chunks/_/error-500.mjs +10 -0
- package/.output/server/chunks/_/error-500.mjs.map +1 -0
- package/.output/server/chunks/_/i18n.config.mjs +39 -0
- package/.output/server/chunks/_/i18n.config.mjs.map +1 -0
- package/.output/server/chunks/_/nitro.mjs +12834 -0
- package/.output/server/chunks/_/nitro.mjs.map +1 -0
- package/.output/server/chunks/build/client.manifest.mjs +511 -0
- package/.output/server/chunks/build/client.manifest.mjs.map +1 -0
- package/.output/server/chunks/build/database.compressed.mjs +4 -0
- package/.output/server/chunks/build/database.compressed.mjs.map +1 -0
- package/.output/server/chunks/raw/headers.mjs +5 -0
- package/.output/server/chunks/raw/headers.mjs.map +1 -0
- package/.output/server/chunks/routes/api/neonTest.mjs +41 -0
- package/.output/server/chunks/routes/api/neonTest.mjs.map +1 -0
- package/.output/server/chunks/routes/renderer.mjs +352 -0
- package/.output/server/chunks/routes/renderer.mjs.map +1 -0
- package/.output/server/chunks/virtual/_virtual_spa-template.mjs +4 -0
- package/.output/server/chunks/virtual/_virtual_spa-template.mjs.map +1 -0
- package/.output/server/chunks/virtual/child-sources.mjs +4 -0
- package/.output/server/chunks/virtual/child-sources.mjs.map +1 -0
- package/.output/server/chunks/virtual/global-sources.mjs +48 -0
- package/.output/server/chunks/virtual/global-sources.mjs.map +1 -0
- package/.output/server/index.mjs +49 -0
- package/.output/server/index.mjs.map +1 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/convertor/create.cjs +32 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/data-patch.cjs +7 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/data.cjs +97 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/definition-syntax/SyntaxError.cjs +16 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/definition-syntax/generate.cjs +135 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/definition-syntax/index.cjs +13 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/definition-syntax/parse.cjs +588 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/definition-syntax/tokenizer.cjs +56 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/definition-syntax/walk.cjs +56 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/generator/create.cjs +103 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/generator/sourceMap.cjs +96 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/generator/token-before.cjs +170 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/index.cjs +63 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/lexer/Lexer.cjs +459 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/lexer/error.cjs +128 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/lexer/generic-an-plus-b.cjs +235 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/lexer/generic-const.cjs +12 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/lexer/generic-urange.cjs +149 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/lexer/generic.cjs +573 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/lexer/match-graph.cjs +459 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/lexer/match.cjs +632 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/lexer/prepare-tokens.cjs +54 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/lexer/search.cjs +65 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/lexer/structure.cjs +168 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/lexer/trace.cjs +73 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/parser/SyntaxError.cjs +69 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/parser/create.cjs +336 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/parser/sequence.cjs +47 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/atrule/font-face.cjs +12 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/atrule/import.cjs +37 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/atrule/index.cjs +17 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/atrule/media.cjs +16 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/atrule/page.cjs +16 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/atrule/supports.cjs +77 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/config/lexer.cjs +12 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/config/mix.cjs +142 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/config/parser.cjs +34 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/config/walker.cjs +9 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/create.cjs +56 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/function/expression.cjs +11 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/function/var.cjs +43 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/index.cjs +14 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/AnPlusB.cjs +293 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/Atrule.cjs +103 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/AtrulePrelude.cjs +52 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/AttributeSelector.cjs +148 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/Block.cjs +90 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/Brackets.cjs +38 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/CDC.cjs +26 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/CDO.cjs +26 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/ClassSelector.cjs +31 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/Combinator.cjs +61 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/Comment.cjs +40 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/Declaration.cjs +166 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/DeclarationList.cjs +50 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/Dimension.cjs +30 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/Function.cjs +45 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/Hash.cjs +30 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/IdSelector.cjs +33 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/Identifier.cjs +25 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/MediaFeature.cjs +76 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/MediaQuery.cjs +61 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/MediaQueryList.cjs +41 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/Nth.cjs +54 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/Number.cjs +25 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/Operator.cjs +28 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/Parentheses.cjs +38 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/Percentage.cjs +25 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/PseudoClassSelector.cjs +65 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/PseudoElementSelector.cjs +67 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/Ratio.cjs +67 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/Raw.cjs +48 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/Rule.cjs +58 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/Selector.cjs +39 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/SelectorList.cjs +43 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/String.cjs +26 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/StyleSheet.cjs +83 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/TypeSelector.cjs +59 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/UnicodeRange.cjs +158 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/Url.cjs +54 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/Value.cjs +26 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/WhiteSpace.cjs +34 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/index-parse.cjs +85 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/node/index.cjs +85 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/pseudo/index.cjs +52 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/scope/atrulePrelude.cjs +9 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/scope/default.cjs +76 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/scope/index.cjs +11 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/scope/selector.cjs +84 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/syntax/scope/value.cjs +29 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/tokenizer/OffsetToLocation.cjs +91 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/tokenizer/TokenStream.cjs +264 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/tokenizer/adopt-buffer.cjs +13 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/tokenizer/char-code-definitions.cjs +231 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/tokenizer/index.cjs +554 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/tokenizer/names.cjs +31 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/tokenizer/types.cjs +57 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/tokenizer/utils.cjs +261 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/utils/List.cjs +473 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/utils/clone.cjs +25 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/utils/create-custom-error.cjs +18 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/utils/ident.cjs +102 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/utils/names.cjs +113 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/utils/string.cjs +99 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/utils/url.cjs +108 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/version.cjs +5 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/cjs/walker/create.cjs +291 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/data/patch.json +739 -0
- package/.output/server/node_modules/.nitro/css-tree@2.2.1/package.json +127 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/convertor/create.cjs +32 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/data-patch.cjs +7 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/data.cjs +99 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/definition-syntax/SyntaxError.cjs +16 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/definition-syntax/generate.cjs +135 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/definition-syntax/index.cjs +13 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/definition-syntax/parse.cjs +588 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/definition-syntax/tokenizer.cjs +56 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/definition-syntax/walk.cjs +56 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/generator/create.cjs +103 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/generator/sourceMap.cjs +96 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/generator/token-before.cjs +170 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/index.cjs +63 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/lexer/Lexer.cjs +470 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/lexer/error.cjs +128 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/lexer/generic-an-plus-b.cjs +235 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/lexer/generic-const.cjs +12 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/lexer/generic-urange.cjs +149 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/lexer/generic.cjs +573 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/lexer/match-graph.cjs +459 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/lexer/match.cjs +632 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/lexer/prepare-tokens.cjs +54 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/lexer/search.cjs +65 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/lexer/structure.cjs +168 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/lexer/trace.cjs +73 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/lexer/units.cjs +38 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/parser/SyntaxError.cjs +69 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/parser/create.cjs +336 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/parser/sequence.cjs +47 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/atrule/font-face.cjs +12 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/atrule/import.cjs +37 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/atrule/index.cjs +19 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/atrule/media.cjs +16 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/atrule/nest.cjs +16 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/atrule/page.cjs +16 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/atrule/supports.cjs +77 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/config/lexer.cjs +12 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/config/mix.cjs +119 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/config/parser.cjs +34 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/config/walker.cjs +9 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/create.cjs +57 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/function/expression.cjs +11 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/function/var.cjs +43 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/index.cjs +14 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/AnPlusB.cjs +293 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/Atrule.cjs +103 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/AtrulePrelude.cjs +52 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/AttributeSelector.cjs +148 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/Block.cjs +96 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/Brackets.cjs +38 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/CDC.cjs +26 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/CDO.cjs +26 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/ClassSelector.cjs +31 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/Combinator.cjs +61 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/Comment.cjs +40 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/Declaration.cjs +166 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/DeclarationList.cjs +62 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/Dimension.cjs +30 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/Function.cjs +45 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/Hash.cjs +30 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/IdSelector.cjs +33 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/Identifier.cjs +25 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/MediaFeature.cjs +76 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/MediaQuery.cjs +61 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/MediaQueryList.cjs +41 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/NestingSelector.cjs +29 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/Nth.cjs +54 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/Number.cjs +25 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/Operator.cjs +28 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/Parentheses.cjs +38 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/Percentage.cjs +25 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/PseudoClassSelector.cjs +65 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/PseudoElementSelector.cjs +67 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/Ratio.cjs +67 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/Raw.cjs +48 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/Rule.cjs +58 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/Selector.cjs +39 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/SelectorList.cjs +43 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/String.cjs +26 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/StyleSheet.cjs +83 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/TypeSelector.cjs +59 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/UnicodeRange.cjs +158 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/Url.cjs +54 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/Value.cjs +26 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/WhiteSpace.cjs +34 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/index-parse.cjs +87 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/node/index.cjs +87 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/pseudo/index.cjs +54 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/scope/atrulePrelude.cjs +9 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/scope/default.cjs +76 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/scope/index.cjs +11 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/scope/selector.cjs +88 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/syntax/scope/value.cjs +29 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/tokenizer/OffsetToLocation.cjs +91 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/tokenizer/TokenStream.cjs +264 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/tokenizer/adopt-buffer.cjs +13 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/tokenizer/char-code-definitions.cjs +231 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/tokenizer/index.cjs +554 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/tokenizer/names.cjs +31 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/tokenizer/types.cjs +57 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/tokenizer/utils.cjs +261 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/utils/List.cjs +473 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/utils/clone.cjs +25 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/utils/create-custom-error.cjs +18 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/utils/ident.cjs +102 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/utils/names.cjs +113 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/utils/string.cjs +99 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/utils/url.cjs +108 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/version.cjs +5 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/cjs/walker/create.cjs +291 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/data/patch.json +725 -0
- package/.output/server/node_modules/.nitro/css-tree@2.3.1/package.json +126 -0
- package/.output/server/node_modules/.nitro/entities@4.5.0/lib/decode.js +536 -0
- package/.output/server/node_modules/.nitro/entities@4.5.0/lib/decode_codepoint.js +76 -0
- package/.output/server/node_modules/.nitro/entities@4.5.0/lib/encode.js +77 -0
- package/.output/server/node_modules/.nitro/entities@4.5.0/lib/escape.js +122 -0
- package/.output/server/node_modules/.nitro/entities@4.5.0/lib/generated/decode-data-html.js +9 -0
- package/.output/server/node_modules/.nitro/entities@4.5.0/lib/generated/decode-data-xml.js +9 -0
- package/.output/server/node_modules/.nitro/entities@4.5.0/lib/generated/encode-html.js +12 -0
- package/.output/server/node_modules/.nitro/entities@4.5.0/lib/index.js +126 -0
- package/.output/server/node_modules/.nitro/entities@4.5.0/package.json +90 -0
- package/.output/server/node_modules/.nitro/entities@6.0.1/dist/esm/decode-codepoint.js +72 -0
- package/.output/server/node_modules/.nitro/entities@6.0.1/dist/esm/decode.js +497 -0
- package/.output/server/node_modules/.nitro/entities@6.0.1/dist/esm/escape.js +117 -0
- package/.output/server/node_modules/.nitro/entities@6.0.1/dist/esm/generated/decode-data-html.js +7 -0
- package/.output/server/node_modules/.nitro/entities@6.0.1/dist/esm/generated/decode-data-xml.js +7 -0
- package/.output/server/node_modules/.nitro/entities@6.0.1/dist/esm/package.json +3 -0
- package/.output/server/node_modules/.nitro/entities@6.0.1/package.json +118 -0
- package/.output/server/node_modules/.nitro/mdn-data@2.0.28/css/at-rules.json +620 -0
- package/.output/server/node_modules/.nitro/mdn-data@2.0.28/css/properties.json +9297 -0
- package/.output/server/node_modules/.nitro/mdn-data@2.0.28/css/syntaxes.json +794 -0
- package/.output/server/node_modules/.nitro/mdn-data@2.0.28/package.json +38 -0
- package/.output/server/node_modules/.nitro/mdn-data@2.0.30/css/at-rules.json +620 -0
- package/.output/server/node_modules/.nitro/mdn-data@2.0.30/css/properties.json +9626 -0
- package/.output/server/node_modules/.nitro/mdn-data@2.0.30/css/syntaxes.json +866 -0
- package/.output/server/node_modules/.nitro/mdn-data@2.0.30/package.json +38 -0
- package/.output/server/node_modules/.nitro/property-information@6.5.0/index.js +18 -0
- package/.output/server/node_modules/.nitro/property-information@6.5.0/lib/aria.js +59 -0
- package/.output/server/node_modules/.nitro/property-information@6.5.0/lib/find.js +68 -0
- package/.output/server/node_modules/.nitro/property-information@6.5.0/lib/hast-to-react.js +28 -0
- package/.output/server/node_modules/.nitro/property-information@6.5.0/lib/html.js +322 -0
- package/.output/server/node_modules/.nitro/property-information@6.5.0/lib/normalize.js +7 -0
- package/.output/server/node_modules/.nitro/property-information@6.5.0/lib/svg.js +567 -0
- package/.output/server/node_modules/.nitro/property-information@6.5.0/lib/util/case-insensitive-transform.js +10 -0
- package/.output/server/node_modules/.nitro/property-information@6.5.0/lib/util/case-sensitive-transform.js +8 -0
- package/.output/server/node_modules/.nitro/property-information@6.5.0/lib/util/create.js +58 -0
- package/.output/server/node_modules/.nitro/property-information@6.5.0/lib/util/defined-info.js +44 -0
- package/.output/server/node_modules/.nitro/property-information@6.5.0/lib/util/info.js +25 -0
- package/.output/server/node_modules/.nitro/property-information@6.5.0/lib/util/merge.js +26 -0
- package/.output/server/node_modules/.nitro/property-information@6.5.0/lib/util/schema.js +28 -0
- package/.output/server/node_modules/.nitro/property-information@6.5.0/lib/util/types.js +13 -0
- package/.output/server/node_modules/.nitro/property-information@6.5.0/lib/xlink.js +17 -0
- package/.output/server/node_modules/.nitro/property-information@6.5.0/lib/xml.js +9 -0
- package/.output/server/node_modules/.nitro/property-information@6.5.0/lib/xmlns.js +9 -0
- package/.output/server/node_modules/.nitro/property-information@6.5.0/package.json +93 -0
- package/.output/server/node_modules/.nitro/property-information@7.1.0/index.js +17 -0
- package/.output/server/node_modules/.nitro/property-information@7.1.0/lib/aria.js +61 -0
- package/.output/server/node_modules/.nitro/property-information@7.1.0/lib/find.js +97 -0
- package/.output/server/node_modules/.nitro/property-information@7.1.0/lib/hast-to-react.js +30 -0
- package/.output/server/node_modules/.nitro/property-information@7.1.0/lib/html.js +322 -0
- package/.output/server/node_modules/.nitro/property-information@7.1.0/lib/normalize.js +12 -0
- package/.output/server/node_modules/.nitro/property-information@7.1.0/lib/svg.js +567 -0
- package/.output/server/node_modules/.nitro/property-information@7.1.0/lib/util/case-insensitive-transform.js +13 -0
- package/.output/server/node_modules/.nitro/property-information@7.1.0/lib/util/case-sensitive-transform.js +11 -0
- package/.output/server/node_modules/.nitro/property-information@7.1.0/lib/util/create.js +69 -0
- package/.output/server/node_modules/.nitro/property-information@7.1.0/lib/util/defined-info.js +60 -0
- package/.output/server/node_modules/.nitro/property-information@7.1.0/lib/util/info.js +32 -0
- package/.output/server/node_modules/.nitro/property-information@7.1.0/lib/util/merge.js +27 -0
- package/.output/server/node_modules/.nitro/property-information@7.1.0/lib/util/schema.js +29 -0
- package/.output/server/node_modules/.nitro/property-information@7.1.0/lib/util/types.js +13 -0
- package/.output/server/node_modules/.nitro/property-information@7.1.0/lib/xlink.js +17 -0
- package/.output/server/node_modules/.nitro/property-information@7.1.0/lib/xml.js +9 -0
- package/.output/server/node_modules/.nitro/property-information@7.1.0/lib/xmlns.js +9 -0
- package/.output/server/node_modules/.nitro/property-information@7.1.0/package.json +121 -0
- package/.output/server/node_modules/@adonisjs/hash/build/chunk-7RS6HCBK.js +36 -0
- package/.output/server/node_modules/@adonisjs/hash/build/chunk-JSA56AE7.js +26 -0
- package/.output/server/node_modules/@adonisjs/hash/build/chunk-JSBRDJBE.js +30 -0
- package/.output/server/node_modules/@adonisjs/hash/build/chunk-RHMXMP27.js +202 -0
- package/.output/server/node_modules/@adonisjs/hash/build/chunk-WB54OA6N.js +193 -0
- package/.output/server/node_modules/@adonisjs/hash/build/index.js +9 -0
- package/.output/server/node_modules/@adonisjs/hash/build/src/drivers/scrypt.js +9 -0
- package/.output/server/node_modules/@adonisjs/hash/package.json +150 -0
- package/.output/server/node_modules/@babel/parser/lib/index.js +14595 -0
- package/.output/server/node_modules/@babel/parser/package.json +50 -0
- package/.output/server/node_modules/@fastify/accept-negotiator/index.js +170 -0
- package/.output/server/node_modules/@fastify/accept-negotiator/package.json +51 -0
- package/.output/server/node_modules/@iconify/utils/lib/colors/index.mjs +350 -0
- package/.output/server/node_modules/@iconify/utils/lib/colors/keywords.mjs +188 -0
- package/.output/server/node_modules/@iconify/utils/lib/css/common.mjs +90 -0
- package/.output/server/node_modules/@iconify/utils/lib/css/format.mjs +38 -0
- package/.output/server/node_modules/@iconify/utils/lib/css/icon.mjs +76 -0
- package/.output/server/node_modules/@iconify/utils/lib/css/icons.mjs +168 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/bool.mjs +22 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/defaults.mjs +14 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/flip.mjs +16 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/merge.mjs +22 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/rotate.mjs +33 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/cleanup.mjs +51 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/convert.mjs +84 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/data.mjs +16 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/format.mjs +44 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/parse.mjs +58 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/base.mjs +231 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/create.mjs +31 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/numbers.mjs +164 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/similar.mjs +216 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/tree.mjs +113 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/find.mjs +104 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/replace.mjs +34 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/components.mjs +75 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/missing.mjs +97 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/name.mjs +54 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/parse.mjs +97 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/similar.mjs +45 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/tree.mjs +105 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/variations.mjs +54 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/defaults.mjs +24 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/merge.mjs +20 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/name.mjs +53 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/square.mjs +23 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/transformations.mjs +16 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/convert-info.mjs +182 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/expand.mjs +22 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icon.mjs +28 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icons.mjs +46 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/minify.mjs +66 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/parse.mjs +51 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/tree.mjs +23 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate-basic.mjs +62 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate.mjs +161 -0
- package/.output/server/node_modules/@iconify/utils/lib/index.mjs +64 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/custom.mjs +50 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/loader.mjs +59 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/modern.mjs +80 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/utils.mjs +92 -0
- package/.output/server/node_modules/@iconify/utils/lib/misc/objects.mjs +30 -0
- package/.output/server/node_modules/@iconify/utils/lib/misc/strings.mjs +17 -0
- package/.output/server/node_modules/@iconify/utils/lib/misc/title.mjs +5 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/build.mjs +119 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/defs.mjs +30 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.mjs +20 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/html.mjs +9 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/id.mjs +28 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/inner-html.mjs +19 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/parse.mjs +83 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/pretty.mjs +70 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/size.mjs +40 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/trim.mjs +5 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/url.mjs +11 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/viewbox.mjs +8 -0
- package/.output/server/node_modules/@iconify/utils/package.json +447 -0
- package/.output/server/node_modules/@intlify/core/dist/core.mjs +31 -0
- package/.output/server/node_modules/@intlify/core/package.json +82 -0
- package/.output/server/node_modules/@intlify/core-base/dist/core-base.mjs +1886 -0
- package/.output/server/node_modules/@intlify/core-base/package.json +80 -0
- package/.output/server/node_modules/@intlify/h3/dist/index.mjs +61 -0
- package/.output/server/node_modules/@intlify/h3/package.json +89 -0
- package/.output/server/node_modules/@intlify/message-compiler/dist/message-compiler.mjs +1530 -0
- package/.output/server/node_modules/@intlify/message-compiler/package.json +79 -0
- package/.output/server/node_modules/@intlify/shared/dist/shared.mjs +281 -0
- package/.output/server/node_modules/@intlify/shared/package.json +69 -0
- package/.output/server/node_modules/@intlify/utils/dist/h3.mjs +89 -0
- package/.output/server/node_modules/@intlify/utils/dist/index.mjs +121 -0
- package/.output/server/node_modules/@intlify/utils/dist/shared/utils.12d9adcd.mjs +133 -0
- package/.output/server/node_modules/@intlify/utils/dist/shared/utils.9f8159f5.mjs +108 -0
- package/.output/server/node_modules/@intlify/utils/package.json +129 -0
- package/.output/server/node_modules/@lukeed/ms/dist/index.mjs +34 -0
- package/.output/server/node_modules/@lukeed/ms/package.json +48 -0
- package/.output/server/node_modules/@neondatabase/serverless/index.mjs +1374 -0
- package/.output/server/node_modules/@neondatabase/serverless/package.json +115 -0
- package/.output/server/node_modules/@phc/format/index.js +229 -0
- package/.output/server/node_modules/@phc/format/package.json +60 -0
- package/.output/server/node_modules/@poppinss/exception/build/index.js +63 -0
- package/.output/server/node_modules/@poppinss/exception/package.json +106 -0
- package/.output/server/node_modules/@poppinss/object-builder/build/index.js +49 -0
- package/.output/server/node_modules/@poppinss/object-builder/package.json +112 -0
- package/.output/server/node_modules/@poppinss/string/build/chunk-LJJE2S3U.js +407 -0
- package/.output/server/node_modules/@poppinss/string/build/index.js +6 -0
- package/.output/server/node_modules/@poppinss/string/package.json +128 -0
- package/.output/server/node_modules/@poppinss/utils/build/chunk-2KG3PWR4.js +17 -0
- package/.output/server/node_modules/@poppinss/utils/build/chunk-4V5ON6P7.js +7 -0
- package/.output/server/node_modules/@poppinss/utils/build/chunk-EJKUJ44Y.js +12 -0
- package/.output/server/node_modules/@poppinss/utils/build/chunk-H54AK3PI.js +7 -0
- package/.output/server/node_modules/@poppinss/utils/build/chunk-XHQBV7AF.js +39 -0
- package/.output/server/node_modules/@poppinss/utils/build/index.js +365 -0
- package/.output/server/node_modules/@poppinss/utils/build/lodash/main.cjs +39 -0
- package/.output/server/node_modules/@poppinss/utils/package.json +153 -0
- package/.output/server/node_modules/@shikijs/core/dist/index.mjs +2333 -0
- package/.output/server/node_modules/@shikijs/core/package.json +49 -0
- package/.output/server/node_modules/@shikijs/engine-javascript/dist/engine-compile.mjs +52 -0
- package/.output/server/node_modules/@shikijs/engine-javascript/dist/engine-raw.mjs +22 -0
- package/.output/server/node_modules/@shikijs/engine-javascript/dist/index.mjs +4 -0
- package/.output/server/node_modules/@shikijs/engine-javascript/dist/shared/engine-javascript.hzpS1_41.mjs +93 -0
- package/.output/server/node_modules/@shikijs/engine-javascript/package.json +39 -0
- package/.output/server/node_modules/@shikijs/engine-oniguruma/dist/index.mjs +448 -0
- package/.output/server/node_modules/@shikijs/engine-oniguruma/dist/wasm-inlined.mjs +8 -0
- package/.output/server/node_modules/@shikijs/engine-oniguruma/package.json +42 -0
- package/.output/server/node_modules/@shikijs/langs/dist/css.mjs +5 -0
- package/.output/server/node_modules/@shikijs/langs/dist/html-derivative.mjs +8 -0
- package/.output/server/node_modules/@shikijs/langs/dist/html.mjs +10 -0
- package/.output/server/node_modules/@shikijs/langs/dist/javascript.mjs +5 -0
- package/.output/server/node_modules/@shikijs/langs/dist/json.mjs +5 -0
- package/.output/server/node_modules/@shikijs/langs/dist/jsx.mjs +5 -0
- package/.output/server/node_modules/@shikijs/langs/dist/markdown-vue.mjs +5 -0
- package/.output/server/node_modules/@shikijs/langs/dist/markdown.mjs +5 -0
- package/.output/server/node_modules/@shikijs/langs/dist/mdc.mjs +12 -0
- package/.output/server/node_modules/@shikijs/langs/dist/shellscript.mjs +5 -0
- package/.output/server/node_modules/@shikijs/langs/dist/tsx.mjs +5 -0
- package/.output/server/node_modules/@shikijs/langs/dist/typescript.mjs +5 -0
- package/.output/server/node_modules/@shikijs/langs/dist/vue-directives.mjs +5 -0
- package/.output/server/node_modules/@shikijs/langs/dist/vue-interpolations.mjs +5 -0
- package/.output/server/node_modules/@shikijs/langs/dist/vue-sfc-style-variable-injection.mjs +8 -0
- package/.output/server/node_modules/@shikijs/langs/dist/vue.mjs +26 -0
- package/.output/server/node_modules/@shikijs/langs/dist/yaml.mjs +5 -0
- package/.output/server/node_modules/@shikijs/langs/package.json +357 -0
- package/.output/server/node_modules/@shikijs/themes/dist/github-dark.mjs +2 -0
- package/.output/server/node_modules/@shikijs/themes/dist/github-light.mjs +2 -0
- package/.output/server/node_modules/@shikijs/themes/package.json +98 -0
- package/.output/server/node_modules/@shikijs/transformers/dist/index.mjs +744 -0
- package/.output/server/node_modules/@shikijs/transformers/package.json +37 -0
- package/.output/server/node_modules/@shikijs/types/dist/index.mjs +8 -0
- package/.output/server/node_modules/@shikijs/types/package.json +36 -0
- package/.output/server/node_modules/@shikijs/vscode-textmate/dist/index.js +3216 -0
- package/.output/server/node_modules/@shikijs/vscode-textmate/package.json +46 -0
- package/.output/server/node_modules/@sindresorhus/is/dist/index.js +434 -0
- package/.output/server/node_modules/@sindresorhus/is/package.json +96 -0
- package/.output/server/node_modules/@trysound/sax/lib/sax.js +1413 -0
- package/.output/server/node_modules/@trysound/sax/package.json +30 -0
- package/.output/server/node_modules/@ungap/structured-clone/esm/deserialize.js +85 -0
- package/.output/server/node_modules/@ungap/structured-clone/esm/index.js +25 -0
- package/.output/server/node_modules/@ungap/structured-clone/esm/serialize.js +171 -0
- package/.output/server/node_modules/@ungap/structured-clone/esm/types.js +11 -0
- package/.output/server/node_modules/@ungap/structured-clone/package.json +54 -0
- package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6706 -0
- package/.output/server/node_modules/@vue/compiler-core/package.json +58 -0
- package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +686 -0
- package/.output/server/node_modules/@vue/compiler-dom/package.json +57 -0
- package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1402 -0
- package/.output/server/node_modules/@vue/compiler-ssr/package.json +34 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/api/api.js +2 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/api/app.js +2 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/api/component.js +2 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/api/context.js +2 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/api/hooks.js +2 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/api/index.js +22 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/api/util.js +2 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/const.js +5 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/env.js +17 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/index.js +45 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/plugin.js +2 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/proxy.js +111 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/time.js +28 -0
- package/.output/server/node_modules/@vue/devtools-api/package.json +37 -0
- package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1806 -0
- package/.output/server/node_modules/@vue/reactivity/package.json +55 -0
- package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6734 -0
- package/.output/server/node_modules/@vue/runtime-core/package.json +52 -0
- package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1677 -0
- package/.output/server/node_modules/@vue/runtime-dom/package.json +60 -0
- package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +879 -0
- package/.output/server/node_modules/@vue/server-renderer/package.json +55 -0
- package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +604 -0
- package/.output/server/node_modules/@vue/shared/package.json +47 -0
- package/.output/server/node_modules/bail/index.js +12 -0
- package/.output/server/node_modules/bail/package.json +73 -0
- package/.output/server/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
- package/.output/server/node_modules/better-sqlite3/lib/database.js +90 -0
- package/.output/server/node_modules/better-sqlite3/lib/index.js +3 -0
- package/.output/server/node_modules/better-sqlite3/lib/methods/aggregate.js +43 -0
- package/.output/server/node_modules/better-sqlite3/lib/methods/backup.js +67 -0
- package/.output/server/node_modules/better-sqlite3/lib/methods/function.js +31 -0
- package/.output/server/node_modules/better-sqlite3/lib/methods/inspect.js +7 -0
- package/.output/server/node_modules/better-sqlite3/lib/methods/pragma.js +12 -0
- package/.output/server/node_modules/better-sqlite3/lib/methods/serialize.js +16 -0
- package/.output/server/node_modules/better-sqlite3/lib/methods/table.js +189 -0
- package/.output/server/node_modules/better-sqlite3/lib/methods/transaction.js +78 -0
- package/.output/server/node_modules/better-sqlite3/lib/methods/wrappers.js +54 -0
- package/.output/server/node_modules/better-sqlite3/lib/sqlite-error.js +20 -0
- package/.output/server/node_modules/better-sqlite3/lib/util.js +12 -0
- package/.output/server/node_modules/better-sqlite3/package.json +62 -0
- package/.output/server/node_modules/bindings/bindings.js +221 -0
- package/.output/server/node_modules/bindings/package.json +28 -0
- package/.output/server/node_modules/boolbase/index.js +8 -0
- package/.output/server/node_modules/boolbase/package.json +23 -0
- package/.output/server/node_modules/bytes/index.js +170 -0
- package/.output/server/node_modules/bytes/package.json +42 -0
- package/.output/server/node_modules/case-anything/dist/core.js +242 -0
- package/.output/server/node_modules/case-anything/dist/index.js +1 -0
- package/.output/server/node_modules/case-anything/dist/utils.js +90 -0
- package/.output/server/node_modules/case-anything/package.json +61 -0
- package/.output/server/node_modules/ccount/index.js +27 -0
- package/.output/server/node_modules/ccount/package.json +71 -0
- package/.output/server/node_modules/char-regex/index.js +39 -0
- package/.output/server/node_modules/char-regex/package.json +44 -0
- package/.output/server/node_modules/character-entities/index.js +2132 -0
- package/.output/server/node_modules/character-entities/package.json +78 -0
- package/.output/server/node_modules/character-entities-html4/index.js +259 -0
- package/.output/server/node_modules/character-entities-html4/package.json +79 -0
- package/.output/server/node_modules/character-entities-legacy/index.js +113 -0
- package/.output/server/node_modules/character-entities-legacy/package.json +77 -0
- package/.output/server/node_modules/character-reference-invalid/index.js +35 -0
- package/.output/server/node_modules/character-reference-invalid/package.json +83 -0
- package/.output/server/node_modules/color/index.js +496 -0
- package/.output/server/node_modules/color/package.json +47 -0
- package/.output/server/node_modules/color-convert/conversions.js +839 -0
- package/.output/server/node_modules/color-convert/index.js +81 -0
- package/.output/server/node_modules/color-convert/package.json +48 -0
- package/.output/server/node_modules/color-convert/route.js +97 -0
- package/.output/server/node_modules/color-name/index.js +152 -0
- package/.output/server/node_modules/color-name/package.json +28 -0
- package/.output/server/node_modules/color-string/index.js +242 -0
- package/.output/server/node_modules/color-string/package.json +39 -0
- package/.output/server/node_modules/comma-separated-tokens/index.js +74 -0
- package/.output/server/node_modules/comma-separated-tokens/package.json +72 -0
- package/.output/server/node_modules/consola/dist/chunks/prompt.mjs +280 -0
- package/.output/server/node_modules/consola/dist/core.mjs +512 -0
- package/.output/server/node_modules/consola/dist/index.mjs +651 -0
- package/.output/server/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +72 -0
- package/.output/server/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +288 -0
- package/.output/server/node_modules/consola/package.json +136 -0
- package/.output/server/node_modules/cookie-es/dist/index.mjs +262 -0
- package/.output/server/node_modules/cookie-es/package.json +46 -0
- package/.output/server/node_modules/css-select/lib/attributes.js +236 -0
- package/.output/server/node_modules/css-select/lib/compile.js +151 -0
- package/.output/server/node_modules/css-select/lib/general.js +148 -0
- package/.output/server/node_modules/css-select/lib/index.js +154 -0
- package/.output/server/node_modules/css-select/lib/pseudo-selectors/aliases.js +34 -0
- package/.output/server/node_modules/css-select/lib/pseudo-selectors/filters.js +157 -0
- package/.output/server/node_modules/css-select/lib/pseudo-selectors/index.js +46 -0
- package/.output/server/node_modules/css-select/lib/pseudo-selectors/pseudos.js +93 -0
- package/.output/server/node_modules/css-select/lib/pseudo-selectors/subselects.js +112 -0
- package/.output/server/node_modules/css-select/lib/sort.js +84 -0
- package/.output/server/node_modules/css-select/package.json +81 -0
- package/.output/server/node_modules/css-what/lib/commonjs/index.js +23 -0
- package/.output/server/node_modules/css-what/lib/commonjs/parse.js +425 -0
- package/.output/server/node_modules/css-what/lib/commonjs/stringify.js +138 -0
- package/.output/server/node_modules/css-what/lib/commonjs/types.js +42 -0
- package/.output/server/node_modules/css-what/package.json +59 -0
- package/.output/server/node_modules/cssfilter/lib/css.js +110 -0
- package/.output/server/node_modules/cssfilter/lib/default.js +398 -0
- package/.output/server/node_modules/cssfilter/lib/index.js +32 -0
- package/.output/server/node_modules/cssfilter/lib/parser.js +74 -0
- package/.output/server/node_modules/cssfilter/lib/util.js +35 -0
- package/.output/server/node_modules/cssfilter/package.json +49 -0
- package/.output/server/node_modules/csso/cjs/clean/Atrule.cjs +73 -0
- package/.output/server/node_modules/csso/cjs/clean/Comment.cjs +7 -0
- package/.output/server/node_modules/csso/cjs/clean/Declaration.cjs +18 -0
- package/.output/server/node_modules/csso/cjs/clean/Raw.cjs +13 -0
- package/.output/server/node_modules/csso/cjs/clean/Rule.cjs +104 -0
- package/.output/server/node_modules/csso/cjs/clean/TypeSelector.cjs +23 -0
- package/.output/server/node_modules/csso/cjs/clean/WhiteSpace.cjs +7 -0
- package/.output/server/node_modules/csso/cjs/clean/index.cjs +32 -0
- package/.output/server/node_modules/csso/cjs/clean/utils.cjs +12 -0
- package/.output/server/node_modules/csso/cjs/compress.cjs +200 -0
- package/.output/server/node_modules/csso/cjs/index.cjs +127 -0
- package/.output/server/node_modules/csso/cjs/replace/Atrule.cjs +13 -0
- package/.output/server/node_modules/csso/cjs/replace/AttributeSelector.cjs +32 -0
- package/.output/server/node_modules/csso/cjs/replace/Dimension.cjs +67 -0
- package/.output/server/node_modules/csso/cjs/replace/Number.cjs +45 -0
- package/.output/server/node_modules/csso/cjs/replace/Percentage.cjs +41 -0
- package/.output/server/node_modules/csso/cjs/replace/Url.cjs +8 -0
- package/.output/server/node_modules/csso/cjs/replace/Value.cjs +29 -0
- package/.output/server/node_modules/csso/cjs/replace/atrule/keyframes.cjs +25 -0
- package/.output/server/node_modules/csso/cjs/replace/color.cjs +504 -0
- package/.output/server/node_modules/csso/cjs/replace/index.cjs +36 -0
- package/.output/server/node_modules/csso/cjs/replace/property/background.cjs +54 -0
- package/.output/server/node_modules/csso/cjs/replace/property/border.cjs +20 -0
- package/.output/server/node_modules/csso/cjs/replace/property/font-weight.cjs +26 -0
- package/.output/server/node_modules/csso/cjs/replace/property/font.cjs +34 -0
- package/.output/server/node_modules/csso/cjs/restructure/1-mergeAtrule.cjs +109 -0
- package/.output/server/node_modules/csso/cjs/restructure/2-initialMergeRuleset.cjs +51 -0
- package/.output/server/node_modules/csso/cjs/restructure/3-disjoinRuleset.cjs +46 -0
- package/.output/server/node_modules/csso/cjs/restructure/4-restructShorthand.cjs +429 -0
- package/.output/server/node_modules/csso/cjs/restructure/6-restructBlock.cjs +307 -0
- package/.output/server/node_modules/csso/cjs/restructure/7-mergeRuleset.cjs +90 -0
- package/.output/server/node_modules/csso/cjs/restructure/8-restructRuleset.cjs +175 -0
- package/.output/server/node_modules/csso/cjs/restructure/index.cjs +39 -0
- package/.output/server/node_modules/csso/cjs/restructure/prepare/createDeclarationIndexer.cjs +34 -0
- package/.output/server/node_modules/csso/cjs/restructure/prepare/index.cjs +45 -0
- package/.output/server/node_modules/csso/cjs/restructure/prepare/processSelector.cjs +101 -0
- package/.output/server/node_modules/csso/cjs/restructure/prepare/specificity.cjs +133 -0
- package/.output/server/node_modules/csso/cjs/restructure/utils.cjs +151 -0
- package/.output/server/node_modules/csso/cjs/syntax.cjs +60 -0
- package/.output/server/node_modules/csso/cjs/usage.cjs +75 -0
- package/.output/server/node_modules/csso/cjs/utils.cjs +14 -0
- package/.output/server/node_modules/csso/cjs/version.cjs +5 -0
- package/.output/server/node_modules/csso/package.json +82 -0
- package/.output/server/node_modules/debug/package.json +64 -0
- package/.output/server/node_modules/debug/src/browser.js +272 -0
- package/.output/server/node_modules/debug/src/common.js +292 -0
- package/.output/server/node_modules/debug/src/index.js +10 -0
- package/.output/server/node_modules/debug/src/node.js +263 -0
- package/.output/server/node_modules/decode-named-character-reference/index.js +19 -0
- package/.output/server/node_modules/decode-named-character-reference/package.json +89 -0
- package/.output/server/node_modules/defu/dist/defu.mjs +69 -0
- package/.output/server/node_modules/defu/package.json +43 -0
- package/.output/server/node_modules/destr/dist/index.mjs +72 -0
- package/.output/server/node_modules/destr/package.json +47 -0
- package/.output/server/node_modules/detab/index.js +45 -0
- package/.output/server/node_modules/detab/package.json +71 -0
- package/.output/server/node_modules/detect-libc/lib/detect-libc.js +267 -0
- package/.output/server/node_modules/detect-libc/lib/filesystem.js +41 -0
- package/.output/server/node_modules/detect-libc/lib/process.js +24 -0
- package/.output/server/node_modules/detect-libc/package.json +41 -0
- package/.output/server/node_modules/devalue/index.js +3 -0
- package/.output/server/node_modules/devalue/package.json +37 -0
- package/.output/server/node_modules/devalue/src/base64.js +110 -0
- package/.output/server/node_modules/devalue/src/constants.js +6 -0
- package/.output/server/node_modules/devalue/src/parse.js +195 -0
- package/.output/server/node_modules/devalue/src/stringify.js +261 -0
- package/.output/server/node_modules/devalue/src/uneval.js +402 -0
- package/.output/server/node_modules/devalue/src/utils.js +114 -0
- package/.output/server/node_modules/devlop/lib/default.js +9 -0
- package/.output/server/node_modules/devlop/package.json +80 -0
- package/.output/server/node_modules/dom-serializer/lib/foreignNames.js +103 -0
- package/.output/server/node_modules/dom-serializer/lib/index.js +229 -0
- package/.output/server/node_modules/dom-serializer/package.json +69 -0
- package/.output/server/node_modules/domelementtype/lib/index.js +55 -0
- package/.output/server/node_modules/domelementtype/package.json +54 -0
- package/.output/server/node_modules/domhandler/lib/index.js +165 -0
- package/.output/server/node_modules/domhandler/lib/node.js +474 -0
- package/.output/server/node_modules/domhandler/package.json +73 -0
- package/.output/server/node_modules/domutils/lib/feeds.js +190 -0
- package/.output/server/node_modules/domutils/lib/helpers.js +142 -0
- package/.output/server/node_modules/domutils/lib/index.js +33 -0
- package/.output/server/node_modules/domutils/lib/legacy.js +168 -0
- package/.output/server/node_modules/domutils/lib/manipulation.js +142 -0
- package/.output/server/node_modules/domutils/lib/querying.js +155 -0
- package/.output/server/node_modules/domutils/lib/stringify.js +91 -0
- package/.output/server/node_modules/domutils/lib/traversal.js +125 -0
- package/.output/server/node_modules/domutils/package.json +79 -0
- package/.output/server/node_modules/emojilib/emojis.json +9422 -0
- package/.output/server/node_modules/emojilib/index.js +5 -0
- package/.output/server/node_modules/emojilib/ordered.json +1572 -0
- package/.output/server/node_modules/emojilib/package.json +41 -0
- package/.output/server/node_modules/emoticon/index.js +480 -0
- package/.output/server/node_modules/emoticon/package.json +88 -0
- package/.output/server/node_modules/escape-string-regexp/index.js +11 -0
- package/.output/server/node_modules/escape-string-regexp/package.json +40 -0
- package/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
- package/.output/server/node_modules/estree-walker/package.json +37 -0
- package/.output/server/node_modules/etag/index.js +131 -0
- package/.output/server/node_modules/etag/package.json +47 -0
- package/.output/server/node_modules/extend/index.js +117 -0
- package/.output/server/node_modules/extend/package.json +42 -0
- package/.output/server/node_modules/fast-xml-parser/package.json +90 -0
- package/.output/server/node_modules/fast-xml-parser/src/fxp.js +14 -0
- package/.output/server/node_modules/fast-xml-parser/src/ignoreAttributes.js +18 -0
- package/.output/server/node_modules/fast-xml-parser/src/util.js +68 -0
- package/.output/server/node_modules/fast-xml-parser/src/validator.js +425 -0
- package/.output/server/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +285 -0
- package/.output/server/node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js +134 -0
- package/.output/server/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +369 -0
- package/.output/server/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +46 -0
- package/.output/server/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +606 -0
- package/.output/server/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +71 -0
- package/.output/server/node_modules/fast-xml-parser/src/xmlparser/node2json.js +119 -0
- package/.output/server/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js +40 -0
- package/.output/server/node_modules/file-uri-to-path/index.js +66 -0
- package/.output/server/node_modules/file-uri-to-path/package.json +32 -0
- package/.output/server/node_modules/flat/index.js +157 -0
- package/.output/server/node_modules/flat/package.json +49 -0
- package/.output/server/node_modules/flattie/dist/index.mjs +25 -0
- package/.output/server/node_modules/flattie/package.json +48 -0
- package/.output/server/node_modules/github-slugger/index.js +77 -0
- package/.output/server/node_modules/github-slugger/package.json +71 -0
- package/.output/server/node_modules/github-slugger/regex.js +3 -0
- package/.output/server/node_modules/h3/dist/index.mjs +2478 -0
- package/.output/server/node_modules/h3/package.json +75 -0
- package/.output/server/node_modules/has-flag/index.js +8 -0
- package/.output/server/node_modules/has-flag/package.json +46 -0
- package/.output/server/node_modules/hast-util-embedded/index.js +1 -0
- package/.output/server/node_modules/hast-util-embedded/lib/index.js +33 -0
- package/.output/server/node_modules/hast-util-embedded/package.json +78 -0
- package/.output/server/node_modules/hast-util-format/index.js +2 -0
- package/.output/server/node_modules/hast-util-format/lib/index.js +186 -0
- package/.output/server/node_modules/hast-util-format/package.json +124 -0
- package/.output/server/node_modules/hast-util-from-parse5/index.js +2 -0
- package/.output/server/node_modules/hast-util-from-parse5/lib/index.js +337 -0
- package/.output/server/node_modules/hast-util-from-parse5/package.json +120 -0
- package/.output/server/node_modules/hast-util-has-property/index.js +1 -0
- package/.output/server/node_modules/hast-util-has-property/lib/index.js +29 -0
- package/.output/server/node_modules/hast-util-has-property/package.json +79 -0
- package/.output/server/node_modules/hast-util-is-body-ok-link/index.js +46 -0
- package/.output/server/node_modules/hast-util-is-body-ok-link/lib/index.js +38 -0
- package/.output/server/node_modules/hast-util-is-body-ok-link/package.json +52 -0
- package/.output/server/node_modules/hast-util-is-element/index.js +7 -0
- package/.output/server/node_modules/hast-util-is-element/lib/index.js +278 -0
- package/.output/server/node_modules/hast-util-is-element/package.json +82 -0
- package/.output/server/node_modules/hast-util-minify-whitespace/index.js +69 -0
- package/.output/server/node_modules/hast-util-minify-whitespace/lib/block.js +61 -0
- package/.output/server/node_modules/hast-util-minify-whitespace/lib/content.js +7 -0
- package/.output/server/node_modules/hast-util-minify-whitespace/lib/index.js +377 -0
- package/.output/server/node_modules/hast-util-minify-whitespace/lib/skippable.js +20 -0
- package/.output/server/node_modules/hast-util-minify-whitespace/package.json +56 -0
- package/.output/server/node_modules/hast-util-parse-selector/index.js +1 -0
- package/.output/server/node_modules/hast-util-parse-selector/lib/index.js +87 -0
- package/.output/server/node_modules/hast-util-parse-selector/package.json +79 -0
- package/.output/server/node_modules/hast-util-phrasing/index.js +1 -0
- package/.output/server/node_modules/hast-util-phrasing/lib/index.js +78 -0
- package/.output/server/node_modules/hast-util-phrasing/package.json +83 -0
- package/.output/server/node_modules/hast-util-raw/index.js +2 -0
- package/.output/server/node_modules/hast-util-raw/lib/index.js +682 -0
- package/.output/server/node_modules/hast-util-raw/package.json +123 -0
- package/.output/server/node_modules/hast-util-to-html/index.js +8 -0
- package/.output/server/node_modules/hast-util-to-html/lib/handle/comment.js +52 -0
- package/.output/server/node_modules/hast-util-to-html/lib/handle/doctype.js +27 -0
- package/.output/server/node_modules/hast-util-to-html/lib/handle/element.js +265 -0
- package/.output/server/node_modules/hast-util-to-html/lib/handle/index.js +47 -0
- package/.output/server/node_modules/hast-util-to-html/lib/handle/raw.js +27 -0
- package/.output/server/node_modules/hast-util-to-html/lib/handle/root.js +22 -0
- package/.output/server/node_modules/hast-util-to-html/lib/handle/text.js +38 -0
- package/.output/server/node_modules/hast-util-to-html/lib/index.js +257 -0
- package/.output/server/node_modules/hast-util-to-html/lib/omission/closing.js +358 -0
- package/.output/server/node_modules/hast-util-to-html/lib/omission/omission.js +44 -0
- package/.output/server/node_modules/hast-util-to-html/lib/omission/opening.js +148 -0
- package/.output/server/node_modules/hast-util-to-html/lib/omission/util/siblings.js +50 -0
- package/.output/server/node_modules/hast-util-to-html/package.json +106 -0
- package/.output/server/node_modules/hast-util-to-mdast/index.js +13 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/a.js +30 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/base.js +20 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/blockquote.js +20 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/br.js +20 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/code.js +65 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/comment.js +23 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/del.js +23 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/dl.js +144 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/em.js +24 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/heading.js +30 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/hr.js +20 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/iframe.js +35 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/img.js +27 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/index.js +233 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/inline-code.js +22 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/input.js +137 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/li.js +147 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/list.js +47 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/media.js +82 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/p.js +30 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/q.js +43 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/root.js +28 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/select.js +34 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/strong.js +24 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/table-cell.js +38 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/table-row.js +29 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/table.js +203 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/text.js +20 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/textarea.js +22 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/handlers/wbr.js +20 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/index.js +111 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/state.js +389 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/util/drop-surrounding-breaks.js +23 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/util/find-selected-options.js +90 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/util/list-items-spread.js +25 -0
- package/.output/server/node_modules/hast-util-to-mdast/lib/util/wrap.js +223 -0
- package/.output/server/node_modules/hast-util-to-mdast/package.json +124 -0
- package/.output/server/node_modules/hast-util-to-parse5/index.js +6 -0
- package/.output/server/node_modules/hast-util-to-parse5/lib/index.js +338 -0
- package/.output/server/node_modules/hast-util-to-parse5/package.json +87 -0
- package/.output/server/node_modules/hast-util-to-string/index.js +46 -0
- package/.output/server/node_modules/hast-util-to-string/lib/index.js +54 -0
- package/.output/server/node_modules/hast-util-to-string/package.json +54 -0
- package/.output/server/node_modules/hast-util-to-text/index.js +6 -0
- package/.output/server/node_modules/hast-util-to-text/lib/index.js +633 -0
- package/.output/server/node_modules/hast-util-to-text/package.json +87 -0
- package/.output/server/node_modules/hast-util-whitespace/index.js +1 -0
- package/.output/server/node_modules/hast-util-whitespace/lib/index.js +34 -0
- package/.output/server/node_modules/hast-util-whitespace/package.json +83 -0
- package/.output/server/node_modules/hastscript/index.js +7 -0
- package/.output/server/node_modules/hastscript/lib/create-h.js +365 -0
- package/.output/server/node_modules/hastscript/lib/index.js +27 -0
- package/.output/server/node_modules/hastscript/lib/svg-case-sensitive-tag-names.js +46 -0
- package/.output/server/node_modules/hastscript/package.json +126 -0
- package/.output/server/node_modules/hookable/dist/index.mjs +290 -0
- package/.output/server/node_modules/hookable/package.json +49 -0
- package/.output/server/node_modules/html-void-elements/index.js +27 -0
- package/.output/server/node_modules/html-void-elements/package.json +79 -0
- package/.output/server/node_modules/html-whitespace-sensitive-tag-names/index.js +28 -0
- package/.output/server/node_modules/html-whitespace-sensitive-tag-names/lib/index.js +9 -0
- package/.output/server/node_modules/html-whitespace-sensitive-tag-names/package.json +48 -0
- package/.output/server/node_modules/image-meta/dist/index.mjs +785 -0
- package/.output/server/node_modules/image-meta/package.json +46 -0
- package/.output/server/node_modules/ipx/dist/index.mjs +52 -0
- package/.output/server/node_modules/ipx/dist/shared/ipx.e4d5b25d.mjs +761 -0
- package/.output/server/node_modules/ipx/package.json +72 -0
- package/.output/server/node_modules/iron-webcrypto/dist/index.js +298 -0
- package/.output/server/node_modules/iron-webcrypto/package.json +72 -0
- package/.output/server/node_modules/is-absolute-url/index.js +18 -0
- package/.output/server/node_modules/is-absolute-url/package.json +37 -0
- package/.output/server/node_modules/is-alphabetical/index.js +16 -0
- package/.output/server/node_modules/is-alphabetical/package.json +73 -0
- package/.output/server/node_modules/is-alphanumerical/index.js +13 -0
- package/.output/server/node_modules/is-alphanumerical/package.json +79 -0
- package/.output/server/node_modules/is-arrayish/index.js +9 -0
- package/.output/server/node_modules/is-arrayish/package.json +45 -0
- package/.output/server/node_modules/is-decimal/index.js +13 -0
- package/.output/server/node_modules/is-decimal/package.json +73 -0
- package/.output/server/node_modules/is-hexadecimal/index.js +17 -0
- package/.output/server/node_modules/is-hexadecimal/package.json +73 -0
- package/.output/server/node_modules/is-plain-obj/index.js +8 -0
- package/.output/server/node_modules/is-plain-obj/package.json +41 -0
- package/.output/server/node_modules/jose/dist/webapi/index.js +30 -0
- package/.output/server/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +27 -0
- package/.output/server/node_modules/jose/dist/webapi/jwe/compact/encrypt.js +27 -0
- package/.output/server/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +165 -0
- package/.output/server/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +165 -0
- package/.output/server/node_modules/jose/dist/webapi/jwe/general/decrypt.js +31 -0
- package/.output/server/node_modules/jose/dist/webapi/jwe/general/encrypt.js +187 -0
- package/.output/server/node_modules/jose/dist/webapi/jwk/embedded.js +17 -0
- package/.output/server/node_modules/jose/dist/webapi/jwk/thumbprint.js +68 -0
- package/.output/server/node_modules/jose/dist/webapi/jwks/local.js +119 -0
- package/.output/server/node_modules/jose/dist/webapi/jwks/remote.js +179 -0
- package/.output/server/node_modules/jose/dist/webapi/jws/compact/sign.js +18 -0
- package/.output/server/node_modules/jose/dist/webapi/jws/compact/verify.js +21 -0
- package/.output/server/node_modules/jose/dist/webapi/jws/flattened/sign.js +86 -0
- package/.output/server/node_modules/jose/dist/webapi/jws/flattened/verify.js +116 -0
- package/.output/server/node_modules/jose/dist/webapi/jws/general/sign.js +73 -0
- package/.output/server/node_modules/jose/dist/webapi/jws/general/verify.js +24 -0
- package/.output/server/node_modules/jose/dist/webapi/jwt/decrypt.js +23 -0
- package/.output/server/node_modules/jose/dist/webapi/jwt/encrypt.js +108 -0
- package/.output/server/node_modules/jose/dist/webapi/jwt/sign.js +52 -0
- package/.output/server/node_modules/jose/dist/webapi/jwt/unsecured.js +63 -0
- package/.output/server/node_modules/jose/dist/webapi/jwt/verify.js +15 -0
- package/.output/server/node_modules/jose/dist/webapi/key/export.js +11 -0
- package/.output/server/node_modules/jose/dist/webapi/key/generate_key_pair.js +97 -0
- package/.output/server/node_modules/jose/dist/webapi/key/generate_secret.js +40 -0
- package/.output/server/node_modules/jose/dist/webapi/key/import.js +57 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/aesgcmkw.js +16 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/aeskw.js +25 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/asn1.js +247 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/base64.js +22 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/buffer_utils.js +32 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/cek.js +19 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/check_cek_length.js +7 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/check_iv_length.js +7 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/check_key_length.js +8 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/check_key_type.js +126 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/crypto_key.js +147 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/decrypt.js +106 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/decrypt_key_management.js +127 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/digest.js +4 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/ecdhes.js +52 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/encrypt.js +74 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/encrypt_key_management.js +92 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/epoch.js +1 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/get_sign_verify_key.js +12 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/invalid_key_input.js +31 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/is_disjoint.js +21 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/is_jwk.js +14 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/is_key_like.js +14 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/is_object.js +16 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/iv.js +19 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/jwk_to_key.js +109 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +185 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/key_to_jwk.js +31 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/normalize_key.js +176 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/pbes2kw.js +37 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/private_symbols.js +1 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/rsaes.js +24 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/secs.js +55 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/sign.js +9 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/subtle_dsa.js +31 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/validate_algorithms.js +10 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/validate_crit.js +33 -0
- package/.output/server/node_modules/jose/dist/webapi/lib/verify.js +14 -0
- package/.output/server/node_modules/jose/dist/webapi/util/base64url.js +30 -0
- package/.output/server/node_modules/jose/dist/webapi/util/decode_jwt.js +32 -0
- package/.output/server/node_modules/jose/dist/webapi/util/decode_protected_header.js +34 -0
- package/.output/server/node_modules/jose/dist/webapi/util/errors.js +99 -0
- package/.output/server/node_modules/jose/package.json +200 -0
- package/.output/server/node_modules/longest-streak/index.js +36 -0
- package/.output/server/node_modules/longest-streak/package.json +73 -0
- package/.output/server/node_modules/lru-cache/dist/esm/index.js +1542 -0
- package/.output/server/node_modules/lru-cache/dist/esm/package.json +3 -0
- package/.output/server/node_modules/lru-cache/package.json +116 -0
- package/.output/server/node_modules/markdown-table/index.js +393 -0
- package/.output/server/node_modules/markdown-table/package.json +77 -0
- package/.output/server/node_modules/mdast-util-find-and-replace/index.js +11 -0
- package/.output/server/node_modules/mdast-util-find-and-replace/lib/index.js +261 -0
- package/.output/server/node_modules/mdast-util-find-and-replace/package.json +85 -0
- package/.output/server/node_modules/mdast-util-from-markdown/index.js +2 -0
- package/.output/server/node_modules/mdast-util-from-markdown/lib/index.js +1177 -0
- package/.output/server/node_modules/mdast-util-from-markdown/package.json +139 -0
- package/.output/server/node_modules/mdast-util-gfm/index.js +2 -0
- package/.output/server/node_modules/mdast-util-gfm/lib/index.js +63 -0
- package/.output/server/node_modules/mdast-util-gfm/package.json +125 -0
- package/.output/server/node_modules/mdast-util-gfm-autolink-literal/index.js +4 -0
- package/.output/server/node_modules/mdast-util-gfm-autolink-literal/lib/index.js +280 -0
- package/.output/server/node_modules/mdast-util-gfm-autolink-literal/package.json +106 -0
- package/.output/server/node_modules/mdast-util-gfm-footnote/index.js +2 -0
- package/.output/server/node_modules/mdast-util-gfm-footnote/lib/index.js +212 -0
- package/.output/server/node_modules/mdast-util-gfm-footnote/package.json +111 -0
- package/.output/server/node_modules/mdast-util-gfm-strikethrough/index.js +5 -0
- package/.output/server/node_modules/mdast-util-gfm-strikethrough/lib/index.js +106 -0
- package/.output/server/node_modules/mdast-util-gfm-strikethrough/package.json +99 -0
- package/.output/server/node_modules/mdast-util-gfm-table/index.js +2 -0
- package/.output/server/node_modules/mdast-util-gfm-table/lib/index.js +300 -0
- package/.output/server/node_modules/mdast-util-gfm-table/package.json +101 -0
- package/.output/server/node_modules/mdast-util-gfm-task-list-item/index.js +4 -0
- package/.output/server/node_modules/mdast-util-gfm-task-list-item/lib/index.js +141 -0
- package/.output/server/node_modules/mdast-util-gfm-task-list-item/package.json +90 -0
- package/.output/server/node_modules/mdast-util-phrasing/index.js +1 -0
- package/.output/server/node_modules/mdast-util-phrasing/lib/index.js +45 -0
- package/.output/server/node_modules/mdast-util-phrasing/package.json +78 -0
- package/.output/server/node_modules/mdast-util-to-hast/index.js +7 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/footer.js +252 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +30 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/handlers/break.js +26 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/handlers/code.js +50 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/handlers/delete.js +30 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +30 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +70 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/handlers/heading.js +30 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/handlers/html.js +31 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +41 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/handlers/image.js +36 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/handlers/index.js +64 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +35 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +46 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/handlers/link.js +37 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/handlers/list-item.js +125 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/handlers/list.js +56 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +30 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/handlers/root.js +26 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/handlers/strong.js +30 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +32 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/handlers/table-row.js +69 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/handlers/table.js +61 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/handlers/text.js +25 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +30 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/index.js +106 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/revert.js +55 -0
- package/.output/server/node_modules/mdast-util-to-hast/lib/state.js +473 -0
- package/.output/server/node_modules/mdast-util-to-hast/package.json +118 -0
- package/.output/server/node_modules/mdast-util-to-markdown/index.js +3 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/configure.js +79 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js +29 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/handle/break.js +30 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/handle/code.js +75 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/handle/definition.js +76 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js +69 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/handle/heading.js +75 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/handle/html.js +20 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js +63 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/handle/image.js +82 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/handle/index.js +45 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +76 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js +63 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/handle/link.js +114 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/handle/list-item.js +62 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/handle/list.js +100 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js +20 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/handle/root.js +23 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/handle/strong.js +69 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/handle/text.js +15 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js +21 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/index.js +187 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/join.js +39 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/unsafe.js +146 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/util/association.js +33 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js +21 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js +38 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js +21 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js +21 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/util/check-fence.js +21 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +21 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/util/check-quote.js +21 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js +21 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/util/check-rule.js +21 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/util/check-strong.js +21 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/util/compile-pattern.js +24 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/util/container-flow.js +84 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js +125 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js +11 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/util/encode-info.js +82 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js +22 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js +34 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js +34 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/util/indent-lines.js +35 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js +41 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/util/safe.js +174 -0
- package/.output/server/node_modules/mdast-util-to-markdown/lib/util/track.js +55 -0
- package/.output/server/node_modules/mdast-util-to-markdown/package.json +132 -0
- package/.output/server/node_modules/mdast-util-to-string/index.js +5 -0
- package/.output/server/node_modules/mdast-util-to-string/lib/index.js +108 -0
- package/.output/server/node_modules/mdast-util-to-string/package.json +78 -0
- package/.output/server/node_modules/micromark/index.js +60 -0
- package/.output/server/node_modules/micromark/lib/compile.js +1060 -0
- package/.output/server/node_modules/micromark/lib/constructs.js +85 -0
- package/.output/server/node_modules/micromark/lib/create-tokenizer.js +611 -0
- package/.output/server/node_modules/micromark/lib/initialize/content.js +79 -0
- package/.output/server/node_modules/micromark/lib/initialize/document.js +362 -0
- package/.output/server/node_modules/micromark/lib/initialize/flow.js +58 -0
- package/.output/server/node_modules/micromark/lib/initialize/text.js +212 -0
- package/.output/server/node_modules/micromark/lib/parse.js +56 -0
- package/.output/server/node_modules/micromark/lib/postprocess.js +18 -0
- package/.output/server/node_modules/micromark/lib/preprocess.js +115 -0
- package/.output/server/node_modules/micromark/package.json +100 -0
- package/.output/server/node_modules/micromark-core-commonmark/index.js +22 -0
- package/.output/server/node_modules/micromark-core-commonmark/lib/attention.js +241 -0
- package/.output/server/node_modules/micromark-core-commonmark/lib/autolink.js +233 -0
- package/.output/server/node_modules/micromark-core-commonmark/lib/blank-line.js +61 -0
- package/.output/server/node_modules/micromark-core-commonmark/lib/block-quote.js +143 -0
- package/.output/server/node_modules/micromark-core-commonmark/lib/character-escape.js +64 -0
- package/.output/server/node_modules/micromark-core-commonmark/lib/character-reference.js +149 -0
- package/.output/server/node_modules/micromark-core-commonmark/lib/code-fenced.js +460 -0
- package/.output/server/node_modules/micromark-core-commonmark/lib/code-indented.js +177 -0
- package/.output/server/node_modules/micromark-core-commonmark/lib/code-text.js +225 -0
- package/.output/server/node_modules/micromark-core-commonmark/lib/content.js +163 -0
- package/.output/server/node_modules/micromark-core-commonmark/lib/definition.js +254 -0
- package/.output/server/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +60 -0
- package/.output/server/node_modules/micromark-core-commonmark/lib/heading-atx.js +195 -0
- package/.output/server/node_modules/micromark-core-commonmark/lib/html-flow.js +876 -0
- package/.output/server/node_modules/micromark-core-commonmark/lib/html-text.js +678 -0
- package/.output/server/node_modules/micromark-core-commonmark/lib/label-end.js +560 -0
- package/.output/server/node_modules/micromark-core-commonmark/lib/label-start-image.js +102 -0
- package/.output/server/node_modules/micromark-core-commonmark/lib/label-start-link.js +55 -0
- package/.output/server/node_modules/micromark-core-commonmark/lib/line-ending.js +33 -0
- package/.output/server/node_modules/micromark-core-commonmark/lib/list.js +213 -0
- package/.output/server/node_modules/micromark-core-commonmark/lib/setext-underline.js +185 -0
- package/.output/server/node_modules/micromark-core-commonmark/lib/thematic-break.js +102 -0
- package/.output/server/node_modules/micromark-core-commonmark/package.json +74 -0
- package/.output/server/node_modules/micromark-extension-gfm/index.js +69 -0
- package/.output/server/node_modules/micromark-extension-gfm/package.json +107 -0
- package/.output/server/node_modules/micromark-extension-gfm-autolink-literal/index.js +2 -0
- package/.output/server/node_modules/micromark-extension-gfm-autolink-literal/lib/html.js +60 -0
- package/.output/server/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js +854 -0
- package/.output/server/node_modules/micromark-extension-gfm-autolink-literal/package.json +116 -0
- package/.output/server/node_modules/micromark-extension-gfm-footnote/index.js +3 -0
- package/.output/server/node_modules/micromark-extension-gfm-footnote/lib/html.js +154 -0
- package/.output/server/node_modules/micromark-extension-gfm-footnote/lib/syntax.js +485 -0
- package/.output/server/node_modules/micromark-extension-gfm-footnote/package.json +132 -0
- package/.output/server/node_modules/micromark-extension-gfm-strikethrough/index.js +3 -0
- package/.output/server/node_modules/micromark-extension-gfm-strikethrough/lib/html.js +26 -0
- package/.output/server/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js +142 -0
- package/.output/server/node_modules/micromark-extension-gfm-strikethrough/package.json +129 -0
- package/.output/server/node_modules/micromark-extension-gfm-table/index.js +2 -0
- package/.output/server/node_modules/micromark-extension-gfm-table/lib/edit-map.js +202 -0
- package/.output/server/node_modules/micromark-extension-gfm-table/lib/html.js +130 -0
- package/.output/server/node_modules/micromark-extension-gfm-table/lib/infer.js +52 -0
- package/.output/server/node_modules/micromark-extension-gfm-table/lib/syntax.js +819 -0
- package/.output/server/node_modules/micromark-extension-gfm-table/package.json +128 -0
- package/.output/server/node_modules/micromark-extension-gfm-tagfilter/index.js +1 -0
- package/.output/server/node_modules/micromark-extension-gfm-tagfilter/lib/index.js +51 -0
- package/.output/server/node_modules/micromark-extension-gfm-tagfilter/package.json +82 -0
- package/.output/server/node_modules/micromark-extension-gfm-task-list-item/index.js +2 -0
- package/.output/server/node_modules/micromark-extension-gfm-task-list-item/lib/html.js +29 -0
- package/.output/server/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js +158 -0
- package/.output/server/node_modules/micromark-extension-gfm-task-list-item/package.json +131 -0
- package/.output/server/node_modules/micromark-factory-destination/index.js +206 -0
- package/.output/server/node_modules/micromark-factory-destination/package.json +57 -0
- package/.output/server/node_modules/micromark-factory-label/index.js +148 -0
- package/.output/server/node_modules/micromark-factory-label/package.json +60 -0
- package/.output/server/node_modules/micromark-factory-space/index.js +64 -0
- package/.output/server/node_modules/micromark-factory-space/package.json +55 -0
- package/.output/server/node_modules/micromark-factory-title/index.js +158 -0
- package/.output/server/node_modules/micromark-factory-title/package.json +58 -0
- package/.output/server/node_modules/micromark-factory-whitespace/index.js +44 -0
- package/.output/server/node_modules/micromark-factory-whitespace/package.json +57 -0
- package/.output/server/node_modules/micromark-util-character/index.js +246 -0
- package/.output/server/node_modules/micromark-util-character/package.json +57 -0
- package/.output/server/node_modules/micromark-util-chunked/index.js +81 -0
- package/.output/server/node_modules/micromark-util-chunked/package.json +57 -0
- package/.output/server/node_modules/micromark-util-classify-character/index.js +27 -0
- package/.output/server/node_modules/micromark-util-classify-character/package.json +59 -0
- package/.output/server/node_modules/micromark-util-combine-extensions/index.js +143 -0
- package/.output/server/node_modules/micromark-util-combine-extensions/package.json +52 -0
- package/.output/server/node_modules/micromark-util-decode-numeric-character-reference/index.js +32 -0
- package/.output/server/node_modules/micromark-util-decode-numeric-character-reference/package.json +59 -0
- package/.output/server/node_modules/micromark-util-decode-string/index.js +45 -0
- package/.output/server/node_modules/micromark-util-decode-string/package.json +63 -0
- package/.output/server/node_modules/micromark-util-encode/index.js +33 -0
- package/.output/server/node_modules/micromark-util-encode/package.json +47 -0
- package/.output/server/node_modules/micromark-util-html-tag-name/index.js +93 -0
- package/.output/server/node_modules/micromark-util-html-tag-name/package.json +47 -0
- package/.output/server/node_modules/micromark-util-normalize-identifier/index.js +33 -0
- package/.output/server/node_modules/micromark-util-normalize-identifier/package.json +58 -0
- package/.output/server/node_modules/micromark-util-resolve-all/index.js +32 -0
- package/.output/server/node_modules/micromark-util-resolve-all/package.json +48 -0
- package/.output/server/node_modules/micromark-util-sanitize-uri/index.js +107 -0
- package/.output/server/node_modules/micromark-util-sanitize-uri/package.json +59 -0
- package/.output/server/node_modules/micromark-util-subtokenize/index.js +228 -0
- package/.output/server/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +251 -0
- package/.output/server/node_modules/micromark-util-subtokenize/package.json +60 -0
- package/.output/server/node_modules/minimark/dist/hast.mjs +39 -0
- package/.output/server/node_modules/minimark/package.json +40 -0
- package/.output/server/node_modules/ms/index.js +162 -0
- package/.output/server/node_modules/ms/package.json +38 -0
- package/.output/server/node_modules/node-emoji/lib/index.js +174 -0
- package/.output/server/node_modules/node-emoji/package.json +118 -0
- package/.output/server/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs +2 -0
- package/.output/server/node_modules/node-fetch-native/dist/index.mjs +1 -0
- package/.output/server/node_modules/node-fetch-native/dist/node.mjs +19 -0
- package/.output/server/node_modules/node-fetch-native/dist/shared/node-fetch-native.DfbY2q-x.mjs +1 -0
- package/.output/server/node_modules/node-fetch-native/package.json +138 -0
- package/.output/server/node_modules/node-mock-http/dist/_polyfill/buffer/node.mjs +1 -0
- package/.output/server/node_modules/node-mock-http/dist/_polyfill/events/node.mjs +1 -0
- package/.output/server/node_modules/node-mock-http/dist/index.mjs +1 -0
- package/.output/server/node_modules/node-mock-http/package.json +63 -0
- package/.output/server/node_modules/nth-check/lib/compile.js +121 -0
- package/.output/server/node_modules/nth-check/lib/index.js +70 -0
- package/.output/server/node_modules/nth-check/lib/parse.js +77 -0
- package/.output/server/node_modules/nth-check/package.json +78 -0
- package/.output/server/node_modules/oauth4webapi/build/index.js +2492 -0
- package/.output/server/node_modules/oauth4webapi/package.json +105 -0
- package/.output/server/node_modules/ofetch/dist/node.mjs +32 -0
- package/.output/server/node_modules/ofetch/dist/shared/ofetch.03887fc3.mjs +333 -0
- package/.output/server/node_modules/ofetch/package.json +96 -0
- package/.output/server/node_modules/oniguruma-parser/dist/parser/node-utils.js +2 -0
- package/.output/server/node_modules/oniguruma-parser/dist/parser/parse.js +2 -0
- package/.output/server/node_modules/oniguruma-parser/dist/tokenizer/tokenize.js +34 -0
- package/.output/server/node_modules/oniguruma-parser/dist/traverser/traverse.js +2 -0
- package/.output/server/node_modules/oniguruma-parser/dist/utils.js +2 -0
- package/.output/server/node_modules/oniguruma-parser/package.json +64 -0
- package/.output/server/node_modules/oniguruma-to-es/dist/esm/index.js +1876 -0
- package/.output/server/node_modules/oniguruma-to-es/dist/esm/package.json +1 -0
- package/.output/server/node_modules/oniguruma-to-es/package.json +61 -0
- package/.output/server/node_modules/openid-client/build/index.js +1310 -0
- package/.output/server/node_modules/openid-client/package.json +122 -0
- package/.output/server/node_modules/parse-entities/index.js +3 -0
- package/.output/server/node_modules/parse-entities/lib/index.js +407 -0
- package/.output/server/node_modules/parse-entities/package.json +91 -0
- package/.output/server/node_modules/parse5/dist/common/doctype.js +114 -0
- package/.output/server/node_modules/parse5/dist/common/error-codes.js +63 -0
- package/.output/server/node_modules/parse5/dist/common/foreign-content.js +228 -0
- package/.output/server/node_modules/parse5/dist/common/html.js +523 -0
- package/.output/server/node_modules/parse5/dist/common/token.js +20 -0
- package/.output/server/node_modules/parse5/dist/common/unicode.js +62 -0
- package/.output/server/node_modules/parse5/dist/index.js +42 -0
- package/.output/server/node_modules/parse5/dist/parser/formatting-element-list.js +110 -0
- package/.output/server/node_modules/parse5/dist/parser/index.js +3245 -0
- package/.output/server/node_modules/parse5/dist/parser/open-element-stack.js +324 -0
- package/.output/server/node_modules/parse5/dist/serializer/index.js +168 -0
- package/.output/server/node_modules/parse5/dist/tokenizer/index.js +2710 -0
- package/.output/server/node_modules/parse5/dist/tokenizer/preprocessor.js +196 -0
- package/.output/server/node_modules/parse5/dist/tree-adapters/default.js +173 -0
- package/.output/server/node_modules/parse5/package.json +50 -0
- package/.output/server/node_modules/pathe/dist/index.mjs +1 -0
- package/.output/server/node_modules/pathe/dist/shared/pathe.ff20891b.mjs +221 -0
- package/.output/server/node_modules/pathe/package.json +48 -0
- package/.output/server/node_modules/pluralize/package.json +40 -0
- package/.output/server/node_modules/pluralize/pluralize.js +503 -0
- package/.output/server/node_modules/radix3/dist/index.mjs +262 -0
- package/.output/server/node_modules/radix3/package.json +52 -0
- package/.output/server/node_modules/regex/package.json +60 -0
- package/.output/server/node_modules/regex/src/atomic.js +221 -0
- package/.output/server/node_modules/regex/src/internals.js +2 -0
- package/.output/server/node_modules/regex/src/subclass.js +98 -0
- package/.output/server/node_modules/regex/src/utils-internals.js +33 -0
- package/.output/server/node_modules/regex-recursion/package.json +47 -0
- package/.output/server/node_modules/regex-recursion/src/index.js +365 -0
- package/.output/server/node_modules/regex-utilities/package.json +35 -0
- package/.output/server/node_modules/regex-utilities/src/index.js +170 -0
- package/.output/server/node_modules/rehype-external-links/index.js +10 -0
- package/.output/server/node_modules/rehype-external-links/lib/index.js +179 -0
- package/.output/server/node_modules/rehype-external-links/package.json +86 -0
- package/.output/server/node_modules/rehype-minify-whitespace/index.js +47 -0
- package/.output/server/node_modules/rehype-minify-whitespace/lib/index.js +26 -0
- package/.output/server/node_modules/rehype-minify-whitespace/package.json +56 -0
- package/.output/server/node_modules/rehype-raw/index.js +5 -0
- package/.output/server/node_modules/rehype-raw/lib/index.js +36 -0
- package/.output/server/node_modules/rehype-raw/package.json +82 -0
- package/.output/server/node_modules/rehype-sort-attribute-values/index.js +29 -0
- package/.output/server/node_modules/rehype-sort-attribute-values/lib/index.js +130 -0
- package/.output/server/node_modules/rehype-sort-attribute-values/lib/schema.js +15 -0
- package/.output/server/node_modules/rehype-sort-attribute-values/package.json +56 -0
- package/.output/server/node_modules/rehype-sort-attributes/index.js +30 -0
- package/.output/server/node_modules/rehype-sort-attributes/lib/index.js +120 -0
- package/.output/server/node_modules/rehype-sort-attributes/package.json +54 -0
- package/.output/server/node_modules/remark-emoji/index.js +76 -0
- package/.output/server/node_modules/remark-emoji/package.json +85 -0
- package/.output/server/node_modules/remark-gfm/index.js +2 -0
- package/.output/server/node_modules/remark-gfm/lib/index.js +41 -0
- package/.output/server/node_modules/remark-gfm/package.json +125 -0
- package/.output/server/node_modules/remark-mdc/dist/index.mjs +2010 -0
- package/.output/server/node_modules/remark-mdc/package.json +84 -0
- package/.output/server/node_modules/remark-parse/index.js +2 -0
- package/.output/server/node_modules/remark-parse/lib/index.js +43 -0
- package/.output/server/node_modules/remark-parse/package.json +72 -0
- package/.output/server/node_modules/remark-rehype/index.js +10 -0
- package/.output/server/node_modules/remark-rehype/lib/index.js +175 -0
- package/.output/server/node_modules/remark-rehype/package.json +86 -0
- package/.output/server/node_modules/remark-stringify/index.js +2 -0
- package/.output/server/node_modules/remark-stringify/lib/index.js +42 -0
- package/.output/server/node_modules/remark-stringify/package.json +71 -0
- package/.output/server/node_modules/safe-stable-stringify/esm/package.json +4 -0
- package/.output/server/node_modules/safe-stable-stringify/esm/wrapper.js +6 -0
- package/.output/server/node_modules/safe-stable-stringify/index.js +625 -0
- package/.output/server/node_modules/safe-stable-stringify/package.json +65 -0
- package/.output/server/node_modules/scule/dist/index.mjs +80 -0
- package/.output/server/node_modules/scule/package.json +43 -0
- package/.output/server/node_modules/secure-json-parse/index.js +126 -0
- package/.output/server/node_modules/secure-json-parse/package.json +75 -0
- package/.output/server/node_modules/semver/classes/semver.js +319 -0
- package/.output/server/node_modules/semver/functions/coerce.js +62 -0
- package/.output/server/node_modules/semver/functions/compare.js +7 -0
- package/.output/server/node_modules/semver/functions/gte.js +5 -0
- package/.output/server/node_modules/semver/functions/parse.js +18 -0
- package/.output/server/node_modules/semver/internal/constants.js +37 -0
- package/.output/server/node_modules/semver/internal/debug.js +11 -0
- package/.output/server/node_modules/semver/internal/identifiers.js +25 -0
- package/.output/server/node_modules/semver/internal/parse-options.js +17 -0
- package/.output/server/node_modules/semver/internal/re.js +223 -0
- package/.output/server/node_modules/semver/package.json +78 -0
- package/.output/server/node_modules/sharp/build/Release/libglib-2.0-0.dll +0 -0
- package/.output/server/node_modules/sharp/build/Release/libgobject-2.0-0.dll +0 -0
- package/.output/server/node_modules/sharp/build/Release/libvips-42.dll +0 -0
- package/.output/server/node_modules/sharp/build/Release/libvips-cpp.dll +0 -0
- package/.output/server/node_modules/sharp/build/Release/sharp-win32-x64.node +0 -0
- package/.output/server/node_modules/sharp/lib/channel.js +174 -0
- package/.output/server/node_modules/sharp/lib/colour.js +184 -0
- package/.output/server/node_modules/sharp/lib/composite.js +210 -0
- package/.output/server/node_modules/sharp/lib/constructor.js +439 -0
- package/.output/server/node_modules/sharp/lib/index.js +16 -0
- package/.output/server/node_modules/sharp/lib/input.js +631 -0
- package/.output/server/node_modules/sharp/lib/is.js +155 -0
- package/.output/server/node_modules/sharp/lib/libvips.js +140 -0
- package/.output/server/node_modules/sharp/lib/operation.js +919 -0
- package/.output/server/node_modules/sharp/lib/output.js +1413 -0
- package/.output/server/node_modules/sharp/lib/platform.js +30 -0
- package/.output/server/node_modules/sharp/lib/resize.js +582 -0
- package/.output/server/node_modules/sharp/lib/sharp.js +38 -0
- package/.output/server/node_modules/sharp/lib/utility.js +287 -0
- package/.output/server/node_modules/sharp/package.json +204 -0
- package/.output/server/node_modules/sharp/vendor/8.14.5/win32-x64/THIRD-PARTY-NOTICES.md +43 -0
- package/.output/server/node_modules/sharp/vendor/8.14.5/win32-x64/include/harfbuzz/hb-cplusplus.hh +223 -0
- package/.output/server/node_modules/sharp/vendor/8.14.5/win32-x64/include/vips/vips8 +60 -0
- package/.output/server/node_modules/sharp/vendor/8.14.5/win32-x64/lib/libglib-2.0-0.dll +0 -0
- package/.output/server/node_modules/sharp/vendor/8.14.5/win32-x64/lib/libglib-2.0.lib +0 -0
- package/.output/server/node_modules/sharp/vendor/8.14.5/win32-x64/lib/libgobject-2.0-0.dll +0 -0
- package/.output/server/node_modules/sharp/vendor/8.14.5/win32-x64/lib/libgobject-2.0.lib +0 -0
- package/.output/server/node_modules/sharp/vendor/8.14.5/win32-x64/lib/libvips-42.dll +0 -0
- package/.output/server/node_modules/sharp/vendor/8.14.5/win32-x64/lib/libvips.lib +0 -0
- package/.output/server/node_modules/sharp/vendor/8.14.5/win32-x64/platform.json +1 -0
- package/.output/server/node_modules/sharp/vendor/8.14.5/win32-x64/versions.json +31 -0
- package/.output/server/node_modules/shiki/dist/engine-javascript.mjs +1 -0
- package/.output/server/node_modules/shiki/dist/engine-oniguruma.mjs +1 -0
- package/.output/server/node_modules/shiki/dist/wasm.mjs +2 -0
- package/.output/server/node_modules/shiki/package.json +70 -0
- package/.output/server/node_modules/simple-swizzle/index.js +29 -0
- package/.output/server/node_modules/simple-swizzle/package.json +36 -0
- package/.output/server/node_modules/skin-tone/index.js +25 -0
- package/.output/server/node_modules/skin-tone/package.json +45 -0
- package/.output/server/node_modules/slugify/package.json +42 -0
- package/.output/server/node_modules/slugify/slugify.js +69 -0
- package/.output/server/node_modules/source-map-js/lib/array-set.js +121 -0
- package/.output/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
- package/.output/server/node_modules/source-map-js/lib/base64.js +67 -0
- package/.output/server/node_modules/source-map-js/lib/binary-search.js +111 -0
- package/.output/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
- package/.output/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
- package/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
- package/.output/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
- package/.output/server/node_modules/source-map-js/lib/source-node.js +413 -0
- package/.output/server/node_modules/source-map-js/lib/util.js +594 -0
- package/.output/server/node_modules/source-map-js/package.json +71 -0
- package/.output/server/node_modules/source-map-js/source-map.js +8 -0
- package/.output/server/node_modules/space-separated-tokens/index.js +24 -0
- package/.output/server/node_modules/space-separated-tokens/package.json +67 -0
- package/.output/server/node_modules/sqlstring/index.js +1 -0
- package/.output/server/node_modules/sqlstring/lib/SqlString.js +237 -0
- package/.output/server/node_modules/sqlstring/package.json +47 -0
- package/.output/server/node_modules/stringify-entities/index.js +6 -0
- package/.output/server/node_modules/stringify-entities/lib/constant/dangerous.js +16 -0
- package/.output/server/node_modules/stringify-entities/lib/core.js +117 -0
- package/.output/server/node_modules/stringify-entities/lib/index.js +36 -0
- package/.output/server/node_modules/stringify-entities/lib/util/format-basic.js +9 -0
- package/.output/server/node_modules/stringify-entities/lib/util/format-smart.js +69 -0
- package/.output/server/node_modules/stringify-entities/lib/util/to-decimal.js +16 -0
- package/.output/server/node_modules/stringify-entities/lib/util/to-hexadecimal.js +16 -0
- package/.output/server/node_modules/stringify-entities/lib/util/to-named.js +57 -0
- package/.output/server/node_modules/stringify-entities/package.json +86 -0
- package/.output/server/node_modules/strnum/package.json +31 -0
- package/.output/server/node_modules/strnum/strnum.js +129 -0
- package/.output/server/node_modules/supports-color/index.js +135 -0
- package/.output/server/node_modules/supports-color/package.json +53 -0
- package/.output/server/node_modules/svgo/lib/builtin.js +57 -0
- package/.output/server/node_modules/svgo/lib/parser.js +262 -0
- package/.output/server/node_modules/svgo/lib/path.js +380 -0
- package/.output/server/node_modules/svgo/lib/stringifier.js +295 -0
- package/.output/server/node_modules/svgo/lib/style.js +336 -0
- package/.output/server/node_modules/svgo/lib/svgo/css-select-adapter.js +120 -0
- package/.output/server/node_modules/svgo/lib/svgo/plugins.js +61 -0
- package/.output/server/node_modules/svgo/lib/svgo/tools.js +245 -0
- package/.output/server/node_modules/svgo/lib/svgo-node.js +85 -0
- package/.output/server/node_modules/svgo/lib/svgo.js +102 -0
- package/.output/server/node_modules/svgo/lib/xast.js +87 -0
- package/.output/server/node_modules/svgo/package.json +108 -0
- package/.output/server/node_modules/svgo/plugins/_collections.js +2339 -0
- package/.output/server/node_modules/svgo/plugins/_path.js +815 -0
- package/.output/server/node_modules/svgo/plugins/_transforms.js +410 -0
- package/.output/server/node_modules/svgo/plugins/addAttributesToSVGElement.js +82 -0
- package/.output/server/node_modules/svgo/plugins/addClassesToSVGElement.js +82 -0
- package/.output/server/node_modules/svgo/plugins/applyTransforms.js +388 -0
- package/.output/server/node_modules/svgo/plugins/cleanupAttrs.js +49 -0
- package/.output/server/node_modules/svgo/plugins/cleanupEnableBackground.js +165 -0
- package/.output/server/node_modules/svgo/plugins/cleanupIds.js +265 -0
- package/.output/server/node_modules/svgo/plugins/cleanupListOfValues.js +147 -0
- package/.output/server/node_modules/svgo/plugins/cleanupNumericValues.js +106 -0
- package/.output/server/node_modules/svgo/plugins/collapseGroups.js +134 -0
- package/.output/server/node_modules/svgo/plugins/convertColors.js +144 -0
- package/.output/server/node_modules/svgo/plugins/convertEllipseToCircle.js +37 -0
- package/.output/server/node_modules/svgo/plugins/convertOneStopGradients.js +168 -0
- package/.output/server/node_modules/svgo/plugins/convertPathData.js +1284 -0
- package/.output/server/node_modules/svgo/plugins/convertShapeToPath.js +170 -0
- package/.output/server/node_modules/svgo/plugins/convertStyleToAttrs.js +136 -0
- package/.output/server/node_modules/svgo/plugins/convertTransform.js +418 -0
- package/.output/server/node_modules/svgo/plugins/inlineStyles.js +390 -0
- package/.output/server/node_modules/svgo/plugins/mergePaths.js +148 -0
- package/.output/server/node_modules/svgo/plugins/mergeStyles.js +98 -0
- package/.output/server/node_modules/svgo/plugins/minifyStyles.js +141 -0
- package/.output/server/node_modules/svgo/plugins/moveElemsAttrsToGroup.js +128 -0
- package/.output/server/node_modules/svgo/plugins/moveGroupAttrsToElems.js +65 -0
- package/.output/server/node_modules/svgo/plugins/prefixIds.js +268 -0
- package/.output/server/node_modules/svgo/plugins/preset-default.js +82 -0
- package/.output/server/node_modules/svgo/plugins/removeAttributesBySelector.js +97 -0
- package/.output/server/node_modules/svgo/plugins/removeAttrs.js +151 -0
- package/.output/server/node_modules/svgo/plugins/removeComments.js +51 -0
- package/.output/server/node_modules/svgo/plugins/removeDesc.js +39 -0
- package/.output/server/node_modules/svgo/plugins/removeDimensions.js +43 -0
- package/.output/server/node_modules/svgo/plugins/removeDoctype.js +40 -0
- package/.output/server/node_modules/svgo/plugins/removeEditorsNSData.js +64 -0
- package/.output/server/node_modules/svgo/plugins/removeElementsByAttr.js +73 -0
- package/.output/server/node_modules/svgo/plugins/removeEmptyAttrs.js +31 -0
- package/.output/server/node_modules/svgo/plugins/removeEmptyContainers.js +59 -0
- package/.output/server/node_modules/svgo/plugins/removeEmptyText.js +51 -0
- package/.output/server/node_modules/svgo/plugins/removeHiddenElems.js +440 -0
- package/.output/server/node_modules/svgo/plugins/removeMetadata.js +27 -0
- package/.output/server/node_modules/svgo/plugins/removeNonInheritableGroupAttrs.js +38 -0
- package/.output/server/node_modules/svgo/plugins/removeOffCanvasPaths.js +136 -0
- package/.output/server/node_modules/svgo/plugins/removeRasterImages.js +31 -0
- package/.output/server/node_modules/svgo/plugins/removeScriptElement.js +70 -0
- package/.output/server/node_modules/svgo/plugins/removeStyleElement.js +27 -0
- package/.output/server/node_modules/svgo/plugins/removeTitle.js +27 -0
- package/.output/server/node_modules/svgo/plugins/removeUnknownsAndDefaults.js +212 -0
- package/.output/server/node_modules/svgo/plugins/removeUnusedNS.js +59 -0
- package/.output/server/node_modules/svgo/plugins/removeUselessDefs.js +65 -0
- package/.output/server/node_modules/svgo/plugins/removeUselessStrokeAndFill.js +139 -0
- package/.output/server/node_modules/svgo/plugins/removeViewBox.js +49 -0
- package/.output/server/node_modules/svgo/plugins/removeXMLNS.js +29 -0
- package/.output/server/node_modules/svgo/plugins/removeXMLProcInst.js +28 -0
- package/.output/server/node_modules/svgo/plugins/removeXlink.js +226 -0
- package/.output/server/node_modules/svgo/plugins/reusePaths.js +195 -0
- package/.output/server/node_modules/svgo/plugins/sortAttrs.js +108 -0
- package/.output/server/node_modules/svgo/plugins/sortDefsChildren.js +58 -0
- package/.output/server/node_modules/trim-lines/index.js +69 -0
- package/.output/server/node_modules/trim-lines/package.json +67 -0
- package/.output/server/node_modules/trim-trailing-lines/index.js +23 -0
- package/.output/server/node_modules/trim-trailing-lines/package.json +65 -0
- package/.output/server/node_modules/trough/index.js +9 -0
- package/.output/server/node_modules/trough/lib/index.js +206 -0
- package/.output/server/node_modules/trough/package.json +77 -0
- package/.output/server/node_modules/truncatise/index.js +188 -0
- package/.output/server/node_modules/truncatise/package.json +36 -0
- package/.output/server/node_modules/ufo/dist/index.mjs +638 -0
- package/.output/server/node_modules/ufo/package.json +47 -0
- package/.output/server/node_modules/ultrahtml/dist/index.js +1 -0
- package/.output/server/node_modules/ultrahtml/package.json +79 -0
- package/.output/server/node_modules/uncrypto/dist/crypto.node.mjs +16 -0
- package/.output/server/node_modules/uncrypto/package.json +60 -0
- package/.output/server/node_modules/unhead/dist/plugins.mjs +101 -0
- package/.output/server/node_modules/unhead/dist/server.mjs +689 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.BYvz9V1x.mjs +43 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.BpRRHAhY.mjs +194 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.CApf5sj3.mjs +148 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.DH45uomy.mjs +180 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.DQc16pHI.mjs +196 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.DZbvapt-.mjs +70 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.Djo8ep_Y.mjs +166 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.yem5I2v_.mjs +38 -0
- package/.output/server/node_modules/unhead/dist/utils.mjs +5 -0
- package/.output/server/node_modules/unhead/package.json +101 -0
- package/.output/server/node_modules/unicode-emoji-modifier-base/index.js +86 -0
- package/.output/server/node_modules/unicode-emoji-modifier-base/package.json +44 -0
- package/.output/server/node_modules/unified/index.js +2 -0
- package/.output/server/node_modules/unified/lib/callable-instance.js +44 -0
- package/.output/server/node_modules/unified/lib/index.js +1323 -0
- package/.output/server/node_modules/unified/package.json +120 -0
- package/.output/server/node_modules/unist-util-find-after/index.js +1 -0
- package/.output/server/node_modules/unist-util-find-after/lib/index.js +130 -0
- package/.output/server/node_modules/unist-util-find-after/package.json +84 -0
- package/.output/server/node_modules/unist-util-is/index.js +7 -0
- package/.output/server/node_modules/unist-util-is/lib/index.js +291 -0
- package/.output/server/node_modules/unist-util-is/package.json +100 -0
- package/.output/server/node_modules/unist-util-position/index.js +1 -0
- package/.output/server/node_modules/unist-util-position/lib/index.js +95 -0
- package/.output/server/node_modules/unist-util-position/package.json +76 -0
- package/.output/server/node_modules/unist-util-stringify-position/index.js +1 -0
- package/.output/server/node_modules/unist-util-stringify-position/lib/index.js +84 -0
- package/.output/server/node_modules/unist-util-stringify-position/package.json +80 -0
- package/.output/server/node_modules/unist-util-visit/index.js +2 -0
- package/.output/server/node_modules/unist-util-visit/lib/index.js +313 -0
- package/.output/server/node_modules/unist-util-visit/package.json +113 -0
- package/.output/server/node_modules/unist-util-visit-parents/index.js +2 -0
- package/.output/server/node_modules/unist-util-visit-parents/lib/color.node.js +7 -0
- package/.output/server/node_modules/unist-util-visit-parents/lib/index.js +398 -0
- package/.output/server/node_modules/unist-util-visit-parents/package.json +101 -0
- package/.output/server/node_modules/vfile/index.js +2 -0
- package/.output/server/node_modules/vfile/lib/index.js +643 -0
- package/.output/server/node_modules/vfile/lib/minpath.js +1 -0
- package/.output/server/node_modules/vfile/lib/minproc.js +1 -0
- package/.output/server/node_modules/vfile/lib/minurl.js +2 -0
- package/.output/server/node_modules/vfile/lib/minurl.shared.js +31 -0
- package/.output/server/node_modules/vfile/package.json +134 -0
- package/.output/server/node_modules/vfile-location/index.js +2 -0
- package/.output/server/node_modules/vfile-location/lib/index.js +93 -0
- package/.output/server/node_modules/vfile-location/package.json +115 -0
- package/.output/server/node_modules/vfile-message/index.js +5 -0
- package/.output/server/node_modules/vfile-message/lib/index.js +314 -0
- package/.output/server/node_modules/vfile-message/package.json +80 -0
- package/.output/server/node_modules/vue/dist/vue.cjs.js +80 -0
- package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
- package/.output/server/node_modules/vue/index.js +7 -0
- package/.output/server/node_modules/vue/index.mjs +1 -0
- package/.output/server/node_modules/vue/package.json +112 -0
- package/.output/server/node_modules/vue/server-renderer/index.mjs +1 -0
- package/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +196 -0
- package/.output/server/node_modules/vue-bundle-renderer/package.json +50 -0
- package/.output/server/node_modules/vue-router/dist/vue-router.mjs +3786 -0
- package/.output/server/node_modules/vue-router/dist/vue-router.node.mjs +2 -0
- package/.output/server/node_modules/vue-router/package.json +149 -0
- package/.output/server/node_modules/web-namespaces/index.js +13 -0
- package/.output/server/node_modules/web-namespaces/package.json +81 -0
- package/.output/server/node_modules/xss/lib/default.js +461 -0
- package/.output/server/node_modules/xss/lib/index.js +51 -0
- package/.output/server/node_modules/xss/lib/parser.js +257 -0
- package/.output/server/node_modules/xss/lib/util.js +34 -0
- package/.output/server/node_modules/xss/lib/xss.js +232 -0
- package/.output/server/node_modules/xss/package.json +65 -0
- package/.output/server/node_modules/yaml/dist/compose/compose-collection.js +90 -0
- package/.output/server/node_modules/yaml/dist/compose/compose-doc.js +45 -0
- package/.output/server/node_modules/yaml/dist/compose/compose-node.js +105 -0
- package/.output/server/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
- package/.output/server/node_modules/yaml/dist/compose/composer.js +222 -0
- package/.output/server/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
- package/.output/server/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
- package/.output/server/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
- package/.output/server/node_modules/yaml/dist/compose/resolve-end.js +39 -0
- package/.output/server/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
- package/.output/server/node_modules/yaml/dist/compose/resolve-flow-scalar.js +225 -0
- package/.output/server/node_modules/yaml/dist/compose/resolve-props.js +148 -0
- package/.output/server/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
- package/.output/server/node_modules/yaml/dist/compose/util-empty-scalar-position.js +28 -0
- package/.output/server/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
- package/.output/server/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
- package/.output/server/node_modules/yaml/dist/doc/Document.js +337 -0
- package/.output/server/node_modules/yaml/dist/doc/anchors.js +76 -0
- package/.output/server/node_modules/yaml/dist/doc/applyReviver.js +57 -0
- package/.output/server/node_modules/yaml/dist/doc/createNode.js +90 -0
- package/.output/server/node_modules/yaml/dist/doc/directives.js +178 -0
- package/.output/server/node_modules/yaml/dist/errors.js +62 -0
- package/.output/server/node_modules/yaml/dist/index.js +50 -0
- package/.output/server/node_modules/yaml/dist/log.js +19 -0
- package/.output/server/node_modules/yaml/dist/nodes/Alias.js +116 -0
- package/.output/server/node_modules/yaml/dist/nodes/Collection.js +151 -0
- package/.output/server/node_modules/yaml/dist/nodes/Node.js +40 -0
- package/.output/server/node_modules/yaml/dist/nodes/Pair.js +39 -0
- package/.output/server/node_modules/yaml/dist/nodes/Scalar.js +27 -0
- package/.output/server/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
- package/.output/server/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
- package/.output/server/node_modules/yaml/dist/nodes/addPairToJSMap.js +65 -0
- package/.output/server/node_modules/yaml/dist/nodes/identity.js +53 -0
- package/.output/server/node_modules/yaml/dist/nodes/toJS.js +39 -0
- package/.output/server/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
- package/.output/server/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
- package/.output/server/node_modules/yaml/dist/parse/cst-visit.js +99 -0
- package/.output/server/node_modules/yaml/dist/parse/cst.js +112 -0
- package/.output/server/node_modules/yaml/dist/parse/lexer.js +719 -0
- package/.output/server/node_modules/yaml/dist/parse/line-counter.js +41 -0
- package/.output/server/node_modules/yaml/dist/parse/parser.js +972 -0
- package/.output/server/node_modules/yaml/dist/public-api.js +107 -0
- package/.output/server/node_modules/yaml/dist/schema/Schema.js +39 -0
- package/.output/server/node_modules/yaml/dist/schema/common/map.js +19 -0
- package/.output/server/node_modules/yaml/dist/schema/common/null.js +17 -0
- package/.output/server/node_modules/yaml/dist/schema/common/seq.js +19 -0
- package/.output/server/node_modules/yaml/dist/schema/common/string.js +16 -0
- package/.output/server/node_modules/yaml/dist/schema/core/bool.js +21 -0
- package/.output/server/node_modules/yaml/dist/schema/core/float.js +47 -0
- package/.output/server/node_modules/yaml/dist/schema/core/int.js +42 -0
- package/.output/server/node_modules/yaml/dist/schema/core/schema.js +25 -0
- package/.output/server/node_modules/yaml/dist/schema/json/schema.js +64 -0
- package/.output/server/node_modules/yaml/dist/schema/tags.js +99 -0
- package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/binary.js +70 -0
- package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
- package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
- package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
- package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/merge.js +68 -0
- package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
- package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
- package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
- package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
- package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
- package/.output/server/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
- package/.output/server/node_modules/yaml/dist/stringify/stringify.js +131 -0
- package/.output/server/node_modules/yaml/dist/stringify/stringifyCollection.js +145 -0
- package/.output/server/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
- package/.output/server/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
- package/.output/server/node_modules/yaml/dist/stringify/stringifyNumber.js +26 -0
- package/.output/server/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
- package/.output/server/node_modules/yaml/dist/stringify/stringifyString.js +338 -0
- package/.output/server/node_modules/yaml/dist/visit.js +236 -0
- package/.output/server/node_modules/yaml/package.json +96 -0
- package/.output/server/node_modules/zwitch/index.js +118 -0
- package/.output/server/node_modules/zwitch/package.json +72 -0
- package/.output/server/package.json +241 -0
- package/{app.vue → app/app.vue} +1 -0
- package/{components → app/components}/CurrentTime.vue +1 -1
- package/{components → app/components}/ignis/IgnisWelcome.vue +1 -1
- package/{composables → app/composables}/useTranslation.ts +2 -2
- package/app/pages/_ignis-welcome.vue +3 -0
- package/app/utils/date.ts +12 -0
- package/{utils → app/utils}/i18n-sources.ts +2 -2
- package/app/utils/validation.ts +25 -0
- package/bin/set-css.js +23 -0
- package/bin/set-eslint.js +21 -0
- package/bin/setup.js +92 -0
- package/content.config.ts +1 -1
- package/eslint.config.mjs +0 -3
- package/features.ts +36 -34
- package/formkit.config.ts +1 -1
- package/i18n/i18n.config.ts +2 -0
- package/nuxt.config.ts +13 -20
- package/package.json +31 -28
- package/public/_ignis-config.json +106 -3
- package/test/config/css-multiple.txt +1 -1
- package/test/config/css-nuxt-ui.txt +2 -2
- package/test/config/css-open-props.txt +44 -2
- package/test/config/css-single.txt +1 -1
- package/test/config/css-tailwind.txt +2 -2
- package/test/config/custom-lang.txt +1 -1
- package/test/config/db-neon.txt +1 -1
- package/test/config/db-supabase.txt +1 -1
- package/test/config/default.txt +1 -1
- package/test/config/equipment-1-composable.txt +1 -1
- package/test/config/equipment-2-plugins.txt +1 -1
- package/test/config/equipment-all.txt +1 -1
- package/test/config/forms-formkit.txt +1 -1
- package/test/config/forms-vueform.txt +1 -1
- package/test/config/i18n.txt +1 -1
- package/test/config/open-props.txt +44 -2
- package/test/config/seo-ssr-false.txt +1 -1
- package/test/config/ui-nuxt-ui.txt +2 -2
- package/test/config/ui-tailwind.txt +2 -2
- package/test/features.test.ts +1 -1
- package/tsconfig.json +16 -5
- package/vitest.config.ts +5 -0
- package/vueform.config.ts +2 -0
- package/.nuxt/module/@nuxtjs-sitemap.d.ts +0 -29
- package/.nuxt/types/app-defaults.d.ts +0 -7
- package/.nuxt/types/schema.d.ts +0 -1756
- package/bin/make-eslint.js +0 -55
- package/server/tsconfig.json +0 -3
- /package/{assets → app/assets}/css/ignis-nuxt-ui.css +0 -0
- /package/{assets → app/assets}/css/ignis-open-props.css +0 -0
- /package/{assets → app/assets}/css/ignis-tailwind.css +0 -0
- /package/{assets → app/assets}/css/ignis.css +0 -0
- /package/{components → app/components}/ignis/IgnisConfig.vue +0 -0
- /package/{components → app/components}/ignis/IgnisFeature.vue +0 -0
- /package/{components → app/components}/ignis/IgnisFeatureList.vue +0 -0
- /package/{components → app/components}/ignis/IgnisFooter.vue +0 -0
- /package/{components → app/components}/ignis/IgnisHeader.vue +0 -0
- /package/{components → app/components}/ignis/IgnisInfo.vue +0 -0
- /package/{composables → app/composables}/useValibot.ts +0 -0
- /package/{composables → app/composables}/useZod.ts +0 -0
- /package/{pages → app/pages}/_ignis-config.vue +0 -0
- /package/{pages → app/pages}/_ignis-info.vue +0 -0
- /package/{pages → app/pages}/index.vue +0 -0
- /package/{plugins → app/plugins}/errorHandler.ts +0 -0
- /package/{utils → app/utils}/config/content.ts +0 -0
- /package/{utils → app/utils}/config/formkit.ts +0 -0
- /package/{utils → app/utils}/config/vueform.ts +0 -0
- /package/{utils → app/utils}/consola.ts +0 -0
- /package/{utils → app/utils}/content.ts +0 -0
- /package/{utils → app/utils}/formkit.ts +0 -0
- /package/{utils → app/utils}/ignis-types.ts +0 -0
- /package/{utils → app/utils}/pslo-utils.ts +0 -0
- /package/{utils → app/utils}/tailwind.ts +0 -0
- /package/{utils → app/utils}/vueform.ts +0 -0
|
@@ -0,0 +1,2492 @@
|
|
|
1
|
+
let USER_AGENT;
|
|
2
|
+
if (typeof navigator === 'undefined' || !navigator.userAgent?.startsWith?.('Mozilla/5.0 ')) {
|
|
3
|
+
const NAME = 'oauth4webapi';
|
|
4
|
+
const VERSION = 'v3.8.1';
|
|
5
|
+
USER_AGENT = `${NAME}/${VERSION}`;
|
|
6
|
+
}
|
|
7
|
+
function looseInstanceOf(input, expected) {
|
|
8
|
+
if (input == null) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
try {
|
|
12
|
+
return (input instanceof expected ||
|
|
13
|
+
Object.getPrototypeOf(input)[Symbol.toStringTag] === expected.prototype[Symbol.toStringTag]);
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const ERR_INVALID_ARG_VALUE = 'ERR_INVALID_ARG_VALUE';
|
|
20
|
+
const ERR_INVALID_ARG_TYPE = 'ERR_INVALID_ARG_TYPE';
|
|
21
|
+
function CodedTypeError(message, code, cause) {
|
|
22
|
+
const err = new TypeError(message, { cause });
|
|
23
|
+
Object.assign(err, { code });
|
|
24
|
+
return err;
|
|
25
|
+
}
|
|
26
|
+
export const allowInsecureRequests = Symbol();
|
|
27
|
+
export const clockSkew = Symbol();
|
|
28
|
+
export const clockTolerance = Symbol();
|
|
29
|
+
export const customFetch = Symbol();
|
|
30
|
+
export const modifyAssertion = Symbol();
|
|
31
|
+
export const jweDecrypt = Symbol();
|
|
32
|
+
export const jwksCache = Symbol();
|
|
33
|
+
const encoder = new TextEncoder();
|
|
34
|
+
const decoder = new TextDecoder();
|
|
35
|
+
function buf(input) {
|
|
36
|
+
if (typeof input === 'string') {
|
|
37
|
+
return encoder.encode(input);
|
|
38
|
+
}
|
|
39
|
+
return decoder.decode(input);
|
|
40
|
+
}
|
|
41
|
+
let encodeBase64Url;
|
|
42
|
+
if (Uint8Array.prototype.toBase64) {
|
|
43
|
+
encodeBase64Url = (input) => {
|
|
44
|
+
if (input instanceof ArrayBuffer) {
|
|
45
|
+
input = new Uint8Array(input);
|
|
46
|
+
}
|
|
47
|
+
return input.toBase64({ alphabet: 'base64url', omitPadding: true });
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
const CHUNK_SIZE = 0x8000;
|
|
52
|
+
encodeBase64Url = (input) => {
|
|
53
|
+
if (input instanceof ArrayBuffer) {
|
|
54
|
+
input = new Uint8Array(input);
|
|
55
|
+
}
|
|
56
|
+
const arr = [];
|
|
57
|
+
for (let i = 0; i < input.byteLength; i += CHUNK_SIZE) {
|
|
58
|
+
arr.push(String.fromCharCode.apply(null, input.subarray(i, i + CHUNK_SIZE)));
|
|
59
|
+
}
|
|
60
|
+
return btoa(arr.join('')).replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_');
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
let decodeBase64Url;
|
|
64
|
+
if (Uint8Array.fromBase64) {
|
|
65
|
+
decodeBase64Url = (input) => {
|
|
66
|
+
try {
|
|
67
|
+
return Uint8Array.fromBase64(input, { alphabet: 'base64url' });
|
|
68
|
+
}
|
|
69
|
+
catch (cause) {
|
|
70
|
+
throw CodedTypeError('The input to be decoded is not correctly encoded.', ERR_INVALID_ARG_VALUE, cause);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
decodeBase64Url = (input) => {
|
|
76
|
+
try {
|
|
77
|
+
const binary = atob(input.replace(/-/g, '+').replace(/_/g, '/').replace(/\s/g, ''));
|
|
78
|
+
const bytes = new Uint8Array(binary.length);
|
|
79
|
+
for (let i = 0; i < binary.length; i++) {
|
|
80
|
+
bytes[i] = binary.charCodeAt(i);
|
|
81
|
+
}
|
|
82
|
+
return bytes;
|
|
83
|
+
}
|
|
84
|
+
catch (cause) {
|
|
85
|
+
throw CodedTypeError('The input to be decoded is not correctly encoded.', ERR_INVALID_ARG_VALUE, cause);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function b64u(input) {
|
|
90
|
+
if (typeof input === 'string') {
|
|
91
|
+
return decodeBase64Url(input);
|
|
92
|
+
}
|
|
93
|
+
return encodeBase64Url(input);
|
|
94
|
+
}
|
|
95
|
+
export class UnsupportedOperationError extends Error {
|
|
96
|
+
code;
|
|
97
|
+
constructor(message, options) {
|
|
98
|
+
super(message, options);
|
|
99
|
+
this.name = this.constructor.name;
|
|
100
|
+
this.code = UNSUPPORTED_OPERATION;
|
|
101
|
+
Error.captureStackTrace?.(this, this.constructor);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
export class OperationProcessingError extends Error {
|
|
105
|
+
code;
|
|
106
|
+
constructor(message, options) {
|
|
107
|
+
super(message, options);
|
|
108
|
+
this.name = this.constructor.name;
|
|
109
|
+
if (options?.code) {
|
|
110
|
+
this.code = options?.code;
|
|
111
|
+
}
|
|
112
|
+
Error.captureStackTrace?.(this, this.constructor);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function OPE(message, code, cause) {
|
|
116
|
+
return new OperationProcessingError(message, { code, cause });
|
|
117
|
+
}
|
|
118
|
+
async function calculateJwkThumbprint(jwk) {
|
|
119
|
+
let components;
|
|
120
|
+
switch (jwk.kty) {
|
|
121
|
+
case 'EC':
|
|
122
|
+
components = {
|
|
123
|
+
crv: jwk.crv,
|
|
124
|
+
kty: jwk.kty,
|
|
125
|
+
x: jwk.x,
|
|
126
|
+
y: jwk.y,
|
|
127
|
+
};
|
|
128
|
+
break;
|
|
129
|
+
case 'OKP':
|
|
130
|
+
components = {
|
|
131
|
+
crv: jwk.crv,
|
|
132
|
+
kty: jwk.kty,
|
|
133
|
+
x: jwk.x,
|
|
134
|
+
};
|
|
135
|
+
break;
|
|
136
|
+
case 'AKP':
|
|
137
|
+
components = {
|
|
138
|
+
alg: jwk.alg,
|
|
139
|
+
kty: jwk.kty,
|
|
140
|
+
pub: jwk.pub,
|
|
141
|
+
};
|
|
142
|
+
break;
|
|
143
|
+
case 'RSA':
|
|
144
|
+
components = {
|
|
145
|
+
e: jwk.e,
|
|
146
|
+
kty: jwk.kty,
|
|
147
|
+
n: jwk.n,
|
|
148
|
+
};
|
|
149
|
+
break;
|
|
150
|
+
default:
|
|
151
|
+
throw new UnsupportedOperationError('unsupported JWK key type', { cause: jwk });
|
|
152
|
+
}
|
|
153
|
+
return b64u(await crypto.subtle.digest('SHA-256', buf(JSON.stringify(components))));
|
|
154
|
+
}
|
|
155
|
+
function assertCryptoKey(key, it) {
|
|
156
|
+
if (!(key instanceof CryptoKey)) {
|
|
157
|
+
throw CodedTypeError(`${it} must be a CryptoKey`, ERR_INVALID_ARG_TYPE);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
function assertPrivateKey(key, it) {
|
|
161
|
+
assertCryptoKey(key, it);
|
|
162
|
+
if (key.type !== 'private') {
|
|
163
|
+
throw CodedTypeError(`${it} must be a private CryptoKey`, ERR_INVALID_ARG_VALUE);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
function assertPublicKey(key, it) {
|
|
167
|
+
assertCryptoKey(key, it);
|
|
168
|
+
if (key.type !== 'public') {
|
|
169
|
+
throw CodedTypeError(`${it} must be a public CryptoKey`, ERR_INVALID_ARG_VALUE);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
function normalizeTyp(value) {
|
|
173
|
+
return value.toLowerCase().replace(/^application\//, '');
|
|
174
|
+
}
|
|
175
|
+
function isJsonObject(input) {
|
|
176
|
+
if (input === null || typeof input !== 'object' || Array.isArray(input)) {
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
return true;
|
|
180
|
+
}
|
|
181
|
+
function prepareHeaders(input) {
|
|
182
|
+
if (looseInstanceOf(input, Headers)) {
|
|
183
|
+
input = Object.fromEntries(input.entries());
|
|
184
|
+
}
|
|
185
|
+
const headers = new Headers(input ?? {});
|
|
186
|
+
if (USER_AGENT && !headers.has('user-agent')) {
|
|
187
|
+
headers.set('user-agent', USER_AGENT);
|
|
188
|
+
}
|
|
189
|
+
if (headers.has('authorization')) {
|
|
190
|
+
throw CodedTypeError('"options.headers" must not include the "authorization" header name', ERR_INVALID_ARG_VALUE);
|
|
191
|
+
}
|
|
192
|
+
return headers;
|
|
193
|
+
}
|
|
194
|
+
function signal(url, value) {
|
|
195
|
+
if (value !== undefined) {
|
|
196
|
+
if (typeof value === 'function') {
|
|
197
|
+
value = value(url.href);
|
|
198
|
+
}
|
|
199
|
+
if (!(value instanceof AbortSignal)) {
|
|
200
|
+
throw CodedTypeError('"options.signal" must return or be an instance of AbortSignal', ERR_INVALID_ARG_TYPE);
|
|
201
|
+
}
|
|
202
|
+
return value;
|
|
203
|
+
}
|
|
204
|
+
return undefined;
|
|
205
|
+
}
|
|
206
|
+
function replaceDoubleSlash(pathname) {
|
|
207
|
+
if (pathname.includes('//')) {
|
|
208
|
+
return pathname.replace('//', '/');
|
|
209
|
+
}
|
|
210
|
+
return pathname;
|
|
211
|
+
}
|
|
212
|
+
function prependWellKnown(url, wellKnown, allowTerminatingSlash = false) {
|
|
213
|
+
if (url.pathname === '/') {
|
|
214
|
+
url.pathname = wellKnown;
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
url.pathname = replaceDoubleSlash(`${wellKnown}/${allowTerminatingSlash ? url.pathname : url.pathname.replace(/(\/)$/, '')}`);
|
|
218
|
+
}
|
|
219
|
+
return url;
|
|
220
|
+
}
|
|
221
|
+
function appendWellKnown(url, wellKnown) {
|
|
222
|
+
url.pathname = replaceDoubleSlash(`${url.pathname}/${wellKnown}`);
|
|
223
|
+
return url;
|
|
224
|
+
}
|
|
225
|
+
async function performDiscovery(input, urlName, transform, options) {
|
|
226
|
+
if (!(input instanceof URL)) {
|
|
227
|
+
throw CodedTypeError(`"${urlName}" must be an instance of URL`, ERR_INVALID_ARG_TYPE);
|
|
228
|
+
}
|
|
229
|
+
checkProtocol(input, options?.[allowInsecureRequests] !== true);
|
|
230
|
+
const url = transform(new URL(input.href));
|
|
231
|
+
const headers = prepareHeaders(options?.headers);
|
|
232
|
+
headers.set('accept', 'application/json');
|
|
233
|
+
return (options?.[customFetch] || fetch)(url.href, {
|
|
234
|
+
body: undefined,
|
|
235
|
+
headers: Object.fromEntries(headers.entries()),
|
|
236
|
+
method: 'GET',
|
|
237
|
+
redirect: 'manual',
|
|
238
|
+
signal: signal(url, options?.signal),
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
export async function discoveryRequest(issuerIdentifier, options) {
|
|
242
|
+
return performDiscovery(issuerIdentifier, 'issuerIdentifier', (url) => {
|
|
243
|
+
switch (options?.algorithm) {
|
|
244
|
+
case undefined:
|
|
245
|
+
case 'oidc':
|
|
246
|
+
appendWellKnown(url, '.well-known/openid-configuration');
|
|
247
|
+
break;
|
|
248
|
+
case 'oauth2':
|
|
249
|
+
prependWellKnown(url, '.well-known/oauth-authorization-server');
|
|
250
|
+
break;
|
|
251
|
+
default:
|
|
252
|
+
throw CodedTypeError('"options.algorithm" must be "oidc" (default), or "oauth2"', ERR_INVALID_ARG_VALUE);
|
|
253
|
+
}
|
|
254
|
+
return url;
|
|
255
|
+
}, options);
|
|
256
|
+
}
|
|
257
|
+
function assertNumber(input, allow0, it, code, cause) {
|
|
258
|
+
try {
|
|
259
|
+
if (typeof input !== 'number' || !Number.isFinite(input)) {
|
|
260
|
+
throw CodedTypeError(`${it} must be a number`, ERR_INVALID_ARG_TYPE, cause);
|
|
261
|
+
}
|
|
262
|
+
if (input > 0)
|
|
263
|
+
return;
|
|
264
|
+
if (allow0) {
|
|
265
|
+
if (input !== 0) {
|
|
266
|
+
throw CodedTypeError(`${it} must be a non-negative number`, ERR_INVALID_ARG_VALUE, cause);
|
|
267
|
+
}
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
throw CodedTypeError(`${it} must be a positive number`, ERR_INVALID_ARG_VALUE, cause);
|
|
271
|
+
}
|
|
272
|
+
catch (err) {
|
|
273
|
+
if (code) {
|
|
274
|
+
throw OPE(err.message, code, cause);
|
|
275
|
+
}
|
|
276
|
+
throw err;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
function assertString(input, it, code, cause) {
|
|
280
|
+
try {
|
|
281
|
+
if (typeof input !== 'string') {
|
|
282
|
+
throw CodedTypeError(`${it} must be a string`, ERR_INVALID_ARG_TYPE, cause);
|
|
283
|
+
}
|
|
284
|
+
if (input.length === 0) {
|
|
285
|
+
throw CodedTypeError(`${it} must not be empty`, ERR_INVALID_ARG_VALUE, cause);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
catch (err) {
|
|
289
|
+
if (code) {
|
|
290
|
+
throw OPE(err.message, code, cause);
|
|
291
|
+
}
|
|
292
|
+
throw err;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
export async function processDiscoveryResponse(expectedIssuerIdentifier, response) {
|
|
296
|
+
const expected = expectedIssuerIdentifier;
|
|
297
|
+
if (!(expected instanceof URL) && expected !== _nodiscoverycheck) {
|
|
298
|
+
throw CodedTypeError('"expectedIssuerIdentifier" must be an instance of URL', ERR_INVALID_ARG_TYPE);
|
|
299
|
+
}
|
|
300
|
+
if (!looseInstanceOf(response, Response)) {
|
|
301
|
+
throw CodedTypeError('"response" must be an instance of Response', ERR_INVALID_ARG_TYPE);
|
|
302
|
+
}
|
|
303
|
+
if (response.status !== 200) {
|
|
304
|
+
throw OPE('"response" is not a conform Authorization Server Metadata response (unexpected HTTP status code)', RESPONSE_IS_NOT_CONFORM, response);
|
|
305
|
+
}
|
|
306
|
+
assertReadableResponse(response);
|
|
307
|
+
const json = await getResponseJsonBody(response);
|
|
308
|
+
assertString(json.issuer, '"response" body "issuer" property', INVALID_RESPONSE, { body: json });
|
|
309
|
+
if (expected !== _nodiscoverycheck && new URL(json.issuer).href !== expected.href) {
|
|
310
|
+
throw OPE('"response" body "issuer" property does not match the expected value', JSON_ATTRIBUTE_COMPARISON, { expected: expected.href, body: json, attribute: 'issuer' });
|
|
311
|
+
}
|
|
312
|
+
return json;
|
|
313
|
+
}
|
|
314
|
+
function assertApplicationJson(response) {
|
|
315
|
+
assertContentType(response, 'application/json');
|
|
316
|
+
}
|
|
317
|
+
function notJson(response, ...types) {
|
|
318
|
+
let msg = '"response" content-type must be ';
|
|
319
|
+
if (types.length > 2) {
|
|
320
|
+
const last = types.pop();
|
|
321
|
+
msg += `${types.join(', ')}, or ${last}`;
|
|
322
|
+
}
|
|
323
|
+
else if (types.length === 2) {
|
|
324
|
+
msg += `${types[0]} or ${types[1]}`;
|
|
325
|
+
}
|
|
326
|
+
else {
|
|
327
|
+
msg += types[0];
|
|
328
|
+
}
|
|
329
|
+
return OPE(msg, RESPONSE_IS_NOT_JSON, response);
|
|
330
|
+
}
|
|
331
|
+
function assertContentTypes(response, ...types) {
|
|
332
|
+
if (!types.includes(getContentType(response))) {
|
|
333
|
+
throw notJson(response, ...types);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
function assertContentType(response, contentType) {
|
|
337
|
+
if (getContentType(response) !== contentType) {
|
|
338
|
+
throw notJson(response, contentType);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
function randomBytes() {
|
|
342
|
+
return b64u(crypto.getRandomValues(new Uint8Array(32)));
|
|
343
|
+
}
|
|
344
|
+
export function generateRandomCodeVerifier() {
|
|
345
|
+
return randomBytes();
|
|
346
|
+
}
|
|
347
|
+
export function generateRandomState() {
|
|
348
|
+
return randomBytes();
|
|
349
|
+
}
|
|
350
|
+
export function generateRandomNonce() {
|
|
351
|
+
return randomBytes();
|
|
352
|
+
}
|
|
353
|
+
export async function calculatePKCECodeChallenge(codeVerifier) {
|
|
354
|
+
assertString(codeVerifier, 'codeVerifier');
|
|
355
|
+
return b64u(await crypto.subtle.digest('SHA-256', buf(codeVerifier)));
|
|
356
|
+
}
|
|
357
|
+
function getKeyAndKid(input) {
|
|
358
|
+
if (input instanceof CryptoKey) {
|
|
359
|
+
return { key: input };
|
|
360
|
+
}
|
|
361
|
+
if (!(input?.key instanceof CryptoKey)) {
|
|
362
|
+
return {};
|
|
363
|
+
}
|
|
364
|
+
if (input.kid !== undefined) {
|
|
365
|
+
assertString(input.kid, '"kid"');
|
|
366
|
+
}
|
|
367
|
+
return {
|
|
368
|
+
key: input.key,
|
|
369
|
+
kid: input.kid,
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
function psAlg(key) {
|
|
373
|
+
switch (key.algorithm.hash.name) {
|
|
374
|
+
case 'SHA-256':
|
|
375
|
+
return 'PS256';
|
|
376
|
+
case 'SHA-384':
|
|
377
|
+
return 'PS384';
|
|
378
|
+
case 'SHA-512':
|
|
379
|
+
return 'PS512';
|
|
380
|
+
default:
|
|
381
|
+
throw new UnsupportedOperationError('unsupported RsaHashedKeyAlgorithm hash name', {
|
|
382
|
+
cause: key,
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
function rsAlg(key) {
|
|
387
|
+
switch (key.algorithm.hash.name) {
|
|
388
|
+
case 'SHA-256':
|
|
389
|
+
return 'RS256';
|
|
390
|
+
case 'SHA-384':
|
|
391
|
+
return 'RS384';
|
|
392
|
+
case 'SHA-512':
|
|
393
|
+
return 'RS512';
|
|
394
|
+
default:
|
|
395
|
+
throw new UnsupportedOperationError('unsupported RsaHashedKeyAlgorithm hash name', {
|
|
396
|
+
cause: key,
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
function esAlg(key) {
|
|
401
|
+
switch (key.algorithm.namedCurve) {
|
|
402
|
+
case 'P-256':
|
|
403
|
+
return 'ES256';
|
|
404
|
+
case 'P-384':
|
|
405
|
+
return 'ES384';
|
|
406
|
+
case 'P-521':
|
|
407
|
+
return 'ES512';
|
|
408
|
+
default:
|
|
409
|
+
throw new UnsupportedOperationError('unsupported EcKeyAlgorithm namedCurve', { cause: key });
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
function keyToJws(key) {
|
|
413
|
+
switch (key.algorithm.name) {
|
|
414
|
+
case 'RSA-PSS':
|
|
415
|
+
return psAlg(key);
|
|
416
|
+
case 'RSASSA-PKCS1-v1_5':
|
|
417
|
+
return rsAlg(key);
|
|
418
|
+
case 'ECDSA':
|
|
419
|
+
return esAlg(key);
|
|
420
|
+
case 'Ed25519':
|
|
421
|
+
case 'ML-DSA-44':
|
|
422
|
+
case 'ML-DSA-65':
|
|
423
|
+
case 'ML-DSA-87':
|
|
424
|
+
return key.algorithm.name;
|
|
425
|
+
case 'EdDSA':
|
|
426
|
+
return 'Ed25519';
|
|
427
|
+
default:
|
|
428
|
+
throw new UnsupportedOperationError('unsupported CryptoKey algorithm name', { cause: key });
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
function getClockSkew(client) {
|
|
432
|
+
const skew = client?.[clockSkew];
|
|
433
|
+
return typeof skew === 'number' && Number.isFinite(skew) ? skew : 0;
|
|
434
|
+
}
|
|
435
|
+
function getClockTolerance(client) {
|
|
436
|
+
const tolerance = client?.[clockTolerance];
|
|
437
|
+
return typeof tolerance === 'number' && Number.isFinite(tolerance) && Math.sign(tolerance) !== -1
|
|
438
|
+
? tolerance
|
|
439
|
+
: 30;
|
|
440
|
+
}
|
|
441
|
+
function epochTime() {
|
|
442
|
+
return Math.floor(Date.now() / 1000);
|
|
443
|
+
}
|
|
444
|
+
function assertAs(as) {
|
|
445
|
+
if (typeof as !== 'object' || as === null) {
|
|
446
|
+
throw CodedTypeError('"as" must be an object', ERR_INVALID_ARG_TYPE);
|
|
447
|
+
}
|
|
448
|
+
assertString(as.issuer, '"as.issuer"');
|
|
449
|
+
}
|
|
450
|
+
function assertClient(client) {
|
|
451
|
+
if (typeof client !== 'object' || client === null) {
|
|
452
|
+
throw CodedTypeError('"client" must be an object', ERR_INVALID_ARG_TYPE);
|
|
453
|
+
}
|
|
454
|
+
assertString(client.client_id, '"client.client_id"');
|
|
455
|
+
}
|
|
456
|
+
function formUrlEncode(token) {
|
|
457
|
+
return encodeURIComponent(token).replace(/(?:[-_.!~*'()]|%20)/g, (substring) => {
|
|
458
|
+
switch (substring) {
|
|
459
|
+
case '-':
|
|
460
|
+
case '_':
|
|
461
|
+
case '.':
|
|
462
|
+
case '!':
|
|
463
|
+
case '~':
|
|
464
|
+
case '*':
|
|
465
|
+
case "'":
|
|
466
|
+
case '(':
|
|
467
|
+
case ')':
|
|
468
|
+
return `%${substring.charCodeAt(0).toString(16).toUpperCase()}`;
|
|
469
|
+
case '%20':
|
|
470
|
+
return '+';
|
|
471
|
+
default:
|
|
472
|
+
throw new Error();
|
|
473
|
+
}
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
export function ClientSecretPost(clientSecret) {
|
|
477
|
+
assertString(clientSecret, '"clientSecret"');
|
|
478
|
+
return (_as, client, body, _headers) => {
|
|
479
|
+
body.set('client_id', client.client_id);
|
|
480
|
+
body.set('client_secret', clientSecret);
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
export function ClientSecretBasic(clientSecret) {
|
|
484
|
+
assertString(clientSecret, '"clientSecret"');
|
|
485
|
+
return (_as, client, _body, headers) => {
|
|
486
|
+
const username = formUrlEncode(client.client_id);
|
|
487
|
+
const password = formUrlEncode(clientSecret);
|
|
488
|
+
const credentials = btoa(`${username}:${password}`);
|
|
489
|
+
headers.set('authorization', `Basic ${credentials}`);
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
function clientAssertionPayload(as, client) {
|
|
493
|
+
const now = epochTime() + getClockSkew(client);
|
|
494
|
+
return {
|
|
495
|
+
jti: randomBytes(),
|
|
496
|
+
aud: as.issuer,
|
|
497
|
+
exp: now + 60,
|
|
498
|
+
iat: now,
|
|
499
|
+
nbf: now,
|
|
500
|
+
iss: client.client_id,
|
|
501
|
+
sub: client.client_id,
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
export function PrivateKeyJwt(clientPrivateKey, options) {
|
|
505
|
+
const { key, kid } = getKeyAndKid(clientPrivateKey);
|
|
506
|
+
assertPrivateKey(key, '"clientPrivateKey.key"');
|
|
507
|
+
return async (as, client, body, _headers) => {
|
|
508
|
+
const header = { alg: keyToJws(key), kid };
|
|
509
|
+
const payload = clientAssertionPayload(as, client);
|
|
510
|
+
options?.[modifyAssertion]?.(header, payload);
|
|
511
|
+
body.set('client_id', client.client_id);
|
|
512
|
+
body.set('client_assertion_type', 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer');
|
|
513
|
+
body.set('client_assertion', await signJwt(header, payload, key));
|
|
514
|
+
};
|
|
515
|
+
}
|
|
516
|
+
export function ClientSecretJwt(clientSecret, options) {
|
|
517
|
+
assertString(clientSecret, '"clientSecret"');
|
|
518
|
+
const modify = options?.[modifyAssertion];
|
|
519
|
+
let key;
|
|
520
|
+
return async (as, client, body, _headers) => {
|
|
521
|
+
key ||= await crypto.subtle.importKey('raw', buf(clientSecret), { hash: 'SHA-256', name: 'HMAC' }, false, ['sign']);
|
|
522
|
+
const header = { alg: 'HS256' };
|
|
523
|
+
const payload = clientAssertionPayload(as, client);
|
|
524
|
+
modify?.(header, payload);
|
|
525
|
+
const data = `${b64u(buf(JSON.stringify(header)))}.${b64u(buf(JSON.stringify(payload)))}`;
|
|
526
|
+
const hmac = await crypto.subtle.sign(key.algorithm, key, buf(data));
|
|
527
|
+
body.set('client_id', client.client_id);
|
|
528
|
+
body.set('client_assertion_type', 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer');
|
|
529
|
+
body.set('client_assertion', `${data}.${b64u(new Uint8Array(hmac))}`);
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
export function None() {
|
|
533
|
+
return (_as, client, body, _headers) => {
|
|
534
|
+
body.set('client_id', client.client_id);
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
export function TlsClientAuth() {
|
|
538
|
+
return None();
|
|
539
|
+
}
|
|
540
|
+
async function signJwt(header, payload, key) {
|
|
541
|
+
if (!key.usages.includes('sign')) {
|
|
542
|
+
throw CodedTypeError('CryptoKey instances used for signing assertions must include "sign" in their "usages"', ERR_INVALID_ARG_VALUE);
|
|
543
|
+
}
|
|
544
|
+
const input = `${b64u(buf(JSON.stringify(header)))}.${b64u(buf(JSON.stringify(payload)))}`;
|
|
545
|
+
const signature = b64u(await crypto.subtle.sign(keyToSubtle(key), key, buf(input)));
|
|
546
|
+
return `${input}.${signature}`;
|
|
547
|
+
}
|
|
548
|
+
export async function issueRequestObject(as, client, parameters, privateKey, options) {
|
|
549
|
+
assertAs(as);
|
|
550
|
+
assertClient(client);
|
|
551
|
+
parameters = new URLSearchParams(parameters);
|
|
552
|
+
const { key, kid } = getKeyAndKid(privateKey);
|
|
553
|
+
assertPrivateKey(key, '"privateKey.key"');
|
|
554
|
+
parameters.set('client_id', client.client_id);
|
|
555
|
+
const now = epochTime() + getClockSkew(client);
|
|
556
|
+
const claims = {
|
|
557
|
+
...Object.fromEntries(parameters.entries()),
|
|
558
|
+
jti: randomBytes(),
|
|
559
|
+
aud: as.issuer,
|
|
560
|
+
exp: now + 60,
|
|
561
|
+
iat: now,
|
|
562
|
+
nbf: now,
|
|
563
|
+
iss: client.client_id,
|
|
564
|
+
};
|
|
565
|
+
let resource;
|
|
566
|
+
if (parameters.has('resource') &&
|
|
567
|
+
(resource = parameters.getAll('resource')) &&
|
|
568
|
+
resource.length > 1) {
|
|
569
|
+
claims.resource = resource;
|
|
570
|
+
}
|
|
571
|
+
{
|
|
572
|
+
let value = parameters.get('max_age');
|
|
573
|
+
if (value !== null) {
|
|
574
|
+
claims.max_age = parseInt(value, 10);
|
|
575
|
+
assertNumber(claims.max_age, true, '"max_age" parameter');
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
{
|
|
579
|
+
let value = parameters.get('claims');
|
|
580
|
+
if (value !== null) {
|
|
581
|
+
try {
|
|
582
|
+
claims.claims = JSON.parse(value);
|
|
583
|
+
}
|
|
584
|
+
catch (cause) {
|
|
585
|
+
throw OPE('failed to parse the "claims" parameter as JSON', PARSE_ERROR, cause);
|
|
586
|
+
}
|
|
587
|
+
if (!isJsonObject(claims.claims)) {
|
|
588
|
+
throw CodedTypeError('"claims" parameter must be a JSON with a top level object', ERR_INVALID_ARG_VALUE);
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
{
|
|
593
|
+
let value = parameters.get('authorization_details');
|
|
594
|
+
if (value !== null) {
|
|
595
|
+
try {
|
|
596
|
+
claims.authorization_details = JSON.parse(value);
|
|
597
|
+
}
|
|
598
|
+
catch (cause) {
|
|
599
|
+
throw OPE('failed to parse the "authorization_details" parameter as JSON', PARSE_ERROR, cause);
|
|
600
|
+
}
|
|
601
|
+
if (!Array.isArray(claims.authorization_details)) {
|
|
602
|
+
throw CodedTypeError('"authorization_details" parameter must be a JSON with a top level array', ERR_INVALID_ARG_VALUE);
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
const header = {
|
|
607
|
+
alg: keyToJws(key),
|
|
608
|
+
typ: 'oauth-authz-req+jwt',
|
|
609
|
+
kid,
|
|
610
|
+
};
|
|
611
|
+
options?.[modifyAssertion]?.(header, claims);
|
|
612
|
+
return signJwt(header, claims, key);
|
|
613
|
+
}
|
|
614
|
+
let jwkCache;
|
|
615
|
+
async function getSetPublicJwkCache(key, alg) {
|
|
616
|
+
const { kty, e, n, x, y, crv, pub } = await crypto.subtle.exportKey('jwk', key);
|
|
617
|
+
const jwk = { kty, e, n, x, y, crv, pub };
|
|
618
|
+
if (kty === 'AKP')
|
|
619
|
+
jwk.alg = alg;
|
|
620
|
+
jwkCache.set(key, jwk);
|
|
621
|
+
return jwk;
|
|
622
|
+
}
|
|
623
|
+
async function publicJwk(key, alg) {
|
|
624
|
+
jwkCache ||= new WeakMap();
|
|
625
|
+
return jwkCache.get(key) || getSetPublicJwkCache(key, alg);
|
|
626
|
+
}
|
|
627
|
+
const URLParse = URL.parse
|
|
628
|
+
?
|
|
629
|
+
(url, base) => URL.parse(url, base)
|
|
630
|
+
: (url, base) => {
|
|
631
|
+
try {
|
|
632
|
+
return new URL(url, base);
|
|
633
|
+
}
|
|
634
|
+
catch {
|
|
635
|
+
return null;
|
|
636
|
+
}
|
|
637
|
+
};
|
|
638
|
+
export function checkProtocol(url, enforceHttps) {
|
|
639
|
+
if (enforceHttps && url.protocol !== 'https:') {
|
|
640
|
+
throw OPE('only requests to HTTPS are allowed', HTTP_REQUEST_FORBIDDEN, url);
|
|
641
|
+
}
|
|
642
|
+
if (url.protocol !== 'https:' && url.protocol !== 'http:') {
|
|
643
|
+
throw OPE('only HTTP and HTTPS requests are allowed', REQUEST_PROTOCOL_FORBIDDEN, url);
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
function validateEndpoint(value, endpoint, useMtlsAlias, enforceHttps) {
|
|
647
|
+
let url;
|
|
648
|
+
if (typeof value !== 'string' || !(url = URLParse(value))) {
|
|
649
|
+
throw OPE(`authorization server metadata does not contain a valid ${useMtlsAlias ? `"as.mtls_endpoint_aliases.${endpoint}"` : `"as.${endpoint}"`}`, value === undefined ? MISSING_SERVER_METADATA : INVALID_SERVER_METADATA, { attribute: useMtlsAlias ? `mtls_endpoint_aliases.${endpoint}` : endpoint });
|
|
650
|
+
}
|
|
651
|
+
checkProtocol(url, enforceHttps);
|
|
652
|
+
return url;
|
|
653
|
+
}
|
|
654
|
+
export function resolveEndpoint(as, endpoint, useMtlsAlias, enforceHttps) {
|
|
655
|
+
if (useMtlsAlias && as.mtls_endpoint_aliases && endpoint in as.mtls_endpoint_aliases) {
|
|
656
|
+
return validateEndpoint(as.mtls_endpoint_aliases[endpoint], endpoint, useMtlsAlias, enforceHttps);
|
|
657
|
+
}
|
|
658
|
+
return validateEndpoint(as[endpoint], endpoint, useMtlsAlias, enforceHttps);
|
|
659
|
+
}
|
|
660
|
+
export async function pushedAuthorizationRequest(as, client, clientAuthentication, parameters, options) {
|
|
661
|
+
assertAs(as);
|
|
662
|
+
assertClient(client);
|
|
663
|
+
const url = resolveEndpoint(as, 'pushed_authorization_request_endpoint', client.use_mtls_endpoint_aliases, options?.[allowInsecureRequests] !== true);
|
|
664
|
+
const body = new URLSearchParams(parameters);
|
|
665
|
+
body.set('client_id', client.client_id);
|
|
666
|
+
const headers = prepareHeaders(options?.headers);
|
|
667
|
+
headers.set('accept', 'application/json');
|
|
668
|
+
if (options?.DPoP !== undefined) {
|
|
669
|
+
assertDPoP(options.DPoP);
|
|
670
|
+
await options.DPoP.addProof(url, headers, 'POST');
|
|
671
|
+
}
|
|
672
|
+
const response = await authenticatedRequest(as, client, clientAuthentication, url, body, headers, options);
|
|
673
|
+
options?.DPoP?.cacheNonce(response);
|
|
674
|
+
return response;
|
|
675
|
+
}
|
|
676
|
+
class DPoPHandler {
|
|
677
|
+
#header;
|
|
678
|
+
#privateKey;
|
|
679
|
+
#publicKey;
|
|
680
|
+
#clockSkew;
|
|
681
|
+
#modifyAssertion;
|
|
682
|
+
#map;
|
|
683
|
+
#jkt;
|
|
684
|
+
constructor(client, keyPair, options) {
|
|
685
|
+
assertPrivateKey(keyPair?.privateKey, '"DPoP.privateKey"');
|
|
686
|
+
assertPublicKey(keyPair?.publicKey, '"DPoP.publicKey"');
|
|
687
|
+
if (!keyPair.publicKey.extractable) {
|
|
688
|
+
throw CodedTypeError('"DPoP.publicKey.extractable" must be true', ERR_INVALID_ARG_VALUE);
|
|
689
|
+
}
|
|
690
|
+
this.#modifyAssertion = options?.[modifyAssertion];
|
|
691
|
+
this.#clockSkew = getClockSkew(client);
|
|
692
|
+
this.#privateKey = keyPair.privateKey;
|
|
693
|
+
this.#publicKey = keyPair.publicKey;
|
|
694
|
+
branded.add(this);
|
|
695
|
+
}
|
|
696
|
+
#get(key) {
|
|
697
|
+
this.#map ||= new Map();
|
|
698
|
+
let item = this.#map.get(key);
|
|
699
|
+
if (item) {
|
|
700
|
+
this.#map.delete(key);
|
|
701
|
+
this.#map.set(key, item);
|
|
702
|
+
}
|
|
703
|
+
return item;
|
|
704
|
+
}
|
|
705
|
+
#set(key, val) {
|
|
706
|
+
this.#map ||= new Map();
|
|
707
|
+
this.#map.delete(key);
|
|
708
|
+
if (this.#map.size === 100) {
|
|
709
|
+
this.#map.delete(this.#map.keys().next().value);
|
|
710
|
+
}
|
|
711
|
+
this.#map.set(key, val);
|
|
712
|
+
}
|
|
713
|
+
async calculateThumbprint() {
|
|
714
|
+
if (!this.#jkt) {
|
|
715
|
+
const jwk = await crypto.subtle.exportKey('jwk', this.#publicKey);
|
|
716
|
+
this.#jkt ||= await calculateJwkThumbprint(jwk);
|
|
717
|
+
}
|
|
718
|
+
return this.#jkt;
|
|
719
|
+
}
|
|
720
|
+
async addProof(url, headers, htm, accessToken) {
|
|
721
|
+
const alg = keyToJws(this.#privateKey);
|
|
722
|
+
this.#header ||= {
|
|
723
|
+
alg,
|
|
724
|
+
typ: 'dpop+jwt',
|
|
725
|
+
jwk: await publicJwk(this.#publicKey, alg),
|
|
726
|
+
};
|
|
727
|
+
const nonce = this.#get(url.origin);
|
|
728
|
+
const now = epochTime() + this.#clockSkew;
|
|
729
|
+
const payload = {
|
|
730
|
+
iat: now,
|
|
731
|
+
jti: randomBytes(),
|
|
732
|
+
htm,
|
|
733
|
+
nonce,
|
|
734
|
+
htu: `${url.origin}${url.pathname}`,
|
|
735
|
+
ath: accessToken ? b64u(await crypto.subtle.digest('SHA-256', buf(accessToken))) : undefined,
|
|
736
|
+
};
|
|
737
|
+
this.#modifyAssertion?.(this.#header, payload);
|
|
738
|
+
headers.set('dpop', await signJwt(this.#header, payload, this.#privateKey));
|
|
739
|
+
}
|
|
740
|
+
cacheNonce(response) {
|
|
741
|
+
try {
|
|
742
|
+
const nonce = response.headers.get('dpop-nonce');
|
|
743
|
+
if (nonce) {
|
|
744
|
+
this.#set(new URL(response.url).origin, nonce);
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
catch { }
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
export function isDPoPNonceError(err) {
|
|
751
|
+
if (err instanceof WWWAuthenticateChallengeError) {
|
|
752
|
+
const { 0: challenge, length } = err.cause;
|
|
753
|
+
return (length === 1 && challenge.scheme === 'dpop' && challenge.parameters.error === 'use_dpop_nonce');
|
|
754
|
+
}
|
|
755
|
+
if (err instanceof ResponseBodyError) {
|
|
756
|
+
return err.error === 'use_dpop_nonce';
|
|
757
|
+
}
|
|
758
|
+
return false;
|
|
759
|
+
}
|
|
760
|
+
export function DPoP(client, keyPair, options) {
|
|
761
|
+
return new DPoPHandler(client, keyPair, options);
|
|
762
|
+
}
|
|
763
|
+
export class ResponseBodyError extends Error {
|
|
764
|
+
cause;
|
|
765
|
+
code;
|
|
766
|
+
error;
|
|
767
|
+
status;
|
|
768
|
+
error_description;
|
|
769
|
+
response;
|
|
770
|
+
constructor(message, options) {
|
|
771
|
+
super(message, options);
|
|
772
|
+
this.name = this.constructor.name;
|
|
773
|
+
this.code = RESPONSE_BODY_ERROR;
|
|
774
|
+
this.cause = options.cause;
|
|
775
|
+
this.error = options.cause.error;
|
|
776
|
+
this.status = options.response.status;
|
|
777
|
+
this.error_description = options.cause.error_description;
|
|
778
|
+
Object.defineProperty(this, 'response', { enumerable: false, value: options.response });
|
|
779
|
+
Error.captureStackTrace?.(this, this.constructor);
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
export class AuthorizationResponseError extends Error {
|
|
783
|
+
cause;
|
|
784
|
+
code;
|
|
785
|
+
error;
|
|
786
|
+
error_description;
|
|
787
|
+
constructor(message, options) {
|
|
788
|
+
super(message, options);
|
|
789
|
+
this.name = this.constructor.name;
|
|
790
|
+
this.code = AUTHORIZATION_RESPONSE_ERROR;
|
|
791
|
+
this.cause = options.cause;
|
|
792
|
+
this.error = options.cause.get('error');
|
|
793
|
+
this.error_description = options.cause.get('error_description') ?? undefined;
|
|
794
|
+
Error.captureStackTrace?.(this, this.constructor);
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
export class WWWAuthenticateChallengeError extends Error {
|
|
798
|
+
cause;
|
|
799
|
+
code;
|
|
800
|
+
response;
|
|
801
|
+
status;
|
|
802
|
+
constructor(message, options) {
|
|
803
|
+
super(message, options);
|
|
804
|
+
this.name = this.constructor.name;
|
|
805
|
+
this.code = WWW_AUTHENTICATE_CHALLENGE;
|
|
806
|
+
this.cause = options.cause;
|
|
807
|
+
this.status = options.response.status;
|
|
808
|
+
this.response = options.response;
|
|
809
|
+
Object.defineProperty(this, 'response', { enumerable: false });
|
|
810
|
+
Error.captureStackTrace?.(this, this.constructor);
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
const tokenMatch = "[a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+";
|
|
814
|
+
const token68Match = '[a-zA-Z0-9\\-\\._\\~\\+\\/]+[=]{0,2}';
|
|
815
|
+
const quotedMatch = '"((?:[^"\\\\]|\\\\.)*)"';
|
|
816
|
+
const quotedParamMatcher = '(' + tokenMatch + ')\\s*=\\s*' + quotedMatch;
|
|
817
|
+
const paramMatcher = '(' + tokenMatch + ')\\s*=\\s*(' + tokenMatch + ')';
|
|
818
|
+
const schemeRE = new RegExp('^[,\\s]*(' + tokenMatch + ')\\s(.*)');
|
|
819
|
+
const quotedParamRE = new RegExp('^[,\\s]*' + quotedParamMatcher + '[,\\s]*(.*)');
|
|
820
|
+
const unquotedParamRE = new RegExp('^[,\\s]*' + paramMatcher + '[,\\s]*(.*)');
|
|
821
|
+
const token68ParamRE = new RegExp('^(' + token68Match + ')(?:$|[,\\s])(.*)');
|
|
822
|
+
function parseWwwAuthenticateChallenges(response) {
|
|
823
|
+
if (!looseInstanceOf(response, Response)) {
|
|
824
|
+
throw CodedTypeError('"response" must be an instance of Response', ERR_INVALID_ARG_TYPE);
|
|
825
|
+
}
|
|
826
|
+
const header = response.headers.get('www-authenticate');
|
|
827
|
+
if (header === null) {
|
|
828
|
+
return undefined;
|
|
829
|
+
}
|
|
830
|
+
const challenges = [];
|
|
831
|
+
let rest = header;
|
|
832
|
+
while (rest) {
|
|
833
|
+
let match = rest.match(schemeRE);
|
|
834
|
+
const scheme = match?.['1'].toLowerCase();
|
|
835
|
+
rest = match?.['2'];
|
|
836
|
+
if (!scheme) {
|
|
837
|
+
return undefined;
|
|
838
|
+
}
|
|
839
|
+
const parameters = {};
|
|
840
|
+
let token68;
|
|
841
|
+
while (rest) {
|
|
842
|
+
let key;
|
|
843
|
+
let value;
|
|
844
|
+
if ((match = rest.match(quotedParamRE))) {
|
|
845
|
+
;
|
|
846
|
+
[, key, value, rest] = match;
|
|
847
|
+
if (value.includes('\\')) {
|
|
848
|
+
try {
|
|
849
|
+
value = JSON.parse(`"${value}"`);
|
|
850
|
+
}
|
|
851
|
+
catch { }
|
|
852
|
+
}
|
|
853
|
+
parameters[key.toLowerCase()] = value;
|
|
854
|
+
continue;
|
|
855
|
+
}
|
|
856
|
+
if ((match = rest.match(unquotedParamRE))) {
|
|
857
|
+
;
|
|
858
|
+
[, key, value, rest] = match;
|
|
859
|
+
parameters[key.toLowerCase()] = value;
|
|
860
|
+
continue;
|
|
861
|
+
}
|
|
862
|
+
if ((match = rest.match(token68ParamRE))) {
|
|
863
|
+
if (Object.keys(parameters).length) {
|
|
864
|
+
break;
|
|
865
|
+
}
|
|
866
|
+
;
|
|
867
|
+
[, token68, rest] = match;
|
|
868
|
+
break;
|
|
869
|
+
}
|
|
870
|
+
return undefined;
|
|
871
|
+
}
|
|
872
|
+
const challenge = { scheme, parameters };
|
|
873
|
+
if (token68) {
|
|
874
|
+
challenge.token68 = token68;
|
|
875
|
+
}
|
|
876
|
+
challenges.push(challenge);
|
|
877
|
+
}
|
|
878
|
+
if (!challenges.length) {
|
|
879
|
+
return undefined;
|
|
880
|
+
}
|
|
881
|
+
return challenges;
|
|
882
|
+
}
|
|
883
|
+
export async function processPushedAuthorizationResponse(as, client, response) {
|
|
884
|
+
assertAs(as);
|
|
885
|
+
assertClient(client);
|
|
886
|
+
if (!looseInstanceOf(response, Response)) {
|
|
887
|
+
throw CodedTypeError('"response" must be an instance of Response', ERR_INVALID_ARG_TYPE);
|
|
888
|
+
}
|
|
889
|
+
await checkOAuthBodyError(response, 201, 'Pushed Authorization Request Endpoint');
|
|
890
|
+
assertReadableResponse(response);
|
|
891
|
+
const json = await getResponseJsonBody(response);
|
|
892
|
+
assertString(json.request_uri, '"response" body "request_uri" property', INVALID_RESPONSE, {
|
|
893
|
+
body: json,
|
|
894
|
+
});
|
|
895
|
+
let expiresIn = typeof json.expires_in !== 'number' ? parseFloat(json.expires_in) : json.expires_in;
|
|
896
|
+
assertNumber(expiresIn, true, '"response" body "expires_in" property', INVALID_RESPONSE, {
|
|
897
|
+
body: json,
|
|
898
|
+
});
|
|
899
|
+
json.expires_in = expiresIn;
|
|
900
|
+
return json;
|
|
901
|
+
}
|
|
902
|
+
async function parseOAuthResponseErrorBody(response) {
|
|
903
|
+
if (response.status > 399 && response.status < 500) {
|
|
904
|
+
assertReadableResponse(response);
|
|
905
|
+
assertApplicationJson(response);
|
|
906
|
+
try {
|
|
907
|
+
const json = await response.clone().json();
|
|
908
|
+
if (isJsonObject(json) && typeof json.error === 'string' && json.error.length) {
|
|
909
|
+
return json;
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
catch { }
|
|
913
|
+
}
|
|
914
|
+
return undefined;
|
|
915
|
+
}
|
|
916
|
+
async function checkOAuthBodyError(response, expected, label) {
|
|
917
|
+
if (response.status !== expected) {
|
|
918
|
+
checkAuthenticationChallenges(response);
|
|
919
|
+
let err;
|
|
920
|
+
if ((err = await parseOAuthResponseErrorBody(response))) {
|
|
921
|
+
await response.body?.cancel();
|
|
922
|
+
throw new ResponseBodyError('server responded with an error in the response body', {
|
|
923
|
+
cause: err,
|
|
924
|
+
response,
|
|
925
|
+
});
|
|
926
|
+
}
|
|
927
|
+
throw OPE(`"response" is not a conform ${label} response (unexpected HTTP status code)`, RESPONSE_IS_NOT_CONFORM, response);
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
function assertDPoP(option) {
|
|
931
|
+
if (!branded.has(option)) {
|
|
932
|
+
throw CodedTypeError('"options.DPoP" is not a valid DPoPHandle', ERR_INVALID_ARG_VALUE);
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
async function resourceRequest(accessToken, method, url, headers, body, options) {
|
|
936
|
+
assertString(accessToken, '"accessToken"');
|
|
937
|
+
if (!(url instanceof URL)) {
|
|
938
|
+
throw CodedTypeError('"url" must be an instance of URL', ERR_INVALID_ARG_TYPE);
|
|
939
|
+
}
|
|
940
|
+
checkProtocol(url, options?.[allowInsecureRequests] !== true);
|
|
941
|
+
headers = prepareHeaders(headers);
|
|
942
|
+
if (options?.DPoP) {
|
|
943
|
+
assertDPoP(options.DPoP);
|
|
944
|
+
await options.DPoP.addProof(url, headers, method.toUpperCase(), accessToken);
|
|
945
|
+
}
|
|
946
|
+
headers.set('authorization', `${headers.has('dpop') ? 'DPoP' : 'Bearer'} ${accessToken}`);
|
|
947
|
+
const response = await (options?.[customFetch] || fetch)(url.href, {
|
|
948
|
+
body,
|
|
949
|
+
headers: Object.fromEntries(headers.entries()),
|
|
950
|
+
method,
|
|
951
|
+
redirect: 'manual',
|
|
952
|
+
signal: signal(url, options?.signal),
|
|
953
|
+
});
|
|
954
|
+
options?.DPoP?.cacheNonce(response);
|
|
955
|
+
return response;
|
|
956
|
+
}
|
|
957
|
+
export async function protectedResourceRequest(accessToken, method, url, headers, body, options) {
|
|
958
|
+
const response = await resourceRequest(accessToken, method, url, headers, body, options);
|
|
959
|
+
checkAuthenticationChallenges(response);
|
|
960
|
+
return response;
|
|
961
|
+
}
|
|
962
|
+
export async function userInfoRequest(as, client, accessToken, options) {
|
|
963
|
+
assertAs(as);
|
|
964
|
+
assertClient(client);
|
|
965
|
+
const url = resolveEndpoint(as, 'userinfo_endpoint', client.use_mtls_endpoint_aliases, options?.[allowInsecureRequests] !== true);
|
|
966
|
+
const headers = prepareHeaders(options?.headers);
|
|
967
|
+
if (client.userinfo_signed_response_alg) {
|
|
968
|
+
headers.set('accept', 'application/jwt');
|
|
969
|
+
}
|
|
970
|
+
else {
|
|
971
|
+
headers.set('accept', 'application/json');
|
|
972
|
+
headers.append('accept', 'application/jwt');
|
|
973
|
+
}
|
|
974
|
+
return resourceRequest(accessToken, 'GET', url, headers, null, {
|
|
975
|
+
...options,
|
|
976
|
+
[clockSkew]: getClockSkew(client),
|
|
977
|
+
});
|
|
978
|
+
}
|
|
979
|
+
let jwksMap;
|
|
980
|
+
function setJwksCache(as, jwks, uat, cache) {
|
|
981
|
+
jwksMap ||= new WeakMap();
|
|
982
|
+
jwksMap.set(as, {
|
|
983
|
+
jwks,
|
|
984
|
+
uat,
|
|
985
|
+
get age() {
|
|
986
|
+
return epochTime() - this.uat;
|
|
987
|
+
},
|
|
988
|
+
});
|
|
989
|
+
if (cache) {
|
|
990
|
+
Object.assign(cache, { jwks: structuredClone(jwks), uat });
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
function isFreshJwksCache(input) {
|
|
994
|
+
if (typeof input !== 'object' || input === null) {
|
|
995
|
+
return false;
|
|
996
|
+
}
|
|
997
|
+
if (!('uat' in input) || typeof input.uat !== 'number' || epochTime() - input.uat >= 300) {
|
|
998
|
+
return false;
|
|
999
|
+
}
|
|
1000
|
+
if (!('jwks' in input) ||
|
|
1001
|
+
!isJsonObject(input.jwks) ||
|
|
1002
|
+
!Array.isArray(input.jwks.keys) ||
|
|
1003
|
+
!Array.prototype.every.call(input.jwks.keys, isJsonObject)) {
|
|
1004
|
+
return false;
|
|
1005
|
+
}
|
|
1006
|
+
return true;
|
|
1007
|
+
}
|
|
1008
|
+
function clearJwksCache(as, cache) {
|
|
1009
|
+
jwksMap?.delete(as);
|
|
1010
|
+
delete cache?.jwks;
|
|
1011
|
+
delete cache?.uat;
|
|
1012
|
+
}
|
|
1013
|
+
async function getPublicSigKeyFromIssuerJwksUri(as, options, header) {
|
|
1014
|
+
const { alg, kid } = header;
|
|
1015
|
+
checkSupportedJwsAlg(header);
|
|
1016
|
+
if (!jwksMap?.has(as) && isFreshJwksCache(options?.[jwksCache])) {
|
|
1017
|
+
setJwksCache(as, options?.[jwksCache].jwks, options?.[jwksCache].uat);
|
|
1018
|
+
}
|
|
1019
|
+
let jwks;
|
|
1020
|
+
let age;
|
|
1021
|
+
if (jwksMap?.has(as)) {
|
|
1022
|
+
;
|
|
1023
|
+
({ jwks, age } = jwksMap.get(as));
|
|
1024
|
+
if (age >= 300) {
|
|
1025
|
+
clearJwksCache(as, options?.[jwksCache]);
|
|
1026
|
+
return getPublicSigKeyFromIssuerJwksUri(as, options, header);
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
else {
|
|
1030
|
+
jwks = await jwksRequest(as, options).then(processJwksResponse);
|
|
1031
|
+
age = 0;
|
|
1032
|
+
setJwksCache(as, jwks, epochTime(), options?.[jwksCache]);
|
|
1033
|
+
}
|
|
1034
|
+
let kty;
|
|
1035
|
+
switch (alg.slice(0, 2)) {
|
|
1036
|
+
case 'RS':
|
|
1037
|
+
case 'PS':
|
|
1038
|
+
kty = 'RSA';
|
|
1039
|
+
break;
|
|
1040
|
+
case 'ES':
|
|
1041
|
+
kty = 'EC';
|
|
1042
|
+
break;
|
|
1043
|
+
case 'Ed':
|
|
1044
|
+
kty = 'OKP';
|
|
1045
|
+
break;
|
|
1046
|
+
case 'ML':
|
|
1047
|
+
kty = 'AKP';
|
|
1048
|
+
break;
|
|
1049
|
+
default:
|
|
1050
|
+
throw new UnsupportedOperationError('unsupported JWS algorithm', { cause: { alg } });
|
|
1051
|
+
}
|
|
1052
|
+
const candidates = jwks.keys.filter((jwk) => {
|
|
1053
|
+
if (jwk.kty !== kty) {
|
|
1054
|
+
return false;
|
|
1055
|
+
}
|
|
1056
|
+
if (kid !== undefined && kid !== jwk.kid) {
|
|
1057
|
+
return false;
|
|
1058
|
+
}
|
|
1059
|
+
if (jwk.alg !== undefined && alg !== jwk.alg) {
|
|
1060
|
+
return false;
|
|
1061
|
+
}
|
|
1062
|
+
if (jwk.use !== undefined && jwk.use !== 'sig') {
|
|
1063
|
+
return false;
|
|
1064
|
+
}
|
|
1065
|
+
if (jwk.key_ops?.includes('verify') === false) {
|
|
1066
|
+
return false;
|
|
1067
|
+
}
|
|
1068
|
+
switch (true) {
|
|
1069
|
+
case alg === 'ES256' && jwk.crv !== 'P-256':
|
|
1070
|
+
case alg === 'ES384' && jwk.crv !== 'P-384':
|
|
1071
|
+
case alg === 'ES512' && jwk.crv !== 'P-521':
|
|
1072
|
+
case alg === 'Ed25519' && jwk.crv !== 'Ed25519':
|
|
1073
|
+
case alg === 'EdDSA' && jwk.crv !== 'Ed25519':
|
|
1074
|
+
return false;
|
|
1075
|
+
}
|
|
1076
|
+
return true;
|
|
1077
|
+
});
|
|
1078
|
+
const { 0: jwk, length } = candidates;
|
|
1079
|
+
if (!length) {
|
|
1080
|
+
if (age >= 60) {
|
|
1081
|
+
clearJwksCache(as, options?.[jwksCache]);
|
|
1082
|
+
return getPublicSigKeyFromIssuerJwksUri(as, options, header);
|
|
1083
|
+
}
|
|
1084
|
+
throw OPE('error when selecting a JWT verification key, no applicable keys found', KEY_SELECTION, { header, candidates, jwks_uri: new URL(as.jwks_uri) });
|
|
1085
|
+
}
|
|
1086
|
+
if (length !== 1) {
|
|
1087
|
+
throw OPE('error when selecting a JWT verification key, multiple applicable keys found, a "kid" JWT Header Parameter is required', KEY_SELECTION, { header, candidates, jwks_uri: new URL(as.jwks_uri) });
|
|
1088
|
+
}
|
|
1089
|
+
return importJwk(alg, jwk);
|
|
1090
|
+
}
|
|
1091
|
+
export const skipSubjectCheck = Symbol();
|
|
1092
|
+
export function getContentType(input) {
|
|
1093
|
+
return input.headers.get('content-type')?.split(';')[0];
|
|
1094
|
+
}
|
|
1095
|
+
export async function processUserInfoResponse(as, client, expectedSubject, response, options) {
|
|
1096
|
+
assertAs(as);
|
|
1097
|
+
assertClient(client);
|
|
1098
|
+
if (!looseInstanceOf(response, Response)) {
|
|
1099
|
+
throw CodedTypeError('"response" must be an instance of Response', ERR_INVALID_ARG_TYPE);
|
|
1100
|
+
}
|
|
1101
|
+
checkAuthenticationChallenges(response);
|
|
1102
|
+
if (response.status !== 200) {
|
|
1103
|
+
throw OPE('"response" is not a conform UserInfo Endpoint response (unexpected HTTP status code)', RESPONSE_IS_NOT_CONFORM, response);
|
|
1104
|
+
}
|
|
1105
|
+
assertReadableResponse(response);
|
|
1106
|
+
let json;
|
|
1107
|
+
if (getContentType(response) === 'application/jwt') {
|
|
1108
|
+
const { claims, jwt } = await validateJwt(await response.text(), checkSigningAlgorithm.bind(undefined, client.userinfo_signed_response_alg, as.userinfo_signing_alg_values_supported, undefined), getClockSkew(client), getClockTolerance(client), options?.[jweDecrypt])
|
|
1109
|
+
.then(validateOptionalAudience.bind(undefined, client.client_id))
|
|
1110
|
+
.then(validateOptionalIssuer.bind(undefined, as));
|
|
1111
|
+
jwtRefs.set(response, jwt);
|
|
1112
|
+
json = claims;
|
|
1113
|
+
}
|
|
1114
|
+
else {
|
|
1115
|
+
if (client.userinfo_signed_response_alg) {
|
|
1116
|
+
throw OPE('JWT UserInfo Response expected', JWT_USERINFO_EXPECTED, response);
|
|
1117
|
+
}
|
|
1118
|
+
json = await getResponseJsonBody(response);
|
|
1119
|
+
}
|
|
1120
|
+
assertString(json.sub, '"response" body "sub" property', INVALID_RESPONSE, { body: json });
|
|
1121
|
+
switch (expectedSubject) {
|
|
1122
|
+
case skipSubjectCheck:
|
|
1123
|
+
break;
|
|
1124
|
+
default:
|
|
1125
|
+
assertString(expectedSubject, '"expectedSubject"');
|
|
1126
|
+
if (json.sub !== expectedSubject) {
|
|
1127
|
+
throw OPE('unexpected "response" body "sub" property value', JSON_ATTRIBUTE_COMPARISON, {
|
|
1128
|
+
expected: expectedSubject,
|
|
1129
|
+
body: json,
|
|
1130
|
+
attribute: 'sub',
|
|
1131
|
+
});
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
return json;
|
|
1135
|
+
}
|
|
1136
|
+
async function authenticatedRequest(as, client, clientAuthentication, url, body, headers, options) {
|
|
1137
|
+
await clientAuthentication(as, client, body, headers);
|
|
1138
|
+
headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
|
|
1139
|
+
return (options?.[customFetch] || fetch)(url.href, {
|
|
1140
|
+
body,
|
|
1141
|
+
headers: Object.fromEntries(headers.entries()),
|
|
1142
|
+
method: 'POST',
|
|
1143
|
+
redirect: 'manual',
|
|
1144
|
+
signal: signal(url, options?.signal),
|
|
1145
|
+
});
|
|
1146
|
+
}
|
|
1147
|
+
async function tokenEndpointRequest(as, client, clientAuthentication, grantType, parameters, options) {
|
|
1148
|
+
const url = resolveEndpoint(as, 'token_endpoint', client.use_mtls_endpoint_aliases, options?.[allowInsecureRequests] !== true);
|
|
1149
|
+
parameters.set('grant_type', grantType);
|
|
1150
|
+
const headers = prepareHeaders(options?.headers);
|
|
1151
|
+
headers.set('accept', 'application/json');
|
|
1152
|
+
if (options?.DPoP !== undefined) {
|
|
1153
|
+
assertDPoP(options.DPoP);
|
|
1154
|
+
await options.DPoP.addProof(url, headers, 'POST');
|
|
1155
|
+
}
|
|
1156
|
+
const response = await authenticatedRequest(as, client, clientAuthentication, url, parameters, headers, options);
|
|
1157
|
+
options?.DPoP?.cacheNonce(response);
|
|
1158
|
+
return response;
|
|
1159
|
+
}
|
|
1160
|
+
export async function refreshTokenGrantRequest(as, client, clientAuthentication, refreshToken, options) {
|
|
1161
|
+
assertAs(as);
|
|
1162
|
+
assertClient(client);
|
|
1163
|
+
assertString(refreshToken, '"refreshToken"');
|
|
1164
|
+
const parameters = new URLSearchParams(options?.additionalParameters);
|
|
1165
|
+
parameters.set('refresh_token', refreshToken);
|
|
1166
|
+
return tokenEndpointRequest(as, client, clientAuthentication, 'refresh_token', parameters, options);
|
|
1167
|
+
}
|
|
1168
|
+
const idTokenClaims = new WeakMap();
|
|
1169
|
+
const jwtRefs = new WeakMap();
|
|
1170
|
+
export function getValidatedIdTokenClaims(ref) {
|
|
1171
|
+
if (!ref.id_token) {
|
|
1172
|
+
return undefined;
|
|
1173
|
+
}
|
|
1174
|
+
const claims = idTokenClaims.get(ref);
|
|
1175
|
+
if (!claims) {
|
|
1176
|
+
throw CodedTypeError('"ref" was already garbage collected or did not resolve from the proper sources', ERR_INVALID_ARG_VALUE);
|
|
1177
|
+
}
|
|
1178
|
+
return claims;
|
|
1179
|
+
}
|
|
1180
|
+
export async function validateApplicationLevelSignature(as, ref, options) {
|
|
1181
|
+
assertAs(as);
|
|
1182
|
+
if (!jwtRefs.has(ref)) {
|
|
1183
|
+
throw CodedTypeError('"ref" does not contain a processed JWT Response to verify the signature of', ERR_INVALID_ARG_VALUE);
|
|
1184
|
+
}
|
|
1185
|
+
const { 0: protectedHeader, 1: payload, 2: encodedSignature } = jwtRefs.get(ref).split('.');
|
|
1186
|
+
const header = JSON.parse(buf(b64u(protectedHeader)));
|
|
1187
|
+
if (header.alg.startsWith('HS')) {
|
|
1188
|
+
throw new UnsupportedOperationError('unsupported JWS algorithm', { cause: { alg: header.alg } });
|
|
1189
|
+
}
|
|
1190
|
+
let key;
|
|
1191
|
+
key = await getPublicSigKeyFromIssuerJwksUri(as, options, header);
|
|
1192
|
+
await validateJwsSignature(protectedHeader, payload, key, b64u(encodedSignature));
|
|
1193
|
+
}
|
|
1194
|
+
async function processGenericAccessTokenResponse(as, client, response, additionalRequiredIdTokenClaims, decryptFn, recognizedTokenTypes) {
|
|
1195
|
+
assertAs(as);
|
|
1196
|
+
assertClient(client);
|
|
1197
|
+
if (!looseInstanceOf(response, Response)) {
|
|
1198
|
+
throw CodedTypeError('"response" must be an instance of Response', ERR_INVALID_ARG_TYPE);
|
|
1199
|
+
}
|
|
1200
|
+
await checkOAuthBodyError(response, 200, 'Token Endpoint');
|
|
1201
|
+
assertReadableResponse(response);
|
|
1202
|
+
const json = await getResponseJsonBody(response);
|
|
1203
|
+
assertString(json.access_token, '"response" body "access_token" property', INVALID_RESPONSE, {
|
|
1204
|
+
body: json,
|
|
1205
|
+
});
|
|
1206
|
+
assertString(json.token_type, '"response" body "token_type" property', INVALID_RESPONSE, {
|
|
1207
|
+
body: json,
|
|
1208
|
+
});
|
|
1209
|
+
json.token_type = json.token_type.toLowerCase();
|
|
1210
|
+
if (json.expires_in !== undefined) {
|
|
1211
|
+
let expiresIn = typeof json.expires_in !== 'number' ? parseFloat(json.expires_in) : json.expires_in;
|
|
1212
|
+
assertNumber(expiresIn, true, '"response" body "expires_in" property', INVALID_RESPONSE, {
|
|
1213
|
+
body: json,
|
|
1214
|
+
});
|
|
1215
|
+
json.expires_in = expiresIn;
|
|
1216
|
+
}
|
|
1217
|
+
if (json.refresh_token !== undefined) {
|
|
1218
|
+
assertString(json.refresh_token, '"response" body "refresh_token" property', INVALID_RESPONSE, {
|
|
1219
|
+
body: json,
|
|
1220
|
+
});
|
|
1221
|
+
}
|
|
1222
|
+
if (json.scope !== undefined && typeof json.scope !== 'string') {
|
|
1223
|
+
throw OPE('"response" body "scope" property must be a string', INVALID_RESPONSE, { body: json });
|
|
1224
|
+
}
|
|
1225
|
+
if (json.id_token !== undefined) {
|
|
1226
|
+
assertString(json.id_token, '"response" body "id_token" property', INVALID_RESPONSE, {
|
|
1227
|
+
body: json,
|
|
1228
|
+
});
|
|
1229
|
+
const requiredClaims = ['aud', 'exp', 'iat', 'iss', 'sub'];
|
|
1230
|
+
if (client.require_auth_time === true) {
|
|
1231
|
+
requiredClaims.push('auth_time');
|
|
1232
|
+
}
|
|
1233
|
+
if (client.default_max_age !== undefined) {
|
|
1234
|
+
assertNumber(client.default_max_age, true, '"client.default_max_age"');
|
|
1235
|
+
requiredClaims.push('auth_time');
|
|
1236
|
+
}
|
|
1237
|
+
if (additionalRequiredIdTokenClaims?.length) {
|
|
1238
|
+
requiredClaims.push(...additionalRequiredIdTokenClaims);
|
|
1239
|
+
}
|
|
1240
|
+
const { claims, jwt } = await validateJwt(json.id_token, checkSigningAlgorithm.bind(undefined, client.id_token_signed_response_alg, as.id_token_signing_alg_values_supported, 'RS256'), getClockSkew(client), getClockTolerance(client), decryptFn)
|
|
1241
|
+
.then(validatePresence.bind(undefined, requiredClaims))
|
|
1242
|
+
.then(validateIssuer.bind(undefined, as))
|
|
1243
|
+
.then(validateAudience.bind(undefined, client.client_id));
|
|
1244
|
+
if (Array.isArray(claims.aud) && claims.aud.length !== 1) {
|
|
1245
|
+
if (claims.azp === undefined) {
|
|
1246
|
+
throw OPE('ID Token "aud" (audience) claim includes additional untrusted audiences', JWT_CLAIM_COMPARISON, { claims, claim: 'aud' });
|
|
1247
|
+
}
|
|
1248
|
+
if (claims.azp !== client.client_id) {
|
|
1249
|
+
throw OPE('unexpected ID Token "azp" (authorized party) claim value', JWT_CLAIM_COMPARISON, { expected: client.client_id, claims, claim: 'azp' });
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
if (claims.auth_time !== undefined) {
|
|
1253
|
+
assertNumber(claims.auth_time, true, 'ID Token "auth_time" (authentication time)', INVALID_RESPONSE, { claims });
|
|
1254
|
+
}
|
|
1255
|
+
jwtRefs.set(response, jwt);
|
|
1256
|
+
idTokenClaims.set(json, claims);
|
|
1257
|
+
}
|
|
1258
|
+
if (recognizedTokenTypes?.[json.token_type] !== undefined) {
|
|
1259
|
+
recognizedTokenTypes[json.token_type](response, json);
|
|
1260
|
+
}
|
|
1261
|
+
else if (json.token_type !== 'dpop' && json.token_type !== 'bearer') {
|
|
1262
|
+
throw new UnsupportedOperationError('unsupported `token_type` value', { cause: { body: json } });
|
|
1263
|
+
}
|
|
1264
|
+
return json;
|
|
1265
|
+
}
|
|
1266
|
+
function checkAuthenticationChallenges(response) {
|
|
1267
|
+
let challenges;
|
|
1268
|
+
if ((challenges = parseWwwAuthenticateChallenges(response))) {
|
|
1269
|
+
throw new WWWAuthenticateChallengeError('server responded with a challenge in the WWW-Authenticate HTTP Header', { cause: challenges, response });
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
export async function processRefreshTokenResponse(as, client, response, options) {
|
|
1273
|
+
return processGenericAccessTokenResponse(as, client, response, undefined, options?.[jweDecrypt], options?.recognizedTokenTypes);
|
|
1274
|
+
}
|
|
1275
|
+
function validateOptionalAudience(expected, result) {
|
|
1276
|
+
if (result.claims.aud !== undefined) {
|
|
1277
|
+
return validateAudience(expected, result);
|
|
1278
|
+
}
|
|
1279
|
+
return result;
|
|
1280
|
+
}
|
|
1281
|
+
function validateAudience(expected, result) {
|
|
1282
|
+
if (Array.isArray(result.claims.aud)) {
|
|
1283
|
+
if (!result.claims.aud.includes(expected)) {
|
|
1284
|
+
throw OPE('unexpected JWT "aud" (audience) claim value', JWT_CLAIM_COMPARISON, {
|
|
1285
|
+
expected,
|
|
1286
|
+
claims: result.claims,
|
|
1287
|
+
claim: 'aud',
|
|
1288
|
+
});
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
else if (result.claims.aud !== expected) {
|
|
1292
|
+
throw OPE('unexpected JWT "aud" (audience) claim value', JWT_CLAIM_COMPARISON, {
|
|
1293
|
+
expected,
|
|
1294
|
+
claims: result.claims,
|
|
1295
|
+
claim: 'aud',
|
|
1296
|
+
});
|
|
1297
|
+
}
|
|
1298
|
+
return result;
|
|
1299
|
+
}
|
|
1300
|
+
function validateOptionalIssuer(as, result) {
|
|
1301
|
+
if (result.claims.iss !== undefined) {
|
|
1302
|
+
return validateIssuer(as, result);
|
|
1303
|
+
}
|
|
1304
|
+
return result;
|
|
1305
|
+
}
|
|
1306
|
+
function validateIssuer(as, result) {
|
|
1307
|
+
const expected = as[_expectedIssuer]?.(result) ?? as.issuer;
|
|
1308
|
+
if (result.claims.iss !== expected) {
|
|
1309
|
+
throw OPE('unexpected JWT "iss" (issuer) claim value', JWT_CLAIM_COMPARISON, {
|
|
1310
|
+
expected,
|
|
1311
|
+
claims: result.claims,
|
|
1312
|
+
claim: 'iss',
|
|
1313
|
+
});
|
|
1314
|
+
}
|
|
1315
|
+
return result;
|
|
1316
|
+
}
|
|
1317
|
+
const branded = new WeakSet();
|
|
1318
|
+
function brand(searchParams) {
|
|
1319
|
+
branded.add(searchParams);
|
|
1320
|
+
return searchParams;
|
|
1321
|
+
}
|
|
1322
|
+
export const nopkce = Symbol();
|
|
1323
|
+
export async function authorizationCodeGrantRequest(as, client, clientAuthentication, callbackParameters, redirectUri, codeVerifier, options) {
|
|
1324
|
+
assertAs(as);
|
|
1325
|
+
assertClient(client);
|
|
1326
|
+
if (!branded.has(callbackParameters)) {
|
|
1327
|
+
throw CodedTypeError('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()', ERR_INVALID_ARG_VALUE);
|
|
1328
|
+
}
|
|
1329
|
+
assertString(redirectUri, '"redirectUri"');
|
|
1330
|
+
const code = getURLSearchParameter(callbackParameters, 'code');
|
|
1331
|
+
if (!code) {
|
|
1332
|
+
throw OPE('no authorization code in "callbackParameters"', INVALID_RESPONSE);
|
|
1333
|
+
}
|
|
1334
|
+
const parameters = new URLSearchParams(options?.additionalParameters);
|
|
1335
|
+
parameters.set('redirect_uri', redirectUri);
|
|
1336
|
+
parameters.set('code', code);
|
|
1337
|
+
if (codeVerifier !== nopkce) {
|
|
1338
|
+
assertString(codeVerifier, '"codeVerifier"');
|
|
1339
|
+
parameters.set('code_verifier', codeVerifier);
|
|
1340
|
+
}
|
|
1341
|
+
return tokenEndpointRequest(as, client, clientAuthentication, 'authorization_code', parameters, options);
|
|
1342
|
+
}
|
|
1343
|
+
const jwtClaimNames = {
|
|
1344
|
+
aud: 'audience',
|
|
1345
|
+
c_hash: 'code hash',
|
|
1346
|
+
client_id: 'client id',
|
|
1347
|
+
exp: 'expiration time',
|
|
1348
|
+
iat: 'issued at',
|
|
1349
|
+
iss: 'issuer',
|
|
1350
|
+
jti: 'jwt id',
|
|
1351
|
+
nonce: 'nonce',
|
|
1352
|
+
s_hash: 'state hash',
|
|
1353
|
+
sub: 'subject',
|
|
1354
|
+
ath: 'access token hash',
|
|
1355
|
+
htm: 'http method',
|
|
1356
|
+
htu: 'http uri',
|
|
1357
|
+
cnf: 'confirmation',
|
|
1358
|
+
auth_time: 'authentication time',
|
|
1359
|
+
};
|
|
1360
|
+
function validatePresence(required, result) {
|
|
1361
|
+
for (const claim of required) {
|
|
1362
|
+
if (result.claims[claim] === undefined) {
|
|
1363
|
+
throw OPE(`JWT "${claim}" (${jwtClaimNames[claim]}) claim missing`, INVALID_RESPONSE, {
|
|
1364
|
+
claims: result.claims,
|
|
1365
|
+
});
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
return result;
|
|
1369
|
+
}
|
|
1370
|
+
export const expectNoNonce = Symbol();
|
|
1371
|
+
export const skipAuthTimeCheck = Symbol();
|
|
1372
|
+
export async function processAuthorizationCodeResponse(as, client, response, options) {
|
|
1373
|
+
if (typeof options?.expectedNonce === 'string' ||
|
|
1374
|
+
typeof options?.maxAge === 'number' ||
|
|
1375
|
+
options?.requireIdToken) {
|
|
1376
|
+
return processAuthorizationCodeOpenIDResponse(as, client, response, options.expectedNonce, options.maxAge, options[jweDecrypt], options.recognizedTokenTypes);
|
|
1377
|
+
}
|
|
1378
|
+
return processAuthorizationCodeOAuth2Response(as, client, response, options?.[jweDecrypt], options?.recognizedTokenTypes);
|
|
1379
|
+
}
|
|
1380
|
+
async function processAuthorizationCodeOpenIDResponse(as, client, response, expectedNonce, maxAge, decryptFn, recognizedTokenTypes) {
|
|
1381
|
+
const additionalRequiredClaims = [];
|
|
1382
|
+
switch (expectedNonce) {
|
|
1383
|
+
case undefined:
|
|
1384
|
+
expectedNonce = expectNoNonce;
|
|
1385
|
+
break;
|
|
1386
|
+
case expectNoNonce:
|
|
1387
|
+
break;
|
|
1388
|
+
default:
|
|
1389
|
+
assertString(expectedNonce, '"expectedNonce" argument');
|
|
1390
|
+
additionalRequiredClaims.push('nonce');
|
|
1391
|
+
}
|
|
1392
|
+
maxAge ??= client.default_max_age;
|
|
1393
|
+
switch (maxAge) {
|
|
1394
|
+
case undefined:
|
|
1395
|
+
maxAge = skipAuthTimeCheck;
|
|
1396
|
+
break;
|
|
1397
|
+
case skipAuthTimeCheck:
|
|
1398
|
+
break;
|
|
1399
|
+
default:
|
|
1400
|
+
assertNumber(maxAge, true, '"maxAge" argument');
|
|
1401
|
+
additionalRequiredClaims.push('auth_time');
|
|
1402
|
+
}
|
|
1403
|
+
const result = await processGenericAccessTokenResponse(as, client, response, additionalRequiredClaims, decryptFn, recognizedTokenTypes);
|
|
1404
|
+
assertString(result.id_token, '"response" body "id_token" property', INVALID_RESPONSE, {
|
|
1405
|
+
body: result,
|
|
1406
|
+
});
|
|
1407
|
+
const claims = getValidatedIdTokenClaims(result);
|
|
1408
|
+
if (maxAge !== skipAuthTimeCheck) {
|
|
1409
|
+
const now = epochTime() + getClockSkew(client);
|
|
1410
|
+
const tolerance = getClockTolerance(client);
|
|
1411
|
+
if (claims.auth_time + maxAge < now - tolerance) {
|
|
1412
|
+
throw OPE('too much time has elapsed since the last End-User authentication', JWT_TIMESTAMP_CHECK, { claims, now, tolerance, claim: 'auth_time' });
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
if (expectedNonce === expectNoNonce) {
|
|
1416
|
+
if (claims.nonce !== undefined) {
|
|
1417
|
+
throw OPE('unexpected ID Token "nonce" claim value', JWT_CLAIM_COMPARISON, {
|
|
1418
|
+
expected: undefined,
|
|
1419
|
+
claims,
|
|
1420
|
+
claim: 'nonce',
|
|
1421
|
+
});
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
else if (claims.nonce !== expectedNonce) {
|
|
1425
|
+
throw OPE('unexpected ID Token "nonce" claim value', JWT_CLAIM_COMPARISON, {
|
|
1426
|
+
expected: expectedNonce,
|
|
1427
|
+
claims,
|
|
1428
|
+
claim: 'nonce',
|
|
1429
|
+
});
|
|
1430
|
+
}
|
|
1431
|
+
return result;
|
|
1432
|
+
}
|
|
1433
|
+
async function processAuthorizationCodeOAuth2Response(as, client, response, decryptFn, recognizedTokenTypes) {
|
|
1434
|
+
const result = await processGenericAccessTokenResponse(as, client, response, undefined, decryptFn, recognizedTokenTypes);
|
|
1435
|
+
const claims = getValidatedIdTokenClaims(result);
|
|
1436
|
+
if (claims) {
|
|
1437
|
+
if (client.default_max_age !== undefined) {
|
|
1438
|
+
assertNumber(client.default_max_age, true, '"client.default_max_age"');
|
|
1439
|
+
const now = epochTime() + getClockSkew(client);
|
|
1440
|
+
const tolerance = getClockTolerance(client);
|
|
1441
|
+
if (claims.auth_time + client.default_max_age < now - tolerance) {
|
|
1442
|
+
throw OPE('too much time has elapsed since the last End-User authentication', JWT_TIMESTAMP_CHECK, { claims, now, tolerance, claim: 'auth_time' });
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
if (claims.nonce !== undefined) {
|
|
1446
|
+
throw OPE('unexpected ID Token "nonce" claim value', JWT_CLAIM_COMPARISON, {
|
|
1447
|
+
expected: undefined,
|
|
1448
|
+
claims,
|
|
1449
|
+
claim: 'nonce',
|
|
1450
|
+
});
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
return result;
|
|
1454
|
+
}
|
|
1455
|
+
export const WWW_AUTHENTICATE_CHALLENGE = 'OAUTH_WWW_AUTHENTICATE_CHALLENGE';
|
|
1456
|
+
export const RESPONSE_BODY_ERROR = 'OAUTH_RESPONSE_BODY_ERROR';
|
|
1457
|
+
export const UNSUPPORTED_OPERATION = 'OAUTH_UNSUPPORTED_OPERATION';
|
|
1458
|
+
export const AUTHORIZATION_RESPONSE_ERROR = 'OAUTH_AUTHORIZATION_RESPONSE_ERROR';
|
|
1459
|
+
export const JWT_USERINFO_EXPECTED = 'OAUTH_JWT_USERINFO_EXPECTED';
|
|
1460
|
+
export const PARSE_ERROR = 'OAUTH_PARSE_ERROR';
|
|
1461
|
+
export const INVALID_RESPONSE = 'OAUTH_INVALID_RESPONSE';
|
|
1462
|
+
export const INVALID_REQUEST = 'OAUTH_INVALID_REQUEST';
|
|
1463
|
+
export const RESPONSE_IS_NOT_JSON = 'OAUTH_RESPONSE_IS_NOT_JSON';
|
|
1464
|
+
export const RESPONSE_IS_NOT_CONFORM = 'OAUTH_RESPONSE_IS_NOT_CONFORM';
|
|
1465
|
+
export const HTTP_REQUEST_FORBIDDEN = 'OAUTH_HTTP_REQUEST_FORBIDDEN';
|
|
1466
|
+
export const REQUEST_PROTOCOL_FORBIDDEN = 'OAUTH_REQUEST_PROTOCOL_FORBIDDEN';
|
|
1467
|
+
export const JWT_TIMESTAMP_CHECK = 'OAUTH_JWT_TIMESTAMP_CHECK_FAILED';
|
|
1468
|
+
export const JWT_CLAIM_COMPARISON = 'OAUTH_JWT_CLAIM_COMPARISON_FAILED';
|
|
1469
|
+
export const JSON_ATTRIBUTE_COMPARISON = 'OAUTH_JSON_ATTRIBUTE_COMPARISON_FAILED';
|
|
1470
|
+
export const KEY_SELECTION = 'OAUTH_KEY_SELECTION_FAILED';
|
|
1471
|
+
export const MISSING_SERVER_METADATA = 'OAUTH_MISSING_SERVER_METADATA';
|
|
1472
|
+
export const INVALID_SERVER_METADATA = 'OAUTH_INVALID_SERVER_METADATA';
|
|
1473
|
+
function checkJwtType(expected, result) {
|
|
1474
|
+
if (typeof result.header.typ !== 'string' || normalizeTyp(result.header.typ) !== expected) {
|
|
1475
|
+
throw OPE('unexpected JWT "typ" header parameter value', INVALID_RESPONSE, {
|
|
1476
|
+
header: result.header,
|
|
1477
|
+
});
|
|
1478
|
+
}
|
|
1479
|
+
return result;
|
|
1480
|
+
}
|
|
1481
|
+
export async function clientCredentialsGrantRequest(as, client, clientAuthentication, parameters, options) {
|
|
1482
|
+
assertAs(as);
|
|
1483
|
+
assertClient(client);
|
|
1484
|
+
return tokenEndpointRequest(as, client, clientAuthentication, 'client_credentials', new URLSearchParams(parameters), options);
|
|
1485
|
+
}
|
|
1486
|
+
export async function genericTokenEndpointRequest(as, client, clientAuthentication, grantType, parameters, options) {
|
|
1487
|
+
assertAs(as);
|
|
1488
|
+
assertClient(client);
|
|
1489
|
+
assertString(grantType, '"grantType"');
|
|
1490
|
+
return tokenEndpointRequest(as, client, clientAuthentication, grantType, new URLSearchParams(parameters), options);
|
|
1491
|
+
}
|
|
1492
|
+
export async function processGenericTokenEndpointResponse(as, client, response, options) {
|
|
1493
|
+
return processGenericAccessTokenResponse(as, client, response, undefined, options?.[jweDecrypt], options?.recognizedTokenTypes);
|
|
1494
|
+
}
|
|
1495
|
+
export async function processClientCredentialsResponse(as, client, response, options) {
|
|
1496
|
+
return processGenericAccessTokenResponse(as, client, response, undefined, options?.[jweDecrypt], options?.recognizedTokenTypes);
|
|
1497
|
+
}
|
|
1498
|
+
export async function revocationRequest(as, client, clientAuthentication, token, options) {
|
|
1499
|
+
assertAs(as);
|
|
1500
|
+
assertClient(client);
|
|
1501
|
+
assertString(token, '"token"');
|
|
1502
|
+
const url = resolveEndpoint(as, 'revocation_endpoint', client.use_mtls_endpoint_aliases, options?.[allowInsecureRequests] !== true);
|
|
1503
|
+
const body = new URLSearchParams(options?.additionalParameters);
|
|
1504
|
+
body.set('token', token);
|
|
1505
|
+
const headers = prepareHeaders(options?.headers);
|
|
1506
|
+
headers.delete('accept');
|
|
1507
|
+
return authenticatedRequest(as, client, clientAuthentication, url, body, headers, options);
|
|
1508
|
+
}
|
|
1509
|
+
export async function processRevocationResponse(response) {
|
|
1510
|
+
if (!looseInstanceOf(response, Response)) {
|
|
1511
|
+
throw CodedTypeError('"response" must be an instance of Response', ERR_INVALID_ARG_TYPE);
|
|
1512
|
+
}
|
|
1513
|
+
await checkOAuthBodyError(response, 200, 'Revocation Endpoint');
|
|
1514
|
+
return undefined;
|
|
1515
|
+
}
|
|
1516
|
+
function assertReadableResponse(response) {
|
|
1517
|
+
if (response.bodyUsed) {
|
|
1518
|
+
throw CodedTypeError('"response" body has been used already', ERR_INVALID_ARG_VALUE);
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
export async function introspectionRequest(as, client, clientAuthentication, token, options) {
|
|
1522
|
+
assertAs(as);
|
|
1523
|
+
assertClient(client);
|
|
1524
|
+
assertString(token, '"token"');
|
|
1525
|
+
const url = resolveEndpoint(as, 'introspection_endpoint', client.use_mtls_endpoint_aliases, options?.[allowInsecureRequests] !== true);
|
|
1526
|
+
const body = new URLSearchParams(options?.additionalParameters);
|
|
1527
|
+
body.set('token', token);
|
|
1528
|
+
const headers = prepareHeaders(options?.headers);
|
|
1529
|
+
if (options?.requestJwtResponse ?? client.introspection_signed_response_alg) {
|
|
1530
|
+
headers.set('accept', 'application/token-introspection+jwt');
|
|
1531
|
+
}
|
|
1532
|
+
else {
|
|
1533
|
+
headers.set('accept', 'application/json');
|
|
1534
|
+
}
|
|
1535
|
+
return authenticatedRequest(as, client, clientAuthentication, url, body, headers, options);
|
|
1536
|
+
}
|
|
1537
|
+
export async function processIntrospectionResponse(as, client, response, options) {
|
|
1538
|
+
assertAs(as);
|
|
1539
|
+
assertClient(client);
|
|
1540
|
+
if (!looseInstanceOf(response, Response)) {
|
|
1541
|
+
throw CodedTypeError('"response" must be an instance of Response', ERR_INVALID_ARG_TYPE);
|
|
1542
|
+
}
|
|
1543
|
+
await checkOAuthBodyError(response, 200, 'Introspection Endpoint');
|
|
1544
|
+
let json;
|
|
1545
|
+
if (getContentType(response) === 'application/token-introspection+jwt') {
|
|
1546
|
+
assertReadableResponse(response);
|
|
1547
|
+
const { claims, jwt } = await validateJwt(await response.text(), checkSigningAlgorithm.bind(undefined, client.introspection_signed_response_alg, as.introspection_signing_alg_values_supported, 'RS256'), getClockSkew(client), getClockTolerance(client), options?.[jweDecrypt])
|
|
1548
|
+
.then(checkJwtType.bind(undefined, 'token-introspection+jwt'))
|
|
1549
|
+
.then(validatePresence.bind(undefined, ['aud', 'iat', 'iss']))
|
|
1550
|
+
.then(validateIssuer.bind(undefined, as))
|
|
1551
|
+
.then(validateAudience.bind(undefined, client.client_id));
|
|
1552
|
+
jwtRefs.set(response, jwt);
|
|
1553
|
+
if (!isJsonObject(claims.token_introspection)) {
|
|
1554
|
+
throw OPE('JWT "token_introspection" claim must be a JSON object', INVALID_RESPONSE, {
|
|
1555
|
+
claims,
|
|
1556
|
+
});
|
|
1557
|
+
}
|
|
1558
|
+
json = claims.token_introspection;
|
|
1559
|
+
}
|
|
1560
|
+
else {
|
|
1561
|
+
assertReadableResponse(response);
|
|
1562
|
+
json = await getResponseJsonBody(response);
|
|
1563
|
+
}
|
|
1564
|
+
if (typeof json.active !== 'boolean') {
|
|
1565
|
+
throw OPE('"response" body "active" property must be a boolean', INVALID_RESPONSE, {
|
|
1566
|
+
body: json,
|
|
1567
|
+
});
|
|
1568
|
+
}
|
|
1569
|
+
return json;
|
|
1570
|
+
}
|
|
1571
|
+
async function jwksRequest(as, options) {
|
|
1572
|
+
assertAs(as);
|
|
1573
|
+
const url = resolveEndpoint(as, 'jwks_uri', false, options?.[allowInsecureRequests] !== true);
|
|
1574
|
+
const headers = prepareHeaders(options?.headers);
|
|
1575
|
+
headers.set('accept', 'application/json');
|
|
1576
|
+
headers.append('accept', 'application/jwk-set+json');
|
|
1577
|
+
return (options?.[customFetch] || fetch)(url.href, {
|
|
1578
|
+
body: undefined,
|
|
1579
|
+
headers: Object.fromEntries(headers.entries()),
|
|
1580
|
+
method: 'GET',
|
|
1581
|
+
redirect: 'manual',
|
|
1582
|
+
signal: signal(url, options?.signal),
|
|
1583
|
+
});
|
|
1584
|
+
}
|
|
1585
|
+
async function processJwksResponse(response) {
|
|
1586
|
+
if (!looseInstanceOf(response, Response)) {
|
|
1587
|
+
throw CodedTypeError('"response" must be an instance of Response', ERR_INVALID_ARG_TYPE);
|
|
1588
|
+
}
|
|
1589
|
+
if (response.status !== 200) {
|
|
1590
|
+
throw OPE('"response" is not a conform JSON Web Key Set response (unexpected HTTP status code)', RESPONSE_IS_NOT_CONFORM, response);
|
|
1591
|
+
}
|
|
1592
|
+
assertReadableResponse(response);
|
|
1593
|
+
const json = await getResponseJsonBody(response, (response) => assertContentTypes(response, 'application/json', 'application/jwk-set+json'));
|
|
1594
|
+
if (!Array.isArray(json.keys)) {
|
|
1595
|
+
throw OPE('"response" body "keys" property must be an array', INVALID_RESPONSE, { body: json });
|
|
1596
|
+
}
|
|
1597
|
+
if (!Array.prototype.every.call(json.keys, isJsonObject)) {
|
|
1598
|
+
throw OPE('"response" body "keys" property members must be JWK formatted objects', INVALID_RESPONSE, { body: json });
|
|
1599
|
+
}
|
|
1600
|
+
return json;
|
|
1601
|
+
}
|
|
1602
|
+
function supported(alg) {
|
|
1603
|
+
switch (alg) {
|
|
1604
|
+
case 'PS256':
|
|
1605
|
+
case 'ES256':
|
|
1606
|
+
case 'RS256':
|
|
1607
|
+
case 'PS384':
|
|
1608
|
+
case 'ES384':
|
|
1609
|
+
case 'RS384':
|
|
1610
|
+
case 'PS512':
|
|
1611
|
+
case 'ES512':
|
|
1612
|
+
case 'RS512':
|
|
1613
|
+
case 'Ed25519':
|
|
1614
|
+
case 'EdDSA':
|
|
1615
|
+
case 'ML-DSA-44':
|
|
1616
|
+
case 'ML-DSA-65':
|
|
1617
|
+
case 'ML-DSA-87':
|
|
1618
|
+
return true;
|
|
1619
|
+
default:
|
|
1620
|
+
return false;
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
function checkSupportedJwsAlg(header) {
|
|
1624
|
+
if (!supported(header.alg)) {
|
|
1625
|
+
throw new UnsupportedOperationError('unsupported JWS "alg" identifier', {
|
|
1626
|
+
cause: { alg: header.alg },
|
|
1627
|
+
});
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
function checkRsaKeyAlgorithm(key) {
|
|
1631
|
+
const { algorithm } = key;
|
|
1632
|
+
if (typeof algorithm.modulusLength !== 'number' || algorithm.modulusLength < 2048) {
|
|
1633
|
+
throw new UnsupportedOperationError(`unsupported ${algorithm.name} modulusLength`, {
|
|
1634
|
+
cause: key,
|
|
1635
|
+
});
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
function ecdsaHashName(key) {
|
|
1639
|
+
const { algorithm } = key;
|
|
1640
|
+
switch (algorithm.namedCurve) {
|
|
1641
|
+
case 'P-256':
|
|
1642
|
+
return 'SHA-256';
|
|
1643
|
+
case 'P-384':
|
|
1644
|
+
return 'SHA-384';
|
|
1645
|
+
case 'P-521':
|
|
1646
|
+
return 'SHA-512';
|
|
1647
|
+
default:
|
|
1648
|
+
throw new UnsupportedOperationError('unsupported ECDSA namedCurve', { cause: key });
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
function keyToSubtle(key) {
|
|
1652
|
+
switch (key.algorithm.name) {
|
|
1653
|
+
case 'ECDSA':
|
|
1654
|
+
return {
|
|
1655
|
+
name: key.algorithm.name,
|
|
1656
|
+
hash: ecdsaHashName(key),
|
|
1657
|
+
};
|
|
1658
|
+
case 'RSA-PSS': {
|
|
1659
|
+
checkRsaKeyAlgorithm(key);
|
|
1660
|
+
switch (key.algorithm.hash.name) {
|
|
1661
|
+
case 'SHA-256':
|
|
1662
|
+
case 'SHA-384':
|
|
1663
|
+
case 'SHA-512':
|
|
1664
|
+
return {
|
|
1665
|
+
name: key.algorithm.name,
|
|
1666
|
+
saltLength: parseInt(key.algorithm.hash.name.slice(-3), 10) >> 3,
|
|
1667
|
+
};
|
|
1668
|
+
default:
|
|
1669
|
+
throw new UnsupportedOperationError('unsupported RSA-PSS hash name', { cause: key });
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
case 'RSASSA-PKCS1-v1_5':
|
|
1673
|
+
checkRsaKeyAlgorithm(key);
|
|
1674
|
+
return key.algorithm.name;
|
|
1675
|
+
case 'ML-DSA-44':
|
|
1676
|
+
case 'ML-DSA-65':
|
|
1677
|
+
case 'ML-DSA-87':
|
|
1678
|
+
case 'Ed25519':
|
|
1679
|
+
return key.algorithm.name;
|
|
1680
|
+
}
|
|
1681
|
+
throw new UnsupportedOperationError('unsupported CryptoKey algorithm name', { cause: key });
|
|
1682
|
+
}
|
|
1683
|
+
async function validateJwsSignature(protectedHeader, payload, key, signature) {
|
|
1684
|
+
const data = buf(`${protectedHeader}.${payload}`);
|
|
1685
|
+
const algorithm = keyToSubtle(key);
|
|
1686
|
+
const verified = await crypto.subtle.verify(algorithm, key, signature, data);
|
|
1687
|
+
if (!verified) {
|
|
1688
|
+
throw OPE('JWT signature verification failed', INVALID_RESPONSE, {
|
|
1689
|
+
key,
|
|
1690
|
+
data,
|
|
1691
|
+
signature,
|
|
1692
|
+
algorithm,
|
|
1693
|
+
});
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
async function validateJwt(jws, checkAlg, clockSkew, clockTolerance, decryptJwt) {
|
|
1697
|
+
let { 0: protectedHeader, 1: payload, length } = jws.split('.');
|
|
1698
|
+
if (length === 5) {
|
|
1699
|
+
if (decryptJwt !== undefined) {
|
|
1700
|
+
jws = await decryptJwt(jws);
|
|
1701
|
+
({ 0: protectedHeader, 1: payload, length } = jws.split('.'));
|
|
1702
|
+
}
|
|
1703
|
+
else {
|
|
1704
|
+
throw new UnsupportedOperationError('JWE decryption is not configured', { cause: jws });
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
if (length !== 3) {
|
|
1708
|
+
throw OPE('Invalid JWT', INVALID_RESPONSE, jws);
|
|
1709
|
+
}
|
|
1710
|
+
let header;
|
|
1711
|
+
try {
|
|
1712
|
+
header = JSON.parse(buf(b64u(protectedHeader)));
|
|
1713
|
+
}
|
|
1714
|
+
catch (cause) {
|
|
1715
|
+
throw OPE('failed to parse JWT Header body as base64url encoded JSON', PARSE_ERROR, cause);
|
|
1716
|
+
}
|
|
1717
|
+
if (!isJsonObject(header)) {
|
|
1718
|
+
throw OPE('JWT Header must be a top level object', INVALID_RESPONSE, jws);
|
|
1719
|
+
}
|
|
1720
|
+
checkAlg(header);
|
|
1721
|
+
if (header.crit !== undefined) {
|
|
1722
|
+
throw new UnsupportedOperationError('no JWT "crit" header parameter extensions are supported', {
|
|
1723
|
+
cause: { header },
|
|
1724
|
+
});
|
|
1725
|
+
}
|
|
1726
|
+
let claims;
|
|
1727
|
+
try {
|
|
1728
|
+
claims = JSON.parse(buf(b64u(payload)));
|
|
1729
|
+
}
|
|
1730
|
+
catch (cause) {
|
|
1731
|
+
throw OPE('failed to parse JWT Payload body as base64url encoded JSON', PARSE_ERROR, cause);
|
|
1732
|
+
}
|
|
1733
|
+
if (!isJsonObject(claims)) {
|
|
1734
|
+
throw OPE('JWT Payload must be a top level object', INVALID_RESPONSE, jws);
|
|
1735
|
+
}
|
|
1736
|
+
const now = epochTime() + clockSkew;
|
|
1737
|
+
if (claims.exp !== undefined) {
|
|
1738
|
+
if (typeof claims.exp !== 'number') {
|
|
1739
|
+
throw OPE('unexpected JWT "exp" (expiration time) claim type', INVALID_RESPONSE, { claims });
|
|
1740
|
+
}
|
|
1741
|
+
if (claims.exp <= now - clockTolerance) {
|
|
1742
|
+
throw OPE('unexpected JWT "exp" (expiration time) claim value, expiration is past current timestamp', JWT_TIMESTAMP_CHECK, { claims, now, tolerance: clockTolerance, claim: 'exp' });
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1745
|
+
if (claims.iat !== undefined) {
|
|
1746
|
+
if (typeof claims.iat !== 'number') {
|
|
1747
|
+
throw OPE('unexpected JWT "iat" (issued at) claim type', INVALID_RESPONSE, { claims });
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
if (claims.iss !== undefined) {
|
|
1751
|
+
if (typeof claims.iss !== 'string') {
|
|
1752
|
+
throw OPE('unexpected JWT "iss" (issuer) claim type', INVALID_RESPONSE, { claims });
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
if (claims.nbf !== undefined) {
|
|
1756
|
+
if (typeof claims.nbf !== 'number') {
|
|
1757
|
+
throw OPE('unexpected JWT "nbf" (not before) claim type', INVALID_RESPONSE, { claims });
|
|
1758
|
+
}
|
|
1759
|
+
if (claims.nbf > now + clockTolerance) {
|
|
1760
|
+
throw OPE('unexpected JWT "nbf" (not before) claim value', JWT_TIMESTAMP_CHECK, {
|
|
1761
|
+
claims,
|
|
1762
|
+
now,
|
|
1763
|
+
tolerance: clockTolerance,
|
|
1764
|
+
claim: 'nbf',
|
|
1765
|
+
});
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
if (claims.aud !== undefined) {
|
|
1769
|
+
if (typeof claims.aud !== 'string' && !Array.isArray(claims.aud)) {
|
|
1770
|
+
throw OPE('unexpected JWT "aud" (audience) claim type', INVALID_RESPONSE, { claims });
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
return { header, claims, jwt: jws };
|
|
1774
|
+
}
|
|
1775
|
+
export async function validateJwtAuthResponse(as, client, parameters, expectedState, options) {
|
|
1776
|
+
assertAs(as);
|
|
1777
|
+
assertClient(client);
|
|
1778
|
+
if (parameters instanceof URL) {
|
|
1779
|
+
parameters = parameters.searchParams;
|
|
1780
|
+
}
|
|
1781
|
+
if (!(parameters instanceof URLSearchParams)) {
|
|
1782
|
+
throw CodedTypeError('"parameters" must be an instance of URLSearchParams, or URL', ERR_INVALID_ARG_TYPE);
|
|
1783
|
+
}
|
|
1784
|
+
const response = getURLSearchParameter(parameters, 'response');
|
|
1785
|
+
if (!response) {
|
|
1786
|
+
throw OPE('"parameters" does not contain a JARM response', INVALID_RESPONSE);
|
|
1787
|
+
}
|
|
1788
|
+
const { claims, header, jwt } = await validateJwt(response, checkSigningAlgorithm.bind(undefined, client.authorization_signed_response_alg, as.authorization_signing_alg_values_supported, 'RS256'), getClockSkew(client), getClockTolerance(client), options?.[jweDecrypt])
|
|
1789
|
+
.then(validatePresence.bind(undefined, ['aud', 'exp', 'iss']))
|
|
1790
|
+
.then(validateIssuer.bind(undefined, as))
|
|
1791
|
+
.then(validateAudience.bind(undefined, client.client_id));
|
|
1792
|
+
const { 0: protectedHeader, 1: payload, 2: encodedSignature } = jwt.split('.');
|
|
1793
|
+
const signature = b64u(encodedSignature);
|
|
1794
|
+
const key = await getPublicSigKeyFromIssuerJwksUri(as, options, header);
|
|
1795
|
+
await validateJwsSignature(protectedHeader, payload, key, signature);
|
|
1796
|
+
const result = new URLSearchParams();
|
|
1797
|
+
for (const [key, value] of Object.entries(claims)) {
|
|
1798
|
+
if (typeof value === 'string' && key !== 'aud') {
|
|
1799
|
+
result.set(key, value);
|
|
1800
|
+
}
|
|
1801
|
+
}
|
|
1802
|
+
return validateAuthResponse(as, client, result, expectedState);
|
|
1803
|
+
}
|
|
1804
|
+
async function idTokenHash(data, header, claimName) {
|
|
1805
|
+
let algorithm;
|
|
1806
|
+
switch (header.alg) {
|
|
1807
|
+
case 'RS256':
|
|
1808
|
+
case 'PS256':
|
|
1809
|
+
case 'ES256':
|
|
1810
|
+
algorithm = 'SHA-256';
|
|
1811
|
+
break;
|
|
1812
|
+
case 'RS384':
|
|
1813
|
+
case 'PS384':
|
|
1814
|
+
case 'ES384':
|
|
1815
|
+
algorithm = 'SHA-384';
|
|
1816
|
+
break;
|
|
1817
|
+
case 'RS512':
|
|
1818
|
+
case 'PS512':
|
|
1819
|
+
case 'ES512':
|
|
1820
|
+
case 'Ed25519':
|
|
1821
|
+
case 'EdDSA':
|
|
1822
|
+
algorithm = 'SHA-512';
|
|
1823
|
+
break;
|
|
1824
|
+
case 'ML-DSA-44':
|
|
1825
|
+
case 'ML-DSA-65':
|
|
1826
|
+
case 'ML-DSA-87':
|
|
1827
|
+
algorithm = { name: 'cSHAKE256', length: 512 };
|
|
1828
|
+
break;
|
|
1829
|
+
default:
|
|
1830
|
+
throw new UnsupportedOperationError(`unsupported JWS algorithm for ${claimName} calculation`, { cause: { alg: header.alg } });
|
|
1831
|
+
}
|
|
1832
|
+
const digest = await crypto.subtle.digest(algorithm, buf(data));
|
|
1833
|
+
return b64u(digest.slice(0, digest.byteLength / 2));
|
|
1834
|
+
}
|
|
1835
|
+
async function idTokenHashMatches(data, actual, header, claimName) {
|
|
1836
|
+
const expected = await idTokenHash(data, header, claimName);
|
|
1837
|
+
return actual === expected;
|
|
1838
|
+
}
|
|
1839
|
+
export async function validateDetachedSignatureResponse(as, client, parameters, expectedNonce, expectedState, maxAge, options) {
|
|
1840
|
+
return validateHybridResponse(as, client, parameters, expectedNonce, expectedState, maxAge, options, true);
|
|
1841
|
+
}
|
|
1842
|
+
export async function validateCodeIdTokenResponse(as, client, parameters, expectedNonce, expectedState, maxAge, options) {
|
|
1843
|
+
return validateHybridResponse(as, client, parameters, expectedNonce, expectedState, maxAge, options, false);
|
|
1844
|
+
}
|
|
1845
|
+
async function consumeStream(request) {
|
|
1846
|
+
if (request.bodyUsed) {
|
|
1847
|
+
throw CodedTypeError('form_post Request instances must contain a readable body', ERR_INVALID_ARG_VALUE, { cause: request });
|
|
1848
|
+
}
|
|
1849
|
+
return request.text();
|
|
1850
|
+
}
|
|
1851
|
+
export async function formPostResponse(request) {
|
|
1852
|
+
if (request.method !== 'POST') {
|
|
1853
|
+
throw CodedTypeError('form_post responses are expected to use the POST method', ERR_INVALID_ARG_VALUE, { cause: request });
|
|
1854
|
+
}
|
|
1855
|
+
if (getContentType(request) !== 'application/x-www-form-urlencoded') {
|
|
1856
|
+
throw CodedTypeError('form_post responses are expected to use the application/x-www-form-urlencoded content-type', ERR_INVALID_ARG_VALUE, { cause: request });
|
|
1857
|
+
}
|
|
1858
|
+
return consumeStream(request);
|
|
1859
|
+
}
|
|
1860
|
+
async function validateHybridResponse(as, client, parameters, expectedNonce, expectedState, maxAge, options, fapi) {
|
|
1861
|
+
assertAs(as);
|
|
1862
|
+
assertClient(client);
|
|
1863
|
+
if (parameters instanceof URL) {
|
|
1864
|
+
if (!parameters.hash.length) {
|
|
1865
|
+
throw CodedTypeError('"parameters" as an instance of URL must contain a hash (fragment) with the Authorization Response parameters', ERR_INVALID_ARG_VALUE);
|
|
1866
|
+
}
|
|
1867
|
+
parameters = new URLSearchParams(parameters.hash.slice(1));
|
|
1868
|
+
}
|
|
1869
|
+
else if (looseInstanceOf(parameters, Request)) {
|
|
1870
|
+
parameters = new URLSearchParams(await formPostResponse(parameters));
|
|
1871
|
+
}
|
|
1872
|
+
else if (parameters instanceof URLSearchParams) {
|
|
1873
|
+
parameters = new URLSearchParams(parameters);
|
|
1874
|
+
}
|
|
1875
|
+
else {
|
|
1876
|
+
throw CodedTypeError('"parameters" must be an instance of URLSearchParams, URL, or Response', ERR_INVALID_ARG_TYPE);
|
|
1877
|
+
}
|
|
1878
|
+
const id_token = getURLSearchParameter(parameters, 'id_token');
|
|
1879
|
+
parameters.delete('id_token');
|
|
1880
|
+
switch (expectedState) {
|
|
1881
|
+
case undefined:
|
|
1882
|
+
case expectNoState:
|
|
1883
|
+
break;
|
|
1884
|
+
default:
|
|
1885
|
+
assertString(expectedState, '"expectedState" argument');
|
|
1886
|
+
}
|
|
1887
|
+
const result = validateAuthResponse({
|
|
1888
|
+
...as,
|
|
1889
|
+
authorization_response_iss_parameter_supported: false,
|
|
1890
|
+
}, client, parameters, expectedState);
|
|
1891
|
+
if (!id_token) {
|
|
1892
|
+
throw OPE('"parameters" does not contain an ID Token', INVALID_RESPONSE);
|
|
1893
|
+
}
|
|
1894
|
+
const code = getURLSearchParameter(parameters, 'code');
|
|
1895
|
+
if (!code) {
|
|
1896
|
+
throw OPE('"parameters" does not contain an Authorization Code', INVALID_RESPONSE);
|
|
1897
|
+
}
|
|
1898
|
+
const requiredClaims = [
|
|
1899
|
+
'aud',
|
|
1900
|
+
'exp',
|
|
1901
|
+
'iat',
|
|
1902
|
+
'iss',
|
|
1903
|
+
'sub',
|
|
1904
|
+
'nonce',
|
|
1905
|
+
'c_hash',
|
|
1906
|
+
];
|
|
1907
|
+
const state = parameters.get('state');
|
|
1908
|
+
if (fapi && (typeof expectedState === 'string' || state !== null)) {
|
|
1909
|
+
requiredClaims.push('s_hash');
|
|
1910
|
+
}
|
|
1911
|
+
if (maxAge !== undefined) {
|
|
1912
|
+
assertNumber(maxAge, true, '"maxAge" argument');
|
|
1913
|
+
}
|
|
1914
|
+
else if (client.default_max_age !== undefined) {
|
|
1915
|
+
assertNumber(client.default_max_age, true, '"client.default_max_age"');
|
|
1916
|
+
}
|
|
1917
|
+
maxAge ??= client.default_max_age ?? skipAuthTimeCheck;
|
|
1918
|
+
if (client.require_auth_time || maxAge !== skipAuthTimeCheck) {
|
|
1919
|
+
requiredClaims.push('auth_time');
|
|
1920
|
+
}
|
|
1921
|
+
const { claims, header, jwt } = await validateJwt(id_token, checkSigningAlgorithm.bind(undefined, client.id_token_signed_response_alg, as.id_token_signing_alg_values_supported, 'RS256'), getClockSkew(client), getClockTolerance(client), options?.[jweDecrypt])
|
|
1922
|
+
.then(validatePresence.bind(undefined, requiredClaims))
|
|
1923
|
+
.then(validateIssuer.bind(undefined, as))
|
|
1924
|
+
.then(validateAudience.bind(undefined, client.client_id));
|
|
1925
|
+
const clockSkew = getClockSkew(client);
|
|
1926
|
+
const now = epochTime() + clockSkew;
|
|
1927
|
+
if (claims.iat < now - 3600) {
|
|
1928
|
+
throw OPE('unexpected JWT "iat" (issued at) claim value, it is too far in the past', JWT_TIMESTAMP_CHECK, { now, claims, claim: 'iat' });
|
|
1929
|
+
}
|
|
1930
|
+
assertString(claims.c_hash, 'ID Token "c_hash" (code hash) claim value', INVALID_RESPONSE, {
|
|
1931
|
+
claims,
|
|
1932
|
+
});
|
|
1933
|
+
if (claims.auth_time !== undefined) {
|
|
1934
|
+
assertNumber(claims.auth_time, true, 'ID Token "auth_time" (authentication time)', INVALID_RESPONSE, { claims });
|
|
1935
|
+
}
|
|
1936
|
+
if (maxAge !== skipAuthTimeCheck) {
|
|
1937
|
+
const now = epochTime() + getClockSkew(client);
|
|
1938
|
+
const tolerance = getClockTolerance(client);
|
|
1939
|
+
if (claims.auth_time + maxAge < now - tolerance) {
|
|
1940
|
+
throw OPE('too much time has elapsed since the last End-User authentication', JWT_TIMESTAMP_CHECK, { claims, now, tolerance, claim: 'auth_time' });
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
assertString(expectedNonce, '"expectedNonce" argument');
|
|
1944
|
+
if (claims.nonce !== expectedNonce) {
|
|
1945
|
+
throw OPE('unexpected ID Token "nonce" claim value', JWT_CLAIM_COMPARISON, {
|
|
1946
|
+
expected: expectedNonce,
|
|
1947
|
+
claims,
|
|
1948
|
+
claim: 'nonce',
|
|
1949
|
+
});
|
|
1950
|
+
}
|
|
1951
|
+
if (Array.isArray(claims.aud) && claims.aud.length !== 1) {
|
|
1952
|
+
if (claims.azp === undefined) {
|
|
1953
|
+
throw OPE('ID Token "aud" (audience) claim includes additional untrusted audiences', JWT_CLAIM_COMPARISON, { claims, claim: 'aud' });
|
|
1954
|
+
}
|
|
1955
|
+
if (claims.azp !== client.client_id) {
|
|
1956
|
+
throw OPE('unexpected ID Token "azp" (authorized party) claim value', JWT_CLAIM_COMPARISON, {
|
|
1957
|
+
expected: client.client_id,
|
|
1958
|
+
claims,
|
|
1959
|
+
claim: 'azp',
|
|
1960
|
+
});
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
const { 0: protectedHeader, 1: payload, 2: encodedSignature } = jwt.split('.');
|
|
1964
|
+
const signature = b64u(encodedSignature);
|
|
1965
|
+
const key = await getPublicSigKeyFromIssuerJwksUri(as, options, header);
|
|
1966
|
+
await validateJwsSignature(protectedHeader, payload, key, signature);
|
|
1967
|
+
if ((await idTokenHashMatches(code, claims.c_hash, header, 'c_hash')) !== true) {
|
|
1968
|
+
throw OPE('invalid ID Token "c_hash" (code hash) claim value', JWT_CLAIM_COMPARISON, {
|
|
1969
|
+
code,
|
|
1970
|
+
alg: header.alg,
|
|
1971
|
+
claim: 'c_hash',
|
|
1972
|
+
claims,
|
|
1973
|
+
});
|
|
1974
|
+
}
|
|
1975
|
+
if ((fapi && state !== null) || claims.s_hash !== undefined) {
|
|
1976
|
+
assertString(claims.s_hash, 'ID Token "s_hash" (state hash) claim value', INVALID_RESPONSE, {
|
|
1977
|
+
claims,
|
|
1978
|
+
});
|
|
1979
|
+
assertString(state, '"state" response parameter', INVALID_RESPONSE, { parameters });
|
|
1980
|
+
if ((await idTokenHashMatches(state, claims.s_hash, header, 's_hash')) !== true) {
|
|
1981
|
+
throw OPE('invalid ID Token "s_hash" (state hash) claim value', JWT_CLAIM_COMPARISON, {
|
|
1982
|
+
state,
|
|
1983
|
+
alg: header.alg,
|
|
1984
|
+
claim: 's_hash',
|
|
1985
|
+
claims,
|
|
1986
|
+
});
|
|
1987
|
+
}
|
|
1988
|
+
}
|
|
1989
|
+
return result;
|
|
1990
|
+
}
|
|
1991
|
+
function checkSigningAlgorithm(client, issuer, fallback, header) {
|
|
1992
|
+
if (client !== undefined) {
|
|
1993
|
+
if (typeof client === 'string' ? header.alg !== client : !client.includes(header.alg)) {
|
|
1994
|
+
throw OPE('unexpected JWT "alg" header parameter', INVALID_RESPONSE, {
|
|
1995
|
+
header,
|
|
1996
|
+
expected: client,
|
|
1997
|
+
reason: 'client configuration',
|
|
1998
|
+
});
|
|
1999
|
+
}
|
|
2000
|
+
return;
|
|
2001
|
+
}
|
|
2002
|
+
if (Array.isArray(issuer)) {
|
|
2003
|
+
if (!issuer.includes(header.alg)) {
|
|
2004
|
+
throw OPE('unexpected JWT "alg" header parameter', INVALID_RESPONSE, {
|
|
2005
|
+
header,
|
|
2006
|
+
expected: issuer,
|
|
2007
|
+
reason: 'authorization server metadata',
|
|
2008
|
+
});
|
|
2009
|
+
}
|
|
2010
|
+
return;
|
|
2011
|
+
}
|
|
2012
|
+
if (fallback !== undefined) {
|
|
2013
|
+
if (typeof fallback === 'string'
|
|
2014
|
+
? header.alg !== fallback
|
|
2015
|
+
: typeof fallback === 'function'
|
|
2016
|
+
? !fallback(header.alg)
|
|
2017
|
+
: !fallback.includes(header.alg)) {
|
|
2018
|
+
throw OPE('unexpected JWT "alg" header parameter', INVALID_RESPONSE, {
|
|
2019
|
+
header,
|
|
2020
|
+
expected: fallback,
|
|
2021
|
+
reason: 'default value',
|
|
2022
|
+
});
|
|
2023
|
+
}
|
|
2024
|
+
return;
|
|
2025
|
+
}
|
|
2026
|
+
throw OPE('missing client or server configuration to verify used JWT "alg" header parameter', undefined, { client, issuer, fallback });
|
|
2027
|
+
}
|
|
2028
|
+
function getURLSearchParameter(parameters, name) {
|
|
2029
|
+
const { 0: value, length } = parameters.getAll(name);
|
|
2030
|
+
if (length > 1) {
|
|
2031
|
+
throw OPE(`"${name}" parameter must be provided only once`, INVALID_RESPONSE);
|
|
2032
|
+
}
|
|
2033
|
+
return value;
|
|
2034
|
+
}
|
|
2035
|
+
export const skipStateCheck = Symbol();
|
|
2036
|
+
export const expectNoState = Symbol();
|
|
2037
|
+
export function validateAuthResponse(as, client, parameters, expectedState) {
|
|
2038
|
+
assertAs(as);
|
|
2039
|
+
assertClient(client);
|
|
2040
|
+
if (parameters instanceof URL) {
|
|
2041
|
+
parameters = parameters.searchParams;
|
|
2042
|
+
}
|
|
2043
|
+
if (!(parameters instanceof URLSearchParams)) {
|
|
2044
|
+
throw CodedTypeError('"parameters" must be an instance of URLSearchParams, or URL', ERR_INVALID_ARG_TYPE);
|
|
2045
|
+
}
|
|
2046
|
+
if (getURLSearchParameter(parameters, 'response')) {
|
|
2047
|
+
throw OPE('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()', INVALID_RESPONSE, { parameters });
|
|
2048
|
+
}
|
|
2049
|
+
const iss = getURLSearchParameter(parameters, 'iss');
|
|
2050
|
+
const state = getURLSearchParameter(parameters, 'state');
|
|
2051
|
+
if (!iss && as.authorization_response_iss_parameter_supported) {
|
|
2052
|
+
throw OPE('response parameter "iss" (issuer) missing', INVALID_RESPONSE, { parameters });
|
|
2053
|
+
}
|
|
2054
|
+
if (iss && iss !== as.issuer) {
|
|
2055
|
+
throw OPE('unexpected "iss" (issuer) response parameter value', INVALID_RESPONSE, {
|
|
2056
|
+
expected: as.issuer,
|
|
2057
|
+
parameters,
|
|
2058
|
+
});
|
|
2059
|
+
}
|
|
2060
|
+
switch (expectedState) {
|
|
2061
|
+
case undefined:
|
|
2062
|
+
case expectNoState:
|
|
2063
|
+
if (state !== undefined) {
|
|
2064
|
+
throw OPE('unexpected "state" response parameter encountered', INVALID_RESPONSE, {
|
|
2065
|
+
expected: undefined,
|
|
2066
|
+
parameters,
|
|
2067
|
+
});
|
|
2068
|
+
}
|
|
2069
|
+
break;
|
|
2070
|
+
case skipStateCheck:
|
|
2071
|
+
break;
|
|
2072
|
+
default:
|
|
2073
|
+
assertString(expectedState, '"expectedState" argument');
|
|
2074
|
+
if (state !== expectedState) {
|
|
2075
|
+
throw OPE(state === undefined
|
|
2076
|
+
? 'response parameter "state" missing'
|
|
2077
|
+
: 'unexpected "state" response parameter value', INVALID_RESPONSE, { expected: expectedState, parameters });
|
|
2078
|
+
}
|
|
2079
|
+
}
|
|
2080
|
+
const error = getURLSearchParameter(parameters, 'error');
|
|
2081
|
+
if (error) {
|
|
2082
|
+
throw new AuthorizationResponseError('authorization response from the server is an error', {
|
|
2083
|
+
cause: parameters,
|
|
2084
|
+
});
|
|
2085
|
+
}
|
|
2086
|
+
const id_token = getURLSearchParameter(parameters, 'id_token');
|
|
2087
|
+
const token = getURLSearchParameter(parameters, 'token');
|
|
2088
|
+
if (id_token !== undefined || token !== undefined) {
|
|
2089
|
+
throw new UnsupportedOperationError('implicit and hybrid flows are not supported');
|
|
2090
|
+
}
|
|
2091
|
+
return brand(new URLSearchParams(parameters));
|
|
2092
|
+
}
|
|
2093
|
+
function algToSubtle(alg) {
|
|
2094
|
+
switch (alg) {
|
|
2095
|
+
case 'PS256':
|
|
2096
|
+
case 'PS384':
|
|
2097
|
+
case 'PS512':
|
|
2098
|
+
return { name: 'RSA-PSS', hash: `SHA-${alg.slice(-3)}` };
|
|
2099
|
+
case 'RS256':
|
|
2100
|
+
case 'RS384':
|
|
2101
|
+
case 'RS512':
|
|
2102
|
+
return { name: 'RSASSA-PKCS1-v1_5', hash: `SHA-${alg.slice(-3)}` };
|
|
2103
|
+
case 'ES256':
|
|
2104
|
+
case 'ES384':
|
|
2105
|
+
return { name: 'ECDSA', namedCurve: `P-${alg.slice(-3)}` };
|
|
2106
|
+
case 'ES512':
|
|
2107
|
+
return { name: 'ECDSA', namedCurve: 'P-521' };
|
|
2108
|
+
case 'EdDSA':
|
|
2109
|
+
return 'Ed25519';
|
|
2110
|
+
case 'Ed25519':
|
|
2111
|
+
case 'ML-DSA-44':
|
|
2112
|
+
case 'ML-DSA-65':
|
|
2113
|
+
case 'ML-DSA-87':
|
|
2114
|
+
return alg;
|
|
2115
|
+
default:
|
|
2116
|
+
throw new UnsupportedOperationError('unsupported JWS algorithm', { cause: { alg } });
|
|
2117
|
+
}
|
|
2118
|
+
}
|
|
2119
|
+
async function importJwk(alg, jwk) {
|
|
2120
|
+
const { ext, key_ops, use, ...key } = jwk;
|
|
2121
|
+
return crypto.subtle.importKey('jwk', key, algToSubtle(alg), true, ['verify']);
|
|
2122
|
+
}
|
|
2123
|
+
export async function deviceAuthorizationRequest(as, client, clientAuthentication, parameters, options) {
|
|
2124
|
+
assertAs(as);
|
|
2125
|
+
assertClient(client);
|
|
2126
|
+
const url = resolveEndpoint(as, 'device_authorization_endpoint', client.use_mtls_endpoint_aliases, options?.[allowInsecureRequests] !== true);
|
|
2127
|
+
const body = new URLSearchParams(parameters);
|
|
2128
|
+
body.set('client_id', client.client_id);
|
|
2129
|
+
const headers = prepareHeaders(options?.headers);
|
|
2130
|
+
headers.set('accept', 'application/json');
|
|
2131
|
+
return authenticatedRequest(as, client, clientAuthentication, url, body, headers, options);
|
|
2132
|
+
}
|
|
2133
|
+
export async function processDeviceAuthorizationResponse(as, client, response) {
|
|
2134
|
+
assertAs(as);
|
|
2135
|
+
assertClient(client);
|
|
2136
|
+
if (!looseInstanceOf(response, Response)) {
|
|
2137
|
+
throw CodedTypeError('"response" must be an instance of Response', ERR_INVALID_ARG_TYPE);
|
|
2138
|
+
}
|
|
2139
|
+
await checkOAuthBodyError(response, 200, 'Device Authorization Endpoint');
|
|
2140
|
+
assertReadableResponse(response);
|
|
2141
|
+
const json = await getResponseJsonBody(response);
|
|
2142
|
+
assertString(json.device_code, '"response" body "device_code" property', INVALID_RESPONSE, {
|
|
2143
|
+
body: json,
|
|
2144
|
+
});
|
|
2145
|
+
assertString(json.user_code, '"response" body "user_code" property', INVALID_RESPONSE, {
|
|
2146
|
+
body: json,
|
|
2147
|
+
});
|
|
2148
|
+
assertString(json.verification_uri, '"response" body "verification_uri" property', INVALID_RESPONSE, { body: json });
|
|
2149
|
+
let expiresIn = typeof json.expires_in !== 'number' ? parseFloat(json.expires_in) : json.expires_in;
|
|
2150
|
+
assertNumber(expiresIn, true, '"response" body "expires_in" property', INVALID_RESPONSE, {
|
|
2151
|
+
body: json,
|
|
2152
|
+
});
|
|
2153
|
+
json.expires_in = expiresIn;
|
|
2154
|
+
if (json.verification_uri_complete !== undefined) {
|
|
2155
|
+
assertString(json.verification_uri_complete, '"response" body "verification_uri_complete" property', INVALID_RESPONSE, { body: json });
|
|
2156
|
+
}
|
|
2157
|
+
if (json.interval !== undefined) {
|
|
2158
|
+
assertNumber(json.interval, false, '"response" body "interval" property', INVALID_RESPONSE, {
|
|
2159
|
+
body: json,
|
|
2160
|
+
});
|
|
2161
|
+
}
|
|
2162
|
+
return json;
|
|
2163
|
+
}
|
|
2164
|
+
export async function deviceCodeGrantRequest(as, client, clientAuthentication, deviceCode, options) {
|
|
2165
|
+
assertAs(as);
|
|
2166
|
+
assertClient(client);
|
|
2167
|
+
assertString(deviceCode, '"deviceCode"');
|
|
2168
|
+
const parameters = new URLSearchParams(options?.additionalParameters);
|
|
2169
|
+
parameters.set('device_code', deviceCode);
|
|
2170
|
+
return tokenEndpointRequest(as, client, clientAuthentication, 'urn:ietf:params:oauth:grant-type:device_code', parameters, options);
|
|
2171
|
+
}
|
|
2172
|
+
export async function processDeviceCodeResponse(as, client, response, options) {
|
|
2173
|
+
return processGenericAccessTokenResponse(as, client, response, undefined, options?.[jweDecrypt], options?.recognizedTokenTypes);
|
|
2174
|
+
}
|
|
2175
|
+
export async function generateKeyPair(alg, options) {
|
|
2176
|
+
assertString(alg, '"alg"');
|
|
2177
|
+
const algorithm = algToSubtle(alg);
|
|
2178
|
+
if (alg.startsWith('PS') || alg.startsWith('RS')) {
|
|
2179
|
+
Object.assign(algorithm, {
|
|
2180
|
+
modulusLength: options?.modulusLength ?? 2048,
|
|
2181
|
+
publicExponent: new Uint8Array([0x01, 0x00, 0x01]),
|
|
2182
|
+
});
|
|
2183
|
+
}
|
|
2184
|
+
return crypto.subtle.generateKey(algorithm, options?.extractable ?? false, [
|
|
2185
|
+
'sign',
|
|
2186
|
+
'verify',
|
|
2187
|
+
]);
|
|
2188
|
+
}
|
|
2189
|
+
function normalizeHtu(htu) {
|
|
2190
|
+
const url = new URL(htu);
|
|
2191
|
+
url.search = '';
|
|
2192
|
+
url.hash = '';
|
|
2193
|
+
return url.href;
|
|
2194
|
+
}
|
|
2195
|
+
async function validateDPoP(request, accessToken, accessTokenClaims, options) {
|
|
2196
|
+
const headerValue = request.headers.get('dpop');
|
|
2197
|
+
if (headerValue === null) {
|
|
2198
|
+
throw OPE('operation indicated DPoP use but the request has no DPoP HTTP Header', INVALID_REQUEST, { headers: request.headers });
|
|
2199
|
+
}
|
|
2200
|
+
if (request.headers.get('authorization')?.toLowerCase().startsWith('dpop ') === false) {
|
|
2201
|
+
throw OPE(`operation indicated DPoP use but the request's Authorization HTTP Header scheme is not DPoP`, INVALID_REQUEST, { headers: request.headers });
|
|
2202
|
+
}
|
|
2203
|
+
if (typeof accessTokenClaims.cnf?.jkt !== 'string') {
|
|
2204
|
+
throw OPE('operation indicated DPoP use but the JWT Access Token has no jkt confirmation claim', INVALID_REQUEST, { claims: accessTokenClaims });
|
|
2205
|
+
}
|
|
2206
|
+
const clockSkew = getClockSkew(options);
|
|
2207
|
+
const proof = await validateJwt(headerValue, checkSigningAlgorithm.bind(undefined, options?.signingAlgorithms, undefined, supported), clockSkew, getClockTolerance(options), undefined)
|
|
2208
|
+
.then(checkJwtType.bind(undefined, 'dpop+jwt'))
|
|
2209
|
+
.then(validatePresence.bind(undefined, ['iat', 'jti', 'ath', 'htm', 'htu']));
|
|
2210
|
+
const now = epochTime() + clockSkew;
|
|
2211
|
+
const diff = Math.abs(now - proof.claims.iat);
|
|
2212
|
+
if (diff > 300) {
|
|
2213
|
+
throw OPE('DPoP Proof iat is not recent enough', JWT_TIMESTAMP_CHECK, {
|
|
2214
|
+
now,
|
|
2215
|
+
claims: proof.claims,
|
|
2216
|
+
claim: 'iat',
|
|
2217
|
+
});
|
|
2218
|
+
}
|
|
2219
|
+
if (proof.claims.htm !== request.method) {
|
|
2220
|
+
throw OPE('DPoP Proof htm mismatch', JWT_CLAIM_COMPARISON, {
|
|
2221
|
+
expected: request.method,
|
|
2222
|
+
claims: proof.claims,
|
|
2223
|
+
claim: 'htm',
|
|
2224
|
+
});
|
|
2225
|
+
}
|
|
2226
|
+
if (typeof proof.claims.htu !== 'string' ||
|
|
2227
|
+
normalizeHtu(proof.claims.htu) !== normalizeHtu(request.url)) {
|
|
2228
|
+
throw OPE('DPoP Proof htu mismatch', JWT_CLAIM_COMPARISON, {
|
|
2229
|
+
expected: normalizeHtu(request.url),
|
|
2230
|
+
claims: proof.claims,
|
|
2231
|
+
claim: 'htu',
|
|
2232
|
+
});
|
|
2233
|
+
}
|
|
2234
|
+
{
|
|
2235
|
+
const expected = b64u(await crypto.subtle.digest('SHA-256', buf(accessToken)));
|
|
2236
|
+
if (proof.claims.ath !== expected) {
|
|
2237
|
+
throw OPE('DPoP Proof ath mismatch', JWT_CLAIM_COMPARISON, {
|
|
2238
|
+
expected,
|
|
2239
|
+
claims: proof.claims,
|
|
2240
|
+
claim: 'ath',
|
|
2241
|
+
});
|
|
2242
|
+
}
|
|
2243
|
+
}
|
|
2244
|
+
{
|
|
2245
|
+
const expected = await calculateJwkThumbprint(proof.header.jwk);
|
|
2246
|
+
if (accessTokenClaims.cnf.jkt !== expected) {
|
|
2247
|
+
throw OPE('JWT Access Token confirmation mismatch', JWT_CLAIM_COMPARISON, {
|
|
2248
|
+
expected,
|
|
2249
|
+
claims: accessTokenClaims,
|
|
2250
|
+
claim: 'cnf.jkt',
|
|
2251
|
+
});
|
|
2252
|
+
}
|
|
2253
|
+
}
|
|
2254
|
+
const { 0: protectedHeader, 1: payload, 2: encodedSignature } = headerValue.split('.');
|
|
2255
|
+
const signature = b64u(encodedSignature);
|
|
2256
|
+
const { jwk, alg } = proof.header;
|
|
2257
|
+
if (!jwk) {
|
|
2258
|
+
throw OPE('DPoP Proof is missing the jwk header parameter', INVALID_REQUEST, {
|
|
2259
|
+
header: proof.header,
|
|
2260
|
+
});
|
|
2261
|
+
}
|
|
2262
|
+
const key = await importJwk(alg, jwk);
|
|
2263
|
+
if (key.type !== 'public') {
|
|
2264
|
+
throw OPE('DPoP Proof jwk header parameter must contain a public key', INVALID_REQUEST, {
|
|
2265
|
+
header: proof.header,
|
|
2266
|
+
});
|
|
2267
|
+
}
|
|
2268
|
+
await validateJwsSignature(protectedHeader, payload, key, signature);
|
|
2269
|
+
}
|
|
2270
|
+
export async function validateJwtAccessToken(as, request, expectedAudience, options) {
|
|
2271
|
+
assertAs(as);
|
|
2272
|
+
if (!looseInstanceOf(request, Request)) {
|
|
2273
|
+
throw CodedTypeError('"request" must be an instance of Request', ERR_INVALID_ARG_TYPE);
|
|
2274
|
+
}
|
|
2275
|
+
assertString(expectedAudience, '"expectedAudience"');
|
|
2276
|
+
const authorization = request.headers.get('authorization');
|
|
2277
|
+
if (authorization === null) {
|
|
2278
|
+
throw OPE('"request" is missing an Authorization HTTP Header', INVALID_REQUEST, {
|
|
2279
|
+
headers: request.headers,
|
|
2280
|
+
});
|
|
2281
|
+
}
|
|
2282
|
+
let { 0: scheme, 1: accessToken, length } = authorization.split(' ');
|
|
2283
|
+
scheme = scheme.toLowerCase();
|
|
2284
|
+
switch (scheme) {
|
|
2285
|
+
case 'dpop':
|
|
2286
|
+
case 'bearer':
|
|
2287
|
+
break;
|
|
2288
|
+
default:
|
|
2289
|
+
throw new UnsupportedOperationError('unsupported Authorization HTTP Header scheme', {
|
|
2290
|
+
cause: { headers: request.headers },
|
|
2291
|
+
});
|
|
2292
|
+
}
|
|
2293
|
+
if (length !== 2) {
|
|
2294
|
+
throw OPE('invalid Authorization HTTP Header format', INVALID_REQUEST, {
|
|
2295
|
+
headers: request.headers,
|
|
2296
|
+
});
|
|
2297
|
+
}
|
|
2298
|
+
const requiredClaims = [
|
|
2299
|
+
'iss',
|
|
2300
|
+
'exp',
|
|
2301
|
+
'aud',
|
|
2302
|
+
'sub',
|
|
2303
|
+
'iat',
|
|
2304
|
+
'jti',
|
|
2305
|
+
'client_id',
|
|
2306
|
+
];
|
|
2307
|
+
if (options?.requireDPoP || scheme === 'dpop' || request.headers.has('dpop')) {
|
|
2308
|
+
requiredClaims.push('cnf');
|
|
2309
|
+
}
|
|
2310
|
+
const { claims, header } = await validateJwt(accessToken, checkSigningAlgorithm.bind(undefined, options?.signingAlgorithms, undefined, supported), getClockSkew(options), getClockTolerance(options), undefined)
|
|
2311
|
+
.then(checkJwtType.bind(undefined, 'at+jwt'))
|
|
2312
|
+
.then(validatePresence.bind(undefined, requiredClaims))
|
|
2313
|
+
.then(validateIssuer.bind(undefined, as))
|
|
2314
|
+
.then(validateAudience.bind(undefined, expectedAudience))
|
|
2315
|
+
.catch(reassignRSCode);
|
|
2316
|
+
for (const claim of ['client_id', 'jti', 'sub']) {
|
|
2317
|
+
if (typeof claims[claim] !== 'string') {
|
|
2318
|
+
throw OPE(`unexpected JWT "${claim}" claim type`, INVALID_REQUEST, { claims });
|
|
2319
|
+
}
|
|
2320
|
+
}
|
|
2321
|
+
if ('cnf' in claims) {
|
|
2322
|
+
if (!isJsonObject(claims.cnf)) {
|
|
2323
|
+
throw OPE('unexpected JWT "cnf" (confirmation) claim value', INVALID_REQUEST, { claims });
|
|
2324
|
+
}
|
|
2325
|
+
const { 0: cnf, length } = Object.keys(claims.cnf);
|
|
2326
|
+
if (length) {
|
|
2327
|
+
if (length !== 1) {
|
|
2328
|
+
throw new UnsupportedOperationError('multiple confirmation claims are not supported', {
|
|
2329
|
+
cause: { claims },
|
|
2330
|
+
});
|
|
2331
|
+
}
|
|
2332
|
+
if (cnf !== 'jkt') {
|
|
2333
|
+
throw new UnsupportedOperationError('unsupported JWT Confirmation method', {
|
|
2334
|
+
cause: { claims },
|
|
2335
|
+
});
|
|
2336
|
+
}
|
|
2337
|
+
}
|
|
2338
|
+
}
|
|
2339
|
+
const { 0: protectedHeader, 1: payload, 2: encodedSignature } = accessToken.split('.');
|
|
2340
|
+
const signature = b64u(encodedSignature);
|
|
2341
|
+
const key = await getPublicSigKeyFromIssuerJwksUri(as, options, header);
|
|
2342
|
+
await validateJwsSignature(protectedHeader, payload, key, signature);
|
|
2343
|
+
if (options?.requireDPoP ||
|
|
2344
|
+
scheme === 'dpop' ||
|
|
2345
|
+
claims.cnf?.jkt !== undefined ||
|
|
2346
|
+
request.headers.has('dpop')) {
|
|
2347
|
+
await validateDPoP(request, accessToken, claims, options).catch(reassignRSCode);
|
|
2348
|
+
}
|
|
2349
|
+
return claims;
|
|
2350
|
+
}
|
|
2351
|
+
function reassignRSCode(err) {
|
|
2352
|
+
if (err instanceof OperationProcessingError && err?.code === INVALID_REQUEST) {
|
|
2353
|
+
err.code = INVALID_RESPONSE;
|
|
2354
|
+
}
|
|
2355
|
+
throw err;
|
|
2356
|
+
}
|
|
2357
|
+
export async function backchannelAuthenticationRequest(as, client, clientAuthentication, parameters, options) {
|
|
2358
|
+
assertAs(as);
|
|
2359
|
+
assertClient(client);
|
|
2360
|
+
const url = resolveEndpoint(as, 'backchannel_authentication_endpoint', client.use_mtls_endpoint_aliases, options?.[allowInsecureRequests] !== true);
|
|
2361
|
+
const body = new URLSearchParams(parameters);
|
|
2362
|
+
body.set('client_id', client.client_id);
|
|
2363
|
+
const headers = prepareHeaders(options?.headers);
|
|
2364
|
+
headers.set('accept', 'application/json');
|
|
2365
|
+
return authenticatedRequest(as, client, clientAuthentication, url, body, headers, options);
|
|
2366
|
+
}
|
|
2367
|
+
export async function processBackchannelAuthenticationResponse(as, client, response) {
|
|
2368
|
+
assertAs(as);
|
|
2369
|
+
assertClient(client);
|
|
2370
|
+
if (!looseInstanceOf(response, Response)) {
|
|
2371
|
+
throw CodedTypeError('"response" must be an instance of Response', ERR_INVALID_ARG_TYPE);
|
|
2372
|
+
}
|
|
2373
|
+
await checkOAuthBodyError(response, 200, 'Backchannel Authentication Endpoint');
|
|
2374
|
+
assertReadableResponse(response);
|
|
2375
|
+
const json = await getResponseJsonBody(response);
|
|
2376
|
+
assertString(json.auth_req_id, '"response" body "auth_req_id" property', INVALID_RESPONSE, {
|
|
2377
|
+
body: json,
|
|
2378
|
+
});
|
|
2379
|
+
let expiresIn = typeof json.expires_in !== 'number' ? parseFloat(json.expires_in) : json.expires_in;
|
|
2380
|
+
assertNumber(expiresIn, true, '"response" body "expires_in" property', INVALID_RESPONSE, {
|
|
2381
|
+
body: json,
|
|
2382
|
+
});
|
|
2383
|
+
json.expires_in = expiresIn;
|
|
2384
|
+
if (json.interval !== undefined) {
|
|
2385
|
+
assertNumber(json.interval, false, '"response" body "interval" property', INVALID_RESPONSE, {
|
|
2386
|
+
body: json,
|
|
2387
|
+
});
|
|
2388
|
+
}
|
|
2389
|
+
return json;
|
|
2390
|
+
}
|
|
2391
|
+
export async function backchannelAuthenticationGrantRequest(as, client, clientAuthentication, authReqId, options) {
|
|
2392
|
+
assertAs(as);
|
|
2393
|
+
assertClient(client);
|
|
2394
|
+
assertString(authReqId, '"authReqId"');
|
|
2395
|
+
const parameters = new URLSearchParams(options?.additionalParameters);
|
|
2396
|
+
parameters.set('auth_req_id', authReqId);
|
|
2397
|
+
return tokenEndpointRequest(as, client, clientAuthentication, 'urn:openid:params:grant-type:ciba', parameters, options);
|
|
2398
|
+
}
|
|
2399
|
+
export async function processBackchannelAuthenticationGrantResponse(as, client, response, options) {
|
|
2400
|
+
return processGenericAccessTokenResponse(as, client, response, undefined, options?.[jweDecrypt], options?.recognizedTokenTypes);
|
|
2401
|
+
}
|
|
2402
|
+
export async function dynamicClientRegistrationRequest(as, metadata, options) {
|
|
2403
|
+
assertAs(as);
|
|
2404
|
+
const url = resolveEndpoint(as, 'registration_endpoint', metadata.use_mtls_endpoint_aliases, options?.[allowInsecureRequests] !== true);
|
|
2405
|
+
const headers = prepareHeaders(options?.headers);
|
|
2406
|
+
headers.set('accept', 'application/json');
|
|
2407
|
+
headers.set('content-type', 'application/json');
|
|
2408
|
+
const method = 'POST';
|
|
2409
|
+
if (options?.DPoP) {
|
|
2410
|
+
assertDPoP(options.DPoP);
|
|
2411
|
+
await options.DPoP.addProof(url, headers, method, options.initialAccessToken);
|
|
2412
|
+
}
|
|
2413
|
+
if (options?.initialAccessToken) {
|
|
2414
|
+
headers.set('authorization', `${headers.has('dpop') ? 'DPoP' : 'Bearer'} ${options.initialAccessToken}`);
|
|
2415
|
+
}
|
|
2416
|
+
const response = await (options?.[customFetch] || fetch)(url.href, {
|
|
2417
|
+
body: JSON.stringify(metadata),
|
|
2418
|
+
headers: Object.fromEntries(headers.entries()),
|
|
2419
|
+
method,
|
|
2420
|
+
redirect: 'manual',
|
|
2421
|
+
signal: signal(url, options?.signal),
|
|
2422
|
+
});
|
|
2423
|
+
options?.DPoP?.cacheNonce(response);
|
|
2424
|
+
return response;
|
|
2425
|
+
}
|
|
2426
|
+
export async function processDynamicClientRegistrationResponse(response) {
|
|
2427
|
+
if (!looseInstanceOf(response, Response)) {
|
|
2428
|
+
throw CodedTypeError('"response" must be an instance of Response', ERR_INVALID_ARG_TYPE);
|
|
2429
|
+
}
|
|
2430
|
+
await checkOAuthBodyError(response, 201, 'Dynamic Client Registration Endpoint');
|
|
2431
|
+
assertReadableResponse(response);
|
|
2432
|
+
const json = await getResponseJsonBody(response);
|
|
2433
|
+
assertString(json.client_id, '"response" body "client_id" property', INVALID_RESPONSE, {
|
|
2434
|
+
body: json,
|
|
2435
|
+
});
|
|
2436
|
+
if (json.client_secret !== undefined) {
|
|
2437
|
+
assertString(json.client_secret, '"response" body "client_secret" property', INVALID_RESPONSE, {
|
|
2438
|
+
body: json,
|
|
2439
|
+
});
|
|
2440
|
+
}
|
|
2441
|
+
if (json.client_secret) {
|
|
2442
|
+
assertNumber(json.client_secret_expires_at, true, '"response" body "client_secret_expires_at" property', INVALID_RESPONSE, {
|
|
2443
|
+
body: json,
|
|
2444
|
+
});
|
|
2445
|
+
}
|
|
2446
|
+
return json;
|
|
2447
|
+
}
|
|
2448
|
+
export async function resourceDiscoveryRequest(resourceIdentifier, options) {
|
|
2449
|
+
return performDiscovery(resourceIdentifier, 'resourceIdentifier', (url) => {
|
|
2450
|
+
prependWellKnown(url, '.well-known/oauth-protected-resource', true);
|
|
2451
|
+
return url;
|
|
2452
|
+
}, options);
|
|
2453
|
+
}
|
|
2454
|
+
export async function processResourceDiscoveryResponse(expectedResourceIdentifier, response) {
|
|
2455
|
+
const expected = expectedResourceIdentifier;
|
|
2456
|
+
if (!(expected instanceof URL) && expected !== _nodiscoverycheck) {
|
|
2457
|
+
throw CodedTypeError('"expectedResourceIdentifier" must be an instance of URL', ERR_INVALID_ARG_TYPE);
|
|
2458
|
+
}
|
|
2459
|
+
if (!looseInstanceOf(response, Response)) {
|
|
2460
|
+
throw CodedTypeError('"response" must be an instance of Response', ERR_INVALID_ARG_TYPE);
|
|
2461
|
+
}
|
|
2462
|
+
if (response.status !== 200) {
|
|
2463
|
+
throw OPE('"response" is not a conform Resource Server Metadata response (unexpected HTTP status code)', RESPONSE_IS_NOT_CONFORM, response);
|
|
2464
|
+
}
|
|
2465
|
+
assertReadableResponse(response);
|
|
2466
|
+
const json = await getResponseJsonBody(response);
|
|
2467
|
+
assertString(json.resource, '"response" body "resource" property', INVALID_RESPONSE, {
|
|
2468
|
+
body: json,
|
|
2469
|
+
});
|
|
2470
|
+
if (expected !== _nodiscoverycheck && new URL(json.resource).href !== expected.href) {
|
|
2471
|
+
throw OPE('"response" body "resource" property does not match the expected value', JSON_ATTRIBUTE_COMPARISON, { expected: expected.href, body: json, attribute: 'resource' });
|
|
2472
|
+
}
|
|
2473
|
+
return json;
|
|
2474
|
+
}
|
|
2475
|
+
async function getResponseJsonBody(response, check = assertApplicationJson) {
|
|
2476
|
+
let json;
|
|
2477
|
+
try {
|
|
2478
|
+
json = await response.json();
|
|
2479
|
+
}
|
|
2480
|
+
catch (cause) {
|
|
2481
|
+
check(response);
|
|
2482
|
+
throw OPE('failed to parse "response" body as JSON', PARSE_ERROR, cause);
|
|
2483
|
+
}
|
|
2484
|
+
if (!isJsonObject(json)) {
|
|
2485
|
+
throw OPE('"response" body must be a top level object', INVALID_RESPONSE, { body: json });
|
|
2486
|
+
}
|
|
2487
|
+
return json;
|
|
2488
|
+
}
|
|
2489
|
+
export const _nopkce = nopkce;
|
|
2490
|
+
export const _nodiscoverycheck = Symbol();
|
|
2491
|
+
export const _expectedIssuer = Symbol();
|
|
2492
|
+
//# sourceMappingURL=index.js.map
|