const e=new Map,t=new Map,n=function(t){if(e.has(t))return e.get(t);const n=t.toLowerCase();let r=e.get(n);if(void 0===r){const e=o(n,0),t=e?"":c(n,0);r=Object.freeze({basename:n.substr(t.length),name:n,prefix:t,vendor:t,custom:e})}return e.set(t,r),r},r=function(e){if(t.has(e))return t.get(e);let n=e,r=e[0];"/"===r?r="/"===e[1]?"//":"/":"_"!==r&&"*"!==r&&"$"!==r&&"#"!==r&&"+"!==r&&"&"!==r&&(r="");const s=o(n,r.length);if(!s&&(n=n.toLowerCase(),t.has(n))){const r=t.get(n);return t.set(e,r),r}const u=s?"":c(n,r.length),a=n.substr(0,r.length+u.length),h=Object.freeze({basename:n.substr(a.length),name:n.substr(r.length),hack:r,vendor:u,prefix:a,custom:s});return t.set(e,h),h},s=c;function o(e,t){return t=t||0,e.length-t>=2&&45===e.charCodeAt(t)&&45===e.charCodeAt(t+1)}function c(e,t){if(t=t||0,e.length-t>=3&&45===e.charCodeAt(t)&&45!==e.charCodeAt(t+1)){const n=e.indexOf("-",t+2);if(-1!==n)return e.substring(t,n+1)}return""}export{o as isCustomProperty,n as keyword,r as property,s as vendorPrefix};