Injection Type:
diff --git a/inject.js b/inject.js
index d537fc4..5c49cb2 100644
--- a/inject.js
+++ b/inject.js
@@ -1,29 +1,38 @@
-let customBase64 = "PlaceHolder";
-let psshFound = false;
-let postRequestFound = false;
-let firstValidLicenseResponse = false;
-let firstValidServiceCertificate = false;
-let remoteCDM = null;
-let decryptionKeys = null;
-let messageSuppressed = false;
-let interceptType = "DISABLED"; // Default to LICENSE, can be changed to 'EME' for EME interception
-let originalChallenge = null;
let widevineDeviceInfo = null;
let playreadyDeviceInfo = null;
-let drmOveride = "DISABLED"
+let originalChallenge = null
+let serviceCertFound = false;
+let drmType = "NONE";
+let psshFound = false;
+let foundWidevinePssh = null;
+let foundPlayreadyPssh = null;
+let drmDecided = null;
+let drmOverride = "DISABLED";
+let interceptType = "DISABLED";
+let remoteCDM = null;
+let generateRequestCalled = false;
+let remoteListenerMounted = false;
+let injectionSuccess = false;
+let foundChallengeInBody = false;
+let licenseResponseCounter = 0;
+let keysRetrieved = false;
+// Post message to content.js to get DRM override
window.postMessage({ type: "__GET_DRM_OVERRIDE__" }, "*");
+// Add listener for DRM override messages
window.addEventListener("message", function(event) {
if (event.source !== window) return;
if (event.data.type === "__DRM_OVERRIDE__") {
- drmOveride = event.data.drmOverride || "DISABLED";
- console.log("DRM Override set to:", drmOveride);
+ drmOverride = event.data.drmOverride || "DISABLED";
+ console.log("DRM Override set to:", drmOverride);
}
});
+// Post message to content.js to get injection type
window.postMessage({ type: "__GET_INJECTION_TYPE__" }, "*");
+// Add listener for injection type messages
window.addEventListener("message", function(event) {
if (event.source !== window) return;
@@ -33,25 +42,25 @@ window.addEventListener("message", function(event) {
}
});
-
+// Post message to get CDM devices
window.postMessage({ type: "__GET_CDM_DEVICES__" }, "*");
+// Add listener for CDM device messages
window.addEventListener("message", function(event) {
if (event.source !== window) return;
if (event.data.type === "__CDM_DEVICES__") {
const { widevine_device, playready_device } = event.data;
- // Now you can use widevine_device and playready_device!
console.log("Received device info:", widevine_device, playready_device);
- // Store them globally
widevineDeviceInfo = widevine_device;
playreadyDeviceInfo = playready_device;
}
});
+// PlayReady Remote CDM Class
class remotePlayReadyCDM {
constructor(security_level, host, secret, device_name) {
this.security_level = security_level;
@@ -60,405 +69,273 @@ class remotePlayReadyCDM {
this.device_name = device_name;
this.session_id = null;
this.challenge = null;
+ this.keys = null;
}
- async openSession() {
+ // Open PlayReady session
+ openSession() {
const url = `${this.host}/remotecdm/playready/${this.device_name}/open`;
-
- try {
- const response = await fetch(url, {
- method: 'GET',
- headers: {
- 'Content-Type': 'application/json'
- }
- });
-
- const jsonData = await response.json();
-
- if (response.ok && jsonData.data?.session_id) {
- this.session_id = jsonData.data.session_id;
- return { success: true, session_id: this.session_id };
- } else {
- return { success: false, error: jsonData.message || 'Unknown error occurred.' };
- }
-
- } catch (error) {
- return { success: false, error: error.message };
+ const xhr = new XMLHttpRequest();
+ xhr.open('GET', url, false);
+ xhr.setRequestHeader('Content-Type', 'application/json');
+ xhr.send();
+ const jsonData = JSON.parse(xhr.responseText);
+ if (jsonData.data?.session_id) {
+ this.session_id = jsonData.data.session_id;
+ console.log("PlayReady session opened:", this.session_id);
+ } else {
+ console.error("Failed to open PlayReady session:", jsonData.message);
+ throw new Error("Failed to open PlayReady session");
}
}
- async getChallenge(init_data) {
+ // Get PlayReady challenge
+ getChallenge(init_data) {
const url = `${this.host}/remotecdm/playready/${this.device_name}/get_license_challenge`;
-
+ const xhr = new XMLHttpRequest();
+ xhr.open('POST', url, false);
+ xhr.setRequestHeader('Content-Type', 'application/json');
const body = {
session_id: this.session_id,
- init_data: init_data,
+ init_data: init_data
};
-
- try {
- const response = await fetch(url, {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- body: JSON.stringify(body)
- });
-
- const jsonData = await response.json();
-
- if (response.ok && jsonData.data?.challenge) {
- return {
- success: true,
- challenge: jsonData.data.challenge
- };
- } else {
- return {
- success: false,
- error: jsonData.message || 'Failed to retrieve license challenge.'
- };
- }
-
- } catch (error) {
- return {
- success: false,
- error: error.message
- };
+ xhr.send(JSON.stringify(body));
+ const jsonData = JSON.parse(xhr.responseText);
+ if (jsonData.data?.challenge) {
+ this.challenge = btoa(jsonData.data.challenge);
+ console.log("PlayReady challenge received:", this.challenge);
+ } else {
+ console.error("Failed to get PlayReady challenge:", jsonData.message);
+ throw new Error("Failed to get PlayReady challenge");
}
}
- async parseLicense(license_message) {
+ // Parse PlayReady license response
+ parseLicense(license_message) {
const url = `${this.host}/remotecdm/playready/${this.device_name}/parse_license`;
-
+ const xhr = new XMLHttpRequest();
+ xhr.open('POST', url, false);
+ xhr.setRequestHeader('Content-Type', 'application/json');
const body = {
session_id: this.session_id,
license_message: license_message
- };
-
- try {
- const response = await fetch(url, {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- body: JSON.stringify(body)
- });
-
- const jsonData = await response.json();
-
- if (response.ok && jsonData.message === "Successfully parsed and loaded the Keys from the License message") {
- return {
- success: true,
- message: jsonData.message
- };
- } else {
- return {
- success: false,
- error: jsonData.message || 'Failed to parse license.'
- };
- }
- } catch (error) {
- return {
- success: false,
- error: error.message
- };
+ }
+ xhr.send(JSON.stringify(body));
+ const jsonData = JSON.parse(xhr.responseText);
+ if (jsonData.message === "Successfully parsed and loaded the Keys from the License message")
+ {
+ console.log("PlayReady license response parsed successfully");
+ return true;
+ } else {
+ console.error("Failed to parse PlayReady license response:", jsonData.message);
+ throw new Error("Failed to parse PlayReady license response");
}
}
- async closeSession() {
- const url = `${this.host}/remotecdm/playready/${this.device_name}/close/${this.session_id}`;
-
- try {
- const response = await fetch(url, {
- method: 'GET',
- headers: { 'Content-Type': 'application/json' }
- });
-
- const jsonData = await response.json();
-
- if (response.ok) {
- return { success: true, message: jsonData.message };
- } else {
- return { success: false, error: jsonData.message || 'Failed to close session.' };
- }
- } catch (error) {
- return { success: false, error: error.message };
- }
- }
-
-
- async getKeys() {
+ // Get PlayReady keys
+ getKeys() {
const url = `${this.host}/remotecdm/playready/${this.device_name}/get_keys`;
-
+ const xhr = new XMLHttpRequest();
+ xhr.open('POST', url, false);
+ xhr.setRequestHeader('Content-Type', 'application/json');
const body = {
session_id: this.session_id
- };
+ }
+ xhr.send(JSON.stringify(body));
+ const jsonData = JSON.parse(xhr.responseText);
+ if (jsonData.data?.keys) {
+ this.keys = jsonData.data.keys;
+ console.log("PlayReady keys received:", this.keys);
+ } else {
+ console.error("Failed to get PlayReady keys:", jsonData.message);
+ throw new Error("Failed to get PlayReady keys");
+ }
+ }
- try {
- const response = await fetch(url, {
- method: 'POST',
- headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify(body)
- });
-
- const jsonData = await response.json();
-
- if (response.ok && jsonData.data?.keys) {
- decryptionKeys = jsonData.data.keys;
-
- // Automatically close the session after key retrieval
- await this.closeSession();
-
- return { success: true, keys: decryptionKeys };
- } else {
- return {
- success: false,
- error: jsonData.message || 'Failed to retrieve decryption keys.'
- };
- }
-
- } catch (error) {
- return { success: false, error: error.message };
+ // Close PlayReady session
+ closeSession () {
+ const url = `${this.host}/remotecdm/playready/${this.device_name}/close/${this.session_id}`;
+ const xhr = new XMLHttpRequest();
+ xhr.open('GET', url, false);
+ xhr.setRequestHeader('Content-Type', 'application/json');
+ xhr.send();
+ const jsonData = JSON.parse(xhr.responseText);
+ if (jsonData) {
+ console.log("PlayReady session closed successfully");
+ } else {
+ console.error("Failed to close PlayReady session:", jsonData.message);
+ throw new Error("Failed to close PlayReady session");
}
}
}
+// Widevine Remote CDM Class
class remoteWidevineCDM {
- constructor(device_type, system_id, security_level, host, secret, device_name) {
- this.device_type = device_type;
- this.system_id = system_id;
- this.security_level = security_level;
- this.host = host;
- this.secret = secret;
- this.device_name = device_name;
- this.session_id = null;
- this.challenge = null;
- }
+ constructor(device_type, system_id, security_level, host, secret, device_name) {
+ this.device_type = device_type;
+ this.system_id = system_id;
+ this.security_level = security_level;
+ this.host = host;
+ this.secret = secret;
+ this.device_name = device_name;
+ this.session_id = null;
+ this.challenge = null;
+ this.keys = null;
+ }
- async openSession() {
+ // Open Widevine session
+ openSession () {
const url = `${this.host}/remotecdm/widevine/${this.device_name}/open`;
-
- try {
- const response = await fetch(url, {
- method: 'GET',
- headers: {
- 'Content-Type': 'application/json'
- }
- });
-
- const jsonData = await response.json();
-
- if (response.ok && jsonData.status === 200 && jsonData.data?.session_id) {
- this.session_id = jsonData.data.session_id;
- return { success: true, session_id: this.session_id };
- } else {
- return { success: false, error: jsonData.message || 'Unknown error occurred.' };
- }
-
- } catch (error) {
- return { success: false, error: error.message };
+ const xhr = new XMLHttpRequest();
+ xhr.open('GET', url, false);
+ xhr.setRequestHeader('Content-Type', 'application/json');
+ xhr.send();
+ const jsonData = JSON.parse(xhr.responseText);
+ if (jsonData.data?.session_id) {
+ this.session_id = jsonData.data.session_id;
+ console.log("Widevine session opened:", this.session_id);
+ } else {
+ console.error("Failed to open Widevine session:", jsonData.message);
+ throw new Error("Failed to open Widevine session");
}
}
- async setServiceCertificate(certificate) {
+ // Set Widevine service certificate
+ setServiceCertificate(certificate) {
const url = `${this.host}/remotecdm/widevine/${this.device_name}/set_service_certificate`;
-
+ const xhr = new XMLHttpRequest();
+ xhr.open('POST', url, false);
+ xhr.setRequestHeader('Content-Type', 'application/json');
const body = {
session_id: this.session_id,
certificate: certificate ?? null
- };
-
- try {
- const response = await fetch(url, {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- body: JSON.stringify(body)
- });
-
- const jsonData = await response.json();
-
- if (response.ok && jsonData.status === 200) {
- return { success: true };
- } else {
- return { success: false, error: jsonData.message || 'Failed to set service certificate.' };
- }
-
- } catch (error) {
- return { success: false, error: error.message };
+ }
+ xhr.send(JSON.stringify(body));
+ const jsonData = JSON.parse(xhr.responseText);
+ if (jsonData.status === 200) {
+ console.log("Service certificate set successfully");
+ } else {
+ console.error("Failed to set service certificate:", jsonData.message);
+ throw new Error("Failed to set service certificate");
}
}
- async getChallenge(init_data, license_type = 'STREAMING', privacy_mode = false) {
+ // Get Widevine challenge
+ getChallenge(init_data, license_type = 'STREAMING') {
const url = `${this.host}/remotecdm/widevine/${this.device_name}/get_license_challenge/${license_type}`;
-
+ const xhr = new XMLHttpRequest();
+ xhr.open('POST', url, false);
+ xhr.setRequestHeader('Content-Type', 'application/json');
const body = {
session_id: this.session_id,
init_data: init_data,
- privacy_mode: privacy_mode
+ privacy_mode: serviceCertFound
};
-
- try {
- const response = await fetch(url, {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- body: JSON.stringify(body)
- });
-
- const jsonData = await response.json();
-
- if (response.ok && jsonData.status === 200 && jsonData.data?.challenge_b64) {
- return {
- success: true,
- challenge: jsonData.data.challenge_b64
- };
- } else {
- return {
- success: false,
- error: jsonData.message || 'Failed to retrieve license challenge.'
- };
- }
-
- } catch (error) {
- return {
- success: false,
- error: error.message
- };
+ xhr.send(JSON.stringify(body));
+ const jsonData = JSON.parse(xhr.responseText);
+ if (jsonData.data?.challenge_b64) {
+ this.challenge = jsonData.data.challenge_b64;
+ console.log("Widevine challenge received:", this.challenge);
+ } else {
+ console.error("Failed to get Widevine challenge:", jsonData.message);
+ throw new Error("Failed to get Widevine challenge");
}
}
- async parseLicense(license_message) {
- const url = `${this.host}/remotecdm/widevine/${this.device_name}/parse_license`;
+ // Parse Widevine license response
+ parseLicense(license_message) {
+ const url = `${this.host}/remotecdm/widevine/${this.device_name}/parse_license`;
+ const xhr = new XMLHttpRequest();
+ xhr.open('POST', url, false);
+ xhr.setRequestHeader('Content-Type', 'application/json');
const body = {
session_id: this.session_id,
license_message: license_message
};
-
- try {
- const response = await fetch(url, {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- body: JSON.stringify(body)
- });
-
- const jsonData = await response.json();
-
- if (response.ok && jsonData.status === 200) {
- return {
- success: true,
- message: jsonData.message
- };
- } else {
- return {
- success: false,
- error: jsonData.message || 'Failed to parse license.'
- };
- }
- } catch (error) {
- return {
- success: false,
- error: error.message
- };
+ xhr.send(JSON.stringify(body));
+ const jsonData = JSON.parse(xhr.responseText);
+ if (jsonData.status === 200) {
+ console.log("Widevine license response parsed successfully");
+ return true;
+ } else {
+ console.error("Failed to parse Widevine license response:", jsonData.message);
+ throw new Error("Failed to parse Widevine license response");
}
}
- async closeSession() {
- const url = `${this.host}/remotecdm/widevine/${this.device_name}/close/${this.session_id}`;
-
- try {
- const response = await fetch(url, {
- method: 'GET',
- headers: { 'Content-Type': 'application/json' }
- });
-
- const jsonData = await response.json();
-
- if (response.ok && jsonData.status === 200) {
- return { success: true, message: jsonData.message };
- } else {
- return { success: false, error: jsonData.message || 'Failed to close session.' };
- }
- } catch (error) {
- return { success: false, error: error.message };
- }
- }
-
-
- async getKeys() {
+ // Get Widevine keys
+ getKeys() {
const url = `${this.host}/remotecdm/widevine/${this.device_name}/get_keys/ALL`;
-
+ const xhr = new XMLHttpRequest();
+ xhr.open('POST', url, false);
+ xhr.setRequestHeader('Content-Type', 'application/json');
const body = {
session_id: this.session_id
};
+ xhr.send(JSON.stringify(body));
+ const jsonData = JSON.parse(xhr.responseText);
+ if (jsonData.data?.keys) {
+ this.keys = jsonData.data.keys;
+ console.log("Widevine keys received:", this.keys);
+ } else {
+ console.error("Failed to get Widevine keys:", jsonData.message);
+ throw new Error("Failed to get Widevine keys");
+ }
+ }
- try {
- const response = await fetch(url, {
- method: 'POST',
- headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify(body)
- });
-
- const jsonData = await response.json();
-
- if (response.ok && jsonData.status === 200 && jsonData.data?.keys) {
- decryptionKeys = jsonData.data.keys;
-
- // Automatically close the session after key retrieval
- await this.closeSession();
-
- return { success: true, keys: decryptionKeys };
- } else {
- return {
- success: false,
- error: jsonData.message || 'Failed to retrieve decryption keys.'
- };
- }
-
- } catch (error) {
- return { success: false, error: error.message };
+ // Close Widevine session
+ closeSession() {
+ const url = `${this.host}/remotecdm/widevine/${this.device_name}/close/${this.session_id}`;
+ const xhr = new XMLHttpRequest();
+ xhr.open('GET', url, false);
+ xhr.setRequestHeader('Content-Type', 'application/json');
+ xhr.send();
+ const jsonData = JSON.parse(xhr.responseText);
+ if (jsonData) {
+ console.log("Widevine session closed successfully");
+ } else {
+ console.error("Failed to close Widevine session:", jsonData.message);
+ throw new Error("Failed to close Widevine session");
}
}
}
+// Utility functions
+function hexStrToU8(hexString) {
+ return Uint8Array.from(hexString.match(/.{1,2}/g).map(byte => parseInt(byte, 16)));
+}
+function u8ToHexStr(bytes) {
+ return bytes.reduce((str, byte) => str + byte.toString(16).padStart(2, '0'), '');
+}
-// --- Utility functions ---
-const hexStrToU8 = hexString =>
- Uint8Array.from(hexString.match(/.{1,2}/g).map(byte => parseInt(byte, 16)));
+function b64ToHexStr(b64) {
+ return [...atob(b64)].map(c => c.charCodeAt(0).toString(16).padStart(2, '0')).join``;
+}
-const u8ToHexStr = bytes =>
- bytes.reduce((str, byte) => str + byte.toString(16).padStart(2, '0'), '');
-
-const b64ToHexStr = b64 =>
- [...atob(b64)].map(c => c.charCodeAt(0).toString(16).padStart(2, '0')).join``;
-
-function jsonContainsValue(obj, target) {
- if (typeof obj === "string") return obj === target;
- if (Array.isArray(obj)) return obj.some(val => jsonContainsValue(val, target));
+function jsonContainsValue(obj, prefix = "CAES") {
+ if (typeof obj === "string") return obj.startsWith(prefix);
+ if (Array.isArray(obj)) return obj.some(val => jsonContainsValue(val, prefix));
if (typeof obj === "object" && obj !== null) {
- return Object.values(obj).some(val => jsonContainsValue(val, target));
+ return Object.values(obj).some(val => jsonContainsValue(val, prefix));
}
return false;
}
-function jsonReplaceValue(obj, target, newValue) {
+function jsonReplaceValue(obj, newValue) {
if (typeof obj === "string") {
- return obj === target ? newValue : obj;
+ return obj.startsWith("CAES") || obj.startsWith("PD94") ? newValue : obj;
}
if (Array.isArray(obj)) {
- return obj.map(item => jsonReplaceValue(item, target, newValue));
+ return obj.map(item => jsonReplaceValue(item, newValue));
}
if (typeof obj === "object" && obj !== null) {
const newObj = {};
for (const key in obj) {
if (Object.hasOwn(obj, key)) {
- newObj[key] = jsonReplaceValue(obj[key], target, newValue);
+ newObj[key] = jsonReplaceValue(obj[key], newValue);
}
}
return newObj;
@@ -467,16 +344,15 @@ function jsonReplaceValue(obj, target, newValue) {
return obj;
}
-const isJson = (str) => {
+function isJson(str) {
try {
JSON.parse(str);
return true;
} catch (e) {
return false;
}
-};
+}
-// --- Widevine-style PSSH extractor ---
function getWidevinePssh(buffer) {
const hex = u8ToHexStr(new Uint8Array(buffer));
const match = hex.match(/000000(..)?70737368.*/);
@@ -487,7 +363,6 @@ function getWidevinePssh(buffer) {
return window.btoa(String.fromCharCode(...bytes));
}
-// --- PlayReady-style PSSH extractor ---
function getPlayReadyPssh(buffer) {
const u8 = new Uint8Array(buffer);
const systemId = "9a04f07998404286ab92e65be0885f95";
@@ -503,18 +378,16 @@ function getPlayReadyPssh(buffer) {
return window.btoa(String.fromCharCode(...psshBytes));
}
-// --- Clearkey Support ---
function getClearkey(response) {
- let obj = JSON.parse((new TextDecoder("utf-8")).decode(response));
- return obj["keys"].map(o => ({
- key_id: b64ToHexStr(o["kid"].replace(/-/g, '+').replace(/_/g, '/')),
- key: b64ToHexStr(o["k"].replace(/-/g, '+').replace(/_/g, '/')),
- }));
+ let obj = JSON.parse((new TextDecoder("utf-8")).decode(response));
+ return obj["keys"].map(o => ({
+ key_id: b64ToHexStr(o["kid"].replace(/-/g, '+').replace(/_/g, '/')),
+ key: b64ToHexStr(o["k"].replace(/-/g, '+').replace(/_/g, '/')),
+ }));
}
-// --- Convert Base64 to Uint8Array ---
function base64ToUint8Array(base64) {
- const binaryStr = atob(base64); // Decode base64 to binary string
+ const binaryStr = atob(base64);
const len = binaryStr.length;
const bytes = new Uint8Array(len);
for (let i = 0; i < len; i++) {
@@ -524,227 +397,132 @@ function base64ToUint8Array(base64) {
}
function arrayBufferToBase64(uint8array) {
- let binary = '';
- const len = uint8array.length;
+ let binary = '';
+ const len = uint8array.length;
- // Convert each byte to a character
- for (let i = 0; i < len; i++) {
- binary += String.fromCharCode(uint8array[i]);
- }
+ for (let i = 0; i < len; i++) {
+ binary += String.fromCharCode(uint8array[i]);
+ }
- // Encode the binary string to Base64
- return window.btoa(binary);
+ return window.btoa(binary);
}
-// --- Intercepting EME Calls ---
+// Challenge generator interceptor
const originalGenerateRequest = MediaKeySession.prototype.generateRequest;
-
-MediaKeySession.prototype.generateRequest = async function(initDataType, initData) {
- console.log(initData);
+MediaKeySession.prototype.generateRequest = function(initDataType, initData) {
const session = this;
-
- let playReadyAttempted = false;
- let playReadySucceeded = false;
- let playReadyPssh = null;
- let widevinePssh = null;
-
- if (!psshFound && !messageSuppressed && (interceptType === 'EME' || interceptType === 'LICENSE')) {
- // === Try PlayReady First ===
- playReadyPssh = getPlayReadyPssh(initData);
- playReadyAttempted = !!playReadyPssh;
-
- if (playReadyPssh && drmOveride !== "WIDEVINE") {
- console.log("[PlayReady PSSH] Found:", playReadyPssh);
- const drmType = {
- type: "__DRM_TYPE__",
- data: 'PlayReady'
- };
- window.postMessage(drmType, "*");
- try {
+ let playReadyPssh = getPlayReadyPssh(initData);
+ if (playReadyPssh) {
+ console.log("[DRM Detected] PlayReady");
+ foundPlayreadyPssh = playReadyPssh;
+ console.log("[PlayReady PSSH found] " + playReadyPssh)
+ }
+ let wideVinePssh = getWidevinePssh(initData)
+ if (wideVinePssh) {
+ // Widevine code
+ console.log("[DRM Detected] Widevine");
+ foundWidevinePssh = wideVinePssh;
+ console.log("[Widevine PSSH found] " + wideVinePssh)
+ }
+ // Challenge message interceptor
+ if (!remoteListenerMounted) {
+ remoteListenerMounted = true;
+ session.addEventListener("message", function messageInterceptor(event) {
+ event.stopImmediatePropagation();
+ const uint8Array = new Uint8Array(event.message);
+ const base64challenge = arrayBufferToBase64(uint8Array);
+ if (base64challenge === "CAQ=" && interceptType !== "DISABLED" && !serviceCertFound) {
const {
- security_level, host, secret, device_name
- } = playreadyDeviceInfo;
- remoteCDM = new remotePlayReadyCDM(security_level, host, secret, device_name);
- const sessionResult = await remoteCDM.openSession();
- if (sessionResult.success) {
- console.log("PlayReady session opened:", sessionResult.session_id);
- const challengeResult = await remoteCDM.getChallenge(playReadyPssh);
- if (challengeResult.success) {
- customBase64 = btoa(challengeResult.challenge);
- playReadySucceeded = true;
- psshFound = true;
- window.postMessage({ type: "__PSSH_DATA__", data: playReadyPssh }, "*");
- } else {
- console.warn("PlayReady challenge failed:", challengeResult.error);
- }
- } else {
- console.warn("PlayReady session failed:", sessionResult.error);
- }
- } catch (err) {
- console.error("PlayReady error:", err.message);
+ device_type, system_id, security_level, host, secret, device_name
+ } = widevineDeviceInfo;
+ remoteCDM = new remoteWidevineCDM(device_type, system_id, security_level, host, secret, device_name);
+ remoteCDM.openSession();
}
- } else {
- console.log("[PlayReady PSSH] Not found.");
- }
-
- // === Fallback to Widevine ===
- if (!playReadySucceeded) {
- widevinePssh = getWidevinePssh(initData);
- if (widevinePssh && drmOveride !== "PLAYREADY") {
- console.log("[Widevine PSSH] Found:", widevinePssh);
- const drmType = {
- type: "__DRM_TYPE__",
- data: 'Widevine'
- };
- window.postMessage(drmType, "*");
- try {
- const {
- device_type, system_id, security_level, host, secret, device_name
- } = widevineDeviceInfo;
- remoteCDM = new remoteWidevineCDM(device_type, system_id, security_level, host, secret, device_name);
- const sessionResult = await remoteCDM.openSession();
- if (sessionResult.success) {
- console.log("Widevine session opened:", sessionResult.session_id);
- const challengeResult = await remoteCDM.getChallenge(widevinePssh);
- if (challengeResult.success) {
- customBase64 = challengeResult.challenge;
- psshFound = true;
- window.postMessage({ type: "__PSSH_DATA__", data: widevinePssh }, "*");
- } else {
- console.warn("Widevine challenge failed:", challengeResult.error);
- }
- } else {
- console.warn("Widevine session failed:", sessionResult.error);
- }
- } catch (err) {
- console.error("Widevine error:", err.message);
+ if (!injectionSuccess && base64challenge !== "CAQ=" && interceptType !== "DISABLED") {
+ if (interceptType === "EME") {
+ injectionSuccess = true;
}
- } else {
- console.log("[Widevine PSSH] Not found.");
- }
- }
-
- // === Intercept License or EME Messages ===
- if (!messageSuppressed && interceptType === 'EME') {
- session.addEventListener("message", function originalMessageInterceptor(event) {
- event.stopImmediatePropagation();
- console.log("[Intercepted EME Message] Injecting custom message.");
- console.log(event.data);
-
- const uint8 = base64ToUint8Array(customBase64);
- const arrayBuffer = uint8.buffer;
-
- const syntheticEvent = new MessageEvent("message", {
- data: event.data,
- origin: event.origin,
- lastEventId: event.lastEventId,
- source: event.source,
- ports: event.ports
- });
-
- Object.defineProperty(syntheticEvent, "message", {
- get: () => arrayBuffer
- });
- console.log(syntheticEvent);
- setTimeout(() => session.dispatchEvent(syntheticEvent), 0);
- }, { once: true });
-
- messageSuppressed = true;
- }
-
- if (!messageSuppressed && interceptType === 'LICENSE') {
- session.addEventListener("message", function originalMessageInterceptor(event) {
- if (playReadyAttempted && playReadySucceeded) {
+ if (!originalChallenge) {
+ originalChallenge = base64challenge;
+ }
+ if (originalChallenge.startsWith("CAES")) {
+ window.postMessage({ type: "__DRM_TYPE__", data: "Widevine" }, "*");
+ window.postMessage({ type: "__PSSH_DATA__", data: foundWidevinePssh }, "*");
+ if (interceptType === "EME" && !remoteCDM) {
+ const {
+ device_type, system_id, security_level, host, secret, device_name
+ } = widevineDeviceInfo;
+ remoteCDM = new remoteWidevineCDM(device_type, system_id, security_level, host, secret, device_name);
+ remoteCDM.openSession();
+ remoteCDM.getChallenge(foundWidevinePssh);
+ }}
+ if (!originalChallenge.startsWith("CAES")) {
const buffer = event.message;
const decoder = new TextDecoder('utf-16');
const decodedText = decoder.decode(buffer);
const match = decodedText.match(/([^<]+)<\/Challenge>/);
if (match) {
+ window.postMessage({ type: "__DRM_TYPE__", data: "PlayReady" }, "*");
+ window.postMessage({ type: "__PSSH_DATA__", data: foundPlayreadyPssh }, "*");
originalChallenge = match[1];
- console.log("[PlayReady Challenge Extracted]");
- messageSuppressed = true;
- }
+ if (interceptType === "EME" && !remoteCDM) {
+ const {
+ security_level, host, secret, device_name
+ } = playreadyDeviceInfo;
+ remoteCDM = new remotePlayReadyCDM(security_level, host, secret, device_name)
+ remoteCDM.openSession();
+ remoteCDM.getChallenge(foundPlayreadyPssh);
+ }
+ }}
+ if (interceptType === "EME" && remoteCDM) {
+ const uint8challenge = base64ToUint8Array(remoteCDM.challenge);
+ const challengeBuffer = uint8challenge.buffer;
+ const syntheticEvent = new MessageEvent("message", {
+ data: event.data,
+ origin: event.origin,
+ lastEventId: event.lastEventId,
+ source: event.source,
+ ports: event.ports
+ });
+ Object.defineProperty(syntheticEvent, "message", {
+ get: () => challengeBuffer
+ });
+ console.log("Intercepted EME Challenge and injected custom one.")
+ session.dispatchEvent(syntheticEvent);
}
-
- if (!playReadySucceeded && widevinePssh && psshFound) {
- const uint8Array = new Uint8Array(event.message);
- const b64array = arrayBufferToBase64(uint8Array);
- if (b64array !== "CAQ=") {
- originalChallenge = b64array;
- console.log("[Widevine Challenge Extracted]");
- messageSuppressed = true;
- }
- }
- }, { once: false });
- }
+ }
+ })
+ console.log("Message interceptor mounted.");
}
-
- // Proceed with original generateRequest
- return originalGenerateRequest.call(session, initDataType, initData);
+return originalGenerateRequest.call(session, initDataType, initData);
};
-// license message handler
+// Message update interceptors
const originalUpdate = MediaKeySession.prototype.update;
-
MediaKeySession.prototype.update = function(response) {
const uint8 = response instanceof Uint8Array ? response : new Uint8Array(response);
const base64Response = window.btoa(String.fromCharCode(...uint8));
-
- // Handle Service Certificate
- if (base64Response.startsWith("CAUS") && !firstValidServiceCertificate) {
- const base64ServiceCertificateData = {
- type: "__CERTIFICATE_DATA__",
- data: base64Response
- };
- window.postMessage(base64ServiceCertificateData, "*");
- firstValidServiceCertificate = true;
- }
-
- // Handle License Data
- if (!base64Response.startsWith("CAUS") && (interceptType === 'EME' || interceptType === 'LICENSE')) {
-
- // 🔁 Call parseLicense, then getKeys from global remoteCDM
- if (remoteCDM !== null && remoteCDM.session_id) {
- remoteCDM.parseLicense(base64Response)
- .then(result => {
- if (result.success) {
- console.log("[Base64 Response]", base64Response);
- const base64LicenseData = {
- type: "__LICENSE_DATA__",
- data: base64Response
- };
- window.postMessage(base64LicenseData, "*");
- console.log("[remoteCDM] License parsed successfully");
-
- // 🚀 Now call getKeys after parsing
- return remoteCDM.getKeys();
- } else {
- console.warn("[remoteCDM] License parse failed:", result.error);
- }
- })
- .then(keysResult => {
- if (keysResult?.success) {
- const keysData = {
- type: "__KEYS_DATA__",
- data: keysResult.keys
- };
- window.postMessage(keysData, "*");
- console.log("[remoteCDM] Decryption keys retrieved:", keysResult.keys);
- } else if (keysResult) {
- console.warn("[remoteCDM] Failed to retrieve keys:", keysResult.error);
- }
- })
- .catch(err => {
- console.error("[remoteCDM] Unexpected error in license flow:", err);
- });
- } else {
- console.warn("[remoteCDM] Cannot parse license: remoteCDM not initialized or session_id missing.");
+ if (base64Response.startsWith("CAUS") && foundWidevinePssh && remoteCDM && !serviceCertFound) {
+ remoteCDM.setServiceCertificate(base64Response);
+ if (interceptType === "EME" && !remoteCDM.challenge) {
+ remoteCDM.getChallenge(foundWidevinePssh);
}
+ window.postMessage({ type: "__DRM_TYPE__", data: "Widevine" }, "*");
+ window.postMessage({ type: "__PSSH_DATA__", data: foundWidevinePssh }, "*");
+ serviceCertFound = true;
+ }
+ if (!base64Response.startsWith("CAUS") && (foundWidevinePssh || foundPlayreadyPssh) && !keysRetrieved) {
+ if (licenseResponseCounter === 1 || foundChallengeInBody) {
+ remoteCDM.parseLicense(base64Response);
+ remoteCDM.getKeys();
+ remoteCDM.closeSession();
+ keysRetrieved = true;
+ window.postMessage({ type: "__KEYS_DATA__", data: remoteCDM.keys }, "*");
+ }
+ licenseResponseCounter++;
}
-
const updatePromise = originalUpdate.call(this, response);
-
- if (!psshFound) {
+ if (!foundPlayreadyPssh && !foundWidevinePssh) {
updatePromise
.then(() => {
let clearKeys = getClearkey(response);
@@ -770,149 +548,266 @@ MediaKeySession.prototype.update = function(response) {
return updatePromise;
};
-// --- Request Interception ---
-(function interceptRequests() {
- const sendToBackground = (data) => {
- window.postMessage({ type: "__INTERCEPTED_POST__", data }, "*");
- };
+// fetch POST interceptor
+(function() {
+ const originalFetch = window.fetch;
-// Intercept fetch
-const originalFetch = window.fetch;
+ window.fetch = async function(resource, config = {}) {
+ const method = (config.method || 'GET').toUpperCase();
-window.fetch = async function(input, init = {}) {
- const method = (init.method || 'GET').toUpperCase();
-
- if (method === "POST") {
- const url = typeof input === "string" ? input : input.url;
- let body = init.body;
-
- // If the body is FormData, convert it to an object (or JSON)
- if (body instanceof FormData) {
- const formData = {};
- body.forEach((value, key) => {
- formData[key] = value;
- });
- body = JSON.stringify(formData); // Convert formData to JSON string
- }
-
- const headers = {};
- if (init.headers instanceof Headers) {
- init.headers.forEach((v, k) => { headers[k] = v; });
- } else {
- Object.assign(headers, init.headers || {});
- }
-
- try {
- let modifiedBody = body; // Keep a reference to the original body
-
- // Handle body based on its type
- if (typeof body === 'string') {
- if (isJson(body)) {
- const parsed = JSON.parse(body);
- if (jsonContainsValue(parsed, customBase64)) {
- sendToBackground({ url, method, headers, body });
- }
- if (jsonContainsValue(parsed, originalChallenge)) {
- newJSONBody = jsonReplaceValue(parsed, originalChallenge, customBase64);
- modifiedBody = JSON.stringify(newJSONBody)
- sendToBackground({ url, method, headers, modifiedBody });
- }
- } else if (body === customBase64) {
- sendToBackground({ url, method, headers, body });
- } else if (btoa(body) == originalChallenge) {
- modifiedBody = atob(customBase64);
- sendToBackground({ url, method, headers, modifiedBody });
- }
- }else if (body instanceof ArrayBuffer || body instanceof Uint8Array) {
+ if (method === 'POST') {
+ let body = config.body;
+ if (body) {
+ if (body instanceof ArrayBuffer || body instanceof Uint8Array) {
const buffer = body instanceof Uint8Array ? body : new Uint8Array(body);
const base64Body = window.btoa(String.fromCharCode(...buffer));
- if (base64Body === customBase64) {
- sendToBackground({ url, method, headers, body: base64Body });
+ if ((base64Body.startsWith("CAES") || base64Body.startsWith("PD94")) && (!remoteCDM || remoteCDM.challenge === null || base64Body !== remoteCDM.challenge) && interceptType === "EME") {
+ foundChallengeInBody = true;
+ window.postMessage({ type: "__LICENSE_URL__", data: resource }, "*");
+ // Block the request
+ return;
}
- if (base64Body === originalChallenge) {
- modifiedBody = base64ToUint8Array(customBase64); // Modify the body
- sendToBackground({ url, method, headers, body: modifiedBody });
+ if ((base64Body.startsWith("CAES") || base64Body.startsWith("PD94")) && interceptType == "LICENSE" &&!foundChallengeInBody) {
+ foundChallengeInBody = true;
+ window.postMessage({ type: "__LICENSE_URL__", data: resource }, "*");
+ if (!remoteCDM) {
+ if (base64Body.startsWith("CAES")) {
+ const {
+ device_type, system_id, security_level, host, secret, device_name
+ } = widevineDeviceInfo;
+ remoteCDM = new remoteWidevineCDM(device_type, system_id, security_level, host, secret, device_name);
+ remoteCDM.openSession();
+ remoteCDM.getChallenge(foundWidevinePssh);
+ }
+ if (base64Body.startsWith("PD94")) {
+ const {
+ security_level, host, secret, device_name
+ } = playreadyDeviceInfo;
+ remoteCDM = new remotePlayReadyCDM(security_level, host, secret, device_name);
+ remoteCDM.openSession();
+ remoteCDM.getChallenge(foundPlayreadyPssh);
+ }
+ }
+ if (remoteCDM && remoteCDM.challenge === null) {
+ remoteCDM.getChallenge(foundWidevinePssh);
+ }
+ const injectedBody = base64ToUint8Array(remoteCDM.challenge);
+ config.body = injectedBody;
+ return originalFetch(resource, config);
}
}
+ if (typeof body === 'string' && !isJson(body)) {
+ const base64EncodedBody = btoa(body);
+ if ((base64EncodedBody.startsWith("CAES") || base64EncodedBody.startsWith("PD94")) && (!remoteCDM || remoteCDM.challenge === null || base64EncodedBody !== remoteCDM.challenge) && interceptType === "EME") {
+ foundChallengeInBody = true;
+ window.postMessage({ type: "__LICENSE_URL__", data: resource }, "*");
+ // Block the request
+ return;
+ }
+ if ((base64EncodedBody.startsWith("CAES") || base64EncodedBody.startsWith("PD94")) && interceptType == "LICENSE" && !foundChallengeInBody) {
+ foundChallengeInBody = true;
+ window.postMessage({ type: "__LICENSE_URL__", data: resource }, "*");
+ if (!remoteCDM) {
+ if (base64EncodedBody.startsWith("CAES")) {
+ const {
+ device_type, system_id, security_level, host, secret, device_name
+ } = widevineDeviceInfo;
+ remoteCDM = new remoteWidevineCDM(device_type, system_id, security_level, host, secret, device_name);
+ remoteCDM.openSession();
+ remoteCDM.getChallenge(foundWidevinePssh);
+ }
+ if (base64EncodedBody.startsWith("PD94")) {
+ const {
+ security_level, host, secret, device_name
+ } = playreadyDeviceInfo;
+ remoteCDM = new remotePlayReadyCDM(security_level, host, secret, device_name);
+ remoteCDM.openSession();
+ remoteCDM.getChallenge(foundPlayreadyPssh);
+ }
+ }
+ if (remoteCDM && remoteCDM.challenge === null) {
+ remoteCDM.getChallenge(foundWidevinePssh);
+ }
+ const injectedBody = atob(remoteCDM.challenge);
+ config.body = injectedBody;
+ return originalFetch(resource, config);
+ }
+ }
+ if (typeof body === 'string' && isJson(body)) {
+ const jsonBody = JSON.parse(body);
- // Ensure the modified body is used and passed to the original fetch call
- init.body = modifiedBody;
+ if ((jsonContainsValue(jsonBody, "CAES") || jsonContainsValue(jsonBody, "PD94")) && (!remoteCDM || remoteCDM.challenge === null) && interceptType === "EME") {
+ foundChallengeInBody = true;
+ window.postMessage({ type: "__LICENSE_URL__", data: resource }, "*");
+ // Block the request
+ return;
+ }
- } catch (e) {
- console.warn("Error handling fetch body:", e);
+ if ((jsonContainsValue(jsonBody, "CAES") || jsonContainsValue(jsonBody, "PD94")) && interceptType === "LICENSE" && !foundChallengeInBody) {
+ foundChallengeInBody = true;
+ window.postMessage({ type: "__LICENSE_URL__", data: resource }, "*");
+ if (!remoteCDM) {
+ if (jsonContainsValue(jsonBody, "CAES")) {
+ const {
+ device_type, system_id, security_level, host, secret, device_name
+ } = widevineDeviceInfo;
+ remoteCDM = new remoteWidevineCDM(device_type, system_id, security_level, host, secret, device_name);
+ remoteCDM.openSession();
+ remoteCDM.getChallenge(foundWidevinePssh);
+ }
+ if (jsonContainsValue(jsonBody, "PD94")) {
+ const {
+ security_level, host, secret, device_name
+ } = playreadyDeviceInfo;
+ remoteCDM = new remotePlayReadyCDM(security_level, host, secret, device_name);
+ remoteCDM.openSession();
+ remoteCDM.getChallenge(foundPlayreadyPssh);
+ }
+ }
+ if (remoteCDM && remoteCDM.challenge === null) {
+ remoteCDM.getChallenge(foundWidevinePssh);
+ }
+ const injectedBody = jsonReplaceValue(jsonBody, remoteCDM.challenge);
+ config.body = JSON.stringify(injectedBody);
+ }
+ }
}
}
- // Call the original fetch method with the potentially modified body
- return originalFetch(input, init);
-};
+ return originalFetch(resource, config);
+ };
+})();
-// Intercept XMLHttpRequest
-const originalOpen = XMLHttpRequest.prototype.open;
-const originalSend = XMLHttpRequest.prototype.send;
+// XHR POST interceptor
+(function() {
+ const originalOpen = XMLHttpRequest.prototype.open;
+ const originalSend = XMLHttpRequest.prototype.send;
-XMLHttpRequest.prototype.open = function(method, url, async, user, password) {
+ XMLHttpRequest.prototype.open = function(method, url, async, user, password) {
this._method = method;
this._url = url;
return originalOpen.apply(this, arguments);
-};
+ };
-XMLHttpRequest.prototype.send = function(body) {
- if (this._method?.toUpperCase() === "POST") {
- const xhr = this;
- const headers = {};
- const originalSetRequestHeader = xhr.setRequestHeader;
+ XMLHttpRequest.prototype.send = function(body) {
+ if (this._method && this._method.toUpperCase() === 'POST') {
+ if (body) {
- xhr.setRequestHeader = function(header, value) {
- headers[header] = value;
- return originalSetRequestHeader.apply(this, arguments);
- };
-
- setTimeout(() => {
- try {
- let modifiedBody = body; // Start with the original body
-
- // Check if the body is a string and can be parsed as JSON
- if (typeof body === 'string') {
- if (isJson(body)) {
- const parsed = JSON.parse(body);
- if (jsonContainsValue(parsed, customBase64)) {
- sendToBackground({ url: xhr._url, method: xhr._method, headers, body });
+ if (body instanceof ArrayBuffer || body instanceof Uint8Array) {
+ const buffer = body instanceof Uint8Array ? body : new Uint8Array(body);
+ const base64Body = window.btoa(String.fromCharCode(...buffer));
+ if ((base64Body.startsWith("CAES") || base64Body.startsWith("PD94")) && (!remoteCDM || remoteCDM.challenge === null || base64Body !== remoteCDM.challenge) && interceptType === "EME") {
+ foundChallengeInBody = true;
+ window.postMessage({ type: "__LICENSE_URL__", data: this._url }, "*");
+ // Block the request
+ return;
+ }
+ if ((base64Body.startsWith("CAES") || base64Body.startsWith("PD94")) && interceptType == "LICENSE" &&!foundChallengeInBody) {
+ foundChallengeInBody = true;
+ window.postMessage({ type: "__LICENSE_URL__", data: this._url }, "*");
+ if (!remoteCDM) {
+ if (base64Body.startsWith("CAES")) {
+ const {
+ device_type, system_id, security_level, host, secret, device_name
+ } = widevineDeviceInfo;
+ remoteCDM = new remoteWidevineCDM(device_type, system_id, security_level, host, secret, device_name);
+ remoteCDM.openSession();
+ remoteCDM.getChallenge(foundWidevinePssh);
}
- if (jsonContainsValue(parsed, originalChallenge)) {
- newJSONBody = jsonReplaceValue(parsed, originalChallenge, customBase64);
- modifiedBody = JSON.stringify(newJSONBody);
- sendToBackground({ url: xhr._url, method: xhr._method, headers, modifiedBody });
+ if (base64Body.startsWith("PD94")) {
+ const {
+ security_level, host, secret, device_name
+ } = playreadyDeviceInfo;
+ remoteCDM = new remotePlayReadyCDM(security_level, host, secret, device_name);
+ remoteCDM.openSession();
+ remoteCDM.getChallenge(foundPlayreadyPssh);
}
- } else if (body === originalChallenge) {
- modifiedBody = customBase64
- sendToBackground({ url: xhr._url, method: xhr._method, headers, body });
- } else if (btoa(body) == originalChallenge) {
- modifiedBody = atob(customBase64);
- sendToBackground({ url: xhr._url, method: xhr._method, headers, body });
}
- } else if (body instanceof ArrayBuffer || body instanceof Uint8Array) {
- const buffer = body instanceof Uint8Array ? body : new Uint8Array(body);
- const base64Body = window.btoa(String.fromCharCode(...buffer));
- if (base64Body === customBase64) {
- sendToBackground({ url: xhr._url, method: xhr._method, headers, body: base64Body });
+ if (remoteCDM && remoteCDM.challenge === null) {
+ remoteCDM.getChallenge(foundWidevinePssh);
}
- if (base64Body === originalChallenge) {
- modifiedBody = base64ToUint8Array(customBase64); // Modify the body
- sendToBackground({ url: xhr._url, method: xhr._method, headers, body: modifiedBody });
+ const injectedBody = base64ToUint8Array(remoteCDM.challenge);
+ return originalSend.call(this, injectedBody);
+ }
+ }
+
+ if (typeof body === 'string' && !isJson(body)) {
+ const base64EncodedBody = btoa(body);
+ if ((base64EncodedBody.startsWith("CAES") || base64EncodedBody.startsWith("PD94")) && (!remoteCDM || remoteCDM.challenge === null || base64EncodedBody !== remoteCDM.challenge) && interceptType === "EME") {
+ foundChallengeInBody = true;
+ window.postMessage({ type: "__LICENSE_URL__", data: this._url }, "*");
+ // Block the request
+ return;
+ }
+ if ((base64EncodedBody.startsWith("CAES") || base64EncodedBody.startsWith("PD94")) && interceptType == "LICENSE" && !foundChallengeInBody) {
+ foundChallengeInBody = true;
+ window.postMessage({ type: "__LICENSE_URL__", data: this._url }, "*");
+ if (!remoteCDM) {
+ if (base64EncodedBody.startsWith("CAES")) {
+ const {
+ device_type, system_id, security_level, host, secret, device_name
+ } = widevineDeviceInfo;
+ remoteCDM = new remoteWidevineCDM(device_type, system_id, security_level, host, secret, device_name);
+ remoteCDM.openSession();
+ remoteCDM.getChallenge(foundWidevinePssh);
+ }
+ if (base64EncodedBody.startsWith("PD94")) {
+ const {
+ security_level, host, secret, device_name
+ } = playreadyDeviceInfo;
+ remoteCDM = new remotePlayReadyCDM(security_level, host, secret, device_name);
+ remoteCDM.openSession();
+ remoteCDM.getChallenge(foundPlayreadyPssh);
+ }
}
+ if (remoteCDM && remoteCDM.challenge === null) {
+ remoteCDM.getChallenge(foundWidevinePssh);
+ }
+ const injectedBody = atob(remoteCDM.challenge);
+ return originalSend.call(this, injectedBody);
+ }
+ }
+
+ if (typeof body === 'string' && isJson(body)) {
+ const jsonBody = JSON.parse(body);
+
+ if ((jsonContainsValue(jsonBody, "CAES") || jsonContainsValue(jsonBody, "PD94")) && (!remoteCDM || remoteCDM.challenge === null) && interceptType === "EME") {
+ foundChallengeInBody = true;
+ window.postMessage({ type: "__LICENSE_URL__", data: this._url }, "*");
+ // Block the request
+ return;
}
- // Ensure original send is called only once with the potentially modified body
- originalSend.apply(this, [modifiedBody]);
-
- } catch (e) {
- console.warn("Error handling XHR body:", e);
+ if ((jsonContainsValue(jsonBody, "CAES") || jsonContainsValue(jsonBody, "PD94")) && interceptType === "LICENSE" && !foundChallengeInBody) {
+ foundChallengeInBody = true;
+ window.postMessage({ type: "__LICENSE_URL__", data: this._url }, "*");
+ if (!remoteCDM) {
+ if (jsonContainsValue(jsonBody, "CAES")) {
+ const {
+ device_type, system_id, security_level, host, secret, device_name
+ } = widevineDeviceInfo;
+ remoteCDM = new remoteWidevineCDM(device_type, system_id, security_level, host, secret, device_name);
+ remoteCDM.openSession();
+ remoteCDM.getChallenge(foundWidevinePssh);
+ }
+ if (jsonContainsValue(jsonBody, "PD94")) {
+ const {
+ security_level, host, secret, device_name
+ } = playreadyDeviceInfo;
+ remoteCDM = new remotePlayReadyCDM(security_level, host, secret, device_name);
+ remoteCDM.openSession();
+ remoteCDM.getChallenge(foundPlayreadyPssh);
+ }
+ }
+ if (remoteCDM && remoteCDM.challenge === null) {
+ remoteCDM.getChallenge(foundWidevinePssh);
+ }
+ const injectedBody = jsonReplaceValue(jsonBody, remoteCDM.challenge);
+ return originalSend.call(this, JSON.stringify(injectedBody));
+ }
}
- }, 0);
- } else {
- // Call the original send for non-POST requests
- return originalSend.apply(this, arguments);
+ }
}
-};
-})();
+ return originalSend.apply(this, arguments);
+ };
+})();
\ No newline at end of file
diff --git a/react/assets/index-CN3ssfBX.js b/react/assets/index-ydPQKJSy.js
similarity index 68%
rename from react/assets/index-CN3ssfBX.js
rename to react/assets/index-ydPQKJSy.js
index 54050df..e29c9f8 100644
--- a/react/assets/index-CN3ssfBX.js
+++ b/react/assets/index-ydPQKJSy.js
@@ -1,4 +1,4 @@
-(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))r(h);new MutationObserver(h=>{for(const v of h)if(v.type==="childList")for(const T of v.addedNodes)T.tagName==="LINK"&&T.rel==="modulepreload"&&r(T)}).observe(document,{childList:!0,subtree:!0});function s(h){const v={};return h.integrity&&(v.integrity=h.integrity),h.referrerPolicy&&(v.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?v.credentials="include":h.crossOrigin==="anonymous"?v.credentials="omit":v.credentials="same-origin",v}function r(h){if(h.ep)return;h.ep=!0;const v=s(h);fetch(h.href,v)}})();var pf={exports:{}},_u={};/**
+(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))r(h);new MutationObserver(h=>{for(const v of h)if(v.type==="childList")for(const T of v.addedNodes)T.tagName==="LINK"&&T.rel==="modulepreload"&&r(T)}).observe(document,{childList:!0,subtree:!0});function s(h){const v={};return h.integrity&&(v.integrity=h.integrity),h.referrerPolicy&&(v.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?v.credentials="include":h.crossOrigin==="anonymous"?v.credentials="omit":v.credentials="same-origin",v}function r(h){if(h.ep)return;h.ep=!0;const v=s(h);fetch(h.href,v)}})();var pf={exports:{}},Ou={};/**
* @license React
* react-jsx-runtime.production.js
*
@@ -6,7 +6,7 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */var C0;function Nm(){if(C0)return _u;C0=1;var c=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function s(r,h,v){var T=null;if(v!==void 0&&(T=""+v),h.key!==void 0&&(T=""+h.key),"key"in h){v={};for(var D in h)D!=="key"&&(v[D]=h[D])}else v=h;return h=v.ref,{$$typeof:c,type:r,key:T,ref:h!==void 0?h:null,props:v}}return _u.Fragment=o,_u.jsx=s,_u.jsxs=s,_u}var N0;function Um(){return N0||(N0=1,pf.exports=Nm()),pf.exports}var Z=Um(),Sf={exports:{}},et={};/**
+ */var C0;function U1(){if(C0)return Ou;C0=1;var c=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function s(r,h,v){var T=null;if(v!==void 0&&(T=""+v),h.key!==void 0&&(T=""+h.key),"key"in h){v={};for(var O in h)O!=="key"&&(v[O]=h[O])}else v=h;return h=v.ref,{$$typeof:c,type:r,key:T,ref:h!==void 0?h:null,props:v}}return Ou.Fragment=o,Ou.jsx=s,Ou.jsxs=s,Ou}var U0;function N1(){return U0||(U0=1,pf.exports=U1()),pf.exports}var K=N1(),Sf={exports:{}},et={};/**
* @license React
* react.production.js
*
@@ -14,7 +14,7 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */var U0;function Hm(){if(U0)return et;U0=1;var c=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),T=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),w=Symbol.iterator;function z(y){return y===null||typeof y!="object"?null:(y=w&&y[w]||y["@@iterator"],typeof y=="function"?y:null)}var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H=Object.assign,G={};function Q(y,U,V){this.props=y,this.context=U,this.refs=G,this.updater=V||B}Q.prototype.isReactComponent={},Q.prototype.setState=function(y,U){if(typeof y!="object"&&typeof y!="function"&&y!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,y,U,"setState")},Q.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};function L(){}L.prototype=Q.prototype;function Y(y,U,V){this.props=y,this.context=U,this.refs=G,this.updater=V||B}var $=Y.prototype=new L;$.constructor=Y,H($,Q.prototype),$.isPureReactComponent=!0;var it=Array.isArray,I={H:null,A:null,T:null,S:null,V:null},zt=Object.prototype.hasOwnProperty;function Rt(y,U,V,q,J,ft){return V=ft.ref,{$$typeof:c,type:y,key:U,ref:V!==void 0?V:null,props:ft}}function _t(y,U){return Rt(y.type,U,void 0,void 0,void 0,y.props)}function St(y){return typeof y=="object"&&y!==null&&y.$$typeof===c}function Jt(y){var U={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(V){return U[V]})}var oe=/\/+/g;function Vt(y,U){return typeof y=="object"&&y!==null&&y.key!=null?Jt(""+y.key):U.toString(36)}function El(){}function Tl(y){switch(y.status){case"fulfilled":return y.value;case"rejected":throw y.reason;default:switch(typeof y.status=="string"?y.then(El,El):(y.status="pending",y.then(function(U){y.status==="pending"&&(y.status="fulfilled",y.value=U)},function(U){y.status==="pending"&&(y.status="rejected",y.reason=U)})),y.status){case"fulfilled":return y.value;case"rejected":throw y.reason}}throw y}function Xt(y,U,V,q,J){var ft=typeof y;(ft==="undefined"||ft==="boolean")&&(y=null);var tt=!1;if(y===null)tt=!0;else switch(ft){case"bigint":case"string":case"number":tt=!0;break;case"object":switch(y.$$typeof){case c:case o:tt=!0;break;case R:return tt=y._init,Xt(tt(y._payload),U,V,q,J)}}if(tt)return J=J(y),tt=q===""?"."+Vt(y,0):q,it(J)?(V="",tt!=null&&(V=tt.replace(oe,"$&/")+"/"),Xt(J,U,V,"",function($e){return $e})):J!=null&&(St(J)&&(J=_t(J,V+(J.key==null||y&&y.key===J.key?"":(""+J.key).replace(oe,"$&/")+"/")+tt)),U.push(J)),1;tt=0;var te=q===""?".":q+":";if(it(y))for(var bt=0;bt>>1,y=M[yt];if(0>>1;yth(q,F))Jh(ft,q)?(M[yt]=ft,M[J]=F,yt=J):(M[yt]=q,M[V]=F,yt=V);else if(Jh(ft,F))M[yt]=ft,M[J]=F,yt=J;else break t}}return j}function h(M,j){var F=M.sortIndex-j.sortIndex;return F!==0?F:M.id-j.id}if(c.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var v=performance;c.unstable_now=function(){return v.now()}}else{var T=Date,D=T.now();c.unstable_now=function(){return T.now()-D}}var p=[],d=[],R=1,w=null,z=3,B=!1,H=!1,G=!1,Q=!1,L=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function it(M){for(var j=s(d);j!==null;){if(j.callback===null)r(d);else if(j.startTime<=M)r(d),j.sortIndex=j.expirationTime,o(p,j);else break;j=s(d)}}function I(M){if(G=!1,it(M),!H)if(s(p)!==null)H=!0,zt||(zt=!0,Vt());else{var j=s(d);j!==null&&Xt(I,j.startTime-M)}}var zt=!1,Rt=-1,_t=5,St=-1;function Jt(){return Q?!0:!(c.unstable_now()-St<_t)}function oe(){if(Q=!1,zt){var M=c.unstable_now();St=M;var j=!0;try{t:{H=!1,G&&(G=!1,Y(Rt),Rt=-1),B=!0;var F=z;try{e:{for(it(M),w=s(p);w!==null&&!(w.expirationTime>M&&Jt());){var yt=w.callback;if(typeof yt=="function"){w.callback=null,z=w.priorityLevel;var y=yt(w.expirationTime<=M);if(M=c.unstable_now(),typeof y=="function"){w.callback=y,it(M),j=!0;break e}w===s(p)&&r(p),it(M)}else r(p);w=s(p)}if(w!==null)j=!0;else{var U=s(d);U!==null&&Xt(I,U.startTime-M),j=!1}}break t}finally{w=null,z=F,B=!1}j=void 0}}finally{j?Vt():zt=!1}}}var Vt;if(typeof $=="function")Vt=function(){$(oe)};else if(typeof MessageChannel<"u"){var El=new MessageChannel,Tl=El.port2;El.port1.onmessage=oe,Vt=function(){Tl.postMessage(null)}}else Vt=function(){L(oe,0)};function Xt(M,j){Rt=L(function(){M(c.unstable_now())},j)}c.unstable_IdlePriority=5,c.unstable_ImmediatePriority=1,c.unstable_LowPriority=4,c.unstable_NormalPriority=3,c.unstable_Profiling=null,c.unstable_UserBlockingPriority=2,c.unstable_cancelCallback=function(M){M.callback=null},c.unstable_forceFrameRate=function(M){0>M||125yt?(M.sortIndex=F,o(d,M),s(p)===null&&M===s(d)&&(G?(Y(Rt),Rt=-1):G=!0,Xt(I,F-yt))):(M.sortIndex=y,o(p,M),H||B||(H=!0,zt||(zt=!0,Vt()))),M},c.unstable_shouldYield=Jt,c.unstable_wrapCallback=function(M){var j=z;return function(){var F=z;z=j;try{return M.apply(this,arguments)}finally{z=F}}}}(Tf)),Tf}var L0;function Lm(){return L0||(L0=1,Ef.exports=wm()),Ef.exports}var xf={exports:{}},Kt={};/**
+ */var w0;function w1(){return w0||(w0=1,function(c){function o(M,j){var F=M.length;M.push(j);t:for(;0>>1,y=M[yt];if(0>>1;yth(q,F))Jh(ft,q)?(M[yt]=ft,M[J]=F,yt=J):(M[yt]=q,M[X]=F,yt=X);else if(Jh(ft,F))M[yt]=ft,M[J]=F,yt=J;else break t}}return j}function h(M,j){var F=M.sortIndex-j.sortIndex;return F!==0?F:M.id-j.id}if(c.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var v=performance;c.unstable_now=function(){return v.now()}}else{var T=Date,O=T.now();c.unstable_now=function(){return T.now()-O}}var p=[],d=[],R=1,w=null,C=3,B=!1,H=!1,G=!1,Q=!1,L=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function it(M){for(var j=s(d);j!==null;){if(j.callback===null)r(d);else if(j.startTime<=M)r(d),j.sortIndex=j.expirationTime,o(p,j);else break;j=s(d)}}function I(M){if(G=!1,it(M),!H)if(s(p)!==null)H=!0,zt||(zt=!0,Xt());else{var j=s(d);j!==null&&Vt(I,j.startTime-M)}}var zt=!1,Rt=-1,Ot=5,St=-1;function Jt(){return Q?!0:!(c.unstable_now()-StM&&Jt());){var yt=w.callback;if(typeof yt=="function"){w.callback=null,C=w.priorityLevel;var y=yt(w.expirationTime<=M);if(M=c.unstable_now(),typeof y=="function"){w.callback=y,it(M),j=!0;break e}w===s(p)&&r(p),it(M)}else r(p);w=s(p)}if(w!==null)j=!0;else{var N=s(d);N!==null&&Vt(I,N.startTime-M),j=!1}}break t}finally{w=null,C=F,B=!1}j=void 0}}finally{j?Xt():zt=!1}}}var Xt;if(typeof $=="function")Xt=function(){$(oe)};else if(typeof MessageChannel<"u"){var El=new MessageChannel,Tl=El.port2;El.port1.onmessage=oe,Xt=function(){Tl.postMessage(null)}}else Xt=function(){L(oe,0)};function Vt(M,j){Rt=L(function(){M(c.unstable_now())},j)}c.unstable_IdlePriority=5,c.unstable_ImmediatePriority=1,c.unstable_LowPriority=4,c.unstable_NormalPriority=3,c.unstable_Profiling=null,c.unstable_UserBlockingPriority=2,c.unstable_cancelCallback=function(M){M.callback=null},c.unstable_forceFrameRate=function(M){0>M||125yt?(M.sortIndex=F,o(d,M),s(p)===null&&M===s(d)&&(G?(Y(Rt),Rt=-1):G=!0,Vt(I,F-yt))):(M.sortIndex=y,o(p,M),H||B||(H=!0,zt||(zt=!0,Xt()))),M},c.unstable_shouldYield=Jt,c.unstable_wrapCallback=function(M){var j=C;return function(){var F=C;C=j;try{return M.apply(this,arguments)}finally{C=F}}}}(Tf)),Tf}var L0;function L1(){return L0||(L0=1,Ef.exports=w1()),Ef.exports}var xf={exports:{}},Kt={};/**
* @license React
* react-dom.production.js
*
@@ -30,7 +30,7 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */var B0;function Bm(){if(B0)return Kt;B0=1;var c=Mf();function o(p){var d="https://react.dev/errors/"+p;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(o){console.error(o)}}return c(),xf.exports=Bm(),xf.exports}/**
+ */var B0;function B1(){if(B0)return Kt;B0=1;var c=Mf();function o(p){var d="https://react.dev/errors/"+p;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(o){console.error(o)}}return c(),xf.exports=B1(),xf.exports}/**
* @license React
* react-dom-client.production.js
*
@@ -38,15 +38,15 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */var j0;function jm(){if(j0)return Ou;j0=1;var c=Lm(),o=Mf(),s=qm();function r(t){var e="https://react.dev/errors/"+t;if(1y||(t.current=yt[y],yt[y]=null,y--)}function q(t,e){y++,yt[y]=t.current,t.current=e}var J=U(null),ft=U(null),tt=U(null),te=U(null);function bt(t,e){switch(q(tt,e),q(ft,t),q(J,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?n0(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=n0(e),t=i0(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}V(J),q(J,t)}function $e(){V(J),V(ft),V(tt)}function li(t){t.memoizedState!==null&&q(te,t);var e=J.current,l=i0(e,t.type);e!==l&&(q(ft,t),q(J,l))}function Hu(t){ft.current===t&&(V(J),V(ft)),te.current===t&&(V(te),Tu._currentValue=F)}var ai=Object.prototype.hasOwnProperty,ui=c.unstable_scheduleCallback,ni=c.unstable_cancelCallback,od=c.unstable_shouldYield,sd=c.unstable_requestPaint,Ae=c.unstable_now,dd=c.unstable_getCurrentPriorityLevel,qf=c.unstable_ImmediatePriority,jf=c.unstable_UserBlockingPriority,wu=c.unstable_NormalPriority,hd=c.unstable_LowPriority,Yf=c.unstable_IdlePriority,md=c.log,vd=c.unstable_setDisableYieldValue,za=null,ee=null;function We(t){if(typeof md=="function"&&vd(t),ee&&typeof ee.setStrictMode=="function")try{ee.setStrictMode(za,t)}catch{}}var le=Math.clz32?Math.clz32:pd,yd=Math.log,gd=Math.LN2;function pd(t){return t>>>=0,t===0?32:31-(yd(t)/gd|0)|0}var Lu=256,Bu=4194304;function xl(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function qu(t,e,l){var a=t.pendingLanes;if(a===0)return 0;var u=0,n=t.suspendedLanes,i=t.pingedLanes;t=t.warmLanes;var f=a&134217727;return f!==0?(a=f&~n,a!==0?u=xl(a):(i&=f,i!==0?u=xl(i):l||(l=f&~t,l!==0&&(u=xl(l))))):(f=a&~n,f!==0?u=xl(f):i!==0?u=xl(i):l||(l=a&~t,l!==0&&(u=xl(l)))),u===0?0:e!==0&&e!==u&&(e&n)===0&&(n=u&-u,l=e&-e,n>=l||n===32&&(l&4194048)!==0)?e:u}function Ca(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Sd(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Gf(){var t=Lu;return Lu<<=1,(Lu&4194048)===0&&(Lu=256),t}function Vf(){var t=Bu;return Bu<<=1,(Bu&62914560)===0&&(Bu=4194304),t}function ii(t){for(var e=[],l=0;31>l;l++)e.push(t);return e}function Na(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function bd(t,e,l,a,u,n){var i=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var f=t.entanglements,m=t.expirationTimes,E=t.hiddenUpdates;for(l=i&~l;0y||(t.current=yt[y],yt[y]=null,y--)}function q(t,e){y++,yt[y]=t.current,t.current=e}var J=N(null),ft=N(null),tt=N(null),te=N(null);function bt(t,e){switch(q(tt,e),q(ft,t),q(J,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?n0(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=n0(e),t=i0(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}X(J),q(J,t)}function $e(){X(J),X(ft),X(tt)}function li(t){t.memoizedState!==null&&q(te,t);var e=J.current,l=i0(e,t.type);e!==l&&(q(ft,t),q(J,l))}function Hu(t){ft.current===t&&(X(J),X(ft)),te.current===t&&(X(te),Tu._currentValue=F)}var ai=Object.prototype.hasOwnProperty,ui=c.unstable_scheduleCallback,ni=c.unstable_cancelCallback,od=c.unstable_shouldYield,sd=c.unstable_requestPaint,Ae=c.unstable_now,dd=c.unstable_getCurrentPriorityLevel,qf=c.unstable_ImmediatePriority,jf=c.unstable_UserBlockingPriority,wu=c.unstable_NormalPriority,hd=c.unstable_LowPriority,Yf=c.unstable_IdlePriority,md=c.log,vd=c.unstable_setDisableYieldValue,za=null,ee=null;function We(t){if(typeof md=="function"&&vd(t),ee&&typeof ee.setStrictMode=="function")try{ee.setStrictMode(za,t)}catch{}}var le=Math.clz32?Math.clz32:pd,yd=Math.log,gd=Math.LN2;function pd(t){return t>>>=0,t===0?32:31-(yd(t)/gd|0)|0}var Lu=256,Bu=4194304;function xl(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function qu(t,e,l){var a=t.pendingLanes;if(a===0)return 0;var u=0,n=t.suspendedLanes,i=t.pingedLanes;t=t.warmLanes;var f=a&134217727;return f!==0?(a=f&~n,a!==0?u=xl(a):(i&=f,i!==0?u=xl(i):l||(l=f&~t,l!==0&&(u=xl(l))))):(f=a&~n,f!==0?u=xl(f):i!==0?u=xl(i):l||(l=a&~t,l!==0&&(u=xl(l)))),u===0?0:e!==0&&e!==u&&(e&n)===0&&(n=u&-u,l=e&-e,n>=l||n===32&&(l&4194048)!==0)?e:u}function Ca(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Sd(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Gf(){var t=Lu;return Lu<<=1,(Lu&4194048)===0&&(Lu=256),t}function Xf(){var t=Bu;return Bu<<=1,(Bu&62914560)===0&&(Bu=4194304),t}function ii(t){for(var e=[],l=0;31>l;l++)e.push(t);return e}function Ua(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function bd(t,e,l,a,u,n){var i=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var f=t.entanglements,m=t.expirationTimes,E=t.hiddenUpdates;for(l=i&~l;0)":-1u||m[a]!==E[u]){var O=`
-`+m[a].replace(" at new "," at ");return t.displayName&&O.includes("")&&(O=O.replace("",t.displayName)),O}while(1<=a&&0<=u);break}}}finally{di=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?Jl(l):""}function Dd(t){switch(t.tag){case 26:case 27:case 5:return Jl(t.type);case 16:return Jl("Lazy");case 13:return Jl("Suspense");case 19:return Jl("SuspenseList");case 0:case 15:return hi(t.type,!1);case 11:return hi(t.type.render,!1);case 1:return hi(t.type,!0);case 31:return Jl("Activity");default:return""}}function Pf(t){try{var e="";do e+=Dd(t),t=t.return;while(t);return e}catch(l){return`
+`);for(u=a=0;au||m[a]!==E[u]){var D=`
+`+m[a].replace(" at new "," at ");return t.displayName&&D.includes("")&&(D=D.replace("",t.displayName)),D}while(1<=a&&0<=u);break}}}finally{di=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?Jl(l):""}function _d(t){switch(t.tag){case 26:case 27:case 5:return Jl(t.type);case 16:return Jl("Lazy");case 13:return Jl("Suspense");case 19:return Jl("SuspenseList");case 0:case 15:return hi(t.type,!1);case 11:return hi(t.type.render,!1);case 1:return hi(t.type,!0);case 31:return Jl("Activity");default:return""}}function Pf(t){try{var e="";do e+=_d(t),t=t.return;while(t);return e}catch(l){return`
Error generating stack: `+l.message+`
-`+l.stack}}function se(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function If(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function _d(t){var e=If(t)?"checked":"value",l=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),a=""+t[e];if(!t.hasOwnProperty(e)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var u=l.get,n=l.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return u.call(this)},set:function(i){a=""+i,n.call(this,i)}}),Object.defineProperty(t,e,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(i){a=""+i},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Gu(t){t._valueTracker||(t._valueTracker=_d(t))}function tr(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var l=e.getValue(),a="";return t&&(a=If(t)?t.checked?"true":"false":t.value),t=a,t!==l?(e.setValue(t),!0):!1}function Vu(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Od=/[\n"\\]/g;function de(t){return t.replace(Od,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function mi(t,e,l,a,u,n,i,f){t.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?t.type=i:t.removeAttribute("type"),e!=null?i==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+se(e)):t.value!==""+se(e)&&(t.value=""+se(e)):i!=="submit"&&i!=="reset"||t.removeAttribute("value"),e!=null?vi(t,i,se(e)):l!=null?vi(t,i,se(l)):a!=null&&t.removeAttribute("value"),u==null&&n!=null&&(t.defaultChecked=!!n),u!=null&&(t.checked=u&&typeof u!="function"&&typeof u!="symbol"),f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?t.name=""+se(f):t.removeAttribute("name")}function er(t,e,l,a,u,n,i,f){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(t.type=n),e!=null||l!=null){if(!(n!=="submit"&&n!=="reset"||e!=null))return;l=l!=null?""+se(l):"",e=e!=null?""+se(e):l,f||e===t.value||(t.value=e),t.defaultValue=e}a=a??u,a=typeof a!="function"&&typeof a!="symbol"&&!!a,t.checked=f?t.checked:!!a,t.defaultChecked=!!a,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.name=i)}function vi(t,e,l){e==="number"&&Vu(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function kl(t,e,l,a){if(t=t.options,e){e={};for(var u=0;u"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bi=!1;if(Ue)try{var La={};Object.defineProperty(La,"passive",{get:function(){bi=!0}}),window.addEventListener("test",La,La),window.removeEventListener("test",La,La)}catch{bi=!1}var Pe=null,Ei=null,Qu=null;function fr(){if(Qu)return Qu;var t,e=Ei,l=e.length,a,u="value"in Pe?Pe.value:Pe.textContent,n=u.length;for(t=0;t=ja),mr=" ",vr=!1;function yr(t,e){switch(t){case"keyup":return lh.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gr(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Pl=!1;function uh(t,e){switch(t){case"compositionend":return gr(e);case"keypress":return e.which!==32?null:(vr=!0,mr);case"textInput":return t=e.data,t===mr&&vr?null:t;default:return null}}function nh(t,e){if(Pl)return t==="compositionend"||!Di&&yr(t,e)?(t=fr(),Qu=Ei=Pe=null,Pl=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:l,offset:e-t};t=a}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=Ar(l)}}function _r(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?_r(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Or(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Vu(t.document);e instanceof t.HTMLIFrameElement;){try{var l=typeof e.contentWindow.location.href=="string"}catch{l=!1}if(l)t=e.contentWindow;else break;e=Vu(t.document)}return e}function Mi(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var hh=Ue&&"documentMode"in document&&11>=document.documentMode,Il=null,zi=null,Xa=null,Ci=!1;function Mr(t,e,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Ci||Il==null||Il!==Vu(a)||(a=Il,"selectionStart"in a&&Mi(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Xa&&Va(Xa,a)||(Xa=a,a=wn(zi,"onSelect"),0>=i,u-=i,we=1<<32-le(e)+u|l<n?n:8;var i=M.T,f={};M.T=f,yc(t,!1,e,l);try{var m=u(),E=M.S;if(E!==null&&E(f,m),m!==null&&typeof m=="object"&&typeof m.then=="function"){var O=Th(m,a);uu(t,e,O,fe(t))}else uu(t,e,a,fe(t))}catch(N){uu(t,e,{then:function(){},status:"rejected",reason:N},fe())}finally{j.p=n,M.T=i}}function _h(){}function mc(t,e,l,a){if(t.tag!==5)throw Error(r(476));var u=Co(t).queue;zo(t,u,e,F,l===null?_h:function(){return No(t),l(a)})}function Co(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:je,lastRenderedState:F},next:null};var l={};return e.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:je,lastRenderedState:l},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function No(t){var e=Co(t).next.queue;uu(t,e,{},fe())}function vc(){return Zt(Tu)}function Uo(){return Nt().memoizedState}function Ho(){return Nt().memoizedState}function Oh(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var l=fe();t=el(l);var a=ll(e,t,l);a!==null&&(re(a,e,l),Pa(a,e,l)),e={cache:Zi()},t.payload=e;return}e=e.return}}function Mh(t,e,l){var a=fe();l={lane:a,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null},vn(t)?Lo(e,l):(l=wi(t,e,l,a),l!==null&&(re(l,t,a),Bo(l,e,a)))}function wo(t,e,l){var a=fe();uu(t,e,l,a)}function uu(t,e,l,a){var u={lane:a,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null};if(vn(t))Lo(e,u);else{var n=t.alternate;if(t.lanes===0&&(n===null||n.lanes===0)&&(n=e.lastRenderedReducer,n!==null))try{var i=e.lastRenderedState,f=n(i,l);if(u.hasEagerState=!0,u.eagerState=f,ae(f,i))return Fu(t,e,u,0),pt===null&&Wu(),!1}catch{}finally{}if(l=wi(t,e,u,a),l!==null)return re(l,t,a),Bo(l,e,a),!0}return!1}function yc(t,e,l,a){if(a={lane:2,revertLane:kc(),action:a,hasEagerState:!1,eagerState:null,next:null},vn(t)){if(e)throw Error(r(479))}else e=wi(t,l,a,2),e!==null&&re(e,t,2)}function vn(t){var e=t.alternate;return t===lt||e!==null&&e===lt}function Lo(t,e){ra=rn=!0;var l=t.pending;l===null?e.next=e:(e.next=l.next,l.next=e),t.pending=e}function Bo(t,e,l){if((l&4194048)!==0){var a=e.lanes;a&=t.pendingLanes,l|=a,e.lanes=l,Qf(t,l)}}var yn={readContext:Zt,use:sn,useCallback:Ot,useContext:Ot,useEffect:Ot,useImperativeHandle:Ot,useLayoutEffect:Ot,useInsertionEffect:Ot,useMemo:Ot,useReducer:Ot,useRef:Ot,useState:Ot,useDebugValue:Ot,useDeferredValue:Ot,useTransition:Ot,useSyncExternalStore:Ot,useId:Ot,useHostTransitionStatus:Ot,useFormState:Ot,useActionState:Ot,useOptimistic:Ot,useMemoCache:Ot,useCacheRefresh:Ot},qo={readContext:Zt,use:sn,useCallback:function(t,e){return Ft().memoizedState=[t,e===void 0?null:e],t},useContext:Zt,useEffect:Eo,useImperativeHandle:function(t,e,l){l=l!=null?l.concat([t]):null,mn(4194308,4,Ao.bind(null,e,t),l)},useLayoutEffect:function(t,e){return mn(4194308,4,t,e)},useInsertionEffect:function(t,e){mn(4,2,t,e)},useMemo:function(t,e){var l=Ft();e=e===void 0?null:e;var a=t();if(Ll){We(!0);try{t()}finally{We(!1)}}return l.memoizedState=[a,e],a},useReducer:function(t,e,l){var a=Ft();if(l!==void 0){var u=l(e);if(Ll){We(!0);try{l(e)}finally{We(!1)}}}else u=e;return a.memoizedState=a.baseState=u,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:u},a.queue=t,t=t.dispatch=Mh.bind(null,lt,t),[a.memoizedState,t]},useRef:function(t){var e=Ft();return t={current:t},e.memoizedState=t},useState:function(t){t=oc(t);var e=t.queue,l=wo.bind(null,lt,e);return e.dispatch=l,[t.memoizedState,l]},useDebugValue:dc,useDeferredValue:function(t,e){var l=Ft();return hc(l,t,e)},useTransition:function(){var t=oc(!1);return t=zo.bind(null,lt,t.queue,!0,!1),Ft().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,l){var a=lt,u=Ft();if(ot){if(l===void 0)throw Error(r(407));l=l()}else{if(l=e(),pt===null)throw Error(r(349));(ct&124)!==0||uo(a,e,l)}u.memoizedState=l;var n={value:l,getSnapshot:e};return u.queue=n,Eo(io.bind(null,a,n,t),[t]),a.flags|=2048,sa(9,hn(),no.bind(null,a,n,l,e),null),l},useId:function(){var t=Ft(),e=pt.identifierPrefix;if(ot){var l=Le,a=we;l=(a&~(1<<32-le(a)-1)).toString(32)+l,e="«"+e+"R"+l,l=on++,0W?(qt=K,K=null):qt=K.sibling;var rt=x(S,K,b[W],C);if(rt===null){K===null&&(K=qt);break}t&&K&&rt.alternate===null&&e(S,K),g=n(rt,g,W),at===null?X=rt:at.sibling=rt,at=rt,K=qt}if(W===b.length)return l(S,K),ot&&zl(S,W),X;if(K===null){for(;WW?(qt=K,K=null):qt=K.sibling;var Sl=x(S,K,rt.value,C);if(Sl===null){K===null&&(K=qt);break}t&&K&&Sl.alternate===null&&e(S,K),g=n(Sl,g,W),at===null?X=Sl:at.sibling=Sl,at=Sl,K=qt}if(rt.done)return l(S,K),ot&&zl(S,W),X;if(K===null){for(;!rt.done;W++,rt=b.next())rt=N(S,rt.value,C),rt!==null&&(g=n(rt,g,W),at===null?X=rt:at.sibling=rt,at=rt);return ot&&zl(S,W),X}for(K=a(K);!rt.done;W++,rt=b.next())rt=A(K,S,W,rt.value,C),rt!==null&&(t&&rt.alternate!==null&&K.delete(rt.key===null?W:rt.key),g=n(rt,g,W),at===null?X=rt:at.sibling=rt,at=rt);return t&&K.forEach(function(Cm){return e(S,Cm)}),ot&&zl(S,W),X}function vt(S,g,b,C){if(typeof b=="object"&&b!==null&&b.type===H&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case z:t:{for(var X=b.key;g!==null;){if(g.key===X){if(X=b.type,X===H){if(g.tag===7){l(S,g.sibling),C=u(g,b.props.children),C.return=S,S=C;break t}}else if(g.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===_t&&Yo(X)===g.type){l(S,g.sibling),C=u(g,b.props),iu(C,b),C.return=S,S=C;break t}l(S,g);break}else e(S,g);g=g.sibling}b.type===H?(C=Ol(b.props.children,S.mode,C,b.key),C.return=S,S=C):(C=Iu(b.type,b.key,b.props,null,S.mode,C),iu(C,b),C.return=S,S=C)}return i(S);case B:t:{for(X=b.key;g!==null;){if(g.key===X)if(g.tag===4&&g.stateNode.containerInfo===b.containerInfo&&g.stateNode.implementation===b.implementation){l(S,g.sibling),C=u(g,b.children||[]),C.return=S,S=C;break t}else{l(S,g);break}else e(S,g);g=g.sibling}C=qi(b,S.mode,C),C.return=S,S=C}return i(S);case _t:return X=b._init,b=X(b._payload),vt(S,g,b,C)}if(Xt(b))return P(S,g,b,C);if(Vt(b)){if(X=Vt(b),typeof X!="function")throw Error(r(150));return b=X.call(b),k(S,g,b,C)}if(typeof b.then=="function")return vt(S,g,gn(b),C);if(b.$$typeof===$)return vt(S,g,an(S,b),C);pn(S,b)}return typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint"?(b=""+b,g!==null&&g.tag===6?(l(S,g.sibling),C=u(g,b),C.return=S,S=C):(l(S,g),C=Bi(b,S.mode,C),C.return=S,S=C),i(S)):l(S,g)}return function(S,g,b,C){try{nu=0;var X=vt(S,g,b,C);return da=null,X}catch(K){if(K===Wa||K===nn)throw K;var at=ue(29,K,null,S.mode);return at.lanes=C,at.return=S,at}finally{}}}var ha=Go(!0),Vo=Go(!1),ge=U(null),_e=null;function ul(t){var e=t.alternate;q(Ht,Ht.current&1),q(ge,t),_e===null&&(e===null||fa.current!==null||e.memoizedState!==null)&&(_e=t)}function Xo(t){if(t.tag===22){if(q(Ht,Ht.current),q(ge,t),_e===null){var e=t.alternate;e!==null&&e.memoizedState!==null&&(_e=t)}}else nl()}function nl(){q(Ht,Ht.current),q(ge,ge.current)}function Ye(t){V(ge),_e===t&&(_e=null),V(Ht)}var Ht=U(0);function Sn(t){for(var e=t;e!==null;){if(e.tag===13){var l=e.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||cf(l)))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}function gc(t,e,l,a){e=t.memoizedState,l=l(a,e),l=l==null?e:R({},e,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var pc={enqueueSetState:function(t,e,l){t=t._reactInternals;var a=fe(),u=el(a);u.payload=e,l!=null&&(u.callback=l),e=ll(t,u,a),e!==null&&(re(e,t,a),Pa(e,t,a))},enqueueReplaceState:function(t,e,l){t=t._reactInternals;var a=fe(),u=el(a);u.tag=1,u.payload=e,l!=null&&(u.callback=l),e=ll(t,u,a),e!==null&&(re(e,t,a),Pa(e,t,a))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var l=fe(),a=el(l);a.tag=2,e!=null&&(a.callback=e),e=ll(t,a,l),e!==null&&(re(e,t,l),Pa(e,t,l))}};function Qo(t,e,l,a,u,n,i){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(a,n,i):e.prototype&&e.prototype.isPureReactComponent?!Va(l,a)||!Va(u,n):!0}function Zo(t,e,l,a){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(l,a),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(l,a),e.state!==t&&pc.enqueueReplaceState(e,e.state,null)}function Bl(t,e){var l=e;if("ref"in e){l={};for(var a in e)a!=="ref"&&(l[a]=e[a])}if(t=t.defaultProps){l===e&&(l=R({},l));for(var u in t)l[u]===void 0&&(l[u]=t[u])}return l}var bn=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function Ko(t){bn(t)}function Jo(t){console.error(t)}function ko(t){bn(t)}function En(t,e){try{var l=t.onUncaughtError;l(e.value,{componentStack:e.stack})}catch(a){setTimeout(function(){throw a})}}function $o(t,e,l){try{var a=t.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Sc(t,e,l){return l=el(l),l.tag=3,l.payload={element:null},l.callback=function(){En(t,e)},l}function Wo(t){return t=el(t),t.tag=3,t}function Fo(t,e,l,a){var u=l.type.getDerivedStateFromError;if(typeof u=="function"){var n=a.value;t.payload=function(){return u(n)},t.callback=function(){$o(e,l,a)}}var i=l.stateNode;i!==null&&typeof i.componentDidCatch=="function"&&(t.callback=function(){$o(e,l,a),typeof u!="function"&&(sl===null?sl=new Set([this]):sl.add(this));var f=a.stack;this.componentDidCatch(a.value,{componentStack:f!==null?f:""})})}function Ch(t,e,l,a,u){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(e=l.alternate,e!==null&&Ja(e,l,u,!0),l=ge.current,l!==null){switch(l.tag){case 13:return _e===null?Xc():l.alternate===null&&Dt===0&&(Dt=3),l.flags&=-257,l.flags|=65536,l.lanes=u,a===ki?l.flags|=16384:(e=l.updateQueue,e===null?l.updateQueue=new Set([a]):e.add(a),Zc(t,a,u)),!1;case 22:return l.flags|=65536,a===ki?l.flags|=16384:(e=l.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=e):(l=e.retryQueue,l===null?e.retryQueue=new Set([a]):l.add(a)),Zc(t,a,u)),!1}throw Error(r(435,l.tag))}return Zc(t,a,u),Xc(),!1}if(ot)return e=ge.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=u,a!==Gi&&(t=Error(r(422),{cause:a}),Ka(he(t,l)))):(a!==Gi&&(e=Error(r(423),{cause:a}),Ka(he(e,l))),t=t.current.alternate,t.flags|=65536,u&=-u,t.lanes|=u,a=he(a,l),u=Sc(t.stateNode,a,u),Fi(t,u),Dt!==4&&(Dt=2)),!1;var n=Error(r(520),{cause:a});if(n=he(n,l),hu===null?hu=[n]:hu.push(n),Dt!==4&&(Dt=2),e===null)return!0;a=he(a,l),l=e;do{switch(l.tag){case 3:return l.flags|=65536,t=u&-u,l.lanes|=t,t=Sc(l.stateNode,a,t),Fi(l,t),!1;case 1:if(e=l.type,n=l.stateNode,(l.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||n!==null&&typeof n.componentDidCatch=="function"&&(sl===null||!sl.has(n))))return l.flags|=65536,u&=-u,l.lanes|=u,u=Wo(u),Fo(u,t,l,a),Fi(l,u),!1}l=l.return}while(l!==null);return!1}var Po=Error(r(461)),Lt=!1;function jt(t,e,l,a){e.child=t===null?Vo(e,null,l,a):ha(e,t.child,l,a)}function Io(t,e,l,a,u){l=l.render;var n=e.ref;if("ref"in a){var i={};for(var f in a)f!=="ref"&&(i[f]=a[f])}else i=a;return Hl(e),a=lc(t,e,l,i,n,u),f=ac(),t!==null&&!Lt?(uc(t,e,u),Ge(t,e,u)):(ot&&f&&ji(e),e.flags|=1,jt(t,e,a,u),e.child)}function ts(t,e,l,a,u){if(t===null){var n=l.type;return typeof n=="function"&&!Li(n)&&n.defaultProps===void 0&&l.compare===null?(e.tag=15,e.type=n,es(t,e,n,a,u)):(t=Iu(l.type,null,a,e,e.mode,u),t.ref=e.ref,t.return=e,e.child=t)}if(n=t.child,!_c(t,u)){var i=n.memoizedProps;if(l=l.compare,l=l!==null?l:Va,l(i,a)&&t.ref===e.ref)return Ge(t,e,u)}return e.flags|=1,t=He(n,a),t.ref=e.ref,t.return=e,e.child=t}function es(t,e,l,a,u){if(t!==null){var n=t.memoizedProps;if(Va(n,a)&&t.ref===e.ref)if(Lt=!1,e.pendingProps=a=n,_c(t,u))(t.flags&131072)!==0&&(Lt=!0);else return e.lanes=t.lanes,Ge(t,e,u)}return bc(t,e,l,a,u)}function ls(t,e,l){var a=e.pendingProps,u=a.children,n=t!==null?t.memoizedState:null;if(a.mode==="hidden"){if((e.flags&128)!==0){if(a=n!==null?n.baseLanes|l:l,t!==null){for(u=e.child=t.child,n=0;u!==null;)n=n|u.lanes|u.childLanes,u=u.sibling;e.childLanes=n&~a}else e.childLanes=0,e.child=null;return as(t,e,a,l)}if((l&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&un(e,n!==null?n.cachePool:null),n!==null?to(e,n):Ii(),Xo(e);else return e.lanes=e.childLanes=536870912,as(t,e,n!==null?n.baseLanes|l:l,l)}else n!==null?(un(e,n.cachePool),to(e,n),nl(),e.memoizedState=null):(t!==null&&un(e,null),Ii(),nl());return jt(t,e,u,l),e.child}function as(t,e,l,a){var u=Ji();return u=u===null?null:{parent:Ut._currentValue,pool:u},e.memoizedState={baseLanes:l,cachePool:u},t!==null&&un(e,null),Ii(),Xo(e),t!==null&&Ja(t,e,a,!0),null}function Tn(t,e){var l=e.ref;if(l===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(t===null||t.ref!==l)&&(e.flags|=4194816)}}function bc(t,e,l,a,u){return Hl(e),l=lc(t,e,l,a,void 0,u),a=ac(),t!==null&&!Lt?(uc(t,e,u),Ge(t,e,u)):(ot&&a&&ji(e),e.flags|=1,jt(t,e,l,u),e.child)}function us(t,e,l,a,u,n){return Hl(e),e.updateQueue=null,l=lo(e,a,l,u),eo(t),a=ac(),t!==null&&!Lt?(uc(t,e,n),Ge(t,e,n)):(ot&&a&&ji(e),e.flags|=1,jt(t,e,l,n),e.child)}function ns(t,e,l,a,u){if(Hl(e),e.stateNode===null){var n=aa,i=l.contextType;typeof i=="object"&&i!==null&&(n=Zt(i)),n=new l(a,n),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=pc,e.stateNode=n,n._reactInternals=e,n=e.stateNode,n.props=a,n.state=e.memoizedState,n.refs={},$i(e),i=l.contextType,n.context=typeof i=="object"&&i!==null?Zt(i):aa,n.state=e.memoizedState,i=l.getDerivedStateFromProps,typeof i=="function"&&(gc(e,l,i,a),n.state=e.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof n.getSnapshotBeforeUpdate=="function"||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(i=n.state,typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount(),i!==n.state&&pc.enqueueReplaceState(n,n.state,null),tu(e,a,n,u),Ia(),n.state=e.memoizedState),typeof n.componentDidMount=="function"&&(e.flags|=4194308),a=!0}else if(t===null){n=e.stateNode;var f=e.memoizedProps,m=Bl(l,f);n.props=m;var E=n.context,O=l.contextType;i=aa,typeof O=="object"&&O!==null&&(i=Zt(O));var N=l.getDerivedStateFromProps;O=typeof N=="function"||typeof n.getSnapshotBeforeUpdate=="function",f=e.pendingProps!==f,O||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(f||E!==i)&&Zo(e,n,a,i),tl=!1;var x=e.memoizedState;n.state=x,tu(e,a,n,u),Ia(),E=e.memoizedState,f||x!==E||tl?(typeof N=="function"&&(gc(e,l,N,a),E=e.memoizedState),(m=tl||Qo(e,l,m,a,x,E,i))?(O||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount()),typeof n.componentDidMount=="function"&&(e.flags|=4194308)):(typeof n.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=a,e.memoizedState=E),n.props=a,n.state=E,n.context=i,a=m):(typeof n.componentDidMount=="function"&&(e.flags|=4194308),a=!1)}else{n=e.stateNode,Wi(t,e),i=e.memoizedProps,O=Bl(l,i),n.props=O,N=e.pendingProps,x=n.context,E=l.contextType,m=aa,typeof E=="object"&&E!==null&&(m=Zt(E)),f=l.getDerivedStateFromProps,(E=typeof f=="function"||typeof n.getSnapshotBeforeUpdate=="function")||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(i!==N||x!==m)&&Zo(e,n,a,m),tl=!1,x=e.memoizedState,n.state=x,tu(e,a,n,u),Ia();var A=e.memoizedState;i!==N||x!==A||tl||t!==null&&t.dependencies!==null&&ln(t.dependencies)?(typeof f=="function"&&(gc(e,l,f,a),A=e.memoizedState),(O=tl||Qo(e,l,O,a,x,A,m)||t!==null&&t.dependencies!==null&&ln(t.dependencies))?(E||typeof n.UNSAFE_componentWillUpdate!="function"&&typeof n.componentWillUpdate!="function"||(typeof n.componentWillUpdate=="function"&&n.componentWillUpdate(a,A,m),typeof n.UNSAFE_componentWillUpdate=="function"&&n.UNSAFE_componentWillUpdate(a,A,m)),typeof n.componentDidUpdate=="function"&&(e.flags|=4),typeof n.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof n.componentDidUpdate!="function"||i===t.memoizedProps&&x===t.memoizedState||(e.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||i===t.memoizedProps&&x===t.memoizedState||(e.flags|=1024),e.memoizedProps=a,e.memoizedState=A),n.props=a,n.state=A,n.context=m,a=O):(typeof n.componentDidUpdate!="function"||i===t.memoizedProps&&x===t.memoizedState||(e.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||i===t.memoizedProps&&x===t.memoizedState||(e.flags|=1024),a=!1)}return n=a,Tn(t,e),a=(e.flags&128)!==0,n||a?(n=e.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:n.render(),e.flags|=1,t!==null&&a?(e.child=ha(e,t.child,null,u),e.child=ha(e,null,l,u)):jt(t,e,l,u),e.memoizedState=n.state,t=e.child):t=Ge(t,e,u),t}function is(t,e,l,a){return Za(),e.flags|=256,jt(t,e,l,a),e.child}var Ec={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Tc(t){return{baseLanes:t,cachePool:Kr()}}function xc(t,e,l){return t=t!==null?t.childLanes&~l:0,e&&(t|=pe),t}function cs(t,e,l){var a=e.pendingProps,u=!1,n=(e.flags&128)!==0,i;if((i=n)||(i=t!==null&&t.memoizedState===null?!1:(Ht.current&2)!==0),i&&(u=!0,e.flags&=-129),i=(e.flags&32)!==0,e.flags&=-33,t===null){if(ot){if(u?ul(e):nl(),ot){var f=At,m;if(m=f){t:{for(m=f,f=De;m.nodeType!==8;){if(!f){f=null;break t}if(m=xe(m.nextSibling),m===null){f=null;break t}}f=m}f!==null?(e.memoizedState={dehydrated:f,treeContext:Ml!==null?{id:we,overflow:Le}:null,retryLane:536870912,hydrationErrors:null},m=ue(18,null,null,0),m.stateNode=f,m.return=e,e.child=m,kt=e,At=null,m=!0):m=!1}m||Nl(e)}if(f=e.memoizedState,f!==null&&(f=f.dehydrated,f!==null))return cf(f)?e.lanes=32:e.lanes=536870912,null;Ye(e)}return f=a.children,a=a.fallback,u?(nl(),u=e.mode,f=xn({mode:"hidden",children:f},u),a=Ol(a,u,l,null),f.return=e,a.return=e,f.sibling=a,e.child=f,u=e.child,u.memoizedState=Tc(l),u.childLanes=xc(t,i,l),e.memoizedState=Ec,a):(ul(e),Rc(e,f))}if(m=t.memoizedState,m!==null&&(f=m.dehydrated,f!==null)){if(n)e.flags&256?(ul(e),e.flags&=-257,e=Ac(t,e,l)):e.memoizedState!==null?(nl(),e.child=t.child,e.flags|=128,e=null):(nl(),u=a.fallback,f=e.mode,a=xn({mode:"visible",children:a.children},f),u=Ol(u,f,l,null),u.flags|=2,a.return=e,u.return=e,a.sibling=u,e.child=a,ha(e,t.child,null,l),a=e.child,a.memoizedState=Tc(l),a.childLanes=xc(t,i,l),e.memoizedState=Ec,e=u);else if(ul(e),cf(f)){if(i=f.nextSibling&&f.nextSibling.dataset,i)var E=i.dgst;i=E,a=Error(r(419)),a.stack="",a.digest=i,Ka({value:a,source:null,stack:null}),e=Ac(t,e,l)}else if(Lt||Ja(t,e,l,!1),i=(l&t.childLanes)!==0,Lt||i){if(i=pt,i!==null&&(a=l&-l,a=(a&42)!==0?1:ci(a),a=(a&(i.suspendedLanes|l))!==0?0:a,a!==0&&a!==m.retryLane))throw m.retryLane=a,la(t,a),re(i,t,a),Po;f.data==="$?"||Xc(),e=Ac(t,e,l)}else f.data==="$?"?(e.flags|=192,e.child=t.child,e=null):(t=m.treeContext,At=xe(f.nextSibling),kt=e,ot=!0,Cl=null,De=!1,t!==null&&(ve[ye++]=we,ve[ye++]=Le,ve[ye++]=Ml,we=t.id,Le=t.overflow,Ml=e),e=Rc(e,a.children),e.flags|=4096);return e}return u?(nl(),u=a.fallback,f=e.mode,m=t.child,E=m.sibling,a=He(m,{mode:"hidden",children:a.children}),a.subtreeFlags=m.subtreeFlags&65011712,E!==null?u=He(E,u):(u=Ol(u,f,l,null),u.flags|=2),u.return=e,a.return=e,a.sibling=u,e.child=a,a=u,u=e.child,f=t.child.memoizedState,f===null?f=Tc(l):(m=f.cachePool,m!==null?(E=Ut._currentValue,m=m.parent!==E?{parent:E,pool:E}:m):m=Kr(),f={baseLanes:f.baseLanes|l,cachePool:m}),u.memoizedState=f,u.childLanes=xc(t,i,l),e.memoizedState=Ec,a):(ul(e),l=t.child,t=l.sibling,l=He(l,{mode:"visible",children:a.children}),l.return=e,l.sibling=null,t!==null&&(i=e.deletions,i===null?(e.deletions=[t],e.flags|=16):i.push(t)),e.child=l,e.memoizedState=null,l)}function Rc(t,e){return e=xn({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function xn(t,e){return t=ue(22,t,null,e),t.lanes=0,t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function Ac(t,e,l){return ha(e,t.child,null,l),t=Rc(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function fs(t,e,l){t.lanes|=e;var a=t.alternate;a!==null&&(a.lanes|=e),Xi(t.return,e,l)}function Dc(t,e,l,a,u){var n=t.memoizedState;n===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:u}:(n.isBackwards=e,n.rendering=null,n.renderingStartTime=0,n.last=a,n.tail=l,n.tailMode=u)}function rs(t,e,l){var a=e.pendingProps,u=a.revealOrder,n=a.tail;if(jt(t,e,a.children,l),a=Ht.current,(a&2)!==0)a=a&1|2,e.flags|=128;else{if(t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&fs(t,l,e);else if(t.tag===19)fs(t,l,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}a&=1}switch(q(Ht,a),u){case"forwards":for(l=e.child,u=null;l!==null;)t=l.alternate,t!==null&&Sn(t)===null&&(u=l),l=l.sibling;l=u,l===null?(u=e.child,e.child=null):(u=l.sibling,l.sibling=null),Dc(e,!1,u,l,n);break;case"backwards":for(l=null,u=e.child,e.child=null;u!==null;){if(t=u.alternate,t!==null&&Sn(t)===null){e.child=u;break}t=u.sibling,u.sibling=l,l=u,u=t}Dc(e,!0,l,null,n);break;case"together":Dc(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Ge(t,e,l){if(t!==null&&(e.dependencies=t.dependencies),ol|=e.lanes,(l&e.childLanes)===0)if(t!==null){if(Ja(t,e,l,!1),(l&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(r(153));if(e.child!==null){for(t=e.child,l=He(t,t.pendingProps),e.child=l,l.return=e;t.sibling!==null;)t=t.sibling,l=l.sibling=He(t,t.pendingProps),l.return=e;l.sibling=null}return e.child}function _c(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&ln(t)))}function Nh(t,e,l){switch(e.tag){case 3:bt(e,e.stateNode.containerInfo),Ie(e,Ut,t.memoizedState.cache),Za();break;case 27:case 5:li(e);break;case 4:bt(e,e.stateNode.containerInfo);break;case 10:Ie(e,e.type,e.memoizedProps.value);break;case 13:var a=e.memoizedState;if(a!==null)return a.dehydrated!==null?(ul(e),e.flags|=128,null):(l&e.child.childLanes)!==0?cs(t,e,l):(ul(e),t=Ge(t,e,l),t!==null?t.sibling:null);ul(e);break;case 19:var u=(t.flags&128)!==0;if(a=(l&e.childLanes)!==0,a||(Ja(t,e,l,!1),a=(l&e.childLanes)!==0),u){if(a)return rs(t,e,l);e.flags|=128}if(u=e.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),q(Ht,Ht.current),a)break;return null;case 22:case 23:return e.lanes=0,ls(t,e,l);case 24:Ie(e,Ut,t.memoizedState.cache)}return Ge(t,e,l)}function os(t,e,l){if(t!==null)if(t.memoizedProps!==e.pendingProps)Lt=!0;else{if(!_c(t,l)&&(e.flags&128)===0)return Lt=!1,Nh(t,e,l);Lt=(t.flags&131072)!==0}else Lt=!1,ot&&(e.flags&1048576)!==0&&jr(e,en,e.index);switch(e.lanes=0,e.tag){case 16:t:{t=e.pendingProps;var a=e.elementType,u=a._init;if(a=u(a._payload),e.type=a,typeof a=="function")Li(a)?(t=Bl(a,t),e.tag=1,e=ns(null,e,a,t,l)):(e.tag=0,e=bc(null,e,a,t,l));else{if(a!=null){if(u=a.$$typeof,u===it){e.tag=11,e=Io(null,e,a,t,l);break t}else if(u===Rt){e.tag=14,e=ts(null,e,a,t,l);break t}}throw e=Tl(a)||a,Error(r(306,e,""))}}return e;case 0:return bc(t,e,e.type,e.pendingProps,l);case 1:return a=e.type,u=Bl(a,e.pendingProps),ns(t,e,a,u,l);case 3:t:{if(bt(e,e.stateNode.containerInfo),t===null)throw Error(r(387));a=e.pendingProps;var n=e.memoizedState;u=n.element,Wi(t,e),tu(e,a,null,l);var i=e.memoizedState;if(a=i.cache,Ie(e,Ut,a),a!==n.cache&&Qi(e,[Ut],l,!0),Ia(),a=i.element,n.isDehydrated)if(n={element:a,isDehydrated:!1,cache:i.cache},e.updateQueue.baseState=n,e.memoizedState=n,e.flags&256){e=is(t,e,a,l);break t}else if(a!==u){u=he(Error(r(424)),e),Ka(u),e=is(t,e,a,l);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(At=xe(t.firstChild),kt=e,ot=!0,Cl=null,De=!0,l=Vo(e,null,a,l),e.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Za(),a===u){e=Ge(t,e,l);break t}jt(t,e,a,l)}e=e.child}return e;case 26:return Tn(t,e),t===null?(l=m0(e.type,null,e.pendingProps,null))?e.memoizedState=l:ot||(l=e.type,t=e.pendingProps,a=Bn(tt.current).createElement(l),a[Qt]=e,a[$t]=t,Gt(a,l,t),wt(a),e.stateNode=a):e.memoizedState=m0(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return li(e),t===null&&ot&&(a=e.stateNode=s0(e.type,e.pendingProps,tt.current),kt=e,De=!0,u=At,ml(e.type)?(ff=u,At=xe(a.firstChild)):At=u),jt(t,e,e.pendingProps.children,l),Tn(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&ot&&((u=a=At)&&(a=im(a,e.type,e.pendingProps,De),a!==null?(e.stateNode=a,kt=e,At=xe(a.firstChild),De=!1,u=!0):u=!1),u||Nl(e)),li(e),u=e.type,n=e.pendingProps,i=t!==null?t.memoizedProps:null,a=n.children,af(u,n)?a=null:i!==null&&af(u,i)&&(e.flags|=32),e.memoizedState!==null&&(u=lc(t,e,Rh,null,null,l),Tu._currentValue=u),Tn(t,e),jt(t,e,a,l),e.child;case 6:return t===null&&ot&&((t=l=At)&&(l=cm(l,e.pendingProps,De),l!==null?(e.stateNode=l,kt=e,At=null,t=!0):t=!1),t||Nl(e)),null;case 13:return cs(t,e,l);case 4:return bt(e,e.stateNode.containerInfo),a=e.pendingProps,t===null?e.child=ha(e,null,a,l):jt(t,e,a,l),e.child;case 11:return Io(t,e,e.type,e.pendingProps,l);case 7:return jt(t,e,e.pendingProps,l),e.child;case 8:return jt(t,e,e.pendingProps.children,l),e.child;case 12:return jt(t,e,e.pendingProps.children,l),e.child;case 10:return a=e.pendingProps,Ie(e,e.type,a.value),jt(t,e,a.children,l),e.child;case 9:return u=e.type._context,a=e.pendingProps.children,Hl(e),u=Zt(u),a=a(u),e.flags|=1,jt(t,e,a,l),e.child;case 14:return ts(t,e,e.type,e.pendingProps,l);case 15:return es(t,e,e.type,e.pendingProps,l);case 19:return rs(t,e,l);case 31:return a=e.pendingProps,l=e.mode,a={mode:a.mode,children:a.children},t===null?(l=xn(a,l),l.ref=e.ref,e.child=l,l.return=e,e=l):(l=He(t.child,a),l.ref=e.ref,e.child=l,l.return=e,e=l),e;case 22:return ls(t,e,l);case 24:return Hl(e),a=Zt(Ut),t===null?(u=Ji(),u===null&&(u=pt,n=Zi(),u.pooledCache=n,n.refCount++,n!==null&&(u.pooledCacheLanes|=l),u=n),e.memoizedState={parent:a,cache:u},$i(e),Ie(e,Ut,u)):((t.lanes&l)!==0&&(Wi(t,e),tu(e,null,null,l),Ia()),u=t.memoizedState,n=e.memoizedState,u.parent!==a?(u={parent:a,cache:a},e.memoizedState=u,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=u),Ie(e,Ut,a)):(a=n.cache,Ie(e,Ut,a),a!==u.cache&&Qi(e,[Ut],l,!0))),jt(t,e,e.pendingProps.children,l),e.child;case 29:throw e.pendingProps}throw Error(r(156,e.tag))}function Ve(t){t.flags|=4}function ss(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!S0(e)){if(e=ge.current,e!==null&&((ct&4194048)===ct?_e!==null:(ct&62914560)!==ct&&(ct&536870912)===0||e!==_e))throw Fa=ki,Jr;t.flags|=8192}}function Rn(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?Vf():536870912,t.lanes|=e,ga|=e)}function cu(t,e){if(!ot)switch(t.tailMode){case"hidden":e=t.tail;for(var l=null;e!==null;)e.alternate!==null&&(l=e),e=e.sibling;l===null?t.tail=null:l.sibling=null;break;case"collapsed":l=t.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:a.sibling=null}}function xt(t){var e=t.alternate!==null&&t.alternate.child===t.child,l=0,a=0;if(e)for(var u=t.child;u!==null;)l|=u.lanes|u.childLanes,a|=u.subtreeFlags&65011712,a|=u.flags&65011712,u.return=t,u=u.sibling;else for(u=t.child;u!==null;)l|=u.lanes|u.childLanes,a|=u.subtreeFlags,a|=u.flags,u.return=t,u=u.sibling;return t.subtreeFlags|=a,t.childLanes=l,e}function Uh(t,e,l){var a=e.pendingProps;switch(Yi(e),e.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xt(e),null;case 1:return xt(e),null;case 3:return l=e.stateNode,a=null,t!==null&&(a=t.memoizedState.cache),e.memoizedState.cache!==a&&(e.flags|=2048),qe(Ut),$e(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(Qa(e)?Ve(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,Vr())),xt(e),null;case 26:return l=e.memoizedState,t===null?(Ve(e),l!==null?(xt(e),ss(e,l)):(xt(e),e.flags&=-16777217)):l?l!==t.memoizedState?(Ve(e),xt(e),ss(e,l)):(xt(e),e.flags&=-16777217):(t.memoizedProps!==a&&Ve(e),xt(e),e.flags&=-16777217),null;case 27:Hu(e),l=tt.current;var u=e.type;if(t!==null&&e.stateNode!=null)t.memoizedProps!==a&&Ve(e);else{if(!a){if(e.stateNode===null)throw Error(r(166));return xt(e),null}t=J.current,Qa(e)?Yr(e):(t=s0(u,a,l),e.stateNode=t,Ve(e))}return xt(e),null;case 5:if(Hu(e),l=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==a&&Ve(e);else{if(!a){if(e.stateNode===null)throw Error(r(166));return xt(e),null}if(t=J.current,Qa(e))Yr(e);else{switch(u=Bn(tt.current),t){case 1:t=u.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:t=u.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":t=u.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":t=u.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":t=u.createElement("div"),t.innerHTML="
+
+
+
+
+
+ CDRM Decryption Extension
+
-
-
-
-
-
+
+
+
+
+