1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[68187],{967:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(40738),o=r(61208),i=r(32969);let a=e=>e?.[Symbol.toStringTag],s=(e,t,r)=>{if(void 0!==t.use){let e;switch(r){case"sign":case"verify":e="sig";break;case"encrypt":case"decrypt":e="enc"}if(t.use!==e)throw TypeError(`Invalid key for this operation, its "use" must be "${e}" when present`)}if(void 0!==t.alg&&t.alg!==e)throw TypeError(`Invalid key for this operation, its "alg" must be "${e}" when present`);if(Array.isArray(t.key_ops)){let n;switch(!0){case"sign"===r||"verify"===r:case"dir"===e:case e.includes("CBC-HS"):n=r;break;case e.startsWith("PBES2"):n="deriveBits";break;case/^A\d{3}(?:GCM)?(?:KW)?$/.test(e):n=!e.includes("GCM")&&e.endsWith("KW")?"encrypt"===r?"wrapKey":"unwrapKey":r;break;case"encrypt"===r&&e.startsWith("RSA"):n="wrapKey";break;case"decrypt"===r:n=e.startsWith("RSA")?"unwrapKey":"deriveBits"}if(n&&t.key_ops?.includes?.(n)===!1)throw TypeError(`Invalid key for this operation, its "key_ops" must include "${n}" when present`)}return!0},u=(e,t,r)=>{if(!(t instanceof Uint8Array)){if(i.ll(t)){if(i.t9(t)&&s(e,t,r))return;throw TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!(0,o.Ay)(t))throw TypeError((0,n.t)(e,t,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"));if("secret"!==t.type)throw TypeError(`${a(t)} instances for symmetric algorithms must be of type "secret"`)}},l=(e,t,r)=>{if(i.ll(t))switch(r){case"decrypt":case"sign":if(i.W2(t)&&s(e,t,r))return;throw TypeError("JSON Web Key for this operation be a private JWK");case"encrypt":case"verify":if(i.M3(t)&&s(e,t,r))return;throw TypeError("JSON Web Key for this operation be a public JWK")}if(!(0,o.Ay)(t))throw TypeError((0,n.t)(e,t,"CryptoKey","KeyObject","JSON Web Key"));if("secret"===t.type)throw TypeError(`${a(t)} instances for asymmetric algorithms must not be of type "secret"`);if("public"===t.type)switch(r){case"sign":throw TypeError(`${a(t)} instances for asymmetric algorithm signing must be of type "private"`);case"decrypt":throw TypeError(`${a(t)} instances for asymmetric algorithm decryption must be of type "private"`)}if("private"===t.type)switch(r){case"verify":throw TypeError(`${a(t)} instances for asymmetric algorithm verifying must be of type "public"`);case"encrypt":throw TypeError(`${a(t)} instances for asymmetric algorithm encryption must be of type "public"`)}},c=(e,t,r)=>{e.startsWith("HS")||"dir"===e||e.startsWith("PBES2")||/^A(?:128|192|256)(?:GCM)?(?:KW)?$/.test(e)||/^A(?:128|192|256)CBC-HS(?:256|384|512)$/.test(e)?u(e,t,r):l(e,t,r)}},1592:(e,t,r)=>{"use strict";r.d(t,{a:()=>o});let n=new Map,o={decode:(e,t="utf-8")=>(n.has(t)||n.set(t,new TextDecoder(t)),n.get(t).decode(e)),encode:new TextEncoder().encode}},2006:(e,t,r)=>{"use strict";r.d(t,{Yj:()=>i,zM:()=>a});var n=r(93334),o=r(24611);function i(e){return n.K_(o.ND,e)}function a(e){return n.dN(o.WF,e)}},6176:(e,t,r)=>{"use strict";r.d(t,{$4:()=>d,BT:()=>f,Dm:()=>c,Dp:()=>l,Rb:()=>a,T0:()=>s,Ye:()=>u,h2:()=>h,i4:()=>n,ie:()=>o,n:()=>i,xb:()=>p});class n extends Error{static code="ERR_JOSE_GENERIC";code="ERR_JOSE_GENERIC";constructor(e,t){super(e,t),this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}class o extends n{static code="ERR_JWT_CLAIM_VALIDATION_FAILED";code="ERR_JWT_CLAIM_VALIDATION_FAILED";claim;reason;payload;constructor(e,t,r="unspecified",n="unspecified"){super(e,{cause:{claim:r,reason:n,payload:t}}),this.claim=r,this.reason=n,this.payload=t}}class i extends n{static code="ERR_JWT_EXPIRED";code="ERR_JWT_EXPIRED";claim;reason;payload;constructor(e,t,r="unspecified",n="unspecified"){super(e,{cause:{claim:r,reason:n,payload:t}}),this.claim=r,this.reason=n,this.payload=t}}class a extends n{static code="ERR_JOSE_ALG_NOT_ALLOWED";code="ERR_JOSE_ALG_NOT_ALLOWED"}class s extends n{static code="ERR_JOSE_NOT_SUPPORTED";code="ERR_JOSE_NOT_SUPPORTED"}class u extends n{static code="ERR_JWS_INVALID";code="ERR_JWS_INVALID"}class l extends n{static code="ERR_JWT_INVALID";code="ERR_JWT_INVALID"}
1class c extends n{static code="ERR_JWKS_INVALID";code="ERR_JWKS_INVALID"}class f extends n{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",t){super(e,t)}}class d extends n{[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",t){super(e,t)}}class p extends n{static code="ERR_JWKS_TIMEOUT";code="ERR_JWKS_TIMEOUT";constructor(e="request timed out",t){super(e,t)}}class h extends n{static code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";constructor(e="signature verification failed",t){super(e,t)}}},9743:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){let{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}}},10591:(e,t,r)=>{"use strict";r.d(t,{s:()=>o});var n=r(68255);function o(e){function t(e,t){if("string"==typeof t&&/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/.test(t)){let e=new Date(t);if(!isNaN(e.getTime()))return e}return t}try{if("string"!=typeof e)return e;return JSON.parse(e,t)}catch(e){return n.a.error("Error parsing JSON",{error:e}),null}}},10835:(e,t,r)=>{"use strict";r.d(t,{MB:()=>T});var n=r(83859),o=r(57069),i=r(42241),a=r(38790);let s={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},u=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,l={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},c=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function f(e){return e instanceof Date&&!isNaN(e.getTime())}function d(e){let t=c.exec(e);if(!t)return null;let[,r,n,o,i,a,s,u,l,d,p]=t,h=new Date(Date.UTC(parseInt(r,10),parseInt(n,10)-1,parseInt(o,10),parseInt(i,10),parseInt(a,10),parseInt(s,10),u?parseInt(u.padEnd(3,"0"),10):0));if(l){let e=(60*parseInt(d,10)+parseInt(p,10))*("+"===l?-1:1);h.setUTCMinutes(h.getUTCMinutes()+e)}return f(h)?h:null}function p(e,t={}){let{strict:r=!1,warnings:n=!1,reviver:o,parseDates:i=!0}=t;if("string"!=typeof e)return e;let a=e.trim();if('"'===a[0]&&a.endsWith('"')&&!a.slice(1,-1).includes('"'))return a.slice(1,-1);let c=a.toLowerCase();if(c.length<=9&&c in l)return l[c];if(!u.test(a)){if(r)throw SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(s).some(([e,t])=>{let r=t.test(a);return r&&n&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${e} pattern`),r})&&r)throw Error("[better-json] Potential prototype pollution attempt detected");try{let e=(e,t)=>{if("__proto__"===e||"constructor"===e&&t&&"object"==typeof t&&"prototype"in t){n&&console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`);return}if(i&&"string"==typeof t){let e=d(t);if(e)return e}return o?o(e,t):t};return JSON.parse(a,e)}catch(t){if(r)throw t;return e}}function h(e,t={strict:!0}){return p(e,t)}let y={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&"undefined"!=typeof window&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};function g(e){let t=(0,i.e)(!1);return{session:(0,a.u)(t,"/get-session",e,{method:"GET"}),$sessionSignal:t}}let b=e=>{let t="credentials"in Request.prototype,r=(0,o.a)(e?.baseURL,e?.basePath),i=e?.plugins?.flatMap(e=>e.fetchPlugins).filter(e=>void 0!==e)||[],a={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:s,onError:u,onRequest:l,onResponse:c,...f}=e?.fetchOptions||{},d=(0,n.Hy)({baseURL:r,...t?{credentials:"include"}:{},method:"GET",jsonParser:e=>e?h(e,{strict:!1}):null,customFetchImpl:fetch,...f,plugins:[a,...f.plugins||[],...e?.disableDefaultFetchPlugins?[]:[y],...i]}),{$sessionSignal:p,session:b}=g(d),m=e?.plugins||[],w={},v={$sessionSignal:p,session:b}
1,E={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},S=[{signal:"$sessionSignal",matcher:e=>"/sign-out"===e||"/update-user"===e||e.startsWith("/sign-in")||e.startsWith("/sign-up")||"/delete-user"===e||"/verify-email"===e}];for(let e of m)e.getAtoms&&Object.assign(v,e.getAtoms?.(d)),e.pathMethods&&Object.assign(E,e.pathMethods),e.atomListeners&&S.push(...e.atomListeners);let A={notify:e=>{v[e].set(!v[e].get())},listen:(e,t)=>{v[e].subscribe(t)},atoms:v};for(let t of m)t.getActions&&Object.assign(w,t.getActions?.(d,A,e));return{pluginsActions:w,pluginsAtoms:v,pluginPathMethods:E,atomListeners:S,$fetch:d,$store:A}};function m(e){return"object"==typeof e&&null!==e&&"get"in e&&"function"==typeof e.get&&"lc"in e&&"number"==typeof e.lc}function w(e,t,r){let n=t[e],{fetchOptions:o,query:i,...a}=r||{};return n||(o?.method?o.method:a&&Object.keys(a).length>0?"POST":"GET")}function v(e,t,r,n,o){function i(a=[]){return new Proxy(function(){},{get(t,r){if("then"===r||"catch"===r||"finally"===r)return;let n=[...a,r],o=e;for(let e of n)if(o&&"object"==typeof o&&e in o)o=o[e];else{o=void 0;break}return"function"==typeof o||m(o)?o:i(n)},apply:async(e,i,s)=>{let u="/"+a.map(e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)).join("/"),l=s[0]||{},c=s[1]||{},{query:f,fetchOptions:d,...p}=l,h={...c,...d},y=w(u,r,l);return await t(u,{...h,body:"GET"===y?void 0:{...p,...h?.body||{}},query:f||h?.query,method:y,async onSuccess(e){await h?.onSuccess?.(e);let t=o?.find(e=>e.matcher(u));if(!t)return;let r=n[t.signal];if(!r)return;let i=r.get();setTimeout(()=>{r.set(!i)},10)}})}})}return i()}function E(e,t,r){let n=new Set(t).add(void 0);return e.listen((e,t,o)=>{n.has(o)&&r(e,t,o)})}var S=r(53818);function A(e,t={}){let r=(0,S.useRef)(e.get()),{keys:n,deps:o=[e,n]}=t,i=(0,S.useCallback)(t=>{let o=e=>{r.current!==e&&(r.current=e,t())};return(o(e.value),n?.length)?E(e,n,o):e.listen(o)},o),a=()=>r.current;return(0,S.useSyncExternalStore)(i,a,a)}function _(e){return`use${O(e)}`}function O(e){return e.charAt(0).toUpperCase()+e.slice(1)}function T(e){let{pluginPathMethods:t,pluginsActions:r,pluginsAtoms:n,$fetch:o,$store:i,atomListeners:a}=b(e),s={};for(let[e,t]of Object.entries(n))s[_(e)]=()=>A(t);return v({...r,...s,$fetch:o,$store:i},o,t,n,a)}r(11650),r(21507)},11650:(e,t,r)=>{"use strict";r.d(t,{b:()=>u,e:()=>a});var n=r(55036);let o=Object.create(null),i=e=>globalThis.process?.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?o:globalThis),a=new Proxy(o,{get:(e,t)=>i()[t]??o[t],has:(e,t)=>t in i()||t in o,set:(e,t,r)=>(i(!0)[t]=r,!0),deleteProperty(e,t){if(!t)return!1;let r=i(!0);return delete r[t],!0},ownKeys:()=>Object.keys(i(!0))}),s=void 0!==n&&n.env&&"production"||"",u="dev"===s||"development"===s},12147:(e,t,r)=>{"use strict";r.d(t,{Og:()=>s});var n=r(18233),o=r(17850),i=r(6176),a=r(67888);async function s(e,t,r){let s;if(!(0,a.A)(e))throw TypeError("JWK must be an object");switch(t??=e.alg,s??=r?.extractable??e.ext,e.kty){case"oct":if("string"!=typeof e.k||!e.k)throw TypeError('missing "k" (Key Value) Parameter value');return(0,n.D)(e.k);case"RSA":if("oth"in e&&void 0!==e.oth)throw new i.T0('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');return(0,o.A)({...e,alg:t,ext:s});case"AKP":if("string"!=typeof e.alg||!e.alg)throw TypeError('missing "alg" (Algorithm) Parameter value');if(void 0!==t&&t!==e.alg)throw TypeError("JWK alg and alg option value mismatch");return(0,o.A)({...e,ext:s});case"EC":case"OKP":return(0,o.A)({...e,alg:t,ext:s});default:throw new i.T0('Unsupported "kty" (Key Type) Parameter value')}}},13176:(e,t,r)=>{"use strict";r.d(t,{u:()=>o});let n="0123456789abcdef",o={encode:e=>{if("string"==typeof e&&(e=new TextEncoder().encode(e)),0===e.byteLength)return"";let t=new Uint8Array(e),r="";for(let e of t)r+=e.toString(16).padStart(2,"0");return r},decode:e=>{if(!e)return"";if("string"==typeof e){if(e.length%2!=0||!RegExp(`^[${n}]+$`).test(e))throw Error("Invalid hexadecimal string");let t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2)t[r/2]=parseInt(e.slice(r,r+2),16);return new TextDecoder().decode(t)}return new TextDecoder().decode(e)}}},17850:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(6176);function o(e){let t,r;switch(e.kty){case"AKP":switch(e.alg){case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":t={name:e.alg},r=e.priv?["sign"]:["verify"];break;default:throw new n.T0('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new n.T0('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},r=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},r=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new n.T0('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;
1case"OKP":switch(e.alg){case"Ed25519":case"EdDSA":t={name:"Ed25519"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new n.T0('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new n.T0('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}let i=async e=>{if(!e.alg)throw TypeError('"alg" argument is required when "jwk.alg" is not present');let{algorithm:t,keyUsages:r}=o(e),n={...e};return"AKP"!==n.kty&&delete n.alg,delete n.use,crypto.subtle.importKey("jwk",n,t,e.ext??(!e.d&&!e.priv),e.key_ops??r)}},18233:(e,t,r)=>{"use strict";r.d(t,{D:()=>a,l:()=>s});var n=r(35074);function o(e){if(Uint8Array.prototype.toBase64)return e.toBase64();let t=32768,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);let t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r}function a(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64("string"==typeof e?e:n.D0.decode(e),{alphabet:"base64url"});let t=e;t instanceof Uint8Array&&(t=n.D0.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return i(t)}catch{throw TypeError("The input to be decoded is not correctly encoded.")}}function s(e){let t=e;return("string"==typeof t&&(t=n.Rd.encode(t)),Uint8Array.prototype.toBase64)?t.toBase64({alphabet:"base64url",omitPadding:!0}):o(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}},18619:(e,t,r)=>{"use strict";r.d(t,{b:()=>s,d:()=>l,s:()=>u});var n=r(21507),o=r(77932);r(11650);var i=r(31754),a=r(65046);async function s(e,t){if(e.context.options.session?.cookieCache?.enabled){let r={session:Object.entries(t.session).reduce((t,[r,n])=>{let o=e.context.options.session?.additionalFields?.[r];return o&&!1===o.returned||(t[r]=n),t},{}),user:t.user},s=(0,o.g)(e.context.authCookies.sessionData.options.maxAge||60,"sec").getTime(),u=i.z.encode(JSON.stringify({session:r,expiresAt:s,signature:await (0,a.s)("SHA-256","base64urlnopad").sign(e.context.secret,JSON.stringify({...r,expiresAt:s}))}),{padding:!1});if(u.length>4093)throw new n.B("Session data is too large to store in the cookie. Please disable session cookie caching or reduce the size of the session data");e.setCookie(e.context.authCookies.sessionData.name,u,e.context.authCookies.sessionData.options)}}async function u(e,t,r,n){let o=await e.getSignedCookie(e.context.authCookies.dontRememberToken.name,e.context.secret);r=void 0!==r?r:!!o;let i=e.context.authCookies.sessionToken.options,a=r?void 0:e.context.sessionConfig.expiresIn;await e.setSignedCookie(e.context.authCookies.sessionToken.name,t.session.token,e.context.secret,{...i,maxAge:a,...n}),r&&await e.setSignedCookie(e.context.authCookies.dontRememberToken.name,"true",e.context.secret,e.context.authCookies.dontRememberToken.options),await s(e,t),e.context.setNewSession(t),e.context.options.secondaryStorage&&await e.context.secondaryStorage?.set(t.session.token,JSON.stringify({user:t.user,session:t.session}),Math.floor((new Date(t.session.expiresAt).getTime()-Date.now())/1e3))}function l(e,t){e.setCookie(e.context.authCookies.sessionToken.name,"",{...e.context.authCookies.sessionToken.options,maxAge:0}),e.setCookie(e.context.authCookies.sessionData.name,"",{...e.context.authCookies.sessionData.options,maxAge:0}),t||e.setCookie(e.context.authCookies.dontRememberToken.name,"",{...e.context.authCookies.dontRememberToken.options,maxAge:0})}r(10591),r(57069),r(1592)},19986:(e,t,r)=>{"use strict";r.d(t,{q:()=>i});var n=r(97946);function o(e){switch(e){case"a-z":return"abcdefghijklmnopqrstuvwxyz";case"A-Z":return"ABCDEFGHIJKLMNOPQRSTUVWXYZ";case"0-9":return"0123456789";case"-_":return"-_";default:throw Error(`Unsupported alphabet: ${e}`)}}function i(...e){let t=e.map(o).join("");if(0===t.length)throw Error("No valid characters provided for random string generation.");let r=t.length;return(e,...i)=>{let a;if(e<=0)throw Error("Length must be a positive integer.");let s=t,u=r;i.length>0&&(u=(s=i.map(o).join("")).length);let l=Math.floor(256/u)*u,c=new Uint8Array(2*e),f=c.length,d="",p=f;
1for(;d.length<e;)p>=f&&((0,n.UY)(c),p=0),(a=c[p++])<l&&(d+=s[a%u]);return d}}},20274:(e,t,r)=>{"use strict";r.d(t,{V:()=>w});var n=r(18233),o=r(71928),i=r(9743),a=r(75191);let s=async(e,t,r,n)=>{let s=await (0,a.A)(e,t,"verify");(0,i.A)(e,s);let u=(0,o.A)(e,s.algorithm);try{return await crypto.subtle.verify(u,s,r,n)}catch{return!1}};var u=r(6176),l=r(35074),c=r(80079),f=r(67888),d=r(967),p=r(74021);let h=(e,t)=>{if(void 0!==t&&(!Array.isArray(t)||t.some(e=>"string"!=typeof e)))throw TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)};var y=r(97613);async function g(e,t,r){let o,i;if(!(0,f.A)(e))throw new u.Ye("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new u.Ye('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new u.Ye("JWS Protected Header incorrect type");if(void 0===e.payload)throw new u.Ye("JWS Payload missing");if("string"!=typeof e.signature)throw new u.Ye("JWS Signature missing or incorrect type");if(void 0!==e.header&&!(0,f.A)(e.header))throw new u.Ye("JWS Unprotected Header incorrect type");let a={};if(e.protected)try{let t=(0,n.D)(e.protected);a=JSON.parse(l.D0.decode(t))}catch{throw new u.Ye("JWS Protected Header is invalid")}if(!(0,c.A)(a,e.header))throw new u.Ye("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let g={...a,...e.header},b=(0,p.A)(u.Ye,new Map([["b64",!0]]),r?.crit,a,g),m=!0;if(b.has("b64")&&"boolean"!=typeof(m=a.b64))throw new u.Ye('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:w}=g;if("string"!=typeof w||!w)throw new u.Ye('JWS "alg" (Algorithm) Header Parameter missing or invalid');let v=r&&h("algorithms",r.algorithms);if(v&&!v.has(w))throw new u.Rb('"alg" (Algorithm) Header Parameter value not allowed');if(m){if("string"!=typeof e.payload)throw new u.Ye("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new u.Ye("JWS Payload must be a string or an Uint8Array instance");let E=!1;"function"==typeof t&&(t=await t(a,e),E=!0),(0,d.A)(w,t,"verify");let S=(0,l.xW)(l.Rd.encode(e.protected??""),l.Rd.encode("."),"string"==typeof e.payload?l.Rd.encode(e.payload):e.payload);try{o=(0,n.D)(e.signature)}catch{throw new u.Ye("Failed to base64url decode the signature")}let A=await (0,y.A)(t,w);if(!await s(w,A,o,S))throw new u.h2;if(m)try{i=(0,n.D)(e.payload)}catch{throw new u.Ye("Failed to base64url decode the payload")}else i="string"==typeof e.payload?l.Rd.encode(e.payload):e.payload;let _={payload:i};return(void 0!==e.protected&&(_.protectedHeader=a),void 0!==e.header&&(_.unprotectedHeader=e.header),E)?{..._,key:A}:_}async function b(e,t,r){if(e instanceof Uint8Array&&(e=l.D0.decode(e)),"string"!=typeof e)throw new u.Ye("Compact JWS must be a string or Uint8Array");let{0:n,1:o,2:i,length:a}=e.split(".");if(3!==a)throw new u.Ye("Invalid Compact JWS");let s=await g({payload:o,protected:n,signature:i},t,r),c={payload:s.payload,protectedHeader:s.protectedHeader};return"function"==typeof t?{...c,key:s.key}:c}var m=r(34911);async function w(e,t,r){let n=await b(e,t,r);if(n.protectedHeader.crit?.includes("b64")&&!1===n.protectedHeader.b64)throw new u.Dp("JWTs MUST NOT use unencoded payload");let o={payload:(0,m.k)(n.protectedHeader,n.payload,r),protectedHeader:n.protectedHeader};return"function"==typeof t?{...o,key:n.key}:o}},20951:e=>{var t="/";!function(){"use strict";var r={114:function(e){function t(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var r,n="",o=0,i=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)r=e.charCodeAt(s);else if(47===r)break;else r=47;if(47===r){if(i===s-1||1===a);else if(i!==s-1&&2===a){if(n.length<2||2!==o||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2)){if(n.length>2){var u=n.lastIndexOf("/");if(u!==n.length-1){-1===u?(n="",o=0):o=(n=n.slice(0,u)).length-1-n.lastIndexOf("/"),i=s,a=0;continue}}else if(2===n.length||1===n.length){n="",o=0,i=s,a=0;continue}}t&&(n.length>0?n+="/..":n="..",o=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),o=s-i-1;i=s,a=0}else 46===r&&-1!==a?++a:a=-1}return n}function n(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+e+n:n}var o={resolve:function(){for(var e,n,o="",i=!1,a=arguments.length-1;a>=-1&&!i;a--)a>=0?n=arguments[a]:(void 0===e&&(e=""),n=e),t(n),0!==n.length&&(o=n+"/"+o,i=47===n.charCodeAt(0));if(o=r(o,!i),i)if(o.length>0)return"/"+o;else return"/";return o.length>0?o:"."},normalize:function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return(0!==(e=r(e,!n)).length||n||(e="."),e.length>0&&o&&(e+="/"),n)?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0==arguments.length)return".";for(var e,r=0;r<arguments.length;++r){var n=arguments[r];t(n),n.length>0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":o.normalize(e)},relative:function(e,r){if(t(e),t(r),e===r||(e=o.resolve(e))===(r=o.resolve(r)))return"";for(var n=1;n<e.length&&47===e.charCodeAt(n);++n);for(var i=e.length,a=i-n,s=1;s<r.length&&47===r.charCodeAt(s);++s);for(var u=r.length-s,l=a<u?a:u,c=-1,f=0;f<=l;++f){if(f===l){if(u>l){if(47===r.charCodeAt(s+f))return r.slice(s+f+1);else if(0===f)return r.slice(s+f)}else a>l&&(47===e.charCodeAt(n+f)?c=f:0===f&&(c=0));break}var d=e.charCodeAt(n+f);if(d!==r.charCodeAt(s+f))break;47===d&&(c=f)}var p="";for(f=n+c+1;f<=i;++f)(f===i||47===e.charCodeAt(f))&&(0===p.length?p+="..":p+="/..");return p.length>0?p+r.slice(s+c):(s+=c,47===r.charCodeAt(s)&&++s,r.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),n=47===r,o=-1,i=!0,a=e.length-1;a>=1;--a)if(47===(r=e.charCodeAt(a))){if(!i){o=a;break}}else i=!1;
1return -1===o?n?"/":".":n&&1===o?"//":e.slice(0,o)},basename:function(e,r){if(void 0!==r&&"string"!=typeof r)throw TypeError('"ext" argument must be a string');t(e);var n,o=0,i=-1,a=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var s=r.length-1,u=-1;for(n=e.length-1;n>=0;--n){var l=e.charCodeAt(n);if(47===l){if(!a){o=n+1;break}}else -1===u&&(a=!1,u=n+1),s>=0&&(l===r.charCodeAt(s)?-1==--s&&(i=n):(s=-1,i=u))}return o===i?i=u:-1===i&&(i=e.length),e.slice(o,i)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!a){o=n+1;break}}else -1===i&&(a=!1,i=n+1);return -1===i?"":e.slice(o,i)},extname:function(e){t(e);for(var r=-1,n=0,o=-1,i=!0,a=0,s=e.length-1;s>=0;--s){var u=e.charCodeAt(s);if(47===u){if(!i){n=s+1;break}continue}-1===o&&(i=!1,o=s+1),46===u?-1===r?r=s:1!==a&&(a=1):-1!==r&&(a=-1)}return -1===r||-1===o||0===a||1===a&&r===o-1&&r===n+1?"":e.slice(r,o)},format:function(e){if(null===e||"object"!=typeof e)throw TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return n("/",e)},parse:function(e){t(e);var r,n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var o=e.charCodeAt(0),i=47===o;i?(n.root="/",r=1):r=0;for(var a=-1,s=0,u=-1,l=!0,c=e.length-1,f=0;c>=r;--c){if(47===(o=e.charCodeAt(c))){if(!l){s=c+1;break}continue}-1===u&&(l=!1,u=c+1),46===o?-1===a?a=c:1!==f&&(f=1):-1!==a&&(f=-1)}return -1===a||-1===u||0===f||1===f&&a===u-1&&a===s+1?-1!==u&&(0===s&&i?n.base=n.name=e.slice(1,u):n.base=n.name=e.slice(s,u)):(0===s&&i?(n.name=e.slice(1,a),n.base=e.slice(1,u)):(n.name=e.slice(s,a),n.base=e.slice(s,u)),n.ext=e.slice(a,u)),s>0?n.dir=e.slice(0,s-1):i&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,e.exports=o}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}},a=!0;try{r[e](i,i.exports,o),a=!1}finally{a&&delete n[e]}return i.exports}o.ab=t+"/",e.exports=o(114)}()},21507:(e,t,r)=>{"use strict";r.d(t,{B:()=>n});class n extends Error{constructor(e,t){super(e),this.name="BetterAuthError",this.message=e,this.cause=t,this.stack=""}}},27414:(e,t,r)=>{"use strict";r.d(t,{LG:()=>l,Ny:()=>k,UD:()=>j});var n=r(97946),o=Object.defineProperty,i=(e,t)=>{for(var r in t)o(e,r,{get:t[r],enumerable:!0})};function a(){let e=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return void 0===e?Object.isExtensible(Error):Object.prototype.hasOwnProperty.call(e,"writable")?e.writable:void 0!==e.set}function s(e){let t=e.split("\n at ");return t.length<=1?e:(t.splice(1,1),t.join("\n at "))}var u={OK:200,CREATED:201,ACCEPTED:202,NO_CONTENT:204,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,TEMPORARY_REDIRECT:307,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,"I'M_A_TEAPOT":418,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,UNAVAILABLE_FOR_LEGAL_REASONS:451,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511},l=function(e,t){class r extends e{#e;constructor(...e){if(a()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=s(t.replace(/^Error/,this.name)))}get errorStack(){return this.#e}}return Object.defineProperty(r.prototype,"constructor",{get:()=>t,enumerable:!1,configurable:!0}),r}(class extends Error{constructor(e="INTERNAL_SERVER_ERROR",t,r={},n="number"==typeof e?e:u[e]){super(t?.message,t?.cause?{cause:t.cause}:void 0),this.status=e,this.body=t,this.headers=r,this.statusCode=n,this.name="APIError",this.status=e,this.headers=r,this.statusCode=n,this.body=t?{code:t?.message?.toUpperCase().replace(/ /g,"_").replace(/[^A-Z0-9_]/g,""),...t}:void 0}},Error);function c(e){return e instanceof l||e?.name==="APIError"}
1function f(e){try{return e.includes("%")?decodeURIComponent(e):e}catch{return e}}function d(e){if(void 0===e)return!1;let t=typeof e;return"string"===t||"number"===t||"boolean"===t||null===t||"object"===t&&(!!Array.isArray(e)||!e.buffer&&(e.constructor&&"Object"===e.constructor.name||"function"==typeof e.toJSON))}function p(e,t,r){let n=0,o=new WeakMap;return JSON.stringify(e,(e,r)=>{if("bigint"==typeof r)return r.toString();if("object"==typeof r&&null!==r){if(o.has(r))return`[Circular ref-${o.get(r)}]`;o.set(r,n++)}return t?t(e,r):r},r)}function h(e){return!!e&&"object"==typeof e&&"_flag"in e&&"json"===e._flag}function y(e,t){if(e instanceof Response)return t?.headers instanceof Headers&&t.headers.forEach((t,r)=>{e.headers.set(r,t)}),e;if(h(e)){let r=e.body,n=e.routerResponse;if(n instanceof Response)return n;let o=new Headers({...n?.headers,...e.headers,...t?.headers,"Content-Type":"application/json"});return new Response(JSON.stringify(r),{...n,headers:o,status:e.status??t?.status??n?.status,statusText:t?.statusText??n?.statusText})}if(c(e))return y(e.body,{status:t?.status??e.statusCode,statusText:e.status.toString(),headers:t?.headers||e.headers});let r=e,n=new Headers(t?.headers);return e?"string"==typeof e?(r=e,n.set("Content-Type","text/plain")):e instanceof ArrayBuffer||ArrayBuffer.isView(e)?(r=e,n.set("Content-Type","application/octet-stream")):e instanceof Blob?(r=e,n.set("Content-Type",e.type||"application/octet-stream")):e instanceof FormData?r=e:e instanceof URLSearchParams?(r=e,n.set("Content-Type","application/x-www-form-urlencoded")):e instanceof ReadableStream?(r=e,n.set("Content-Type","application/octet-stream")):d(e)&&(r=p(e),n.set("Content-Type","application/json")):(null===e&&(r=JSON.stringify(null)),n.set("content-type","application/json")),new Response(r,{...t,headers:n})}async function g(e,t={}){let r={body:t.body,query:t.query};if(e.body){let n=await e.body["~standard"].validate(t.body);if(n.issues)return{data:null,error:b(n.issues,"body")};r.body=n.value}if(e.query){let n=await e.query["~standard"].validate(t.query);if(n.issues)return{data:null,error:b(n.issues,"query")};r.query=n.value}return e.requireHeaders&&!t.headers?{data:null,error:{message:"Headers is required"}}:e.requireRequest&&!t.request?{data:null,error:{message:"Request is required"}}:{data:r,error:null}}function b(e,t){let r=[];for(let t of e){let e=t.message;r.push(e)}return{message:`Invalid ${t} parameters`}}var m={name:"HMAC",hash:"SHA-256"},w=async e=>{let t="string"==typeof e?new TextEncoder().encode(e):e;return await n.aK.importKey("raw",t,m,!1,["sign","verify"])},v=async(e,t,r)=>{try{let o=atob(e),i=new Uint8Array(o.length);for(let e=0,t=o.length;e<t;e++)i[e]=o.charCodeAt(e);return await n.aK.verify(m,r,i,new TextEncoder().encode(t))}catch(e){return!1}},E=async(e,t)=>{let r=await w(t);return btoa(String.fromCharCode(...new Uint8Array(await n.aK.sign(m.name,r,new TextEncoder().encode(e)))))},S=async(e,t)=>{let r=await E(e,t);return encodeURIComponent(e=`${e}.${r}`)},A=(e,t)=>{let r=e;if(t)if("secure"===t)r="__Secure-"+e;else{if("host"!==t)return;r="__Host-"+e}return r};function _(e){if("string"!=typeof e)throw TypeError("argument str must be a string");let t=new Map,r=0;for(;r<e.length;){let n=e.indexOf("=",r);
1if(-1===n)break;let o=e.indexOf(";",r);if(-1===o)o=e.length;else if(o<n){r=e.lastIndexOf(";",n-1)+1;continue}let i=e.slice(r,n).trim();if(!t.has(i)){let r=e.slice(n+1,o).trim();34===r.codePointAt(0)&&(r=r.slice(1,-1)),t.set(i,f(r))}r=o+1}return t}var O=(e,t,r={})=>{let n;if(n=r?.prefix==="secure"?`__Secure-${e}=${t}`:r?.prefix==="host"?`__Host-${e}=${t}`:`${e}=${t}`,e.startsWith("__Secure-")&&!r.secure&&(r.secure=!0),e.startsWith("__Host-")&&(r.secure||(r.secure=!0),"/"!==r.path&&(r.path="/"),r.domain&&(r.domain=void 0)),r&&"number"==typeof r.maxAge&&r.maxAge>=0){if(r.maxAge>3456e4)throw Error("Cookies Max-Age SHOULD NOT be greater than 400 days (34560000 seconds) in duration.");n+=`; Max-Age=${Math.floor(r.maxAge)}`}if(r.domain&&"host"!==r.prefix&&(n+=`; Domain=${r.domain}`),r.path&&(n+=`; Path=${r.path}`),r.expires){if(r.expires.getTime()-Date.now()>3456e7)throw Error("Cookies Expires SHOULD NOT be greater than 400 days (34560000 seconds) in the future.");n+=`; Expires=${r.expires.toUTCString()}`}return r.httpOnly&&(n+="; HttpOnly"),r.secure&&(n+="; Secure"),r.sameSite&&(n+=`; SameSite=${r.sameSite.charAt(0).toUpperCase()+r.sameSite.slice(1)}`),r.partitioned&&(r.secure||(r.secure=!0),n+="; Partitioned"),n},T=(e,t,r)=>O(e,t=encodeURIComponent(t),r),R=async(e,t,r,n)=>O(e,t=await S(t,r),n),x=async(e,{options:t,path:r})=>{let n=new Headers,{data:o,error:i}=await g(t,e);if(i)throw new l(400,{message:i.message,code:"VALIDATION_ERROR"});let a="headers"in e?e.headers instanceof Headers?e.headers:new Headers(e.headers):"request"in e&&e.request instanceof Request?e.request.headers:null,s=a?.get("cookie"),u=s?_(s):void 0,c={...e,body:o.body,query:o.query,path:e.path||r,context:"context"in e&&e.context?e.context:{},returned:void 0,headers:e?.headers,request:e?.request,params:"params"in e?e.params:void 0,method:e.method,setHeader:(e,t)=>{n.set(e,t)},getHeader:e=>a?a.get(e):null,getCookie:(e,t)=>{let r=A(e,t);return r&&u?.get(r)||null},getSignedCookie:async(e,t,r)=>{let n=A(e,r);if(!n)return null;let o=u?.get(n);if(!o)return null;let i=o.lastIndexOf(".");if(i<1)return null;let a=o.substring(0,i),s=o.substring(i+1);if(44!==s.length||!s.endsWith("="))return null;let l=await w(t);return!!await v(s,a,l)&&a},setCookie:(e,t,r)=>{let o=T(e,t,r);return n.append("set-cookie",o),o},setSignedCookie:async(e,t,r,o)=>{let i=await R(e,t,r,o);return n.append("set-cookie",i),i},redirect:e=>(n.set("location",e),new l("FOUND",void 0,n)),error:(e,t,r)=>new l(e,t,r),json:(t,r)=>e.asResponse?{body:r?.body||t,routerResponse:r,_flag:"json"}:t,responseHeaders:n};for(let e of t.use||[]){let t=await e({...c,returnHeaders:!0,asResponse:!1});t.response&&Object.assign(c.context,t.response),t.headers&&t.headers.forEach((e,t)=>{c.responseHeaders.set(t,e)})}return c};function k(e,t){let r=async r=>{let n=r,o="function"==typeof e?e:t,i="function"==typeof e?{}:e,a=await x(n,{options:i,path:"/"});if(!o)throw Error("handler must be defined");let s=await o(a),u=a.responseHeaders;return n.returnHeaders?{headers:u,response:s}:s};return r.options="function"==typeof e?{}:e,r}k.create=e=>function(t,r){if("function"==typeof t)return k({use:e?.use},t);if(!r)throw Error("Middleware handler is required");return k({...t,method:"*",use:[...e?.use||[],...t.use||[]]},r)};var j=(e,t,r)=>{let n=async(...n)=>{let o=n[0]||{},i=await x(o,{options:t,path:e}),a=await r(i).catch(async e=>{if(c(e)){let r=t.onAPIError;if(r&&await r(e),o.asResponse)return e}throw e}),s=i.responseHeaders;return o.asResponse?y(a,{headers:s}):o.returnHeaders?{headers:s,response:a}:a};return n.options=t,n.path=e,n};function P(e,t,r){function n(r,n){var o;for(let i in Object.defineProperty(r,"_zod",{value:r._zod??{},enumerable:!1}),(o=r._zod).traits??(o.traits=new Set),r._zod.traits.add(e),t(r,n),a.prototype)i in r||Object.defineProperty(r,i,{value:a.prototype[i].bind(r)});r._zod.constr=a,r._zod.def=n}let o=r?.Parent??Object;class i extends o{}function a(e){var t;let o=r?.Parent?new i:this;for(let r of(n(o,e),(t=o._zod).deferred??(t.deferred=[]),o._zod.deferred))r();return o}return Object.defineProperty(i,"name",{value:e}),Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:t=>!!r?.Parent&&t instanceof r.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}function D(e){return e}function N(e){return e}function I(e){}function C(e){throw Error()}function U(e){}function L(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,r])=>-1===t.indexOf(+e)).map(([e,t])=>t)}
1function M(e,t="|"){return e.map(e=>eu(e)).join(t)}function W(e,t){return"bigint"==typeof t?t.toString():t}function H(e){let t=!1;return{get value(){if(!t){let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error("cached value already set")}}}function F(e){return null==e}function $(e){let t=+!!e.startsWith("^"),r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function B(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n;return Number.parseInt(e.toFixed(o).replace(".",""))%Number.parseInt(t.toFixed(o).replace(".",""))/10**o}function K(e,t,r){let n=!1;Object.defineProperty(e,t,{get(){if(!n){let n=r();return e[t]=n,n}throw Error("cached value already set")},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function q(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function J(e,t){return t?t.reduce((e,t)=>e?.[t],e):e}function V(e){let t=Object.keys(e);return Promise.all(t.map(t=>e[t])).then(e=>{let r={};for(let n=0;n<t.length;n++)r[t[n]]=e[n];return r})}function z(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r}function G(e){return JSON.stringify(e)}j.create=e=>(t,r,n)=>j(t,{...r,use:[...r?.use||[],...e?.use||[]]},n),Object.freeze({status:"aborted"}),Symbol("zod_brand"),i({},{BIGINT_FORMAT_RANGES:()=>ef,Class:()=>eT,NUMBER_FORMAT_RANGES:()=>ec,aborted:()=>em,allowsEval:()=>Q,assert:()=>U,assertEqual:()=>D,assertIs:()=>I,assertNever:()=>C,assertNotEqual:()=>N,assignProp:()=>q,cached:()=>H,captureStackTrace:()=>Y,cleanEnum:()=>eO,cleanRegex:()=>$,clone:()=>ei,createTransparentProxy:()=>es,defineLazy:()=>K,esc:()=>G,escapeRegex:()=>eo,extend:()=>eh,finalizeIssue:()=>eE,floatSafeRemainder:()=>B,getElementAtPath:()=>J,getEnumValues:()=>L,getLengthableOrigin:()=>eA,getParsedType:()=>et,getSizableOrigin:()=>eS,isObject:()=>Z,isPlainObject:()=>X,issue:()=>e_,joinValues:()=>M,jsonStringifyReplacer:()=>W,merge:()=>ey,normalizeParams:()=>ea,nullish:()=>F,numKeys:()=>ee,omit:()=>ep,optionalKeys:()=>el,partial:()=>eg,pick:()=>ed,prefixIssues:()=>ew,primitiveTypes:()=>en,promiseAllObject:()=>V,propertyKeyTypes:()=>er,randomString:()=>z,required:()=>eb,stringifyPrimitive:()=>eu,unwrapMessage:()=>ev});var Y=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function Z(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}var Q=H(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function X(e){if(!1===Z(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!1!==Z(r)&&!1!==Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")}function ee(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var et=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return"promise";if("undefined"!=typeof Map&&e instanceof Map)return"map";if("undefined"!=typeof Set&&e instanceof Set)return"set";if("undefined"!=typeof Date&&e instanceof Date)return"date";if("undefined"!=typeof File&&e instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${t}`)}},er=new Set(["string","number","symbol"]),en=new Set(["string","number","bigint","boolean","symbol","undefined"]);function eo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ei(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function ea(e){let t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return(delete t.message,"string"==typeof t.error)?{...t,error:()=>t.error}:t}function es(e){let t;return new Proxy({},{get:(r,n,o)=>(t??(t=e()),Reflect.get(t,n,o)),set:(r,n,o,i)=>(t??(t=e()),Reflect.set(t,n,o,i)),has:(r,n)=>(t??(t=e()),Reflect.has(t,n)),deleteProperty:(r,n)=>(t??(t=e()),Reflect.deleteProperty(t,n)),ownKeys:r=>(t??(t=e()),Reflect.ownKeys(t)),getOwnPropertyDescriptor:(r,n)=>(t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)),defineProperty:(r,n,o)=>(t??(t=e()),Reflect.defineProperty(t,n,o))})}function eu(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}function el(e){return Object.keys(e).filter(t=>"optional"===e[t]._zod.optin&&"optional"===e[t]._zod.optout)}var ec={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},ef={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function ed(e,t){let r={},n=e._zod.def;for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&(r[e]=n.shape[e])}return ei(e,{...e._zod.def,shape:r,checks:[]})}function ep(e,t){let r={...e._zod.def.shape},n=e._zod.def;for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return ei(e,{...e._zod.def,shape:r,checks:[]})}function eh(e,t){if(!X(t))throw Error("Invalid input to extend: expected a plain object");let r={...e._zod.def,get shape(){let r={...e._zod.def.shape,...t};return q(this,"shape",r),r},checks:[]};return ei(e,r)}function ey(e,t){return ei(e,{...e._zod.def,get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return q(this,"shape",r),r},catchall:t._zod.def.catchall,checks:[]})}function eg(e,t,r){let n=t._zod.def.shape,o={...n};if(r)for(let t in r){if(!(t in n))throw Error(`Unrecognized key: "${t}"`);r[t]&&(o[t]=e?new e({type:"optional",innerType:n[t]}):n[t])}else for(let t in n)o[t]=e?new e({type:"optional",innerType:n[t]}):n[t];return ei(t,{...t._zod.def,shape:o,checks:[]})}function eb(e,t,r){let n=t._zod.def.shape,o={...n};if(r)for(let t in r){if(!(t in o))throw Error(`Unrecognized key: "${t}"`);r[t]&&(o[t]=new e({type:"nonoptional",innerType:n[t]}))}else for(let t in n)o[t]=new e({type:"nonoptional",innerType:n[t]});return ei(t,{...t._zod.def,shape:o,checks:[]})}function em(e,t=0){for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function ew(e,t){return t.map(t=>{var r;return(r=t).path??(r.path=[]),t.path.unshift(e),t})}function ev(e){return"string"==typeof e?e:e?.message}function eE(e,t,r){let n={...e,path:e.path??[]};return e.message||(n.message=ev(e.inst?._zod.def?.error?.(e))??ev(t?.error?.(e))??ev(r.customError?.(e))??ev(r.localeError?.(e))??"Invalid input"),delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function eS(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function eA(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function e_(...e){let[t,r,n]=e;return"string"==typeof t?{message:t,code:"custom",input:r,inst:n}:{...t}}function eO(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}var eT=class{constructor(...e){}},eR=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get:()=>JSON.stringify(t,W,2),enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ex=P("$ZodError",eR);function ek(e,t=e=>e.message){let r={},n=[];for(let o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}function ej(e,t){let r=t||function(e){return e.message},n={_errors:[]},o=e=>{for(let t of e.issues)if("invalid_union"===t.code&&t.errors.length)t.errors.map(e=>o({issues:e}));else if("invalid_key"===t.code)o({issues:t.issues});else if("invalid_element"===t.code)o({issues:t.issues});
1else if(0===t.path.length)n._errors.push(r(t));else{let e=n,o=0;for(;o<t.path.length;){let n=t.path[o];o===t.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(r(t))):e[n]=e[n]||{_errors:[]},e=e[n],o++}}};return o(e),n}P("$ZodError",eR,{Parent:Error}),Symbol("ZodOutput"),Symbol("ZodInput");var eP=(e,t)=>{ex.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>ej(e,t)},flatten:{value:t=>ek(e,t)},addIssue:{value:t=>e.issues.push(t)},addIssues:{value:t=>e.issues.push(...t)},isEmpty:{get:()=>0===e.issues.length}})};P("ZodError",eP),P("ZodError",eP,{Parent:Error})},30055:(e,t,r)=>{"use strict";let n;r.d(t,{RD:()=>w});var o=r(6176),i=r(12147),a=r(67888);function s(e){switch("string"==typeof e&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";case"ML":return"AKP";default:throw new o.T0('Unsupported "alg" value for a JSON Web Key Set')}}function u(e){return e&&"object"==typeof e&&Array.isArray(e.keys)&&e.keys.every(l)}function l(e){return(0,a.A)(e)}class c{#t;#r=new WeakMap;constructor(e){if(!u(e))throw new o.Dm("JSON Web Key Set malformed");this.#t=structuredClone(e)}jwks(){return this.#t}async getKey(e,t){let{alg:r,kid:n}={...e,...t?.header},i=s(r),a=this.#t.keys.filter(e=>{let t=i===e.kty;if(t&&"string"==typeof n&&(t=n===e.kid),t&&("string"==typeof e.alg||"AKP"===i)&&(t=r===e.alg),t&&"string"==typeof e.use&&(t="sig"===e.use),t&&Array.isArray(e.key_ops)&&(t=e.key_ops.includes("verify")),t)switch(r){case"ES256":t="P-256"===e.crv;break;case"ES384":t="P-384"===e.crv;break;case"ES512":t="P-521"===e.crv;break;
1case"Ed25519":case"EdDSA":t="Ed25519"===e.crv}return t}),{0:u,length:l}=a;if(0===l)throw new o.BT;if(1!==l){let e=new o.$4,t=this.#r;throw e[Symbol.asyncIterator]=async function*(){for(let e of a)try{yield await f(t,e,r)}catch{}},e}return f(this.#r,u,r)}}async function f(e,t,r){let n=e.get(t)||e.set(t,{}).get(t);if(void 0===n[r]){let e=await (0,i.Og)({...t,ext:!0},r);if(e instanceof Uint8Array||"public"!==e.type)throw new o.Dm("JSON Web Key Set members must be public keys");n[r]=e}return n[r]}function d(e){let t=new c(e),r=async(e,r)=>t.getKey(e,r);return Object.defineProperties(r,{jwks:{value:()=>structuredClone(t.jwks()),enumerable:!1,configurable:!1,writable:!1}}),r}function p(){return"undefined"!=typeof WebSocketPair||"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"undefined"!=typeof EdgeRuntime&&"vercel"===EdgeRuntime}if("undefined"==typeof navigator||!navigator.userAgent?.startsWith?.("Mozilla/5.0 ")){let e="jose",t="v6.1.0";n=`${e}/${t}`}let h=Symbol();async function y(e,t,r,n=fetch){let i=await n(e,{method:"GET",signal:r,redirect:"manual",headers:t}).catch(e=>{if("TimeoutError"===e.name)throw new o.xb;throw e});if(200!==i.status)throw new o.i4("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await i.json()}catch{throw new o.i4("Failed to parse the JSON Web Key Set HTTP response as JSON")}}let g=Symbol();function b(e,t){return!("object"!=typeof e||null===e||!("uat"in e)||"number"!=typeof e.uat||Date.now()-e.uat>=t)&&"jwks"in e&&!!(0,a.A)(e.jwks)&&!!Array.isArray(e.jwks.keys)&&!!Array.prototype.every.call(e.jwks.keys,a.A)}class m{#n;#o;#i;#a;#s;#u;#l;#c;#f;#d;constructor(e,t){if(!(e instanceof URL))throw TypeError("url must be an instance of URL");this.#n=new URL(e.href),this.#o="number"==typeof t?.timeoutDuration?t?.timeoutDuration:5e3,this.#i="number"==typeof t?.cooldownDuration?t?.cooldownDuration:3e4,this.#a="number"==typeof t?.cacheMaxAge?t?.cacheMaxAge:6e5,this.#l=new Headers(t?.headers),n&&!this.#l.has("User-Agent")&&this.#l.set("User-Agent",n),this.#l.has("accept")||(this.#l.set("accept","application/json"),this.#l.append("accept","application/jwk-set+json")),this.#c=t?.[h],t?.[g]!==void 0&&(this.#d=t?.[g],b(t?.[g],this.#a)&&(this.#s=this.#d.uat,this.#f=d(this.#d.jwks)))}pendingFetch(){return!!this.#u}coolingDown(){return"number"==typeof this.#s&&Date.now()<this.#s+this.#i}fresh(){return"number"==typeof this.#s&&Date.now()<this.#s+this.#a}jwks(){return this.#f?.jwks()}async getKey(e,t){this.#f&&this.fresh()||await this.reload();try{return await this.#f(e,t)}catch(r){if(r instanceof o.BT&&!1===this.coolingDown())return await this.reload(),this.#f(e,t);throw r}}async reload(){this.#u&&p()&&(this.#u=void 0),this.#u||=y(this.#n.href,this.#l,AbortSignal.timeout(this.#o),this.#c).then(e=>{this.#f=d(e),this.#d&&(this.#d.uat=Date.now(),this.#d.jwks=e),this.#s=Date.now(),this.#u=void 0}).catch(e=>{throw this.#u=void 0,e}),await this.#u}}function w(e,t){let r=new m(e,t),n=async(e,t)=>r.getKey(e,t);return Object.defineProperties(n,{coolingDown:{get:()=>r.coolingDown(),enumerable:!0,configurable:!1},fresh:{get:()=>r.fresh(),enumerable:!0,configurable:!1},reload:{value:()=>r.reload(),enumerable:!0,configurable:!1,writable:!1},reloading:{get:()=>r.pendingFetch(),enumerable:!0,configurable:!1},jwks:{value:()=>r.jwks(),enumerable:!0,configurable:!1,writable:!1}}),n}},30543:(e,t,r)=>{"use strict";r.d(t,{i:()=>s});var n=r(18233),o=r(35074),i=r(67888),a=r(6176);function s(e){let t,r;if("string"!=typeof e)throw new a.Dp("JWTs must use Compact JWS serialization, JWT must be a string");let{1:s,length:u}=e.split(".");if(5===u)throw new a.Dp("Only JWTs using Compact JWS serialization can be decoded");if(3!==u)throw new a.Dp("Invalid JWT");if(!s)throw new a.Dp("JWTs must contain a payload");try{t=(0,n.D)(s)}catch{throw new a.Dp("Failed to base64url decode the payload")}try{r=JSON.parse(o.D0.decode(t))}catch{throw new a.Dp("Failed to parse the decoded payload as JSON")}if(!(0,i.A)(r))throw new a.Dp("Invalid JWT Claims Set");return r}},31754:(e,t,r)=>{"use strict";function n(e){return e?"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
1+/"}function o(e,t,r){let n="",o=0,i=0;for(let r of e)for(o=o<<8|r,i+=8;i>=6;)i-=6,n+=t[o>>i&63];if(i>0&&(n+=t[o<<6-i&63]),r){let e=(4-n.length%4)%4;n+="=".repeat(e)}return n}function i(e,t){let r=new Map;for(let e=0;e<t.length;e++)r.set(t[e],e);let n=[],o=0,i=0;for(let t of e){if("="===t)break;let e=r.get(t);if(void 0===e)throw Error(`Invalid Base64 character: ${t}`);o=o<<6|e,(i+=6)>=8&&(i-=8,n.push(o>>i&255))}return Uint8Array.from(n)}r.d(t,{K:()=>a,z:()=>s});let a={encode(e,t={}){let r=n(!1);return o("string"==typeof e?new TextEncoder().encode(e):new Uint8Array(e),r,t.padding??!0)},decode(e){"string"!=typeof e&&(e=new TextDecoder().decode(e));let t=n(e.includes("-")||e.includes("_"));return i(e,t)}},s={encode(e,t={}){let r=n(!0);return o("string"==typeof e?new TextEncoder().encode(e):new Uint8Array(e),r,t.padding??!0)},decode(e){let t=n(e.includes("-")||e.includes("_"));return i(e,t)}}},32688:(e,t,r)=>{"use strict";var n=r(24611),o=r(2006);r(27414);let i=n.Ik({id:n.Yj(),createdAt:n.p6().default(()=>new Date),updatedAt:n.p6().default(()=>new Date)});i.extend({providerId:n.Yj(),accountId:n.Yj(),userId:o.Yj(),accessToken:n.Yj().nullish(),refreshToken:n.Yj().nullish(),idToken:n.Yj().nullish(),accessTokenExpiresAt:n.p6().nullish(),refreshTokenExpiresAt:n.p6().nullish(),scope:n.Yj().nullish(),password:n.Yj().nullish()}),i.extend({email:n.Yj().transform(e=>e.toLowerCase()),emailVerified:n.zM().default(!1),name:n.Yj(),image:n.Yj().nullish()}),i.extend({userId:o.Yj(),expiresAt:n.p6(),token:n.Yj(),ipAddress:n.Yj().nullish(),userAgent:n.Yj().nullish()}),i.extend({value:n.Yj(),expiresAt:n.p6(),identifier:n.Yj()})},32959:(e,t,r)=>{"use strict";r.d(t,{n:()=>i});var n=r(97946),o=r(31754);function i(e,t){return{digest:async r=>{let i=new TextEncoder,a="string"==typeof r?i.encode(r):r,s=await n.aK.digest(e,a);return"hex"===t?Array.from(new Uint8Array(s)).map(e=>e.toString(16).padStart(2,"0")).join(""):"base64"===t||"base64url"===t||"base64urlnopad"===t?t.includes("url")?o.z.encode(s,{padding:"base64urlnopad"!==t}):o.K.encode(s):s}}}},32969:(e,t,r)=>{"use strict";r.d(t,{M3:()=>a,W2:()=>i,ll:()=>o,t9:()=>s});var n=r(67888);function o(e){return(0,n.A)(e)&&"string"==typeof e.kty}function i(e){return"oct"!==e.kty&&("AKP"===e.kty&&"string"==typeof e.priv||"string"==typeof e.d)}function a(e){return"oct"!==e.kty&&void 0===e.d&&void 0===e.priv}function s(e){return"oct"===e.kty&&"string"==typeof e.k}},34911:(e,t,r)=>{"use strict";r.d(t,{c:()=>m,k:()=>b});var n=r(6176),o=r(35074);let i=e=>Math.floor(e.getTime()/1e3),a=60,s=3600,u=86400,l=604800,c=0x1e187e0,f=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,d=e=>{let t,r=f.exec(e);if(!r||r[4]&&r[1])throw TypeError("Invalid time period format");let n=parseFloat(r[2]);switch(r[3].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":t=Math.round(n);break;case"minute":case"minutes":case"min":case"mins":case"m":t=Math.round(n*a);break;case"hour":case"hours":case"hr":case"hrs":case"h":t=Math.round(n*s);break;case"day":case"days":case"d":t=Math.round(n*u);break;case"week":case"weeks":case"w":t=Math.round(n*l);break;default:t=Math.round(n*c)}return"-"===r[1]||"ago"===r[4]?-t:t};var p=r(67888);function h(e,t){if(!Number.isFinite(t))throw TypeError(`Invalid ${e} input`);return t}let y=e=>e.includes("/")?e.toLowerCase():`application/${e.toLowerCase()}`,g=(e,t)=>"string"==typeof e?t.includes(e):!!Array.isArray(e)&&t.some(Set.prototype.has.bind(new Set(e)));function b(e,t,r={}){let a,s;try{a=JSON.parse(o.D0.decode(t))}catch{}if(!(0,p.A)(a))throw new n.Dp("JWT Claims Set must be a top-level JSON object");let{typ:u}=r;if(u&&("string"!=typeof e.typ||y(e.typ)!==y(u)))throw new n.ie('unexpected "typ" JWT header value',a,"typ","check_failed");let{requiredClaims:l=[],issuer:c,subject:f,audience:h,maxTokenAge:m}=r,w=[...l];for(let e of(void 0!==m&&w.push("iat"),void 0!==h&&w.push("aud"),void 0!==f&&w.push("sub"),void 0!==c&&w.push("iss"),new Set(w.reverse())))if(!(e in a))throw new n.ie(`missing required "${e}" claim`,a,e,"missing");if(c&&!(Array.isArray(c)?c:[c]).includes(a.iss))throw new n.ie('unexpected "iss" claim value',a,"iss","check_failed");if(f&&a.sub!==f)throw new n.ie('unexpected "sub" claim value',a,"sub","check_failed");if(h&&!g(a.aud,"string"==typeof h?[h]:h))throw new n.ie('unexpected "aud" claim value',a,"aud","check_failed");switch(typeof r.clockTolerance){case"string":s=d(r.clockTolerance);break;case"number":s=r.clockTolerance;break;case"undefined":s=0;break;default:throw TypeError("Invalid clockTolerance option type")}let{currentDate:v}=r,E=i(v||new Date);if((void 0!==a.iat||m)&&"number"!=typeof a.iat)throw new n.ie('"iat" claim must be a number',a,"iat","invali
1d");if(void 0!==a.nbf){if("number"!=typeof a.nbf)throw new n.ie('"nbf" claim must be a number',a,"nbf","invalid");if(a.nbf>E+s)throw new n.ie('"nbf" claim timestamp check failed',a,"nbf","check_failed")}if(void 0!==a.exp){if("number"!=typeof a.exp)throw new n.ie('"exp" claim must be a number',a,"exp","invalid");if(a.exp<=E-s)throw new n.n('"exp" claim timestamp check failed',a,"exp","check_failed")}if(m){let e=E-a.iat;if(e-s>("number"==typeof m?m:d(m)))throw new n.n('"iat" claim timestamp check failed (too far in the past)',a,"iat","check_failed");if(e<0-s)throw new n.ie('"iat" claim timestamp check failed (it should be in the past)',a,"iat","check_failed")}return a}class m{#p;constructor(e){if(!(0,p.A)(e))throw TypeError("JWT Claims Set MUST be an object");this.#p=structuredClone(e)}data(){return o.Rd.encode(JSON.stringify(this.#p))}get iss(){return this.#p.iss}set iss(e){this.#p.iss=e}get sub(){return this.#p.sub}set sub(e){this.#p.sub=e}get aud(){return this.#p.aud}set aud(e){this.#p.aud=e}set jti(e){this.#p.jti=e}set nbf(e){"number"==typeof e?this.#p.nbf=h("setNotBefore",e):e instanceof Date?this.#p.nbf=h("setNotBefore",i(e)):this.#p.nbf=i(new Date)+d(e)}set exp(e){"number"==typeof e?this.#p.exp=h("setExpirationTime",e):e instanceof Date?this.#p.exp=h("setExpirationTime",i(e)):this.#p.exp=i(new Date)+d(e)}set iat(e){void 0===e?this.#p.iat=i(new Date):e instanceof Date?this.#p.iat=h("setIssuedAt",i(e)):"string"==typeof e?this.#p.iat=h("setIssuedAt",i(new Date)+d(e)):this.#p.iat=h("setIssuedAt",e)}}},35074:(e,t,r)=>{"use strict";r.d(t,{D0:()=>o,Rd:()=>n,xW:()=>i});let n=new TextEncoder,o=new TextDecoder;function i(...e){let t=new Uint8Array(e.reduce((e,{length:t})=>e+t,0)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}},38790:(e,t,r)=>{"use strict";r.d(t,{u:()=>f});var n=r(42241);let o=5,i=6,a=10,s=(e,t,r,n)=>(e.events=e.events||{},e.events[r+a]||(e.events[r+a]=n(t=>{e.events[r].reduceRight((e,t)=>(t(e),e),{shared:{},...t})})),e.events[r]=e.events[r]||[],e.events[r].push(t),()=>{let n=e.events[r],o=n.indexOf(t);n.splice(o,1),n.length||(delete e.events[r],e.events[r+a](),delete e.events[r+a])}),u=1e3,l=(e,t)=>{let r=r=>{let n=t(r);n&&e.events[i].push(n)};return s(e,r,o,t=>{let r=e.listen;e.listen=(...n)=>(e.lc||e.active||(e.active=!0,t()),r(...n));let n=e.off;return e.events[i]=[],e.off=()=>{n(),setTimeout(()=>{if(e.active&&!e.lc){for(let t of(e.active=!1,e.events[i]))t();e.events[i]=[]}},u)},()=>{e.listen=r,e.off=n}})},c="undefined"==typeof window,f=(e,t,r,o)=>{let i=(0,n.e)({data:null,error:null,isPending:!0,isRefetching:!1,refetch:e=>a(e)}),a=e=>{let n="function"==typeof o?o({data:i.get().data,error:i.get().error,isPending:i.get().isPending}):o;r(t,{...n,query:{...n?.query,...e?.query},async onSuccess(e){i.set({data:e.data,error:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await n?.onSuccess?.(e)},async onError(e){let{request:t}=e,r="number"==typeof t.retry?t.retry:t.retry?.attempts,o=t.retryAttempt||0;r&&o<r||(i.set({error:e.error,data:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await n?.onError?.(e))},async onRequest(e){let t=i.get();i.set({isPending:null===t.data,data:t.data,error:null,isRefetching:!0,refetch:i.value.refetch}),await n?.onRequest?.(e)}}).catch(e=>{i.set({error:e,data:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch})})};e=Array.isArray(e)?e:[e];let s=!1;for(let t of e)t.subscribe(()=>{c||(s?a():l(i,()=>(setTimeout(()=>{a()},0),s=!0,()=>{i.off(),t.off()})))});return i}},40738:(e,t,r)=>{"use strict";function n(e,t,...r){if((r=r.filter(Boolean)).length>2){let t=r.pop();e+=`one of type ${r.join(", ")}, or ${t}.`}else 2===r.length?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}r.d(t,{A:()=>o,t:()=>i});let o=(e,...t)=>n("Key must be ",e,...t);function i(e,t,...r){return n(`Key for the ${e} algorithm must be `,t,...r)}},41013:(e,t,r)=>{"use strict";r.d(t,{FA:()=>em,zp:()=>ev,vX:()=>ew});var n=r(32959);function o(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function i(e){if("boolean"!=typeof e)throw Error(`boolean expected, not ${e}`)}function a(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function s(e,t,r=""){let n=o(e),i=e?.length,a=void 0!==t;if(!n||a&&i!==t)throw Error((r&&`"${r}" `)+"expected Uint8Array"+(a?` of length ${t}`:"")+", got "+(n?`length=${i}`:`type=${typeof e}`));return e}function u(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function l(e,t){s(e,void 0,"output");let r=t.outputLen;if(e.length<r)throw Error("digestInto() expects output buffer of length at least "+r)}function c(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function f(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function d(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}let p=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0],h="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,y=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function g(e){if(s(e),h)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=y[e[r]];return t}let b={_0:48,_9:57,A:65,F:70,a:97,f:102};function m(e){return e>=b._0&&e<=b._9?e-b._0:e>=b.A&&e<=b.F?e-(b.A-10):e>=b.a&&e<=b.f?e-(b.a-10):void 0}function w(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);if(h)return Uint8Array.fromHex(e);let t=e.length,r=t/2;if(t%2)throw Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let t=0,o=0;t<r;t++,o+=2){let r=m(e.charCodeAt(o)),i=m(e.charCodeAt(o+1));if(void 0===r||void 0===i)throw Error('hex string expected, got non-hex character "'+(e[o]+e[o+1])+'" at index '+o);n[t]=16*r+i}return n}function v(e){if("string"!=typeof e)throw Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function E(...e){let t=0;for(let r=0;r<e.length;r++){let n=e[r];s(n),t+=n.length}let r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){let o=e[t];r.set(o,n),n+=o.length}return r}function S(e,t){if(null==t||"object"!=typeof t)throw Error("options must be defined");return Object.assign(e,t)}function A(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r}let _=(e,t)=>
1{function r(n,...o){if(s(n,void 0,"key"),!p)throw Error("Non little-endian hardware is not yet supported");void 0!==e.nonceLength&&s(o[0],e.varSizeNonce?void 0:e.nonceLength,"nonce");let i=e.tagLength;i&&void 0!==o[1]&&s(o[1],void 0,"AAD");let a=t(n,...o),u=(e,t)=>{if(void 0!==t){if(2!==e)throw Error("cipher output not supported");s(t,void 0,"output")}},l=!1;return{encrypt(e,t){if(l)throw Error("cannot encrypt() twice with same key + nonce");return l=!0,s(e),u(a.encrypt.length,t),a.encrypt(e,t)},decrypt(e,t){if(s(e),i&&e.length<i)throw Error('"ciphertext" expected length bigger than tagLength='+i);return u(a.decrypt.length,t),a.decrypt(e,t)}}}return Object.assign(r,e),r};function O(e,t,r=!0){if(void 0===t)return new Uint8Array(e);if(t.length!==e)throw Error('"output" expected Uint8Array of length '+e+", got: "+t.length);if(r&&!R(t))throw Error("invalid output, must be aligned");return t}function T(e,t,r){i(r);let n=new Uint8Array(16),o=d(n);return o.setBigUint64(0,BigInt(t),r),o.setBigUint64(8,BigInt(e),r),n}function R(e){return e.byteOffset%4==0}function x(e){return Uint8Array.from(e)}function k(e=32){let t="object"==typeof globalThis?globalThis.crypto:null;if("function"!=typeof t?.getRandomValues)throw Error("crypto.getRandomValues must be defined");return t.getRandomValues(new Uint8Array(e))}function j(e,t=k){let{nonceLength:r}=e;a(r);let n=(e,t)=>{let r=E(e,t);return t.fill(0),r};return(o,...i)=>({encrypt(a){s(a);let u=t(r),l=e(o,u,...i).encrypt(a);return l instanceof Promise?l.then(e=>n(u,e)):n(u,l)},decrypt(t){s(t);let n=t.subarray(0,r),a=t.subarray(r);return e(o,n,...i).decrypt(a)}})}let P=e=>Uint8Array.from(e.split(""),e=>e.charCodeAt(0)),D=P("expand 16-byte k"),N=P("expand 32-byte k"),I=c(D),C=c(N);function U(e,t){return e<<t|e>>>32-t}function L(e){return e.byteOffset%4==0}let M=64,W=16,H=0x100000000-1,F=Uint32Array.of();function $(e,t,r,n,o,i,a,s){let u=o.length,l=new Uint8Array(M),f=c(l),d=L(o)&&L(i),p=d?c(o):F,h=d?c(i):F;for(let c=0;c<u;a++){if(e(t,r,n,f,a,s),a>=H)throw Error("arx: counter overflow");let y=Math.min(M,u-c);if(d&&y===M){let e=c/4;if(c%4!=0)throw Error("arx: invalid block position");for(let t=0,r;t<W;t++)h[r=e+t]=p[r]^f[t];c+=M;continue}for(let e=0,t;e<y;e++)i[t=c+e]=o[t]^l[e];c+=y}}function B(e,t){let{allowShortKeys:r,extendNonceFn:n,counterLength:o,counterRight:u,rounds:l}=S({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if("function"!=typeof e)throw Error("core must be a function");return a(o),a(l),i(u),i(r),(t,i,d,p,h=0)=>{let y,g;s(t,void 0,"key"),s(i,void 0,"nonce"),s(d,void 0,"data");let b=d.length;if(void 0===p&&(p=new Uint8Array(b)),s(p,void 0,"output"),a(h),h<0||h>=H)throw Error("arx: counter overflow");if(p.length<b)throw Error(`arx: output (${p.length}) is shorter than data (${b})`);let m=[],w=t.length;if(32===w)m.push(y=x(t)),g=C;else if(16===w&&r)(y=new Uint8Array(32)).set(t),y.set(t,16),g=I,m.push(y);else throw s(t,32,"arx key"),Error("invalid key size");L(i)||m.push(i=x(i));let v=c(y);if(n){if(24!==i.length)throw Error("arx: extended nonce must be 24 bytes");n(g,v,c(i.subarray(0,16)),v),i=i.subarray(16)}let E=16-o;if(E!==i.length)throw Error(`arx: nonce must be ${E} or 16 bytes`);if(12!==E){let e=new Uint8Array(12);e.set(i,u?0:12-i.length),i=e,m.push(i)}return $(e,g,v,c(i),d,p,h,l),f(...m),p}}function K(e,t){return 255&e[t++]|(255&e[t++])<<8}class q{blockLen=16;outputLen=16;buffer=new Uint8Array(16);r=new Uint16Array(10);h=new Uint16Array(10);pad=new Uint16Array(8);pos=0;finished=!1;constructor(e){let t=K(e=x(s(e,32,"key")),0),r=K(e,2),n=K(e,4),o=K(e,6),i=K(e,8),a=K(e,10),u=K(e,12),l=K(e,14);this.r[0]=8191&t,this.r[1]=(t>>>13|r<<3)&8191,this.r[2]=(r>>>10|n<<6)&7939,this.r[3]=(n>>>7|o<<9)&8191,this.r[4]=(o>>>4|i<<12)&255,this.r[5]=i>>>1&8190,this.r[6]=(i>>>14|a<<2)&8191,this.r[7]=(a>>>11|u<<5)&8065,this.r[8]=(u>>>8|l<<8)&8191,this.r[9]=l>>>5&127;for(let t=0;t<8;t++)this.pad[t]=K(e,16+2*t)}process(e,t,r=!1){let n=2048*!r,{h:o,r:i}=this,a=i[0],s=i[1],u=i[2],l=i[3],c=i[4],f=i[5],d=i[6],p=i[7],h=i[8],y=i[9],g=K(e,t+0),b=K(e,t+2),m=K(e,t+4),w=K(e,t+6),v=K(e,t+8),E=K(e,t+10),S=K(e,t+12),A=K(e,t+14),_=o[0]+(8191&g),O=o[1]+((g>>>
113|b<<3)&8191),T=o[2]+((b>>>10|m<<6)&8191),R=o[3]+((m>>>7|w<<9)&8191),x=o[4]+((w>>>4|v<<12)&8191),k=o[5]+(v>>>1&8191),j=o[6]+((v>>>14|E<<2)&8191),P=o[7]+((E>>>11|S<<5)&8191),D=o[8]+((S>>>8|A<<8)&8191),N=o[9]+(A>>>5|n),I=0,C=0+_*a+5*y*O+5*h*T+5*p*R+5*d*x;I=C>>>13,C&=8191,C+=5*f*k+5*c*j+5*l*P+5*u*D+5*s*N,I+=C>>>13,C&=8191;let U=I+_*s+O*a+5*y*T+5*h*R+5*p*x;I=U>>>13,U&=8191,U+=5*d*k+5*f*j+5*c*P+5*l*D+5*u*N,I+=U>>>13,U&=8191;let L=I+_*u+O*s+T*a+5*y*R+5*h*x;I=L>>>13,L&=8191,L+=5*p*k+5*d*j+5*f*P+5*c*D+5*l*N,I+=L>>>13,L&=8191;let M=I+_*l+O*u+T*s+R*a+5*y*x;I=M>>>13,M&=8191,M+=5*h*k+5*p*j+5*d*P+5*f*D+5*c*N,I+=M>>>13,M&=8191;let W=I+_*c+O*l+T*u+R*s+x*a;I=W>>>13,W&=8191,W+=5*y*k+5*h*j+5*p*P+5*d*D+5*f*N,I+=W>>>13,W&=8191;let H=I+_*f+O*c+T*l+R*u+x*s;I=H>>>13,H&=8191,H+=k*a+5*y*j+5*h*P+5*p*D+5*d*N,I+=H>>>13,H&=8191;let F=I+_*d+O*f+T*c+R*l+x*u;I=F>>>13,F&=8191,F+=k*s+j*a+5*y*P+5*h*D+5*p*N,I+=F>>>13,F&=8191;let $=I+_*p+O*d+T*f+R*c+x*l;I=$>>>13,$&=8191,$+=k*u+j*s+P*a+5*y*D+5*h*N,I+=$>>>13,$&=8191;let B=I+_*h+O*p+T*d+R*f+x*c;I=B>>>13,B&=8191,B+=k*l+j*u+P*s+D*a+5*y*N,I+=B>>>13,B&=8191;let q=I+_*y+O*h+T*p+R*d+x*f;I=q>>>13,q&=8191,q+=k*c+j*l+P*u+D*s+N*a,I+=q>>>13,q&=8191,C=8191&(I=(I=(I<<2)+I|0)+C|0),I>>>=13,U+=I,o[0]=C,o[1]=U,o[2]=L,o[3]=M,o[4]=W,o[5]=H,o[6]=F,o[7]=$,o[8]=B,o[9]=q}finalize(){let{h:e,pad:t}=this,r=new Uint16Array(10),n=e[1]>>>13;e[1]&=8191;for(let t=2;t<10;t++)e[t]+=n,n=e[t]>>>13,e[t]&=8191;e[0]+=5*n,n=e[0]>>>13,e[0]&=8191,e[1]+=n,n=e[1]>>>13,e[1]&=8191,e[2]+=n,r[0]=e[0]+5,n=r[0]>>>13,r[0]&=8191;for(let t=1;t<10;t++)r[t]=e[t]+n,n=r[t]>>>13,r[t]&=8191;r[9]-=8192;let o=(1^n)-1;for(let e=0;e<10;e++)r[e]&=o;o=~o;for(let t=0;t<10;t++)e[t]=e[t]&o|r[t];e[0]=(e[0]|e[1]<<13)&65535,e[1]=(e[1]>>>3|e[2]<<10)&65535,e[2]=(e[2]>>>6|e[3]<<7)&65535,e[3]=(e[3]>>>9|e[4]<<4)&65535,e[4]=(e[4]>>>12|e[5]<<1|e[6]<<14)&65535,e[5]=(e[6]>>>2|e[7]<<11)&65535,e[6]=(e[7]>>>5|e[8]<<8)&65535,e[7]=(e[8]>>>8|e[9]<<5)&65535;let i=e[0]+t[0];e[0]=65535&i;for(let r=1;r<8;r++)i=(e[r]+t[r]|0)+(i>>>16)|0,e[r]=65535&i;f(r)}update(e){u(this),s(e);let{buffer:t,blockLen:r}=this,n=(e=x(e)).length;for(let o=0;o<n;){let i=Math.min(r-this.pos,n-o);if(i===r){for(;r<=n-o;o+=r)this.process(e,o);continue}t.set(e.subarray(o,o+i),this.pos),this.pos+=i,o+=i,this.pos===r&&(this.process(t,0,!1),this.pos=0)}return this}destroy(){f(this.h,this.r,this.buffer,this.pad)}digestInto(e){u(this),l(e,this),this.finished=!0;let{buffer:t,h:r}=this,{pos:n}=this;if(n){for(t[n++]=1;n<16;n++)t[n]=0;this.process(t,0,!0)}this.finalize();let o=0;for(let t=0;t<8;t++)e[o++]=r[t]>>>0,e[o++]=r[t]>>>8;return e}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}}let J=function e(e){let t=(t,r)=>e(r).update(t).digest(),r=e(new Uint8Array(32));return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}(e=>new q(e));function V(e,t,r,n,o,i=20){let a=e[0],s=e[1],u=e[2],l=e[3],c=t[0],f=t[1],d=t[2],p=t[3],h=t[4],y=t[5],g=t[6],b=t[7],m=o,w=r[0],v=r[1],E=r[2],S=a,A=s,_=u,O=l,T=c,R=f,x=d,k=p,j=h,P=y,D=g,N=b,I=m,C=w,L=v,M=E;for(let e=0;e<i;e+=2)j=j+(I=U(I^(S=S+T|0),16))|0,S=S+(T=U(T^j,12))|0,j=j+(I=U(I^S,8))|0,T=U(T^j,7),P=P+(C=U(C^(A=A+R|0),16))|0,A=A+(R=U(R^P,12))|0,P=P+(C=U(C^A,8))|0,R=U(R^P,7),D=D+(L=U(L^(_=_+x|0),16))|0,_=_+(x=U(x^D,12))|0,D=D+(L=U(L^_,8))|0,x=U(x^D,7),N=N+(M=U(M^(O=O+k|0),16))|0,O=O+(k=U(k^N,12))|0,N=N+(M=U(M^O,8))|0,k=U(k^N,7),D=D+(M=U(M^(S=S+R|0),16))|0,S=S+(R=U(R^D,12))|0,D=D+(M=U(M^S,8))|0,R=U(R^D,7),N=N+(I=U(I^(A=A+x|0),16))|0,A=A+(x=U(x^N,12))|0,N=N+(I=U(I^A,8))|0,x=U(x^N,7),j=j+(C=U(C^(_=_+k|0),16))|0,_=_+(k=U(k^j,12))|0,j=j+(C=U(C^_,8))|0,k=U(k^j,7),P=P+(L=U(L^(O=O+T|0),16))|0,O=O+(T=U(T^P,12))|0,P=P+(L=U(L^O,8))|0,T=U(T^P,7);let W=0;n[W++]=a+S|0,n[W++]=s+A|0,n[W++]=u+_|0,n[W++]=l+O|0,n[W++]=c+T|0,n[W++]=f+R|0,n[W++]=d+x|0,n[W++]=p+k|0,n[W++]=h+j|0,n[W++]=y+P|0,n[W++]=g+D|0,n[W++]=b+N|0,n[W++]=m+I|0,n[W++]=w+C|0,n[W++]=v+L|0,n[W++]=E+M|0}function z(e,t,r,n){let o=e[0],i=e[1],a=e[2],s=e[3],u=t[0],l=t[1],c=t[2],f=t[3],d=t[4],p=t[5],h=t[6],y=t[7],g=r[0],b=r[1],m=r[2],w=r[3];for(let e=0;e<20;e+=2)d=d+(g=U(g^(o=o+u|0),16))|0,o=o+(u=U(u^d,12))|0,d=d+(g=U(g^o,8))|0,u=U(u^d,7),p=p+(b=U(b^(i=i+l|0),16))|0,i=i+(l=U(l^p,12))|0,p=p+(b=U(b^i,8))|0,l=U(l^p,7),h=h+(m=U(m^(a=a+c|0),16))|0,a=a+(c=U(c^h,
112))|0,h=h+(m=U(m^a,8))|0,c=U(c^h,7),y=y+(w=U(w^(s=s+f|0),16))|0,s=s+(f=U(f^y,12))|0,y=y+(w=U(w^s,8))|0,f=U(f^y,7),h=h+(w=U(w^(o=o+l|0),16))|0,o=o+(l=U(l^h,12))|0,h=h+(w=U(w^o,8))|0,l=U(l^h,7),y=y+(g=U(g^(i=i+c|0),16))|0,i=i+(c=U(c^y,12))|0,y=y+(g=U(g^i,8))|0,c=U(c^y,7),d=d+(b=U(b^(a=a+f|0),16))|0,a=a+(f=U(f^d,12))|0,d=d+(b=U(b^a,8))|0,f=U(f^d,7),p=p+(m=U(m^(s=s+u|0),16))|0,s=s+(u=U(u^p,12))|0,p=p+(m=U(m^s,8))|0,u=U(u^p,7);let v=0;n[v++]=o,n[v++]=i,n[v++]=a,n[v++]=s,n[v++]=g,n[v++]=b,n[v++]=m,n[v++]=w}let G=B(V,{counterRight:!1,counterLength:4,allowShortKeys:!1}),Y=B(V,{counterRight:!1,counterLength:8,extendNonceFn:z,allowShortKeys:!1}),Z=new Uint8Array(16),Q=(e,t)=>{e.update(t);let r=t.length%16;r&&e.update(Z.subarray(r))},X=new Uint8Array(32);function ee(e,t,r,n,o){void 0!==o&&s(o,void 0,"AAD");let i=e(t,r,X),a=T(n.length,o?o.length:0,!0),u=J.create(i);o&&Q(u,o),Q(u,n),u.update(a);let l=u.digest();return f(i,a),l}let et=e=>(t,r,n)=>{let o=16;return{encrypt(i,a){let s=i.length;(a=O(s+o,a,!1)).set(i);let u=a.subarray(0,-o);e(t,r,u,u,1);let l=ee(e,t,r,u,n);return a.set(l,s),f(l),a},decrypt(i,a){a=O(i.length-o,a,!1);let s=i.subarray(0,-o),u=i.subarray(-o),l=ee(e,t,r,s,n);if(!A(u,l))throw Error("invalid tag");return a.set(i.subarray(0,-o)),e(t,r,a,a,1),f(l),a}}};et(G);let er=_({blockSize:64,nonceLength:24,tagLength:16},et(Y));r(31754);var en=r(18233),eo=r(71928),ei=r(9743),ea=r(75191);let es=async(e,t,r)=>{let n=await (0,ea.A)(e,t,"sign");return(0,ei.A)(e,n),new Uint8Array(await crypto.subtle.sign((0,eo.A)(e,n.algorithm),n,r))};var eu=r(80079),el=r(6176),ec=r(35074),ef=r(967),ed=r(74021),ep=r(97613);class eh{#p;#h;#y;constructor(e){if(!(e instanceof Uint8Array))throw TypeError("payload must be an instance of Uint8Array");this.#p=e}setProtectedHeader(e){if(this.#h)throw TypeError("setProtectedHeader can only be called once");return this.#h=e,this}setUnprotectedHeader(e){if(this.#y)throw TypeError("setUnprotectedHeader can only be called once");return this.#y=e,this}async sign(e,t){let r;if(!this.#h&&!this.#y)throw new el.Ye("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!(0,eu.A)(this.#h,this.#y))throw new el.Ye("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let n={...this.#h,...this.#y},o=(0,ed.A)(el.Ye,new Map([["b64",!0]]),t?.crit,this.#h,n),i=!0;if(o.has("b64")&&"boolean"!=typeof(i=this.#h.b64))throw new el.Ye('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:a}=n;
1if("string"!=typeof a||!a)throw new el.Ye('JWS "alg" (Algorithm) Header Parameter missing or invalid');(0,ef.A)(a,e,"sign");let s=this.#p;i&&(s=ec.Rd.encode((0,en.l)(s))),r=this.#h?ec.Rd.encode((0,en.l)(JSON.stringify(this.#h))):ec.Rd.encode("");let u=(0,ec.xW)(r,ec.Rd.encode("."),s),l=await (0,ep.A)(e,a),c=await es(a,l,u),f={signature:(0,en.l)(c),payload:""};return i&&(f.payload=ec.D0.decode(s)),this.#y&&(f.header=this.#y),this.#h&&(f.protected=ec.D0.decode(r)),f}}class ey{#g;constructor(e){this.#g=new eh(e)}setProtectedHeader(e){return this.#g.setProtectedHeader(e),this}async sign(e,t){let r=await this.#g.sign(e,t);if(void 0===r.payload)throw TypeError("use the flattened module for creating JWS with b64: false");return`${r.protected}.${r.payload}.${r.signature}`}}var eg=r(34911);class eb{#h;#b;constructor(e={}){this.#b=new eg.c(e)}setIssuer(e){return this.#b.iss=e,this}setSubject(e){return this.#b.sub=e,this}setAudience(e){return this.#b.aud=e,this}setJti(e){return this.#b.jti=e,this}setNotBefore(e){return this.#b.nbf=e,this}setExpirationTime(e){return this.#b.exp=e,this}setIssuedAt(e){return this.#b.iat=e,this}setProtectedHeader(e){return this.#h=e,this}async sign(e,t){let r=new ey(this.#b.data());if(r.setProtectedHeader(this.#h),Array.isArray(this.#h?.crit)&&this.#h.crit.includes("b64")&&!1===this.#h.b64)throw new el.Dp("JWTs MUST NOT use unencoded payload");return r.sign(e,t)}}async function em(e,t,r=3600){return await new eb(e).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime(Math.floor(Date.now()/1e3)+r).sign(new TextEncoder().encode(t))}r(13176),r(21507),r(90987);let ew=async({key:e,data:t})=>{let r=await (0,n.n)("SHA-256").digest(e),o=v(t);return g(j(er)(new Uint8Array(r)).encrypt(o))},ev=async({key:e,data:t})=>{let r=await (0,n.n)("SHA-256").digest(e),o=w(t),i=j(er)(new Uint8Array(r));return new TextDecoder().decode(i.decrypt(o))}},42241:(e,t,r)=>{"use strict";r.d(t,{e:()=>s});let n=[],o=0,i=4,a=0,s=e=>{let t=[],r={get:()=>(r.lc||r.listen(()=>{})(),r.value),lc:0,listen:e=>(r.lc=t.push(e),()=>{for(let t=o+i;t<n.length;)n[t]===e?n.splice(t,i):t+=i;let a=t.indexOf(e);~a&&(t.splice(a,1),--r.lc||r.off())}),notify(e,s){a++;let u=!n.length;for(let o of t)n.push(o,r.value,e,s);if(u){for(o=0;o<n.length;o+=i)n[o](n[o+1],n[o+2],n[o+3]);n.length=0}},off(){},set(e){let t=r.value;t!==e&&(r.value=e,r.notify(t))},subscribe(e){let t=r.listen(e);return e(r.value),t},value:e};return r}},46630:(e,t,r)=>{"use strict";r.d(t,{B:()=>y,a:()=>h,c:()=>p,f:()=>v,g:()=>m,s:()=>w});var n=r(27414),o=r(77932),i=r(18619),a=r(24611),s=r(2006),u=r(10591),l=r(65046),c=r(31754),f=r(1592);let d=(0,n.Ny)(async()=>({})),p=n.Ny.create({use:[d,(0,n.Ny)(async()=>({}))]}),h=n.UD.create({use:[d]}),y={USER_NOT_FOUND:"User not found",FAILED_TO_CREATE_USER:"Failed to create user",FAILED_TO_CREATE_SESSION:"Failed to create session",FAILED_TO_UPDATE_USER:"Failed to update user",FAILED_TO_GET_SESSION:"Failed to get session",INVALID_PASSWORD:"Invalid password",INVALID_EMAIL:"Invalid email",INVALID_EMAIL_OR_PASSWORD:"Invalid email or password",SOCIAL_ACCOUNT_ALREADY_LINKED:"Social account already linked",PROVIDER_NOT_FOUND:"Provider not found",INVALID_TOKEN:"Invalid token",ID_TOKEN_NOT_SUPPORTED:"id_token not supported",FAILED_TO_GET_USER_INFO:"Failed to get user info",USER_EMAIL_NOT_FOUND:"User email not found",EMAIL_NOT_VERIFIED:"Email not verified",PASSWORD_TOO_SHORT:"Password too short",PASSWORD_TOO_LONG:"Password too long",USER_ALREADY_EXISTS:"User already exists. Use another email.",EMAIL_CAN_NOT_BE_UPDATED:"Email can not be updated",CREDENTIAL_ACCOUNT_NOT_FOUND:"Credential account not found",SESSION_EXPIRED:"Session expired. Re-authenticate to perform this action.",FAILED_TO_UNLINK_LAST_ACCOUNT:"You can't unlink your last account",ACCOUNT_NOT_FOUND:"Account not found",USER_ALREADY_HAS_PASSWORD:"User already has a password. Provide that to delete the account."},g=a.lq(a.Ik({disableCookieCache:s.zM().meta({description:"Disable cookie cache and fetch session from database"}).optional(),disableRefresh:s.zM().meta({description:"Disable session refresh. Useful for checking session status, without updating the session"}).optional()})),b=()=>h("/get-session",{method:"GET",query:g,requireHeaders:!0,metadata:{openapi:{description:"Get the current session",responses:{200:{description:"Success",content:{"application/json":{schema:{type:"object",properties:{session:{$ref:"#/components/schemas/Session"},user:{$ref:"#/components/schemas/User"}},required:["session","user"]}}}}}}}},async e=>{try{let t=await e.getSignedCookie(e.context.authCookies.sessionToken.name,e.context.secret);
1if(!t)return null;let r=e.getCookie(e.context.authCookies.sessionData.name),n=r?(0,u.s)(f.a.decode(c.z.decode(r))):null;if(n&&!await (0,l.s)("SHA-256","base64urlnopad").verify(e.context.secret,JSON.stringify({...n.session,expiresAt:n.expiresAt}),n.signature)){let t=e.context.authCookies.sessionData.name;return e.setCookie(t,"",{maxAge:0}),e.json(null)}let a=await e.getSignedCookie(e.context.authCookies.dontRememberToken.name,e.context.secret);if(n?.session&&e.context.options.session?.cookieCache?.enabled&&!e.query?.disableCookieCache){let t=n.session;if(!(n.expiresAt<Date.now()||t.session.expiresAt<new Date))return e.context.session=t,e.json(t);{let t=e.context.authCookies.sessionData.name;e.setCookie(t,"",{maxAge:0})}}let s=await e.context.internalAdapter.findSession(t);if(e.context.session=s,!s||s.session.expiresAt<new Date)return(0,i.d)(e),s&&await e.context.internalAdapter.deleteSession(s.session.token),e.json(null);if(a||e.query?.disableRefresh)return e.json(s);let d=e.context.sessionConfig.expiresIn,p=e.context.sessionConfig.updateAge;if(s.session.expiresAt.valueOf()-1e3*d+1e3*p<=Date.now()&&(!e.query?.disableRefresh||!e.context.options.session?.disableSessionRefresh)){let t=await e.context.internalAdapter.updateSession(s.session.token,{expiresAt:(0,o.g)(e.context.sessionConfig.expiresIn,"sec"),updatedAt:new Date});if(!t)return(0,i.d)(e),e.json(null,{status:401});let r=(t.expiresAt.valueOf()-Date.now())/1e3;return await (0,i.s)(e,{session:t,user:s.user},!1,{maxAge:r}),e.json({session:t,user:s.user})}return await (0,i.b)(e,s),e.json(s)}catch(t){throw e.context.logger.error("INTERNAL_SERVER_ERROR",t),new n.LG("INTERNAL_SERVER_ERROR",{message:y.FAILED_TO_GET_SESSION})}}),m=async(e,t)=>{if(e.context.session)return e.context.session;let r=await b()({...e,asResponse:!1,headers:e.headers,returnHeaders:!1,query:{...t,...e.query}}).catch(e=>null);return e.context.session=r,r},w=p(async e=>{let t=await m(e);if(!t?.session)throw new n.LG("UNAUTHORIZED");return{session:t}});p(async e=>{let t=await m(e);if(!t?.session&&(e.request||e.headers))throw new n.LG("UNAUTHORIZED");return{session:t}});let v=p(async e=>{let t=await m(e);if(!t?.session)throw new n.LG("UNAUTHORIZED");if(0===e.context.sessionConfig.freshAge)return{session:t};let r=e.context.sessionConfig.freshAge,o=t.session.updatedAt?.valueOf()||t.session.createdAt.valueOf();if(!(Date.now()-o<1e3*r))throw new n.LG("FORBIDDEN",{message:"Session is not fresh"});return{session:t}});h("/revoke-session",{method:"POST",body:a.Ik({token:a.Yj().meta({description:"The token to revoke"})}),use:[w],requireHeaders:!0,metadata:{openapi:{description:"Revoke a single session",requestBody:{content:{"application/json":{schema:{type:"object",properties:{token:{type:"string",description:"The token to revoke"}},required:["token"]}}}},responses:{200:{description:"Success",content:{"application/json":{schema:{type:"object",properties:{status:{type:"boolean",description:"Indicates if the session was revoked successfully"}},required:["status"]}}}}}}}},async e=>{let t=e.body.token,r=await e.context.internalAdapter.findSession(t);if(!r)throw new n.LG("BAD_REQUEST",{message:"Session not found"});if(r.session.userId!==e.context.session.user.id)throw new n.LG("UNAUTHORIZED");try{await e.context.internalAdapter.deleteSession(t)}catch(t){throw e.context.logger.error(t&&"object"==typeof t&&"name"in t?t.name:"",t),new n.LG("INTERNAL_SERVER_ERROR")}return e.json({status:!0})}),h("/revoke-sessions",{method:"POST",use:[w],requireHeaders:!0,metadata:{openapi:{description:"Revoke all sessions for the user",responses:{200:{description:"Success",content:{"application/json":{schema:{type:"object",properties:{status:{type:"boolean",description:"Indicates if all sessions were revoked successfully"}},required:["status"]}}}}}}}},async e=>{try{await e.context.internalAdapter.deleteSessions(e.context.session.user.id)}catch(t){throw e.context.logger.error(t&&"object"==typeof t&&"name"in t?t.name:"",t),new n.LG("INTERNAL_SERVER_ERROR")}return e.json({status:!0})}),h("/revoke-other-sessions",{method:"POST",requireHeaders:!0,use:[w],metadata:{openapi:{description:"Revoke all other sessions for the user except the current one",responses:{200:{description:"Success",content:{"application/json":{schema:{type:"object",properties:{status:{type:"boolean",description:"Indicates if all other sessions were revoked successfully"}},required:["status"]}}}}}}}},async e=>{let t=e.context.session;if(!t.user)throw new n.LG("UNAUTHORIZED");
1let r=(await e.context.internalAdapter.listSessions(t.user.id)).filter(e=>e.expiresAt>new Date).filter(t=>t.token!==e.context.session.session.token);return await Promise.all(r.map(t=>e.context.internalAdapter.deleteSession(t.token))),e.json({status:!0})})},47313:e=>{"use strict";e.exports=JSON.parse('{"name":"dotenv","version":"17.2.2","description":"Loads environment variables from .env file","main":"lib/main.js","types":"lib/main.d.ts","exports":{".":{"types":"./lib/main.d.ts","require":"./lib/main.js","default":"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},"scripts":{"dts-check":"tsc --project tests/types/tsconfig.json","lint":"standard","pretest":"npm run lint && npm run dts-check","test":"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov","prerelease":"npm test","release":"standard-version"},"repository":{"type":"git","url":"git://github.com/motdotla/dotenv.git"},"homepage":"https://github.com/motdotla/dotenv#readme","funding":"https://dotenvx.com","keywords":["dotenv","env",".env","environment","variables","config","settings"],"readmeFilename":"README.md","license":"BSD-2-Clause","devDependencies":{"@types/node":"^18.11.3","decache":"^4.6.2","sinon":"^14.0.1","standard":"^17.0.0","standard-version":"^9.5.0","tap":"^19.2.0","typescript":"^4.8.4"},"engines":{"node":">=12"},"browser":{"fs":false}}')},50569:(e,t,r)=>{"use strict";r.d(t,{ll:()=>c}),r(83859),r(11650),r(38790);var n=r(21507);function o(e){return{authorize(t,r="AND"){let o=!1;for(let[i,a]of Object.entries(t)){let t=e[i];if(!t)return{success:!1,error:`You are not allowed to access resource: ${i}`};if(Array.isArray(a))o=a.every(e=>t.includes(e));else if("object"==typeof a){let e=a;o="OR"===e.connector?e.actions.some(e=>t.includes(e)):e.actions.every(e=>t.includes(e))}else throw new n.B("Invalid access control request");if(o&&"OR"===r)return{success:o};if(!o&&"AND"===r)return{success:!1,error:`unauthorized to access resource "${i}"`}}return o?{success:o}:{success:!1,error:"Not authorized"}},statements:e}}function i(e){return{newRole:e=>o(e),statements:e}}let a=i({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]});a.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),a.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),a.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),r(27414),r(1958),r(46630),r(31754),r(65046),r(68255),r(1592),r(32688);class s{createNewAbortSignal(){if(this.controller){let e=Error("Cancelling existing WebAuthn API call for new one");e.name="AbortError",this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}constructor(){Object.defineProperty(this,"controller",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}}new s;let u=i({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]});u.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),u.newRole({user:[],session:[]}),r(32959),r(41013),r(13176),r(90987),r(57069),r(18619),r(10591),r(61802);let l=!1,c=e=>({id:"one-tap",getActions:(t,r)=>({oneTap:async(r,n)=>{if(l)return void console.warn("A Google One Tap request is already in progress. Please wait.");l=!0;try{if("undefined"==typeof window||!window.document)return void console.warn("Google One Tap is only available in browser environments");let{autoSelect:o,cancelOnTapOutside:i,context:a}=r??{},s=a??e.context??"signin";await f(),await new Promise((a,u)=>{let l=!1,c=e.promptOptions?.baseDelay??1e3,f=e.promptOptions?.maxAttempts??5;window.google?.accounts.id.initialize({client_id:e.clientId,callback:async e=>{l=!0;try{await t("/one-tap/callback",{method:"POST",body:{idToken:e.credential},...r?.fetchOptions,...n}),(!r?.fetchOptions&&!n||r?.callbackURL)&&(window.location.href=r?.callbackURL??"/"),a()}catch(e){console.error("Error during One Tap callback:",e),u(e)}}
1,auto_select:o,cancel_on_tap_outside:i,context:s,...e.additionalOptions});let d=e=>{l||window.google?.accounts.id.prompt(t=>{if(!l){if(t.isDismissedMoment&&t.isDismissedMoment())if(e<f){let t=Math.pow(2,e)*c;setTimeout(()=>d(e+1),t)}else r?.onPromptNotification?.(t);else if(t.isSkippedMoment&&t.isSkippedMoment())if(e<f){let t=Math.pow(2,e)*c;setTimeout(()=>d(e+1),t)}else r?.onPromptNotification?.(t)}})};d(0)})}catch(e){throw console.error("Error during Google One Tap flow:",e),e}finally{l=!1}}}),getAtoms:e=>({})}),f=()=>new Promise(e=>{if(window.googleScriptInitialized)return void e();let t=document.createElement("script");t.src="https://accounts.google.com/gsi/client",t.async=!0,t.defer=!0,t.onload=()=>{window.googleScriptInitialized=!0,e()},document.head.appendChild(t)})},52045:module=>{var __dirname="/";!function(){var __webpack_modules__={950:function(__unused_webpack_module,exports){var indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0;r<e.length;r++)if(e[r]===t)return r;return -1},Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in e)t.push(r);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r<e.length;r++)t(e[r],r,e)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(e,t,r){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch(e){return function(e,t,r){e[t]=r}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e);this.code=e};Script.prototype.runInContext=function(e){if(!(e instanceof Context))throw TypeError("needs a 'context' argument.");var t=document.createElement("iframe");t.style||(t.style={}),t.style.display="none",document.body.appendChild(t);var r=t.contentWindow,n=r.eval,o=r.execScript;!n&&o&&(o.call(r,"null"),n=r.eval),forEach(Object_keys(e),function(t){r[t]=e[t]}
1),forEach(globals,function(t){e[t]&&(r[t]=e[t])});var i=Object_keys(r),a=n.call(r,this.code);return forEach(Object_keys(r),function(t){(t in e||-1===indexOf(i,t))&&(e[t]=r[t])}),forEach(globals,function(t){t in e||defineProp(e,t,r[t])}),document.body.removeChild(t),a},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(e){var t=Script.createContext(e),r=this.runInContext(t);return e&&forEach(Object_keys(t),function(r){e[r]=t[r]}),r},forEach(Object_keys(Script.prototype),function(e){exports[e]=Script[e]=function(t){var r=Script(t);return r[e].apply(r,[].slice.call(arguments,1))}}),exports.isContext=function(e){return e instanceof Context},exports.createScript=function(e){return exports.Script(e)},exports.createContext=Script.createContext=function(e){var t=new Context;return"object"==typeof e&&forEach(Object_keys(e),function(r){t[r]=e[r]}),t}}};"undefined"!=typeof __nccwpck_require__&&(__nccwpck_require__.ab=__dirname+"/");var __nested_webpack_exports__={};__webpack_modules__[950](0,__nested_webpack_exports__),module.exports=__nested_webpack_exports__}()},57069:(e,t,r)=>{"use strict";r.d(t,{a:()=>s,b:()=>c,c:()=>l,g:()=>u});var n=r(11650),o=r(21507);function i(e){try{let t=new URL(e);return"/"!==t.pathname}catch(t){throw new o.B(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function a(e,t="/api/auth"){return i(e)?e:(t=t.startsWith("/")?t:`/${t}`,`${e.replace(/\/+$/,"")}${t}`)}function s(e,t,r){if(e)return a(e,t);let i=n.e.BETTER_AUTH_URL||n.e.NEXT_PUBLIC_BETTER_AUTH_URL||n.e.PUBLIC_BETTER_AUTH_URL||n.e.NUXT_PUBLIC_BETTER_AUTH_URL||n.e.NUXT_PUBLIC_AUTH_URL||("/"!==n.e.BASE_URL?n.e.BASE_URL:void 0);if(i)return a(i,t);let s=r?.headers.get("x-forwarded-host"),l=r?.headers.get("x-forwarded-proto");if(s&&l)return a(`${l}://${s}`,t);if(r){let e=u(r.url);if(!e)throw new o.B("Could not get origin from request. Please provide a valid base URL.");return a(e,t)}if("undefined"!=typeof window&&window.location)return a(window.location.origin,t)}function u(e){try{return new URL(e).origin}catch(e){return null}}function l(e){try{return new URL(e).protocol}catch(e){return null}}function c(e){try{return new URL(e).host}catch(t){return e}}},57556:(e,t,r)=>{"use strict";r.d(t,{_:()=>a});var n=r(18233),o=r(35074),i=r(67888);function a(e){let t;if("string"==typeof e){let r=e.split(".");(3===r.length||5===r.length)&&([t]=r)}else if("object"==typeof e&&e)if("protected"in e)t=e.protected;else throw TypeError("Token does not contain a Protected Header");try{if("string"!=typeof t||!t)throw Error();let e=JSON.parse(o.D0.decode((0,n.D)(t)));if(!(0,i.A)(e))throw Error();return e}catch{throw TypeError("Invalid Token or Protected Header formatting")}}},58228:e=>{var t="/";!function(){"undefined"!=typeof __nccwpck_require__&&(__nccwpck_require__.ab=t+"/");var r={};!function(){var e=r;e.endianness=function(){return"LE"},e.hostname=function(){return"undefined"!=typeof location?location.hostname:""},e.loadavg=function(){return[]},e.uptime=function(){return 0},e.freemem=function(){return Number.MAX_VALUE},e.totalmem=function(){return Number.MAX_VALUE},e.cpus=function(){return[]},e.type=function(){return"Browser"},e.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},e.networkInterfaces=e.getNetworkInterfaces=function(){return{}},e.arch=function(){return"javascript"},e.platform=function(){return"browser"},e.tmpdir=e.tmpDir=function(){return"/tmp"},e.EOL="\n",e.homedir=function(){return"/"}}(),e.exports=r}()},61208:(e,t,r)=>{"use strict";function n(e){return e?.[Symbol.toStringTag]==="CryptoKey"}function o(e){return e?.[Symbol.toStringTag]==="KeyObject"}r.d(t,{Ay:()=>i,D2:()=>o,R7:()=>n});let i=e=>n(e)||o(e)},61379:(e,t,r)=>{"use strict";r.d(t,{g:()=>o});var n=r(19986);let o=e=>(0,n.q)("a-z","A-Z","0-9")(e||32)},61802:(e,t,r)=>{"use strict";function n(e){if(null===e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.iterator in e)&&(!(Symbol.toStringTag in e)||"[object Module]"===Object.prototype.toString.call(e))}function o(e,t,r=".",i){if(!n(t))return o(e,{},r,i);let a=Object.assign({},t);for(let t in e){if("__proto__"===t||"constructor"===t)continue;let s=e[t];null!=s&&(i&&i(a,t,s,r)||(Array.isArray(s)&&Array.isArray(a[t])?a[t]=[...s,...a[t]]:n(s)&&n(a[t])?a[t]=o(s,a[t],(r?`${r}.`:"")+t.toString(),i):a[t]=s))}return a}function i(e){return(...t)=>t.reduce((t,r)=>o(t,r,"",e),{})}r.d(t,{zG:()=>i}),i(),i((e,t,r)=>{if(void 0!==e[t]&&"function"==typeof r)return e[t]=r(e[t]),!0}),i((e,t,r)=>{if(Array.isArray(e[t])&&"function"==typeof r)return e[t]=r(e[t]),!0})},65046:(e,t,r)=>{"use strict";r.d(t,{s:()=>a});var n=r(97946),o=r(13176),i=r(31754);let a=(e="SHA-256",t="none")=>{let r={importKey:async(t,r)=>n.aK.importKey("raw","string"==typeof t?new TextEncoder().encode(t):t,{name:"HMAC",hash:{name:e}},!1,[r]),sign:async(e,a)=>{"string"==typeof e&&(e=await r.importKey(e,"sign"));let s=await n.aK.sign("HMAC",e,"string"==typeof a?new TextEncoder().encode(a):a);return"hex"===t?o.u.encode(s):"base64"===t||"base64url"===t||"base64urlnopad"===t?i.z.encode(s,{padding:"base64urlnopad"!==t}):s},verify:async(e,a,s)=>
1("string"==typeof e&&(e=await r.importKey(e,"verify")),"hex"===t&&(s=o.u.decode(s)),("base64"===t||"base64url"===t||"base64urlnopad"===t)&&(s=await i.K.decode(s)),n.aK.verify("HMAC",e,"string"==typeof s?new TextEncoder().encode(s):s,"string"==typeof a?new TextEncoder().encode(a):a))};return r}},67153:(e,t,r)=>{var n="/",o=r(95146).Buffer,i=r(55036);!function(){var t={992:function(e){e.exports=function(e,r,n){if(e.filter)return e.filter(r,n);if(null==e||"function"!=typeof r)throw TypeError();for(var o=[],i=0;i<e.length;i++)if(t.call(e,i)){var a=e[i];r.call(n,a,i,e)&&o.push(a)}return o};var t=Object.prototype.hasOwnProperty},256:function(e,t,r){"use strict";var n=r(192),o=r(139),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},139:function(e,t,r){"use strict";var n=r(212),o=r(192),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),u=o("%Object.getOwnPropertyDescriptor%",!0),l=o("%Object.defineProperty%",!0),c=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){var t=s(n,a,arguments);return u&&l&&u(t,"length").configurable&&l(t,"length",{value:1+c(0,e.length-(arguments.length-1))}),t};var f=function(){return s(n,i,arguments)};l?l(e.exports,"apply",{value:f}):e.exports.apply=f},181:function(e){"use strict";e.exports=EvalError},545:function(e){"use strict";e.exports=Error},22:function(e){"use strict";e.exports=RangeError},803:function(e){"use strict";e.exports=ReferenceError},182:function(e){"use strict";e.exports=SyntaxError},202:function(e){"use strict";e.exports=TypeError},284:function(e){"use strict";e.exports=URIError},144:function(e){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;e.exports=function(e,n,o){if("[object Function]"!==r.call(n))throw TypeError("iterator must be a function");var i=e.length;if(i===+i)for(var a=0;a<i;a++)n.call(o,e[a],a,e);else for(var s in e)t.call(e,s)&&n.call(o,e[s],s,e)}},136:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",r=Object.prototype.toString,n=Math.max,o="[object Function]",i=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r},a=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r},s=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};e.exports=function(e){var u,l=this;if("function"!=typeof l||r.apply(l)!==o)throw TypeError(t+l);for(var c=a(arguments,1),f=function(){if(this instanceof u){var t=l.apply(this,i(c,arguments));return Object(t)===t?t:this}return l.apply(e,i(c,arguments))},d=n(0,l.length-c.length),p=[],h=0;h<d;h++)p[h]="$"+h;if(u=Function("binder","return function ("+s(p,",")+"){ return binder.apply(this,arguments); }")(f),l.prototype){var y=function(){};y.prototype=l.prototype,u.prototype=new y,y.prototype=null}return u}},212:function(e,t,r){"use strict";var n=r(136);e.exports=Function.prototype.bind||n},192:function(e,t,r){"use strict";var n,o=r(545),i=r(181),a=r(22),s=r(803),u=r(182),l=r(202),c=r(284),f=Function,d=function(e){try{return f('"use strict"; return ('+e+").constructor;")()}catch(e){}},p=Object.getOwnPropertyDescriptor;if(p)try{p({},"")}catch(e){p=null}var h=function(){throw new l},y=p?function(){try{return arguments.callee,h}catch(e){try{return p(arguments,"callee").get}catch(e){return h}}}():h,g=r(115)(),b=r(14)(),m=Object.getPrototypeOf||(b?function(e){return e.__proto__}:null),w={},v="undefined"!=typeof Uint8Array&&m?m(Uint8Array):n,E={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":g&&m?m([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":w,"%AsyncGenerator%":w,"%AsyncGeneratorFunction%":w,"%AsyncIteratorPrototype%":w,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":f,"%GeneratorFunction%":w,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%
1IteratorPrototype%":g&&m?m(m([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&m?m((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&m?m((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&m?m(""[Symbol.iterator]()):n,"%Symbol%":g?Symbol:n,"%SyntaxError%":u,"%ThrowTypeError%":y,"%TypedArray%":v,"%TypeError%":l,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(m)try{null.error}catch(e){var S=m(m(e));E["%Error.prototype%"]=S}var A=function e(t){var r;if("%AsyncFunction%"===t)r=d("async function () {}");else if("%GeneratorFunction%"===t)r=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=d("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&m&&(r=m(o.prototype))}return E[t]=r,r},_={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},O=r(212),T=r(270),R=O.call(Function.call,Array.prototype.concat),x=O.call(Function.apply,Array.prototype.splice),k=O.call(Function.call,String.prototype.replace),j=O.call(Function.call,String.prototype.slice),P=O.call(Function.call,RegExp.prototype.exec),D=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,I=function(e){var t=j(e,0,1),r=j(e,-1);if("%"===t&&"%"!==r)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new u("invalid intrinsic syntax, expected opening `%`");var n=[];return k(e,D,function(e,t,r,o){n[n.length]=r?k(o,N,"$1"):t||e}),n},C=function(e,t){var r,n=e;if(T(_,n)&&(n="%"+(r=_[n])[0]+"%"),T(E,n)){var o=E[n];if(o===w&&(o=A(n)),void 0===o&&!t)throw new l("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new u("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new l('"allowMissing" argument must be a boolean');if(null===P(/^%?[^%]*%?$/,e))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=I(e),n=r.length>0?r[0]:"",o=C("%"+n+"%",t),i=o.name,a=o.value,s=!1,c=o.alias;c&&(n=c[0],x(r,R([0,1],c)));for(var f=1,d=!0;f<r.length;f+=1){var h=r[f],y=j(h,0,1),g=j(h,-1);if(('"'===y||"'"===y||"`"===y||'"'===g||"'"===g||"`"===g)&&y!==g)throw new u("property names with quotes must have matching quotes");if("constructor"!==h&&d||(s=!0),n+="."+h,T(E,i="%"+n+"%"))a=E[i];
1else if(null!=a){if(!(h in a)){if(!t)throw new l("base intrinsic for "+e+" exists, but the property is not available.");return}if(p&&f+1>=r.length){var b=p(a,h);a=(d=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:a[h]}else d=T(a,h),a=a[h];d&&!s&&(E[i]=a)}}return a}},14:function(e){"use strict";var t={__proto__:null,foo:{}},r=Object;e.exports=function(){return({__proto__:t}).foo===t.foo&&!(t instanceof r)}},942:function(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(773);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},773:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;var n=42;for(t in e[t]=n,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(i.value!==n||!0!==i.enumerable)return!1}return!0}},115:function(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(832);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},832:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;var n=42;for(t in e[t]=n,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(i.value!==n||!0!==i.enumerable)return!1}return!0}},270:function(e,t,r){"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty;e.exports=r(212).call(n,o)},782:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},157:function(e){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,r=Object.prototype.toString,n=function(e){return(!t||!e||"object"!=typeof e||!(Symbol.toStringTag in e))&&"[object Arguments]"===r.call(e)},o=function(e){return!!n(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==r.call(e)&&"[object Function]"===r.call(e.callee)},i=function(){return n(arguments)}();n.isLegacyArguments=o,e.exports=i?n:o},391:function(e){"use strict";var t=Object.prototype.toString,r=Function.prototype.toString,n=/^\s*(?:function)?\*/,o="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,i=Object.getPrototypeOf,a=function(){if(!o)return!1;try{return Function("return function*() {}")()}catch(e){}}(),s=a?i(a):{};e.exports=function(e){return"function"==typeof e&&(!!n.test(r.call(e))||(o?i(e)===s:"[object GeneratorFunction]"===t.call(e)))}},994:function(e,t,n){"use strict";var o=n(144),i=n(349),a=n(256),s=a("Object.prototype.toString"),u=n(942)()&&"symbol"==typeof Symbol.toStringTag,l=i(),c=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return -1},f=a("String.prototype.slice"),d={},p=n(24),h=Object.getPrototypeOf;u&&p&&h&&o(l,function(e){var t=new r.g[e];
1if(!(Symbol.toStringTag in t))throw EvalError("this engine has support for Symbol.toStringTag, but "+e+" does not have the property! Please report this.");var n=h(t),o=p(n,Symbol.toStringTag);o||(o=p(h(n),Symbol.toStringTag)),d[e]=o.get});var y=function(e){var t=!1;return o(d,function(r,n){if(!t)try{t=r.call(e)===n}catch(e){}}),t};e.exports=function(e){return!!e&&"object"==typeof e&&(u?!!p&&y(e):c(l,f(s(e),8,-1))>-1)}},369:function(e){e.exports=function(e){return e instanceof o}},584:function(e,t,r){"use strict";var n=r(157),o=r(391),i=r(490),a=r(994);function s(e){return e.call.bind(e)}var u="undefined"!=typeof BigInt,l="undefined"!=typeof Symbol,c=s(Object.prototype.toString),f=s(Number.prototype.valueOf),d=s(String.prototype.valueOf),p=s(Boolean.prototype.valueOf);if(u)var h=s(BigInt.prototype.valueOf);if(l)var y=s(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function b(e){return"[object Map]"===c(e)}function m(e){return"[object Set]"===c(e)}function w(e){return"[object WeakMap]"===c(e)}function v(e){return"[object WeakSet]"===c(e)}function E(e){return"[object ArrayBuffer]"===c(e)}function S(e){return"undefined"!=typeof ArrayBuffer&&(E.working?E(e):e instanceof ArrayBuffer)}function A(e){return"[object DataView]"===c(e)}function _(e){return"undefined"!=typeof DataView&&(A.working?A(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=o,t.isTypedArray=a,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||_(e)},t.isUint8Array=function(e){return"Uint8Array"===i(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===i(e)},t.isUint16Array=function(e){return"Uint16Array"===i(e)},t.isUint32Array=function(e){return"Uint32Array"===i(e)},t.isInt8Array=function(e){return"Int8Array"===i(e)},t.isInt16Array=function(e){return"Int16Array"===i(e)},t.isInt32Array=function(e){return"Int32Array"===i(e)},t.isFloat32Array=function(e){return"Float32Array"===i(e)},t.isFloat64Array=function(e){return"Float64Array"===i(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===i(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===i(e)},b.working="undefined"!=typeof Map&&b(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(b.working?b(e):e instanceof Map)},m.working="undefined"!=typeof Set&&m(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(m.working?m(e):e instanceof Set)},w.working="undefined"!=typeof WeakMap&&w(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(w.working?w(e):e instanceof WeakMap)},v.working="undefined"!=typeof WeakSet&&v(new WeakSet),t.isWeakSet=function(e){return v(e)},E.working="undefined"!=typeof ArrayBuffer&&E(new ArrayBuffer),t.isArrayBuffer=S,A.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&A(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=_;var O="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function T(e){return"[object SharedArrayBuffer]"===c(e)}function R(e){return void 0!==O&&(void 0===T.working&&(T.working=T(new O)),T.working?T(e):e instanceof O)}function x(e){return g(e,f)}function k(e){return g(e,d)}function j(e){return g(e,p)}function P(e){return u&&g(e,h)}function D(e){return l&&g(e,y)}t.isSharedArrayBuffer=R,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===c(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===c(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===c(e)},t.isGeneratorObject=function(e){return"[object Generator]"===c(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===c(e)},t.isNumberObject=x,t.isStringObject=k,t.isBooleanObject=j,t.isBigIntObject=P,t.isSymbolObject=D,t.isBoxedPrimitive=function(e){return x(e)||k(e)||j(e)||P(e)||D(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(S(e)||R(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw Error(e+" is not supported in userland")}})})},177:function(e,t,r){var n=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},o=/%[sdj%]/g;t.format=function(e){if(!A(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(l(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,i=n.length,a=String(e).replace(o,function(e){if("%%"===e)return"%";if(r>=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),s=n[r];r<i;s=n[++r])E(s)||!T(s)?a+=" "+s:a+=" "+l(s);return a},t.deprecate=function(e,r){if(void 0!==i&&!0===i.noDeprecation)return e;if(void 0===i)return function(){return t.deprecate(e,r).apply(this,arguments)};var n=!1;
1return function(){if(!n){if(i.throwDeprecation)throw Error(r);i.traceDeprecation?console.trace(r):console.error(r),n=!0}return e.apply(this,arguments)}};var a={},s=/^$/;if(i.env.NODE_DEBUG){var u=i.env.NODE_DEBUG;s=RegExp("^"+(u=u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase())+"$","i")}function l(e,r){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),v(r)?n.showHidden=r:r&&t._extend(n,r),_(n.showHidden)&&(n.showHidden=!1),_(n.depth)&&(n.depth=2),_(n.colors)&&(n.colors=!1),_(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),p(n,e,n.depth)}function c(e,t){var r=l.styles[t];return r?"\x1b["+l.colors[r][0]+"m"+e+"\x1b["+l.colors[r][1]+"m":e}function f(e,t){return e}function d(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function p(e,r,n){if(e.customInspect&&r&&k(r.inspect)&&r.inspect!==t.inspect&&!(r.constructor&&r.constructor.prototype===r)){var o,i=r.inspect(n,e);return A(i)||(i=p(e,i,n)),i}var a=h(e,r);if(a)return a;var s=Object.keys(r),u=d(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),x(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return y(r);if(0===s.length){if(k(r)){var l=r.name?": "+r.name:"";return e.stylize("[Function"+l+"]","special")}if(O(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(R(r))return e.stylize(Date.prototype.toString.call(r),"date");if(x(r))return y(r)}var c="",f=!1,v=["{","}"];if(w(r)&&(f=!0,v=["[","]"]),k(r)&&(c=" [Function"+(r.name?": "+r.name:"")+"]"),O(r)&&(c=" "+RegExp.prototype.toString.call(r)),R(r)&&(c=" "+Date.prototype.toUTCString.call(r)),x(r)&&(c=" "+y(r)),0===s.length&&(!f||0==r.length))return v[0]+c+v[1];if(n<0)if(O(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");else return e.stylize("[Object]","special");return e.seen.push(r),o=f?g(e,r,n,u,s):s.map(function(t){return b(e,r,n,u,t,f)}),e.seen.pop(),m(o,c,v)}function h(e,t){if(_(t))return e.stylize("undefined","undefined");if(A(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return S(t)?e.stylize(""+t,"number"):v(t)?e.stylize(""+t,"boolean"):E(t)?e.stylize("null","null"):void 0}function y(e){return"["+Error.prototype.toString.call(e)+"]"}function g(e,t,r,n,o){for(var i=[],a=0,s=t.length;a<s;++a)I(t,String(a))?i.push(b(e,t,r,n,String(a),!0)):i.push("");return o.forEach(function(o){o.match(/^\d+$/)||i.push(b(e,t,r,n,o,!0))}),i}function b(e,t,r,n,o,i){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),I(n,o)||(a="["+o+"]"),!s&&(0>e.seen.indexOf(u.value)?(s=E(r)?p(e,u.value,null):p(e,u.value,r-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),_(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function m(e,t,r){var n=0;return e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function w(e){return Array.isArray(e)}function v(e){return"boolean"==typeof e}function E(e){return null===e}function S(e){return"number"==typeof e}function A(e){return"string"==typeof e}function _(e){return void 0===e}function O(e){return T(e)&&"[object RegExp]"===j(e)}function T(e){return"object"==typeof e&&null!==e}function R(e){return T(e)&&"[object Date]"===j(e)}function x(e){return T(e)&&("[object Error]"===j(e)||e instanceof Error)}function k(e){return"function"==typeof e}function j(e){return Object.prototype.toString.call(e)}function P(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(!a[e=e.toUpperCase()])if(s.test(e)){var r=i.pid;a[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else a[e]=function(){};return a[e]},t.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(584),t.isArray=w,t.isBoolean=v,t.isNull=E,t.isNullOrUndefined=function(e){return null==e}
1,t.isNumber=S,t.isString=A,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=_,t.isRegExp=O,t.types.isRegExp=O,t.isObject=T,t.isDate=R,t.types.isDate=R,t.isError=x,t.types.isNativeError=x,t.isFunction=k,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(369);var D=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function N(){var e=new Date,t=[P(e.getHours()),P(e.getMinutes()),P(e.getSeconds())].join(":");return[e.getDate(),D[e.getMonth()],t].join(" ")}function I(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",N(),t.format.apply(t,arguments))},t.inherits=r(782),t._extend=function(e,t){if(!t||!T(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var C="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function U(e,t){if(!e){var r=Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw TypeError('The "original" argument must be of type Function');if(C&&e[C]){var t=e[C];if("function"!=typeof t)throw TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,C,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise(function(e,n){t=e,r=n}),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push(function(e,n){e?r(e):t(n)});try{e.apply(this,o)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),C&&Object.defineProperty(t,C,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,n(e))},t.promisify.custom=C,t.callbackify=function(e){if("function"!=typeof e)throw TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var n=t.pop();if("function"!=typeof n)throw TypeError("The last argument must be of type Function");var o=this,a=function(){return n.apply(o,arguments)};e.apply(this,t).then(function(e){i.nextTick(a.bind(null,null,e))},function(e){i.nextTick(U.bind(null,e,a))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,n(e)),t}},490:function(e,t,n){"use strict";var o=n(144),i=n(349),a=n(256),s=a("Object.prototype.toString"),u=n(942)()&&"symbol"==typeof Symbol.toStringTag,l=i(),c=a("String.prototype.slice"),f={},d=n(24),p=Object.getPrototypeOf;u&&d&&p&&o(l,function(e){if("function"==typeof r.g[e]){var t=new r.g[e];if(!(Symbol.toStringTag in t))throw EvalError("this engine has support for Symbol.toStringTag, but "+e+" does not have the property! Please report this.");var n=p(t),o=d(n,Symbol.toStringTag);o||(o=d(p(n),Symbol.toStringTag)),f[e]=o.get}});var h=function(e){var t=!1;return o(f,function(r,n){if(!t)try{var o=r.call(e);o===n&&(t=o)}catch(e){}}),t},y=n(994);e.exports=function(e){return!!y(e)&&(u?h(e):c(s(e),8,-1))}},349:function(e,t,n){"use strict";var o=n(992);e.exports=function(){return o(["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],function(e){return"function"==typeof r.g[e]})}},24:function(e,t,r){"use strict";var n=r(192)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n}},a={};function s(e){var r=a[e];if(void 0!==r)return r.exports;var n=a[e]={exports:{}},o=!0;try{t[e](n,n.exports,s),o=!1}finally{o&&delete a[e]}return n.exports}s.ab=n+"/",e.exports=s(177)}()},67888:(e,t,r)=>{"use strict";function n(e){return"object"==typeof e&&null!==e}r.d(t,{A:()=>o});let o=e=>{if(!n(e)||"[object Object]"!==Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}},68255:(e,t,r)=>{"use strict";r.d(t,{a:()=>u});let n=["info","success","warn","error","debug"];function o(e,t){return n.indexOf(t)<=n.indexOf(e)}let i={reset:"\x1b[0m",bright:"\x1b[1m",dim:"\x1b[2m",fg:{red:"\x1b[31m",green:"\x1b[32m",
1yellow:"\x1b[33m",blue:"\x1b[34m",magenta:"\x1b[35m"}},a={info:i.fg.blue,success:i.fg.green,warn:i.fg.yellow,error:i.fg.red,debug:i.fg.magenta},s=(e,t)=>{let r=new Date().toISOString();return`${i.dim}${r}${i.reset} ${a[e]}${e.toUpperCase()}${i.reset} ${i.bright}[Better Auth]:${i.reset} ${t}`},u=(e=>{let t=e?.disabled!==!0,r=e?.level??"error",i=(n,i,a=[])=>{if(!t||!o(r,n))return;let u=s(n,i);if(!e||"function"!=typeof e.log)return void("error"===n?console.error(u,...a):"warn"===n?console.warn(u,...a):console.log(u,...a));e.log("success"===n?"info":n,i,...a)};return{...Object.fromEntries(n.map(e=>[e,(...[t,...r])=>i(e,t,r)])),get level(){return r}}})()},71928:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(6176);let o=(e,t)=>{let r=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:r,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:r,name:"RSA-PSS",saltLength:parseInt(e.slice(-3),10)>>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};
1case"Ed25519":case"EdDSA":return{name:"Ed25519"};case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":return{name:e};default:throw new n.T0(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}},74021:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(6176);let o=(e,t,r,o,i)=>{let a;if(void 0!==i.crit&&o?.crit===void 0)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!o||void 0===o.crit)return new Set;if(!Array.isArray(o.crit)||0===o.crit.length||o.crit.some(e=>"string"!=typeof e||0===e.length))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');for(let s of(a=void 0!==r?new Map([...Object.entries(r),...t.entries()]):t,o.crit)){if(!a.has(s))throw new n.T0(`Extension Header Parameter "${s}" is not recognized`);if(void 0===i[s])throw new e(`Extension Header Parameter "${s}" is missing`);if(a.get(s)&&void 0===o[s])throw new e(`Extension Header Parameter "${s}" MUST be integrity protected`)}return new Set(o.crit)}},75191:(e,t,r)=>{"use strict";function n(e,t="algorithm.name"){return TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function o(e,t){return e.name===t}function i(e){return parseInt(e.name.slice(4),10)}function a(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw Error("unreachable")}}function s(e,t){if(t&&!e.usages.includes(t))throw TypeError(`CryptoKey does not support this operation, its usages must include ${t}.`)}function u(e,t,r){switch(t){case"HS256":case"HS384":case"HS512":{if(!o(e.algorithm,"HMAC"))throw n("HMAC");let r=parseInt(t.slice(2),10);if(i(e.algorithm.hash)!==r)throw n(`SHA-${r}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!o(e.algorithm,"RSASSA-PKCS1-v1_5"))throw n("RSASSA-PKCS1-v1_5");let r=parseInt(t.slice(2),10);if(i(e.algorithm.hash)!==r)throw n(`SHA-${r}`,"algorithm.hash");break}
1case"PS256":case"PS384":case"PS512":{if(!o(e.algorithm,"RSA-PSS"))throw n("RSA-PSS");let r=parseInt(t.slice(2),10);if(i(e.algorithm.hash)!==r)throw n(`SHA-${r}`,"algorithm.hash");break}case"Ed25519":case"EdDSA":if(!o(e.algorithm,"Ed25519"))throw n("Ed25519");break;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":if(!o(e.algorithm,t))throw n(t);break;case"ES256":case"ES384":case"ES512":{if(!o(e.algorithm,"ECDSA"))throw n("ECDSA");let r=a(t);if(e.algorithm.namedCurve!==r)throw n(r,"algorithm.namedCurve");break}default:throw TypeError("CryptoKey does not support this operation")}s(e,r)}r.d(t,{A:()=>c});var l=r(40738);let c=async(e,t,r)=>{if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw TypeError((0,l.A)(t,"CryptoKey","KeyObject","JSON Web Key"));return crypto.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}return u(t,e,r),t}},77932:(e,t,r)=>{"use strict";r.d(t,{g:()=>n});let n=(e,t="ms")=>new Date(Date.now()+("sec"===t?1e3*e:e))},79907:(e,t,r)=>{"use strict";var n=r(92139).Buffer,o=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;if(!e)return"utf8";for(;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function a(e){var t=i(e);if("string"!=typeof t&&(n.isEncoding===o||!o(e)))throw Error("Unknown encoding: "+e);return t||e}function s(e){var t;switch(this.encoding=a(e),this.encoding){case"utf16le":this.text=h,this.end=y,t=4;break;case"utf8":this.fillLast=f,t=4;break;case"base64":this.text=g,this.end=b,t=3;break;default:this.write=m,this.end=w;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function u(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function l(e,t,r){var n=t.length-1;if(n<r)return 0;var o=u(t[n]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--n<r||-2===o?0:(o=u(t[n]))>=0?(o>0&&(e.lastNeed=o-2),o):--n<r||-2===o?0:(o=u(t[n]))>=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}function c(e,t,r){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}function f(e){var t=this.lastTotal-this.lastNeed,r=c(this,e,t);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function d(e,t){var r=l(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function p(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function h(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function y(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function g(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function b(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function m(e){return e.toString(this.encoding)}function w(e){return e&&e.length?this.write(e):""}t.StringDecoder=s,s.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=p,s.prototype.text=d,s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},80079:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(...e)=>{let t,r=e.filter(Boolean);if(0===r.length||1===r.length)return!0;for(let e of r){let r=Object.keys(e);if(!t||0===t.size){t=new Set(r);continue}for(let e of r){if(t.has(e))return!1;t.add(e)}}return!0}},81350:(e,t,r)=>{var n=r(55036),o=r(95146).Buffer;let i=r(54136),a=r(20951),s=r(58228),u=r(5265),l=r(47313).version,c=["\uD83D\uDD10 encrypt with Dotenvx: https://dotenvx.com","\uD83D\uDD10 prevent committing .env to code: https://dotenvx.com/precommit","\uD83D\uDD10 prevent building .env in docker: https://dotenvx.com/prebuild","\uD83D\uDCE1 observe env with Radar: https://dotenvx.com/radar","\uD83D\uDCE1 auto-backup env with Radar: https://dotenvx.com/radar","\uD83D\uDCE1 ver
1sion env with Radar: https://dotenvx.com/radar","\uD83D\uDEE0ï¸ run anywhere with `dotenvx run -- yourcommand`","âï¸ specify custom .env file path with { path: '/custom/path/.env' }","âï¸ enable debug logging with { debug: true }","âï¸ override existing env vars with { override: true }","âï¸ suppress all logs with { quiet: true }","âï¸ write to custom object with { processEnv: myObject }","âï¸ load multiple .env files with { path: ['.env.local', '.env'] }"];function f(){return c[Math.floor(Math.random()*c.length)]}function d(e){return"string"==typeof e?!["false","0","no","off",""].includes(e.toLowerCase()):!!e}function p(){return n.stdout.isTTY}function h(e){return p()?`\x1b[2m${e}\x1b[0m`:e}let y=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function g(e){console.error(`[dotenv@${l}][WARN] ${e}`)}function b(e){console.log(`[dotenv@${l}][DEBUG] ${e}`)}function m(e){console.log(`[dotenv@${l}] ${e}`)}function w(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:n.env.DOTENV_KEY&&n.env.DOTENV_KEY.length>0?n.env.DOTENV_KEY:""}function v(e,t){let r;try{r=new URL(t)}catch(e){if("ERR_INVALID_URL"===e.code){let e=Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:[email protected]/vault/.env.vault?environment=development");throw e.code="INVALID_DOTENV_KEY",e}throw e}let n=r.password;if(!n){let e=Error("INVALID_DOTENV_KEY: Missing key part");throw e.code="INVALID_DOTENV_KEY",e}let o=r.searchParams.get("environment");if(!o){let e=Error("INVALID_DOTENV_KEY: Missing environment part");throw e.code="INVALID_DOTENV_KEY",e}let i=`DOTENV_VAULT_${o.toUpperCase()}`,a=e.parsed[i];
1if(!a){let e=Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${i} in your .env.vault file.`);throw e.code="NOT_FOUND_DOTENV_ENVIRONMENT",e}return{ciphertext:a,key:n}}function E(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)i.existsSync(r)&&(t=r.endsWith(".vault")?r:`${r}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=a.resolve(n.cwd(),".env.vault");return i.existsSync(t)?t:null}function S(e){return"~"===e[0]?a.join(s.homedir(),e.slice(1)):e}let A={configDotenv:function(e){let t,r=a.resolve(n.cwd(),".env"),o="utf8",s=n.env;e&&null!=e.processEnv&&(s=e.processEnv);let u=d(s.DOTENV_CONFIG_DEBUG||e&&e.debug),l=d(s.DOTENV_CONFIG_QUIET||e&&e.quiet);e&&e.encoding?o=e.encoding:u&&b("No encoding is specified. UTF-8 is used by default");let c=[r];if(e&&e.path)if(Array.isArray(e.path))for(let t of(c=[],e.path))c.push(S(t));else c=[S(e.path)];let p={};for(let r of c)try{let t=A.parse(i.readFileSync(r,{encoding:o}));A.populate(p,t,e)}catch(e){u&&b(`Failed to load ${r} ${e.message}`),t=e}let y=A.populate(s,p,e);if(u=d(s.DOTENV_CONFIG_DEBUG||u),l=d(s.DOTENV_CONFIG_QUIET||l),u||!l){let e=Object.keys(y).length,r=[];for(let e of c)try{let t=a.relative(n.cwd(),e);r.push(t)}catch(r){u&&b(`Failed to load ${e} ${r.message}`),t=r}m(`injecting env (${e}) from ${r.join(",")} ${h(`-- tip: ${f()}`)}`)}return t?{parsed:p,error:t}:{parsed:p}},_configVault:function(e){let t=d(n.env.DOTENV_CONFIG_DEBUG||e&&e.debug),r=d(n.env.DOTENV_CONFIG_QUIET||e&&e.quiet);(t||!r)&&m("Loading env from encrypted .env.vault");let o=A._parseVault(e),i=n.env;return e&&null!=e.processEnv&&(i=e.processEnv),A.populate(i,o,e),{parsed:o}},_parseVault:function(e){let t,r=E(e=e||{});e.path=r;let n=A.configDotenv(e);if(!n.parsed){let e=Error(`MISSING_DATA: Cannot parse ${r} for an unknown reason`);throw e.code="MISSING_DATA",e}let o=w(e).split(","),i=o.length;for(let e=0;e<i;e++)try{let r=o[e].trim(),i=v(n,r);t=A.decrypt(i.ciphertext,i.key);break}catch(t){if(e+1>=i)throw t}return A.parse(t)},config:function(e){if(0===w(e).length)return A.configDotenv(e);let t=E(e);return t?A._configVault(e):(g(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),A.configDotenv(e))},decrypt:function(e,t){let r=o.from(t.slice(-64),"hex"),n=o.from(e,"base64"),i=n.subarray(0,12),a=n.subarray(-16);n=n.subarray(12,-16);try{let e=u.createDecipheriv("aes-256-gcm",r,i);return e.setAuthTag(a),`${e.update(n)}${e.final()}`}catch(n){let e=n instanceof RangeError,t="Invalid key length"===n.message,r="Unsupported state or unable to authenticate data"===n.message;if(e||t){let e=Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw e.code="INVALID_DOTENV_KEY",e}if(r){let e=Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw e.code="DECRYPTION_FAILED",e}throw n}},parse:function(e){let t,r={},n=e.toString();for(n=n.replace(/\r\n?/mg,"\n");null!=(t=y.exec(n));){let e=t[1],n=t[2]||"",o=(n=n.trim())[0];n=n.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),'"'===o&&(n=(n=n.replace(/\\n
1/g,"\n")).replace(/\\r/g,"\r")),r[e]=n}return r},populate:function(e,t,r={}){let n=!!(r&&r.debug),o=!!(r&&r.override),i={};if("object"!=typeof t){let e=Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw e.code="OBJECT_REQUIRED",e}for(let r of Object.keys(t))Object.prototype.hasOwnProperty.call(e,r)?(!0===o&&(e[r]=t[r],i[r]=t[r]),n&&(!0===o?b(`"${r}" is already defined and WAS overwritten`):b(`"${r}" is already defined and was NOT overwritten`))):(e[r]=t[r],i[r]=t[r]);return i}};e.exports.configDotenv=A.configDotenv,e.exports._configVault=A._configVault,e.exports._parseVault=A._parseVault,e.exports.config=A.config,e.exports.decrypt=A.decrypt,e.exports.parse=A.parse,e.exports.populate=A.populate,e.exports=A},83859:(e,t,r)=>{"use strict";r.d(t,{Hy:()=>I,zZ:()=>U});var n=Object.defineProperty,o=Object.defineProperties,i=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,l=(e,t,r)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,c=(e,t)=>{for(var r in t||(t={}))s.call(t,r)&&l(e,r,t[r]);if(a)for(var r of a(t))u.call(t,r)&&l(e,r,t[r]);return e},f=(e,t)=>o(e,i(t)),d=class extends Error{constructor(e,t,r){super(t||e.toString(),{cause:r}),this.status=e,this.statusText=t,this.error=r}},p=async(e,t)=>{var r,n,o,i,a,s;let u=t||{},l={onRequest:[null==t?void 0:t.onRequest],onResponse:[null==t?void 0:t.onResponse],onSuccess:[null==t?void 0:t.onSuccess],onError:[null==t?void 0:t.onError],onRetry:[null==t?void 0:t.onRetry]};if(!t||!(null==t?void 0:t.plugins))return{url:e,options:u,hooks:l};for(let c of(null==t?void 0:t.plugins)||[]){if(c.init){let n=await (null==(r=c.init)?void 0:r.call(c,e.toString(),t));u=n.options||u,e=n.url}l.onRequest.push(null==(n=c.hooks)?void 0:n.onRequest),l.onResponse.push(null==(o=c.hooks)?void 0:o.onResponse),l.onSuccess.push(null==(i=c.hooks)?void 0:i.onSuccess),l.onError.push(null==(a=c.hooks)?void 0:a.onError),l.onRetry.push(null==(s=c.hooks)?void 0:s.onRetry)}return{url:e,options:u,hooks:l}},h=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},y=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function g(e){if("number"==typeof e)return new h({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new h(e);case"exponential":return new y(e);default:throw Error("Invalid retry strategy")}}var b=async e=>{let t={},r=async e=>"function"==typeof e?await e():e;if(null==e?void 0:e.auth){if("Bearer"===e.auth.type){let n=await r(e.auth.token);if(!n)return t;t.authorization=`Bearer ${n}`}else if("Basic"===e.auth.type){let n=r(e.auth.username),o=r(e.auth.password);if(!n||!o)return t;t.authorization=`Basic ${btoa(`${n}:${o}`)}`}else if("Custom"===e.auth.type){let n=r(e.auth.value);if(!n)return t;t.authorization=`${r(e.auth.prefix)} ${n}`}}return t},m=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function w(e){let t=e.headers.get("content-type"),r=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";let n=t.split(";").shift()||"";return m.test(n)?"json":r.has(n)||n.startsWith("text/")?"text":"blob"}function v(e){try{return JSON.parse(e),!0}catch(e){return!1}}function E(e){if(void 0===e)return!1;let t=typeof e;return"string"===t||"number"===t||"boolean"===t||null===t||"object"===t&&(!!Array.isArray(e)||!e.buffer&&(e.constructor&&"Object"===e.constructor.name||"function"==typeof e.toJSON))}function S(e){try{return JSON.parse(e)}catch(t){return e}}function A(e){return"function"==typeof e}function _(e){if(null==e?void 0:e.customFetchImpl)return e.customFetchImpl;if("undefined"!=typeof globalThis&&A(globalThis.fetch))return globalThis.fetch;if("undefined"!=typeof window&&A(window.fetch))return window.fetch;throw Error("No fetch implementation found")}async function O(e){let t=new Headers(null==e?void 0:e.headers);for(let[r,n]of Object.entries(await b(e)||{}))t.set(r,n);if(!t.has("content-type")){let r=T(null==e?void 0:e.body);r&&t.set("content-type",r)}return t}function T(e){return E(e)?"application/json":null}function R(e){if(!(null==e?void 0:e.body))return null;let t=new Headers(null==e?void 0:e.headers);if(E(e.body)&&!t.has("content-type")){for(let[t,r]of Object.entries(null==e?void 0:e.body))r instanceof Date&&(e.body[t]=r.toISOString());return JSON.stringify(e.body)}return e.body}function x(e,t){var r;if(null==t?void 0:t.method)return t.method.toUpperCase();if(e.startsWith("@")){let n=null==(r=e.split("@")[1])?void 0:r.split("/")[0];return D.includes(n)?n.toUpperCase():(null==t?void 0:t.body)?"POST":"GET"}return(null==t?void 0:t.body)?"POST":"GET"}function k(e,t){let r;return!(null==e?void 0:e.signal)&&(null==e?void 0:e.timeout)&&(r=setTimeout(()=>null==t?void 0:t.abort(),null==e?void 0:e.timeout)),{abortTimeout:r,clearTimeout:()=>{r&&clearTimeout(r)}}}
1var j=class e extends Error{constructor(t,r){super(r||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function P(e,t){let r=await e["~standard"].validate(t);if(r.issues)throw new j(r.issues);return r.value}var D=["get","post","put","patch","delete"],N=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,r){var n,o,i,a;let s=(null==(o=null==(n=e.plugins)?void 0:n.find(e=>{var r;return null!=(r=e.schema)&&!!r.config&&(t.startsWith(e.schema.config.baseURL||"")||t.startsWith(e.schema.config.prefix||""))}))?void 0:o.schema)||e.schema;if(s){let e=t;(null==(i=s.config)?void 0:i.prefix)&&e.startsWith(s.config.prefix)&&(e=e.replace(s.config.prefix,""),s.config.baseURL&&(t=t.replace(s.config.prefix,s.config.baseURL))),(null==(a=s.config)?void 0:a.baseURL)&&e.startsWith(s.config.baseURL)&&(e=e.replace(s.config.baseURL,""));let n=s.schema[e];if(n){let e=f(c({},r),{method:n.method,output:n.output});return(null==r?void 0:r.disableValidation)||(e=f(c({},e),{body:n.input?await P(n.input,null==r?void 0:r.body):null==r?void 0:r.body,params:n.params?await P(n.params,null==r?void 0:r.params):null==r?void 0:r.params,query:n.query?await P(n.query,null==r?void 0:r.query):null==r?void 0:r.query})),{url:t,options:e}}}return{url:t,options:r}}}),I=e=>async function(t,r){let n=f(c(c({},e),r),{plugins:[...(null==e?void 0:e.plugins)||[],N(e||{})]});if(null==e?void 0:e.catchAllError)try{return await U(t,n)}catch(e){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:e}}}return await U(t,n)};function C(e,t){let{baseURL:r,params:n,query:o}=t||{query:{},params:{},baseURL:""},i=e.startsWith("http")?e.split("/").slice(0,3).join("/"):r||"";if(e.startsWith("@")){let t=e.toString().split("@")[1].split("/")[0];D.includes(t)&&(e=e.replace(`@${t}/`,"/"))}i.endsWith("/")||(i+="/");let[a,s]=e.replace(i,"").split("?"),u=new URLSearchParams(s);for(let[e,t]of Object.entries(o||{}))null!=t&&u.set(e,String(t));if(n)if(Array.isArray(n))for(let[e,t]of a.split("/").filter(e=>e.startsWith(":")).entries()){let r=n[e];a=a.replace(t,r)}else for(let[e,t]of Object.entries(n))a=a.replace(`:${e}`,String(t));(a=a.split("/").map(encodeURIComponent).join("/")).startsWith("/")&&(a=a.slice(1));let l=u.toString();return(l=l.length>0?`?${l}`.replace(/\+/g,"%20"):"",i.startsWith("http"))?new URL(`${a}${l}`,i):`${i}${a}${l}`}var U=async(e,t)=>{var r,n,o,i,a,s,u,l;let{hooks:h,url:y,options:b}=await p(e,t),m=_(b),E=new AbortController,A=null!=(r=b.signal)?r:E.signal,T=C(y,b),j=R(b),D=await O(b),N=x(y,b),I=f(c({},b),{url:T,headers:D,body:j,method:N,signal:A});for(let e of h.onRequest)if(e){let t=await e(I);t instanceof Object&&(I=t)}("pipeTo"in I&&"function"==typeof I.pipeTo||"function"==typeof(null==(n=null==t?void 0:t.body)?void 0:n.pipe))&&!("duplex"in I)&&(I.duplex="half");let{clearTimeout:L}=k(b,E),M=await m(I.url,I);L();let W={response:M,request:I};for(let e of h.onResponse)if(e){let r=await e(f(c({},W),{response:(null==(o=null==t?void 0:t.hookOptions)?void 0:o.cloneResponse)?M.clone():M}));r instanceof Response?M=r:r instanceof Object&&(M=r.response)}if(M.ok){if("HEAD"===I.method)return{data:"",error:null};let e=w(M),r={data:"",response:M,request:I};if("json"===e||"text"===e){let e=await M.text(),t=null!=(i=I.jsonParser)?i:S;r.data=await t(e)}else r.data=await M[e]();for(let e of((null==I?void 0:I.output)&&I.output&&!I.disableValidation&&(r.data=await P(I.output,r.data)),h.onSuccess))e&&await e(f(c({},r),{response:(null==(a=null==t?void 0:t.hookOptions)?void 0:a.cloneResponse)?M.clone():M}));return(null==t?void 0:t.throw)?r.data:{data:r.data,error:null}}let H=null!=(s=null==t?void 0:t.jsonParser)?s:S,F=await M.text(),$=v(F),B=$?await H(F):null,K={response:M,responseText:F,request:I,error:f(c({},B),{status:M.status,statusText:M.statusText})};for(let e of h.onError)e&&await e(f(c({},K),{response:(null==(u=null==t?void 0:t.hookOptions)?void 0:u.cloneResponse)?M.clone():M}));if(null==t?void 0:t.retry){let r=g(t.retry),n=null!=(l=t.retryAttempt)?l:0;if(await r.shouldAttemptRetry(n,M)){for(let e of h.onRetry)e&&await e(W);let o=r.getDelay(n);return await new Promise(e=>setTimeout(e,o)),await U(e,f(c({},t),{retryAttempt:n+1}))}}if(null==t?void 0:t.throw)throw new d(M.status,M.statusText,$?B:F);return{data:null,error:f(c({},B),{status:M.status,statusText:M.statusText})}}},84206:(e,t,r)=>{var n="/",o=r(55036);!function(){var t={782:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},646:function(e){"use strict";let t={};function r(e,r,n){function o(e,t,n){return"string"==typeof r?r:r(e,t,n)}n||(n=Error);class i extends n{constructor(e,t,r){super(o(e,t,r))}}i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(!Array.isArray(e))return`of ${t} ${String(e)}`;{let r=e.length;return(e=e.map(e=>String(e)),r>2)?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:2===r?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}}function o(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function i(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function a(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}r("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invali
1d for option "'+e+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(e,t,r){let s,u;if("string"==typeof t&&o(t,"not ")?(s="must not be",t=t.replace(/^not /,"")):s="must be",i(e," argument"))u=`The ${e} ${s} ${n(t,"type")}`;else{let r=a(e,".")?"property":"argument";u=`The "${e}" ${r} ${s} ${n(t,"type")}`}return u+`. Received type ${typeof r}`},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},403:function(e,t,r){"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var i=r(709),a=r(337);r(782)(c,i);for(var s=n(a.prototype),u=0;u<s.length;u++){var l=s[u];c.prototype[l]||(c.prototype[l]=a.prototype[l])}function c(e){if(!(this instanceof c))return new c(e);i.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",f)))}function f(){this._writableState.ended||o.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},889:function(e,t,r){"use strict";e.exports=o;var n=r(170);function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}r(782)(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},709:function(e,t,n){"use strict";e.exports=k,k.ReadableState=x,n(361).EventEmitter;var i,a,s,u,l,c=function(e,t){return e.listeners(t).length},f=n(678),d=n(300).Buffer,p=r.g.Uint8Array||function(){};function h(e){return d.from(e)}function y(e){return d.isBuffer(e)||e instanceof p}var g=n(837);a=g&&g.debuglog?g.debuglog("stream"):function(){};var b=n(379),m=n(25),w=n(776).getHighWaterMark,v=n(646).q,E=v.ERR_INVALID_ARG_TYPE,S=v.ERR_STREAM_PUSH_AFTER_EOF,A=v.ER
vendor: 21,129 bytes, line 1
1R_METHOD_NOT_IMPLEMENTED,_=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(782)(k,f);var O=m.errorOrDestroy,T=["error","close","destroy","pause","resume"];function R(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}function x(e,t,r){i=i||n(403),e=e||{},"boolean"!=typeof r&&(r=t instanceof i),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=w(this,e,"readableHighWaterMark",r),this.buffer=new b,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(s||(s=n(704).s),this.decoder=new s(e.encoding),this.encoding=e.encoding)}function k(e){if(i=i||n(403),!(this instanceof k))return new k(e);var t=this instanceof i;this._readableState=new x(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),f.call(this)}function j(e,t,r,n,o){a("readableAddChunk",t);var i,s=e._readableState;if(null===t)s.reading=!1,U(e,s);else if(o||(i=D(s,t)),i)O(e,i);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===d.prototype||(t=h(t)),n)s.endEmitted?O(e,new _):P(e,s,t,!0);else if(s.ended)O(e,new S);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?P(e,s,t,!1):W(e,s)):P(e,s,t,!1)}else n||(s.reading=!1,W(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function P(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&L(e)),W(e,t)}function D(e,t){var r;return y(t)||"string"==typeof t||void 0===t||e.objectMode||(r=new E("chunk",["string","Buffer","Uint8Array"],t)),r}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),k.prototype.destroy=m.destroy,k.prototype._undestroy=m.undestroy,k.prototype._destroy=function(e,t){t(e)},k.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=d.from(e,t),t=""),r=!0),j(this,e,t,!1,r)},k.prototype.unshift=function(e){return j(this,e,null,!0,!1)},k.prototype.isPaused=function(){return!1===this._readableState.flowing},k.prototype.setEncoding=function(e){s||(s=n(704).s);var t=new s(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,o="";null!==r;)o+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==o&&this._readableState.buffer.push(o),this._readableState.length=o.length,this};var N=0x40000000;function I(e){return e>=N?e=N:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function C(e,t){if(e<=0||0===t.length&&t.ended)return 0;if(t.objectMode)return 1;if(e!=e)if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length;return(e>t.highWaterMark&&(t.highWaterMark=I(e)),e<=t.length)?e:t.ended?t.length:(t.needReadable=!0,0)}function U(e,t){if(a("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?L(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,M(e)))}}function L(e){var t=e._readableState;a("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(a("emitReadable",t.flowing),t.emittedReadable=!0,o.nextTick(M,e))}function M(e){var t=e._readableState;a("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,J(e)}function W(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(H,e,t))}function H(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(a("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function F(e){return function(){var t=e._readableState;a("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&c(e,"data")&&(t.flowing=!0,J(e))}}function $(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function B(e){a("readable nexttick read 0"),e.read(0)}function K(e,t){t.resumeScheduled||(t.resumeScheduled=!0,o.nextTick(q,e,t))}function q(e,t){a("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),J(e),t.flowing&&!t.reading&&e.read(0)}function J(e){var t=e._readableState;for(a("flow",t.flowing);t.flowing&&null!==e.read(););}function V(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function z(e){var t=e._readableState;a("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,o.nextTick(G,t,e))}function G(e,t){if(a("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function Y(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return -1}k.prototype.read=function(e){a("read",e),e=parseInt(e,10);var t,r=this._readableState,n=e;if(0!==e&&(r.emittedReadable=!1),0===e&&r.needReadable&&((0!==r.highWaterMark?r.length>=r.highWaterMark:r.length>0)||r.ended))return a("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?z(this):L(this),null;if(0===(e=C(e,r))&&r.ended)return 0===r.length&&z(this),null;var o=r.needReadable;return a("need readable",o),(0===r.length||r.length-e<r.highWaterMark)&&a("length less than watermark",o=!0),r.ended||r.reading?a("reading or ended",o=!1):o&&(a("do read"),r.reading=!0,r.sync=!0,0===r.length&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=C(n,r))),null===(t=e>0?V(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),n!==e&&r.ended&&z(this)),null!==t&&this.emit("data",t),t},k.prototype._read=function(e){O(this,new A("_read()"))},k.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,a("pipe count=%d opts=%j",n.pipesCount,t);var i=t&&!1===t.end||e===o.stdout||e===o.stderr?b:u;function s(e,t){a("onunpipe"),e===r&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,d())}function u(){a("onend"),e.end()}n.endEmitted?o.nextTick(i):r.once("end",i),e.on("unpipe",s);var l=F(r);e.on("drain",l);var f=!1;function d(){a("cleanup"),e.removeListener("close",y),e.removeListener("finish",g),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",b),r.removeListener("data",p),f=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&l()}function p(t){a("ondata");var o=e.write(t);a("dest.write",o),!1===o&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==Y(n.pipes,e))&&!f&&(a("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(t){a("onerror",t),b(),e.removeListener("error",h),0===c(e,"error")&&O(e,t)}function y(){e.removeListener("finish",g),b()}function g(){a("onfinish"),e.removeListener("close",y),b()}function b(){a("unpipe"),r.unpipe(e)}return r.on("data",p),R(e,"error",h),e.once("close",y),e.once("finish",g),e.emit("pipe",r),n.flowing||(a("pipe resume"),r.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<o;i++)n[i].emit("unpipe",this,{hasUnpiped:!1});return this}var a=Y(t.pipes,e);return -1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},k.prototype.on=function(e,t){var r=f.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"!==e||n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,a("on readable",n.length,n.reading),n.length?L(this):n.reading||o.nextTick(B,this)),r},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var r=f.prototype.removeListener.call(this,e,t);return"readable"===e&&o.nextTick($,this),r},k.prototype.removeAllListeners=function(e){var t=f.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&o.nextTick($,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(a("resume"),e.flowing=!e.readableListening,K(this,e)),e.paused=!1,this},k.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o in e.on("end",function(){if(a("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(o){if(a("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!r.objectMode||null!=o)(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()))}),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var i=0;i<T.length;i++)e.on(T[i],this.emit.bind(this,T[i]));return this._read=function(t){a("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(k.prototype[Symbol.asyncIterator]=function(){return void 0===u&&(u=n(871)),u(this)}),Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(k.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(k.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),k._fromList=V,Object.defineProperty(k.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(k.from=function(e,t){return void 0===l&&(l=n(727)),l(k,e,t)})},170:function(e,t,r){"use strict";e.exports=c;var n=r(646).q,o=n.ERR_METHOD_NOT_IMPLEMENTED,i=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(403);function l(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new i);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function c(e){if(!(this instanceof c))return new c(e);u.call(this,e),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush(function(t,r){d(e,t,r)})}function d(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}r(782)(c,u),c.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},c.prototype._transform=function(e,t,r){r(new o("_transform()"))},c.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},c.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},c.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,function(e){t(e)})}},337:function(e,t,n){"use strict";function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){q(t,e)}}e.exports=x,x.WritableState=R;var a,s,u={deprecate:n(769)},l=n(678),c=n(300).Buffer,f=r.g.Uint8Array||function(){};function d(e){return c.from(e)}function p(e){return c.isBuffer(e)||e instanceof f}var h=n(25),y=n(776).getHighWaterMark,g=n(646).q,b=g.ERR_INVALID_ARG_TYPE,m=g.ERR_METHOD_NOT_IMPLEMENTED,w=g.ERR_MULTIPLE_CALLBACK,v=g.ERR_STREAM_CANNOT_PIPE,E=g.ERR_STREAM_DESTROYED,S=g.ERR_STREAM_NULL_VALUES,A=g.ERR_STREAM_WRITE_AFTER_END,_=g.ERR_UNKNOWN_ENCODING,O=h.errorOrDestroy;function T(){}function R(e,t,r){a=a||n(403),e=e||{},"boolean"!=typeof r&&(r=t instanceof a),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=y(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===e.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){U(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function x(e){var t=this instanceof(a=a||n(403));if(!t&&!s.call(x,this))return new x(e);this._writableState=new R(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function k(e,t){var r=new A;O(e,r),o.nextTick(t,r)}function j(e,t,r,n){var i;return null===r?i=new S:"string"==typeof r||t.objectMode||(i=new b("chunk",["string","Buffer"],r)),!i||(O(e,i),o.nextTick(n,i),!1)}function P(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,r)),t}function D(e,t,r,n,o,i){if(!r){var a=P(t,n,o);n!==a&&(r=!0,o="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:o,isBuf:r,callback:i,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else N(e,t,!1,s,n,o,i);return u}function N(e,t,r,n,o,i,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new E("write")):r?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function I(e,t,r,n,i){--t.pendingcb,r?(o.nextTick(i,n),o.nextTick(B,e,t),e._writableState.errorEmitted=!0,O(e,n)):(i(n),e._writableState.errorEmitted=!0,O(e,n),B(e,t))}function C(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function U(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new w;if(C(r),t)I(e,r,n,t,i);else{var a=H(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||W(e,r),n?o.nextTick(L,e,r,a,i):L(e,r,a,i)}}function L(e,t,r,n){r||M(e,t),t.pendingcb--,n(),B(e,t)}function M(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function W(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=Array(t.bufferedRequestCount),o=t.corkedRequestsFree;o.entry=r;for(var a=0,s=!0;r;)n[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;n.allBuffers=s,N(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,l=r.encoding,c=r.callback,f=t.objectMode?1:u.length;if(N(e,t,!1,f,u,l,c),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function H(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function F(e,t){e._final(function(r){t.pendingcb--,r&&O(e,r),t.prefinished=!0,e.emit("prefinish"),B(e,t)})}function $(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,o.nextTick(F,e,t)))}function B(e,t){var r=H(t);if(r&&($(e,t),0===t.pendingcb)&&(t.finished=!0,e.emit("finish"),t.autoDestroy)){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}function K(e,t,r){t.ending=!0,B(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function q(e,t,r){var n=e.entry;for(e.entry=null;n;){var o=n.callback;t.pendingcb--,o(r),n=n.next}t.corkedRequestsFree.next=e}n(782)(x,l),R.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(R.prototype,"buffer",{get:u.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(x,Symbol.hasInstance,{value:function(e){return!!s.call(this,e)||this===x&&e&&e._writableState instanceof R}})):s=function(e){return e instanceof this},x.prototype.pipe=function(){O(this,new v)},x.prototype.write=function(e,t,r){var n=this._writableState,o=!1,i=!n.objectMode&&p(e);return i&&!c.isBuffer(e)&&(e=d(e)),"function"==typeof t&&(r=t,t=null),i?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof r&&(r=T),n.ending?k(this,r):(i||j(this,n,e,r))&&(n.pendingcb++,o=D(this,n,i,e,t,r)),o},x.prototype.cork=function(){this._writableState.corked++},x.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||W(this,e))},x.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(x.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(x.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),x.prototype._write=function(e,t,r){r(new m("_write()"))},x.prototype._writev=null,x.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||K(this,n,r),this},Object.defineProperty(x.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),x.prototype.destroy=h.destroy,x.prototype._undestroy=h.undestroy,x.prototype._destroy=function(e,t){t(e)}},871:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i,a=r(698),s=Symbol("lastResolve"),u=Symbol("lastReject"),l=Symbol("error"),c=Symbol("ended"),f=Symbol("lastPromise"),d=Symbol("handlePromise"),p=Symbol("stream");function h(e,t){return{value:e,done:t}}function y(e){var t=e[s];if(null!==t){var r=e[p].read();null!==r&&(e[f]=null,e[s]=null,e[u]=null,t(h(r,!1)))}}function g(e){o.nextTick(y,e)}function b(e,t){return function(r,n){e.then(function(){if(t[c])return void r(h(void 0,!0));t[d](r,n)},n)}}var m=Object.getPrototypeOf(function(){}
vendor: 5,760 bytes, line 1
1),w=Object.setPrototypeOf((n(i={get stream(){return this[p]},next:function(){var e,t=this,r=this[l];if(null!==r)return Promise.reject(r);if(this[c])return Promise.resolve(h(void 0,!0));if(this[p].destroyed)return new Promise(function(e,r){o.nextTick(function(){t[l]?r(t[l]):e(h(void 0,!0))})});var n=this[f];if(n)e=new Promise(b(n,this));else{var i=this[p].read();if(null!==i)return Promise.resolve(h(i,!1));e=new Promise(this[d])}return this[f]=e,e}},Symbol.asyncIterator,function(){return this}),n(i,"return",function(){var e=this;return new Promise(function(t,r){e[p].destroy(null,function(e){if(e)return void r(e);t(h(void 0,!0))})})}),i),m);e.exports=function(e){var t,r=Object.create(w,(n(t={},p,{value:e,writable:!0}),n(t,s,{value:null,writable:!0}),n(t,u,{value:null,writable:!0}),n(t,l,{value:null,writable:!0}),n(t,c,{value:e._readableState.endEmitted,writable:!0}),n(t,d,{value:function(e,t){var n=r[p].read();n?(r[f]=null,r[s]=null,r[u]=null,e(h(n,!1))):(r[s]=e,r[u]=t)},writable:!0}),t));return r[f]=null,a(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[u];null!==t&&(r[f]=null,r[s]=null,r[u]=null,t(e)),r[l]=e;return}var n=r[s];null!==n&&(r[f]=null,r[s]=null,r[u]=null,n(h(void 0,!0))),r[c]=!0}),e.on("readable",g.bind(null,r)),r}},379:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),e}var l=r(300).Buffer,c=r(837).inspect,f=c&&c.custom||"inspect";function d(e,t,r){l.prototype.copy.call(e,t,r)}e.exports=function(){function e(){a(this,e),this.head=null,this.tail=null,this.length=0}return u(e,[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return l.alloc(0);for(var t=l.allocUnsafe(e>>>0),r=this.head,n=0;r;)d(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var o=t.data,i=e>o.length?o.length:e;if(i===o.length?n+=o:n+=o.slice(0,e),0==(e-=i)){i===o.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(i));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=l.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var o=r.data,i=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,i),0==(e-=i)){i===o.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=o.slice(i));break}++n}return this.length-=n,t}},{key:f,value:function(e,t){return c(this,o({},t,{depth:0,customInspect:!1}))}}]),e}()},25:function(e){"use strict";function t(e,t){n(e,t),r(e)}function r(e){(!e._writableState||e._writableState.emitClose)&&(!e._readableState||e._readableState.emitClose)&&e.emit("close")}function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,i){var a=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,o.nextTick(n,this,e)):o.nextTick(n,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!i&&e?a._writableState?a._writableState.errorEmitted?o.nextTick(r,a):(a._writableState.errorEmitted=!0,o.nextTick(t,a,e)):o.nextTick(t,a,e):i?(o.nextTick(r,a),i(e)):o.nextTick(r,a)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},698:function(e,t,r){"use strict";
vendor: 2,421 bytes, line 1
1var n=r(646).q.ERR_STREAM_PREMATURE_CLOSE;function o(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];e.apply(this,n)}}}function i(){}function a(e){return e.setHeader&&"function"==typeof e.abort}function s(e,t,r){if("function"==typeof t)return s(e,null,t);t||(t={}),r=o(r||i);var u=t.readable||!1!==t.readable&&e.readable,l=t.writable||!1!==t.writable&&e.writable,c=function(){e.writable||d()},f=e._writableState&&e._writableState.finished,d=function(){l=!1,f=!0,u||r.call(e)},p=e._readableState&&e._readableState.endEmitted,h=function(){u=!1,p=!0,l||r.call(e)},y=function(t){r.call(e,t)},g=function(){var t;return u&&!p?(e._readableState&&e._readableState.ended||(t=new n),r.call(e,t)):l&&!f?(e._writableState&&e._writableState.ended||(t=new n),r.call(e,t)):void 0},b=function(){e.req.on("finish",d)};return a(e)?(e.on("complete",d),e.on("abort",g),e.req?b():e.on("request",b)):l&&!e._writableState&&(e.on("end",c),e.on("close",c)),e.on("end",h),e.on("finish",d),!1!==t.error&&e.on("error",y),e.on("close",g),function(){e.removeListener("complete",d),e.removeListener("abort",g),e.removeListener("request",b),e.req&&e.req.removeListener("finish",d),e.removeListener("end",c),e.removeListener("close",c),e.removeListener("finish",d),e.removeListener("end",h),e.removeListener("error",y),e.removeListener("close",g)}}e.exports=s},727:function(e,t,r){"use strict";function n(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){r(e);return}s.done?t(u):Promise.resolve(u).then(n,o)}function o(e){return function(){var t=this,r=arguments;return new Promise(function(o,i){var a=e.apply(t,r);function s(e){n(a,o,i,s,u,"next",e)}function u(e){n(a,o,i,s,u,"throw",e)}s(void 0)})}}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach(function(t){s(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}
1var u=r(646).q.ERR_INVALID_ARG_TYPE;e.exports=function(e,t,r){if(t&&"function"==typeof t.next)n=t;else if(t&&t[Symbol.asyncIterator])n=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])n=t[Symbol.iterator]();else throw new u("iterable",["Iterable"],t);var n,i=new e(a({objectMode:!0},r)),s=!1;function l(){return c.apply(this,arguments)}function c(){return(c=o(function*(){try{var e=yield n.next(),t=e.value;e.done?i.push(null):i.push((yield t))?l():s=!1}catch(e){i.destroy(e)}})).apply(this,arguments)}return i._read=function(){s||(s=!0,l())},i}},442:function(e,t,r){"use strict";function n(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var o,i=r(646).q,a=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function u(e){if(e)throw e}function l(e){return e.setHeader&&"function"==typeof e.abort}function c(e,t,i,a){a=n(a);var u=!1;e.on("close",function(){u=!0}),void 0===o&&(o=r(698)),o(e,{readable:t,writable:i},function(e){if(e)return a(e);u=!0,a()});var c=!1;return function(t){if(!u&&!c){if(c=!0,l(e))return e.abort();if("function"==typeof e.destroy)return e.destroy();a(t||new s("pipe"))}}}function f(e){e()}function d(e,t){return e.pipe(t)}function p(e){return e.length&&"function"==typeof e[e.length-1]?e.pop():u}e.exports=function(){for(var e,t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=p(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new a("streams");var i=r.map(function(t,n){var a=n<r.length-1;return c(t,a,n>0,function(t){e||(e=t),t&&i.forEach(f),a||(i.forEach(f),o(e))})});return r.reduce(d)}},776:function(e,t,r){"use strict";var n=r(646).q.ERR_INVALID_OPT_VALUE;function o(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}e.exports={getHighWaterMark:function(e,t,r,i){var a=o(t,i,r);if(null!=a){if(!(isFinite(a)&&Math.floor(a)===a)||a<0)throw new n(i?r:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}},678:function(e,t,r){e.exports=r(781)},55:function(e,t,r){var n=r(300),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return o(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},173:function(e,t,r){e.exports=o;var n=r(361).EventEmitter;function o(){n.call(this)}r(782)(o,n),o.Readable=r(709),o.Writable=r(337),o.Duplex=r(403),o.Transform=r(170),o.PassThrough=r(889),o.finished=r(698),o.pipeline=r(442),o.Stream=o,o.prototype.pipe=function(e,t){var r=this;function o(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",o),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",u));var a=!1;function s(){a||(a=!0,e.end())}function u(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(c(),0===n.listenerCount(this,"error"))throw e}function c(){r.removeListener("data",o),e.removeListener("drain",i),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return r.on("error",l),e.on("error",l),r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e}},704:function(e,t,r){"use strict";var n=r(55).Buffer,o=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;if(!e)return"utf8";for(;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";
1case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function a(e){var t=i(e);if("string"!=typeof t&&(n.isEncoding===o||!o(e)))throw Error("Unknown encoding: "+e);return t||e}function s(e){var t;switch(this.encoding=a(e),this.encoding){case"utf16le":this.text=h,this.end=y,t=4;break;case"utf8":this.fillLast=f,t=4;break;case"base64":this.text=g,this.end=b,t=3;break;default:this.write=m,this.end=w;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function u(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function l(e,t,r){var n=t.length-1;if(n<r)return 0;var o=u(t[n]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--n<r||-2===o?0:(o=u(t[n]))>=0?(o>0&&(e.lastNeed=o-2),o):--n<r||-2===o?0:(o=u(t[n]))>=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}function c(e,t,r){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}function f(e){var t=this.lastTotal-this.lastNeed,r=c(this,e,t);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function d(e,t){var r=l(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function p(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function h(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function y(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function g(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function b(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function m(e){return e.toString(this.encoding)}function w(e){return e&&e.length?this.write(e):""}t.s=s,s.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=p,s.prototype.text=d,s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},769:function(e){function t(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function e(e,r){if(t("noDeprecation"))return e;var n=!1;return function(){if(!n){if(t("throwDeprecation"))throw Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),n=!0}return e.apply(this,arguments)}}},300:function(e){"use strict";e.exports=r(95146)},361:function(e){"use strict";e.exports=r(84742)},781:function(e){"use strict";e.exports=r(84742).EventEmitter},837:function(e){"use strict";e.exports=r(67153)}},i={};function a(e){var r=i[e];if(void 0!==r)return r.exports;var n=i[e]={exports:{}},o=!0;try{t[e](n,n.exports,a),o=!1}finally{o&&delete i[e]}return n.exports}a.ab=n+"/",e.exports=a(173)}()},84742:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};function o(e){console&&console.warn&&console.warn(e)}t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=m,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function u(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){if(u(r),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),s=a[t]),void 0===s)s=a[t]=r,++e._eventsCount;else if("function"==typeof s?s=a[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=l(e))>0&&s.length>i&&!s.warned){s.warned=!0;var i,a,s,c=Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,o(c)}return e}function f(){if(!this.fired)return(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length)?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=f.bind(n);return o.listener=r,n.wrapFn=o,o}function p(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?b(o):y(o,o.length)}function h(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function y(e,t){for(var r=Array(t),n=0;n<t;++n)r[n]=e[n];return r}function g(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function b(e){for(var t=Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}function m(e,t){return new Promise(function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}v(e,t,i,{once:!0}),"error"!==t&&w(e,o,{once:!0})})}function w(e,t,r){"function"==typeof e.on&&v(e,"error",t,r)}function v(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else if("function"==typeof e.addEventListener)e.addEventListener(t,function o(i){n.once&&e.removeEventListener(t,o),r(i)});else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),a.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var a,s=Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else for(var l=u.length,c=y(u,l),r=0;r<l;++r)n(c[r],this,t);return!0},a.prototype.addListener=function(e,t){return c(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return c(this,e,t,!0)},a.prototype.once=function(e,t){return u(t),this.on(e,d(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,d(this,e,t)),this},a.prototype.removeListener=function(e,t){var r,n,o,i,a;if(u(t),void 0===(n=this._events)||void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit
1("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){a=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():g(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0==arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},a.prototype.listenerCount=h,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},90987:(e,t,r)=>{"use strict";r.d(t,{g:()=>n});let n=(0,r(19986).q)("a-z","0-9","A-Z","-_")},92139:(e,t,r)=>{var n=r(95146),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return o(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},97613:(e,t,r)=>{"use strict";let n;r.d(t,{A:()=>c});var o=r(32969),i=r(18233),a=r(17850),s=r(61208);let u=async(e,t,r,o=!1)=>{let i=(n||=new WeakMap).get(e);if(i?.[r])return i[r];let s=await (0,a.A)({...t,alg:r});return o&&Object.freeze(e),i?i[r]=s:n.set(e,{[r]:s}),s},l=(e,t)=>{let r,o=(n||=new WeakMap).get(e);if(o?.[t])return o[t];let i="public"===e.type,a=!!i;if("x25519"===e.asymmetricKeyType){switch(t){case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":break;default:throw TypeError("given KeyObject instance cannot be used for this algorithm")}r=e.toCryptoKey(e.asymmetricKeyType,a,i?[]:["deriveBits"])}if("ed25519"===e.asymmetricKeyType){if("EdDSA"!==t&&"Ed25519"!==t)throw TypeError("given KeyObject instance cannot be used for this algorithm");r=e.toCryptoKey(e.asymmetricKeyType,a,[i?"verify":"sign"])}switch(e.asymmetricKeyType){case"ml-dsa-44":case"ml-dsa-65":case"ml-dsa-87":if(t!==e.asymmetricKeyType.toUpperCase())throw TypeError("given KeyObject instance cannot be used for this algorithm");r=e.toCryptoKey(e.asymmetricKeyType,a,[i?"verify":"sign"])}if("rsa"===e.asymmetricKeyType){let n;switch(t){case"RSA-OAEP":n="SHA-1";break;case"RS256":case"PS256":case"RSA-OAEP-256":n="SHA-256";break;case"RS384":case"PS384":case"RSA-OAEP-384":n="SHA-384";break;case"RS512":case"PS512":case"RSA-OAEP-512":n="SHA-512";break;default:throw TypeError("given KeyObject instance cannot be used for this algorithm")}if(t.startsWith("RSA-OAEP"))return e.toCryptoKey({name:"RSA-OAEP",hash:n},a,i?["encrypt"]:["decrypt"]);r=e.toCryptoKey({name:t.startsWith("PS")?"RSA-PSS":"RSASSA-PKCS1-v1_5",hash:n},a,[i?"verify":"sign"])}if("ec"===e.asymmetricKeyType){let n=new Map([["prime256v1","P-256"],["secp384r1","P-384"],["secp521r1","P-521"]]).get(e.asymmetricKeyDetails?.namedCurve);if(!n)throw TypeError("given KeyObject instance cannot be used for this algorithm");"ES256"===t&&"P-256"===n&&(r=e.toCryptoKey({name:"ECDSA",namedCurve:n}
1,a,[i?"verify":"sign"])),"ES384"===t&&"P-384"===n&&(r=e.toCryptoKey({name:"ECDSA",namedCurve:n},a,[i?"verify":"sign"])),"ES512"===t&&"P-521"===n&&(r=e.toCryptoKey({name:"ECDSA",namedCurve:n},a,[i?"verify":"sign"])),t.startsWith("ECDH-ES")&&(r=e.toCryptoKey({name:"ECDH",namedCurve:n},a,i?[]:["deriveBits"]))}if(!r)throw TypeError("given KeyObject instance cannot be used for this algorithm");return o?o[t]=r:n.set(e,{[t]:r}),r},c=async(e,t)=>{if(e instanceof Uint8Array||(0,s.R7)(e))return e;if((0,s.D2)(e)){if("secret"===e.type)return e.export();if("toCryptoKey"in e&&"function"==typeof e.toCryptoKey)try{return l(e,t)}catch(e){if(e instanceof TypeError)throw e}let r=e.export({format:"jwk"});return u(e,r,t)}if((0,o.ll)(e))return e.k?(0,i.D)(e.k):u(e,e,t,!0);throw Error("unreachable")}},97946:(e,t,r)=>{"use strict";r.d(t,{UY:()=>i,aK:()=>o});let n=globalThis.crypto,o=n.subtle,i=e=>n.getRandomValues(e)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.