var e=new Set(["domain","path","max-age","expires","samesite","secure","httponly"]);function t(t){let a,n,s,i,r={},o=0,m=t.split(/;\s*/g);for(;o=0&&(n+="; Max-Age="+(0|a.maxage)),a.domain&&(n+="; Domain="+a.domain),a.path&&(n+="; Path="+a.path),a.samesite&&(n+="; SameSite="+a.samesite),(a.secure||"None"===a.samesite)&&(n+="; Secure"),a.httponly&&(n+="; HttpOnly"),n}export{t as parse,a as stringify};