import{k as u}from"./vidstack-Cu8FqSS9.js";import{i as e}from"./vidstack-pFwe7gvT.js";const d=/\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx|flac)($|\?)/i,p=new Set(["audio/mpeg","audio/ogg","audio/3gp","audio/mp3","audio/webm","audio/flac","audio/m4a","audio/m4b","audio/mp4a","audio/mp4"]),r=/\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i,s=new Set(["video/mp4","video/webm","video/3gp","video/ogg","video/avi","video/mpeg"]),S=/\.(m3u8)($|\?)/i,c=/\.(mpd)($|\?)/i,g=new Set(["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"]),l=new Set(["application/dash+xml"]);function o({src:a,type:i}){return e(a)?d.test(a)||p.has(i)||a.startsWith("blob:")&&i==="audio/object":i==="audio/object"}function n(a){return e(a.src)?r.test(a.src)||s.has(a.type)||a.src.startsWith("blob:")&&a.type==="video/object"||t(a)&&u():a.type==="video/object"}function t({src:a,type:i}){return e(a)&&S.test(a)||g.has(i)}function b({src:a,type:i}){return e(a)&&c.test(a)||l.has(i)}function f(a){return e(a.src)&&(o(a)||n(a)||t(a))}function E(a){return typeof window.MediaStream<"u"&&a instanceof window.MediaStream}function v(a,i=2){return Number(a.toFixed(i))}function w(a){return String(a).split(".")[1]?.length??0}function O(a,i,m){return Math.max(a,Math.min(m,i))}export{O as a,n as b,f as c,b as d,t as e,E as f,w as g,o as i,v as r};
