import{o as e}from"./home-dir-C44RaPME-B5iLWwCq.mjs";import{s as t}from"./paths-D92DjaZ--DdtJ-zYp.mjs";const n=`default`,r=/^[a-z0-9][a-z0-9_-]{0,63}$/i,i=/[^a-z0-9_-]+/g,a=/^-+/,o=/-+$/,s=new Map,c=new Map;function l(t){let n=e(t);return r.test(t)?n:n.replace(i,`-`).replace(a,``).replace(o,``).slice(0,64)}function u(e){let n=l(e);if(!(!n||t(n)))return n}function d(e){let t=(e??``).trim();if(!t)return n;let r=s.get(t);if(r)return r;let i=u(t)||`default`;return p(s,t,i),i}function f(e){let t=(e??``).trim();if(!t)return;if(c.has(t))return c.get(t);let n=u(t)||void 0;return p(c,t,n),n}function p(e,t,n){if(e.set(t,n),e.size<=512)return;let r=e.keys().next();r.done||e.delete(r.value)}export{d as n,f as r,n as t};