import e from"../../../../../_virtual/index13.mjs";import{__require as r}from"../../utils/eachRoot.mjs";import{__require as t}from"../../utils/isWhitespace.mjs";import{__require as n}from"../../utils/namespace.mjs";import{__require as o}from"../../utils/ruleUrl.mjs";import{__require as s}from"../operator-no-unspaced/index.mjs";var i,a;function u(){if(a)return i;a=1;const{utils:u}=e,l=r(),m=t(),c=n(),p=o(),{calculationOperatorSpaceChecker:d}=s(),f=c("operator-no-newline-before"),_=u.ruleMessages(f,{rejected:e=>`Unexpected newline before "${e}"`}),x={url:p(f)};function j({string:e,globalIndex:r,startIndex:t,endIndex:n,node:o,result:s}){const i=e.substring(t,n+1);let a=!1,l=t-1;for(;l&&m(e[l]);){if("\n"===e[l]){a=!0;break}l--}if(a){const e=r+t;u.report({ruleName:f,result:s,node:o,message:_.rejected(i),index:e,endIndex:e+i.length})}}function g(e){return(r,t)=>{u.validateOptions(t,f,{actual:e})&&l(r,function(e){d({root:e,result:t,checker:j})})}}return g.ruleName=f,g.messages=_,g.meta=x,i=g}export{u as __require};