"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=e(require("postcss-value-parser")),t={preserve:!1};const r=e=>{if(o(e)){const{value:r}=e,a=s.default(r);a.walk((e=>{c(e)&&n(e)}));const l=a.toString();l!==r&&(t.preserve?e.cloneBefore({value:l}):e.value=l)}},a=/^#([0-9A-Fa-f]{4}(?:[0-9A-Fa-f]{4})?)$/,l=/#([0-9A-Fa-f]{4}(?:[0-9A-Fa-f]{4})?)\b/,o=e=>l.test(e.value),c=e=>"word"===e.type&&a.test(e.value),n=e=>{const s=e.value,t=`0x${5===s.length?s.slice(1).replace(/[0-9A-f]/g,"$&$&"):s.slice(1)}`,[r,a,l,o]=[parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16),parseInt(t.slice(6,8),16),Math.round(parseInt(t.slice(8,10),16)/255*1e5)/1e5];e.value=`rgba(${r},${a},${l},${o})`};function u(e){return t.preserve="preserve"in Object(e)&&Boolean(e.preserve),{postcssPlugin:"postcss-color-hex-alpha",Declaration:r}}u.postcss=!0,module.exports=u;
