import{getCookie as p}from"hono/cookie";function r(e){try{return decodeURIComponent(e)}catch{return e}}function m(e){const o=new Map,n=e.req.header("cookie")||"";return n&&n.split(";").forEach(i=>{const[a,...s]=i.split("="),t=a?.trim();if(!t)return;const u=s.join("=").trim();try{const c=p(e,t);if(!c)return;o.set(r(t),c)}catch{o.set(r(t),r(u))}}),o}export{m as parseCookieHeader,r as safeDecodeURIComponent};
