"use strict";var t=require("./ssr-RXknEJpO.js");const r=/^(\/+|\.+|ftp|http(s?):\/\/)/i;function i(t){return r.test(t)}const e="javascript:void(0)",o=/^(?:\w+script|data):/i,s=/&#(\w+)(^\w|;)?/g,n=/&(newline|tab);/gi,a=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;exports.FALLBACK_URL=e,exports.formatUrl=function(r){const e=t.isCSR?window.location.protocol:"https:";return i(r)?r:`${e}//${r}`},exports.isValidUrl=i,exports.sanitizeURL=function(t){if(t){return(r=t,r.replace(s,(t,r)=>String.fromCharCode(r))).replace(n,"").replace(a,"").trim().match(o)?e:t}var r;return e};
