"use strict";const o=require("./no-work-result.js"),n=require("./lazy-result.js"),i=require("./document.js"),u=require("./root.js");let l=o,c=n,a=i,p=u;class r{constructor(t=[]){this.version="8.4.14",this.plugins=this.normalize(t)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}process(t,s={}){return this.plugins.length===0&&typeof s.parser>"u"&&typeof s.stringifier>"u"&&typeof s.syntax>"u"?new l(this,t,s):new c(this,t,s)}normalize(t){let s=[];for(let e of t)if(e.postcss===!0?e=e():e.postcss&&(e=e.postcss),typeof e=="object"&&Array.isArray(e.plugins))s=s.concat(e.plugins);else if(typeof e=="object"&&e.postcssPlugin)s.push(e);else if(typeof e=="function")s.push(e);else if(typeof e=="object"&&(e.parse||e.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(e+" is not a PostCSS plugin");return s}}var f=r;r.default=r;p.registerProcessor(r);a.registerProcessor(r);module.exports=f;
//# sourceMappingURL=processor.js.map
