import { b as e, e as t } from "./chunk.BlbRoQQ3.js";
import { b as n } from "./cjs.S1Glohke.js";
var r = /* @__PURE__ */ e(((exports, t) => {
	t.exports = function(e, t, a) {
		var o = document.head || document.getElementsByTagName("head")[0], s = document.createElement("script");
		typeof t == "function" && (a = t, t = {}), t ||= {}, a ||= function() {}, s.type = t.type || "text/javascript", s.charset = t.charset || "utf8", s.async = "async" in t ? !!t.async : !0, s.src = e, t.attrs && n(s, t.attrs), t.text && (s.text = "" + t.text);
		var c = "onload" in s ? r : i;
		c(s, a), s.onload || r(s, a), o.appendChild(s);
	};
	function n(e, t) {
		for (var n in t) e.setAttribute(n, t[n]);
	}
	function r(e, t) {
		e.onload = function() {
			this.onerror = this.onload = null, t(null, e);
		}, e.onerror = function() {
			this.onerror = this.onload = null, t(/* @__PURE__ */ Error("Failed to load " + this.src), e);
		};
	}
	function i(e, t) {
		e.onreadystatechange = function() {
			this.readyState != "complete" && this.readyState != "loaded" || (this.onreadystatechange = null, t(null, e));
		};
	}
})), i = /* @__PURE__ */ e(((exports, i) => {
	var a = Object.create, o = Object.defineProperty, s = Object.getOwnPropertyDescriptor, c = Object.getOwnPropertyNames, l = Object.getPrototypeOf, u = Object.prototype.hasOwnProperty, d = (e, t) => {
		for (var n in t) o(e, n, {
			get: t[n],
			enumerable: !0
		});
	}, f = (e, t, n, r) => {
		if (t && typeof t == "object" || typeof t == "function") for (let i of c(t)) !u.call(e, i) && i !== n && o(e, i, {
			get: () => t[i],
			enumerable: !(r = s(t, i)) || r.enumerable
		});
		return e;
	}, p = (e, t, n) => (n = e == null ? {} : a(l(e)), f(t || !e || !e.__esModule ? o(n, "default", {
		value: e,
		enumerable: !0
	}) : n, e)), m = (e) => f(o({}, "__esModule", { value: !0 }), e), h = {};
	d(h, {
		callPlayer: () => F,
		getConfig: () => N,
		getSDK: () => M,
		isBlobUrl: () => L,
		isMediaStream: () => I,
		lazy: () => y,
		omit: () => P,
		parseEndTime: () => D,
		parseStartTime: () => E,
		queryString: () => k,
		randomString: () => O,
		supportsWebKitPresentationMode: () => R
	}), i.exports = m(h);
	var g = p(t("react")), _ = p(r()), v = p(n());
	let y = (e) => g.default.lazy(async () => {
		let t = await e();
		return typeof t.default == "function" ? t : t.default;
	}), b = /[?&#](?:start|t)=([0-9hms]+)/, x = /[?&#]end=([0-9hms]+)/, S = /(\d+)(h|m|s)/g, C = /^\d+$/;
	function w(e, t) {
		if (e instanceof Array) return;
		let n = e.match(t);
		if (n) {
			let e = n[1];
			if (e.match(S)) return T(e);
			if (C.test(e)) return parseInt(e);
		}
	}
	function T(e) {
		let t = 0, n = S.exec(e);
		for (; n !== null;) {
			let [, r, i] = n;
			i === "h" && (t += parseInt(r, 10) * 60 * 60), i === "m" && (t += parseInt(r, 10) * 60), i === "s" && (t += parseInt(r, 10)), n = S.exec(e);
		}
		return t;
	}
	function E(e) {
		return w(e, b);
	}
	function D(e) {
		return w(e, x);
	}
	function O() {
		return Math.random().toString(36).substr(2, 5);
	}
	function k(e) {
		return Object.keys(e).map((t) => `${t}=${e[t]}`).join("&");
	}
	function A(e) {
		return window[e] ? window[e] : window.exports && window.exports[e] ? window.exports[e] : window.module && window.module.exports && window.module.exports[e] ? window.module.exports[e] : null;
	}
	let j = {}, M = z(function(e, t, n = null, r = () => !0, i = _.default) {
		let a = A(t);
		return a && r(a) ? Promise.resolve(a) : new Promise((r, a) => {
			if (j[e]) {
				j[e].push({
					resolve: r,
					reject: a
				});
				return;
			}
			j[e] = [{
				resolve: r,
				reject: a
			}];
			let o = (t) => {
				j[e].forEach((e) => e.resolve(t));
			};
			if (n) {
				let e = window[n];
				window[n] = function() {
					e && e(), o(A(t));
				};
			}
			i(e, (r) => {
				r ? (j[e].forEach((e) => e.reject(r)), j[e] = null) : n || o(A(t));
			});
		});
	});
	function N(e, t) {
		return (0, v.default)(t.config, e.config);
	}
	function P(e, ...t) {
		let n = [].concat(...t), r = {}, i = Object.keys(e);
		for (let t of i) n.indexOf(t) === -1 && (r[t] = e[t]);
		return r;
	}
	function F(e, ...t) {
		if (!this.player || !this.player[e]) {
			let t = `ReactPlayer: ${this.constructor.displayName} player could not call %c${e}%c \u2013 `;
			return this.player ? this.player[e] || (t += "The method was not available") : t += "The player was not available", console.warn(t, "font-weight: bold", ""), null;
		}
		return this.player[e](...t);
	}
	function I(e) {
		return typeof window < "u" && window.MediaStream !== void 0 && e instanceof window.MediaStream;
	}
	function L(e) {
		return /^blob:/.test(e);
	}
	function R(e = document.createElement("video")) {
		let t = /iPhone|iPod/.test(navigator.userAgent) === !1;
		return e.webkitSupportsPresentationMode && typeof e.webkitSetPresentationMode == "function" && t;
	}
	function z(e) {
		return e;
	}
})), a = /* @__PURE__ */ e(((exports, t) => {
	var n = Object.defineProperty, r = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyNames, o = Object.prototype.hasOwnProperty, s = (e, t) => {
		for (var r in t) n(e, r, {
			get: t[r],
			enumerable: !0
		});
	}, c = (e, t, i, s) => {
		if (t && typeof t == "object" || typeof t == "function") for (let c of a(t)) !o.call(e, c) && c !== i && n(e, c, {
			get: () => t[c],
			enumerable: !(s = r(t, c)) || s.enumerable
		});
		return e;
	}, l = (e) => c(n({}, "__esModule", { value: !0 }), e), u = {};
	s(u, {
		AUDIO_EXTENSIONS: () => E,
		DASH_EXTENSIONS: () => k,
		FLV_EXTENSIONS: () => A,
		HLS_EXTENSIONS: () => O,
		MATCH_URL_DAILYMOTION: () => S,
		MATCH_URL_FACEBOOK: () => g,
		MATCH_URL_FACEBOOK_WATCH: () => _,
		MATCH_URL_KALTURA: () => T,
		MATCH_URL_MIXCLOUD: () => C,
		MATCH_URL_MUX: () => h,
		MATCH_URL_SOUNDCLOUD: () => p,
		MATCH_URL_STREAMABLE: () => v,
		MATCH_URL_TWITCH_CHANNEL: () => x,
		MATCH_URL_TWITCH_VIDEO: () => b,
		MATCH_URL_VIDYARD: () => w,
		MATCH_URL_VIMEO: () => m,
		MATCH_URL_WISTIA: () => y,
		MATCH_URL_YOUTUBE: () => f,
		VIDEO_EXTENSIONS: () => D,
		canPlay: () => M
	}), t.exports = l(u);
	var d = i();
	let f = /(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//, p = /(?:soundcloud\.com|snd\.sc)\/[^.]+$/, m = /vimeo\.com\/(?!progressive_redirect).+/, h = /stream\.mux\.com\/(?!\w+\.m3u8)(\w+)/, g = /^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/, _ = /^https?:\/\/fb\.watch\/.+$/, v = /streamable\.com\/([a-z0-9]+)$/, y = /(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/, b = /(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/, x = /(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/, S = /^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:[\w.#_-]+)?/, C = /mixcloud\.com\/([^/]+\/[^/]+)/, w = /vidyard.com\/(?:watch\/)?([a-zA-Z0-9-_]+)/, T = /^https?:\/\/[a-zA-Z]+\.kaltura.(com|org)\/p\/([0-9]+)\/sp\/([0-9]+)00\/embedIframeJs\/uiconf_id\/([0-9]+)\/partner_id\/([0-9]+)(.*)entry_id.([a-zA-Z0-9-_].*)$/, E = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i, D = /\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i, O = /\.(m3u8)($|\?)/i, k = /\.(mpd)($|\?)/i, A = /\.(flv)($|\?)/i, j = (e) => {
		if (e instanceof Array) {
			for (let t of e) if (typeof t == "string" && j(t) || j(t.src)) return !0;
			return !1;
		}
		return (0, d.isMediaStream)(e) || (0, d.isBlobUrl)(e) ? !0 : E.test(e) || D.test(e) || O.test(e) || k.test(e) || A.test(e);
	}, M = {
		youtube: (e) => e instanceof Array ? e.every((e) => f.test(e)) : f.test(e),
		soundcloud: (e) => p.test(e) && !E.test(e),
		vimeo: (e) => m.test(e) && !D.test(e) && !O.test(e),
		mux: (e) => h.test(e),
		facebook: (e) => g.test(e) || _.test(e),
		streamable: (e) => v.test(e),
		wistia: (e) => y.test(e),
		twitch: (e) => b.test(e) || x.test(e),
		dailymotion: (e) => S.test(e),
		mixcloud: (e) => C.test(e),
		vidyard: (e) => w.test(e),
		kaltura: (e) => T.test(e),
		file: j
	};
}));
export { a as b, i as c };

//# sourceMappingURL=patterns.CVV2epWU.js.map