import e from"../../../../../_virtual/_node_path.mjs";import r from"../../../../../_virtual/index13.mjs";import{__require as t}from"../../utils/namespace.mjs";import{__require as i}from"../../utils/ruleUrl.mjs";var s,a;function u(){if(a)return s;a=1;const u=e,{utils:l}=r,n=t(),o=i(),c=n("partial-no-import"),p=l.ruleMessages(c,{expected:"Unexpected @import in a partial",expectedActualFile:"This rule won't work if linting in a code string without an actual file"}),m={url:o(c)};function d(e){return(r,t)=>{if(!l.validateOptions(t,c,{actual:e}))return;if(void 0===r.source.input.file||!r.source.input.file)return void l.report({message:p.expectedActualFile,node:r,index:1,endIndex:2,result:t,ruleName:c});const i=u.basename(r.source.input.file);".css"!==u.extname(r.source.input.file)&&"_"===i[0]&&r.walkAtRules("import",e=>{e.params.split(/["']\s*,/).forEach(r=>{!function(e,r){const i=e.replace(/^\s*(["'])\s*/,"").replace(/\s*(["'])\s*$/,"");""!==i.trim()&&"url("!==i.slice(0,4)&&".css"!==i.slice(-4)&&-1===i.search("//")&&-1===i.search(/[\s,)"']\w+$/)&&l.report({message:p.expected,node:r,word:i,result:t,ruleName:c})}(r,e)})})}}return d.ruleName=c,d.messages=p,d.meta=m,s=d}export{u as __require};