import{tokenize as e,isTokenWhiteSpaceOrComment as s,isTokenEOF as a,isTokenString as c,isTokenComment as t,isTokenWhitespace as r}from"@csstools/css-tokenizer";const o=/^property$/i,n=/^syntax$/i,creator=i=>{const p=Object.assign({preserve:!1},i);return{postcssPlugin:"postcss-syntax-descriptor-syntax-production",Declaration(i){if(!n.test(i.prop))return;if(!i.parent||"atrule"!==i.parent.type)return;if(!o.test(i.parent.name))return;const f=i.prev();if(f&&"decl"===f.type&&n.test(f.prop))return;const l=i.value,u=e({css:i.value}),d=u.filter(e=>!(s(e)||a(e)));if(1===d.length&&c(d[0]))return;let v="";u.forEach(e=>{t(e)||(r(e)?v+=" ":v+=e[1])});let g='"';for(const e of v){const s=e.codePointAt(0);if(void 0!==s)switch(s){case 0:g+=String.fromCodePoint(65533);break;case 34:case 92:g+="\\"+String.fromCodePoint(s);break;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 127:g+="\\"+s.toString(16)+" ";break;default:g+=String.fromCodePoint(s)}}g+='"',l!==g&&(i.cloneBefore({value:g}),p.preserve||i.remove())}}};creator.postcss=!0;export{creator as default};
