import e from"../../../../../_virtual/index13.mjs";import{__require as r}from"../../utils/namespace.mjs";import{__require as s}from"../../utils/ruleUrl.mjs";var t,n;function o(){if(n)return t;n=1;const{utils:o}=e,l=r(),i=s(),u=l("block-no-redundant-nesting"),a=o.ruleMessages(u,{rejected:"Unexpected nesting for single child block"}),c={url:i(u),fixable:!0};function d(e,r){if(1!==e.nodes.length)return;const s=e.nodes[0];if("rule"!==s.type||s.selector.endsWith(":")||1!==e.selectors.length||1!==s.selectors.length)return;o.report({message:a.rejected,node:s,result:r,ruleName:u,fix:()=>{var t,n;if(e.selector=(t=e.selector,(n=s.selector).includes("&")?n.replace(/&/g,t):[t,n].join(" ")),e.nodes=s.nodes,e.raws.semicolon=s.raws.semicolon,1===e.nodes.length){for(const r of e.nodes)r.parent=e;d(e,r)}}})}function m(e){return(r,s)=>{o.validateOptions(s,u,{actual:e})&&r.walkRules(e=>d(e,s))}}return m.ruleName=u,m.messages=a,m.meta=c,t=m}export{o as __require};