import{isString as e,isRegExp as t}from"../../utils/validateTypes.mjs";import r from"../../utils/functionArgumentsSearch.mjs";import s from"../../utils/getSchemeFromUrl.mjs";import m from"../../utils/isStandardSyntaxUrl.mjs";import l from"../../utils/matchesStringOrRegExp.mjs";import i from"../../utils/report.mjs";import o from"../../utils/ruleMessages.mjs";import a from"../../utils/validateOptions.mjs";const u="function-url-scheme-allowed-list",n=o(u,{rejected:e=>`Unexpected URL scheme "${e}:"`}),p=o=>(p,c)=>{a(c,u,{actual:o,possible:[e,t]})&&p.walkDecls(e=>{r(e.toString().toLowerCase(),"url",(t,r)=>{const a=t.trim();if(!m(a))return;const p=a.replace(/^['"]+|['"]+$/g,""),d=s(p);null!==d&&(l(d,o)||i({message:n.rejected,messageArgs:[d],node:e,index:r,endIndex:r+t.length,result:c,ruleName:u}))})})};p.primaryOptionArray=!0,p.ruleName=u,p.messages=n,p.meta={url:"https://stylelint.io/user-guide/rules/function-url-scheme-allowed-list"};export{p as default};