module.exports=[22734,(a,b,c)=>{b.exports=a.x("fs",()=>require("fs"))},75317,(a,b,c)=>{"use strict";var d=Object.create,e=Object.defineProperty,f=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,h=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,j=(a,b,c,d)=>{if(b&&"object"==typeof b||"function"==typeof b)for(let h of g(b))i.call(a,h)||h===c||e(a,h,{get:()=>b[h],enumerable:!(d=f(b,h))||d.enumerable});return a},k=(a,b,c)=>(c=null!=a?d(h(a)):{},j(!b&&a&&a.__esModule?c:e(c,"default",{value:a,enumerable:!0}),a)),l={},m={findRootDir:()=>s,getUserDataDir:()=>t};for(var n in m)e(l,n,{get:m[n],enumerable:!0});b.exports=j(e({},"__esModule",{value:!0}),l);var o=k(a.r(14747)),p=k(a.r(22734)),q=k(a.r(46786)),r=a.r(42532);function s(){try{let a=process.cwd();for(;a!==o.default.dirname(a);){let b=o.default.join(a,".vercel");if(p.default.existsSync(b))return a;a=o.default.dirname(a)}}catch(a){throw new r.VercelOidcTokenError("Token refresh only supported in node server environments")}throw new r.VercelOidcTokenError("Unable to find root directory")}function t(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(q.default.platform()){case"darwin":return o.default.join(q.default.homedir(),"Library/Application Support");case"linux":return o.default.join(q.default.homedir(),".local/share");case"win32":if(process.env.LOCALAPPDATA)return process.env.LOCALAPPDATA;return null;default:return null}}},16885,(a,b,c)=>{"use strict";var d=Object.create,e=Object.defineProperty,f=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,h=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,j=(a,b,c,d)=>{if(b&&"object"==typeof b||"function"==typeof b)for(let h of g(b))i.call(a,h)||h===c||e(a,h,{get:()=>b[h],enumerable:!(d=f(b,h))||d.enumerable});return a},k=(a,b,c)=>(c=null!=a?d(h(a)):{},j(!b&&a&&a.__esModule?c:e(c,"default",{value:a,enumerable:!0}),a)),l={},m={assertVercelOidcTokenResponse:()=>v,findProjectInfo:()=>w,getTokenPayload:()=>z,getVercelCliToken:()=>t,getVercelDataDir:()=>s,getVercelOidcToken:()=>u,isExpired:()=>A,loadToken:()=>y,saveToken:()=>x};for(var n in m)e(l,n,{get:m[n],enumerable:!0});b.exports=j(e({},"__esModule",{value:!0}),l);var o=k(a.r(14747)),p=k(a.r(22734)),q=a.r(42532),r=a.r(75317);function s(){let a=(0,r.getUserDataDir)();return a?o.join(a,"com.vercel.cli"):null}function t(){let a=s();if(!a)return null;let b=o.join(a,"auth.json");if(!p.existsSync(b))return null;let c=p.readFileSync(b,"utf8");return c?JSON.parse(c).token:null}async function u(a,b,c){try{let d=`https://api.vercel.com/v1/projects/${b}/token?source=vercel-oidc-refresh${c?`&teamId=${c}`:""}`,e=await fetch(d,{method:"POST",headers:{Authorization:`Bearer ${a}`}});if(!e.ok)throw new q.VercelOidcTokenError(`Failed to refresh OIDC token: ${e.statusText}`);let f=await e.json();return v(f),f}catch(a){throw new q.VercelOidcTokenError("Failed to refresh OIDC token",a)}}function v(a){if(!a||"object"!=typeof a)throw TypeError("Expected an object");if(!("token"in a)||"string"!=typeof a.token)throw TypeError("Expected a string-valued token property")}function w(){let a=(0,r.findRootDir)();if(!a)throw new q.VercelOidcTokenError("Unable to find root directory");try{let b=o.join(a,".vercel","project.json");if(!p.existsSync(b))throw new q.VercelOidcTokenError("project.json not found");let c=JSON.parse(p.readFileSync(b,"utf8"));if("string"!=typeof c.projectId&&"string"!=typeof c.orgId)throw TypeError("Expected a string-valued projectId property");return{projectId:c.projectId,teamId:c.orgId}}catch(a){throw new q.VercelOidcTokenError("Unable to find project ID",a)}}function x(a,b){try{let c=(0,r.getUserDataDir)();if(!c)throw new q.VercelOidcTokenError("Unable to find user data directory");let d=o.join(c,"com.vercel.token",`${b}.json`),e=JSON.stringify(a);p.mkdirSync(o.dirname(d),{mode:504,recursive:!0}),p.writeFileSync(d,e),p.chmodSync(d,432);return}catch(a){throw new q.VercelOidcTokenError("Failed to save token",a)}}function y(a){try{let b=(0,r.getUserDataDir)();if(!b)return null;let c=o.join(b,"com.vercel.token",`${a}.json`);if(!p.existsSync(c))return null;let d=JSON.parse(p.readFileSync(c,"utf8"));return v(d),d}catch(a){throw new q.VercelOidcTokenError("Failed to load token",a)}}function z(a){let b=a.split(".");if(3!==b.length)throw new q.VercelOidcTokenError("Invalid token");let c=b[1].replace(/-/g,"+").replace(/_/g,"/"),d=c.padEnd(c.length+(4-c.length%4)%4,"=");return JSON.parse(Buffer.from(d,"base64").toString("utf8"))}function A(a){return 1e3*a.exp<Date.now()}}];

//# sourceMappingURL=%5Broot-of-the-server%5D__f5724172._.js.map