import{t as r}from"./chunk.window_CAbVMZox.esm.js";function t(r){return!("string"!=typeof r||!r)&&RegExp(/^[^@]+@[^@]+\.[^@]{2,}$/i).test(r)}function n(t){const n=new r.URL(t);if(("localhost"===n.hostname||"127.0.0.1"===n.hostname)&&"https:"!==n.protocol)throw new Error("using_localhost");if("https:"!==n.protocol)throw new Error("not_using_https");if("/"!==n.pathname)throw new Error("has_path");if(n.hash)throw new Error("has_hash");if(n.search)throw new Error("has_search");return!0}function o(t){try{return"https:"===new r.URL(t).protocol}catch(r){return!1}}function e({allowedOrigins:t,event:n,source:o}){return!!function(r,t){return r.source===t}(n,o)&&(!!t.some((t=>function(t,n){try{const o=new r.URL(t).host.split(".").reverse(),e=new r.URL(n).host.split(".").reverse();for(let r=0;r