import t from"../../../../../_virtual/index19.mjs";import{isString as e,isRegExp as n}from"../../utils/validateTypes.mjs";import o from"../../utils/getDeclarationValue.mjs";import r from"../../utils/isStandardSyntaxValue.mjs";import s from"../../utils/optionsMatches.mjs";import i from"../../utils/report.mjs";import a from"../../utils/ruleMessages.mjs";import u from"../../utils/validateOptions.mjs";const l="annotation-no-unknown",m=a(l,{rejected:t=>`Unexpected unknown annotation "${t}"`}),p=(a,p)=>(f,c)=>{u(c,l,{actual:a},{actual:p,possible:{ignoreAnnotations:[e,n]},optional:!0})&&f.walkDecls(function(e){if(!r(e.value))return;if(e.important)return;if(!e.value.includes("!"))return;t(o(e)).walk(t=>{if(!function(t){return"word"===t.type&&t.value.startsWith("!")}(t))return;const n=t.value,o=n.slice(1);s(p,"ignoreAnnotations",o)||i({message:m.rejected,messageArgs:[n],node:e,result:c,ruleName:l,word:n})})})};p.ruleName=l,p.messages=m,p.meta={url:"https://stylelint.io/user-guide/rules/annotation-no-unknown"};export{p as default};