import{isString as e,isRegExp as s}from"../../utils/validateTypes.mjs";import t from"../../utils/getRuleSelector.mjs";import r from"../../utils/isStandardSyntaxRule.mjs";import o from"../../utils/isStandardSyntaxSelector.mjs";import l from"../../utils/optionsMatches.mjs";import i from"../../utils/parseSelector.mjs";import{pseudoElements as m}from"../../reference/selectors.mjs";import n from"../../utils/report.mjs";import u from"../../utils/ruleMessages.mjs";import a from"../../utils/validateOptions.mjs";import p from"../../utils/vendor.mjs";const c="selector-pseudo-element-no-unknown",d=u(c,{rejected:e=>`Unexpected unknown pseudo-element selector "${e}"`}),f=(u,f)=>(j,g)=>{a(g,c,{actual:u},{actual:f,possible:{ignorePseudoElements:[e,s]},optional:!0})&&j.walkRules(e=>{e.selector.includes(":")&&r(e)&&i(t(e),g,e)?.walkPseudos(s=>{const t=s.value;if(!o(t))return;if("::"!==t.slice(0,2))return;if(l(f,"ignorePseudoElements",s.value.slice(2)))return;const r=t.slice(2);if(p.prefix(r)||m.has(r.toLowerCase()))return;const i=s.sourceIndex,u=i+t.length;n({message:d.rejected,messageArgs:[t],node:e,index:i,endIndex:u,ruleName:c,result:g})})})};f.ruleName=c,f.messages=d,f.meta={url:"https://stylelint.io/user-guide/rules/selector-pseudo-element-no-unknown"};export{f as default};