const t=["mp4","mov","avi"],r=t=>{if(!t)return!1;const r=t.replace(/\s+/g,"");if(r.startsWith("+")){if(r.length<4||r.length>15)return!1;const t=r.substring(1);return/^\d+$/.test(t)}return(r.length>=3&&r.length<=4||r.length>=8&&r.length<=10)&&/^\d+$/.test(r)},n=t=>!!t&&/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(t),e=t=>{if(!t)return!1;const r=t.trim();try{const t=new URL(r),n=t.protocol.replace(":","").toLowerCase();if("http"!==n&&"https"!==n)return!1;const e=t.hostname;return!(!e||!e.includes(".")||e.startsWith(".")||e.endsWith(".")||!/^[a-zA-Z0-9.-]+$/.test(e))}catch(t){return!1}},s=r=>{if(!r||!e(r))return!1;try{const n=new URL(r.trim()).pathname.toLowerCase();return t.some((t=>n.endsWith(`.${t}`)))}catch(t){return!1}};export{n as a,e as b,s as c,r as i}