"use strict";require("../../../../picocolors@1.0.0/node_modules/picocolors/picocolors.browser.js");const g=require("../../../../../../_virtual/___vite-browser-external.js"),_=require("../../../../../../_virtual/picocolors.browser.js");let f=_.picocolors_browser.exports,d=g;class h extends Error{constructor(e,s,t,o,n,c){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),o&&(this.source=o),c&&(this.plugin=c),typeof s<"u"&&typeof t<"u"&&(typeof s=="number"?(this.line=s,this.column=t):(this.line=s.line,this.column=s.column,this.endLine=t.line,this.endColumn=t.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,h)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let s=this.source;e==null&&(e=f.isColorSupported),d&&e&&(s=d(s));let t=s.split(/\r?\n/),o=Math.max(this.line-3,0),n=Math.min(this.line+2,t.length),c=String(n).length,a,l;if(e){let{bold:i,red:p,gray:u}=f.createColors(!0);a=r=>i(p(r)),l=r=>u(r)}else a=l=i=>i;return t.slice(o,n).map((i,p)=>{let u=o+1+p,r=" "+(" "+u).slice(-c)+" | ";if(u===this.line){let m=l(r.replace(/\d/g," "))+i.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(r)+i+`
 `+m+a("^")}return" "+l(r)+i}).join(`
`)}toString(){let e=this.showSourceCode();return e&&(e=`

`+e+`
`),this.name+": "+this.message+e}}var x=h;h.default=h;module.exports=x;
//# sourceMappingURL=css-syntax-error.js.map
