import{RULESET as r,KEYFRAMES as e,DECLARATION as t,WEBKIT as n,MOZ as i,MS as o}from"./Enum.js";import{sizeof as u,combine as a,replace as c,match as p}from"./Utility.js";import{copy as f}from"./Tokenizer.js";import{serialize as s}from"./Serializer.js";import{prefix as l}from"./Prefixer.js";function m(r){var e=u(r);return function(t,n,i,o){for(var u="",a=0;a<e;a++)u+=r[a](t,n,i,o)||"";return u}}function w(r){return function(e){e.root||(e=e.return)&&r(e)}}function d(u,m,w,d){if(!u.return)switch(u.type){case t:u.return=l(u.value,u.length);break;case e:return s([f(c(u.value,"@","@"+n),u,"")],d);case r:if(u.length)return a(u.props,(function(r){switch(p(r,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return s([f(c(r,/:(read-\w+)/,":"+i+"$1"),u,"")],d);case"::placeholder":return s([f(c(r,/:(plac\w+)/,":"+n+"input-$1"),u,""),f(c(r,/:(plac\w+)/,":"+i+"$1"),u,""),f(c(r,/:(plac\w+)/,o+"input-$1"),u,"")],d)}return""}))}}export{m as middleware,d as prefixer,w as rulesheet};
//# sourceMappingURL=Middleware.js.map
