import e from"../../../../../_virtual/index13.mjs";import{__require as r}from"../../utils/addEmptyLineBefore.mjs";import{__require as t}from"../../utils/isInlineComment.mjs";import{__require as i}from"../../utils/namespace.mjs";import{__require as n}from"../../utils/optionsHaveException.mjs";import{__require as s}from"../../utils/optionsHaveIgnored.mjs";import{__require as o}from"../../utils/removeEmptyLinesBefore.mjs";import{__require as m}from"../../utils/ruleUrl.mjs";var l,a;function u(){if(a)return l;a=1;const{utils:u}=e,p=r(),f=t(),c=i(),d=n(),_=s(),b=o(),x=m(),y=c("double-slash-comment-empty-line-before"),j=u.ruleMessages(y,{expected:"Expected empty line before comment",rejected:"Unexpected empty line before comment"}),v={url:x(y),fixable:!0};function w(e,r,t){return(i,n)=>{u.validateOptions(n,y,{actual:e,possible:["always","never"]},{actual:r,possible:{except:["first-nested","inside-block"],ignore:["stylelint-commands","between-comments","inside-block"]},optional:!0})&&i.walkComments(s=>{if(!s.raws.inline&&!s.inline)return;if(f(s))return;if(s===i.first)return;if(0===s.text.indexOf("stylelint-")&&_(r,"stylelint-commands"))return;if(s.parent!==i&&_(r,"inside-block"))return;const o=s.prev();if(o&&"comment"===o.type&&_(r,"between-comments"))return;const m=s.raw("before"),l=(!d(r,"first-nested")||s.parent===i||s!==s.parent.first)&&(s.parent!==i&&d(r,"inside-block")?"never"===e:"always"===e),a=-1!==m.search(/\n\s*?\n/);if(l===a)return;const c=l?j.expected:j.rejected;u.report({message:c,node:s,result:n,ruleName:y,fix:()=>{!l||a?l||!a||b(s,t.newline):p(s,t.newline)}})})}}return w.ruleName=y,w.messages=j,w.meta=v,l=w}export{u as __require};