{"version":3,"file":"webapi.PfotP9FN.mjs","names":["n","e","t","r","s","i","u","l","f","e","a","t","i","t","e","r","n","t","o","r","e","a","r","s","e","t","e","t","n","o","r","c","a","p","t","e","f","m","S","w","l","r","g","i","a","o","s","b","d","n","c","v","P","k","y","h","T","p","i","t","a","o","r","n","s","e","s","a","r","e","t","h","t","e","n","r","c","u","l","p","f","a","s","i","o","#e","l","a","o","e","t","n","s","r","#e","#t","#r","h","d","H","i","m","u","y","w","f","j","p","#t","t","e","r","#e","s","t","#t","i","e","r","i","o","s","r","n","t","d","e","a"],"sources":["https:/ga.jspm.io/npm:jose@6.0.11/_/DWRzvavt.js","https:/ga.jspm.io/npm:jose@6.0.11/_/g_2GOd_8.js","https:/ga.jspm.io/npm:jose@6.0.11/_/DXU2C52A.js","https:/ga.jspm.io/npm:jose@6.0.11/_/DULyNgRi.js","https:/ga.jspm.io/npm:jose@6.0.11/_/BQDGx3fZ.js","https:/ga.jspm.io/npm:jose@6.0.11/_/0uB3RiRb.js","https:/ga.jspm.io/npm:jose@6.0.11/_/C9sHDOqF.js","https:/ga.jspm.io/npm:jose@6.0.11/_/Dhlzvh95.js","https:/ga.jspm.io/npm:jose@6.0.11/_/dtH_B6sZ.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/key/import.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/jwe/flattened/decrypt.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/jwe/compact/decrypt.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/jwe/general/decrypt.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/key/export.js","https:/ga.jspm.io/npm:jose@6.0.11/_/CZ-pSmjF.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/jwe/general/encrypt.js","https:/ga.jspm.io/npm:jose@6.0.11/_/CUOaL8IJ.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/jws/flattened/verify.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/jws/compact/verify.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/jws/general/verify.js","https:/ga.jspm.io/npm:jose@6.0.11/_/OwLMM8N5.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/jwt/verify.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/jwt/decrypt.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/jwe/compact/encrypt.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/jws/flattened/sign.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/jws/compact/sign.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/jws/general/sign.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/jwt/sign.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/jwt/encrypt.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/jwk/thumbprint.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/jwk/embedded.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/jwks/local.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/jwks/remote.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/jwt/unsecured.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/util/decode_protected_header.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/util/decode_jwt.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/key/generate_key_pair.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/key/generate_secret.js","https:/ga.jspm.io/npm:jose@6.0.11/dist/webapi/index.js"],"sourcesContent":["const e=new TextEncoder;const t=new TextDecoder;const r=2**32;function n(...e){const t=e.reduce(((e,{length:t})=>e+t),0);const r=new Uint8Array(t);let n=0;for(const t of e){r.set(t,n);n+=t.length}return r}function o(e,t,n){if(t<0||t>=r)throw new RangeError(`value must be >= 0 and <= ${r-1}. Received ${t}`);e.set([t>>>24,t>>>16,t>>>8,t&255],n)}function a(e){const t=Math.floor(e/r);const n=e%r;const a=new Uint8Array(8);o(a,t,0);o(a,n,4);return a}function c(e){const t=new Uint8Array(4);o(t,e);return t}function s(e){if(Uint8Array.prototype.toBase64)return e.toBase64();const t=32768;const r=[];for(let n=0;n<e.length;n+=t)r.push(String.fromCharCode.apply(null,e.subarray(n,n+t)));return btoa(r.join(\"\"))}function i(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(e);const t=atob(e);const r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r}function u(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(typeof e===\"string\"?e:t.decode(e),{alphabet:\"base64url\"});let r=e;r instanceof Uint8Array&&(r=t.decode(r));r=r.replace(/-/g,\"+\").replace(/_/g,\"/\").replace(/\\s/g,\"\");try{return i(r)}catch{throw new TypeError(\"The input to be decoded is not correctly encoded.\")}}function l(t){let r=t;typeof r===\"string\"&&(r=e.encode(r));return Uint8Array.prototype.toBase64?r.toBase64({alphabet:\"base64url\",omitPadding:true}):s(r).replace(/=/g,\"\").replace(/\\+/g,\"-\").replace(/\\//g,\"_\")}var f=Object.freeze(Object.defineProperty({__proto__:null,decode:u,encode:l},Symbol.toStringTag,{value:\"Module\"}));export{l as a,f as b,u as c,t as d,e,n as f,c as g,s as h,i,a as u};\n//# sourceMappingURL=DWRzvavt.js.map\n","class JOSEError extends Error{static code=\"ERR_JOSE_GENERIC\";code=\"ERR_JOSE_GENERIC\";constructor(e,a){super(e,a);this.name=this.constructor.name;Error.captureStackTrace?.(this,this.constructor)}}class JWTClaimValidationFailed extends JOSEError{static code=\"ERR_JWT_CLAIM_VALIDATION_FAILED\";code=\"ERR_JWT_CLAIM_VALIDATION_FAILED\";claim;reason;payload;constructor(e,a,t=\"unspecified\",i=\"unspecified\"){super(e,{cause:{claim:t,reason:i,payload:a}});this.claim=t;this.reason=i;this.payload=a}}class JWTExpired extends JOSEError{static code=\"ERR_JWT_EXPIRED\";code=\"ERR_JWT_EXPIRED\";claim;reason;payload;constructor(e,a,t=\"unspecified\",i=\"unspecified\"){super(e,{cause:{claim:t,reason:i,payload:a}});this.claim=t;this.reason=i;this.payload=a}}class JOSEAlgNotAllowed extends JOSEError{static code=\"ERR_JOSE_ALG_NOT_ALLOWED\";code=\"ERR_JOSE_ALG_NOT_ALLOWED\"}class JOSENotSupported extends JOSEError{static code=\"ERR_JOSE_NOT_SUPPORTED\";code=\"ERR_JOSE_NOT_SUPPORTED\"}class JWEDecryptionFailed extends JOSEError{static code=\"ERR_JWE_DECRYPTION_FAILED\";code=\"ERR_JWE_DECRYPTION_FAILED\";constructor(e=\"decryption operation failed\",a){super(e,a)}}class JWEInvalid extends JOSEError{static code=\"ERR_JWE_INVALID\";code=\"ERR_JWE_INVALID\"}class JWSInvalid extends JOSEError{static code=\"ERR_JWS_INVALID\";code=\"ERR_JWS_INVALID\"}class JWTInvalid extends JOSEError{static code=\"ERR_JWT_INVALID\";code=\"ERR_JWT_INVALID\"}class JWKInvalid extends JOSEError{static code=\"ERR_JWK_INVALID\";code=\"ERR_JWK_INVALID\"}class JWKSInvalid extends JOSEError{static code=\"ERR_JWKS_INVALID\";code=\"ERR_JWKS_INVALID\"}class JWKSNoMatchingKey extends JOSEError{static code=\"ERR_JWKS_NO_MATCHING_KEY\";code=\"ERR_JWKS_NO_MATCHING_KEY\";constructor(e=\"no applicable key found in the JSON Web Key Set\",a){super(e,a)}}class JWKSMultipleMatchingKeys extends JOSEError{[Symbol.asyncIterator];static code=\"ERR_JWKS_MULTIPLE_MATCHING_KEYS\";code=\"ERR_JWKS_MULTIPLE_MATCHING_KEYS\";constructor(e=\"multiple matching keys found in the JSON Web Key Set\",a){super(e,a)}}class JWKSTimeout extends JOSEError{static code=\"ERR_JWKS_TIMEOUT\";code=\"ERR_JWKS_TIMEOUT\";constructor(e=\"request timed out\",a){super(e,a)}}class JWSSignatureVerificationFailed extends JOSEError{static code=\"ERR_JWS_SIGNATURE_VERIFICATION_FAILED\";code=\"ERR_JWS_SIGNATURE_VERIFICATION_FAILED\";constructor(e=\"signature verification failed\",a){super(e,a)}}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,JWTClaimValidationFailed as j,JWTExpired as k,JWSSignatureVerificationFailed as l,JOSEAlgNotAllowed as m,JWEInvalid as n,JWEDecryptionFailed as o};\n//# sourceMappingURL=g_2GOd_8.js.map\n","function t(t){return typeof t===\"object\"&&t!==null}var e=e=>{if(!t(e)||Object.prototype.toString.call(e)!==\"[object Object]\")return false;if(Object.getPrototypeOf(e)===null)return true;let r=e;while(Object.getPrototypeOf(r)!==null)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r};export{e as i};\n//# sourceMappingURL=DXU2C52A.js.map\n","import{i as t}from\"./DXU2C52A.js\";function n(n){return t(n)&&typeof n.kty===\"string\"}function o(t){return t.kty!==\"oct\"&&typeof t.d===\"string\"}function r(t){return t.kty!==\"oct\"&&typeof t.d===\"undefined\"}function e(t){return t.kty===\"oct\"&&typeof t.k===\"string\"}export{e as a,r as b,o as c,n as i};\n//# sourceMappingURL=DULyNgRi.js.map\n","import{b as e}from\"./g_2GOd_8.js\";function a(a){let r;let s;switch(a.kty){case\"RSA\":switch(a.alg){case\"PS256\":case\"PS384\":case\"PS512\":r={name:\"RSA-PSS\",hash:`SHA-${a.alg.slice(-3)}`};s=a.d?[\"sign\"]:[\"verify\"];break;case\"RS256\":case\"RS384\":case\"RS512\":r={name:\"RSASSA-PKCS1-v1_5\",hash:`SHA-${a.alg.slice(-3)}`};s=a.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(a.alg.slice(-3),10)||1}`};s=a.d?[\"decrypt\",\"unwrapKey\"]:[\"encrypt\",\"wrapKey\"];break;default:throw new e('Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value')}break;case\"EC\":switch(a.alg){case\"ES256\":r={name:\"ECDSA\",namedCurve:\"P-256\"};s=a.d?[\"sign\"]:[\"verify\"];break;case\"ES384\":r={name:\"ECDSA\",namedCurve:\"P-384\"};s=a.d?[\"sign\"]:[\"verify\"];break;case\"ES512\":r={name:\"ECDSA\",namedCurve:\"P-521\"};s=a.d?[\"sign\"]:[\"verify\"];break;case\"ECDH-ES\":case\"ECDH-ES+A128KW\":case\"ECDH-ES+A192KW\":case\"ECDH-ES+A256KW\":r={name:\"ECDH\",namedCurve:a.crv};s=a.d?[\"deriveBits\"]:[];break;default:throw new e('Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value')}break;case\"OKP\":switch(a.alg){case\"Ed25519\":case\"EdDSA\":r={name:\"Ed25519\"};s=a.d?[\"sign\"]:[\"verify\"];break;case\"ECDH-ES\":case\"ECDH-ES+A128KW\":case\"ECDH-ES+A192KW\":case\"ECDH-ES+A256KW\":r={name:a.crv};s=a.d?[\"deriveBits\"]:[];break;default:throw new e('Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value')}break;default:throw new e('Invalid or unsupported JWK \"kty\" (Key Type) Parameter value')}return{algorithm:r,keyUsages:s}}var r=async e=>{if(!e.alg)throw new TypeError('\"alg\" argument is required when \"jwk.alg\" is not present');const{algorithm:r,keyUsages:s}=a(e);const t={...e};delete t.alg;delete t.use;return crypto.subtle.importKey(\"jwk\",t,r,e.ext??!e.d,e.key_ops??s)};export{r as i};\n//# sourceMappingURL=BQDGx3fZ.js.map\n","function e(e,n,...t){t=t.filter(Boolean);if(t.length>2){const n=t.pop();e+=`one of type ${t.join(\", \")}, or ${n}.`}else t.length===2?e+=`one of type ${t[0]} or ${t[1]}.`:e+=`of type ${t[0]}.`;n==null?e+=` Received ${n}`:typeof n===\"function\"&&n.name?e+=` Received function ${n.name}`:typeof n===\"object\"&&n!=null&&n.constructor?.name&&(e+=` Received an instance of ${n.constructor.name}`);return e}var n=(n,...t)=>e(\"Key must be \",n,...t);function t(n,t,...o){return e(`Key for the ${n} algorithm must be `,t,...o)}function o(e){if(!r(e))throw new Error(\"CryptoKey instance expected\")}function r(e){return e?.[Symbol.toStringTag]===\"CryptoKey\"}function c(e){return e?.[Symbol.toStringTag]===\"KeyObject\"}var a=e=>r(e)||c(e);export{n as a,o as b,c,r as d,a as i,t as w};\n//# sourceMappingURL=0uB3RiRb.js.map\n","import{b as e}from\"./g_2GOd_8.js\";import{i as t,a as r,b as s,c as a}from\"./DULyNgRi.js\";import{c as i}from\"./DWRzvavt.js\";import{i as o}from\"./BQDGx3fZ.js\";import{d as n,c,i as y,w as h}from\"./0uB3RiRb.js\";function p(e,t=\"algorithm.name\"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function f(e,t){return e.name===t}function m(e){return parseInt(e.name.slice(4),10)}function S(e){switch(e){case\"ES256\":return\"P-256\";case\"ES384\":return\"P-384\";case\"ES512\":return\"P-521\";default:throw new Error(\"unreachable\")}}function w(e,t){if(t&&!e.usages.includes(t))throw new TypeError(`CryptoKey does not support this operation, its usages must include ${t}.`)}function l(e,t,r){switch(t){case\"HS256\":case\"HS384\":case\"HS512\":{if(!f(e.algorithm,\"HMAC\"))throw p(\"HMAC\");const r=parseInt(t.slice(2),10);const s=m(e.algorithm.hash);if(s!==r)throw p(`SHA-${r}`,\"algorithm.hash\");break}case\"RS256\":case\"RS384\":case\"RS512\":{if(!f(e.algorithm,\"RSASSA-PKCS1-v1_5\"))throw p(\"RSASSA-PKCS1-v1_5\");const r=parseInt(t.slice(2),10);const s=m(e.algorithm.hash);if(s!==r)throw p(`SHA-${r}`,\"algorithm.hash\");break}case\"PS256\":case\"PS384\":case\"PS512\":{if(!f(e.algorithm,\"RSA-PSS\"))throw p(\"RSA-PSS\");const r=parseInt(t.slice(2),10);const s=m(e.algorithm.hash);if(s!==r)throw p(`SHA-${r}`,\"algorithm.hash\");break}case\"Ed25519\":case\"EdDSA\":if(!f(e.algorithm,\"Ed25519\"))throw p(\"Ed25519\");break;case\"ES256\":case\"ES384\":case\"ES512\":{if(!f(e.algorithm,\"ECDSA\"))throw p(\"ECDSA\");const r=S(t);const s=e.algorithm.namedCurve;if(s!==r)throw p(r,\"algorithm.namedCurve\");break}default:throw new TypeError(\"CryptoKey does not support this operation\")}w(e,r)}function u(e,t,r){switch(t){case\"A128GCM\":case\"A192GCM\":case\"A256GCM\":{if(!f(e.algorithm,\"AES-GCM\"))throw p(\"AES-GCM\");const r=parseInt(t.slice(1,4),10);const s=e.algorithm.length;if(s!==r)throw p(r,\"algorithm.length\");break}case\"A128KW\":case\"A192KW\":case\"A256KW\":{if(!f(e.algorithm,\"AES-KW\"))throw p(\"AES-KW\");const r=parseInt(t.slice(1,4),10);const s=e.algorithm.length;if(s!==r)throw p(r,\"algorithm.length\");break}case\"ECDH\":switch(e.algorithm.name){case\"ECDH\":case\"X25519\":break;default:throw p(\"ECDH or X25519\")}break;case\"PBES2-HS256+A128KW\":case\"PBES2-HS384+A192KW\":case\"PBES2-HS512+A256KW\":if(!f(e.algorithm,\"PBKDF2\"))throw p(\"PBKDF2\");break;case\"RSA-OAEP\":case\"RSA-OAEP-256\":case\"RSA-OAEP-384\":case\"RSA-OAEP-512\":{if(!f(e.algorithm,\"RSA-OAEP\"))throw p(\"RSA-OAEP\");const r=parseInt(t.slice(9),10)||1;const s=m(e.algorithm.hash);if(s!==r)throw p(`SHA-${r}`,\"algorithm.hash\");break}default:throw new TypeError(\"CryptoKey does not support this operation\")}w(e,r)}var g=(...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 E=(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`)}};var A=(t,r,s,a,i)=>{if(i.crit!==void 0&&a?.crit===void 0)throw new t('\"crit\" (Critical) Header Parameter MUST be integrity protected');if(!a||a.crit===void 0)return new Set;if(!Array.isArray(a.crit)||a.crit.length===0||a.crit.some((e=>typeof e!==\"string\"||e.length===0)))throw new t('\"crit\" (Critical) Header Parameter MUST be an array of non-empty strings when present');let o;o=s!==void 0?new Map([...Object.entries(s),...r.entries()]):r;for(const r of a.crit){if(!o.has(r))throw new e(`Extension Header Parameter \"${r}\" is not recognized`);if(i[r]===void 0)throw new t(`Extension Header Parameter \"${r}\" is missing`);if(o.get(r)&&a[r]===void 0)throw new t(`Extension Header Parameter \"${r}\" MUST be integrity protected`)}return new Set(a.crit)};let d;const b=async(e,t,r,s=false)=>{d||=new WeakMap;let a=d.get(e);if(a?.[r])return a[r];const i=await o({...t,alg:r});s&&Object.freeze(e);a?a[r]=i:d.set(e,{[r]:i});return i};const K=(e,t)=>{d||=new WeakMap;let r=d.get(e);if(r?.[t])return r[t];const s=e.type===\"public\";const a=!!s;let i;if(e.asymmetricKeyType===\"x25519\"){switch(t){case\"ECDH-ES\":case\"ECDH-ES+A128KW\":case\"ECDH-ES+A192KW\":case\"ECDH-ES+A256KW\":break;default:throw new TypeError(\"given KeyObject instance cannot be used for this algorithm\")}i=e.toCryptoKey(e.asymmetricKeyType,a,s?[]:[\"deriveBits\"])}if(e.asymmetricKeyType===\"ed25519\"){if(t!==\"EdDSA\"&&t!==\"Ed25519\")throw new TypeError(\"given KeyObject instance cannot be used for this algorithm\");i=e.toCryptoKey(e.asymmetricKeyType,a,[s?\"verify\":\"sign\"])}if(e.asymmetricKeyType===\"rsa\"){let r;switch(t){case\"RSA-OAEP\":r=\"SHA-1\";break;case\"RS256\":case\"PS256\":case\"RSA-OAEP-256\":r=\"SHA-256\";break;case\"RS384\":case\"PS384\":case\"RSA-OAEP-384\":r=\"SHA-384\";break;case\"RS512\":case\"PS512\":case\"RSA-OAEP-512\":r=\"SHA-512\";break;default:throw new TypeError(\"given KeyObject instance cannot be used for this algorithm\")}if(t.startsWith(\"RSA-OAEP\"))return e.toCryptoKey({name:\"RSA-OAEP\",hash:r},a,s?[\"encrypt\"]:[\"decrypt\"]);i=e.toCryptoKey({name:t.startsWith(\"PS\")?\"RSA-PSS\":\"RSASSA-PKCS1-v1_5\",hash:r},a,[s?\"verify\":\"sign\"])}if(e.asymmetricKeyType===\"ec\"){const r=new Map([[\"prime256v1\",\"P-256\"],[\"secp384r1\",\"P-384\"],[\"secp521r1\",\"P-521\"]]);const o=r.get(e.asymmetricKeyDetails?.namedCurve);if(!o)throw new TypeError(\"given KeyObject instance cannot be used for this algorithm\");t===\"ES256\"&&o===\"P-256\"&&(i=e.toCryptoKey({name:\"ECDSA\",namedCurve:o},a,[s?\"verify\":\"sign\"]));t===\"ES384\"&&o===\"P-384\"&&(i=e.toCryptoKey({name:\"ECDSA\",namedCurve:o},a,[s?\"verify\":\"sign\"]));t===\"ES512\"&&o===\"P-521\"&&(i=e.toCryptoKey({name:\"ECDSA\",namedCurve:o},a,[s?\"verify\":\"sign\"]));t.startsWith(\"ECDH-ES\")&&(i=e.toCryptoKey({name:\"ECDH\",namedCurve:o},a,s?[]:[\"deriveBits\"]))}if(!i)throw new TypeError(\"given KeyObject instance cannot be used for this algorithm\");r?r[t]=i:d.set(e,{[t]:i});return i};var C=async(e,r)=>{if(e instanceof Uint8Array)return e;if(n(e))return e;if(c(e)){if(e.type===\"secret\")return e.export();if(\"toCryptoKey\"in e&&typeof e.toCryptoKey===\"function\")try{return K(e,r)}catch(e){if(e instanceof TypeError)throw e}let t=e.export({format:\"jwk\"});return b(e,t,r)}if(t(e))return e.k?i(e.k):b(e,e,r,true);throw new Error(\"unreachable\")};const v=e=>e?.[Symbol.toStringTag];const P=(e,t,r)=>{if(t.use!==void 0){let e;switch(r){case\"sign\":case\"verify\":e=\"sig\";break;case\"encrypt\":case\"decrypt\":e=\"enc\";break}if(t.use!==e)throw new TypeError(`Invalid key for this operation, its \"use\" must be \"${e}\" when present`)}if(t.alg!==void 0&&t.alg!==e)throw new TypeError(`Invalid key for this operation, its \"alg\" must be \"${e}\" when present`);if(Array.isArray(t.key_ops)){let s;switch(true){case r===\"sign\"||r===\"verify\":case e===\"dir\":case e.includes(\"CBC-HS\"):s=r;break;case e.startsWith(\"PBES2\"):s=\"deriveBits\";break;case/^A\\d{3}(?:GCM)?(?:KW)?$/.test(e):s=!e.includes(\"GCM\")&&e.endsWith(\"KW\")?r===\"encrypt\"?\"wrapKey\":\"unwrapKey\":r;break;case r===\"encrypt\"&&e.startsWith(\"RSA\"):s=\"wrapKey\";break;case r===\"decrypt\":s=e.startsWith(\"RSA\")?\"unwrapKey\":\"deriveBits\";break}if(s&&t.key_ops?.includes?.(s)===false)throw new TypeError(`Invalid key for this operation, its \"key_ops\" must include \"${s}\" when present`)}return true};const k=(e,s,a)=>{if(!(s instanceof Uint8Array)){if(t(s)){if(r(s)&&P(e,s,a))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(!y(s))throw new TypeError(h(e,s,\"CryptoKey\",\"KeyObject\",\"JSON Web Key\",\"Uint8Array\"));if(s.type!==\"secret\")throw new TypeError(`${v(s)} instances for symmetric algorithms must be of type \"secret\"`)}};const T=(e,r,i)=>{if(t(r))switch(i){case\"decrypt\":case\"sign\":if(a(r)&&P(e,r,i))return;throw new TypeError(\"JSON Web Key for this operation be a private JWK\");case\"encrypt\":case\"verify\":if(s(r)&&P(e,r,i))return;throw new TypeError(\"JSON Web Key for this operation be a public JWK\")}if(!y(r))throw new TypeError(h(e,r,\"CryptoKey\",\"KeyObject\",\"JSON Web Key\"));if(r.type===\"secret\")throw new TypeError(`${v(r)} instances for asymmetric algorithms must not be of type \"secret\"`);if(r.type===\"public\")switch(i){case\"sign\":throw new TypeError(`${v(r)} instances for asymmetric algorithm signing must be of type \"private\"`);case\"decrypt\":throw new TypeError(`${v(r)} instances for asymmetric algorithm decryption must be of type \"private\"`);default:break}if(r.type===\"private\")switch(i){case\"verify\":throw new TypeError(`${v(r)} instances for asymmetric algorithm verifying must be of type \"public\"`);case\"encrypt\":throw new TypeError(`${v(r)} instances for asymmetric algorithm encryption must be of type \"public\"`);default:break}};var W=(e,t,r)=>{const s=e.startsWith(\"HS\")||e===\"dir\"||e.startsWith(\"PBES2\")||/^A(?:128|192|256)(?:GCM)?(?:KW)?$/.test(e)||/^A(?:128|192|256)CBC-HS(?:256|384|512)$/.test(e);s?k(e,t,r):T(e,t,r)};export{W as a,l as b,E as c,u as d,g as i,C as n,A as v};\n//# sourceMappingURL=C9sHDOqF.js.map\n","import{f as t,u as e,g as n,e as r,a}from\"./DWRzvavt.js\";import{d as s,c as i}from\"./C9sHDOqF.js\";import{d as c}from\"./Dm0TYCRg.js\";import{b as o,n as y,o as u}from\"./g_2GOd_8.js\";import{a as w,d as A}from\"./0uB3RiRb.js\";function l(t){switch(t){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 o(`Unsupported JWE Algorithm: ${t}`)}}var p=t=>crypto.getRandomValues(new Uint8Array(l(t)>>3));var f=(t,e)=>{if(e.length<<3!==l(t))throw new y(\"Invalid Initialization Vector length\")};var h=(t,e)=>{const n=t.byteLength<<3;if(n!==e)throw new y(`Invalid Content Encryption Key length. Expected ${e} bits, got ${n} bits`)};async function C(t,e){if(!(t instanceof Uint8Array))throw new TypeError(\"First argument must be a buffer\");if(!(e instanceof Uint8Array))throw new TypeError(\"Second argument must be a buffer\");const n={name:\"HMAC\",hash:\"SHA-256\"};const r=await crypto.subtle.generateKey(n,false,[\"sign\"]);const a=new Uint8Array(await crypto.subtle.sign(n,r,t));const s=new Uint8Array(await crypto.subtle.sign(n,r,e));let i=0;let c=-1;while(++c<32)i|=a[c]^s[c];return i===0}async function m(n,r,a,s,i,c){if(!(r instanceof Uint8Array))throw new TypeError(w(r,\"Uint8Array\"));const o=parseInt(n.slice(1,4),10);const y=await crypto.subtle.importKey(\"raw\",r.subarray(o>>3),\"AES-CBC\",false,[\"decrypt\"]);const A=await crypto.subtle.importKey(\"raw\",r.subarray(0,o>>3),{hash:\"SHA-\"+(o<<1),name:\"HMAC\"},false,[\"sign\"]);const l=t(c,s,a,e(c.length<<3));const p=new Uint8Array((await crypto.subtle.sign(\"HMAC\",A,l)).slice(0,o>>3));let f;try{f=await C(i,p)}catch{}if(!f)throw new u;let h;try{h=new Uint8Array(await crypto.subtle.decrypt({iv:s,name:\"AES-CBC\"},y,a))}catch{}if(!h)throw new u;return h}async function g(e,n,r,a,i,c){let o;if(n instanceof Uint8Array)o=await crypto.subtle.importKey(\"raw\",n,\"AES-GCM\",false,[\"decrypt\"]);else{s(n,e,\"decrypt\");o=n}try{return new Uint8Array(await crypto.subtle.decrypt({additionalData:c,iv:a,name:\"AES-GCM\",tagLength:128},o,t(r,i)))}catch{throw new u}}var U=async(t,e,n,r,a,s)=>{if(!A(e)&&!(e instanceof Uint8Array))throw new TypeError(w(e,\"CryptoKey\",\"KeyObject\",\"Uint8Array\",\"JSON Web Key\"));if(!r)throw new y(\"JWE Initialization Vector missing\");if(!a)throw new y(\"JWE Authentication Tag missing\");f(t,r);switch(t){case\"A128CBC-HS256\":case\"A192CBC-HS384\":case\"A256CBC-HS512\":e instanceof Uint8Array&&h(e,parseInt(t.slice(-3),10));return m(t,e,n,r,a,s);case\"A128GCM\":case\"A192GCM\":case\"A256GCM\":e instanceof Uint8Array&&h(e,parseInt(t.slice(1,4),10));return g(t,e,n,r,a,s);default:throw new o(\"Unsupported JWE Content Encryption Algorithm\")}};function b(t,e){if(t.algorithm.length!==parseInt(e.slice(1,4),10))throw new TypeError(`Invalid key size for alg: ${e}`)}function d(t,e,n){if(t instanceof Uint8Array)return crypto.subtle.importKey(\"raw\",t,\"AES-KW\",true,[n]);s(t,e,n);return t}async function S(t,e,n){const r=await d(e,t,\"wrapKey\");b(r,t);const a=await crypto.subtle.importKey(\"raw\",n,{hash:\"SHA-256\",name:\"HMAC\"},true,[\"sign\"]);return new Uint8Array(await crypto.subtle.wrapKey(\"raw\",a,r,\"AES-KW\"))}async function E(t,e,n){const r=await d(e,t,\"unwrapKey\");b(r,t);const a=await crypto.subtle.unwrapKey(\"raw\",n,r,\"AES-KW\",{hash:\"SHA-256\",name:\"HMAC\"},true,[\"sign\"]);return new Uint8Array(await crypto.subtle.exportKey(\"raw\",a))}function K(e){return t(n(e.length),e)}async function M(t,e,r){const a=Math.ceil((e>>3)/32);const s=new Uint8Array(a*32);for(let e=0;e<a;e++){const a=new Uint8Array(4+t.length+r.length);a.set(n(e+1));a.set(t,4);a.set(r,4+t.length);s.set(await c(\"sha256\",a),e*32)}return s.slice(0,e>>3)}async function H(e,a,i,c,o=new Uint8Array(0),y=new Uint8Array(0)){s(e,\"ECDH\");s(a,\"ECDH\",\"deriveBits\");const u=t(K(r.encode(i)),K(o),K(y),n(c));let w;w=e.algorithm.name===\"X25519\"?256:Math.ceil(parseInt(e.algorithm.namedCurve.slice(-3),10)/8)<<3;const A=new Uint8Array(await crypto.subtle.deriveBits({name:e.algorithm.name,public:e},a,w));return M(A,c,u)}function v(t){switch(t.algorithm.namedCurve){case\"P-256\":case\"P-384\":case\"P-521\":return true;default:return t.algorithm.name===\"X25519\"}}function B(t,e){if(t instanceof Uint8Array)return crypto.subtle.importKey(\"raw\",t,\"PBKDF2\",false,[\"deriveBits\"]);s(t,e,\"deriveBits\");return t}const G=(e,n)=>t(r.encode(e),new Uint8Array([0]),n);async function I(t,e,n,r){if(!(t instanceof Uint8Array)||t.length<8)throw new y(\"PBES2 Salt Input must be 8 or more octets\");const a=G(e,t);const s=parseInt(e.slice(13,16),10);const i={hash:`SHA-${e.slice(8,11)}`,iterations:n,name:\"PBKDF2\",salt:a};const c=await B(r,e);return new Uint8Array(await crypto.subtle.deriveBits(i,c,s))}async function W(t,e,n,r=2048,s=crypto.getRandomValues(new Uint8Array(16))){const i=await I(s,t,r,e);const c=await S(t.slice(-6),i,n);return{encryptedKey:c,p2c:r,p2s:a(s)}}async function P(t,e,n,r,a){const s=await I(a,t,r,e);return E(t.slice(-6),s,n)}const O=t=>{switch(t){case\"RSA-OAEP\":case\"RSA-OAEP-256\":case\"RSA-OAEP-384\":case\"RSA-OAEP-512\":return\"RSA-OAEP\";default:throw new o(`alg ${t} is not supported either by JOSE or your javascript runtime`)}};async function j(t,e,n){s(e,t,\"encrypt\");i(t,e);return new Uint8Array(await crypto.subtle.encrypt(O(t),e,n))}async function J(t,e,n){s(e,t,\"decrypt\");i(t,e);return new Uint8Array(await crypto.subtle.decrypt(O(t),e,n))}function R(t){switch(t){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 o(`Unsupported JWE Algorithm: ${t}`)}}var T=t=>crypto.getRandomValues(new Uint8Array(R(t)>>3));async function $(n,r,a,s,i){if(!(a instanceof Uint8Array))throw new TypeError(w(a,\"Uint8Array\"));const c=parseInt(n.slice(1,4),10);const o=await crypto.subtle.importKey(\"raw\",a.subarray(c>>3),\"AES-CBC\",false,[\"encrypt\"]);const y=await crypto.subtle.importKey(\"raw\",a.subarray(0,c>>3),{hash:\"SHA-\"+(c<<1),name:\"HMAC\"},false,[\"sign\"]);const u=new Uint8Array(await crypto.subtle.encrypt({iv:s,name:\"AES-CBC\"},o,r));const A=t(i,s,u,e(i.length<<3));const l=new Uint8Array((await crypto.subtle.sign(\"HMAC\",y,A)).slice(0,c>>3));return{ciphertext:u,tag:l,iv:s}}async function x(t,e,n,r,a){let i;if(n instanceof Uint8Array)i=await crypto.subtle.importKey(\"raw\",n,\"AES-GCM\",false,[\"encrypt\"]);else{s(n,t,\"encrypt\");i=n}const c=new Uint8Array(await crypto.subtle.encrypt({additionalData:a,iv:r,name:\"AES-GCM\",tagLength:128},i,e));const o=c.slice(-16);const y=c.slice(0,-16);return{ciphertext:y,tag:o,iv:r}}var D=async(t,e,n,r,a)=>{if(!A(n)&&!(n instanceof Uint8Array))throw new TypeError(w(n,\"CryptoKey\",\"KeyObject\",\"Uint8Array\",\"JSON Web Key\"));r?f(t,r):r=p(t);switch(t){case\"A128CBC-HS256\":case\"A192CBC-HS384\":case\"A256CBC-HS512\":n instanceof Uint8Array&&h(n,parseInt(t.slice(-3),10));return $(t,e,n,r,a);case\"A128GCM\":case\"A192GCM\":case\"A256GCM\":n instanceof Uint8Array&&h(n,parseInt(t.slice(1,4),10));return x(t,e,n,r,a);default:throw new o(\"Unsupported JWE Content Encryption Algorithm\")}};async function V(t,e,n,r){const s=t.slice(0,7);const i=await D(s,n,e,r,new Uint8Array(0));return{encryptedKey:i.ciphertext,iv:a(i.iv),tag:a(i.tag)}}async function z(t,e,n,r,a){const s=t.slice(0,7);return U(s,e,n,r,a,new Uint8Array(0))}export{S as a,W as b,v as c,H as d,j as e,R as f,T as g,D as h,E as i,P as j,J as k,U as l,z as u,V as w};\n//# sourceMappingURL=Dhlzvh95.js.map\n","import{c as e,d as t,a as r}from\"./0uB3RiRb.js\";import{h as n,i as a}from\"./DWRzvavt.js\";import{b as s}from\"./g_2GOd_8.js\";const c=(e,t)=>{const r=(e.match(/.{1,64}/g)||[]).join(\"\\n\");return`-----BEGIN ${t}-----\\n${r}\\n-----END ${t}-----`};const o=async(a,s,o)=>{if(e(o)){if(o.type!==a)throw new TypeError(`key is not a ${a} key`);return o.export({format:\"pem\",type:s})}if(!t(o))throw new TypeError(r(o,\"CryptoKey\",\"KeyObject\"));if(!o.extractable)throw new TypeError(\"CryptoKey is not extractable\");if(o.type!==a)throw new TypeError(`key is not a ${a} key`);return c(n(new Uint8Array(await crypto.subtle.exportKey(s,o))),`${a.toUpperCase()} KEY`)};const i=e=>o(\"public\",\"spki\",e);const y=e=>o(\"private\",\"pkcs8\",e);const p=(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 a=e.subarray(n,n+t.length);return a.length===t.length&&(a.every(((e,r)=>e===t[r]))||p(e,t,n+1))};const u=e=>{switch(true){case p(e,[42,134,72,206,61,3,1,7]):return\"P-256\";case p(e,[43,129,4,0,34]):return\"P-384\";case p(e,[43,129,4,0,35]):return\"P-521\";default:return}};const l=async(e,t,r,n,a)=>{let c;let o;const i=new Uint8Array(atob(r.replace(e,\"\")).split(\"\").map((e=>e.charCodeAt(0))));const y=t===\"spki\";switch(n){case\"PS256\":case\"PS384\":case\"PS512\":c={name:\"RSA-PSS\",hash:`SHA-${n.slice(-3)}`};o=y?[\"verify\"]:[\"sign\"];break;case\"RS256\":case\"RS384\":case\"RS512\":c={name:\"RSASSA-PKCS1-v1_5\",hash:`SHA-${n.slice(-3)}`};o=y?[\"verify\"]:[\"sign\"];break;case\"RSA-OAEP\":case\"RSA-OAEP-256\":case\"RSA-OAEP-384\":case\"RSA-OAEP-512\":c={name:\"RSA-OAEP\",hash:`SHA-${parseInt(n.slice(-3),10)||1}`};o=y?[\"encrypt\",\"wrapKey\"]:[\"decrypt\",\"unwrapKey\"];break;case\"ES256\":c={name:\"ECDSA\",namedCurve:\"P-256\"};o=y?[\"verify\"]:[\"sign\"];break;case\"ES384\":c={name:\"ECDSA\",namedCurve:\"P-384\"};o=y?[\"verify\"]:[\"sign\"];break;case\"ES512\":c={name:\"ECDSA\",namedCurve:\"P-521\"};o=y?[\"verify\"]:[\"sign\"];break;case\"ECDH-ES\":case\"ECDH-ES+A128KW\":case\"ECDH-ES+A192KW\":case\"ECDH-ES+A256KW\":{const e=u(i);c=e?.startsWith(\"P-\")?{name:\"ECDH\",namedCurve:e}:{name:\"X25519\"};o=y?[]:[\"deriveBits\"];break}case\"Ed25519\":case\"EdDSA\":c={name:\"Ed25519\"};o=y?[\"verify\"]:[\"sign\"];break;default:throw new s('Invalid or unsupported \"alg\" (Algorithm) value')}return crypto.subtle.importKey(t,i,c,a?.extractable??!!y,o)};const E=(e,t,r)=>l(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\\s)/g,\"pkcs8\",e,t,r);const h=(e,t,r)=>l(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\\s)/g,\"spki\",e,t,r);function f(e){const t=[];let r=0;while(r<e.length){const n=S(e.subarray(r));t.push(n);r+=n.byteLength}return t}function S(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 a=0;a<r;a++){n=n*256+e[t];t++}}}const a=t+n;return{byteLength:a,contents:e.subarray(t,a),raw:e.subarray(0,a)}}function b(e){const t=f(f(S(e).contents)[0].contents);return n(t[t[0].raw[0]===160?6:5].raw)}let w;function A(e){try{w??=globalThis.process?.getBuiltinModule?.(\"node:crypto\")?.createPublicKey}catch{w=0}if(w)try{return new w(e).export({format:\"pem\",type:\"spki\"})}catch{}const t=e.replace(/(?:-----(?:BEGIN|END) CERTIFICATE-----|\\s)/g,\"\");const r=a(t);return c(b(r),\"PUBLIC KEY\")}const m=(e,t,r)=>{let n;try{n=A(e)}catch(e){throw new TypeError(\"Failed to parse the X.509 certificate\",{cause:e})}return h(n,t,r)};export{y as a,m as b,E as c,h as f,i as t};\n//# sourceMappingURL=dtH_B6sZ.js.map\n","import{c as r}from\"../../../_/DWRzvavt.js\";import{f as t,b as e,c as o}from\"../../../_/dtH_B6sZ.js\";import{i as s}from\"../../../_/BQDGx3fZ.js\";import{b as n}from\"../../../_/g_2GOd_8.js\";import{i}from\"../../../_/DXU2C52A.js\";import\"../../../_/0uB3RiRb.js\";async function a(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 f(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 m(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 p(t,e,o){if(!i(t))throw new TypeError(\"JWK must be an object\");let a;e??=t.alg;a??=o?.extractable??t.ext;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(\"oth\"in t&&t.oth!==void 0)throw new n('RSA JWK \"oth\" (Other Primes Info) Parameter value is not supported');case\"EC\":case\"OKP\":return s({...t,alg:e,ext:a});default:throw new n('Unsupported \"kty\" (Key Type) Parameter value')}}export{p as importJWK,m as importPKCS8,a as importSPKI,f as importX509};\n//# sourceMappingURL=import.js.map\n","import{c as e,d as t,e as r,f as i}from\"../../../../_/DWRzvavt.js\";import{u as o,i as a,j as n,k as d,c,d as s,f as p,g as h,l as w}from\"../../../../_/Dhlzvh95.js\";import{b as l,n as y,m as E}from\"../../../../_/g_2GOd_8.js\";import{i as f,v as m,a as u,n as v}from\"../../../../_/C9sHDOqF.js\";import{i as g}from\"../../../../_/DXU2C52A.js\";import{importJWK as W}from\"../../key/import.js\";import{b as A}from\"../../../../_/0uB3RiRb.js\";import{v as J}from\"../../../../_/Wzw9d5Yv.js\";import\"../../../../_/Dm0TYCRg.js\";import\"../../../../_/DULyNgRi.js\";import\"../../../../_/BQDGx3fZ.js\";import\"../../../../_/dtH_B6sZ.js\";var H=async(t,r,i,h,w)=>{switch(t){case\"dir\":if(i!==void 0)throw new y(\"Encountered unexpected JWE Encrypted Key\");return r;case\"ECDH-ES\":if(i!==void 0)throw new y(\"Encountered unexpected JWE Encrypted Key\");case\"ECDH-ES+A128KW\":case\"ECDH-ES+A192KW\":case\"ECDH-ES+A256KW\":{if(!g(h.epk))throw new y('JOSE Header \"epk\" (Ephemeral Public Key) missing or invalid');A(r);if(!c(r))throw new l(\"ECDH with the provided key is not allowed or not supported by your javascript runtime\");const o=await W(h.epk,t);A(o);let n;let d;if(h.apu!==void 0){if(typeof h.apu!==\"string\")throw new y('JOSE Header \"apu\" (Agreement PartyUInfo) invalid');try{n=e(h.apu)}catch{throw new y(\"Failed to base64url decode the apu\")}}if(h.apv!==void 0){if(typeof h.apv!==\"string\")throw new y('JOSE Header \"apv\" (Agreement PartyVInfo) invalid');try{d=e(h.apv)}catch{throw new y(\"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,d);if(t===\"ECDH-ES\")return w;if(i===void 0)throw new y(\"JWE Encrypted Key missing\");return a(t.slice(-6),w,i)}case\"RSA-OAEP\":case\"RSA-OAEP-256\":case\"RSA-OAEP-384\":case\"RSA-OAEP-512\":if(i===void 0)throw new y(\"JWE Encrypted Key missing\");A(r);return d(t,r,i);case\"PBES2-HS256+A128KW\":case\"PBES2-HS384+A192KW\":case\"PBES2-HS512+A256KW\":{if(i===void 0)throw new y(\"JWE Encrypted Key missing\");if(typeof h.p2c!==\"number\")throw new y('JOSE Header \"p2c\" (PBES2 Count) missing or invalid');const o=w?.maxPBES2Count||1e4;if(h.p2c>o)throw new y('JOSE Header \"p2c\" (PBES2 Count) out is of acceptable bounds');if(typeof h.p2s!==\"string\")throw new y('JOSE Header \"p2s\" (PBES2 Salt) missing or invalid');let a;try{a=e(h.p2s)}catch{throw new y(\"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 y(\"JWE Encrypted Key missing\");return a(t,r,i);case\"A128GCMKW\":case\"A192GCMKW\":case\"A256GCMKW\":{if(i===void 0)throw new y(\"JWE Encrypted Key missing\");if(typeof h.iv!==\"string\")throw new y('JOSE Header \"iv\" (Initialization Vector) missing or invalid');if(typeof h.tag!==\"string\")throw new y('JOSE Header \"tag\" (Authentication Tag) missing or invalid');let a;try{a=e(h.iv)}catch{throw new y(\"Failed to base64url decode the iv\")}let n;try{n=e(h.tag)}catch{throw new y(\"Failed to base64url decode the tag\")}return o(t,r,i,a,n)}default:throw new l('Invalid or unsupported \"alg\" (JWE Algorithm) header value')}};async function S(o,a,n){if(!g(o))throw new y(\"Flattened JWE must be an object\");if(o.protected===void 0&&o.header===void 0&&o.unprotected===void 0)throw new y(\"JOSE Header missing\");if(o.iv!==void 0&&typeof o.iv!==\"string\")throw new y(\"JWE Initialization Vector incorrect type\");if(typeof o.ciphertext!==\"string\")throw new y(\"JWE Ciphertext missing or incorrect type\");if(o.tag!==void 0&&typeof o.tag!==\"string\")throw new y(\"JWE Authentication Tag incorrect type\");if(o.protected!==void 0&&typeof o.protected!==\"string\")throw new y(\"JWE Protected Header incorrect type\");if(o.encrypted_key!==void 0&&typeof o.encrypted_key!==\"string\")throw new y(\"JWE Encrypted Key incorrect type\");if(o.aad!==void 0&&typeof o.aad!==\"string\")throw new y(\"JWE AAD incorrect type\");if(o.header!==void 0&&!g(o.header))throw new y(\"JWE Shared Unprotected Header incorrect type\");if(o.unprotected!==void 0&&!g(o.unprotected))throw new y(\"JWE Per-Recipient Unprotected Header incorrect type\");let d;if(o.protected)try{const r=e(o.protected);d=JSON.parse(t.decode(r))}catch{throw new y(\"JWE Protected Header is invalid\")}if(!f(d,o.header,o.unprotected))throw new y(\"JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint\");const c={...d,...o.header,...o.unprotected};m(y,new Map,n?.crit,d,c);if(c.zip!==void 0)throw new l('JWE \"zip\" (Compression Algorithm) Header Parameter is not supported.');const{alg:s,enc:p}=c;if(typeof s!==\"string\"||!s)throw new y(\"missing JWE Algorithm (alg) in JWE Header\");if(typeof p!==\"string\"||!p)throw new y(\"missing JWE Encryption Algorithm (enc) in JWE Header\");const W=n&&J(\"keyManagementAlgorithms\",n.keyManagementAlgorithms);const A=n&&J(\"contentEncryptionAlgorithms\",n.contentEncryptionAlgorithms);if(W&&!W.has(s)||!W&&s.startsWith(\"PBES2\"))throw new E('\"alg\" (Algorithm) Header Parameter value not allowed');if(A&&!A.has(p))throw new E('\"enc\" (Encryption Algorithm) Header Parameter value not allowed');let S;if(o.encrypted_key!==void 0)try{S=e(o.encrypted_key)}catch{throw new y(\"Failed to base64url decode the encrypted_key\")}let P=false;if(typeof a===\"function\"){a=await a(d,o);P=true}u(s===\"dir\"?p:s,a,\"decrypt\");const b=await v(a,s);let K;try{K=await H(s,b,S,c,n)}catch(e){if(e instanceof TypeError||e instanceof y||e instanceof l)throw e;K=h(p)}let j;let C;if(o.iv!==void 0)try{j=e(o.iv)}catch{throw new y(\"Failed to base64url decode the iv\")}if(o.tag!==void 0)try{C=e(o.tag)}catch{throw new y(\"Failed to base64url decode the tag\")}const _=r.encode(o.protected??\"\");let k;k=o.aad!==void 0?i(_,r.encode(\".\"),r.encode(o.aad)):_;let O;try{O=e(o.ciphertext)}catch{throw new y(\"Failed to base64url decode the ciphertext\")}const F=await w(p,K,O,j,C,k);const D={plaintext:F};o.protected!==void 0&&(D.protectedHeader=d);if(o.aad!==void 0)try{D.additionalAuthenticatedData=e(o.aad)}catch{throw new y(\"Failed to base64url decode the aad\")}o.unprotected!==void 0&&(D.sharedUnprotectedHeader=o.unprotected);o.header!==void 0&&(D.unprotectedHeader=o.header);return P?{...D,key:b}:D}export{S as flattenedDecrypt};\n//# sourceMappingURL=decrypt.js.map\n","import{flattenedDecrypt as t}from\"../flattened/decrypt.js\";import{n as o}from\"../../../../_/g_2GOd_8.js\";import{d as r}from\"../../../../_/DWRzvavt.js\";import\"../../../../_/Dhlzvh95.js\";import\"../../../../_/C9sHDOqF.js\";import\"../../../../_/DULyNgRi.js\";import\"../../../../_/DXU2C52A.js\";import\"../../../../_/BQDGx3fZ.js\";import\"../../../../_/0uB3RiRb.js\";import\"../../../../_/Dm0TYCRg.js\";import\"../../key/import.js\";import\"../../../../_/dtH_B6sZ.js\";import\"../../../../_/Wzw9d5Yv.js\";async function e(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:n,1:s,2:m,3:a,4:c,length:d}=e.split(\".\");if(d!==5)throw new o(\"Invalid Compact JWE\");const j=await t({ciphertext:a,iv:m||void 0,protected:n,tag:c||void 0,encrypted_key:s||void 0},i,p);const _={plaintext:j.plaintext,protectedHeader:j.protectedHeader};return typeof i===\"function\"?{..._,key:j.key}:_}export{e as compactDecrypt};\n//# sourceMappingURL=decrypt.js.map\n","import{flattenedDecrypt as e}from\"../flattened/decrypt.js\";import{n as t,o as r}from\"../../../../_/g_2GOd_8.js\";import{i}from\"../../../../_/DXU2C52A.js\";import\"../../../../_/DWRzvavt.js\";import\"../../../../_/Dhlzvh95.js\";import\"../../../../_/C9sHDOqF.js\";import\"../../../../_/DULyNgRi.js\";import\"../../../../_/BQDGx3fZ.js\";import\"../../../../_/0uB3RiRb.js\";import\"../../../../_/Dm0TYCRg.js\";import\"../../key/import.js\";import\"../../../../_/dtH_B6sZ.js\";import\"../../../../_/Wzw9d5Yv.js\";async function o(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{o as generalDecrypt};\n//# sourceMappingURL=decrypt.js.map\n","import{t as r,a as t}from\"../../../_/dtH_B6sZ.js\";import{c as e,d as o,a as n}from\"../../../_/0uB3RiRb.js\";import{a}from\"../../../_/DWRzvavt.js\";import\"../../../_/g_2GOd_8.js\";async function s(r){if(e(r)){if(r.type!==\"secret\")return r.export({format:\"jwk\"});r=r.export()}if(r instanceof Uint8Array)return{kty:\"oct\",k:a(r)};if(!o(r))throw new TypeError(n(r,\"CryptoKey\",\"KeyObject\",\"Uint8Array\"));if(!r.extractable)throw new TypeError(\"non-extractable CryptoKey cannot be exported as a JWK\");const{ext:t,key_ops:s,alg:c,use:y,...i}=await crypto.subtle.exportKey(\"jwk\",r);return i}async function c(t){return r(t)}async function y(r){return t(r)}async function i(r){return s(r)}export{i as exportJWK,y as exportPKCS8,c as exportSPKI};\n//# sourceMappingURL=export.js.map\n","import{a as e,e as t,f as r,d as a}from\"./DWRzvavt.js\";import{g as s,w as n,a as i,b as o,e as d,c,d as p,f as h,h as l}from\"./Dhlzvh95.js\";import{n as y,i as H,v as w,a as E}from\"./C9sHDOqF.js\";import{b as m,n as u}from\"./g_2GOd_8.js\";import{exportJWK as f}from\"../dist/webapi/key/export.js\";import{b as A}from\"./0uB3RiRb.js\";const k=Symbol();var b=async(t,r,a,l,H={})=>{let w;let E;let u;switch(t){case\"dir\":u=a;break;case\"ECDH-ES\":case\"ECDH-ES+A128KW\":case\"ECDH-ES+A192KW\":case\"ECDH-ES+A256KW\":{A(a);if(!c(a))throw new m(\"ECDH with the provided key is not allowed or not supported by your javascript runtime\");const{apu:n,apv:o}=H;let d;d=H.epk?await y(H.epk,t):(await crypto.subtle.generateKey(a.algorithm,true,[\"deriveBits\"])).privateKey;const{x:k,y:b,crv:g,kty:K}=await f(d);const P=await p(a,d,t===\"ECDH-ES\"?r:t,t===\"ECDH-ES\"?h(r):parseInt(t.slice(-5,-2),10),n,o);E={epk:{x:k,crv:g,kty:K}};K===\"EC\"&&(E.epk.y=b);n&&(E.apu=e(n));o&&(E.apv=e(o));if(t===\"ECDH-ES\"){u=P;break}u=l||s(r);const S=t.slice(-6);w=await i(S,P,u);break}case\"RSA-OAEP\":case\"RSA-OAEP-256\":case\"RSA-OAEP-384\":case\"RSA-OAEP-512\":u=l||s(r);A(a);w=await d(t,a,u);break;case\"PBES2-HS256+A128KW\":case\"PBES2-HS384+A192KW\":case\"PBES2-HS512+A256KW\":{u=l||s(r);const{p2c:e,p2s:n}=H;({encryptedKey:w,...E}=await o(t,a,u,e,n));break}case\"A128KW\":case\"A192KW\":case\"A256KW\":u=l||s(r);w=await i(t,a,u);break;case\"A128GCMKW\":case\"A192GCMKW\":case\"A256GCMKW\":{u=l||s(r);const{iv:e}=H;({encryptedKey:w,...E}=await n(t,a,u,e));break}default:throw new m('Invalid or unsupported \"alg\" (JWE Algorithm) header value')}return{cek:u,encryptedKey:w,parameters:E}};class FlattenedEncrypt{#e;#t;#r;#a;#s;#n;#i;#o;constructor(e){if(!(e instanceof Uint8Array))throw new TypeError(\"plaintext must be an instance of Uint8Array\");this.#e=e}setKeyManagementParameters(e){if(this.#o)throw new TypeError(\"setKeyManagementParameters can only be called once\");this.#o=e;return this}setProtectedHeader(e){if(this.#t)throw new TypeError(\"setProtectedHeader can only be called once\");this.#t=e;return this}setSharedUnprotectedHeader(e){if(this.#r)throw new TypeError(\"setSharedUnprotectedHeader can only be called once\");this.#r=e;return this}setUnprotectedHeader(e){if(this.#a)throw new TypeError(\"setUnprotectedHeader can only be called once\");this.#a=e;return this}setAdditionalAuthenticatedData(e){this.#s=e;return this}setContentEncryptionKey(e){if(this.#n)throw new TypeError(\"setContentEncryptionKey can only be called once\");this.#n=e;return this}setInitializationVector(e){if(this.#i)throw new TypeError(\"setInitializationVector can only be called once\");this.#i=e;return this}async encrypt(s,n){if(!this.#t&&!this.#a&&!this.#r)throw new u(\"either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()\");if(!H(this.#t,this.#a,this.#r))throw new u(\"JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint\");const i={...this.#t,...this.#a,...this.#r};w(u,new Map,n?.crit,this.#t,i);if(i.zip!==void 0)throw new m('JWE \"zip\" (Compression Algorithm) Header Parameter is not supported.');const{alg:o,enc:d}=i;if(typeof o!==\"string\"||!o)throw new u('JWE \"alg\" (Algorithm) Header Parameter missing or invalid');if(typeof d!==\"string\"||!d)throw new u('JWE \"enc\" (Encryption Algorithm) Header Parameter missing or invalid');let c;if(this.#n&&(o===\"dir\"||o===\"ECDH-ES\"))throw new TypeError(`setContentEncryptionKey cannot be called with JWE \"alg\" (Algorithm) Header ${o}`);E(o===\"dir\"?d:o,s,\"encrypt\");let p;{let e;const t=await y(s,o);({cek:p,encryptedKey:c,parameters:e}=await b(o,d,t,this.#n,this.#o));e&&(n&&k in n?this.#a?this.#a={...this.#a,...e}:this.setUnprotectedHeader(e):this.#t?this.#t={...this.#t,...e}:this.setProtectedHeader(e))}let h;let f;let A;f=this.#t?t.encode(e(JSON.stringify(this.#t))):t.encode(\"\");if(this.#s){A=e(this.#s);h=r(f,t.encode(\".\"),t.encode(A))}else h=f;const{ciphertext:g,tag:K,iv:P}=await l(d,this.#e,p,this.#i,h);const S={ciphertext:e(g)};P&&(S.iv=e(P));K&&(S.tag=e(K));c&&(S.encrypted_key=e(c));A&&(S.aad=A);this.#t&&(S.protected=a.decode(f));this.#r&&(S.unprotected=this.#r);this.#a&&(S.header=this.#a);return S}}export{FlattenedEncrypt as F,b as e,k as u};\n//# sourceMappingURL=CZ-pSmjF.js.map\n","import{F as e,u as t,e as r}from\"../../../../_/CZ-pSmjF.js\";import{n,b as i}from\"../../../../_/g_2GOd_8.js\";import{g as a}from\"../../../../_/Dhlzvh95.js\";import{i as d,v as o,a as s,n as c}from\"../../../../_/C9sHDOqF.js\";import{a as p}from\"../../../../_/DWRzvavt.js\";import\"../../key/export.js\";import\"../../../../_/dtH_B6sZ.js\";import\"../../../../_/0uB3RiRb.js\";import\"../../../../_/Dm0TYCRg.js\";import\"../../../../_/DULyNgRi.js\";import\"../../../../_/DXU2C52A.js\";import\"../../../../_/BQDGx3fZ.js\";class IndividualRecipient{#e;unprotectedHeader;key;options;constructor(e,t,r){this.#e=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.#e.addRecipient(...e)}encrypt(...e){return this.#e.encrypt(...e)}done(){return this.#e}}class GeneralEncrypt{#t;#r=[];#n;#i;#a;constructor(e){this.#t=e}addRecipient(e,t){const r=new IndividualRecipient(this,e,{crit:t?.crit});this.#r.push(r);return r}setProtectedHeader(e){if(this.#n)throw new TypeError(\"setProtectedHeader can only be called once\");this.#n=e;return this}setSharedUnprotectedHeader(e){if(this.#i)throw new TypeError(\"setSharedUnprotectedHeader can only be called once\");this.#i=e;return this}setAdditionalAuthenticatedData(e){this.#a=e;return this}async encrypt(){if(!this.#r.length)throw new n(\"at least one recipient must be added\");if(this.#r.length===1){const[t]=this.#r;const r=await new e(this.#t).setAdditionalAuthenticatedData(this.#a).setProtectedHeader(this.#n).setSharedUnprotectedHeader(this.#i).setUnprotectedHeader(t.unprotectedHeader).encrypt(t.key,{...t.options});const n={ciphertext:r.ciphertext,iv:r.iv,recipients:[{}],tag:r.tag};r.aad&&(n.aad=r.aad);r.protected&&(n.protected=r.protected);r.unprotected&&(n.unprotected=r.unprotected);r.encrypted_key&&(n.recipients[0].encrypted_key=r.encrypted_key);r.header&&(n.recipients[0].header=r.header);return n}let h;for(let e=0;e<this.#r.length;e++){const t=this.#r[e];if(!d(this.#n,this.#i,t.unprotectedHeader))throw new n(\"JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint\");const r={...this.#n,...this.#i,...t.unprotectedHeader};const{alg:a}=r;if(typeof a!==\"string\"||!a)throw new n('JWE \"alg\" (Algorithm) Header Parameter missing or invalid');if(a===\"dir\"||a===\"ECDH-ES\")throw new n('\"dir\" and \"ECDH-ES\" alg may only be used with a single recipient');if(typeof r.enc!==\"string\"||!r.enc)throw new n('JWE \"enc\" (Encryption Algorithm) Header Parameter missing or invalid');if(h){if(h!==r.enc)throw new n('JWE \"enc\" (Encryption Algorithm) Header Parameter must be the same for all recipients')}else h=r.enc;o(n,new Map,t.options.crit,this.#n,r);if(r.zip!==void 0)throw new i('JWE \"zip\" (Compression Algorithm) Header Parameter is not supported.')}const u=a(h);const H={ciphertext:\"\",iv:\"\",recipients:[],tag:\"\"};for(let n=0;n<this.#r.length;n++){const i=this.#r[n];const a={};H.recipients.push(a);const d={...this.#n,...this.#i,...i.unprotectedHeader};const o=d.alg.startsWith(\"PBES2\")?2048+n:void 0;if(n===0){const r=await new e(this.#t).setAdditionalAuthenticatedData(this.#a).setContentEncryptionKey(u).setProtectedHeader(this.#n).setSharedUnprotectedHeader(this.#i).setUnprotectedHeader(i.unprotectedHeader).setKeyManagementParameters({p2c:o}).encrypt(i.key,{...i.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 l=i.unprotectedHeader?.alg||this.#n?.alg||this.#i?.alg;s(l===\"dir\"?h:l,i.key,\"encrypt\");const y=await c(i.key,l);const{encryptedKey:m,parameters:w}=await r(l,h,y,u,{p2c:o});a.encrypted_key=p(m);(i.unprotectedHeader||w)&&(a.header={...i.unprotectedHeader,...w})}return H}}export{GeneralEncrypt};\n//# sourceMappingURL=encrypt.js.map\n","import{b as e}from\"./g_2GOd_8.js\";import{b as a}from\"./C9sHDOqF.js\";import{a as r}from\"./0uB3RiRb.js\";var s=(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:parseInt(a.slice(-3),10)>>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\"Ed25519\":case\"EdDSA\":return{name:\"Ed25519\"};default:throw new e(`alg ${a} is not supported either by JOSE or your javascript runtime`)}};var t=async(e,s,t)=>{if(s instanceof Uint8Array){if(!e.startsWith(\"HS\"))throw new TypeError(r(s,\"CryptoKey\",\"KeyObject\",\"JSON Web Key\"));return crypto.subtle.importKey(\"raw\",s,{hash:`SHA-${e.slice(-3)}`,name:\"HMAC\"},false,[t])}a(s,e,t);return s};export{t as g,s};\n//# sourceMappingURL=CUOaL8IJ.js.map\n","import{c as e,d as t,f as a,e as r}from\"../../../../_/DWRzvavt.js\";import{g as o,s as i}from\"../../../../_/CUOaL8IJ.js\";import{c as n,i as s,v as d,a as c,n as p}from\"../../../../_/C9sHDOqF.js\";import{J as l,m as f,l as y}from\"../../../../_/g_2GOd_8.js\";import{i as h}from\"../../../../_/DXU2C52A.js\";import{v as w}from\"../../../../_/Wzw9d5Yv.js\";import\"../../../../_/0uB3RiRb.js\";import\"../../../../_/DULyNgRi.js\";import\"../../../../_/BQDGx3fZ.js\";var m=async(e,t,a,r)=>{const s=await o(e,t,\"verify\");n(e,s);const d=i(e,s.algorithm);try{return await crypto.subtle.verify(d,s,a,r)}catch{return false}};async function g(o,i,n){if(!h(o))throw new l(\"Flattened JWS must be an object\");if(o.protected===void 0&&o.header===void 0)throw new l('Flattened JWS must have either of the \"protected\" or \"header\" members');if(o.protected!==void 0&&typeof o.protected!==\"string\")throw new l(\"JWS Protected Header incorrect type\");if(o.payload===void 0)throw new l(\"JWS Payload missing\");if(typeof o.signature!==\"string\")throw new l(\"JWS Signature missing or incorrect type\");if(o.header!==void 0&&!h(o.header))throw new l(\"JWS Unprotected Header incorrect type\");let g={};if(o.protected)try{const a=e(o.protected);g=JSON.parse(t.decode(a))}catch{throw new l(\"JWS Protected Header is invalid\")}if(!s(g,o.header))throw new l(\"JWS Protected and JWS Unprotected Header Parameter names must be disjoint\");const u={...g,...o.header};const b=d(l,new Map([[\"b64\",true]]),n?.crit,g,u);let v=true;if(b.has(\"b64\")){v=g.b64;if(typeof v!==\"boolean\")throw new l('The \"b64\" (base64url-encode payload) Header Parameter must be a boolean')}const{alg:J}=u;if(typeof J!==\"string\"||!J)throw new l('JWS \"alg\" (Algorithm) Header Parameter missing or invalid');const S=n&&w(\"algorithms\",n.algorithms);if(S&&!S.has(J))throw new f('\"alg\" (Algorithm) Header Parameter value not allowed');if(v){if(typeof o.payload!==\"string\")throw new l(\"JWS Payload must be a string\")}else if(typeof o.payload!==\"string\"&&!(o.payload instanceof Uint8Array))throw new l(\"JWS Payload must be a string or an Uint8Array instance\");let W=false;if(typeof i===\"function\"){i=await i(g,o);W=true}c(J,i,\"verify\");const j=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 l(\"Failed to base64url decode the signature\")}const H=await p(i,J);const _=await m(J,H,P,j);if(!_)throw new y;let A;if(v)try{A=e(o.payload)}catch{throw new l(\"Failed to base64url decode the payload\")}else A=typeof o.payload===\"string\"?r.encode(o.payload):o.payload;const F={payload:A};o.protected!==void 0&&(F.protectedHeader=g);o.header!==void 0&&(F.unprotectedHeader=o.header);return W?{...F,key:H}:F}export{g as flattenedVerify};\n//# sourceMappingURL=verify.js.map\n","import{flattenedVerify as t}from\"../flattened/verify.js\";import{J as o}from\"../../../../_/g_2GOd_8.js\";import{d as r}from\"../../../../_/DWRzvavt.js\";import\"../../../../_/CUOaL8IJ.js\";import\"../../../../_/C9sHDOqF.js\";import\"../../../../_/DULyNgRi.js\";import\"../../../../_/DXU2C52A.js\";import\"../../../../_/BQDGx3fZ.js\";import\"../../../../_/0uB3RiRb.js\";import\"../../../../_/Wzw9d5Yv.js\";async function e(e,i,a){e instanceof Uint8Array&&(e=r.decode(e));if(typeof e!==\"string\")throw new o(\"Compact JWS must be a string or Uint8Array\");const{0:p,1:s,2:n,length:m}=e.split(\".\");if(m!==3)throw new o(\"Invalid Compact JWS\");const c=await t({payload:s,protected:p,signature:n},i,a);const d={payload:c.payload,protectedHeader:c.protectedHeader};return typeof i===\"function\"?{...d,key:c.key}:d}export{e as compactVerify};\n//# sourceMappingURL=verify.js.map\n","import{flattenedVerify as r}from\"../flattened/verify.js\";import{J as t,l as e}from\"../../../../_/g_2GOd_8.js\";import{i as o}from\"../../../../_/DXU2C52A.js\";import\"../../../../_/DWRzvavt.js\";import\"../../../../_/CUOaL8IJ.js\";import\"../../../../_/C9sHDOqF.js\";import\"../../../../_/DULyNgRi.js\";import\"../../../../_/BQDGx3fZ.js\";import\"../../../../_/0uB3RiRb.js\";import\"../../../../_/Wzw9d5Yv.js\";async function s(s,i,a){if(!o(s))throw new t(\"General JWS must be an object\");if(!Array.isArray(s.signatures)||!s.signatures.every(o))throw new t(\"JWS Signatures missing or incorrect type\");for(const t of s.signatures)try{return await r({header:t.header,payload:s.payload,protected:t.protected,signature:t.signature},i,a)}catch{}throw new e}export{s as generalVerify};\n//# sourceMappingURL=verify.js.map\n","import{i as e,j as t,k as a}from\"./g_2GOd_8.js\";import{d as s,e as i}from\"./DWRzvavt.js\";import{i as o}from\"./DXU2C52A.js\";var n=e=>Math.floor(e.getTime()/1e3);const r=60;const c=r*60;const d=c*24;const u=d*7;const l=d*365.25;const p=/^(\\+|\\-)? ?(\\d+|\\d+\\.\\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;var f=e=>{const t=p.exec(e);if(!t||t[4]&&t[1])throw new TypeError(\"Invalid time period format\");const a=parseFloat(t[2]);const s=t[3].toLowerCase();let i;switch(s){case\"sec\":case\"secs\":case\"second\":case\"seconds\":case\"s\":i=Math.round(a);break;case\"minute\":case\"minutes\":case\"min\":case\"mins\":case\"m\":i=Math.round(a*r);break;case\"hour\":case\"hours\":case\"hr\":case\"hrs\":case\"h\":i=Math.round(a*c);break;case\"day\":case\"days\":case\"d\":i=Math.round(a*d);break;case\"week\":case\"weeks\":case\"w\":i=Math.round(a*u);break;default:i=Math.round(a*l);break}return t[1]===\"-\"||t[4]===\"ago\"?-i:i};function h(e,t){if(!Number.isFinite(t))throw new TypeError(`Invalid ${e} input`);return t}const m=e=>e.includes(\"/\")?e.toLowerCase():`application/${e.toLowerCase()}`;const y=(e,t)=>typeof e===\"string\"?t.includes(e):!!Array.isArray(e)&&t.some(Set.prototype.has.bind(new Set(e)));function w(i,r,c={}){let d;try{d=JSON.parse(s.decode(r))}catch{}if(!o(d))throw new e(\"JWT Claims Set must be a top-level JSON object\");const{typ:u}=c;if(u&&(typeof i.typ!==\"string\"||m(i.typ)!==m(u)))throw new t('unexpected \"typ\" JWT header value',d,\"typ\",\"check_failed\");const{requiredClaims:l=[],issuer:p,subject:h,audience:w,maxTokenAge:b}=c;const k=[...l];b!==void 0&&k.push(\"iat\");w!==void 0&&k.push(\"aud\");h!==void 0&&k.push(\"sub\");p!==void 0&&k.push(\"iss\");for(const e of new Set(k.reverse()))if(!(e in d))throw new t(`missing required \"${e}\" claim`,d,e,\"missing\");if(p&&!(Array.isArray(p)?p:[p]).includes(d.iss))throw new t('unexpected \"iss\" claim value',d,\"iss\",\"check_failed\");if(h&&d.sub!==h)throw new t('unexpected \"sub\" claim value',d,\"sub\",\"check_failed\");if(w&&!y(d.aud,typeof w===\"string\"?[w]:w))throw new t('unexpected \"aud\" claim value',d,\"aud\",\"check_failed\");let v;switch(typeof c.clockTolerance){case\"string\":v=f(c.clockTolerance);break;case\"number\":v=c.clockTolerance;break;case\"undefined\":v=0;break;default:throw new TypeError(\"Invalid clockTolerance option type\")}const{currentDate:x}=c;const T=n(x||new Date);if((d.iat!==void 0||b)&&typeof d.iat!==\"number\")throw new t('\"iat\" claim must be a number',d,\"iat\",\"invalid\");if(d.nbf!==void 0){if(typeof d.nbf!==\"number\")throw new t('\"nbf\" claim must be a number',d,\"nbf\",\"invalid\");if(d.nbf>T+v)throw new t('\"nbf\" claim timestamp check failed',d,\"nbf\",\"check_failed\")}if(d.exp!==void 0){if(typeof d.exp!==\"number\")throw new t('\"exp\" claim must be a number',d,\"exp\",\"invalid\");if(d.exp<=T-v)throw new a('\"exp\" claim timestamp check failed',d,\"exp\",\"check_failed\")}if(b){const e=T-d.iat;const s=typeof b===\"number\"?b:f(b);if(e-v>s)throw new a('\"iat\" claim timestamp check failed (too far in the past)',d,\"iat\",\"check_failed\");if(e<0-v)throw new t('\"iat\" claim timestamp check failed (it should be in the past)',d,\"iat\",\"check_failed\")}return d}class JWTClaimsBuilder{#e;constructor(e){if(!o(e))throw new TypeError(\"JWT Claims Set MUST be an object\");this.#e=structuredClone(e)}data(){return i.encode(JSON.stringify(this.#e))}get iss(){return this.#e.iss}set iss(e){this.#e.iss=e}get sub(){return this.#e.sub}set sub(e){this.#e.sub=e}get aud(){return this.#e.aud}set aud(e){this.#e.aud=e}set jti(e){this.#e.jti=e}set nbf(e){typeof e===\"number\"?this.#e.nbf=h(\"setNotBefore\",e):e instanceof Date?this.#e.nbf=h(\"setNotBefore\",n(e)):this.#e.nbf=n(new Date)+f(e)}set exp(e){typeof e===\"number\"?this.#e.exp=h(\"setExpirationTime\",e):e instanceof Date?this.#e.exp=h(\"setExpirationTime\",n(e)):this.#e.exp=n(new Date)+f(e)}set iat(e){typeof e===\"undefined\"?this.#e.iat=n(new Date):e instanceof Date?this.#e.iat=h(\"setIssuedAt\",n(e)):this.#e.iat=h(\"setIssuedAt\",typeof e===\"string\"?n(new Date)+f(e):e)}}export{JWTClaimsBuilder as J,w as v};\n//# sourceMappingURL=OwLMM8N5.js.map\n","import{compactVerify as t}from\"../jws/compact/verify.js\";import{v as e}from\"../../../_/OwLMM8N5.js\";import{i as o}from\"../../../_/g_2GOd_8.js\";import\"../jws/flattened/verify.js\";import\"../../../_/DWRzvavt.js\";import\"../../../_/CUOaL8IJ.js\";import\"../../../_/C9sHDOqF.js\";import\"../../../_/DULyNgRi.js\";import\"../../../_/DXU2C52A.js\";import\"../../../_/BQDGx3fZ.js\";import\"../../../_/0uB3RiRb.js\";import\"../../../_/Wzw9d5Yv.js\";async function r(r,s,p){const i=await t(r,s,p);if(i.protectedHeader.crit?.includes(\"b64\")&&i.protectedHeader.b64===false)throw new o(\"JWTs MUST NOT use unencoded payload\");const a=e(i.protectedHeader,i.payload,p);const d={payload:a,protectedHeader:i.protectedHeader};return typeof s===\"function\"?{...d,key:i.key}:d}export{r as jwtVerify};\n//# sourceMappingURL=verify.js.map\n","import{compactDecrypt as t}from\"../jwe/compact/decrypt.js\";import{v as e}from\"../../../_/OwLMM8N5.js\";import{j as i}from\"../../../_/g_2GOd_8.js\";import\"../jwe/flattened/decrypt.js\";import\"../../../_/DWRzvavt.js\";import\"../../../_/Dhlzvh95.js\";import\"../../../_/C9sHDOqF.js\";import\"../../../_/DULyNgRi.js\";import\"../../../_/DXU2C52A.js\";import\"../../../_/BQDGx3fZ.js\";import\"../../../_/0uB3RiRb.js\";import\"../../../_/Dm0TYCRg.js\";import\"../key/import.js\";import\"../../../_/dtH_B6sZ.js\";import\"../../../_/Wzw9d5Yv.js\";async function r(r,s,a){const m=await t(r,s,a);const o=e(m.protectedHeader,m.plaintext,a);const{protectedHeader:p}=m;if(p.iss!==void 0&&p.iss!==o.iss)throw new i('replicated \"iss\" claim header parameter mismatch',o,\"iss\",\"mismatch\");if(p.sub!==void 0&&p.sub!==o.sub)throw new i('replicated \"sub\" claim header parameter mismatch',o,\"sub\",\"mismatch\");if(p.aud!==void 0&&JSON.stringify(p.aud)!==JSON.stringify(o.aud))throw new i('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{r as jwtDecrypt};\n//# sourceMappingURL=decrypt.js.map\n","import{F as t}from\"../../../../_/CZ-pSmjF.js\";import\"../../../../_/DWRzvavt.js\";import\"../../../../_/Dhlzvh95.js\";import\"../../../../_/C9sHDOqF.js\";import\"../../../../_/g_2GOd_8.js\";import\"../../../../_/DULyNgRi.js\";import\"../../../../_/DXU2C52A.js\";import\"../../../../_/BQDGx3fZ.js\";import\"../../../../_/0uB3RiRb.js\";import\"../../../../_/Dm0TYCRg.js\";import\"../../key/export.js\";import\"../../../../_/dtH_B6sZ.js\";class CompactEncrypt{#t;constructor(e){this.#t=new t(e)}setContentEncryptionKey(t){this.#t.setContentEncryptionKey(t);return this}setInitializationVector(t){this.#t.setInitializationVector(t);return this}setProtectedHeader(t){this.#t.setProtectedHeader(t);return this}setKeyManagementParameters(t){this.#t.setKeyManagementParameters(t);return this}async encrypt(t,e){const r=await this.#t.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,d as a}from\"../../../../_/DWRzvavt.js\";import{g as o,s}from\"../../../../_/CUOaL8IJ.js\";import{c as d,i as n,v as i,a as c,n as p}from\"../../../../_/C9sHDOqF.js\";import{J as h}from\"../../../../_/g_2GOd_8.js\";import\"../../../../_/0uB3RiRb.js\";import\"../../../../_/DULyNgRi.js\";import\"../../../../_/DXU2C52A.js\";import\"../../../../_/BQDGx3fZ.js\";var l=async(e,t,r)=>{const a=await o(e,t,\"sign\");d(e,a);const n=await crypto.subtle.sign(s(e,a.algorithm),a,r);return new Uint8Array(n)};class FlattenedSign{#e;#t;#r;constructor(e){if(!(e instanceof Uint8Array))throw new TypeError(\"payload must be an instance of Uint8Array\");this.#e=e}setProtectedHeader(e){if(this.#t)throw new TypeError(\"setProtectedHeader can only be called once\");this.#t=e;return this}setUnprotectedHeader(e){if(this.#r)throw new TypeError(\"setUnprotectedHeader can only be called once\");this.#r=e;return this}async sign(o,s){if(!this.#t&&!this.#r)throw new h(\"either setProtectedHeader or setUnprotectedHeader must be called before #sign()\");if(!n(this.#t,this.#r))throw new h(\"JWS Protected and JWS Unprotected Header Parameter names must be disjoint\");const d={...this.#t,...this.#r};const H=i(h,new Map([[\"b64\",true]]),s?.crit,this.#t,d);let m=true;if(H.has(\"b64\")){m=this.#t.b64;if(typeof m!==\"boolean\")throw new h('The \"b64\" (base64url-encode payload) Header Parameter must be a boolean')}const{alg:u}=d;if(typeof u!==\"string\"||!u)throw new h('JWS \"alg\" (Algorithm) Header Parameter missing or invalid');c(u,o,\"sign\");let y=this.#e;m&&(y=e.encode(t(y)));let w;w=this.#t?e.encode(t(JSON.stringify(this.#t))):e.encode(\"\");const f=r(w,e.encode(\".\"),y);const g=await p(o,u);const b=await l(u,g,f);const j={signature:t(b),payload:\"\"};m&&(j.payload=a.decode(y));this.#r&&(j.header=this.#r);this.#t&&(j.protected=a.decode(w));return j}}export{FlattenedSign};\n//# sourceMappingURL=sign.js.map\n","import{FlattenedSign as t}from\"../flattened/sign.js\";import\"../../../../_/DWRzvavt.js\";import\"../../../../_/CUOaL8IJ.js\";import\"../../../../_/g_2GOd_8.js\";import\"../../../../_/C9sHDOqF.js\";import\"../../../../_/DULyNgRi.js\";import\"../../../../_/DXU2C52A.js\";import\"../../../../_/BQDGx3fZ.js\";import\"../../../../_/0uB3RiRb.js\";class CompactSign{#t;constructor(e){this.#t=new t(e)}setProtectedHeader(t){this.#t.setProtectedHeader(t);return this}async sign(t,e){const r=await this.#t.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\"../../../../_/g_2GOd_8.js\";import\"../../../../_/DWRzvavt.js\";import\"../../../../_/CUOaL8IJ.js\";import\"../../../../_/C9sHDOqF.js\";import\"../../../../_/DULyNgRi.js\";import\"../../../../_/DXU2C52A.js\";import\"../../../../_/BQDGx3fZ.js\";import\"../../../../_/0uB3RiRb.js\";class IndividualSignature{#e;protectedHeader;unprotectedHeader;options;key;constructor(e,t,r){this.#e=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.#e.addSignature(...e)}sign(...e){return this.#e.sign(...e)}done(){return this.#e}}class GeneralSign{#t;#r=[];constructor(e){this.#t=e}addSignature(e,t){const r=new IndividualSignature(this,e,t);this.#r.push(r);return r}async sign(){if(!this.#r.length)throw new t(\"at least one signature must be added\");const r={signatures:[],payload:\"\"};for(let s=0;s<this.#r.length;s++){const n=this.#r[s];const a=new e(this.#t);a.setProtectedHeader(n.protectedHeader);a.setUnprotectedHeader(n.unprotectedHeader);const{payload:o,...i}=await a.sign(n.key,n.options);if(s===0)r.payload=o;else if(r.payload!==o)throw new t(\"inconsistent use of JWS Unencoded Payload (RFC7797)\");r.signatures.push(i)}return r}}export{GeneralSign};\n//# sourceMappingURL=sign.js.map\n","import{CompactSign as t}from\"../jws/compact/sign.js\";import{i as e}from\"../../../_/g_2GOd_8.js\";import{J as s}from\"../../../_/OwLMM8N5.js\";import\"../jws/flattened/sign.js\";import\"../../../_/DWRzvavt.js\";import\"../../../_/CUOaL8IJ.js\";import\"../../../_/C9sHDOqF.js\";import\"../../../_/DULyNgRi.js\";import\"../../../_/DXU2C52A.js\";import\"../../../_/BQDGx3fZ.js\";import\"../../../_/0uB3RiRb.js\";class SignJWT{#t;#e;constructor(t={}){this.#e=new s(t)}setIssuer(t){this.#e.iss=t;return this}setSubject(t){this.#e.sub=t;return this}setAudience(t){this.#e.aud=t;return this}setJti(t){this.#e.jti=t;return this}setNotBefore(t){this.#e.nbf=t;return this}setExpirationTime(t){this.#e.exp=t;return this}setIssuedAt(t){this.#e.iat=t;return this}setProtectedHeader(t){this.#t=t;return this}async sign(s,r){const i=new t(this.#e.data());i.setProtectedHeader(this.#t);if(Array.isArray(this.#t?.crit)&&this.#t.crit.includes(\"b64\")&&this.#t.b64===false)throw new e(\"JWTs MUST NOT use unencoded payload\");return i.sign(s,r)}}export{SignJWT};\n//# sourceMappingURL=sign.js.map\n","import{CompactEncrypt as e}from\"../jwe/compact/encrypt.js\";import{J as t}from\"../../../_/OwLMM8N5.js\";import\"../../../_/CZ-pSmjF.js\";import\"../../../_/DWRzvavt.js\";import\"../../../_/Dhlzvh95.js\";import\"../../../_/C9sHDOqF.js\";import\"../../../_/g_2GOd_8.js\";import\"../../../_/DULyNgRi.js\";import\"../../../_/DXU2C52A.js\";import\"../../../_/BQDGx3fZ.js\";import\"../../../_/0uB3RiRb.js\";import\"../../../_/Dm0TYCRg.js\";import\"../key/export.js\";import\"../../../_/dtH_B6sZ.js\";class EncryptJWT{#e;#t;#r;#s;#i;#a;#n;#c;constructor(e={}){this.#c=new t(e)}setIssuer(e){this.#c.iss=e;return this}setSubject(e){this.#c.sub=e;return this}setAudience(e){this.#c.aud=e;return this}setJti(e){this.#c.jti=e;return this}setNotBefore(e){this.#c.nbf=e;return this}setExpirationTime(e){this.#c.exp=e;return this}setIssuedAt(e){this.#c.iat=e;return this}setProtectedHeader(e){if(this.#s)throw new TypeError(\"setProtectedHeader can only be called once\");this.#s=e;return this}setKeyManagementParameters(e){if(this.#r)throw new TypeError(\"setKeyManagementParameters can only be called once\");this.#r=e;return this}setContentEncryptionKey(e){if(this.#e)throw new TypeError(\"setContentEncryptionKey can only be called once\");this.#e=e;return this}setInitializationVector(e){if(this.#t)throw new TypeError(\"setInitializationVector can only be called once\");this.#t=e;return this}replicateIssuerAsHeader(){this.#i=true;return this}replicateSubjectAsHeader(){this.#a=true;return this}replicateAudienceAsHeader(){this.#n=true;return this}async encrypt(t,r){const s=new e(this.#c.data());this.#s&&(this.#i||this.#a||this.#n)&&(this.#s={...this.#s,iss:this.#i?this.#c.iss:void 0,sub:this.#a?this.#c.sub:void 0,aud:this.#n?this.#c.aud:void 0});s.setProtectedHeader(this.#s);this.#t&&s.setInitializationVector(this.#t);this.#e&&s.setContentEncryptionKey(this.#e);this.#r&&s.setKeyManagementParameters(this.#r);return s.encrypt(t,r)}}export{EncryptJWT};\n//# sourceMappingURL=encrypt.js.map\n","import{d as r}from\"../../../_/Dm0TYCRg.js\";import{e,a as t}from\"../../../_/DWRzvavt.js\";import{a,b as s}from\"../../../_/g_2GOd_8.js\";import{i as o,a as i}from\"../../../_/0uB3RiRb.js\";import{i as n}from\"../../../_/DULyNgRi.js\";import{exportJWK as y}from\"../key/export.js\";import\"../../../_/DXU2C52A.js\";import\"../../../_/dtH_B6sZ.js\";const m=(r,e)=>{if(typeof r!==\"string\"||!r)throw new a(`${e} missing or invalid`)};async function c(a,c){let p;if(n(a))p=a;else{if(!o(a))throw new TypeError(i(a,\"CryptoKey\",\"KeyObject\",\"JSON Web Key\"));p=await y(a)}c??=\"sha256\";if(c!==\"sha256\"&&c!==\"sha384\"&&c!==\"sha512\")throw new TypeError('digestAlgorithm must one of \"sha256\", \"sha384\", or \"sha512\"');let k;switch(p.kty){case\"EC\":m(p.crv,'\"crv\" (Curve) Parameter');m(p.x,'\"x\" (X Coordinate) Parameter');m(p.y,'\"y\" (Y Coordinate) Parameter');k={crv:p.crv,kty:p.kty,x:p.x,y:p.y};break;case\"OKP\":m(p.crv,'\"crv\" (Subtype of Key Pair) Parameter');m(p.x,'\"x\" (Public Key) Parameter');k={crv:p.crv,kty:p.kty,x:p.x};break;case\"RSA\":m(p.e,'\"e\" (Exponent) Parameter');m(p.n,'\"n\" (Modulus) Parameter');k={e:p.e,kty:p.kty,n:p.n};break;case\"oct\":m(p.k,'\"k\" (Key Value) Parameter');k={k:p.k,kty:p.kty};break;default:throw new s('\"kty\" (Key Type) Parameter missing or unsupported')}const f=e.encode(JSON.stringify(k));return t(await r(c,f))}async function p(r,e){e??=\"sha256\";const t=await c(r,e);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${e.slice(-3)}:${t}`}export{c as calculateJwkThumbprint,p as calculateJwkThumbprintUri};\n//# sourceMappingURL=thumbprint.js.map\n","import{importJWK as e}from\"../key/import.js\";import{i as r}from\"../../../_/DXU2C52A.js\";import{J as t}from\"../../../_/g_2GOd_8.js\";import\"../../../_/DWRzvavt.js\";import\"../../../_/dtH_B6sZ.js\";import\"../../../_/0uB3RiRb.js\";import\"../../../_/BQDGx3fZ.js\";async function o(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{o as 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 n}from\"../../../_/g_2GOd_8.js\";import{i as c}from\"../../../_/DXU2C52A.js\";import\"../../../_/DWRzvavt.js\";import\"../../../_/dtH_B6sZ.js\";import\"../../../_/0uB3RiRb.js\";import\"../../../_/BQDGx3fZ.js\";function a(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 o(e){return e&&typeof e===\"object\"&&Array.isArray(e.keys)&&e.keys.every(i)}function i(e){return c(e)}class LocalJWKSet{#e;#t=new WeakMap;constructor(e){if(!o(e))throw new r(\"JSON Web Key Set malformed\");this.#e=structuredClone(e)}jwks(){return this.#e}async getKey(e,t){const{alg:r,kid:c}={...e,...t?.header};const o=a(r);const i=this.#e.keys.filter((e=>{let t=o===e.kty;t&&typeof c===\"string\"&&(t=c===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\"));if(t)switch(r){case\"ES256\":t=e.crv===\"P-256\";break;case\"ES384\":t=e.crv===\"P-384\";break;case\"ES512\":t=e.crv===\"P-521\";break;case\"Ed25519\":case\"EdDSA\":t=e.crv===\"Ed25519\";break}return t}));const{0:u,length:y}=i;if(y===0)throw new s;if(y!==1){const e=new n;const t=this.#t;e[Symbol.asyncIterator]=async function*(){for(const e of i)try{yield await f(t,e,r)}catch{}};throw e}return f(this.#t,u,r)}}async function f(t,s,n){const c=t.get(s)||t.set(s,{}).get(s);if(c[n]===void 0){const t=await e({...s,ext:true},n);if(t instanceof Uint8Array||t.type!==\"public\")throw new r(\"JSON Web Key Set members must be public keys\");c[n]=t}return c[n]}function u(e){const t=new LocalJWKSet(e);const r=async(e,r)=>t.getKey(e,r);Object.defineProperties(r,{jwks:{value:()=>structuredClone(t.jwks()),enumerable:false,configurable:false,writable:false}});return r}export{u as createLocalJWKSet};\n//# sourceMappingURL=local.js.map\n","import{c as e,d as t,f as a}from\"../../../_/g_2GOd_8.js\";import{createLocalJWKSet as s}from\"./local.js\";import{i}from\"../../../_/DXU2C52A.js\";import\"../key/import.js\";import\"../../../_/DWRzvavt.js\";import\"../../../_/dtH_B6sZ.js\";import\"../../../_/0uB3RiRb.js\";import\"../../../_/BQDGx3fZ.js\";function o(){return typeof WebSocketPair!==\"undefined\"||typeof navigator!==\"undefined\"&&navigator.userAgent===\"Cloudflare-Workers\"||typeof EdgeRuntime!==\"undefined\"&&EdgeRuntime===\"vercel\"}let n;if(typeof navigator===\"undefined\"||!navigator.userAgent?.startsWith?.(\"Mozilla/5.0 \")){const e=\"jose\";const t=\"v6.0.11\";n=`${e}/${t}`}const r=Symbol();async function c(a,s,i,o=fetch){const n=await o(a,{method:\"GET\",signal:i,redirect:\"manual\",headers:s}).catch((t=>{if(t.name===\"TimeoutError\")throw new e;throw t}));if(n.status!==200)throw new t(\"Expected 200 OK from the JSON Web Key Set HTTP response\");try{return await n.json()}catch{throw new t(\"Failed to parse the JSON Web Key Set HTTP response as JSON\")}}const h=Symbol();function u(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{#e;#t;#a;#s;#i;#o;#n;#r;#c;#h;constructor(e,t){if(!(e instanceof URL))throw new TypeError(\"url must be an instance of URL\");this.#e=new URL(e.href);this.#t=typeof t?.timeoutDuration===\"number\"?t?.timeoutDuration:5e3;this.#a=typeof t?.cooldownDuration===\"number\"?t?.cooldownDuration:3e4;this.#s=typeof t?.cacheMaxAge===\"number\"?t?.cacheMaxAge:6e5;this.#n=new Headers(t?.headers);n&&!this.#n.has(\"User-Agent\")&&this.#n.set(\"User-Agent\",n);if(!this.#n.has(\"accept\")){this.#n.set(\"accept\",\"application/json\");this.#n.append(\"accept\",\"application/jwk-set+json\")}this.#r=t?.[r];if(t?.[h]!==void 0){this.#h=t?.[h];if(u(t?.[h],this.#s)){this.#i=this.#h.uat;this.#c=s(this.#h.jwks)}}}pendingFetch(){return!!this.#o}coolingDown(){return typeof this.#i===\"number\"&&Date.now()<this.#i+this.#a}fresh(){return typeof this.#i===\"number\"&&Date.now()<this.#i+this.#s}jwks(){return this.#c?.jwks()}async getKey(e,t){this.#c&&this.fresh()||await this.reload();try{return await this.#c(e,t)}catch(s){if(s instanceof a&&this.coolingDown()===false){await this.reload();return this.#c(e,t)}throw s}}async reload(){this.#o&&o()&&(this.#o=void 0);this.#o||=c(this.#e.href,this.#n,AbortSignal.timeout(this.#t),this.#r).then((e=>{this.#c=s(e);if(this.#h){this.#h.uat=Date.now();this.#h.jwks=e}this.#i=Date.now();this.#o=void 0})).catch((e=>{this.#o=void 0;throw e}));await this.#o}}function l(e,t){const a=new RemoteJWKSet(e,t);const s=async(e,t)=>a.getKey(e,t);Object.defineProperties(s,{coolingDown:{get:()=>a.coolingDown(),enumerable:true,configurable:false},fresh:{get:()=>a.fresh(),enumerable:true,configurable:false},reload:{value:()=>a.reload(),enumerable:true,configurable:false,writable:false},reloading:{get:()=>a.pendingFetch(),enumerable:true,configurable:false},jwks:{value:()=>a.jwks(),enumerable:true,configurable:false,writable:false}});return s}export{l as createRemoteJWKSet,r as customFetch,h as jwksCache};\n//# sourceMappingURL=remote.js.map\n","import{a as t,d as s,c as e}from\"../../../_/DWRzvavt.js\";import{i as r}from\"../../../_/g_2GOd_8.js\";import{J as i,v as n}from\"../../../_/OwLMM8N5.js\";import\"../../../_/DXU2C52A.js\";class UnsecuredJWT{#t;constructor(t={}){this.#t=new i(t)}encode(){const s=t(JSON.stringify({alg:\"none\"}));const e=t(this.#t.data());return`${s}.${e}.`}setIssuer(t){this.#t.iss=t;return this}setSubject(t){this.#t.sub=t;return this}setAudience(t){this.#t.aud=t;return this}setJti(t){this.#t.jti=t;return this}setNotBefore(t){this.#t.nbf=t;return this}setExpirationTime(t){this.#t.exp=t;return this}setIssuedAt(t){this.#t.iat=t;return this}static decode(t,i){if(typeof t!==\"string\")throw new r(\"Unsecured JWT must be a string\");const{0:o,1:a,2:h,length:u}=t.split(\".\");if(u!==3||h!==\"\")throw new r(\"Invalid Unsecured JWT\");let c;try{c=JSON.parse(s.decode(e(o)));if(c.alg!==\"none\")throw new Error}catch{throw new r(\"Invalid Unsecured JWT\")}const d=n(c,e(a),i);return{payload:d,header:c}}}export{UnsecuredJWT};\n//# sourceMappingURL=unsecured.js.map\n","import{d as e,c as r}from\"../../../_/DWRzvavt.js\";import{i as t}from\"../../../_/DXU2C52A.js\";function o(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(e.decode(r(n)));if(!t(o))throw new Error;return o}catch{throw new TypeError(\"Invalid Token or Protected Header formatting\")}}export{o as decodeProtectedHeader};\n//# sourceMappingURL=decode_protected_header.js.map\n","import{c as t,d as e}from\"../../../_/DWRzvavt.js\";import{i as a}from\"../../../_/DXU2C52A.js\";import{i as o}from\"../../../_/g_2GOd_8.js\";function i(i){if(typeof i!==\"string\")throw new o(\"JWTs must use Compact JWS serialization, JWT must be a string\");const{1:s,length:r}=i.split(\".\");if(r===5)throw new o(\"Only JWTs using Compact JWS serialization can be decoded\");if(r!==3)throw new o(\"Invalid JWT\");if(!s)throw new o(\"JWTs must contain a payload\");let n;try{n=t(s)}catch{throw new o(\"Failed to base64url decode the payload\")}let d;try{d=JSON.parse(e.decode(n))}catch{throw new o(\"Failed to parse the decoded payload as JSON\")}if(!a(d))throw new o(\"Invalid JWT Claims Set\");return d}export{i as decodeJwt};\n//# sourceMappingURL=decode_jwt.js.map\n","import{b as e}from\"../../../_/g_2GOd_8.js\";function a(a){const r=a?.modulusLength??2048;if(typeof r!==\"number\"||r<2048)throw new e(\"Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used\");return r}async function r(r,n){let s;let t;switch(r){case\"PS256\":case\"PS384\":case\"PS512\":s={name:\"RSA-PSS\",hash:`SHA-${r.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:a(n)};t=[\"sign\",\"verify\"];break;case\"RS256\":case\"RS384\":case\"RS512\":s={name:\"RSASSA-PKCS1-v1_5\",hash:`SHA-${r.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:a(n)};t=[\"sign\",\"verify\"];break;case\"RSA-OAEP\":case\"RSA-OAEP-256\":case\"RSA-OAEP-384\":case\"RSA-OAEP-512\":s={name:\"RSA-OAEP\",hash:`SHA-${parseInt(r.slice(-3),10)||1}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:a(n)};t=[\"decrypt\",\"unwrapKey\",\"encrypt\",\"wrapKey\"];break;case\"ES256\":s={name:\"ECDSA\",namedCurve:\"P-256\"};t=[\"sign\",\"verify\"];break;case\"ES384\":s={name:\"ECDSA\",namedCurve:\"P-384\"};t=[\"sign\",\"verify\"];break;case\"ES512\":s={name:\"ECDSA\",namedCurve:\"P-521\"};t=[\"sign\",\"verify\"];break;case\"Ed25519\":case\"EdDSA\":t=[\"sign\",\"verify\"];s={name:\"Ed25519\"};break;case\"ECDH-ES\":case\"ECDH-ES+A128KW\":case\"ECDH-ES+A192KW\":case\"ECDH-ES+A256KW\":{t=[\"deriveBits\"];const a=n?.crv??\"P-256\";switch(a){case\"P-256\":case\"P-384\":case\"P-521\":s={name:\"ECDH\",namedCurve:a};break;case\"X25519\":s={name:\"X25519\"};break;default:throw new e(\"Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, and X25519\")}break}default:throw new e('Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value')}return crypto.subtle.generateKey(s,n?.extractable??false,t)}export{r as generateKeyPair};\n//# sourceMappingURL=generate_key_pair.js.map\n","import{b as e}from\"../../../_/g_2GOd_8.js\";async function a(a,s){let r;let t;let c;switch(a){case\"HS256\":case\"HS384\":case\"HS512\":r=parseInt(a.slice(-3),10);t={name:\"HMAC\",hash:`SHA-${r}`,length:r};c=[\"sign\",\"verify\"];break;case\"A128CBC-HS256\":case\"A192CBC-HS384\":case\"A256CBC-HS512\":r=parseInt(a.slice(-3),10);return crypto.getRandomValues(new Uint8Array(r>>3));case\"A128KW\":case\"A192KW\":case\"A256KW\":r=parseInt(a.slice(1,4),10);t={name:\"AES-KW\",length:r};c=[\"wrapKey\",\"unwrapKey\"];break;case\"A128GCMKW\":case\"A192GCMKW\":case\"A256GCMKW\":case\"A128GCM\":case\"A192GCM\":case\"A256GCM\":r=parseInt(a.slice(1,4),10);t={name:\"AES-GCM\",length:r};c=[\"encrypt\",\"decrypt\"];break;default:throw new e('Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value')}return crypto.subtle.generateKey(t,s?.extractable??false,c)}export{a as 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\"../../_/CZ-pSmjF.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,customFetch,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\"../../_/g_2GOd_8.js\";export{generateKeyPair}from\"./key/generate_key_pair.js\";export{generateSecret}from\"./key/generate_secret.js\";export{b as base64url}from\"../../_/DWRzvavt.js\";import\"../../_/Dhlzvh95.js\";import\"../../_/C9sHDOqF.js\";import\"../../_/DULyNgRi.js\";import\"../../_/DXU2C52A.js\";import\"../../_/BQDGx3fZ.js\";import\"../../_/0uB3RiRb.js\";import\"../../_/Dm0TYCRg.js\";import\"../../_/Wzw9d5Yv.js\";import\"../../_/CUOaL8IJ.js\";import\"../../_/OwLMM8N5.js\";import\"../../_/dtH_B6sZ.js\";const r=\"WebCryptoAPI\";export{r as cryptoRuntime};\n//# sourceMappingURL=index.js.map\n"],"mappings":"oGAA8D,SAASA,EAAE,GAAGC,EAAE,CAAC,IAAMC,EAAED,EAAE,SAAS,EAAE,CAAC,OAAOC,KAAKD,EAAEC,GAAG,EAAE,CAAOC,EAAE,IAAI,WAAWD,EAAE,CAAKF,EAAE,EAAE,IAAI,IAAME,KAAKD,EAAG,EAAE,IAAIC,EAAEF,EAAE,CAAC,GAAGE,EAAE,OAAO,OAAOC,EAA6S,SAASC,EAAE,EAAE,CAAC,GAAG,WAAW,UAAU,SAAS,OAAOH,EAAE,UAAU,CAAC,IAAMC,EAAE,MAAYC,EAAE,EAAE,CAAC,IAAI,IAAIH,EAAE,EAAEA,EAAEC,EAAE,OAAO,GAAGC,EAAE,EAAE,KAAK,OAAO,aAAa,MAAM,KAAKD,EAAE,SAASD,EAAEA,EAAEE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAKC,EAAE,KAAK,GAAG,CAAC,CAAC,SAASE,EAAE,EAAE,CAAC,GAAG,WAAW,WAAW,OAAO,WAAW,WAAWJ,EAAE,CAAC,IAAMC,EAAE,KAAKD,EAAE,CAAOE,EAAE,IAAI,WAAWD,EAAE,OAAO,CAAC,IAAI,IA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