{"version":3,"file":"build.DCrexNvs.mjs","names":["o","isCryptoKey","e","e","a","e","e","t","s","n","e","t","c","a","r","i","o","l","u","r","a","n","r","s","i","e","s","a","n","i","r","s","e","a","c","r","o","d","s","h","i","n","c","e","t","r","a","t","e","t","a","s","e","r","t","t","e","o","r","a","t","e","o"],"sources":["https:/ga.jspm.io/npm:jose@5.9.3/_/CNexlW7T.js","https:/ga.jspm.io/npm:jose@5.9.3/_/zZpWotyK.js","https:/ga.jspm.io/npm:jose@5.9.3/_/DhGwGDkS.js","https:/ga.jspm.io/npm:jose@5.9.3/_/C_CWsW65.js","https:/ga.jspm.io/npm:jose@5.9.3/_/BWzjuGJA.js","https:/ga.jspm.io/npm:jose@5.9.3/_/DXtQ18sb.js","https:/ga.jspm.io/npm:jose@5.9.3/_/z32JYQqa.js","https:/ga.jspm.io/npm:jose@5.9.3/_/ifQSxW8Q.js","https:/ga.jspm.io/npm:jose@5.9.3/_/C0rpSoBt.js","https:/ga.jspm.io/npm:jose@5.9.3/_/CGSr_E-H.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/key/import.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/jwe/flattened/decrypt.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/jwe/compact/decrypt.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/jwe/general/decrypt.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/key/export.js","https:/ga.jspm.io/npm:jose@5.9.3/_/DARKQ00i.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/jwe/general/encrypt.js","https:/ga.jspm.io/npm:jose@5.9.3/_/D6UUwYM5.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/jws/flattened/verify.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/jws/compact/verify.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/jws/general/verify.js","https:/ga.jspm.io/npm:jose@5.9.3/_/Bk6ZYww6.js","https:/ga.jspm.io/npm:jose@5.9.3/_/DrseF5q4.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/jwt/verify.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/jwt/decrypt.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/jwe/compact/encrypt.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/jws/flattened/sign.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/jws/compact/sign.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/jws/general/sign.js","https:/ga.jspm.io/npm:jose@5.9.3/_/CLsKaC7_.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/jwt/sign.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/jwt/encrypt.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/jwk/thumbprint.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/jwk/embedded.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/jwks/local.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/jwks/remote.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/jwt/unsecured.js","https:/ga.jspm.io/npm:jose@5.9.3/_/SszN3Lfa.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/util/decode_protected_header.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/util/decode_jwt.js","https:/ga.jspm.io/npm:jose@5.9.3/_/CbWrQy2k.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/key/generate_key_pair.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/key/generate_secret.js","https:/ga.jspm.io/npm:jose@5.9.3/dist/browser/index.js","https:/ga.jspm.io/npm:oauth4webapi@2.17.0/build/index.js"],"sourcesContent":["var o=crypto;const isCryptoKey=o=>o instanceof CryptoKey;export{o as c,isCryptoKey as i};\n//# sourceMappingURL=CNexlW7T.js.map\n","import{c as t}from\"./CNexlW7T.js\";const digest=async(n,e)=>{const r=`SHA-${n.slice(-3)}`;return new Uint8Array(await t.subtle.digest(r,e))};const n=new TextEncoder;const e=new TextDecoder;const r=2**32;function concat(...t){const n=t.reduce(((t,{length:n})=>t+n),0);const e=new Uint8Array(n);let r=0;for(const n of t){e.set(n,r);r+=n.length}return e}function p2s(t,e){return concat(n.encode(t),new Uint8Array([0]),e)}function writeUInt32BE(t,n,e){if(n<0||n>=r)throw new RangeError(`value must be >= 0 and <= ${r-1}. Received ${n}`);t.set([n>>>24,n>>>16,n>>>8,n&255],e)}function uint64be(t){const n=Math.floor(t/r);const e=t%r;const c=new Uint8Array(8);writeUInt32BE(c,n,0);writeUInt32BE(c,e,4);return c}function uint32be(t){const n=new Uint8Array(4);writeUInt32BE(n,t);return n}function lengthAndInput(t){return concat(uint32be(t.length),t)}async function concatKdf(t,n,e){const r=Math.ceil((n>>3)/32);const c=new Uint8Array(r*32);for(let n=0;n<r;n++){const r=new Uint8Array(4+t.length+e.length);r.set(uint32be(n+1));r.set(t,4);r.set(e,4+t.length);c.set(await digest(\"sha256\",r),n*32)}return c.slice(0,n>>3)}const encodeBase64=t=>{let e=t;typeof e===\"string\"&&(e=n.encode(e));const r=32768;const c=[];for(let t=0;t<e.length;t+=r)c.push(String.fromCharCode.apply(null,e.subarray(t,t+r)));return btoa(c.join(\"\"))};const encode=t=>encodeBase64(t).replace(/=/g,\"\").replace(/\\+/g,\"-\").replace(/\\//g,\"_\");const decodeBase64=t=>{const n=atob(t);const e=new Uint8Array(n.length);for(let t=0;t<n.length;t++)e[t]=n.charCodeAt(t);return e};const decode=t=>{let n=t;n instanceof Uint8Array&&(n=e.decode(n));n=n.replace(/-/g,\"+\").replace(/_/g,\"/\").replace(/\\s/g,\"\");try{return decodeBase64(n)}catch{throw new TypeError(\"The input to be decoded is not correctly encoded.\")}};export{encode as a,e as b,decode as c,digest as d,n as e,concat as f,uint32be as g,concatKdf as h,encodeBase64 as i,decodeBase64 as j,lengthAndInput as l,p2s as p,uint64be as u};\n//# sourceMappingURL=zZpWotyK.js.map\n","class JOSEError extends Error{static get code(){return\"ERR_JOSE_GENERIC\"}constructor(e){super(e);this.code=\"ERR_JOSE_GENERIC\";this.name=this.constructor.name;Error.captureStackTrace?.(this,this.constructor)}}class JWTClaimValidationFailed extends JOSEError{static get code(){return\"ERR_JWT_CLAIM_VALIDATION_FAILED\"}constructor(e,t,r=\"unspecified\",s=\"unspecified\"){super(e);this.code=\"ERR_JWT_CLAIM_VALIDATION_FAILED\";this.claim=r;this.reason=s;this.payload=t}}class JWTExpired extends JOSEError{static get code(){return\"ERR_JWT_EXPIRED\"}constructor(e,t,r=\"unspecified\",s=\"unspecified\"){super(e);this.code=\"ERR_JWT_EXPIRED\";this.claim=r;this.reason=s;this.payload=t}}class JOSEAlgNotAllowed extends JOSEError{constructor(){super(...arguments);this.code=\"ERR_JOSE_ALG_NOT_ALLOWED\"}static get code(){return\"ERR_JOSE_ALG_NOT_ALLOWED\"}}class JOSENotSupported extends JOSEError{constructor(){super(...arguments);this.code=\"ERR_JOSE_NOT_SUPPORTED\"}static get code(){return\"ERR_JOSE_NOT_SUPPORTED\"}}class JWEDecryptionFailed extends JOSEError{constructor(){super(...arguments);this.code=\"ERR_JWE_DECRYPTION_FAILED\";this.message=\"decryption operation failed\"}static get code(){return\"ERR_JWE_DECRYPTION_FAILED\"}}class JWEInvalid extends JOSEError{constructor(){super(...arguments);this.code=\"ERR_JWE_INVALID\"}static get code(){return\"ERR_JWE_INVALID\"}}class JWSInvalid extends JOSEError{constructor(){super(...arguments);this.code=\"ERR_JWS_INVALID\"}static get code(){return\"ERR_JWS_INVALID\"}}class JWTInvalid extends JOSEError{constructor(){super(...arguments);this.code=\"ERR_JWT_INVALID\"}static get code(){return\"ERR_JWT_INVALID\"}}class JWKInvalid extends JOSEError{constructor(){super(...arguments);this.code=\"ERR_JWK_INVALID\"}static get code(){return\"ERR_JWK_INVALID\"}}class JWKSInvalid extends JOSEError{constructor(){super(...arguments);this.code=\"ERR_JWKS_INVALID\"}static get code(){return\"ERR_JWKS_INVALID\"}}class JWKSNoMatchingKey extends JOSEError{constructor(){super(...arguments);this.code=\"ERR_JWKS_NO_MATCHING_KEY\";this.message=\"no applicable key found in the JSON Web Key Set\"}static get code(){return\"ERR_JWKS_NO_MATCHING_KEY\"}}class JWKSMultipleMatchingKeys extends JOSEError{constructor(){super(...arguments);this.code=\"ERR_JWKS_MULTIPLE_MATCHING_KEYS\";this.message=\"multiple matching keys found in the JSON Web Key Set\"}static get code(){return\"ERR_JWKS_MULTIPLE_MATCHING_KEYS\"}}Symbol.asyncIterator;class JWKSTimeout extends JOSEError{constructor(){super(...arguments);this.code=\"ERR_JWKS_TIMEOUT\";this.message=\"request timed out\"}static get code(){return\"ERR_JWKS_TIMEOUT\"}}class JWSSignatureVerificationFailed extends JOSEError{constructor(){super(...arguments);this.code=\"ERR_JWS_SIGNATURE_VERIFICATION_FAILED\";this.message=\"signature verification failed\"}static get code(){return\"ERR_JWS_SIGNATURE_VERIFICATION_FAILED\"}}var e=Object.freeze(Object.defineProperty({__proto__:null,JOSEAlgNotAllowed:JOSEAlgNotAllowed,JOSEError:JOSEError,JOSENotSupported:JOSENotSupported,JWEDecryptionFailed:JWEDecryptionFailed,JWEInvalid:JWEInvalid,JWKInvalid:JWKInvalid,JWKSInvalid:JWKSInvalid,JWKSMultipleMatchingKeys:JWKSMultipleMatchingKeys,JWKSNoMatchingKey:JWKSNoMatchingKey,JWKSTimeout:JWKSTimeout,JWSInvalid:JWSInvalid,JWSSignatureVerificationFailed:JWSSignatureVerificationFailed,JWTClaimValidationFailed:JWTClaimValidationFailed,JWTExpired:JWTExpired,JWTInvalid:JWTInvalid},Symbol.toStringTag,{value:\"Module\"}));export{JWSInvalid as J,JWKInvalid as a,JOSENotSupported as b,JWKSTimeout as c,JOSEError as d,e,JWKSNoMatchingKey as f,JWKSInvalid as g,JWKSMultipleMatchingKeys as h,JWTInvalid as i,JWEInvalid as j,JOSEAlgNotAllowed as k,JWEDecryptionFailed as l,JWSSignatureVerificationFailed as m,JWTClaimValidationFailed as n,JWTExpired as o};\n//# sourceMappingURL=DhGwGDkS.js.map\n","import{c as e}from\"./CNexlW7T.js\";import{b as a}from\"./DhGwGDkS.js\";function subtleMapping(e){let r;let s;switch(e.kty){case\"RSA\":switch(e.alg){case\"PS256\":case\"PS384\":case\"PS512\":r={name:\"RSA-PSS\",hash:`SHA-${e.alg.slice(-3)}`};s=e.d?[\"sign\"]:[\"verify\"];break;case\"RS256\":case\"RS384\":case\"RS512\":r={name:\"RSASSA-PKCS1-v1_5\",hash:`SHA-${e.alg.slice(-3)}`};s=e.d?[\"sign\"]:[\"verify\"];break;case\"RSA-OAEP\":case\"RSA-OAEP-256\":case\"RSA-OAEP-384\":case\"RSA-OAEP-512\":r={name:\"RSA-OAEP\",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`};s=e.d?[\"decrypt\",\"unwrapKey\"]:[\"encrypt\",\"wrapKey\"];break;default:throw new a('Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value')}break;case\"EC\":switch(e.alg){case\"ES256\":r={name:\"ECDSA\",namedCurve:\"P-256\"};s=e.d?[\"sign\"]:[\"verify\"];break;case\"ES384\":r={name:\"ECDSA\",namedCurve:\"P-384\"};s=e.d?[\"sign\"]:[\"verify\"];break;case\"ES512\":r={name:\"ECDSA\",namedCurve:\"P-521\"};s=e.d?[\"sign\"]:[\"verify\"];break;case\"ECDH-ES\":case\"ECDH-ES+A128KW\":case\"ECDH-ES+A192KW\":case\"ECDH-ES+A256KW\":r={name:\"ECDH\",namedCurve:e.crv};s=e.d?[\"deriveBits\"]:[];break;default:throw new a('Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value')}break;case\"OKP\":switch(e.alg){case\"EdDSA\":r={name:e.crv};s=e.d?[\"sign\"]:[\"verify\"];break;case\"ECDH-ES\":case\"ECDH-ES+A128KW\":case\"ECDH-ES+A192KW\":case\"ECDH-ES+A256KW\":r={name:e.crv};s=e.d?[\"deriveBits\"]:[];break;default:throw new a('Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value')}break;default:throw new a('Invalid or unsupported JWK \"kty\" (Key Type) Parameter value')}return{algorithm:r,keyUsages:s}}const parse=async a=>{if(!a.alg)throw new TypeError('\"alg\" argument is required when \"jwk.alg\" is not present');const{algorithm:r,keyUsages:s}=subtleMapping(a);const t=[r,a.ext??false,a.key_ops??s];const n={...a};delete n.alg;delete n.use;return e.subtle.importKey(\"jwk\",n,...t)};export{parse as p};\n//# sourceMappingURL=C_CWsW65.js.map\n","import{i as e}from\"./CNexlW7T.js\";function message(e,t,...o){o=o.filter(Boolean);if(o.length>2){const t=o.pop();e+=`one of type ${o.join(\", \")}, or ${t}.`}else o.length===2?e+=`one of type ${o[0]} or ${o[1]}.`:e+=`of type ${o[0]}.`;t==null?e+=` Received ${t}`:typeof t===\"function\"&&t.name?e+=` Received function ${t.name}`:typeof t===\"object\"&&t!=null&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`);return e}var invalidKeyInput=(e,...t)=>message(\"Key must be \",e,...t);function withAlg(e,t,...o){return message(`Key for the ${e} algorithm must be `,t,...o)}var isKeyLike=t=>!!e(t)||t?.[Symbol.toStringTag]===\"KeyObject\";const t=[\"CryptoKey\"];export{isKeyLike as a,invalidKeyInput as i,t,withAlg as w};\n//# sourceMappingURL=BWzjuGJA.js.map\n","function isObjectLike(t){return typeof t===\"object\"&&t!==null}function isObject(t){if(!isObjectLike(t)||Object.prototype.toString.call(t)!==\"[object Object]\")return false;if(Object.getPrototypeOf(t)===null)return true;let e=t;while(Object.getPrototypeOf(e)!==null)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}export{isObject as i};\n//# sourceMappingURL=DXtQ18sb.js.map\n","import{c as e}from\"./zZpWotyK.js\";import{p as t}from\"./C_CWsW65.js\";import{a as r,w as i,t as o}from\"./BWzjuGJA.js\";import{i as s}from\"./DXtQ18sb.js\";import{b as n}from\"./DhGwGDkS.js\";function unusable(e,t=\"algorithm.name\"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function isAlgorithm(e,t){return e.name===t}function getHashLength(e){return parseInt(e.name.slice(4),10)}function getNamedCurve(e){switch(e){case\"ES256\":return\"P-256\";case\"ES384\":return\"P-384\";case\"ES512\":return\"P-521\";default:throw new Error(\"unreachable\")}}function checkUsage(e,t){if(t.length&&!t.some((t=>e.usages.includes(t)))){let e=\"CryptoKey does not support this operation, its usages must include \";if(t.length>2){const r=t.pop();e+=`one of ${t.join(\", \")}, or ${r}.`}else t.length===2?e+=`one of ${t[0]} or ${t[1]}.`:e+=`${t[0]}.`;throw new TypeError(e)}}function checkSigCryptoKey(e,t,...r){switch(t){case\"HS256\":case\"HS384\":case\"HS512\":{if(!isAlgorithm(e.algorithm,\"HMAC\"))throw unusable(\"HMAC\");const r=parseInt(t.slice(2),10);const i=getHashLength(e.algorithm.hash);if(i!==r)throw unusable(`SHA-${r}`,\"algorithm.hash\");break}case\"RS256\":case\"RS384\":case\"RS512\":{if(!isAlgorithm(e.algorithm,\"RSASSA-PKCS1-v1_5\"))throw unusable(\"RSASSA-PKCS1-v1_5\");const r=parseInt(t.slice(2),10);const i=getHashLength(e.algorithm.hash);if(i!==r)throw unusable(`SHA-${r}`,\"algorithm.hash\");break}case\"PS256\":case\"PS384\":case\"PS512\":{if(!isAlgorithm(e.algorithm,\"RSA-PSS\"))throw unusable(\"RSA-PSS\");const r=parseInt(t.slice(2),10);const i=getHashLength(e.algorithm.hash);if(i!==r)throw unusable(`SHA-${r}`,\"algorithm.hash\");break}case\"EdDSA\":if(e.algorithm.name!==\"Ed25519\"&&e.algorithm.name!==\"Ed448\")throw unusable(\"Ed25519 or Ed448\");break;case\"ES256\":case\"ES384\":case\"ES512\":{if(!isAlgorithm(e.algorithm,\"ECDSA\"))throw unusable(\"ECDSA\");const r=getNamedCurve(t);const i=e.algorithm.namedCurve;if(i!==r)throw unusable(r,\"algorithm.namedCurve\");break}default:throw new TypeError(\"CryptoKey does not support this operation\")}checkUsage(e,r)}function checkEncCryptoKey(e,t,...r){switch(t){case\"A128GCM\":case\"A192GCM\":case\"A256GCM\":{if(!isAlgorithm(e.algorithm,\"AES-GCM\"))throw unusable(\"AES-GCM\");const r=parseInt(t.slice(1,4),10);const i=e.algorithm.length;if(i!==r)throw unusable(r,\"algorithm.length\");break}case\"A128KW\":case\"A192KW\":case\"A256KW\":{if(!isAlgorithm(e.algorithm,\"AES-KW\"))throw unusable(\"AES-KW\");const r=parseInt(t.slice(1,4),10);const i=e.algorithm.length;if(i!==r)throw unusable(r,\"algorithm.length\");break}case\"ECDH\":switch(e.algorithm.name){case\"ECDH\":case\"X25519\":case\"X448\":break;default:throw unusable(\"ECDH, X25519, or X448\")}break;case\"PBES2-HS256+A128KW\":case\"PBES2-HS384+A192KW\":case\"PBES2-HS512+A256KW\":if(!isAlgorithm(e.algorithm,\"PBKDF2\"))throw unusable(\"PBKDF2\");break;case\"RSA-OAEP\":case\"RSA-OAEP-256\":case\"RSA-OAEP-384\":case\"RSA-OAEP-512\":{if(!isAlgorithm(e.algorithm,\"RSA-OAEP\"))throw unusable(\"RSA-OAEP\");const r=parseInt(t.slice(9),10)||1;const i=getHashLength(e.algorithm.hash);if(i!==r)throw unusable(`SHA-${r}`,\"algorithm.hash\");break}default:throw new TypeError(\"CryptoKey does not support this operation\")}checkUsage(e,r)}const isDisjoint=(...e)=>{const t=e.filter(Boolean);if(t.length===0||t.length===1)return true;let r;for(const e of t){const t=Object.keys(e);if(r&&r.size!==0)for(const e of t){if(r.has(e))return false;r.add(e)}else r=new Set(t)}return true};var checkKeyLength=(e,t)=>{if(e.startsWith(\"RS\")||e.startsWith(\"PS\")){const{modulusLength:r}=t.algorithm;if(typeof r!==\"number\"||r<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}};function isJWK(e){return s(e)&&typeof e.kty===\"string\"}function isPrivateJWK(e){return e.kty!==\"oct\"&&typeof e.d===\"string\"}function isPublicJWK(e){return e.kty!==\"oct\"&&typeof e.d===\"undefined\"}function isSecretJWK(e){return isJWK(e)&&e.kty===\"oct\"&&typeof e.k===\"string\"}const exportKeyValue=t=>e(t);let a;let c;const isKeyObject=e=>e?.[Symbol.toStringTag]===\"KeyObject\";const importAndCache=async(e,r,i,o,s=false)=>{let n=e.get(r);if(n?.[o])return n[o];const a=await t({...i,alg:o});s&&Object.freeze(r);n?n[o]=a:e.set(r,{[o]:a});return a};const normalizePublicKey=(t,r)=>{if(isKeyObject(t)){let e=t.export({format:\"jwk\"});delete e.d;delete e.dp;delete e.dq;delete e.p;delete e.q;delete e.qi;if(e.k)return exportKeyValue(e.k);c||(c=new WeakMap);return importAndCache(c,t,e,r)}if(isJWK(t)){if(t.k)return e(t.k);c||(c=new WeakMap);const i=importAndCache(c,t,t,r,true);return i}return t};const normalizePrivateKey=(t,r)=>{if(isKeyObject(t)){let e=t.export({format:\"jwk\"});if(e.k)return exportKeyValue(e.k);a||(a=new WeakMap);return importAndCache(a,t,e,r)}if(isJWK(t)){if(t.k)return e(t.k);a||(a=new WeakMap);const i=importAndCache(a,t,t,r,true);return i}return t};var h={normalizePublicKey:normalizePublicKey,normalizePrivateKey:normalizePrivateKey};const tag=e=>e?.[Symbol.toStringTag];const jwkMatchesOp=(e,t,r)=>{if(t.use!==void 0&&t.use!==\"sig\")throw new TypeError(\"Invalid key for this operation, when present its use must be sig\");if(t.key_ops!==void 0&&t.key_ops.includes?.(r)!==true)throw new TypeError(`Invalid key for this operation, when present its key_ops must include ${r}`);if(t.alg!==void 0&&t.alg!==e)throw new TypeError(`Invalid key for this operation, when present its alg must be ${e}`);return true};const symmetricTypeCheck=(e,t,s,n)=>{if(!(t instanceof Uint8Array)){if(n&&isJWK(t)){if(isSecretJWK(t)&&jwkMatchesOp(e,t,s))return;throw new TypeError('JSON Web Key for symmetric algorithms must have JWK \"kty\" (Key Type) equal to \"oct\" and the JWK \"k\" (Key Value) present')}if(!r(t))throw new TypeError(i(e,t,...o,\"Uint8Array\",n?\"JSON Web Key\":null));if(t.type!==\"secret\")throw new TypeError(`${tag(t)} instances for symmetric algorithms must be of type \"secret\"`)}};const asymmetricTypeCheck=(e,t,s,n)=>{if(n&&isJWK(t))switch(s){case\"sign\":if(isPrivateJWK(t)&&jwkMatchesOp(e,t,s))return;throw new TypeError(\"JSON Web Key for this operation be a private JWK\");case\"verify\":if(isPublicJWK(t)&&jwkMatchesOp(e,t,s))return;throw new TypeError(\"JSON Web Key for this operation be a public JWK\")}if(!r(t))throw new TypeError(i(e,t,...o,n?\"JSON Web Key\":null));if(t.type===\"secret\")throw new TypeError(`${tag(t)} instances for asymmetric algorithms must not be of type \"secret\"`);if(s===\"sign\"&&t.type===\"public\")throw new TypeError(`${tag(t)} instances for asymmetric algorithm signing must be of type \"private\"`);if(s===\"decrypt\"&&t.type===\"public\")throw new TypeError(`${tag(t)} instances for asymmetric algorithm decryption must be of type \"private\"`);if(t.algorithm&&s===\"verify\"&&t.type===\"private\")throw new TypeError(`${tag(t)} instances for asymmetric algorithm verifying must be of type \"public\"`);if(t.algorithm&&s===\"encrypt\"&&t.type===\"private\")throw new TypeError(`${tag(t)} instances for asymmetric algorithm encryption must be of type \"public\"`)};function checkKeyType(e,t,r,i){const o=t.startsWith(\"HS\")||t===\"dir\"||t.startsWith(\"PBES2\")||/^A\\d{3}(?:GCM)?KW$/.test(t);o?symmetricTypeCheck(t,r,i,e):asymmetricTypeCheck(t,r,i,e)}var l=checkKeyType.bind(void 0,false);const u=checkKeyType.bind(void 0,true);function validateCrit(e,t,r,i,o){if(o.crit!==void 0&&i?.crit===void 0)throw new e('\"crit\" (Critical) Header Parameter MUST be integrity protected');if(!i||i.crit===void 0)return new Set;if(!Array.isArray(i.crit)||i.crit.length===0||i.crit.some((e=>typeof e!==\"string\"||e.length===0)))throw new e('\"crit\" (Critical) Header Parameter MUST be an array of non-empty strings when present');let s;s=r!==void 0?new Map([...Object.entries(r),...t.entries()]):t;for(const t of i.crit){if(!s.has(t))throw new n(`Extension Header Parameter \"${t}\" is not recognized`);if(o[t]===void 0)throw new e(`Extension Header Parameter \"${t}\" is missing`);if(s.get(t)&&i[t]===void 0)throw new e(`Extension Header Parameter \"${t}\" MUST be integrity protected`)}return new Set(i.crit)}export{checkKeyLength as a,u as b,l as c,isJWK as d,checkEncCryptoKey as e,checkSigCryptoKey as f,isDisjoint as i,h as n,validateCrit as v};\n//# sourceMappingURL=z32JYQqa.js.map\n","import{c as a}from\"./CNexlW7T.js\";var r=a.getRandomValues.bind(a);export{r};\n//# sourceMappingURL=ifQSxW8Q.js.map\n","import{f as e,u as t,l as r,e as n,g as a,h as s,p as i,a as c}from\"./zZpWotyK.js\";import{c as o,i as y}from\"./CNexlW7T.js\";import{e as w,a as u}from\"./z32JYQqa.js\";import{i as l,t as p}from\"./BWzjuGJA.js\";import{r as A}from\"./ifQSxW8Q.js\";import{b as h,j as f,l as g}from\"./DhGwGDkS.js\";function bitLength$1(e){switch(e){case\"A128GCM\":case\"A128GCMKW\":case\"A192GCM\":case\"A192GCMKW\":case\"A256GCM\":case\"A256GCMKW\":return 96;case\"A128CBC-HS256\":case\"A192CBC-HS384\":case\"A256CBC-HS512\":return 128;default:throw new h(`Unsupported JWE Algorithm: ${e}`)}}var generateIv=e=>A(new Uint8Array(bitLength$1(e)>>3));const checkIvLength=(e,t)=>{if(t.length<<3!==bitLength$1(e))throw new f(\"Invalid Initialization Vector length\")};const checkCekLength=(e,t)=>{const r=e.byteLength<<3;if(r!==t)throw new f(`Invalid Content Encryption Key length. Expected ${t} bits, got ${r} bits`)};const timingSafeEqual=(e,t)=>{if(!(e instanceof Uint8Array))throw new TypeError(\"First argument must be a buffer\");if(!(t instanceof Uint8Array))throw new TypeError(\"Second argument must be a buffer\");if(e.length!==t.length)throw new TypeError(\"Input buffers must have the same length\");const r=e.length;let n=0;let a=-1;while(++a<r)n|=e[a]^t[a];return n===0};async function cbcDecrypt(r,n,a,s,i,c){if(!(n instanceof Uint8Array))throw new TypeError(l(n,\"Uint8Array\"));const y=parseInt(r.slice(1,4),10);const w=await o.subtle.importKey(\"raw\",n.subarray(y>>3),\"AES-CBC\",false,[\"decrypt\"]);const u=await o.subtle.importKey(\"raw\",n.subarray(0,y>>3),{hash:\"SHA-\"+(y<<1),name:\"HMAC\"},false,[\"sign\"]);const p=e(c,s,a,t(c.length<<3));const A=new Uint8Array((await o.subtle.sign(\"HMAC\",u,p)).slice(0,y>>3));let h;try{h=timingSafeEqual(i,A)}catch{}if(!h)throw new g;let f;try{f=new Uint8Array(await o.subtle.decrypt({iv:s,name:\"AES-CBC\"},w,a))}catch{}if(!f)throw new g;return f}async function gcmDecrypt(t,r,n,a,s,i){let c;if(r instanceof Uint8Array)c=await o.subtle.importKey(\"raw\",r,\"AES-GCM\",false,[\"decrypt\"]);else{w(r,t,\"decrypt\");c=r}try{return new Uint8Array(await o.subtle.decrypt({additionalData:i,iv:a,name:\"AES-GCM\",tagLength:128},c,e(n,s)))}catch{throw new g}}const decrypt$2=async(e,t,r,n,a,s)=>{if(!y(t)&&!(t instanceof Uint8Array))throw new TypeError(l(t,...p,\"Uint8Array\"));if(!n)throw new f(\"JWE Initialization Vector missing\");if(!a)throw new f(\"JWE Authentication Tag missing\");checkIvLength(e,n);switch(e){case\"A128CBC-HS256\":case\"A192CBC-HS384\":case\"A256CBC-HS512\":t instanceof Uint8Array&&checkCekLength(t,parseInt(e.slice(-3),10));return cbcDecrypt(e,t,r,n,a,s);case\"A128GCM\":case\"A192GCM\":case\"A256GCM\":t instanceof Uint8Array&&checkCekLength(t,parseInt(e.slice(1,4),10));return gcmDecrypt(e,t,r,n,a,s);default:throw new h(\"Unsupported JWE Content Encryption Algorithm\")}};const m=[{hash:\"SHA-256\",name:\"HMAC\"},true,[\"sign\"]];function checkKeySize(e,t){if(e.algorithm.length!==parseInt(t.slice(1,4),10))throw new TypeError(`Invalid key size for alg: ${t}`)}function getCryptoKey$1(e,t,r){if(y(e)){w(e,t,r);return e}if(e instanceof Uint8Array)return o.subtle.importKey(\"raw\",e,\"AES-KW\",true,[r]);throw new TypeError(l(e,...p,\"Uint8Array\"))}const wrap$1=async(e,t,r)=>{const n=await getCryptoKey$1(t,e,\"wrapKey\");checkKeySize(n,e);const a=await o.subtle.importKey(\"raw\",r,...m);return new Uint8Array(await o.subtle.wrapKey(\"raw\",a,n,\"AES-KW\"))};const unwrap$1=async(e,t,r)=>{const n=await getCryptoKey$1(t,e,\"unwrapKey\");checkKeySize(n,e);const a=await o.subtle.unwrapKey(\"raw\",r,n,\"AES-KW\",...m);return new Uint8Array(await o.subtle.exportKey(\"raw\",a))};async function deriveKey$1(t,i,c,u,A=new Uint8Array(0),h=new Uint8Array(0)){if(!y(t))throw new TypeError(l(t,...p));w(t,\"ECDH\");if(!y(i))throw new TypeError(l(i,...p));w(i,\"ECDH\",\"deriveBits\");const f=e(r(n.encode(c)),r(A),r(h),a(u));let g;g=t.algorithm.name===\"X25519\"?256:t.algorithm.name===\"X448\"?448:Math.ceil(parseInt(t.algorithm.namedCurve.substr(-3),10)/8)<<3;const m=new Uint8Array(await o.subtle.deriveBits({name:t.algorithm.name,public:t},i,g));return s(m,u,f)}async function generateEpk(e){if(!y(e))throw new TypeError(l(e,...p));return o.subtle.generateKey(e.algorithm,true,[\"deriveBits\"])}function ecdhAllowed(e){if(!y(e))throw new TypeError(l(e,...p));return[\"P-256\",\"P-384\",\"P-521\"].includes(e.algorithm.namedCurve)||e.algorithm.name===\"X25519\"||e.algorithm.name===\"X448\"}function checkP2s(e){if(!(e instanceof Uint8Array)||e.length<8)throw new f(\"PBES2 Salt Input must be 8 or more octets\")}function getCryptoKey(e,t){if(e instanceof Uint8Array)return o.subtle.importKey(\"raw\",e,\"PBKDF2\",false,[\"deriveBits\"]);if(y(e)){w(e,t,\"deriveBits\",\"deriveKey\");return e}throw new TypeError(l(e,...p,\"Uint8Array\"))}async function deriveKey(e,t,r,n){checkP2s(e);const a=i(t,e);const s=parseInt(t.slice(13,16),10);const c={hash:`SHA-${t.slice(8,11)}`,iterations:r,name:\"PBKDF2\",salt:a};const y={length:s,name:\"AES-KW\"};const w=await getCryptoKey(n,t);if(w.usages.includes(\"deriveBits\"))return new Uint8Array(await o.subtle.deriveBits(c,w,s));if(w.usages.includes(\"deriveKey\"))return o.subtle.deriveKey(c,w,y,false,[\"wrapKey\",\"unwrapKey\"]);throw new TypeError('PBKDF2 key \"usages\" must include \"deriveBits\" or \"deriveKey\"')}const encrypt$2=async(e,t,r,n=2048,a=A(new Uint8Array(16)))=>{const s=await deriveKey(a,e,n,t);const i=await wrap$1(e.slice(-6),s,r);return{encryptedKey:i,p2c:n,p2s:c(a)}};const decrypt$1=async(e,t,r,n,a)=>{const s=await deriveKey(a,e,n,t);return unwrap$1(e.slice(-6),s,r)};function subtleRsaEs(e){switch(e){case\"RSA-OAEP\":case\"RSA-OAEP-256\":case\"RSA-OAEP-384\":case\"RSA-OAEP-512\":return\"RSA-OAEP\";default:throw new h(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}const encrypt$1=async(e,t,r)=>{if(!y(t))throw new TypeError(l(t,...p));w(t,e,\"encrypt\",\"wrapKey\");u(e,t);if(t.usages.includes(\"encrypt\"))return new Uint8Array(await o.subtle.encrypt(subtleRsaEs(e),t,r));if(t.usages.includes(\"wrapKey\")){const n=await o.subtle.importKey(\"raw\",r,...m);return new Uint8Array(await o.subtle.wrapKey(\"raw\",n,t,subtleRsaEs(e)))}throw new TypeError('RSA-OAEP key \"usages\" must include \"encrypt\" or \"wrapKey\" for this operation')};const decrypt=async(e,t,r)=>{if(!y(t))throw new TypeError(l(t,...p));w(t,e,\"decrypt\",\"unwrapKey\");u(e,t);if(t.usages.includes(\"decrypt\"))return new Uint8Array(await o.subtle.decrypt(subtleRsaEs(e),t,r));if(t.usages.includes(\"unwrapKey\")){const n=await o.subtle.unwrapKey(\"raw\",r,t,subtleRsaEs(e),...m);return new Uint8Array(await o.subtle.exportKey(\"raw\",n))}throw new TypeError('RSA-OAEP key \"usages\" must include \"decrypt\" or \"unwrapKey\" for this operation')};function bitLength(e){switch(e){case\"A128GCM\":return 128;case\"A192GCM\":return 192;case\"A256GCM\":case\"A128CBC-HS256\":return 256;case\"A192CBC-HS384\":return 384;case\"A256CBC-HS512\":return 512;default:throw new h(`Unsupported JWE Algorithm: ${e}`)}}var generateCek=e=>A(new Uint8Array(bitLength(e)>>3));async function cbcEncrypt(r,n,a,s,i){if(!(a instanceof Uint8Array))throw new TypeError(l(a,\"Uint8Array\"));const c=parseInt(r.slice(1,4),10);const y=await o.subtle.importKey(\"raw\",a.subarray(c>>3),\"AES-CBC\",false,[\"encrypt\"]);const w=await o.subtle.importKey(\"raw\",a.subarray(0,c>>3),{hash:\"SHA-\"+(c<<1),name:\"HMAC\"},false,[\"sign\"]);const u=new Uint8Array(await o.subtle.encrypt({iv:s,name:\"AES-CBC\"},y,n));const p=e(i,s,u,t(i.length<<3));const A=new Uint8Array((await o.subtle.sign(\"HMAC\",w,p)).slice(0,c>>3));return{ciphertext:u,tag:A,iv:s}}async function gcmEncrypt(e,t,r,n,a){let s;if(r instanceof Uint8Array)s=await o.subtle.importKey(\"raw\",r,\"AES-GCM\",false,[\"encrypt\"]);else{w(r,e,\"encrypt\");s=r}const i=new Uint8Array(await o.subtle.encrypt({additionalData:a,iv:n,name:\"AES-GCM\",tagLength:128},s,t));const c=i.slice(-16);const y=i.slice(0,-16);return{ciphertext:y,tag:c,iv:n}}const encrypt=async(e,t,r,n,a)=>{if(!y(r)&&!(r instanceof Uint8Array))throw new TypeError(l(r,...p,\"Uint8Array\"));n?checkIvLength(e,n):n=generateIv(e);switch(e){case\"A128CBC-HS256\":case\"A192CBC-HS384\":case\"A256CBC-HS512\":r instanceof Uint8Array&&checkCekLength(r,parseInt(e.slice(-3),10));return cbcEncrypt(e,t,r,n,a);case\"A128GCM\":case\"A192GCM\":case\"A256GCM\":r instanceof Uint8Array&&checkCekLength(r,parseInt(e.slice(1,4),10));return gcmEncrypt(e,t,r,n,a);default:throw new h(\"Unsupported JWE Content Encryption Algorithm\")}};async function wrap(e,t,r,n){const a=e.slice(0,7);const s=await encrypt(a,r,t,n,new Uint8Array(0));return{encryptedKey:s.ciphertext,iv:c(s.iv),tag:c(s.tag)}}async function unwrap(e,t,r,n,a){const s=e.slice(0,7);return decrypt$2(s,t,r,n,a,new Uint8Array(0))}export{unwrap$1 as a,decrypt as b,deriveKey$1 as c,decrypt$1 as d,ecdhAllowed as e,bitLength as f,generateCek as g,decrypt$2 as h,wrap$1 as i,encrypt$2 as j,encrypt$1 as k,generateEpk as l,encrypt as m,unwrap as u,wrap as w};\n//# sourceMappingURL=C0rpSoBt.js.map\n","import{i as e,c as t}from\"./CNexlW7T.js\";import{i as r,t as n}from\"./BWzjuGJA.js\";import{i as s,j as a}from\"./zZpWotyK.js\";import{b as c}from\"./DhGwGDkS.js\";var formatPEM=(e,t)=>{const r=(e.match(/.{1,64}/g)||[]).join(\"\\n\");return`-----BEGIN ${t}-----\\n${r}\\n-----END ${t}-----`};const genericExport=async(a,c,i)=>{if(!e(i))throw new TypeError(r(i,...n));if(!i.extractable)throw new TypeError(\"CryptoKey is not extractable\");if(i.type!==a)throw new TypeError(`key is not a ${a} key`);return formatPEM(s(new Uint8Array(await t.subtle.exportKey(c,i))),`${a.toUpperCase()} KEY`)};const toSPKI=e=>genericExport(\"public\",\"spki\",e);const toPKCS8=e=>genericExport(\"private\",\"pkcs8\",e);const findOid=(e,t,r=0)=>{if(r===0){t.unshift(t.length);t.unshift(6)}const n=e.indexOf(t[0],r);if(n===-1)return false;const s=e.subarray(n,n+t.length);return s.length===t.length&&(s.every(((e,r)=>e===t[r]))||findOid(e,t,n+1))};const getNamedCurve=e=>{switch(true){case findOid(e,[42,134,72,206,61,3,1,7]):return\"P-256\";case findOid(e,[43,129,4,0,34]):return\"P-384\";case findOid(e,[43,129,4,0,35]):return\"P-521\";case findOid(e,[43,101,110]):return\"X25519\";case findOid(e,[43,101,111]):return\"X448\";case findOid(e,[43,101,112]):return\"Ed25519\";case findOid(e,[43,101,113]):return\"Ed448\";default:throw new c(\"Invalid or unsupported EC Key Curve or OKP Key Sub Type\")}};const genericImport=async(e,r,n,s,a)=>{let i;let o;const u=new Uint8Array(atob(n.replace(e,\"\")).split(\"\").map((e=>e.charCodeAt(0))));const E=r===\"spki\";switch(s){case\"PS256\":case\"PS384\":case\"PS512\":i={name:\"RSA-PSS\",hash:`SHA-${s.slice(-3)}`};o=E?[\"verify\"]:[\"sign\"];break;case\"RS256\":case\"RS384\":case\"RS512\":i={name:\"RSASSA-PKCS1-v1_5\",hash:`SHA-${s.slice(-3)}`};o=E?[\"verify\"]:[\"sign\"];break;case\"RSA-OAEP\":case\"RSA-OAEP-256\":case\"RSA-OAEP-384\":case\"RSA-OAEP-512\":i={name:\"RSA-OAEP\",hash:`SHA-${parseInt(s.slice(-3),10)||1}`};o=E?[\"encrypt\",\"wrapKey\"]:[\"decrypt\",\"unwrapKey\"];break;case\"ES256\":i={name:\"ECDSA\",namedCurve:\"P-256\"};o=E?[\"verify\"]:[\"sign\"];break;case\"ES384\":i={name:\"ECDSA\",namedCurve:\"P-384\"};o=E?[\"verify\"]:[\"sign\"];break;case\"ES512\":i={name:\"ECDSA\",namedCurve:\"P-521\"};o=E?[\"verify\"]:[\"sign\"];break;case\"ECDH-ES\":case\"ECDH-ES+A128KW\":case\"ECDH-ES+A192KW\":case\"ECDH-ES+A256KW\":{const e=getNamedCurve(u);i=e.startsWith(\"P-\")?{name:\"ECDH\",namedCurve:e}:{name:e};o=E?[]:[\"deriveBits\"];break}case\"EdDSA\":i={name:getNamedCurve(u)};o=E?[\"verify\"]:[\"sign\"];break;default:throw new c('Invalid or unsupported \"alg\" (Algorithm) value')}return t.subtle.importKey(r,u,i,a?.extractable??false,o)};const fromPKCS8=(e,t,r)=>genericImport(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\\s)/g,\"pkcs8\",e,t,r);const fromSPKI=(e,t,r)=>genericImport(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\\s)/g,\"spki\",e,t,r);function getElement(e){const t=[];let r=0;while(r<e.length){const n=parseElement(e.subarray(r));t.push(n);r+=n.byteLength}return t}function parseElement(e){let t=0;let r=e[0]&31;t++;if(r===31){r=0;while(e[t]>=128){r=r*128+e[t]-128;t++}r=r*128+e[t]-128;t++}let n=0;if(e[t]<128){n=e[t];t++}else{if(n===128){n=0;while(e[t+n]!==0||e[t+n+1]!==0){if(n>e.byteLength)throw new TypeError(\"invalid indefinite form length\");n++}const r=t+n+2;return{byteLength:r,contents:e.subarray(t,t+n),raw:e.subarray(0,r)}}{const r=e[t]&127;t++;n=0;for(let s=0;s<r;s++){n=n*256+e[t];t++}}}const s=t+n;return{byteLength:s,contents:e.subarray(t,s),raw:e.subarray(0,s)}}function spkiFromX509(e){const t=getElement(getElement(parseElement(e).contents)[0].contents);return s(t[t[0].raw[0]===160?6:5].raw)}function getSPKI(e){const t=e.replace(/(?:-----(?:BEGIN|END) CERTIFICATE-----|\\s)/g,\"\");const r=a(t);return formatPEM(spkiFromX509(r),\"PUBLIC KEY\")}const fromX509=(e,t,r)=>{let n;try{n=getSPKI(e)}catch(e){throw new TypeError(\"Failed to parse the X.509 certificate\",{cause:e})}return fromSPKI(n,t,r)};export{toPKCS8 as a,fromX509 as b,fromPKCS8 as c,fromSPKI as f,toSPKI as t};\n//# sourceMappingURL=CGSr_E-H.js.map\n","import{c as r}from\"../../../_/zZpWotyK.js\";import{f as t,b as e,c as o}from\"../../../_/CGSr_E-H.js\";import{p as i}from\"../../../_/C_CWsW65.js\";import{b as s}from\"../../../_/DhGwGDkS.js\";import{i as n}from\"../../../_/DXtQ18sb.js\";import\"../../../_/CNexlW7T.js\";import\"../../../_/BWzjuGJA.js\";async function importSPKI(r,e,o){if(typeof r!==\"string\"||r.indexOf(\"-----BEGIN PUBLIC KEY-----\")!==0)throw new TypeError('\"spki\" must be SPKI formatted string');return t(r,e,o)}async function importX509(r,t,o){if(typeof r!==\"string\"||r.indexOf(\"-----BEGIN CERTIFICATE-----\")!==0)throw new TypeError('\"x509\" must be X.509 formatted string');return e(r,t,o)}async function importPKCS8(r,t,e){if(typeof r!==\"string\"||r.indexOf(\"-----BEGIN PRIVATE KEY-----\")!==0)throw new TypeError('\"pkcs8\" must be PKCS#8 formatted string');return o(r,t,e)}async function importJWK(t,e){if(!n(t))throw new TypeError(\"JWK must be an object\");e||(e=t.alg);switch(t.kty){case\"oct\":if(typeof t.k!==\"string\"||!t.k)throw new TypeError('missing \"k\" (Key Value) Parameter value');return r(t.k);case\"RSA\":if(t.oth!==void 0)throw new s('RSA JWK \"oth\" (Other Primes Info) Parameter value is not supported');case\"EC\":case\"OKP\":return i({...t,alg:e});default:throw new s('Unsupported \"kty\" (Key Type) Parameter value')}}export{importJWK,importPKCS8,importSPKI,importX509};\n//# sourceMappingURL=import.js.map\n","import{c as e,b as t,e as r,f as i}from\"../../../../_/zZpWotyK.js\";import{u as o,a,d as n,b as c,e as d,c as s,f as p,g as h,h as w}from\"../../../../_/C0rpSoBt.js\";import{b as y,j as l,k as f}from\"../../../../_/DhGwGDkS.js\";import{c as E,n as m,i as u,v as g}from\"../../../../_/z32JYQqa.js\";import{i as v}from\"../../../../_/DXtQ18sb.js\";import{importJWK as W}from\"../../key/import.js\";import{v as A}from\"../../../../_/BwinbG-L.js\";import\"../../../../_/CNexlW7T.js\";import\"../../../../_/BWzjuGJA.js\";import\"../../../../_/ifQSxW8Q.js\";import\"../../../../_/C_CWsW65.js\";import\"../../../../_/CGSr_E-H.js\";async function decryptKeyManagement(t,r,i,h,w){E(t,r,\"decrypt\");r=await(m.normalizePrivateKey?.(r,t))||r;switch(t){case\"dir\":if(i!==void 0)throw new l(\"Encountered unexpected JWE Encrypted Key\");return r;case\"ECDH-ES\":if(i!==void 0)throw new l(\"Encountered unexpected JWE Encrypted Key\");case\"ECDH-ES+A128KW\":case\"ECDH-ES+A192KW\":case\"ECDH-ES+A256KW\":{if(!v(h.epk))throw new l('JOSE Header \"epk\" (Ephemeral Public Key) missing or invalid');if(!d(r))throw new y(\"ECDH with the provided key is not allowed or not supported by your javascript runtime\");const o=await W(h.epk,t);let n;let c;if(h.apu!==void 0){if(typeof h.apu!==\"string\")throw new l('JOSE Header \"apu\" (Agreement PartyUInfo) invalid');try{n=e(h.apu)}catch{throw new l(\"Failed to base64url decode the apu\")}}if(h.apv!==void 0){if(typeof h.apv!==\"string\")throw new l('JOSE Header \"apv\" (Agreement PartyVInfo) invalid');try{c=e(h.apv)}catch{throw new l(\"Failed to base64url decode the apv\")}}const w=await s(o,r,t===\"ECDH-ES\"?h.enc:t,t===\"ECDH-ES\"?p(h.enc):parseInt(t.slice(-5,-2),10),n,c);if(t===\"ECDH-ES\")return w;if(i===void 0)throw new l(\"JWE Encrypted Key missing\");return a(t.slice(-6),w,i)}case\"RSA1_5\":case\"RSA-OAEP\":case\"RSA-OAEP-256\":case\"RSA-OAEP-384\":case\"RSA-OAEP-512\":if(i===void 0)throw new l(\"JWE Encrypted Key missing\");return c(t,r,i);case\"PBES2-HS256+A128KW\":case\"PBES2-HS384+A192KW\":case\"PBES2-HS512+A256KW\":{if(i===void 0)throw new l(\"JWE Encrypted Key missing\");if(typeof h.p2c!==\"number\")throw new l('JOSE Header \"p2c\" (PBES2 Count) missing or invalid');const o=w?.maxPBES2Count||1e4;if(h.p2c>o)throw new l('JOSE Header \"p2c\" (PBES2 Count) out is of acceptable bounds');if(typeof h.p2s!==\"string\")throw new l('JOSE Header \"p2s\" (PBES2 Salt) missing or invalid');let a;try{a=e(h.p2s)}catch{throw new l(\"Failed to base64url decode the p2s\")}return n(t,r,i,h.p2c,a)}case\"A128KW\":case\"A192KW\":case\"A256KW\":if(i===void 0)throw new l(\"JWE Encrypted Key missing\");return a(t,r,i);case\"A128GCMKW\":case\"A192GCMKW\":case\"A256GCMKW\":{if(i===void 0)throw new l(\"JWE Encrypted Key missing\");if(typeof h.iv!==\"string\")throw new l('JOSE Header \"iv\" (Initialization Vector) missing or invalid');if(typeof h.tag!==\"string\")throw new l('JOSE Header \"tag\" (Authentication Tag) missing or invalid');let a;try{a=e(h.iv)}catch{throw new l(\"Failed to base64url decode the iv\")}let n;try{n=e(h.tag)}catch{throw new l(\"Failed to base64url decode the tag\")}return o(t,r,i,a,n)}default:throw new y('Invalid or unsupported \"alg\" (JWE Algorithm) header value')}}async function flattenedDecrypt(o,a,n){if(!v(o))throw new l(\"Flattened JWE must be an object\");if(o.protected===void 0&&o.header===void 0&&o.unprotected===void 0)throw new l(\"JOSE Header missing\");if(o.iv!==void 0&&typeof o.iv!==\"string\")throw new l(\"JWE Initialization Vector incorrect type\");if(typeof o.ciphertext!==\"string\")throw new l(\"JWE Ciphertext missing or incorrect type\");if(o.tag!==void 0&&typeof o.tag!==\"string\")throw new l(\"JWE Authentication Tag incorrect type\");if(o.protected!==void 0&&typeof o.protected!==\"string\")throw new l(\"JWE Protected Header incorrect type\");if(o.encrypted_key!==void 0&&typeof o.encrypted_key!==\"string\")throw new l(\"JWE Encrypted Key incorrect type\");if(o.aad!==void 0&&typeof o.aad!==\"string\")throw new l(\"JWE AAD incorrect type\");if(o.header!==void 0&&!v(o.header))throw new l(\"JWE Shared Unprotected Header incorrect type\");if(o.unprotected!==void 0&&!v(o.unprotected))throw new l(\"JWE Per-Recipient Unprotected Header incorrect type\");let c;if(o.protected)try{const r=e(o.protected);c=JSON.parse(t.decode(r))}catch{throw new l(\"JWE Protected Header is invalid\")}if(!u(c,o.header,o.unprotected))throw new l(\"JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint\");const d={...c,...o.header,...o.unprotected};g(l,new Map,n?.crit,c,d);if(d.zip!==void 0)throw new y('JWE \"zip\" (Compression Algorithm) Header Parameter is not supported.');const{alg:s,enc:p}=d;if(typeof s!==\"string\"||!s)throw new l(\"missing JWE Algorithm (alg) in JWE Header\");if(typeof p!==\"string\"||!p)throw new l(\"missing JWE Encryption Algorithm (enc) in JWE Header\");const E=n&&A(\"keyManagementAlgorithms\",n.keyManagementAlgorithms);const m=n&&A(\"contentEncryptionAlgorithms\",n.contentEncryptionAlgorithms);if(E&&!E.has(s)||!E&&s.startsWith(\"PBES2\"))throw new f('\"alg\" (Algorithm) Header Parameter value not allowed');if(m&&!m.has(p))throw new f('\"enc\" (Encryption Algorithm) Header Parameter value not allowed');let W;if(o.encrypted_key!==void 0)try{W=e(o.encrypted_key)}catch{throw new l(\"Failed to base64url decode the encrypted_key\")}let J=false;if(typeof a===\"function\"){a=await a(c,o);J=true}let S;try{S=await decryptKeyManagement(s,a,W,d,n)}catch(e){if(e instanceof TypeError||e instanceof l||e instanceof y)throw e;S=h(p)}let H;let P;if(o.iv!==void 0)try{H=e(o.iv)}catch{throw new l(\"Failed to base64url decode the iv\")}if(o.tag!==void 0)try{P=e(o.tag)}catch{throw new l(\"Failed to base64url decode the tag\")}const K=r.encode(o.protected??\"\");let b;b=o.aad!==void 0?i(K,r.encode(\".\"),r.encode(o.aad)):K;let _;try{_=e(o.ciphertext)}catch{throw new l(\"Failed to base64url decode the ciphertext\")}const j=await w(p,S,_,H,P,b);const C={plaintext:j};o.protected!==void 0&&(C.protectedHeader=c);if(o.aad!==void 0)try{C.additionalAuthenticatedData=e(o.aad)}catch{throw new l(\"Failed to base64url decode the aad\")}o.unprotected!==void 0&&(C.sharedUnprotectedHeader=o.unprotected);o.header!==void 0&&(C.unprotectedHeader=o.header);return J?{...C,key:a}:C}export{flattenedDecrypt};\n//# sourceMappingURL=decrypt.js.map\n","import{flattenedDecrypt as t}from\"../flattened/decrypt.js\";import{j as o}from\"../../../../_/DhGwGDkS.js\";import{b as r}from\"../../../../_/zZpWotyK.js\";import\"../../../../_/C0rpSoBt.js\";import\"../../../../_/CNexlW7T.js\";import\"../../../../_/z32JYQqa.js\";import\"../../../../_/C_CWsW65.js\";import\"../../../../_/BWzjuGJA.js\";import\"../../../../_/DXtQ18sb.js\";import\"../../../../_/ifQSxW8Q.js\";import\"../../key/import.js\";import\"../../../../_/CGSr_E-H.js\";import\"../../../../_/BwinbG-L.js\";async function compactDecrypt(e,i,p){e instanceof Uint8Array&&(e=r.decode(e));if(typeof e!==\"string\")throw new o(\"Compact JWE must be a string or Uint8Array\");const{0:s,1:c,2:n,3:m,4:a,length:d}=e.split(\".\");if(d!==5)throw new o(\"Invalid Compact JWE\");const j=await t({ciphertext:m,iv:n||void 0,protected:s,tag:a||void 0,encrypted_key:c||void 0},i,p);const y={plaintext:j.plaintext,protectedHeader:j.protectedHeader};return typeof i===\"function\"?{...y,key:j.key}:y}export{compactDecrypt};\n//# sourceMappingURL=decrypt.js.map\n","import{flattenedDecrypt as e}from\"../flattened/decrypt.js\";import{j as t,l as r}from\"../../../../_/DhGwGDkS.js\";import{i}from\"../../../../_/DXtQ18sb.js\";import\"../../../../_/zZpWotyK.js\";import\"../../../../_/CNexlW7T.js\";import\"../../../../_/C0rpSoBt.js\";import\"../../../../_/z32JYQqa.js\";import\"../../../../_/C_CWsW65.js\";import\"../../../../_/BWzjuGJA.js\";import\"../../../../_/ifQSxW8Q.js\";import\"../../key/import.js\";import\"../../../../_/CGSr_E-H.js\";import\"../../../../_/BwinbG-L.js\";async function generalDecrypt(o,p,s){if(!i(o))throw new t(\"General JWE must be an object\");if(!Array.isArray(o.recipients)||!o.recipients.every(i))throw new t(\"JWE Recipients missing or incorrect type\");if(!o.recipients.length)throw new t(\"JWE Recipients has no members\");for(const t of o.recipients)try{return await e({aad:o.aad,ciphertext:o.ciphertext,encrypted_key:t.encrypted_key,header:t.header,iv:o.iv,protected:o.protected,tag:o.tag,unprotected:o.unprotected},p,s)}catch{}throw new r}export{generalDecrypt};\n//# sourceMappingURL=decrypt.js.map\n","import{t as r,a as t}from\"../../../_/CGSr_E-H.js\";import{i as o,c as e}from\"../../../_/CNexlW7T.js\";import{i as n,t as a}from\"../../../_/BWzjuGJA.js\";import{a as s}from\"../../../_/zZpWotyK.js\";import\"../../../_/DhGwGDkS.js\";const keyToJWK=async r=>{if(r instanceof Uint8Array)return{kty:\"oct\",k:s(r)};if(!o(r))throw new TypeError(n(r,...a,\"Uint8Array\"));if(!r.extractable)throw new TypeError(\"non-extractable CryptoKey cannot be exported as a JWK\");const{ext:t,key_ops:p,alg:i,use:c,...y}=await e.subtle.exportKey(\"jwk\",r);return y};async function exportSPKI(t){return r(t)}async function exportPKCS8(r){return t(r)}async function exportJWK(r){return keyToJWK(r)}export{exportJWK,exportPKCS8,exportSPKI};\n//# sourceMappingURL=export.js.map\n","import{a as e,e as t,f as r,b as a}from\"./zZpWotyK.js\";import{g as s,w as n,i,j as o,k as c,e as d,l as p,c as h,f as y,m as l}from\"./C0rpSoBt.js\";import{c as H,n as w,i as E,v as _}from\"./z32JYQqa.js\";import{b as m,j as u}from\"./DhGwGDkS.js\";import{exportJWK as f}from\"../dist/browser/key/export.js\";const A=Symbol();async function encryptKeyManagement(t,r,a,l,E={}){let _;let u;let A;H(t,a,\"encrypt\");a=await(w.normalizePublicKey?.(a,t))||a;switch(t){case\"dir\":A=a;break;case\"ECDH-ES\":case\"ECDH-ES+A128KW\":case\"ECDH-ES+A192KW\":case\"ECDH-ES+A256KW\":{if(!d(a))throw new m(\"ECDH with the provided key is not allowed or not supported by your javascript runtime\");const{apu:n,apv:o}=E;let{epk:c}=E;c||(c=(await p(a)).privateKey);const{x:H,y:w,crv:K,kty:g}=await f(c);const k=await h(a,c,t===\"ECDH-ES\"?r:t,t===\"ECDH-ES\"?y(r):parseInt(t.slice(-5,-2),10),n,o);u={epk:{x:H,crv:K,kty:g}};g===\"EC\"&&(u.epk.y=w);n&&(u.apu=e(n));o&&(u.apv=e(o));if(t===\"ECDH-ES\"){A=k;break}A=l||s(r);const b=t.slice(-6);_=await i(b,k,A);break}case\"RSA1_5\":case\"RSA-OAEP\":case\"RSA-OAEP-256\":case\"RSA-OAEP-384\":case\"RSA-OAEP-512\":A=l||s(r);_=await c(t,a,A);break;case\"PBES2-HS256+A128KW\":case\"PBES2-HS384+A192KW\":case\"PBES2-HS512+A256KW\":{A=l||s(r);const{p2c:e,p2s:n}=E;({encryptedKey:_,...u}=await o(t,a,A,e,n));break}case\"A128KW\":case\"A192KW\":case\"A256KW\":A=l||s(r);_=await i(t,a,A);break;case\"A128GCMKW\":case\"A192GCMKW\":case\"A256GCMKW\":{A=l||s(r);const{iv:e}=E;({encryptedKey:_,...u}=await n(t,a,A,e));break}default:throw new m('Invalid or unsupported \"alg\" (JWE Algorithm) header value')}return{cek:A,encryptedKey:_,parameters:u}}class FlattenedEncrypt{constructor(e){if(!(e instanceof Uint8Array))throw new TypeError(\"plaintext must be an instance of Uint8Array\");this._plaintext=e}setKeyManagementParameters(e){if(this._keyManagementParameters)throw new TypeError(\"setKeyManagementParameters can only be called once\");this._keyManagementParameters=e;return this}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError(\"setProtectedHeader can only be called once\");this._protectedHeader=e;return this}setSharedUnprotectedHeader(e){if(this._sharedUnprotectedHeader)throw new TypeError(\"setSharedUnprotectedHeader can only be called once\");this._sharedUnprotectedHeader=e;return this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError(\"setUnprotectedHeader can only be called once\");this._unprotectedHeader=e;return this}setAdditionalAuthenticatedData(e){this._aad=e;return this}setContentEncryptionKey(e){if(this._cek)throw new TypeError(\"setContentEncryptionKey can only be called once\");this._cek=e;return this}setInitializationVector(e){if(this._iv)throw new TypeError(\"setInitializationVector can only be called once\");this._iv=e;return this}async encrypt(s,n){if(!this._protectedHeader&&!this._unprotectedHeader&&!this._sharedUnprotectedHeader)throw new u(\"either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()\");if(!E(this._protectedHeader,this._unprotectedHeader,this._sharedUnprotectedHeader))throw new u(\"JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint\");const i={...this._protectedHeader,...this._unprotectedHeader,...this._sharedUnprotectedHeader};_(u,new Map,n?.crit,this._protectedHeader,i);if(i.zip!==void 0)throw new m('JWE \"zip\" (Compression Algorithm) Header Parameter is not supported.');const{alg:o,enc:c}=i;if(typeof o!==\"string\"||!o)throw new u('JWE \"alg\" (Algorithm) Header Parameter missing or invalid');if(typeof c!==\"string\"||!c)throw new u('JWE \"enc\" (Encryption Algorithm) Header Parameter missing or invalid');let d;if(this._cek&&(o===\"dir\"||o===\"ECDH-ES\"))throw new TypeError(`setContentEncryptionKey cannot be called with JWE \"alg\" (Algorithm) Header ${o}`);let p;{let e;({cek:p,encryptedKey:d,parameters:e}=await encryptKeyManagement(o,c,s,this._cek,this._keyManagementParameters));e&&(n&&A in n?this._unprotectedHeader?this._unprotectedHeader={...this._unprotectedHeader,...e}:this.setUnprotectedHeader(e):this._protectedHeader?this._protectedHeader={...this._protectedHeader,...e}:this.setProtectedHeader(e))}let h;let y;let H;y=this._protectedHeader?t.encode(e(JSON.stringify(this._protectedHeader))):t.encode(\"\");if(this._aad){H=e(this._aad);h=r(y,t.encode(\".\"),t.encode(H))}else h=y;const{ciphertext:w,tag:f,iv:K}=await l(c,this._plaintext,p,this._iv,h);const g={ciphertext:e(w)};K&&(g.iv=e(K));f&&(g.tag=e(f));d&&(g.encrypted_key=e(d));H&&(g.aad=H);this._protectedHeader&&(g.protected=a.decode(y));this._sharedUnprotectedHeader&&(g.unprotected=this._sharedUnprotectedHeader);this._unprotectedHeader&&(g.header=this._unprotectedHeader);return g}}export{FlattenedEncrypt as F,encryptKeyManagement as e,A as u};\n//# sourceMappingURL=DARKQ00i.js.map\n","import{F as e,u as t,e as r}from\"../../../../_/DARKQ00i.js\";import{j as i,b as n}from\"../../../../_/DhGwGDkS.js\";import{g as a}from\"../../../../_/C0rpSoBt.js\";import{i as d,v as s}from\"../../../../_/z32JYQqa.js\";import{a as o}from\"../../../../_/zZpWotyK.js\";import\"../../key/export.js\";import\"../../../../_/CGSr_E-H.js\";import\"../../../../_/CNexlW7T.js\";import\"../../../../_/BWzjuGJA.js\";import\"../../../../_/ifQSxW8Q.js\";import\"../../../../_/C_CWsW65.js\";import\"../../../../_/DXtQ18sb.js\";class IndividualRecipient{constructor(e,t,r){this.parent=e;this.key=t;this.options=r}setUnprotectedHeader(e){if(this.unprotectedHeader)throw new TypeError(\"setUnprotectedHeader can only be called once\");this.unprotectedHeader=e;return this}addRecipient(...e){return this.parent.addRecipient(...e)}encrypt(...e){return this.parent.encrypt(...e)}done(){return this.parent}}class GeneralEncrypt{constructor(e){this._recipients=[];this._plaintext=e}addRecipient(e,t){const r=new IndividualRecipient(this,e,{crit:t?.crit});this._recipients.push(r);return r}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError(\"setProtectedHeader can only be called once\");this._protectedHeader=e;return this}setSharedUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError(\"setSharedUnprotectedHeader can only be called once\");this._unprotectedHeader=e;return this}setAdditionalAuthenticatedData(e){this._aad=e;return this}async encrypt(){if(!this._recipients.length)throw new i(\"at least one recipient must be added\");if(this._recipients.length===1){const[t]=this._recipients;const r=await new e(this._plaintext).setAdditionalAuthenticatedData(this._aad).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(t.unprotectedHeader).encrypt(t.key,{...t.options});const i={ciphertext:r.ciphertext,iv:r.iv,recipients:[{}],tag:r.tag};r.aad&&(i.aad=r.aad);r.protected&&(i.protected=r.protected);r.unprotected&&(i.unprotected=r.unprotected);r.encrypted_key&&(i.recipients[0].encrypted_key=r.encrypted_key);r.header&&(i.recipients[0].header=r.header);return i}let c;for(let e=0;e<this._recipients.length;e++){const t=this._recipients[e];if(!d(this._protectedHeader,this._unprotectedHeader,t.unprotectedHeader))throw new i(\"JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint\");const r={...this._protectedHeader,...this._unprotectedHeader,...t.unprotectedHeader};const{alg:a}=r;if(typeof a!==\"string\"||!a)throw new i('JWE \"alg\" (Algorithm) Header Parameter missing or invalid');if(a===\"dir\"||a===\"ECDH-ES\")throw new i('\"dir\" and \"ECDH-ES\" alg may only be used with a single recipient');if(typeof r.enc!==\"string\"||!r.enc)throw new i('JWE \"enc\" (Encryption Algorithm) Header Parameter missing or invalid');if(c){if(c!==r.enc)throw new i('JWE \"enc\" (Encryption Algorithm) Header Parameter must be the same for all recipients')}else c=r.enc;s(i,new Map,t.options.crit,this._protectedHeader,r);if(r.zip!==void 0)throw new n('JWE \"zip\" (Compression Algorithm) Header Parameter is not supported.')}const p=a(c);const h={ciphertext:\"\",iv:\"\",recipients:[],tag:\"\"};for(let i=0;i<this._recipients.length;i++){const n=this._recipients[i];const a={};h.recipients.push(a);const d={...this._protectedHeader,...this._unprotectedHeader,...n.unprotectedHeader};const s=d.alg.startsWith(\"PBES2\")?2048+i:void 0;if(i===0){const r=await new e(this._plaintext).setAdditionalAuthenticatedData(this._aad).setContentEncryptionKey(p).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(n.unprotectedHeader).setKeyManagementParameters({p2c:s}).encrypt(n.key,{...n.options,[t]:true});h.ciphertext=r.ciphertext;h.iv=r.iv;h.tag=r.tag;r.aad&&(h.aad=r.aad);r.protected&&(h.protected=r.protected);r.unprotected&&(h.unprotected=r.unprotected);a.encrypted_key=r.encrypted_key;r.header&&(a.header=r.header);continue}const{encryptedKey:u,parameters:_}=await r(n.unprotectedHeader?.alg||this._protectedHeader?.alg||this._unprotectedHeader?.alg,c,n.key,p,{p2c:s});a.encrypted_key=o(u);(n.unprotectedHeader||_)&&(a.header={...n.unprotectedHeader,..._})}return h}}export{GeneralEncrypt};\n//# sourceMappingURL=encrypt.js.map\n","import{b as e}from\"./DhGwGDkS.js\";import{i as a,c as r}from\"./CNexlW7T.js\";import{n as s,f as t}from\"./z32JYQqa.js\";import{i as n,t as i}from\"./BWzjuGJA.js\";function subtleDsa(a,r){const s=`SHA-${a.slice(-3)}`;switch(a){case\"HS256\":case\"HS384\":case\"HS512\":return{hash:s,name:\"HMAC\"};case\"PS256\":case\"PS384\":case\"PS512\":return{hash:s,name:\"RSA-PSS\",saltLength:a.slice(-3)>>3};case\"RS256\":case\"RS384\":case\"RS512\":return{hash:s,name:\"RSASSA-PKCS1-v1_5\"};case\"ES256\":case\"ES384\":case\"ES512\":return{hash:s,name:\"ECDSA\",namedCurve:r.namedCurve};case\"EdDSA\":return{name:r.name};default:throw new e(`alg ${a} is not supported either by JOSE or your javascript runtime`)}}async function getCryptoKey(e,o,S){S===\"sign\"&&(o=await s.normalizePrivateKey(o,e));S===\"verify\"&&(o=await s.normalizePublicKey(o,e));if(a(o)){t(o,e,S);return o}if(o instanceof Uint8Array){if(!e.startsWith(\"HS\"))throw new TypeError(n(o,...i));return r.subtle.importKey(\"raw\",o,{hash:`SHA-${e.slice(-3)}`,name:\"HMAC\"},false,[S])}throw new TypeError(n(o,...i,\"Uint8Array\",\"JSON Web Key\"))}export{getCryptoKey as g,subtleDsa as s};\n//# sourceMappingURL=D6UUwYM5.js.map\n","import{c as e,b as t,f as a,e as r}from\"../../../../_/zZpWotyK.js\";import{g as o,s as i}from\"../../../../_/D6UUwYM5.js\";import{c as s}from\"../../../../_/CNexlW7T.js\";import{a as n,i as d,v as c,b as p,d as l}from\"../../../../_/z32JYQqa.js\";import{J as f,k as y,m as h}from\"../../../../_/DhGwGDkS.js\";import{i as m}from\"../../../../_/DXtQ18sb.js\";import{v as w}from\"../../../../_/BwinbG-L.js\";import{importJWK as g}from\"../../key/import.js\";import\"../../../../_/BWzjuGJA.js\";import\"../../../../_/C_CWsW65.js\";import\"../../../../_/CGSr_E-H.js\";const verify=async(e,t,a,r)=>{const d=await o(e,t,\"verify\");n(e,d);const c=i(e,d.algorithm);try{return await s.subtle.verify(c,d,a,r)}catch{return false}};async function flattenedVerify(o,i,s){if(!m(o))throw new f(\"Flattened JWS must be an object\");if(o.protected===void 0&&o.header===void 0)throw new f('Flattened JWS must have either of the \"protected\" or \"header\" members');if(o.protected!==void 0&&typeof o.protected!==\"string\")throw new f(\"JWS Protected Header incorrect type\");if(o.payload===void 0)throw new f(\"JWS Payload missing\");if(typeof o.signature!==\"string\")throw new f(\"JWS Signature missing or incorrect type\");if(o.header!==void 0&&!m(o.header))throw new f(\"JWS Unprotected Header incorrect type\");let n={};if(o.protected)try{const a=e(o.protected);n=JSON.parse(t.decode(a))}catch{throw new f(\"JWS Protected Header is invalid\")}if(!d(n,o.header))throw new f(\"JWS Protected and JWS Unprotected Header Parameter names must be disjoint\");const u={...n,...o.header};const b=c(f,new Map([[\"b64\",true]]),s?.crit,n,u);let v=true;if(b.has(\"b64\")){v=n.b64;if(typeof v!==\"boolean\")throw new f('The \"b64\" (base64url-encode payload) Header Parameter must be a boolean')}const{alg:J}=u;if(typeof J!==\"string\"||!J)throw new f('JWS \"alg\" (Algorithm) Header Parameter missing or invalid');const S=s&&w(\"algorithms\",s.algorithms);if(S&&!S.has(J))throw new y('\"alg\" (Algorithm) Header Parameter value not allowed');if(v){if(typeof o.payload!==\"string\")throw new f(\"JWS Payload must be a string\")}else if(typeof o.payload!==\"string\"&&!(o.payload instanceof Uint8Array))throw new f(\"JWS Payload must be a string or an Uint8Array instance\");let j=false;if(typeof i===\"function\"){i=await i(n,o);j=true;p(J,i,\"verify\");l(i)&&(i=await g(i,J))}else p(J,i,\"verify\");const W=a(r.encode(o.protected??\"\"),r.encode(\".\"),typeof o.payload===\"string\"?r.encode(o.payload):o.payload);let P;try{P=e(o.signature)}catch{throw new f(\"Failed to base64url decode the signature\")}const _=await verify(J,i,P,W);if(!_)throw new h;let H;if(v)try{H=e(o.payload)}catch{throw new f(\"Failed to base64url decode the payload\")}else H=typeof o.payload===\"string\"?r.encode(o.payload):o.payload;const A={payload:H};o.protected!==void 0&&(A.protectedHeader=n);o.header!==void 0&&(A.unprotectedHeader=o.header);return j?{...A,key:i}:A}export{flattenedVerify};\n//# sourceMappingURL=verify.js.map\n","import{flattenedVerify as t}from\"../flattened/verify.js\";import{J as o}from\"../../../../_/DhGwGDkS.js\";import{b as r}from\"../../../../_/zZpWotyK.js\";import\"../../../../_/D6UUwYM5.js\";import\"../../../../_/CNexlW7T.js\";import\"../../../../_/z32JYQqa.js\";import\"../../../../_/C_CWsW65.js\";import\"../../../../_/BWzjuGJA.js\";import\"../../../../_/DXtQ18sb.js\";import\"../../../../_/BwinbG-L.js\";import\"../../key/import.js\";import\"../../../../_/CGSr_E-H.js\";async function compactVerify(e,i,p){e instanceof Uint8Array&&(e=r.decode(e));if(typeof e!==\"string\")throw new o(\"Compact JWS must be a string or Uint8Array\");const{0:a,1:s,2:m,length:n}=e.split(\".\");if(n!==3)throw new o(\"Invalid Compact JWS\");const c=await t({payload:s,protected:a,signature:m},i,p);const f={payload:c.payload,protectedHeader:c.protectedHeader};return typeof i===\"function\"?{...f,key:c.key}:f}export{compactVerify};\n//# sourceMappingURL=verify.js.map\n","import{flattenedVerify as r}from\"../flattened/verify.js\";import{J as t,m as e}from\"../../../../_/DhGwGDkS.js\";import{i}from\"../../../../_/DXtQ18sb.js\";import\"../../../../_/zZpWotyK.js\";import\"../../../../_/CNexlW7T.js\";import\"../../../../_/D6UUwYM5.js\";import\"../../../../_/z32JYQqa.js\";import\"../../../../_/C_CWsW65.js\";import\"../../../../_/BWzjuGJA.js\";import\"../../../../_/BwinbG-L.js\";import\"../../key/import.js\";import\"../../../../_/CGSr_E-H.js\";async function generalVerify(o,s,a){if(!i(o))throw new t(\"General JWS must be an object\");if(!Array.isArray(o.signatures)||!o.signatures.every(i))throw new t(\"JWS Signatures missing or incorrect type\");for(const t of o.signatures)try{return await r({header:t.header,payload:o.payload,protected:t.protected,signature:t.signature},s,a)}catch{}throw new e}export{generalVerify};\n//# sourceMappingURL=verify.js.map\n","var epoch=s=>Math.floor(s.getTime()/1e3);const s=60;const e=s*60;const a=e*24;const c=a*7;const o=a*365.25;const r=/^(\\+|\\-)? ?(\\d+|\\d+\\.\\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;var secs=t=>{const n=r.exec(t);if(!n||n[4]&&n[1])throw new TypeError(\"Invalid time period format\");const d=parseFloat(n[2]);const h=n[3].toLowerCase();let u;switch(h){case\"sec\":case\"secs\":case\"second\":case\"seconds\":case\"s\":u=Math.round(d);break;case\"minute\":case\"minutes\":case\"min\":case\"mins\":case\"m\":u=Math.round(d*s);break;case\"hour\":case\"hours\":case\"hr\":case\"hrs\":case\"h\":u=Math.round(d*e);break;case\"day\":case\"days\":case\"d\":u=Math.round(d*a);break;case\"week\":case\"weeks\":case\"w\":u=Math.round(d*c);break;default:u=Math.round(d*o);break}return n[1]===\"-\"||n[4]===\"ago\"?-u:u};export{epoch as e,secs as s};\n//# sourceMappingURL=Bk6ZYww6.js.map\n","import{i as e,n as i,o as t}from\"./DhGwGDkS.js\";import{b as a}from\"./zZpWotyK.js\";import{s as c,e as s}from\"./Bk6ZYww6.js\";import{i as n}from\"./DXtQ18sb.js\";const normalizeTyp=e=>e.toLowerCase().replace(/^application\\//,\"\");const checkAudiencePresence=(e,i)=>typeof e===\"string\"?i.includes(e):!!Array.isArray(e)&&i.some(Set.prototype.has.bind(new Set(e)));var jwtPayload=(o,r,f={})=>{let l;try{l=JSON.parse(a.decode(r))}catch{}if(!n(l))throw new e(\"JWT Claims Set must be a top-level JSON object\");const{typ:p}=f;if(p&&(typeof o.typ!==\"string\"||normalizeTyp(o.typ)!==normalizeTyp(p)))throw new i('unexpected \"typ\" JWT header value',l,\"typ\",\"check_failed\");const{requiredClaims:m=[],issuer:d,subject:u,audience:h,maxTokenAge:w}=f;const b=[...m];w!==void 0&&b.push(\"iat\");h!==void 0&&b.push(\"aud\");u!==void 0&&b.push(\"sub\");d!==void 0&&b.push(\"iss\");for(const e of new Set(b.reverse()))if(!(e in l))throw new i(`missing required \"${e}\" claim`,l,e,\"missing\");if(d&&!(Array.isArray(d)?d:[d]).includes(l.iss))throw new i('unexpected \"iss\" claim value',l,\"iss\",\"check_failed\");if(u&&l.sub!==u)throw new i('unexpected \"sub\" claim value',l,\"sub\",\"check_failed\");if(h&&!checkAudiencePresence(l.aud,typeof h===\"string\"?[h]:h))throw new i('unexpected \"aud\" claim value',l,\"aud\",\"check_failed\");let y;switch(typeof f.clockTolerance){case\"string\":y=c(f.clockTolerance);break;case\"number\":y=f.clockTolerance;break;case\"undefined\":y=0;break;default:throw new TypeError(\"Invalid clockTolerance option type\")}const{currentDate:k}=f;const v=s(k||new Date);if((l.iat!==void 0||w)&&typeof l.iat!==\"number\")throw new i('\"iat\" claim must be a number',l,\"iat\",\"invalid\");if(l.nbf!==void 0){if(typeof l.nbf!==\"number\")throw new i('\"nbf\" claim must be a number',l,\"nbf\",\"invalid\");if(l.nbf>v+y)throw new i('\"nbf\" claim timestamp check failed',l,\"nbf\",\"check_failed\")}if(l.exp!==void 0){if(typeof l.exp!==\"number\")throw new i('\"exp\" claim must be a number',l,\"exp\",\"invalid\");if(l.exp<=v-y)throw new t('\"exp\" claim timestamp check failed',l,\"exp\",\"check_failed\")}if(w){const e=v-l.iat;const a=typeof w===\"number\"?w:c(w);if(e-y>a)throw new t('\"iat\" claim timestamp check failed (too far in the past)',l,\"iat\",\"check_failed\");if(e<0-y)throw new i('\"iat\" claim timestamp check failed (it should be in the past)',l,\"iat\",\"check_failed\")}return l};export{jwtPayload as j};\n//# sourceMappingURL=DrseF5q4.js.map\n","import{compactVerify as t}from\"../jws/compact/verify.js\";import{j as e}from\"../../../_/DrseF5q4.js\";import{i as r}from\"../../../_/DhGwGDkS.js\";import\"../jws/flattened/verify.js\";import\"../../../_/zZpWotyK.js\";import\"../../../_/CNexlW7T.js\";import\"../../../_/D6UUwYM5.js\";import\"../../../_/z32JYQqa.js\";import\"../../../_/C_CWsW65.js\";import\"../../../_/BWzjuGJA.js\";import\"../../../_/DXtQ18sb.js\";import\"../../../_/BwinbG-L.js\";import\"../key/import.js\";import\"../../../_/CGSr_E-H.js\";import\"../../../_/Bk6ZYww6.js\";async function jwtVerify(o,i,p){const s=await t(o,i,p);if(s.protectedHeader.crit?.includes(\"b64\")&&s.protectedHeader.b64===false)throw new r(\"JWTs MUST NOT use unencoded payload\");const a=e(s.protectedHeader,s.payload,p);const j={payload:a,protectedHeader:s.protectedHeader};return typeof i===\"function\"?{...j,key:s.key}:j}export{jwtVerify};\n//# sourceMappingURL=verify.js.map\n","import{compactDecrypt as t}from\"../jwe/compact/decrypt.js\";import{j as r}from\"../../../_/DrseF5q4.js\";import{n as e}from\"../../../_/DhGwGDkS.js\";import\"../jwe/flattened/decrypt.js\";import\"../../../_/zZpWotyK.js\";import\"../../../_/CNexlW7T.js\";import\"../../../_/C0rpSoBt.js\";import\"../../../_/z32JYQqa.js\";import\"../../../_/C_CWsW65.js\";import\"../../../_/BWzjuGJA.js\";import\"../../../_/DXtQ18sb.js\";import\"../../../_/ifQSxW8Q.js\";import\"../key/import.js\";import\"../../../_/CGSr_E-H.js\";import\"../../../_/BwinbG-L.js\";import\"../../../_/Bk6ZYww6.js\";async function jwtDecrypt(i,s,a){const m=await t(i,s,a);const o=r(m.protectedHeader,m.plaintext,a);const{protectedHeader:p}=m;if(p.iss!==void 0&&p.iss!==o.iss)throw new e('replicated \"iss\" claim header parameter mismatch',o,\"iss\",\"mismatch\");if(p.sub!==void 0&&p.sub!==o.sub)throw new e('replicated \"sub\" claim header parameter mismatch',o,\"sub\",\"mismatch\");if(p.aud!==void 0&&JSON.stringify(p.aud)!==JSON.stringify(o.aud))throw new e('replicated \"aud\" claim header parameter mismatch',o,\"aud\",\"mismatch\");const c={payload:o,protectedHeader:p};return typeof s===\"function\"?{...c,key:m.key}:c}export{jwtDecrypt};\n//# sourceMappingURL=decrypt.js.map\n","import{F as t}from\"../../../../_/DARKQ00i.js\";import\"../../../../_/zZpWotyK.js\";import\"../../../../_/CNexlW7T.js\";import\"../../../../_/C0rpSoBt.js\";import\"../../../../_/z32JYQqa.js\";import\"../../../../_/C_CWsW65.js\";import\"../../../../_/DhGwGDkS.js\";import\"../../../../_/BWzjuGJA.js\";import\"../../../../_/DXtQ18sb.js\";import\"../../../../_/ifQSxW8Q.js\";import\"../../key/export.js\";import\"../../../../_/CGSr_E-H.js\";class CompactEncrypt{constructor(e){this._flattened=new t(e)}setContentEncryptionKey(t){this._flattened.setContentEncryptionKey(t);return this}setInitializationVector(t){this._flattened.setInitializationVector(t);return this}setProtectedHeader(t){this._flattened.setProtectedHeader(t);return this}setKeyManagementParameters(t){this._flattened.setKeyManagementParameters(t);return this}async encrypt(t,e){const r=await this._flattened.encrypt(t,e);return[r.protected,r.encrypted_key,r.iv,r.ciphertext,r.tag].join(\".\")}}export{CompactEncrypt};\n//# sourceMappingURL=encrypt.js.map\n","import{e,a as t,f as r,b as a}from\"../../../../_/zZpWotyK.js\";import{g as o,s}from\"../../../../_/D6UUwYM5.js\";import{c as d}from\"../../../../_/CNexlW7T.js\";import{a as n,i,v as c,b as p}from\"../../../../_/z32JYQqa.js\";import{J as h}from\"../../../../_/DhGwGDkS.js\";import\"../../../../_/BWzjuGJA.js\";import\"../../../../_/C_CWsW65.js\";import\"../../../../_/DXtQ18sb.js\";const sign=async(e,t,r)=>{const a=await o(e,t,\"sign\");n(e,a);const i=await d.subtle.sign(s(e,a.algorithm),a,r);return new Uint8Array(i)};class FlattenedSign{constructor(e){if(!(e instanceof Uint8Array))throw new TypeError(\"payload must be an instance of Uint8Array\");this._payload=e}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError(\"setProtectedHeader can only be called once\");this._protectedHeader=e;return this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError(\"setUnprotectedHeader can only be called once\");this._unprotectedHeader=e;return this}async sign(o,s){if(!this._protectedHeader&&!this._unprotectedHeader)throw new h(\"either setProtectedHeader or setUnprotectedHeader must be called before #sign()\");if(!i(this._protectedHeader,this._unprotectedHeader))throw new h(\"JWS Protected and JWS Unprotected Header Parameter names must be disjoint\");const d={...this._protectedHeader,...this._unprotectedHeader};const n=c(h,new Map([[\"b64\",true]]),s?.crit,this._protectedHeader,d);let l=true;if(n.has(\"b64\")){l=this._protectedHeader.b64;if(typeof l!==\"boolean\")throw new h('The \"b64\" (base64url-encode payload) Header Parameter must be a boolean')}const{alg:_}=d;if(typeof _!==\"string\"||!_)throw new h('JWS \"alg\" (Algorithm) Header Parameter missing or invalid');p(_,o,\"sign\");let H=this._payload;l&&(H=e.encode(t(H)));let m;m=this._protectedHeader?e.encode(t(JSON.stringify(this._protectedHeader))):e.encode(\"\");const u=r(m,e.encode(\".\"),H);const f=await sign(_,o,u);const w={signature:t(f),payload:\"\"};l&&(w.payload=a.decode(H));this._unprotectedHeader&&(w.header=this._unprotectedHeader);this._protectedHeader&&(w.protected=a.decode(m));return w}}export{FlattenedSign};\n//# sourceMappingURL=sign.js.map\n","import{FlattenedSign as t}from\"../flattened/sign.js\";import\"../../../../_/zZpWotyK.js\";import\"../../../../_/CNexlW7T.js\";import\"../../../../_/D6UUwYM5.js\";import\"../../../../_/DhGwGDkS.js\";import\"../../../../_/z32JYQqa.js\";import\"../../../../_/C_CWsW65.js\";import\"../../../../_/BWzjuGJA.js\";import\"../../../../_/DXtQ18sb.js\";class CompactSign{constructor(e){this._flattened=new t(e)}setProtectedHeader(t){this._flattened.setProtectedHeader(t);return this}async sign(t,e){const r=await this._flattened.sign(t,e);if(r.payload===void 0)throw new TypeError(\"use the flattened module for creating JWS with b64: false\");return`${r.protected}.${r.payload}.${r.signature}`}}export{CompactSign};\n//# sourceMappingURL=sign.js.map\n","import{FlattenedSign as e}from\"../flattened/sign.js\";import{J as t}from\"../../../../_/DhGwGDkS.js\";import\"../../../../_/zZpWotyK.js\";import\"../../../../_/CNexlW7T.js\";import\"../../../../_/D6UUwYM5.js\";import\"../../../../_/z32JYQqa.js\";import\"../../../../_/C_CWsW65.js\";import\"../../../../_/BWzjuGJA.js\";import\"../../../../_/DXtQ18sb.js\";class IndividualSignature{constructor(e,t,r){this.parent=e;this.key=t;this.options=r}setProtectedHeader(e){if(this.protectedHeader)throw new TypeError(\"setProtectedHeader can only be called once\");this.protectedHeader=e;return this}setUnprotectedHeader(e){if(this.unprotectedHeader)throw new TypeError(\"setUnprotectedHeader can only be called once\");this.unprotectedHeader=e;return this}addSignature(...e){return this.parent.addSignature(...e)}sign(...e){return this.parent.sign(...e)}done(){return this.parent}}class GeneralSign{constructor(e){this._signatures=[];this._payload=e}addSignature(e,t){const r=new IndividualSignature(this,e,t);this._signatures.push(r);return r}async sign(){if(!this._signatures.length)throw new t(\"at least one signature must be added\");const r={signatures:[],payload:\"\"};for(let s=0;s<this._signatures.length;s++){const n=this._signatures[s];const a=new e(this._payload);a.setProtectedHeader(n.protectedHeader);a.setUnprotectedHeader(n.unprotectedHeader);const{payload:i,...o}=await a.sign(n.key,n.options);if(s===0)r.payload=i;else if(r.payload!==i)throw new t(\"inconsistent use of JWS Unencoded Payload (RFC7797)\");r.signatures.push(o)}return r}}export{GeneralSign};\n//# sourceMappingURL=sign.js.map\n","import{e as t,s as a}from\"./Bk6ZYww6.js\";import{i as e}from\"./DXtQ18sb.js\";function validateInput(t,a){if(!Number.isFinite(a))throw new TypeError(`Invalid ${t} input`);return a}class ProduceJWT{constructor(t={}){if(!e(t))throw new TypeError(\"JWT Claims Set MUST be an object\");this._payload=t}setIssuer(t){this._payload={...this._payload,iss:t};return this}setSubject(t){this._payload={...this._payload,sub:t};return this}setAudience(t){this._payload={...this._payload,aud:t};return this}setJti(t){this._payload={...this._payload,jti:t};return this}setNotBefore(e){typeof e===\"number\"?this._payload={...this._payload,nbf:validateInput(\"setNotBefore\",e)}:e instanceof Date?this._payload={...this._payload,nbf:validateInput(\"setNotBefore\",t(e))}:this._payload={...this._payload,nbf:t(new Date)+a(e)};return this}setExpirationTime(e){typeof e===\"number\"?this._payload={...this._payload,exp:validateInput(\"setExpirationTime\",e)}:e instanceof Date?this._payload={...this._payload,exp:validateInput(\"setExpirationTime\",t(e))}:this._payload={...this._payload,exp:t(new Date)+a(e)};return this}setIssuedAt(e){typeof e===\"undefined\"?this._payload={...this._payload,iat:t(new Date)}:e instanceof Date?this._payload={...this._payload,iat:validateInput(\"setIssuedAt\",t(e))}:this._payload=typeof e===\"string\"?{...this._payload,iat:validateInput(\"setIssuedAt\",t(new Date)+a(e))}:{...this._payload,iat:validateInput(\"setIssuedAt\",e)};return this}}export{ProduceJWT as P};\n//# sourceMappingURL=CLsKaC7_.js.map\n","import{CompactSign as e}from\"../jws/compact/sign.js\";import{i as t}from\"../../../_/DhGwGDkS.js\";import{e as r}from\"../../../_/zZpWotyK.js\";import{P as s}from\"../../../_/CLsKaC7_.js\";import\"../jws/flattened/sign.js\";import\"../../../_/D6UUwYM5.js\";import\"../../../_/CNexlW7T.js\";import\"../../../_/z32JYQqa.js\";import\"../../../_/C_CWsW65.js\";import\"../../../_/BWzjuGJA.js\";import\"../../../_/DXtQ18sb.js\";import\"../../../_/Bk6ZYww6.js\";class SignJWT extends s{setProtectedHeader(e){this._protectedHeader=e;return this}async sign(s,i){const o=new e(r.encode(JSON.stringify(this._payload)));o.setProtectedHeader(this._protectedHeader);if(Array.isArray(this._protectedHeader?.crit)&&this._protectedHeader.crit.includes(\"b64\")&&this._protectedHeader.b64===false)throw new t(\"JWTs MUST NOT use unencoded payload\");return o.sign(s,i)}}export{SignJWT};\n//# sourceMappingURL=sign.js.map\n","import{CompactEncrypt as e}from\"../jwe/compact/encrypt.js\";import{e as t}from\"../../../_/zZpWotyK.js\";import{P as r}from\"../../../_/CLsKaC7_.js\";import\"../../../_/DARKQ00i.js\";import\"../../../_/C0rpSoBt.js\";import\"../../../_/CNexlW7T.js\";import\"../../../_/z32JYQqa.js\";import\"../../../_/C_CWsW65.js\";import\"../../../_/DhGwGDkS.js\";import\"../../../_/BWzjuGJA.js\";import\"../../../_/DXtQ18sb.js\";import\"../../../_/ifQSxW8Q.js\";import\"../key/export.js\";import\"../../../_/CGSr_E-H.js\";import\"../../../_/Bk6ZYww6.js\";class EncryptJWT extends r{setProtectedHeader(e){if(this._protectedHeader)throw new TypeError(\"setProtectedHeader can only be called once\");this._protectedHeader=e;return this}setKeyManagementParameters(e){if(this._keyManagementParameters)throw new TypeError(\"setKeyManagementParameters can only be called once\");this._keyManagementParameters=e;return this}setContentEncryptionKey(e){if(this._cek)throw new TypeError(\"setContentEncryptionKey can only be called once\");this._cek=e;return this}setInitializationVector(e){if(this._iv)throw new TypeError(\"setInitializationVector can only be called once\");this._iv=e;return this}replicateIssuerAsHeader(){this._replicateIssuerAsHeader=true;return this}replicateSubjectAsHeader(){this._replicateSubjectAsHeader=true;return this}replicateAudienceAsHeader(){this._replicateAudienceAsHeader=true;return this}async encrypt(r,s){const i=new e(t.encode(JSON.stringify(this._payload)));this._replicateIssuerAsHeader&&(this._protectedHeader={...this._protectedHeader,iss:this._payload.iss});this._replicateSubjectAsHeader&&(this._protectedHeader={...this._protectedHeader,sub:this._payload.sub});this._replicateAudienceAsHeader&&(this._protectedHeader={...this._protectedHeader,aud:this._payload.aud});i.setProtectedHeader(this._protectedHeader);this._iv&&i.setInitializationVector(this._iv);this._cek&&i.setContentEncryptionKey(this._cek);this._keyManagementParameters&&i.setKeyManagementParameters(this._keyManagementParameters);return i.encrypt(r,s)}}export{EncryptJWT};\n//# sourceMappingURL=encrypt.js.map\n","import{e as r,a,d as e}from\"../../../_/zZpWotyK.js\";import{a as t,b as s}from\"../../../_/DhGwGDkS.js\";import{i as n}from\"../../../_/DXtQ18sb.js\";import\"../../../_/CNexlW7T.js\";const check=(r,a)=>{if(typeof r!==\"string\"||!r)throw new t(`${a} missing or invalid`)};async function calculateJwkThumbprint(t,i){if(!n(t))throw new TypeError(\"JWK must be an object\");i??(i=\"sha256\");if(i!==\"sha256\"&&i!==\"sha384\"&&i!==\"sha512\")throw new TypeError('digestAlgorithm must one of \"sha256\", \"sha384\", or \"sha512\"');let o;switch(t.kty){case\"EC\":check(t.crv,'\"crv\" (Curve) Parameter');check(t.x,'\"x\" (X Coordinate) Parameter');check(t.y,'\"y\" (Y Coordinate) Parameter');o={crv:t.crv,kty:t.kty,x:t.x,y:t.y};break;case\"OKP\":check(t.crv,'\"crv\" (Subtype of Key Pair) Parameter');check(t.x,'\"x\" (Public Key) Parameter');o={crv:t.crv,kty:t.kty,x:t.x};break;case\"RSA\":check(t.e,'\"e\" (Exponent) Parameter');check(t.n,'\"n\" (Modulus) Parameter');o={e:t.e,kty:t.kty,n:t.n};break;case\"oct\":check(t.k,'\"k\" (Key Value) Parameter');o={k:t.k,kty:t.kty};break;default:throw new s('\"kty\" (Key Type) Parameter missing or unsupported')}const c=r.encode(JSON.stringify(o));return a(await e(i,c))}async function calculateJwkThumbprintUri(r,a){a??(a=\"sha256\");const e=await calculateJwkThumbprint(r,a);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${a.slice(-3)}:${e}`}export{calculateJwkThumbprint,calculateJwkThumbprintUri};\n//# sourceMappingURL=thumbprint.js.map\n","import{importJWK as e}from\"../key/import.js\";import{i as r}from\"../../../_/DXtQ18sb.js\";import{J as t}from\"../../../_/DhGwGDkS.js\";import\"../../../_/zZpWotyK.js\";import\"../../../_/CNexlW7T.js\";import\"../../../_/CGSr_E-H.js\";import\"../../../_/BWzjuGJA.js\";import\"../../../_/C_CWsW65.js\";async function EmbeddedJWK(o,a){const i={...o,...a?.header};if(!r(i.jwk))throw new t('\"jwk\" (JSON Web Key) Header Parameter must be a JSON object');const m=await e({...i.jwk,ext:true},i.alg);if(m instanceof Uint8Array||m.type!==\"public\")throw new t('\"jwk\" (JSON Web Key) Header Parameter must be a public key');return m}export{EmbeddedJWK};\n//# sourceMappingURL=embedded.js.map\n","import{importJWK as e}from\"../key/import.js\";import{b as t,g as r,f as s,h as c}from\"../../../_/DhGwGDkS.js\";import{i as o}from\"../../../_/DXtQ18sb.js\";import\"../../../_/zZpWotyK.js\";import\"../../../_/CNexlW7T.js\";import\"../../../_/CGSr_E-H.js\";import\"../../../_/BWzjuGJA.js\";import\"../../../_/C_CWsW65.js\";function getKtyFromAlg(e){switch(typeof e===\"string\"&&e.slice(0,2)){case\"RS\":case\"PS\":return\"RSA\";case\"ES\":return\"EC\";case\"Ed\":return\"OKP\";default:throw new t('Unsupported \"alg\" value for a JSON Web Key Set')}}function isJWKSLike(e){return e&&typeof e===\"object\"&&Array.isArray(e.keys)&&e.keys.every(isJWKLike)}function isJWKLike(e){return o(e)}function clone(e){return typeof structuredClone===\"function\"?structuredClone(e):JSON.parse(JSON.stringify(e))}class LocalJWKSet{constructor(e){this._cached=new WeakMap;if(!isJWKSLike(e))throw new r(\"JSON Web Key Set malformed\");this._jwks=clone(e)}async getKey(e,t){const{alg:r,kid:o}={...e,...t?.header};const i=getKtyFromAlg(r);const n=this._jwks.keys.filter((e=>{let t=i===e.kty;t&&typeof o===\"string\"&&(t=o===e.kid);t&&typeof e.alg===\"string\"&&(t=r===e.alg);t&&typeof e.use===\"string\"&&(t=e.use===\"sig\");t&&Array.isArray(e.key_ops)&&(t=e.key_ops.includes(\"verify\"));t&&r===\"EdDSA\"&&(t=e.crv===\"Ed25519\"||e.crv===\"Ed448\");if(t)switch(r){case\"ES256\":t=e.crv===\"P-256\";break;case\"ES256K\":t=e.crv===\"secp256k1\";break;case\"ES384\":t=e.crv===\"P-384\";break;case\"ES512\":t=e.crv===\"P-521\";break}return t}));const{0:a,length:y}=n;if(y===0)throw new s;if(y!==1){const e=new c;const{_cached:t}=this;e[Symbol.asyncIterator]=async function*(){for(const e of n)try{yield await importWithAlgCache(t,e,r)}catch{}};throw e}return importWithAlgCache(this._cached,a,r)}}async function importWithAlgCache(t,s,c){const o=t.get(s)||t.set(s,{}).get(s);if(o[c]===void 0){const t=await e({...s,ext:true},c);if(t instanceof Uint8Array||t.type!==\"public\")throw new r(\"JSON Web Key Set members must be public keys\");o[c]=t}return o[c]}function createLocalJWKSet(e){const t=new LocalJWKSet(e);const localJWKSet=async(e,r)=>t.getKey(e,r);Object.defineProperties(localJWKSet,{jwks:{value:()=>clone(t._jwks),enumerable:true,configurable:false,writable:false}});return localJWKSet}export{createLocalJWKSet};\n//# sourceMappingURL=local.js.map\n","import{c as e,d as t,f as o}from\"../../../_/DhGwGDkS.js\";import{createLocalJWKSet as s}from\"./local.js\";import{i}from\"../../../_/DXtQ18sb.js\";import\"../key/import.js\";import\"../../../_/zZpWotyK.js\";import\"../../../_/CNexlW7T.js\";import\"../../../_/CGSr_E-H.js\";import\"../../../_/BWzjuGJA.js\";import\"../../../_/C_CWsW65.js\";const fetchJwks=async(o,s,i)=>{let r;let a;let n=false;if(typeof AbortController===\"function\"){r=new AbortController;a=setTimeout((()=>{n=true;r.abort()}),s)}const c=await fetch(o.href,{signal:r?r.signal:void 0,redirect:\"manual\",headers:i.headers}).catch((t=>{if(n)throw new e;throw t}));a!==void 0&&clearTimeout(a);if(c.status!==200)throw new t(\"Expected 200 OK from the JSON Web Key Set HTTP response\");try{return await c.json()}catch{throw new t(\"Failed to parse the JSON Web Key Set HTTP response as JSON\")}};function isCloudflareWorkers(){return typeof WebSocketPair!==\"undefined\"||typeof navigator!==\"undefined\"&&navigator.userAgent===\"Cloudflare-Workers\"||typeof EdgeRuntime!==\"undefined\"&&EdgeRuntime===\"vercel\"}let r;if(typeof navigator===\"undefined\"||!navigator.userAgent?.startsWith?.(\"Mozilla/5.0 \")){const e=\"jose\";const t=\"v5.9.3\";r=`${e}/${t}`}const a=Symbol();function isFreshJwksCache(e,t){return typeof e===\"object\"&&e!==null&&(\"uat\"in e&&typeof e.uat===\"number\"&&!(Date.now()-e.uat>=t)&&!!(\"jwks\"in e&&i(e.jwks)&&Array.isArray(e.jwks.keys)&&Array.prototype.every.call(e.jwks.keys,i)))}class RemoteJWKSet{constructor(e,t){if(!(e instanceof URL))throw new TypeError(\"url must be an instance of URL\");this._url=new URL(e.href);this._options={agent:t?.agent,headers:t?.headers};this._timeoutDuration=typeof t?.timeoutDuration===\"number\"?t?.timeoutDuration:5e3;this._cooldownDuration=typeof t?.cooldownDuration===\"number\"?t?.cooldownDuration:3e4;this._cacheMaxAge=typeof t?.cacheMaxAge===\"number\"?t?.cacheMaxAge:6e5;if(t?.[a]!==void 0){this._cache=t?.[a];if(isFreshJwksCache(t?.[a],this._cacheMaxAge)){this._jwksTimestamp=this._cache.uat;this._local=s(this._cache.jwks)}}}coolingDown(){return typeof this._jwksTimestamp===\"number\"&&Date.now()<this._jwksTimestamp+this._cooldownDuration}fresh(){return typeof this._jwksTimestamp===\"number\"&&Date.now()<this._jwksTimestamp+this._cacheMaxAge}async getKey(e,t){this._local&&this.fresh()||await this.reload();try{return await this._local(e,t)}catch(s){if(s instanceof o&&this.coolingDown()===false){await this.reload();return this._local(e,t)}throw s}}async reload(){this._pendingFetch&&isCloudflareWorkers()&&(this._pendingFetch=void 0);const e=new Headers(this._options.headers);if(r&&!e.has(\"User-Agent\")){e.set(\"User-Agent\",r);this._options.headers=Object.fromEntries(e.entries())}this._pendingFetch||(this._pendingFetch=fetchJwks(this._url,this._timeoutDuration,this._options).then((e=>{this._local=s(e);if(this._cache){this._cache.uat=Date.now();this._cache.jwks=e}this._jwksTimestamp=Date.now();this._pendingFetch=void 0})).catch((e=>{this._pendingFetch=void 0;throw e})));await this._pendingFetch}}function createRemoteJWKSet(e,t){const o=new RemoteJWKSet(e,t);const remoteJWKSet=async(e,t)=>o.getKey(e,t);Object.defineProperties(remoteJWKSet,{coolingDown:{get:()=>o.coolingDown(),enumerable:true,configurable:false},fresh:{get:()=>o.fresh(),enumerable:true,configurable:false},reload:{value:()=>o.reload(),enumerable:true,configurable:false,writable:false},reloading:{get:()=>!!o._pendingFetch,enumerable:true,configurable:false},jwks:{value:()=>o._local?.jwks(),enumerable:true,configurable:false,writable:false}});return remoteJWKSet}const n=a;export{createRemoteJWKSet,n as experimental_jwksCache,a as jwksCache};\n//# sourceMappingURL=remote.js.map\n","import{a as e,b as r,c as s}from\"../../../_/zZpWotyK.js\";import{i as t}from\"../../../_/DhGwGDkS.js\";import{j as o}from\"../../../_/DrseF5q4.js\";import{P as n}from\"../../../_/CLsKaC7_.js\";import\"../../../_/CNexlW7T.js\";import\"../../../_/Bk6ZYww6.js\";import\"../../../_/DXtQ18sb.js\";class UnsecuredJWT extends n{encode(){const r=e(JSON.stringify({alg:\"none\"}));const s=e(JSON.stringify(this._payload));return`${r}.${s}.`}static decode(e,n){if(typeof e!==\"string\")throw new t(\"Unsecured JWT must be a string\");const{0:a,1:i,2:c,length:d}=e.split(\".\");if(d!==3||c!==\"\")throw new t(\"Invalid Unsecured JWT\");let p;try{p=JSON.parse(r.decode(s(a)));if(p.alg!==\"none\")throw new Error}catch{throw new t(\"Invalid Unsecured JWT\")}const m=o(p,s(i),n);return{payload:m,header:p}}}export{UnsecuredJWT};\n//# sourceMappingURL=unsecured.js.map\n","import{a as e,c as o}from\"./zZpWotyK.js\";const t=e;const a=o;var r=Object.freeze(Object.defineProperty({__proto__:null,decode:a,encode:t},Symbol.toStringTag,{value:\"Module\"}));export{r as b,a as d,t as e};\n//# sourceMappingURL=SszN3Lfa.js.map\n","import{d as e}from\"../../../_/SszN3Lfa.js\";import{b as r}from\"../../../_/zZpWotyK.js\";import{i as t}from\"../../../_/DXtQ18sb.js\";import\"../../../_/CNexlW7T.js\";function decodeProtectedHeader(o){let n;if(typeof o===\"string\"){const e=o.split(\".\");e.length!==3&&e.length!==5||([n]=e)}else if(typeof o===\"object\"&&o){if(!(\"protected\"in o))throw new TypeError(\"Token does not contain a Protected Header\");n=o.protected}try{if(typeof n!==\"string\"||!n)throw new Error;const o=JSON.parse(r.decode(e(n)));if(!t(o))throw new Error;return o}catch{throw new TypeError(\"Invalid Token or Protected Header formatting\")}}export{decodeProtectedHeader};\n//# sourceMappingURL=decode_protected_header.js.map\n","import{d as t}from\"../../../_/SszN3Lfa.js\";import{b as e}from\"../../../_/zZpWotyK.js\";import{i as o}from\"../../../_/DXtQ18sb.js\";import{i as a}from\"../../../_/DhGwGDkS.js\";import\"../../../_/CNexlW7T.js\";function decodeJwt(i){if(typeof i!==\"string\")throw new a(\"JWTs must use Compact JWS serialization, JWT must be a string\");const{1:r,length:s}=i.split(\".\");if(s===5)throw new a(\"Only JWTs using Compact JWS serialization can be decoded\");if(s!==3)throw new a(\"Invalid JWT\");if(!r)throw new a(\"JWTs must contain a payload\");let n;try{n=t(r)}catch{throw new a(\"Failed to base64url decode the payload\")}let d;try{d=JSON.parse(e.decode(n))}catch{throw new a(\"Failed to parse the decoded payload as JSON\")}if(!o(d))throw new a(\"Invalid JWT Claims Set\");return d}export{decodeJwt};\n//# sourceMappingURL=decode_jwt.js.map\n","import{c as e}from\"./CNexlW7T.js\";import{b as a}from\"./DhGwGDkS.js\";import{r}from\"./ifQSxW8Q.js\";async function generateSecret(s,n){let t;let c;let i;switch(s){case\"HS256\":case\"HS384\":case\"HS512\":t=parseInt(s.slice(-3),10);c={name:\"HMAC\",hash:`SHA-${t}`,length:t};i=[\"sign\",\"verify\"];break;case\"A128CBC-HS256\":case\"A192CBC-HS384\":case\"A256CBC-HS512\":t=parseInt(s.slice(-3),10);return r(new Uint8Array(t>>3));case\"A128KW\":case\"A192KW\":case\"A256KW\":t=parseInt(s.slice(1,4),10);c={name:\"AES-KW\",length:t};i=[\"wrapKey\",\"unwrapKey\"];break;case\"A128GCMKW\":case\"A192GCMKW\":case\"A256GCMKW\":case\"A128GCM\":case\"A192GCM\":case\"A256GCM\":t=parseInt(s.slice(1,4),10);c={name:\"AES-GCM\",length:t};i=[\"encrypt\",\"decrypt\"];break;default:throw new a('Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value')}return e.subtle.generateKey(c,n?.extractable??false,i)}function getModulusLengthOption(e){const r=e?.modulusLength??2048;if(typeof r!==\"number\"||r<2048)throw new a(\"Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used\");return r}async function generateKeyPair(r,s){let n;let t;switch(r){case\"PS256\":case\"PS384\":case\"PS512\":n={name:\"RSA-PSS\",hash:`SHA-${r.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:getModulusLengthOption(s)};t=[\"sign\",\"verify\"];break;case\"RS256\":case\"RS384\":case\"RS512\":n={name:\"RSASSA-PKCS1-v1_5\",hash:`SHA-${r.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:getModulusLengthOption(s)};t=[\"sign\",\"verify\"];break;case\"RSA-OAEP\":case\"RSA-OAEP-256\":case\"RSA-OAEP-384\":case\"RSA-OAEP-512\":n={name:\"RSA-OAEP\",hash:`SHA-${parseInt(r.slice(-3),10)||1}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:getModulusLengthOption(s)};t=[\"decrypt\",\"unwrapKey\",\"encrypt\",\"wrapKey\"];break;case\"ES256\":n={name:\"ECDSA\",namedCurve:\"P-256\"};t=[\"sign\",\"verify\"];break;case\"ES384\":n={name:\"ECDSA\",namedCurve:\"P-384\"};t=[\"sign\",\"verify\"];break;case\"ES512\":n={name:\"ECDSA\",namedCurve:\"P-521\"};t=[\"sign\",\"verify\"];break;case\"EdDSA\":{t=[\"sign\",\"verify\"];const e=s?.crv??\"Ed25519\";switch(e){case\"Ed25519\":case\"Ed448\":n={name:e};break;default:throw new a(\"Invalid or unsupported crv option provided\")}break}case\"ECDH-ES\":case\"ECDH-ES+A128KW\":case\"ECDH-ES+A192KW\":case\"ECDH-ES+A256KW\":{t=[\"deriveKey\",\"deriveBits\"];const e=s?.crv??\"P-256\";switch(e){case\"P-256\":case\"P-384\":case\"P-521\":n={name:\"ECDH\",namedCurve:e};break;case\"X25519\":case\"X448\":n={name:e};break;default:throw new a(\"Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448\")}break}default:throw new a('Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value')}return e.subtle.generateKey(n,s?.extractable??false,t)}export{generateSecret as a,generateKeyPair as g};\n//# sourceMappingURL=CbWrQy2k.js.map\n","import{g as r}from\"../../../_/CbWrQy2k.js\";import\"../../../_/CNexlW7T.js\";import\"../../../_/DhGwGDkS.js\";import\"../../../_/ifQSxW8Q.js\";async function generateKeyPair(e,t){return r(e,t)}export{generateKeyPair};\n//# sourceMappingURL=generate_key_pair.js.map\n","import{a as e}from\"../../../_/CbWrQy2k.js\";import\"../../../_/CNexlW7T.js\";import\"../../../_/DhGwGDkS.js\";import\"../../../_/ifQSxW8Q.js\";async function generateSecret(r,t){return e(r,t)}export{generateSecret};\n//# sourceMappingURL=generate_secret.js.map\n","export{compactDecrypt}from\"./jwe/compact/decrypt.js\";export{flattenedDecrypt}from\"./jwe/flattened/decrypt.js\";export{generalDecrypt}from\"./jwe/general/decrypt.js\";export{GeneralEncrypt}from\"./jwe/general/encrypt.js\";export{compactVerify}from\"./jws/compact/verify.js\";export{flattenedVerify}from\"./jws/flattened/verify.js\";export{generalVerify}from\"./jws/general/verify.js\";export{jwtVerify}from\"./jwt/verify.js\";export{jwtDecrypt}from\"./jwt/decrypt.js\";export{CompactEncrypt}from\"./jwe/compact/encrypt.js\";export{F as FlattenedEncrypt}from\"../../_/DARKQ00i.js\";export{CompactSign}from\"./jws/compact/sign.js\";export{FlattenedSign}from\"./jws/flattened/sign.js\";export{GeneralSign}from\"./jws/general/sign.js\";export{SignJWT}from\"./jwt/sign.js\";export{EncryptJWT}from\"./jwt/encrypt.js\";export{calculateJwkThumbprint,calculateJwkThumbprintUri}from\"./jwk/thumbprint.js\";export{EmbeddedJWK}from\"./jwk/embedded.js\";export{createLocalJWKSet}from\"./jwks/local.js\";export{createRemoteJWKSet,experimental_jwksCache,jwksCache}from\"./jwks/remote.js\";export{UnsecuredJWT}from\"./jwt/unsecured.js\";export{exportJWK,exportPKCS8,exportSPKI}from\"./key/export.js\";export{importJWK,importPKCS8,importSPKI,importX509}from\"./key/import.js\";export{decodeProtectedHeader}from\"./util/decode_protected_header.js\";export{decodeJwt}from\"./util/decode_jwt.js\";export{e as errors}from\"../../_/DhGwGDkS.js\";export{generateKeyPair}from\"./key/generate_key_pair.js\";export{generateSecret}from\"./key/generate_secret.js\";export{b as base64url}from\"../../_/SszN3Lfa.js\";import\"../../_/zZpWotyK.js\";import\"../../_/CNexlW7T.js\";import\"../../_/C0rpSoBt.js\";import\"../../_/z32JYQqa.js\";import\"../../_/C_CWsW65.js\";import\"../../_/BWzjuGJA.js\";import\"../../_/DXtQ18sb.js\";import\"../../_/ifQSxW8Q.js\";import\"../../_/BwinbG-L.js\";import\"../../_/D6UUwYM5.js\";import\"../../_/DrseF5q4.js\";import\"../../_/Bk6ZYww6.js\";import\"../../_/CLsKaC7_.js\";import\"../../_/CGSr_E-H.js\";import\"../../_/CbWrQy2k.js\";var r=\"WebCryptoAPI\";export{r as cryptoRuntime};\n//# sourceMappingURL=index.js.map\n","let e;if(typeof navigator===\"undefined\"||!navigator.userAgent?.startsWith?.(\"Mozilla/5.0 \")){const t=\"oauth4webapi\";const n=\"v2.17.0\";e=`${t}/${n}`}function looseInstanceOf(e,t){if(e==null)return false;try{return e instanceof t||Object.getPrototypeOf(e)[Symbol.toStringTag]===t.prototype[Symbol.toStringTag]}catch{return false}}const t=Symbol();const n=Symbol();const r=Symbol();const s=Symbol();const o=Symbol();const a=Symbol();const i=Symbol();const c=new TextEncoder;const u=new TextDecoder;function buf(e){return typeof e===\"string\"?c.encode(e):u.decode(e)}const p=32768;function encodeBase64Url(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));const t=[];for(let n=0;n<e.byteLength;n+=p)t.push(String.fromCharCode.apply(null,e.subarray(n,n+p)));return btoa(t.join(\"\")).replace(/=/g,\"\").replace(/\\+/g,\"-\").replace(/\\//g,\"_\")}function decodeBase64Url(e){try{const t=atob(e.replace(/-/g,\"+\").replace(/_/g,\"/\").replace(/\\s/g,\"\"));const n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}catch(e){throw new d(\"The input to be decoded is not correctly encoded.\",{cause:e})}}function b64u(e){return typeof e===\"string\"?decodeBase64Url(e):encodeBase64Url(e)}class LRU{constructor(e){this.cache=new Map;this._cache=new Map;this.maxSize=e}get(e){let t=this.cache.get(e);if(t)return t;if(t=this._cache.get(e)){this.update(e,t);return t}}has(e){return this.cache.has(e)||this._cache.has(e)}set(e,t){this.cache.has(e)?this.cache.set(e,t):this.update(e,t);return this}delete(e){return this.cache.has(e)?this.cache.delete(e):!!this._cache.has(e)&&this._cache.delete(e)}update(e,t){this.cache.set(e,t);if(this.cache.size>=this.maxSize){this._cache=this.cache;this.cache=new Map}}}class UnsupportedOperationError extends Error{constructor(e){super(e??\"operation not supported\");this.name=this.constructor.name;Error.captureStackTrace?.(this,this.constructor)}}class OperationProcessingError extends Error{constructor(e,t){super(e,t);this.name=this.constructor.name;Error.captureStackTrace?.(this,this.constructor)}}const d=OperationProcessingError;const l=new LRU(100);function isCryptoKey(e){return e instanceof CryptoKey}function isPrivateKey(e){return isCryptoKey(e)&&e.type===\"private\"}function isPublicKey(e){return isCryptoKey(e)&&e.type===\"public\"}const h=[\"PS256\",\"ES256\",\"RS256\",\"PS384\",\"ES384\",\"RS384\",\"PS512\",\"ES512\",\"RS512\",\"EdDSA\"];function processDpopNonce(e){try{const t=e.headers.get(\"dpop-nonce\");t&&l.set(new URL(e.url).origin,t)}catch{}return e}function normalizeTyp(e){return e.toLowerCase().replace(/^application\\//,\"\")}function isJsonObject(e){return e!==null&&typeof e===\"object\"&&!Array.isArray(e)}function prepareHeaders(t){looseInstanceOf(t,Headers)&&(t=Object.fromEntries(t.entries()));const n=new Headers(t);e&&!n.has(\"user-agent\")&&n.set(\"user-agent\",e);if(n.has(\"authorization\"))throw new TypeError('\"options.headers\" must not include the \"authorization\" header name');if(n.has(\"dpop\"))throw new TypeError('\"options.headers\" must not include the \"dpop\" header name');return n}function signal(e){typeof e===\"function\"&&(e=e());if(!(e instanceof AbortSignal))throw new TypeError('\"options.signal\" must return or be an instance of AbortSignal');return e}async function discoveryRequest(e,t){if(!(e instanceof URL))throw new TypeError('\"issuerIdentifier\" must be an instance of URL');if(e.protocol!==\"https:\"&&e.protocol!==\"http:\")throw new TypeError('\"issuer.protocol\" must be \"https:\" or \"http:\"');const n=new URL(e.href);switch(t?.algorithm){case void 0:case\"oidc\":n.pathname=`${n.pathname}/.well-known/openid-configuration`.replace(\"//\",\"/\");break;case\"oauth2\":n.pathname===\"/\"?n.pathname=\".well-known/oauth-authorization-server\":n.pathname=`.well-known/oauth-authorization-server/${n.pathname}`.replace(\"//\",\"/\");break;default:throw new TypeError('\"options.algorithm\" must be \"oidc\" (default), or \"oauth2\"')}const s=prepareHeaders(t?.headers);s.set(\"accept\",\"application/json\");return(t?.[r]||fetch)(n.href,{headers:Object.fromEntries(s.entries()),method:\"GET\",redirect:\"manual\",signal:t?.signal?signal(t.signal):null}).then(processDpopNonce)}function validateString(e){return typeof e===\"string\"&&e.length!==0}async function processDiscoveryResponse(e,t){if(!(e instanceof URL))throw new TypeError('\"expectedIssuer\" must be an instance of URL');if(!looseInstanceOf(t,Response))throw new TypeError('\"response\" must be an instance of Response');if(t.status!==200)throw new d('\"response\" is not a conform Authorization Server Metadata response');assertReadableResponse(t);let n;try{n=await t.json()}catch(e){throw new d('failed to parse \"response\" body as JSON',{cause:e})}if(!isJsonObject(n))throw new d('\"response\" body must be a top level object');if(!validateString(n.issuer))throw new d('\"response\" body \"issuer\" property must be a non-empty string');if(new URL(n.issuer).href!==e.href)throw new d('\"response\" body \"issuer\" does not match \"expectedIssuer\"');return n}function randomBytes(){return b64u(crypto.getRandomValues(new Uint8Array(32)))}function generateRandomCodeVerifier(){return randomBytes()}function generateRandomState(){return randomBytes()}function generateRandomNonce(){return randomBytes()}async function calculatePKCECodeChallenge(e){if(!validateString(e))throw new TypeError('\"codeVerifier\" must be a non-empty string');return b64u(await crypto.subtle.digest(\"SHA-256\",buf(e)))}function getKeyAndKid(e){if(e instanceof CryptoKey)return{key:e};if(!(e?.key instanceof CryptoKey))return{};if(e.kid!==void 0&&!validateString(e.kid))throw new TypeError('\"kid\" must be a non-empty string');return{key:e.key,kid:e.kid,modifyAssertion:e[s]}}function formUrlEncode(e){return encodeURIComponent(e).replace(/%20/g,\"+\")}function clientSecretBasic(e,t){const n=formUrlEncode(e);const r=formUrlEncode(t);const s=btoa(`${n}:${r}`);return`Basic ${s}`}function psAlg(e){switch(e.algorithm.hash.name){case\"SHA-256\":return\"PS256\";case\"SHA-384\":return\"PS384\";case\"SHA-512\":return\"PS512\";default:throw new UnsupportedOperationError(\"unsupported RsaHashedKeyAlgorithm hash name\")}}function rsAlg(e){switch(e.algorithm.hash.name){case\"SHA-256\":return\"RS256\";case\"SHA-384\":return\"RS384\";case\"SHA-512\":return\"RS512\";default:throw new UnsupportedOperationError(\"unsupported RsaHashedKeyAlgorithm hash name\")}}function esAlg(e){switch(e.algorithm.namedCurve){case\"P-256\":return\"ES256\";case\"P-384\":return\"ES384\";case\"P-521\":return\"ES512\";default:throw new UnsupportedOperationError(\"unsupported EcKeyAlgorithm namedCurve\")}}function keyToJws(e){switch(e.algorithm.name){case\"RSA-PSS\":return psAlg(e);case\"RSASSA-PKCS1-v1_5\":return rsAlg(e);case\"ECDSA\":return esAlg(e);case\"Ed25519\":case\"Ed448\":return\"EdDSA\";default:throw new UnsupportedOperationError(\"unsupported CryptoKey algorithm name\")}}function getClockSkew(e){const n=e?.[t];return typeof n===\"number\"&&Number.isFinite(n)?n:0}function getClockTolerance(e){const t=e?.[n];return typeof t===\"number\"&&Number.isFinite(t)&&Math.sign(t)!==-1?t:30}function epochTime(){return Math.floor(Date.now()/1e3)}function clientAssertion(e,t){const n=epochTime()+getClockSkew(t);return{jti:randomBytes(),aud:[e.issuer,e.token_endpoint],exp:n+60,iat:n,nbf:n,iss:t.client_id,sub:t.client_id}}async function privateKeyJwt(e,t,n,r,s){const o={alg:keyToJws(n),kid:r};const a=clientAssertion(e,t);s?.(o,a);return jwt(o,a,n)}function assertAs(e){if(typeof e!==\"object\"||e===null)throw new TypeError('\"as\" must be an object');if(!validateString(e.issuer))throw new TypeError('\"as.issuer\" property must be a non-empty string');return true}function assertClient(e){if(typeof e!==\"object\"||e===null)throw new TypeError('\"client\" must be an object');if(!validateString(e.client_id))throw new TypeError('\"client.client_id\" property must be a non-empty string');return true}function assertClientSecret(e){if(!validateString(e))throw new TypeError('\"client.client_secret\" property must be a non-empty string');return e}function assertNoClientPrivateKey(e,t){if(t!==void 0)throw new TypeError(`\"options.clientPrivateKey\" property must not be provided when ${e} client authentication method is used.`)}function assertNoClientSecret(e,t){if(t!==void 0)throw new TypeError(`\"client.client_secret\" property must not be provided when ${e} client authentication method is used.`)}async function clientAuthentication(e,t,n,r,s){n.delete(\"client_secret\");n.delete(\"client_assertion_type\");n.delete(\"client_assertion\");switch(t.token_endpoint_auth_method){case void 0:case\"client_secret_basic\":assertNoClientPrivateKey(\"client_secret_basic\",s);r.set(\"authorization\",clientSecretBasic(t.client_id,assertClientSecret(t.client_secret)));break;case\"client_secret_post\":assertNoClientPrivateKey(\"client_secret_post\",s);n.set(\"client_id\",t.client_id);n.set(\"client_secret\",assertClientSecret(t.client_secret));break;case\"private_key_jwt\":{assertNoClientSecret(\"private_key_jwt\",t.client_secret);if(s===void 0)throw new TypeError('\"options.clientPrivateKey\" must be provided when \"client.token_endpoint_auth_method\" is \"private_key_jwt\"');const{key:r,kid:o,modifyAssertion:a}=getKeyAndKid(s);if(!isPrivateKey(r))throw new TypeError('\"options.clientPrivateKey.key\" must be a private CryptoKey');n.set(\"client_id\",t.client_id);n.set(\"client_assertion_type\",\"urn:ietf:params:oauth:client-assertion-type:jwt-bearer\");n.set(\"client_assertion\",await privateKeyJwt(e,t,r,o,a));break}case\"tls_client_auth\":case\"self_signed_tls_client_auth\":case\"none\":assertNoClientSecret(t.token_endpoint_auth_method,t.client_secret);assertNoClientPrivateKey(t.token_endpoint_auth_method,s);n.set(\"client_id\",t.client_id);break;default:throw new UnsupportedOperationError(\"unsupported client token_endpoint_auth_method\")}}async function jwt(e,t,n){if(!n.usages.includes(\"sign\"))throw new TypeError('CryptoKey instances used for signing assertions must include \"sign\" in their \"usages\"');const r=`${b64u(buf(JSON.stringify(e)))}.${b64u(buf(JSON.stringify(t)))}`;const s=b64u(await crypto.subtle.sign(keyToSubtle(n),n,buf(r)));return`${r}.${s}`}async function issueRequestObject(e,t,n,r){assertAs(e);assertClient(t);n=new URLSearchParams(n);const{key:s,kid:o,modifyAssertion:a}=getKeyAndKid(r);if(!isPrivateKey(s))throw new TypeError('\"privateKey.key\" must be a private CryptoKey');n.set(\"client_id\",t.client_id);const i=epochTime()+getClockSkew(t);const c={...Object.fromEntries(n.entries()),jti:randomBytes(),aud:e.issuer,exp:i+60,iat:i,nbf:i,iss:t.client_id};let u;n.has(\"resource\")&&(u=n.getAll(\"resource\"))&&u.length>1&&(c.resource=u);{let e=n.get(\"max_age\");if(e!==null){c.max_age=parseInt(e,10);if(!Number.isFinite(c.max_age))throw new d('\"max_age\" parameter must be a number')}}{let e=n.get(\"claims\");if(e!==null){try{c.claims=JSON.parse(e)}catch(e){throw new d('failed to parse the \"claims\" parameter as JSON',{cause:e})}if(!isJsonObject(c.claims))throw new d('\"claims\" parameter must be a JSON with a top level object')}}{let e=n.get(\"authorization_details\");if(e!==null){try{c.authorization_details=JSON.parse(e)}catch(e){throw new d('failed to parse the \"authorization_details\" parameter as JSON',{cause:e})}if(!Array.isArray(c.authorization_details))throw new d('\"authorization_details\" parameter must be a JSON with a top level array')}}const p={alg:keyToJws(s),typ:\"oauth-authz-req+jwt\",kid:o};a?.(p,c);return jwt(p,c,s)}async function dpopProofJwt(e,t,n,r,o,a){const{privateKey:i,publicKey:c,nonce:u=l.get(n.origin)}=t;if(!isPrivateKey(i))throw new TypeError('\"DPoP.privateKey\" must be a private CryptoKey');if(!isPublicKey(c))throw new TypeError('\"DPoP.publicKey\" must be a public CryptoKey');if(u!==void 0&&!validateString(u))throw new TypeError('\"DPoP.nonce\" must be a non-empty string or undefined');if(!c.extractable)throw new TypeError('\"DPoP.publicKey.extractable\" must be true');const p=epochTime()+o;const d={alg:keyToJws(i),typ:\"dpop+jwt\",jwk:await publicJwk(c)};const h={iat:p,jti:randomBytes(),htm:r,nonce:u,htu:`${n.origin}${n.pathname}`,ath:a?b64u(await crypto.subtle.digest(\"SHA-256\",buf(a))):void 0};t[s]?.(d,h);e.set(\"dpop\",await jwt(d,h,i))}let w;async function getSetPublicJwkCache(e){const{kty:t,e:n,n:r,x:s,y:o,crv:a}=await crypto.subtle.exportKey(\"jwk\",e);const i={kty:t,e:n,n:r,x:s,y:o,crv:a};w.set(e,i);return i}async function publicJwk(e){w||(w=new WeakMap);return w.get(e)||getSetPublicJwkCache(e)}function validateEndpoint(e,t,n){if(typeof e!==\"string\"){if(n)throw new TypeError(`\"as.mtls_endpoint_aliases.${t}\" must be a string`);throw new TypeError(`\"as.${t}\" must be a string`)}return new URL(e)}function resolveEndpoint(e,t,n=false){return n&&e.mtls_endpoint_aliases&&t in e.mtls_endpoint_aliases?validateEndpoint(e.mtls_endpoint_aliases[t],t,n):validateEndpoint(e[t],t,n)}function alias(e,t){return!(!e.use_mtls_endpoint_aliases&&!t?.[i])}async function pushedAuthorizationRequest(e,t,n,r){assertAs(e);assertClient(t);const s=resolveEndpoint(e,\"pushed_authorization_request_endpoint\",alias(t,r));const o=new URLSearchParams(n);o.set(\"client_id\",t.client_id);const a=prepareHeaders(r?.headers);a.set(\"accept\",\"application/json\");r?.DPoP!==void 0&&await dpopProofJwt(a,r.DPoP,s,\"POST\",getClockSkew(t));return authenticatedRequest(e,t,\"POST\",s,o,a,r)}function isOAuth2Error(e){const t=e;return typeof t===\"object\"&&!Array.isArray(t)&&t!==null&&t.error!==void 0}function unquote(e){return e.length>=2&&e[0]==='\"'&&e[e.length-1]==='\"'?e.slice(1,-1):e}const f=/((?:,|, )?[0-9a-zA-Z!#$%&'*+-.^_`|~]+=)/;const m=/(?:^|, ?)([0-9a-zA-Z!#$%&'*+\\-.^_`|~]+)(?=$|[ ,])/g;function wwwAuth(e,t){const n=t.split(f).slice(1);if(!n.length)return{scheme:e.toLowerCase(),parameters:{}};n[n.length-1]=n[n.length-1].replace(/,$/,\"\");const r={};for(let e=1;e<n.length;e+=2){const t=e;if(n[t][0]==='\"')while(n[t].slice(-1)!=='\"'&&++e<n.length)n[t]+=n[e];const s=n[t-1].replace(/^(?:, ?)|=$/g,\"\").toLowerCase();r[s]=unquote(n[t])}return{scheme:e.toLowerCase(),parameters:r}}function parseWwwAuthenticateChallenges(e){if(!looseInstanceOf(e,Response))throw new TypeError('\"response\" must be an instance of Response');const t=e.headers.get(\"www-authenticate\");if(t===null)return;const n=[];for(const{1:e,index:r}of t.matchAll(m))n.push([e,r]);if(!n.length)return;const r=n.map((([e,n],r,s)=>{const o=s[r+1];let a;a=o?t.slice(n,o[1]):t.slice(n);return wwwAuth(e,a)}));return r}async function processPushedAuthorizationResponse(e,t,n){assertAs(e);assertClient(t);if(!looseInstanceOf(n,Response))throw new TypeError('\"response\" must be an instance of Response');if(n.status!==201){let e;if(e=await handleOAuthBodyError(n))return e;throw new d('\"response\" is not a conform Pushed Authorization Request Endpoint response')}assertReadableResponse(n);let r;try{r=await n.json()}catch(e){throw new d('failed to parse \"response\" body as JSON',{cause:e})}if(!isJsonObject(r))throw new d('\"response\" body must be a top level object');if(!validateString(r.request_uri))throw new d('\"response\" body \"request_uri\" property must be a non-empty string');if(typeof r.expires_in!==\"number\"||r.expires_in<=0)throw new d('\"response\" body \"expires_in\" property must be a positive number');return r}async function protectedResourceRequest(e,n,s,o,a,i){if(!validateString(e))throw new TypeError('\"accessToken\" must be a non-empty string');if(!(s instanceof URL))throw new TypeError('\"url\" must be an instance of URL');o=prepareHeaders(o);if(i?.DPoP===void 0)o.set(\"authorization\",`Bearer ${e}`);else{await dpopProofJwt(o,i.DPoP,s,n.toUpperCase(),getClockSkew({[t]:i?.[t]}),e);o.set(\"authorization\",`DPoP ${e}`)}return(i?.[r]||fetch)(s.href,{body:a,headers:Object.fromEntries(o.entries()),method:n,redirect:\"manual\",signal:i?.signal?signal(i.signal):null}).then(processDpopNonce)}async function userInfoRequest(e,n,r,s){assertAs(e);assertClient(n);const o=resolveEndpoint(e,\"userinfo_endpoint\",alias(n,s));const a=prepareHeaders(s?.headers);if(n.userinfo_signed_response_alg)a.set(\"accept\",\"application/jwt\");else{a.set(\"accept\",\"application/json\");a.append(\"accept\",\"application/jwt\")}return protectedResourceRequest(r,\"GET\",o,a,null,{...s,[t]:getClockSkew(n)})}let y;function setJwksCache(e,t,n,r){y||(y=new WeakMap);y.set(e,{jwks:t,uat:n,get age(){return epochTime()-this.uat}});r&&Object.assign(r,{jwks:structuredClone(t),uat:n})}function isFreshJwksCache(e){return typeof e===\"object\"&&e!==null&&(\"uat\"in e&&typeof e.uat===\"number\"&&!(epochTime()-e.uat>=300)&&!!(\"jwks\"in e&&isJsonObject(e.jwks)&&Array.isArray(e.jwks.keys)&&Array.prototype.every.call(e.jwks.keys,isJsonObject)))}function clearJwksCache(e,t){y?.delete(e);delete t?.jwks;delete t?.uat}async function getPublicSigKeyFromIssuerJwksUri(e,t,n){const{alg:r,kid:s}=n;checkSupportedJwsAlg(r);!y?.has(e)&&isFreshJwksCache(t?.[a])&&setJwksCache(e,t?.[a].jwks,t?.[a].uat);let o;let i;if(y?.has(e)){({jwks:o,age:i}=y.get(e));if(i>=300){clearJwksCache(e,t?.[a]);return getPublicSigKeyFromIssuerJwksUri(e,t,n)}}else{o=await jwksRequest(e,t).then(processJwksResponse);i=0;setJwksCache(e,o,epochTime(),t?.[a])}let c;switch(r.slice(0,2)){case\"RS\":case\"PS\":c=\"RSA\";break;case\"ES\":c=\"EC\";break;case\"Ed\":c=\"OKP\";break;default:throw new UnsupportedOperationError}const u=o.keys.filter((e=>{if(e.kty!==c)return false;if(s!==void 0&&s!==e.kid)return false;if(e.alg!==void 0&&r!==e.alg)return false;if(e.use!==void 0&&e.use!==\"sig\")return false;if(e.key_ops?.includes(\"verify\")===false)return false;switch(true){case r===\"ES256\"&&e.crv!==\"P-256\":case r===\"ES384\"&&e.crv!==\"P-384\":case r===\"ES512\"&&e.crv!==\"P-521\":case r===\"EdDSA\"&&!(e.crv===\"Ed25519\"||e.crv===\"Ed448\"):return false}return true}));const{0:p,length:l}=u;if(!l){if(i>=60){clearJwksCache(e,t?.[a]);return getPublicSigKeyFromIssuerJwksUri(e,t,n)}throw new d(\"error when selecting a JWT verification key, no applicable keys found\")}if(l!==1)throw new d('error when selecting a JWT verification key, multiple applicable keys found, a \"kid\" JWT Header Parameter is required');const h=await importJwk(r,p);if(h.type!==\"public\")throw new d(\"jwks_uri must only contain public keys\");return h}const g=Symbol();function getContentType(e){return e.headers.get(\"content-type\")?.split(\";\")[0]}async function processUserInfoResponse(e,t,n,r){assertAs(e);assertClient(t);if(!looseInstanceOf(r,Response))throw new TypeError('\"response\" must be an instance of Response');if(r.status!==200)throw new d('\"response\" is not a conform UserInfo Endpoint response');let s;if(getContentType(r)===\"application/jwt\"){assertReadableResponse(r);const{claims:n,jwt:a}=await validateJwt(await r.text(),checkSigningAlgorithm.bind(void 0,t.userinfo_signed_response_alg,e.userinfo_signing_alg_values_supported),T,getClockSkew(t),getClockTolerance(t),t[o]).then(validateOptionalAudience.bind(void 0,t.client_id)).then(validateOptionalIssuer.bind(void 0,e.issuer));v.set(r,a);s=n}else{if(t.userinfo_signed_response_alg)throw new d(\"JWT UserInfo Response expected\");assertReadableResponse(r);try{s=await r.json()}catch(e){throw new d('failed to parse \"response\" body as JSON',{cause:e})}}if(!isJsonObject(s))throw new d('\"response\" body must be a top level object');if(!validateString(s.sub))throw new d('\"response\" body \"sub\" property must be a non-empty string');switch(n){case g:break;default:if(!validateString(n))throw new d('\"expectedSubject\" must be a non-empty string');if(s.sub!==n)throw new d('unexpected \"response\" body \"sub\" value')}return s}async function authenticatedRequest(e,t,n,s,o,a,i){await clientAuthentication(e,t,o,a,i?.clientPrivateKey);a.set(\"content-type\",\"application/x-www-form-urlencoded;charset=UTF-8\");return(i?.[r]||fetch)(s.href,{body:o,headers:Object.fromEntries(a.entries()),method:n,redirect:\"manual\",signal:i?.signal?signal(i.signal):null}).then(processDpopNonce)}async function tokenEndpointRequest(e,t,n,r,s){const o=resolveEndpoint(e,\"token_endpoint\",alias(t,s));r.set(\"grant_type\",n);const a=prepareHeaders(s?.headers);a.set(\"accept\",\"application/json\");s?.DPoP!==void 0&&await dpopProofJwt(a,s.DPoP,o,\"POST\",getClockSkew(t));return authenticatedRequest(e,t,\"POST\",o,r,a,s)}async function refreshTokenGrantRequest(e,t,n,r){assertAs(e);assertClient(t);if(!validateString(n))throw new TypeError('\"refreshToken\" must be a non-empty string');const s=new URLSearchParams(r?.additionalParameters);s.set(\"refresh_token\",n);return tokenEndpointRequest(e,t,\"refresh_token\",s,r)}const b=new WeakMap;const v=new WeakMap;function getValidatedIdTokenClaims(e){if(!e.id_token)return;const t=b.get(e);if(!t)throw new TypeError('\"ref\" was already garbage collected or did not resolve from the proper sources');return t[0]}async function validateIdTokenSignature(e,t,n){assertAs(e);if(!b.has(t))throw new d('\"ref\" does not contain an ID Token to verify the signature of');const{0:r,1:s,2:o}=b.get(t)[1].split(\".\");const a=JSON.parse(buf(b64u(r)));if(a.alg.startsWith(\"HS\"))throw new UnsupportedOperationError;let i;i=await getPublicSigKeyFromIssuerJwksUri(e,n,a);await validateJwsSignature(r,s,i,b64u(o))}async function validateJwtResponseSignature(e,t,n){assertAs(e);if(!v.has(t))throw new d('\"ref\" does not contain a processed JWT Response to verify the signature of');const{0:r,1:s,2:o}=v.get(t).split(\".\");const a=JSON.parse(buf(b64u(r)));if(a.alg.startsWith(\"HS\"))throw new UnsupportedOperationError;let i;i=await getPublicSigKeyFromIssuerJwksUri(e,n,a);await validateJwsSignature(r,s,i,b64u(o))}function validateJwtUserInfoSignature(e,t,n){return validateJwtResponseSignature(e,t,n)}function validateJwtIntrospectionSignature(e,t,n){return validateJwtResponseSignature(e,t,n)}async function processGenericAccessTokenResponse(e,t,n,r=false,s=false){assertAs(e);assertClient(t);if(!looseInstanceOf(n,Response))throw new TypeError('\"response\" must be an instance of Response');if(n.status!==200){let e;if(e=await handleOAuthBodyError(n))return e;throw new d('\"response\" is not a conform Token Endpoint response')}assertReadableResponse(n);let a;try{a=await n.json()}catch(e){throw new d('failed to parse \"response\" body as JSON',{cause:e})}if(!isJsonObject(a))throw new d('\"response\" body must be a top level object');if(!validateString(a.access_token))throw new d('\"response\" body \"access_token\" property must be a non-empty string');if(!validateString(a.token_type))throw new d('\"response\" body \"token_type\" property must be a non-empty string');a.token_type=a.token_type.toLowerCase();if(a.token_type!==\"dpop\"&&a.token_type!==\"bearer\")throw new UnsupportedOperationError(\"unsupported `token_type` value\");if(a.expires_in!==void 0&&(typeof a.expires_in!==\"number\"||a.expires_in<=0))throw new d('\"response\" body \"expires_in\" property must be a positive number');if(!s&&a.refresh_token!==void 0&&!validateString(a.refresh_token))throw new d('\"response\" body \"refresh_token\" property must be a non-empty string');if(a.scope!==void 0&&typeof a.scope!==\"string\")throw new d('\"response\" body \"scope\" property must be a string');if(!r){if(a.id_token!==void 0&&!validateString(a.id_token))throw new d('\"response\" body \"id_token\" property must be a non-empty string');if(a.id_token){const{claims:n,jwt:r}=await validateJwt(a.id_token,checkSigningAlgorithm.bind(void 0,t.id_token_signed_response_alg,e.id_token_signing_alg_values_supported),T,getClockSkew(t),getClockTolerance(t),t[o]).then(validatePresence.bind(void 0,[\"aud\",\"exp\",\"iat\",\"iss\",\"sub\"])).then(validateIssuer.bind(void 0,e.issuer)).then(validateAudience.bind(void 0,t.client_id));if(Array.isArray(n.aud)&&n.aud.length!==1){if(n.azp===void 0)throw new d('ID Token \"aud\" (audience) claim includes additional untrusted audiences');if(n.azp!==t.client_id)throw new d('unexpected ID Token \"azp\" (authorized party) claim value')}if(n.auth_time!==void 0&&(!Number.isFinite(n.auth_time)||Math.sign(n.auth_time)!==1))throw new d('ID Token \"auth_time\" (authentication time) must be a positive number');b.set(a,[n,r])}}return a}async function processRefreshTokenResponse(e,t,n){return processGenericAccessTokenResponse(e,t,n)}function validateOptionalAudience(e,t){return t.claims.aud!==void 0?validateAudience(e,t):t}function validateAudience(e,t){if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e))throw new d('unexpected JWT \"aud\" (audience) claim value')}else if(t.claims.aud!==e)throw new d('unexpected JWT \"aud\" (audience) claim value');return t}function validateOptionalIssuer(e,t){return t.claims.iss!==void 0?validateIssuer(e,t):t}function validateIssuer(e,t){if(t.claims.iss!==e)throw new d('unexpected JWT \"iss\" (issuer) claim value');return t}const k=new WeakSet;function brand(e){k.add(e);return e}async function authorizationCodeGrantRequest(e,t,n,r,s,o){assertAs(e);assertClient(t);if(!k.has(n))throw new TypeError('\"callbackParameters\" must be an instance of URLSearchParams obtained from \"validateAuthResponse()\", or \"validateJwtAuthResponse()');if(!validateString(r))throw new TypeError('\"redirectUri\" must be a non-empty string');if(!validateString(s))throw new TypeError('\"codeVerifier\" must be a non-empty string');const a=getURLSearchParameter(n,\"code\");if(!a)throw new d('no authorization code in \"callbackParameters\"');const i=new URLSearchParams(o?.additionalParameters);i.set(\"redirect_uri\",r);i.set(\"code_verifier\",s);i.set(\"code\",a);return tokenEndpointRequest(e,t,\"authorization_code\",i,o)}const S={aud:\"audience\",c_hash:\"code hash\",client_id:\"client id\",exp:\"expiration time\",iat:\"issued at\",iss:\"issuer\",jti:\"jwt id\",nonce:\"nonce\",s_hash:\"state hash\",sub:\"subject\",ath:\"access token hash\",htm:\"http method\",htu:\"http uri\",cnf:\"confirmation\"};function validatePresence(e,t){for(const n of e)if(t.claims[n]===void 0)throw new d(`JWT \"${n}\" (${S[n]}) claim missing`);return t}const _=Symbol();const R=Symbol();async function processAuthorizationCodeOpenIDResponse(e,t,n,r,s){const o=await processGenericAccessTokenResponse(e,t,n);if(isOAuth2Error(o))return o;if(!validateString(o.id_token))throw new d('\"response\" body \"id_token\" property must be a non-empty string');s??(s=t.default_max_age??R);const a=getValidatedIdTokenClaims(o);if((t.require_auth_time||s!==R)&&a.auth_time===void 0)throw new d('ID Token \"auth_time\" (authentication time) claim missing');if(s!==R){if(typeof s!==\"number\"||s<0)throw new TypeError('\"maxAge\" must be a non-negative number');const e=epochTime()+getClockSkew(t);const n=getClockTolerance(t);if(a.auth_time+s<e-n)throw new d(\"too much time has elapsed since the last End-User authentication\")}switch(r){case void 0:case _:if(a.nonce!==void 0)throw new d('unexpected ID Token \"nonce\" claim value');break;default:if(!validateString(r))throw new TypeError('\"expectedNonce\" must be a non-empty string');if(a.nonce===void 0)throw new d('ID Token \"nonce\" claim missing');if(a.nonce!==r)throw new d('unexpected ID Token \"nonce\" claim value')}return o}async function processAuthorizationCodeOAuth2Response(e,t,n){const r=await processGenericAccessTokenResponse(e,t,n,true);if(isOAuth2Error(r))return r;if(r.id_token!==void 0){if(typeof r.id_token===\"string\"&&r.id_token.length)throw new d(\"Unexpected ID Token returned, use processAuthorizationCodeOpenIDResponse() for OpenID Connect callback processing\");delete r.id_token}return r}function checkJwtType(e,t){if(typeof t.header.typ!==\"string\"||normalizeTyp(t.header.typ)!==e)throw new d('unexpected JWT \"typ\" header parameter value');return t}async function clientCredentialsGrantRequest(e,t,n,r){assertAs(e);assertClient(t);return tokenEndpointRequest(e,t,\"client_credentials\",new URLSearchParams(n),r)}async function genericTokenEndpointRequest(e,t,n,r,s){assertAs(e);assertClient(t);if(!validateString(n))throw new TypeError('\"grantType\" must be a non-empty string');return tokenEndpointRequest(e,t,n,new URLSearchParams(r),s)}async function processClientCredentialsResponse(e,t,n){const r=await processGenericAccessTokenResponse(e,t,n,true,true);return isOAuth2Error(r),r}async function revocationRequest(e,t,n,r){assertAs(e);assertClient(t);if(!validateString(n))throw new TypeError('\"token\" must be a non-empty string');const s=resolveEndpoint(e,\"revocation_endpoint\",alias(t,r));const o=new URLSearchParams(r?.additionalParameters);o.set(\"token\",n);const a=prepareHeaders(r?.headers);a.delete(\"accept\");return authenticatedRequest(e,t,\"POST\",s,o,a,r)}async function processRevocationResponse(e){if(!looseInstanceOf(e,Response))throw new TypeError('\"response\" must be an instance of Response');if(e.status!==200){let t;if(t=await handleOAuthBodyError(e))return t;throw new d('\"response\" is not a conform Revocation Endpoint response')}}function assertReadableResponse(e){if(e.bodyUsed)throw new TypeError('\"response\" body has been used already')}async function introspectionRequest(e,t,n,r){assertAs(e);assertClient(t);if(!validateString(n))throw new TypeError('\"token\" must be a non-empty string');const s=resolveEndpoint(e,\"introspection_endpoint\",alias(t,r));const o=new URLSearchParams(r?.additionalParameters);o.set(\"token\",n);const a=prepareHeaders(r?.headers);r?.requestJwtResponse??t.introspection_signed_response_alg?a.set(\"accept\",\"application/token-introspection+jwt\"):a.set(\"accept\",\"application/json\");return authenticatedRequest(e,t,\"POST\",s,o,a,r)}async function processIntrospectionResponse(e,t,n){assertAs(e);assertClient(t);if(!looseInstanceOf(n,Response))throw new TypeError('\"response\" must be an instance of Response');if(n.status!==200){let e;if(e=await handleOAuthBodyError(n))return e;throw new d('\"response\" is not a conform Introspection Endpoint response')}let r;if(getContentType(n)===\"application/token-introspection+jwt\"){assertReadableResponse(n);const{claims:s,jwt:a}=await validateJwt(await n.text(),checkSigningAlgorithm.bind(void 0,t.introspection_signed_response_alg,e.introspection_signing_alg_values_supported),T,getClockSkew(t),getClockTolerance(t),t[o]).then(checkJwtType.bind(void 0,\"token-introspection+jwt\")).then(validatePresence.bind(void 0,[\"aud\",\"iat\",\"iss\"])).then(validateIssuer.bind(void 0,e.issuer)).then(validateAudience.bind(void 0,t.client_id));v.set(n,a);r=s.token_introspection;if(!isJsonObject(r))throw new d('JWT \"token_introspection\" claim must be a JSON object')}else{assertReadableResponse(n);try{r=await n.json()}catch(e){throw new d('failed to parse \"response\" body as JSON',{cause:e})}if(!isJsonObject(r))throw new d('\"response\" body must be a top level object')}if(typeof r.active!==\"boolean\")throw new d('\"response\" body \"active\" property must be a boolean');return r}async function jwksRequest(e,t){assertAs(e);const n=resolveEndpoint(e,\"jwks_uri\");const s=prepareHeaders(t?.headers);s.set(\"accept\",\"application/json\");s.append(\"accept\",\"application/jwk-set+json\");return(t?.[r]||fetch)(n.href,{headers:Object.fromEntries(s.entries()),method:\"GET\",redirect:\"manual\",signal:t?.signal?signal(t.signal):null}).then(processDpopNonce)}async function processJwksResponse(e){if(!looseInstanceOf(e,Response))throw new TypeError('\"response\" must be an instance of Response');if(e.status!==200)throw new d('\"response\" is not a conform JSON Web Key Set response');assertReadableResponse(e);let t;try{t=await e.json()}catch(e){throw new d('failed to parse \"response\" body as JSON',{cause:e})}if(!isJsonObject(t))throw new d('\"response\" body must be a top level object');if(!Array.isArray(t.keys))throw new d('\"response\" body \"keys\" property must be an array');if(!Array.prototype.every.call(t.keys,isJsonObject))throw new d('\"response\" body \"keys\" property members must be JWK formatted objects');return t}async function handleOAuthBodyError(e){if(e.status>399&&e.status<500){assertReadableResponse(e);try{const t=await e.json();if(isJsonObject(t)&&typeof t.error===\"string\"&&t.error.length){t.error_description!==void 0&&typeof t.error_description!==\"string\"&&delete t.error_description;t.error_uri!==void 0&&typeof t.error_uri!==\"string\"&&delete t.error_uri;t.algs!==void 0&&typeof t.algs!==\"string\"&&delete t.algs;t.scope!==void 0&&typeof t.scope!==\"string\"&&delete t.scope;return t}}catch{}}}function checkSupportedJwsAlg(e){if(!h.includes(e))throw new UnsupportedOperationError('unsupported JWS \"alg\" identifier');return e}function checkRsaKeyAlgorithm(e){if(typeof e.modulusLength!==\"number\"||e.modulusLength<2048)throw new d(`${e.name} modulusLength must be at least 2048 bits`)}function ecdsaHashName(e){switch(e){case\"P-256\":return\"SHA-256\";case\"P-384\":return\"SHA-384\";case\"P-521\":return\"SHA-512\";default:throw new UnsupportedOperationError}}function keyToSubtle(e){switch(e.algorithm.name){case\"ECDSA\":return{name:e.algorithm.name,hash:ecdsaHashName(e.algorithm.namedCurve)};case\"RSA-PSS\":checkRsaKeyAlgorithm(e.algorithm);switch(e.algorithm.hash.name){case\"SHA-256\":case\"SHA-384\":case\"SHA-512\":return{name:e.algorithm.name,saltLength:parseInt(e.algorithm.hash.name.slice(-3),10)>>3};default:throw new UnsupportedOperationError}case\"RSASSA-PKCS1-v1_5\":checkRsaKeyAlgorithm(e.algorithm);return e.algorithm.name;case\"Ed448\":case\"Ed25519\":return e.algorithm.name}throw new UnsupportedOperationError}const T=Symbol();async function validateJwsSignature(e,t,n,r){const s=`${e}.${t}`;const o=await crypto.subtle.verify(keyToSubtle(n),n,r,buf(s));if(!o)throw new d(\"JWT signature verification failed\")}async function validateJwt(e,t,n,r,s,o){let{0:a,1:i,2:c,length:u}=e.split(\".\");if(u===5){if(o===void 0)throw new UnsupportedOperationError(\"JWE structure JWTs are not supported\");e=await o(e);({0:a,1:i,2:c,length:u}=e.split(\".\"))}if(u!==3)throw new d(\"Invalid JWT\");let p;try{p=JSON.parse(buf(b64u(a)))}catch(e){throw new d(\"failed to parse JWT Header body as base64url encoded JSON\",{cause:e})}if(!isJsonObject(p))throw new d(\"JWT Header must be a top level object\");t(p);if(p.crit!==void 0)throw new d('unexpected JWT \"crit\" header parameter');const l=b64u(c);let h;if(n!==T){h=await n(p);await validateJwsSignature(a,i,h,l)}let w;try{w=JSON.parse(buf(b64u(i)))}catch(e){throw new d(\"failed to parse JWT Payload body as base64url encoded JSON\",{cause:e})}if(!isJsonObject(w))throw new d(\"JWT Payload must be a top level object\");const f=epochTime()+r;if(w.exp!==void 0){if(typeof w.exp!==\"number\")throw new d('unexpected JWT \"exp\" (expiration time) claim type');if(w.exp<=f-s)throw new d('unexpected JWT \"exp\" (expiration time) claim value, timestamp is <= now()')}if(w.iat!==void 0&&typeof w.iat!==\"number\")throw new d('unexpected JWT \"iat\" (issued at) claim type');if(w.iss!==void 0&&typeof w.iss!==\"string\")throw new d('unexpected JWT \"iss\" (issuer) claim type');if(w.nbf!==void 0){if(typeof w.nbf!==\"number\")throw new d('unexpected JWT \"nbf\" (not before) claim type');if(w.nbf>f+s)throw new d('unexpected JWT \"nbf\" (not before) claim value, timestamp is > now()')}if(w.aud!==void 0&&typeof w.aud!==\"string\"&&!Array.isArray(w.aud))throw new d('unexpected JWT \"aud\" (audience) claim type');return{header:p,claims:w,signature:l,key:h,jwt:e}}async function validateJwtAuthResponse(e,t,n,r,s){assertAs(e);assertClient(t);n instanceof URL&&(n=n.searchParams);if(!(n instanceof URLSearchParams))throw new TypeError('\"parameters\" must be an instance of URLSearchParams, or URL');const a=getURLSearchParameter(n,\"response\");if(!a)throw new d('\"parameters\" does not contain a JARM response');const{claims:i}=await validateJwt(a,checkSigningAlgorithm.bind(void 0,t.authorization_signed_response_alg,e.authorization_signing_alg_values_supported),getPublicSigKeyFromIssuerJwksUri.bind(void 0,e,s),getClockSkew(t),getClockTolerance(t),t[o]).then(validatePresence.bind(void 0,[\"aud\",\"exp\",\"iss\"])).then(validateIssuer.bind(void 0,e.issuer)).then(validateAudience.bind(void 0,t.client_id));const c=new URLSearchParams;for(const[e,t]of Object.entries(i))typeof t===\"string\"&&e!==\"aud\"&&c.set(e,t);return validateAuthResponse(e,t,c,r)}async function idTokenHash(e,t,n){let r;switch(e){case\"RS256\":case\"PS256\":case\"ES256\":r=\"SHA-256\";break;case\"RS384\":case\"PS384\":case\"ES384\":r=\"SHA-384\";break;case\"RS512\":case\"PS512\":case\"ES512\":r=\"SHA-512\";break;case\"EdDSA\":if(n.algorithm.name===\"Ed25519\"){r=\"SHA-512\";break}throw new UnsupportedOperationError;default:throw new UnsupportedOperationError}const s=await crypto.subtle.digest(r,buf(t));return b64u(s.slice(0,s.byteLength/2))}async function idTokenHashMatches(e,t,n,r){const s=await idTokenHash(n,e,r);return t===s}async function validateDetachedSignatureResponse(e,t,n,r,s,a,i){assertAs(e);assertClient(t);if(n instanceof URL){if(!n.hash.length)throw new TypeError('\"parameters\" as an instance of URL must contain a hash (fragment) with the Authorization Response parameters');n=new URLSearchParams(n.hash.slice(1))}if(!(n instanceof URLSearchParams))throw new TypeError('\"parameters\" must be an instance of URLSearchParams');n=new URLSearchParams(n);const c=getURLSearchParameter(n,\"id_token\");n.delete(\"id_token\");switch(s){case void 0:case P:break;default:if(!validateString(s))throw new TypeError('\"expectedState\" must be a non-empty string')}const u=validateAuthResponse({...e,authorization_response_iss_parameter_supported:false},t,n,s);if(isOAuth2Error(u))return u;if(!c)throw new d('\"parameters\" does not contain an ID Token');const p=getURLSearchParameter(n,\"code\");if(!p)throw new d('\"parameters\" does not contain an Authorization Code');const l=[\"aud\",\"exp\",\"iat\",\"iss\",\"sub\",\"nonce\",\"c_hash\"];typeof s===\"string\"&&l.push(\"s_hash\");const{claims:h,header:w,key:f}=await validateJwt(c,checkSigningAlgorithm.bind(void 0,t.id_token_signed_response_alg,e.id_token_signing_alg_values_supported),getPublicSigKeyFromIssuerJwksUri.bind(void 0,e,i),getClockSkew(t),getClockTolerance(t),t[o]).then(validatePresence.bind(void 0,l)).then(validateIssuer.bind(void 0,e.issuer)).then(validateAudience.bind(void 0,t.client_id));const m=getClockSkew(t);const y=epochTime()+m;if(h.iat<y-3600)throw new d('unexpected JWT \"iat\" (issued at) claim value, it is too far in the past');if(typeof h.c_hash!==\"string\"||await idTokenHashMatches(p,h.c_hash,w.alg,f)!==true)throw new d('invalid ID Token \"c_hash\" (code hash) claim value');if(h.s_hash!==void 0&&typeof s!==\"string\")throw new d('could not verify ID Token \"s_hash\" (state hash) claim value');if(typeof s===\"string\"&&(typeof h.s_hash!==\"string\"||await idTokenHashMatches(s,h.s_hash,w.alg,f)!==true))throw new d('invalid ID Token \"s_hash\" (state hash) claim value');if(h.auth_time!==void 0&&(!Number.isFinite(h.auth_time)||Math.sign(h.auth_time)!==1))throw new d('ID Token \"auth_time\" (authentication time) must be a positive number');a??(a=t.default_max_age??R);if((t.require_auth_time||a!==R)&&h.auth_time===void 0)throw new d('ID Token \"auth_time\" (authentication time) claim missing');if(a!==R){if(typeof a!==\"number\"||a<0)throw new TypeError('\"maxAge\" must be a non-negative number');const e=epochTime()+getClockSkew(t);const n=getClockTolerance(t);if(h.auth_time+a<e-n)throw new d(\"too much time has elapsed since the last End-User authentication\")}if(!validateString(r))throw new TypeError('\"expectedNonce\" must be a non-empty string');if(h.nonce!==r)throw new d('unexpected ID Token \"nonce\" claim value');if(Array.isArray(h.aud)&&h.aud.length!==1){if(h.azp===void 0)throw new d('ID Token \"aud\" (audience) claim includes additional untrusted audiences');if(h.azp!==t.client_id)throw new d('unexpected ID Token \"azp\" (authorized party) claim value')}return u}function checkSigningAlgorithm(e,t,n){if(e===void 0){if(Array.isArray(t)){if(!t.includes(n.alg))throw new d('unexpected JWT \"alg\" header parameter')}else if(n.alg!==\"RS256\")throw new d('unexpected JWT \"alg\" header parameter')}else if(n.alg!==e)throw new d('unexpected JWT \"alg\" header parameter')}function getURLSearchParameter(e,t){const{0:n,length:r}=e.getAll(t);if(r>1)throw new d(`\"${t}\" parameter must be provided only once`);return n}const A=Symbol();const P=Symbol();function validateAuthResponse(e,t,n,r){assertAs(e);assertClient(t);n instanceof URL&&(n=n.searchParams);if(!(n instanceof URLSearchParams))throw new TypeError('\"parameters\" must be an instance of URLSearchParams, or URL');if(getURLSearchParameter(n,\"response\"))throw new d('\"parameters\" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()');const s=getURLSearchParameter(n,\"iss\");const o=getURLSearchParameter(n,\"state\");if(!s&&e.authorization_response_iss_parameter_supported)throw new d('response parameter \"iss\" (issuer) missing');if(s&&s!==e.issuer)throw new d('unexpected \"iss\" (issuer) response parameter value');switch(r){case void 0:case P:if(o!==void 0)throw new d('unexpected \"state\" response parameter encountered');break;case A:break;default:if(!validateString(r))throw new d('\"expectedState\" must be a non-empty string');if(o===void 0)throw new d('response parameter \"state\" missing');if(o!==r)throw new d('unexpected \"state\" response parameter value')}const a=getURLSearchParameter(n,\"error\");if(a)return{error:a,error_description:getURLSearchParameter(n,\"error_description\"),error_uri:getURLSearchParameter(n,\"error_uri\")};const i=getURLSearchParameter(n,\"id_token\");const c=getURLSearchParameter(n,\"token\");if(i!==void 0||c!==void 0)throw new UnsupportedOperationError(\"implicit and hybrid flows are not supported\");return brand(new URLSearchParams(n))}function algToSubtle(e,t){switch(e){case\"PS256\":case\"PS384\":case\"PS512\":return{name:\"RSA-PSS\",hash:`SHA-${e.slice(-3)}`};case\"RS256\":case\"RS384\":case\"RS512\":return{name:\"RSASSA-PKCS1-v1_5\",hash:`SHA-${e.slice(-3)}`};case\"ES256\":case\"ES384\":return{name:\"ECDSA\",namedCurve:`P-${e.slice(-3)}`};case\"ES512\":return{name:\"ECDSA\",namedCurve:\"P-521\"};case\"EdDSA\":switch(t){case\"Ed25519\":case\"Ed448\":return t;default:throw new UnsupportedOperationError}default:throw new UnsupportedOperationError}}async function importJwk(e,t){const{ext:n,key_ops:r,use:s,...o}=t;return crypto.subtle.importKey(\"jwk\",o,algToSubtle(e,t.crv),true,[\"verify\"])}async function deviceAuthorizationRequest(e,t,n,r){assertAs(e);assertClient(t);const s=resolveEndpoint(e,\"device_authorization_endpoint\",alias(t,r));const o=new URLSearchParams(n);o.set(\"client_id\",t.client_id);const a=prepareHeaders(r?.headers);a.set(\"accept\",\"application/json\");return authenticatedRequest(e,t,\"POST\",s,o,a,r)}async function processDeviceAuthorizationResponse(e,t,n){assertAs(e);assertClient(t);if(!looseInstanceOf(n,Response))throw new TypeError('\"response\" must be an instance of Response');if(n.status!==200){let e;if(e=await handleOAuthBodyError(n))return e;throw new d('\"response\" is not a conform Device Authorization Endpoint response')}assertReadableResponse(n);let r;try{r=await n.json()}catch(e){throw new d('failed to parse \"response\" body as JSON',{cause:e})}if(!isJsonObject(r))throw new d('\"response\" body must be a top level object');if(!validateString(r.device_code))throw new d('\"response\" body \"device_code\" property must be a non-empty string');if(!validateString(r.user_code))throw new d('\"response\" body \"user_code\" property must be a non-empty string');if(!validateString(r.verification_uri))throw new d('\"response\" body \"verification_uri\" property must be a non-empty string');if(typeof r.expires_in!==\"number\"||r.expires_in<=0)throw new d('\"response\" body \"expires_in\" property must be a positive number');if(r.verification_uri_complete!==void 0&&!validateString(r.verification_uri_complete))throw new d('\"response\" body \"verification_uri_complete\" property must be a non-empty string');if(r.interval!==void 0&&(typeof r.interval!==\"number\"||r.interval<=0))throw new d('\"response\" body \"interval\" property must be a positive number');return r}async function deviceCodeGrantRequest(e,t,n,r){assertAs(e);assertClient(t);if(!validateString(n))throw new TypeError('\"deviceCode\" must be a non-empty string');const s=new URLSearchParams(r?.additionalParameters);s.set(\"device_code\",n);return tokenEndpointRequest(e,t,\"urn:ietf:params:oauth:grant-type:device_code\",s,r)}async function processDeviceCodeResponse(e,t,n){return processGenericAccessTokenResponse(e,t,n)}async function generateKeyPair(e,t){if(!validateString(e))throw new TypeError('\"alg\" must be a non-empty string');const n=algToSubtle(e,e===\"EdDSA\"?t?.crv??\"Ed25519\":void 0);(e.startsWith(\"PS\")||e.startsWith(\"RS\"))&&Object.assign(n,{modulusLength:t?.modulusLength??2048,publicExponent:new Uint8Array([1,0,1])});return crypto.subtle.generateKey(n,t?.extractable??false,[\"sign\",\"verify\"])}function normalizeHtu(e){const t=new URL(e);t.search=\"\";t.hash=\"\";return t.href}async function validateDPoP(e,t,n,r,s){const o=t.headers.get(\"dpop\");if(o===null)throw new d(\"operation indicated DPoP use but the request has no DPoP HTTP Header\");if(t.headers.get(\"authorization\")?.toLowerCase().startsWith(\"dpop \")===false)throw new d(\"operation indicated DPoP use but the request's Authorization HTTP Header scheme is not DPoP\");if(typeof r.cnf?.jkt!==\"string\")throw new d(\"operation indicated DPoP use but the JWT Access Token has no jkt confirmation claim\");const a=getClockSkew(s);const i=await validateJwt(o,checkSigningAlgorithm.bind(void 0,void 0,e?.dpop_signing_alg_values_supported||h),(async({jwk:e,alg:t})=>{if(!e)throw new d(\"DPoP Proof is missing the jwk header parameter\");const n=await importJwk(t,e);if(n.type!==\"public\")throw new d(\"DPoP Proof jwk header parameter must contain a public key\");return n}),a,getClockTolerance(s),void 0).then(checkJwtType.bind(void 0,\"dpop+jwt\")).then(validatePresence.bind(void 0,[\"iat\",\"jti\",\"ath\",\"htm\",\"htu\"]));const u=epochTime()+a;const p=Math.abs(u-i.claims.iat);if(p>300)throw new d(\"DPoP Proof iat is not recent enough\");if(i.claims.htm!==t.method)throw new d(\"DPoP Proof htm mismatch\");if(typeof i.claims.htu!==\"string\"||normalizeHtu(i.claims.htu)!==normalizeHtu(t.url))throw new d(\"DPoP Proof htu mismatch\");{const e=b64u(await crypto.subtle.digest(\"SHA-256\",c.encode(n)));if(i.claims.ath!==e)throw new d(\"DPoP Proof ath mismatch\")}{let e;switch(i.header.jwk.kty){case\"EC\":e={crv:i.header.jwk.crv,kty:i.header.jwk.kty,x:i.header.jwk.x,y:i.header.jwk.y};break;case\"OKP\":e={crv:i.header.jwk.crv,kty:i.header.jwk.kty,x:i.header.jwk.x};break;case\"RSA\":e={e:i.header.jwk.e,kty:i.header.jwk.kty,n:i.header.jwk.n};break;default:throw new UnsupportedOperationError}const t=b64u(await crypto.subtle.digest(\"SHA-256\",c.encode(JSON.stringify(e))));if(r.cnf.jkt!==t)throw new d(\"JWT Access Token confirmation mismatch\")}}async function validateJwtAccessToken(e,t,n,r){assertAs(e);if(!looseInstanceOf(t,Request))throw new TypeError('\"request\" must be an instance of Request');if(!validateString(n))throw new d('\"expectedAudience\" must be a non-empty string');const s=t.headers.get(\"authorization\");if(s===null)throw new d('\"request\" is missing an Authorization HTTP Header');let{0:o,1:a,length:i}=s.split(\" \");o=o.toLowerCase();switch(o){case\"dpop\":case\"bearer\":break;default:throw new UnsupportedOperationError(\"unsupported Authorization HTTP Header scheme\")}if(i!==2)throw new d(\"invalid Authorization HTTP Header format\");const c=[\"iss\",\"exp\",\"aud\",\"sub\",\"iat\",\"jti\",\"client_id\"];(r?.requireDPoP||o===\"dpop\"||t.headers.has(\"dpop\"))&&c.push(\"cnf\");const{claims:u}=await validateJwt(a,checkSigningAlgorithm.bind(void 0,void 0,h),getPublicSigKeyFromIssuerJwksUri.bind(void 0,e,r),getClockSkew(r),getClockTolerance(r),void 0).then(checkJwtType.bind(void 0,\"at+jwt\")).then(validatePresence.bind(void 0,c)).then(validateIssuer.bind(void 0,e.issuer)).then(validateAudience.bind(void 0,n));for(const e of[\"client_id\",\"jti\",\"sub\"])if(typeof u[e]!==\"string\")throw new d(`unexpected JWT \"${e}\" claim type`);if(\"cnf\"in u){if(!isJsonObject(u.cnf))throw new d('unexpected JWT \"cnf\" (confirmation) claim value');const{0:e,length:t}=Object.keys(u.cnf);if(t){if(t!==1)throw new UnsupportedOperationError(\"multiple confirmation claims are not supported\");if(e!==\"jkt\")throw new UnsupportedOperationError(\"unsupported JWT Confirmation method\")}}(r?.requireDPoP||o===\"dpop\"||u.cnf?.jkt!==void 0||t.headers.has(\"dpop\"))&&await validateDPoP(e,t,a,u,r);return u}const E=r;const J=r;const C=i;const j=i;const experimental_validateDetachedSignatureResponse=(...e)=>validateDetachedSignatureResponse(...e);const experimental_validateJwtAccessToken=(...e)=>validateJwtAccessToken(...e);const validateJwtUserinfoSignature=(...e)=>validateJwtUserInfoSignature(...e);const O=a;export{OperationProcessingError,UnsupportedOperationError,authorizationCodeGrantRequest,calculatePKCECodeChallenge,clientCredentialsGrantRequest,t as clockSkew,n as clockTolerance,r as customFetch,deviceAuthorizationRequest,deviceCodeGrantRequest,discoveryRequest,_ as expectNoNonce,P as expectNoState,E as experimentalCustomFetch,C as experimentalUseMtlsAlias,J as experimental_customFetch,O as experimental_jwksCache,j as experimental_useMtlsAlias,experimental_validateDetachedSignatureResponse,experimental_validateJwtAccessToken,generateKeyPair,generateRandomCodeVerifier,generateRandomNonce,generateRandomState,genericTokenEndpointRequest,getValidatedIdTokenClaims,introspectionRequest,isOAuth2Error,issueRequestObject,o as jweDecrypt,a as jwksCache,s as modifyAssertion,parseWwwAuthenticateChallenges,processAuthorizationCodeOAuth2Response,processAuthorizationCodeOpenIDResponse,processClientCredentialsResponse,processDeviceAuthorizationResponse,processDeviceCodeResponse,processDiscoveryResponse,processIntrospectionResponse,processPushedAuthorizationResponse,processRefreshTokenResponse,processRevocationResponse,processUserInfoResponse,protectedResourceRequest,pushedAuthorizationRequest,refreshTokenGrantRequest,revocationRequest,R as skipAuthTimeCheck,A as skipStateCheck,g as skipSubjectCheck,i as useMtlsAlias,userInfoRequest,validateAuthResponse,validateDetachedSignatureResponse,validateIdTokenSignature,validateJwtAccessToken,validateJwtAuthResponse,validateJwtIntrospectionSignature,validateJwtUserInfoSignature,validateJwtUserinfoSignature};\n//# sourceMappingURL=index.js.map\n"],"mappings":"sHAAIA,EAAE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