import{z as i}from"./index-QQb7wQEC.js";function m(t){return new URLSearchParams(Object.entries(t).filter(([n,e])=>e!=null).reduce((n,[e,a])=>(n.append(e,a),n),new URLSearchParams))}const o=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi,r=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function s(t){return t=String(t),t==="null"||t.length===0||t==="about:blank"?"about:blank":t.match(o)||t.match(r)?t:`unsafe:${t}`}function p(t="about:blank"){return s(String(t).trim())}const c=i.string().url();export{m as o,p as s,c as u};
