"use strict";function setCookie(e,o,t={path:"/"}){if("undefined"==typeof document)return;"number"==typeof t.expires&&(t.expires=new Date(Date.now()+864e5*t.expires)),t.expires&&(t.expires=t.expires instanceof Date?t.expires.toUTCString():t.expires),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);let n="";for(const e in t)t[e]&&(n+="; "+e,!0!==t[e]&&(n+="="+String(t[e]).split(";")[0]));return document.cookie=e+"="+encode(o)+n}function getCookie(e,o){const t="undefined"!=typeof document?document.cookie:o,n=t?t.split("; "):[],i={};for(let o=0;o<n.length;o++){const t=n[o].split("="),r=t.slice(1).join("=");try{const o=decodeURIComponent(t[0]);if(o in i||(i[o]=decode(r)),e===o)break}catch(e){}}return e?i[e]:i}function removeCookie(e,o={path:"/"}){setCookie(e,"",Object.assign(Object.assign({},o),{expires:-1}))}function decode(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)}function encode(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.removeCookie=exports.getCookie=exports.setCookie=void 0,exports.setCookie=setCookie,exports.getCookie=getCookie,exports.removeCookie=removeCookie;
//# sourceMappingURL=cookies.js.map