"use strict";
(self.webpackChunk_N_E = self.webpackChunk_N_E || []).push([
[1373], {
654: (e, t, a) => {
a.d(t, {
Dk: () => n,
Nw: () => s,
fH: () => r
});
let n = async e => {
try {
if (navigator.clipboard) return await navigator.clipboard.writeText(e), !0;
{
let t = document.createElement("textarea");
return t.value = e, t.style.position = "fixed", t.style.opacity = "0", document.body.appendChild(t), t.focus(), t.select(), document.execCommand("copy", !0), document.body.removeChild(t), !0
}
} catch (e) {
return !1
}
}, r = function() {
for (var e, t = arguments.length, a = Array(t), n = 0; n < t; n++) a[n] = arguments[n];
((null == (e = window) ? void 0 : e.__LOG__) || sessionStorage.getItem("__LOG__")) && console.info(...a)
}, s = () => {
let e = sessionStorage.getItem("__AGORA_LOG_LEVEL__") || window.__AGORA_LOG_LEVEL__;
return e && ["1", "2", "3", "4"].includes(e) ? parseInt(e) : 1
}
},
11373: (e, t, a) => {
a.d(t, {
F6: () => x,
Jt: () => N,
bE: () => b,
yH: () => O
});
var n = a(20045),
r = a(65718),
s = a(49855),
o = a(38557),
i = a(65303),
l = a(76136),
d = a(52286),
c = a(39502),
u = a(23923),
_ = a(63193),
p = a(654),
E = a(71146),
m = a(19570),
f = a(34587),
h = a(43289);
let T = ["/api/request-headers", "sls.aliyuncs.com", "arms-rum", ".gif"];
function y(e) {
return T.some(t => e.includes(t))
}
let v = {
maxRetries: 3,
retryDelay: 1e3,
retryableStatusCodes: [502, 503, 504, 525, 526]
},
g = 0,
A = new Map,
R = {
TOO_MANY_REQUESTS: 429,
LIVE_SESSION_NOT_FOUND: 5001,
LIVE_MISSING_AGORA_UID: 5002,
LIVE_ALREADY_JOINED: 5003,
LIVE_USER_NOT_IN_ROOM: 5004,
LIVE_AGORA_UID_MISMATCH: 5005,
LIVE_EMPTY_CONTENT: 5006,
LIVE_CONTENT_REJECTED: 5007,
LIVE_INVALID_MSG_TYPE: 5008,
LIVE_OUTFIT_USER_BUSY: 5009,
LIVE_OUTFIT_QUEUE_FULL: 5010,
LIVE_OUTFIT_INVALID_COMMAND: 5011,
LIVE_AUDIT_UNAVAILABLE: 5012
};
function w(e, t) {
if (t && e && "object" == typeof e && "code" in e) {
if (0 === e.code) return void 0 !== e.data ? e.data : e;
throw Error(function(e) {
let t = e.msg || e.message || "Request failed",
a = function(e) {
let t = Object.entries(R).find(t => {
let [, a] = t;
return a === e
});
return null == t ? void 0 : t[0]
}(e.code);
if (!a) return t;
let n = "".concat("api.liveErrors", ".").concat(a);
return h.A.t(n, {
defaultValue: t
})
}(e))
}
return e
}
function I(e) {
let {
prefetchRequest: t,
method: a,
url: n,
requestData: r,
requestParams: s,
responseData: o,
error: i,
success: l
} = e, d = Math.max(0, Math.round(("undefined" != typeof performance ? performance.now() : Date.now()) - t.start)), _ = l ? "prefetch" : "prefetch_error";
try {
(0, u.ss)({
url: n,
method: a.toLowerCase(),
requestData: r,
requestParams: s,
responseData: o,
error: i instanceof Error ? i.message : i,
duration: d,
success: l,
status: _
}, "network"), (0, c.u4)({
key: c.yW.REALTIME_REQUEST_LOAD,
params: {
[c.pX.DURATION]: d,
[c.pX.REQUEST_URL]: n,
[c.pX.REQUEST_METHOD]: a.toLowerCase(),
[c.pX.REQUEST_SUCCESS]: +!!l,
[c.pX.REQUEST_STATUS]: _
}
})
} catch (e) {}
}
let S = n.A.create({
baseURL: "".concat((0, f.xv)()).concat(""),
timeout: 3e4,
headers: {
"Content-Type": "application/json"
}
});
async function C(e, t, a) {
let n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {},
{
skipAuth: r,
skipAuthCheck: s,
skipNoAuthRes: o,
validateCode: i = !0,
noRetry: l,
...d
} = n,
c = {
...d,
method: e.toLowerCase(),
url: t,
skipAuth: r,
skipAuthCheck: s,
skipNoAuthRes: o,
validateCode: i,
noRetry: l
};
void 0 !== a && "GET" !== e && (c.data = a);
let u = function(e) {
var t;
if (!(null == (t = window.__PREFETCH__PROMISE__) ? void 0 : t.length)) return null;
let a = window.__PREFETCH__PROMISE__.findIndex(t => (function(e) {
let {
prefetchRequest: t,
method: a,
url: n,
requestData: r,
requestParams: s
} = e;
if (t.method !== a || t.url !== n) return !1;
if (!t.sameRequest) return !0;
try {
var o, i;
return !!t.sameRequest("GET" === a ? s : r, (o = t.body, i = t.params, "GET" === a ? i : o))
} catch (e) {
return !1
}
})({
prefetchRequest: t,
...e
}));
if (a < 0) return null;
let [n] = window.__PREFETCH__PROMISE__.splice(a, 1);
return null != n ? n : null
}({
method: e,
url: t,
requestData: c.data,
requestParams: c.params
});
if (u) {
(0, p.fH)("prefetch match!", u);
try {
let a = await u.promise;
return I({
prefetchRequest: u,
method: e,
url: t,
requestData: c.data,
requestParams: c.params,
responseData: a,
success: !0
}), w(a, !1 !== i)
} catch (a) {
throw I({
prefetchRequest: u,
method: e,
url: t,
requestData: c.data,
requestParams: c.params,
error: a,
success: !1
}), a
}
}
return await S.request(c)
}
async function N(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
return C("GET", e, void 0, t)
}
async function b(e, t) {
let a = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
return C("POST", e, t, a)
}
async function O(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
return C("DELETE", e, void 0, t)
}
async function x(e, t) {
let a = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
return C("PATCH", e, t, a)
}
S.interceptors.request.use(e => {
if ((0, o.P5)()) {
if (e.headers.delete("Authorization"), !e.skipAuth && (0, o.fd)(e.method, e.url)) {
let t = (0, o.rO)();
if (!t) return Promise.reject(new i.d("No embed authorization token", s.U9.REQUEST_MISSING_TOKEN));
e.headers.set("Authorization", "Embed ".concat(t))
}
} else if (!e.skipAuth) {
let t = (0, m.XL)();
if (t) e.headers.Authorization = t;
else if (!e.skipAuthCheck) return (0, E.jL)().catch(() => {}), Promise.reject(new i.d("No authorization token", s.U9.REQUEST_MISSING_TOKEN))
}
if (e.data instanceof FormData && delete e.headers["Content-Type"], null == e.__logStartTime) {
var t, a;
let n = Date.now(),
r = ++g;
e.__logStartTime = n, e.__logId = r, A.set(r, {
startTime: n,
url: null != (t = e.url) ? t : "",
method: (null != (a = e.method) ? a : "get").toLowerCase(),
requestData: e.data,
requestParams: e.params
})
}
return e
}, e => Promise.reject(e)), S.interceptors.response.use(e => {
let t = e.config,
a = e.data;
try {
var n, r, s, o, i, _, p;
let E = (null == (n = e.headers) ? void 0 : n["x-trace-id"]) || (null == (r = e.headers) ? void 0 : r["X-Trace-Id"]);
E && (0, d.xE)(String(E));
let m = null != t.__logStartTime ? Math.round(Date.now() - t.__logStartTime) : 0;
null != t.__logId && A.delete(t.__logId), (0, u.ss)({
url: t.url,
method: t.method,
requestData: t.data,
requestParams: t.params,
responseData: a,
status: e.status,
traceId: E,
duration: m,
success: !0
}, "network"), (0, c.u4)({
key: c.yW.REALTIME_REQUEST_LOAD,
params: {
[c.pX.DURATION]: m,
[c.pX.REQUEST_URL]: null != (s = t.url) ? s : "",
[c.pX.REQUEST_METHOD]: (null != (o = t.method) ? o : "get").toLowerCase(),
[c.pX.REQUEST_SUCCESS]: 1,
[c.pX.REQUEST_STATUS]: String(e.status)
}
}), m >= 5e3 && !y(null != (i = t.url) ? i : "") && (0, l.Tm)({
url: null != (_ = t.url) ? _ : "",
method: (null != (p = t.method) ? p : "get").toUpperCase(),
duration: m,
status: e.status,
...E ? {
traceId: String(E)
} : {}
})
} catch (e) {}
return w(a, !1 !== t.validateCode)
}, async e => {
var t, a, n, p, h, T, g, R, w, I, C, N, b, O, x, L, U, D, M, P;
let k = e.config,
j = null == (t = e.response) ? void 0 : t.status,
B = null == k || null == (a = k.headers) ? void 0 : a.get("Authorization");
if (k) try {
let t = (null == (I = e.response) || null == (w = I.headers) ? void 0 : w["x-trace-id"]) || (null == (N = e.response) || null == (C = N.headers) ? void 0 : C["X-Trace-Id"]);
t && (0, d.xE)(String(t));
let a = null != k.__logStartTime ? Math.round(Date.now() - k.__logStartTime) : 0;
null != k.__logId && A.delete(k.__logId), (0, u.ss)({
url: k.url,
method: k.method,
requestData: k.data,
requestParams: k.params,
error: e.message,
status: j,
responseData: null == (b = e.response) ? void 0 : b.data,
traceId: t,
duration: a,
success: !1
}, "network"), (0, c.u4)({
key: c.yW.REALTIME_REQUEST_LOAD,
params: {
[c.pX.DURATION]: a,
[c.pX.REQUEST_URL]: null != (O = k.url) ? O : "",
[c.pX.REQUEST_METHOD]: (null != (x = k.method) ? x : "get").toLowerCase(),
[c.pX.REQUEST_SUCCESS]: 0,
[c.pX.REQUEST_STATUS]: null != j ? String(j) : "error"
}
}), a >= 5e3 && !y(null != (L = k.url) ? L : "") && (0, l.Tm)({
url: null != (U = k.url) ? U : "",
method: (null != (D = k.method) ? D : "get").toUpperCase(),
duration: a,
status: null != j ? j : "error",
...t ? {
traceId: String(t)
} : {}
})
} catch (e) {}
if (k && !k.noRetry && j && v.retryableStatusCodes.includes(j) && (k.__retryCount = k.__retryCount || 0, k.__retryCount < v.maxRetries) || k && !k.noRetry && !e.response && "ERR_NETWORK" === e.code && (k.__retryCount = k.__retryCount || 0, k.__retryCount < v.maxRetries)) {
k.__retryCount += 1;
let e = v.retryDelay * k.__retryCount;
return await new Promise(t => setTimeout(t, e)), S.request(k)
}
if (401 === j && "string" == typeof B && B.startsWith("Embed ")) return (0, o.Z7)(B.slice(6)), Promise.reject(new i.d("Embed authentication expired", s.U9.AUTHENTICATION_EXPIRED));
if ((null == (n = e.response) ? void 0 : n.status) === 403) {
let t = (null == (P = e.response) || null == (M = P.data) ? void 0 : M.detail) || "";
if (t.includes("INVITATION_CODE_REQUIRED")) return (0, r.w)(), Promise.reject(Error(t.replace("INVITATION_CODE_REQUIRED: ", "") || "Invitation code required"))
}
return (null == (p = e.response) ? void 0 : p.status) !== 401 || (null == k ? void 0 : k.skipNoAuthRes) || (0, o.P5)() ? e instanceof i.d ? Promise.reject(e) : Promise.reject(Error((null == (T = e.response) || null == (h = T.data) ? void 0 : h.detail) || (null == (R = e.response) || null == (g = R.data) ? void 0 : g.message) || e.message)) : ((0, E.h6)() || ((0, E.N)(!0), _.ri((0, f.Jv)()), (0, m.Yj)(m.eu.AUTH_TOKEN), setTimeout(() => {
(0, E.jL)().catch(() => {}).finally(() => {
(0, E.N)(!1)
})
}, 100)), Promise.reject(new i.d("Authentication expired, please login again", s.U9.AUTHENTICATION_EXPIRED, {
error: e
})))
}), window.addEventListener("pagehide", () => {
A.forEach(e => {
try {
let t = Math.round(Date.now() - e.startTime);
(0, u.ss)({
url: e.url,
method: e.method,
requestData: e.requestData,
requestParams: e.requestParams,
duration: t,
success: !1,
status: "unload"
}, "network"), (0, c.u4)({
key: c.yW.REALTIME_REQUEST_LOAD,
params: {
[c.pX.DURATION]: t,
[c.pX.REQUEST_URL]: e.url,
[c.pX.REQUEST_METHOD]: e.method,
[c.pX.REQUEST_SUCCESS]: 0,
[c.pX.REQUEST_STATUS]: "unload"
}
})
} catch (e) {}
}), A.clear()
})
},
15202: (e, t, a) => {
a.d(t, {
Zu: () => d,
fW: () => c,
wS: () => l
});
var n = a(25771),
r = a(87163),
s = a(57425);
let o = {
body: '',
viewBox: {
left: 0,
top: 0,
width: 24,
height: 24
},
left: 0,
top: 0,
width: 24,
height: 24
},
i = {
body: '',
viewBox: {
left: 0,
top: 0,
width: 24,
height: 24
},
left: 0,
top: 0,
width: 24,
height: 24
},
l = [{
value: "16:9",
label: "16:9",
icon: (0, n.jsx)(e => {
let {
className: t = "",
...a
} = e;
return (0, n.jsx)("div", {
className: t,
style: {
height: "1em",
aspectRatio: 1
},
children: (0, n.jsx)(s.In, {
...a,
icon: o,
height: "1em"
})
})
}, {
className: "text-[40px]"
}),
activeIcon: (0, n.jsx)(e => {
let {
className: t = "",
...a
} = e, o = (0, r.useId)(), i = (0, r.useMemo)(() => ({
body: ''),
viewBox: {
left: 0,
top: 0,
width: 24,
height: 24
},
left: 0,
top: 0,
width: 24,
height: 24
}), [o]);
return (0, n.jsx)("div", {
className: t,
style: {
height: "1em",
aspectRatio: 1
},
children: (0, n.jsx)(s.In, {
...a,
icon: i,
height: "1em"
})
})
}, {
className: "text-[40px]"
})
}, {
value: "9:16",
label: "9:16",
icon: (0, n.jsx)(e => {
let {
className: t = "",
...a
} = e;
return (0, n.jsx)("div", {
className: t,
style: {
height: "1em",
aspectRatio: 1
},
children: (0, n.jsx)(s.In, {
...a,
icon: i,
height: "1em"
})
})
}, {
className: "text-[40px]"
}),
activeIcon: (0, n.jsx)(e => {
let {
className: t = "",
...a
} = e, o = (0, r.useId)(), i = (0, r.useMemo)(() => ({
body: ''),
viewBox: {
left: 0,
top: 0,
width: 24,
height: 24
},
left: 0,
top: 0,
width: 24,
height: 24
}), [o]);
return (0, n.jsx)("div", {
className: t,
style: {
height: "1em",
aspectRatio: 1
},
children: (0, n.jsx)(s.In, {
...a,
icon: i,
height: "1em"
})
})
}, {
className: "text-[40px]"
})
}],
d = [{
name: "POV",
desc: "Explore the world first-person",
key: "POV"
}, {
name: "Ambient",
desc: "Calm, atmospheric with subtle motion",
key: "static"
}, {
name: "Dramatic",
desc: "Cinematic narratives full of action and dialog",
key: "creative"
}],
c = {
dress: "outfit_queen",
default: "default"
}
},
21852: (e, t, a) => {
a.d(t, {
Gm: () => s,
lD: () => i,
lT: () => r,
sq: () => o
});
var n = a(11373);
let r = async (e, t) => (0, n.Jt)("/rtg/sessions", {
params: {
page: e,
page_size: t
}
}), s = async e => (0, n.bE)("/rtg/session/batch", {
session_ids: e
}, {
validateCode: !1
}), o = async e => (0, n.Jt)("/rtg/session/".concat(e, "/first-frame"), {
validateCode: !1
}), i = async e => await (0, n.Jt)("/rtg/db-session/".concat(e, "/status"), {
validateCode: !1
})
},
23923: (e, t, a) => {
a.d(t, {
XE: () => c,
ss: () => d
});
let n = null,
r = 0,
s = new Map;
async function o(e, t) {
let a = function() {
if (!n) {
let e = new Blob(["\nconst publicKey = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhqYRXNDYlzwgdyPxmg87J/fN0LGqUCeS/IBd3ftGa4KWsrnKiXiwg1yNtM+bALDtodWKlvbJ9cPpYwJBzsA2bhjp1f4OH8bnFKK8NX000PCM8SntzxbCWJknDbxU+29nzI0yycwVam3YS8SE01wbqcmX6yCbI6l3Le6FUrklohXa0KnoF0apW3I1ZW1pAZrqI0wdGO9OdBI4PITuT7dy6MiFeafcq0CHplTVlI7lXWhT1tbuGSgC11rAXPp+GI/R8bKsBnyukWNK8hbICAdVzF7nLzI3Rt+oWNPbNc43BEURr8vbxaQ8EHOPL/PnOhMU9gXaD2L0L6biH7R+Vx2a4wIDAQAB'\n\nfunction base64ToArrayBuffer(base64) {\n const binaryString = atob(base64)\n const bytes = new Uint8Array(binaryString.length)\n for (let i = 0; i < binaryString.length; i++) {\n bytes[i] = binaryString.charCodeAt(i)\n }\n return bytes.buffer\n}\n\nfunction arrayBufferToBase64(buffer) {\n let binary = ''\n const bytes = new Uint8Array(buffer)\n const len = bytes.byteLength\n for (let i = 0; i < len; i++) {\n binary += String.fromCharCode(bytes[i])\n }\n return btoa(binary)\n}\n\nasync function importPublicKey(base64Key) {\n return await self.crypto.subtle.importKey(\n 'spki',\n base64ToArrayBuffer(base64Key),\n {\n name: 'RSA-OAEP',\n hash: 'SHA-256',\n },\n true,\n ['encrypt']\n )\n}\n\nasync function importPrivateKey(base64Key) {\n return await self.crypto.subtle.importKey(\n 'pkcs8',\n base64ToArrayBuffer(base64Key),\n {\n name: 'RSA-OAEP',\n hash: 'SHA-256',\n },\n true,\n ['decrypt']\n )\n}\n\nasync function encryptWithPublicKey(publicKeyBase64, plaintext) {\n try {\n const pubKey = await importPublicKey(publicKeyBase64)\n const encodedText = new TextEncoder().encode(plaintext)\n\n const aesKey = await self.crypto.subtle.generateKey(\n { name: 'AES-GCM', length: 256 },\n true,\n ['encrypt', 'decrypt']\n )\n const iv = self.crypto.getRandomValues(new Uint8Array(12))\n\n const encryptedContentBuffer = await self.crypto.subtle.encrypt(\n { name: 'AES-GCM', iv },\n aesKey,\n encodedText\n )\n\n const exportedAesKey = await self.crypto.subtle.exportKey('raw', aesKey)\n const encryptedKeyBuffer = await self.crypto.subtle.encrypt(\n { name: 'RSA-OAEP' },\n pubKey,\n exportedAesKey\n )\n\n return `${arrayBufferToBase64(encryptedKeyBuffer)}|${arrayBufferToBase64(iv.buffer)}|${arrayBufferToBase64(encryptedContentBuffer)}`\n } catch (error) {\n throw error\n }\n}\n\nasync function decryptWithPrivateKey(privateKeyBase64, encryptedBase64) {\n try {\n const privateKey = await importPrivateKey(privateKeyBase64)\n\n if (encryptedBase64 && encryptedBase64.includes('|')) {\n const [encryptedKeyB64, ivB64, encryptedContentB64] = encryptedBase64.split('|')\n\n const encryptedKeyBuffer = base64ToArrayBuffer(encryptedKeyB64)\n const ivBuffer = base64ToArrayBuffer(ivB64)\n const encryptedContentBuffer = base64ToArrayBuffer(encryptedContentB64)\n\n const aesKeyBuffer = await self.crypto.subtle.decrypt(\n { name: 'RSA-OAEP' },\n privateKey,\n encryptedKeyBuffer\n )\n\n const aesKey = await self.crypto.subtle.importKey(\n 'raw',\n aesKeyBuffer,\n { name: 'AES-GCM', length: 256 },\n false,\n ['decrypt']\n )\n\n const decryptedBuffer = await self.crypto.subtle.decrypt(\n { name: 'AES-GCM', iv: new Uint8Array(ivBuffer) },\n aesKey,\n encryptedContentBuffer\n )\n\n return new TextDecoder().decode(decryptedBuffer)\n } else {\n const encryptedBuffer = base64ToArrayBuffer(encryptedBase64)\n const decryptedBuffer = await self.crypto.subtle.decrypt(\n {\n name: 'RSA-OAEP',\n },\n privateKey,\n encryptedBuffer\n )\n return new TextDecoder().decode(decryptedBuffer)\n }\n } catch (error) {\n throw error\n }\n}\n\nself.onmessage = async (event) => {\n const { id, action, payload } = event.data\n try {\n if (action === 'encrypt') {\n const result = await encryptWithPublicKey(publicKey, payload.plaintext)\n self.postMessage({ id, success: true, result })\n } else if (action === 'decrypt') {\n const result = await decryptWithPrivateKey(payload.privateKey, payload.encryptedData)\n self.postMessage({ id, success: true, result })\n }\n } catch (error) {\n self.postMessage({ id, success: false, error: error.message || String(error) })\n }\n}\n"], {
type: "application/javascript"
});
(n = new Worker(URL.createObjectURL(e))).onmessage = e => {
let {
id: t,
success: a,
result: n,
error: r
} = e.data, o = s.get(t);
o && (s.delete(t), a ? o.resolve(n) : o.reject(Error(r)))
}
}
return n
}();
if (!a) throw Error("Web Worker is not available in this environment.");
return new Promise((n, o) => {
let i = r++;
s.set(i, {
resolve: n,
reject: o
}), a.postMessage({
id: i,
action: e,
payload: t
})
})
}
let i = "logs",
l = () => new Promise((e, t) => {
let a = indexedDB.open("LogsDB", 2);
a.onupgradeneeded = e => {
let t, a = e.target.result;
(t = a.objectStoreNames.contains(i) ? e.target.transaction.objectStore(i) : a.createObjectStore(i, {
keyPath: "id",
autoIncrement: !0
})).indexNames.contains("timestamp") || t.createIndex("timestamp", "timestamp", {
unique: !1
})
}, a.onsuccess = t => e(t.target.result), a.onerror = e => t(e.target.error)
}),
d = async function(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "info",
a = async () => {
try {
let a = "";
if ("string" == typeof e) a = e;
else try {
a = JSON.stringify(e)
} catch (t) {
a = String(e)
}
let n = await o("encrypt", {
plaintext: a
});
(await l()).transaction(i, "readwrite").objectStore(i).add({
encryptedLog: n,
type: t,
timestamp: Date.now()
})
} catch (e) {}
};
"requestIdleCallback" in window ? window.requestIdleCallback(() => {
a()
}) : setTimeout(a, 0)
}, c = async (e, t) => {
let {
startTime: a,
endTime: n,
limit: r,
type: s
} = t || {};
try {
let t = await l();
return await new Promise((l, d) => {
let c, u = t.transaction(i, "readonly").objectStore(i).index("timestamp");
void 0 !== a && void 0 !== n ? c = IDBKeyRange.bound(a, n) : void 0 !== a ? c = IDBKeyRange.lowerBound(a) : void 0 !== n && (c = IDBKeyRange.upperBound(n));
let _ = r ? "prev" : "next",
p = u.openCursor(c, _),
E = [];
p.onsuccess = async t => {
let a = t.target.result;
if (a && (s && a.value.type !== s || E.push(a.value), !r || !(E.length >= r))) return void a.continue();
let n = [];
"prev" === _ && E.reverse();
for (let t = 0; t < E.length; t++) {
let a = E[t];
try {
if (!a.encryptedLog) continue;
let t = await o("decrypt", {
privateKey: e,
encryptedData: a.encryptedLog
});
n.push({
timestamp: a.timestamp,
type: a.type || "info",
log: t
})
} catch (e) {}
}
l(n)
}, p.onerror = () => d(p.error)
})
} catch (e) {
throw e
}
}, u = async () => {
try {
let e = !1;
if ("undefined" != typeof navigator && navigator.storage && navigator.storage.estimate) {
let {
usage: t,
quota: a
} = await navigator.storage.estimate();
t && a && t / a >= .7 && (e = !0)
}
let t = (await l()).transaction(i, "readwrite").objectStore(i);
e ? t.clear() : t.openCursor().onsuccess = e => {
let t = e.target.result;
if (t) {
let e = t.value,
a = (e => {
let t = Date.now();
switch (e) {
case "info":
return t - 36e5;
case "warn":
return t - 72e5;
case "error":
return t - 108e5;
case "ws":
case "network":
return t - 864e5;
default:
return t - 1728e5
}
})(e.type || "info");
e.timestamp < a && t.delete(), t.continue()
}
}
} catch (e) {}
};
setTimeout(u, 5e3), setInterval(u, 216e5)
},
25781: (e, t, a) => {
a.d(t, {
Fr: () => d,
b0: () => c,
kH: () => n.k
});
var n = a(46985),
r = a(95112),
s = a(37468);
let o = () => ({});
(0, r.v)()(e => ({
loading: !0,
error: null,
config: o(),
init: async () => {
e({
loading: !0,
error: null
});
try {
let t = await (0, s.x2)();
e({
config: t || o(),
loading: !1,
error: null
})
} catch (t) {
e({
loading: !1,
error: t
})
}
},
setConfig: t => {
e({
config: t
})
},
clear: () => {
e({
config: o(),
loading: !1,
error: null
})
}
}));
var i = a(60161),
l = a(49855);
let d = () => {
try {
var e, t;
let a = window.sessionStorage.getItem(l.d5.RESERVATION_ID);
if (!a) return {
reservationId: null,
reservation: null
};
let n = JSON.parse(a),
r = null != (e = null == n ? void 0 : n.state) ? e : n,
s = Number(r.reservationId);
return {
reservationId: Number.isFinite(s) ? s : null,
reservation: null != (t = r.reservation) ? t : null
}
} catch (e) {
return {
reservationId: null,
reservation: null
}
}
},
c = (0, r.v)()((0, i.Zr)(e => ({
loading: !0,
reservationId: null,
reservation: null,
setReservationId: t => {
e({
reservationId: t
})
},
setReservation: t => {
e({
reservationId: t.reservation_id,
reservation: t
})
},
clear: () => {
e({
reservationId: void 0,
reservation: null
})
},
setLoading: t => {
e({
loading: t
})
},
canStart: e => e.estimated_wait_seconds <= 0
}), {
name: l.d5.RESERVATION_ID,
storage: (0, i.KU)(() => sessionStorage),
partialize: e => ({
reservationId: e.reservationId,
reservation: e.reservation
}),
onRehydrateStorage: () => e => {
null == e || e.setLoading(!1)
}
}))
},
28827: (e, t, a) => {
a.d(t, {
vd: () => r
});
var n = a(11373);
let r = async e => (0, n.bE)("/api/user/bind-invitation", {
invitation_code: e
})
},
36046: (e, t, a) => {
a.d(t, {
Cf: () => _,
Es: () => E,
L3: () => m,
LC: () => u,
c7: () => p,
lG: () => d,
rr: () => f
});
var n = a(25771),
r = a(87163),
s = a(85151),
o = a(31546),
i = a(61086),
l = a(51529);
let d = o.bL;
o.l9;
let c = o.ZL;
o.bm;
let u = r.forwardRef((e, t) => {
let {
className: a,
...r
} = e;
return (0, n.jsx)(o.hJ, {
ref: t,
className: (0, l.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80", a),
...r
})
});
u.displayName = o.hJ.displayName;
let _ = r.forwardRef((e, t) => {
let {
className: a,
children: r,
...d
} = e, {
t: _
} = (0, s.Bd)();
return (0, n.jsxs)(c, {
children: [(0, n.jsx)(u, {}), (0, n.jsxs)(o.UC, {
ref: t,
className: (0, l.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg", a),
...d,
children: [r, (0, n.jsxs)(o.bm, {
className: "data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none",
children: [(0, n.jsx)(i.A, {
className: "h-4 w-4"
}), (0, n.jsx)("span", {
className: "sr-only",
children: _("global.common.close")
})]
})]
})]
})
});
_.displayName = o.UC.displayName, r.forwardRef((e, t) => {
let {
className: a,
children: r,
...d
} = e, {
t: _
} = (0, s.Bd)();
return (0, n.jsxs)(c, {
children: [(0, n.jsx)(u, {}), (0, n.jsxs)(o.UC, {
ref: t,
className: (0, l.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 translate-x-[-50%] translate-y-[-50%] rounded-2xl bg-black shadow-lg duration-200 outline-none focus:outline-none focus-visible:outline-none", a),
...d,
children: [r, (0, n.jsxs)(o.bm, {
className: "absolute top-3 right-3 z-10 flex h-8 w-8 items-center justify-center rounded-full bg-black/60 text-white opacity-80 backdrop-blur-sm transition-all outline-none hover:bg-black/80 hover:opacity-100 focus:outline-none",
children: [(0, n.jsx)(i.A, {
className: "h-5 w-5"
}), (0, n.jsx)("span", {
className: "sr-only",
children: _("global.common.close")
})]
})]
})]
})
}).displayName = "VideoDialogContent";
let p = e => {
let {
className: t,
...a
} = e;
return (0, n.jsx)("div", {
className: (0, l.cn)("flex flex-col space-y-1.5 text-center sm:text-left", t),
...a
})
};
p.displayName = "DialogHeader";
let E = e => {
let {
className: t,
...a
} = e;
return (0, n.jsx)("div", {
className: (0, l.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", t),
...a
})
};
E.displayName = "DialogFooter";
let m = r.forwardRef((e, t) => {
let {
className: a,
...r
} = e;
return (0, n.jsx)(o.hE, {
ref: t,
className: (0, l.cn)("text-lg leading-none font-semibold tracking-tight", a),
...r
})
});
m.displayName = o.hE.displayName;
let f = r.forwardRef((e, t) => {
let {
className: a,
...r
} = e;
return (0, n.jsx)(o.VY, {
ref: t,
className: (0, l.cn)("text-muted-foreground text-sm", a),
...r
})
});
f.displayName = o.VY.displayName
},
37329: (e, t, a) => {
a.d(t, {
H3: () => d,
X1: () => l,
Zv: () => c,
bF: () => r,
dr: () => u,
gn: () => s,
pJ: () => o,
xG: () => i
});
var n = a(11373);
async function r(e) {
return (0, n.Jt)("/api/avatars", {
params: e
})
}
async function s(e) {
return (0, n.bE)("/api/avatars", e, {
validateCode: !1,
noRetry: !0
})
}
async function o(e) {
return (0, n.yH)("/api/avatars/".concat(e))
}
async function i(e, t) {
return (0, n.F6)("/api/avatars/".concat(e), t, {
validateCode: !1
})
}
async function l(e) {
return (0, n.bE)("/api/avatars/preview/generate", e, {
validateCode: !1
})
}
async function d(e) {
return (0, n.Jt)("/api/avatars/preview/tasks/".concat(e), {
validateCode: !1
})
}
let c = 3;
function u(e) {
return e.preview_gif_url || ""
}
},
37468: (e, t, a) => {
a.d(t, {
XG: () => f,
Jv: () => c.Jv,
bB: () => m,
by: () => h.by,
x2: () => o,
R9: () => s,
gf: () => h.gf,
M4: () => h.M4,
GE: () => c.GE,
wG: () => c.wG,
TL: () => c.TL,
z7: () => p,
Kk: () => c.Kk,
sq: () => y.sq,
lD: () => y.lD,
S5: () => c.S5,
xX: () => r,
X6: () => l,
ug: () => i,
Os: () => d,
lx: () => T,
e5: () => c.e5,
OD: () => c.OD,
rL: () => h.rL,
sW: () => c.sW,
$q: () => c.$q,
a: () => E
}), a(37329);
var n = a(11373);
let r = async () => (0, n.Jt)("/presets/config", {
skipAuthCheck: !0,
validateCode: !1
}), s = async () => (0, n.Jt)("/generation-styles", {
skipAuthCheck: !0,
validateCode: !1
}), o = async () => (0, n.Jt)("/api/frontend/config", {
skipAuthCheck: !0
}), i = async () => (0, n.Jt)("/api/user/info", {
skipAuthCheck: !0
}), l = async e => (0, n.bE)("/rtg/upload-image", e), d = async e => (0, n.bE)("/rtg/upload-image/complete", e);
var c = a(48355),
u = a(85851);
let _ = e => e ? {
...e,
max_size: (e => {
if (null == e) return;
let t = "number" == typeof e ? e : "string" == typeof e ? Number(e) : NaN;
if (Number.isFinite(t) && 0 !== t) return t
})(e.max_size)
} : null,
p = async e => (0, n.Jt)("/reservation", {
params: {
reservation_id: e
}
}).then(e => _(e)), E = async (e, t) => (0, u.k)({
path: "/reservation/events?reservation_id=".concat(encodeURIComponent(String(e))),
signal: t,
isTerminal: e => "ACTIVE" === e.status || "GENERATING" === e.status || "COMPLETED" === e.status || "EXPIRED" === e.status
}).then(e => {
let t = _(e);
if (!(null == t ? void 0 : t.reservation_id)) throw Error("invalid reservation event payload");
return t
}), m = async (e, t, a, r, s) => {
let o = new URLSearchParams;
return e && o.set("pipeline", e), null != t && o.set("preset_id", String(t)), null != t && o.set("avatar", null != a ? a : ""), r && o.set("force_create", "1"), (0, n.bE)("/reservation/create".concat(o.toString() ? "?".concat(o.toString()) : ""), null != s ? s : void 0, {
validateCode: !1
}).then(e => ((null == e ? void 0 : e.data) && (e.data = _(e.data) || void 0), e))
}, f = async () => (0, n.bE)("/reservation/close", {}, {
validateCode: !1
});
var h = a(60191);
a(28827);
let T = async e => {
let t = new FormData;
return t.append("audio", e, "audio.wav"), await (0, n.bE)("/asr/recognize", t, {
timeout: 12e4
})
};
var y = a(21852);
a(48583)
},
39280: (e, t, a) => {
a.d(t, {
J: () => d
});
var n = a(25771),
r = a(87163),
s = a(77975),
o = a(96187),
i = a(51529);
let l = (0, o.F)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),
d = r.forwardRef((e, t) => {
let {
className: a,
...r
} = e;
return (0, n.jsx)(s.b, {
ref: t,
className: (0, i.cn)(l(), a),
...r
})
});
d.displayName = s.b.displayName
},
39502: (e, t, a) => {
a.d(t, {
pX: () => r.p,
u4: () => m,
yW: () => r.y
});
var n = a(63193),
r = a(60155);
let s = JSON.parse('{"sensorsdata":{"server_url":"https://report.pixverse.ai/sa?project=pixverse", "batch_send": {"datasend_timeout": 30000, "send_interval": 30000}}}'),
o = new Set([r.y.REALTIME_CARD_EXPOSURE, r.y.REALTIME_CARD_IMAGE_LOAD]),
i = [],
l = new Set,
d = null,
c = !1,
u = e => {
var t, a;
let {
key: o,
params: i
} = e;
n.f0(s, {
key: o,
params: {
[r.p.PAGE_PATH]: window.location.pathname,
[r.p.TIMESTAMP_MS]: Date.now(),
[r.p.NETWORK_TYPE]: (() => {
var e;
if (!window.navigator) return "unknown";
let t = window.navigator.connection;
return null != (e = null == t ? void 0 : t.effectiveType) ? e : "unknown"
})(),
[r.p.NETWORK_DOWNLINK]: (() => {
var e;
if (!window.navigator) return 0;
let t = window.navigator.connection;
return null != (e = null == t ? void 0 : t.downlink) ? e : 0
})(),
[r.p.PLATFORM]: (() => {
var e, t, a;
if (!window.navigator) return "unknown";
let n = window.navigator;
return null != (a = null != (t = null == (e = n.userAgentData) ? void 0 : e.platform) ? t : n.platform) ? a : "unknown"
})(),
[r.p.DEVICE_TYPE]: (() => {
let e = navigator.userAgent.toLowerCase(),
t = navigator.maxTouchPoints > 1 && (/ipad/.test(e) || /macintosh/.test(e)),
a = /android/.test(e) && !/mobile/.test(e),
n = /\b(tablet|tab)[;/]/i.test(e) || /android.+tablet/i.test(e);
return t || a || n ? "tablet" : /iphone|ipod/.test(e) || /android/.test(e) && /mobile/.test(e) || /windows phone/.test(e) ? "mobile" : "desktop"
})(),
[r.p.IP]: null == (a = window) || null == (t = a.__REQUEST_HEADERS__) ? void 0 : t.IP,
...i
}
})
},
_ = () => {
null !== d && window.clearTimeout(d), d = null, l.clear(), i.splice(0).forEach(u)
},
p = () => {
i.length && _()
},
E = () => {
"hidden" === document.visibilityState && p()
},
m = e => {
if (o.has(e.key)) return void(e => {
c || (c = !0, window.addEventListener("pagehide", p), document.addEventListener("visibilitychange", E));
let t = "".concat(e.key, ":").concat(JSON.stringify(e.params));
if (l.has(t)) return;
let a = {
...e,
params: {
[r.p.TIMESTAMP_MS]: Date.now(),
...e.params
}
};
l.add(t), i.push(a), null === d && (d = window.setTimeout(() => {
let e = window;
if ("function" == typeof e.requestIdleCallback) return void e.requestIdleCallback(_, {
timeout: 1500
});
_()
}, 3e3))
})(e);
u(e)
}
},
46985: (e, t, a) => {
a.d(t, {
k: () => u
});
var n = a(95112),
r = a(37468),
s = a(19570),
o = a(39502),
i = a(60155);
let l = () => ({
accountId: 0,
nickname: "",
email: "",
userAvatar: "",
loading: !0,
error: null,
needsInvitation: !0,
userLevel: null,
createdAt: void 0,
isHomeWhitelist: !1
}),
d = !1,
c = e => {
d || (d = !0, (0, o.u4)({
key: i.y.REALTIME_PERFORMANCE,
params: {
[i.p.PERFORMANCE_TYPE]: e,
[i.p.PERFORMANCE_VALUE1]: Math.round(performance.now())
}
}))
},
u = (0, n.v)()((e, t) => ({
userInfo: l(),
initPromise: null,
init: async () => {
e({
initPromise: Promise.allSettled([t().updateUserInfo()])
})
},
clear: () => {
e({
userInfo: l(),
initPromise: null
})
},
updateUserInfo: async () => {
try {
var t;
if (!(0, s.c4)()) throw c("user_info_no_token"), Error("User not authenticated");
let a = await (0, r.ug)(),
n = a.account_id || 0,
o = (null == a ? void 0 : a.nickname) || "",
i = (null == a ? void 0 : a.email) || "",
l = (null == a ? void 0 : a.avatar) || "",
d = null == a ? void 0 : a.needs_invitation,
u = (null == a ? void 0 : a.user_level) || null,
_ = null == a ? void 0 : a.created_at,
p = null != (t = null == a ? void 0 : a.is_home_whitelist) && t;
e({
userInfo: {
accountId: n,
nickname: o,
email: i,
userAvatar: l,
needsInvitation: d,
userLevel: u,
createdAt: _,
isHomeWhitelist: p,
loading: !1,
error: null
}
}), c("user_info_ready")
} catch (t) {
e({
userInfo: {
...l(),
loading: !1,
error: t
}
}), c("user_info_error")
}
},
logout: () => {}
}))
},
48355: (e, t, a) => {
a.d(t, {
Jv: () => c,
GE: () => o,
wG: () => d,
TL: () => i,
Kk: () => _,
S5: () => u,
e5: () => l,
OD: () => r,
sW: () => E,
$q: () => p
});
var n = a(71055);
function r(e) {
var t, a, r, s, o, i, l, d;
let c = e.thumbnail_uri || e.first_frame_uri || (null == (a = e.example_sessions) || null == (t = a[0]) ? void 0 : t.thumbnail_uri) || (null == (s = e.example_sessions) || null == (r = s[0]) ? void 0 : r.first_frame_uri) || (null == (i = e.example_sessions) || null == (o = i[0]) ? void 0 : o.image_url) || "";
return {
...e,
imageSrc: (null == c ? void 0 : c.endsWith(".gif")) ? (0, n.yx)(c) : c,
videoSrc: e.video_uri || (null == (d = e.example_sessions) || null == (l = d[0]) ? void 0 : l.final_video_url),
aspectRatio: e.aspect_ratio,
...{
"16:9": {
width: 16,
height: 9
},
"9:16": {
width: 9,
height: 16
}
} [e.aspect_ratio]
}
}
var s = a(11373);
async function o() {
return await (0, s.Jt)("/api/preset-categories", {
skipAuthCheck: !0
})
}
async function i(e) {
return await (0, s.bE)("/api/presets/plaza", e, {
skipAuthCheck: !0
}).then(e => {
var t, a;
return {
...e,
items: (null == e || null == (a = e.items) || null == (t = a.map) ? void 0 : t.call(a, r)) || []
}
})
}
async function l(e, t) {
return await (0, s.bE)("/api/presets/".concat(e, "/action"), {
action: t
}, {
skipAuthCheck: !0,
noRetry: !0
})
}
async function d(e) {
return await (0, s.Jt)("/api/presets/".concat(e, "/comments"), {
skipAuthCheck: !0
})
}
async function c(e, t) {
return await (0, s.bE)("/api/presets/".concat(e, "/comments"), t)
}
async function u(e) {
let {
preset_id: t,
...a
} = e;
return await (0, s.Jt)("/api/presets/".concat(t, "/sessions"), {
params: a,
skipAuthCheck: !0
})
}
async function _(e) {
return await (0, s.Jt)("/rtg/db-session/".concat(e), {})
}
async function p(e) {
let {
session_id: t,
isPublic: a
} = e || {};
return (0, s.F6)("/rtg/session/".concat(t, "/publicity"), {
is_public: a
})
}
async function E(e) {
let {
presetId: t,
isPublic: a
} = e || {};
return (0, s.F6)("/api/my-presets/".concat(t, "/publicity"), {
is_public: a
})
}
},
48583: (e, t, a) => {
a.d(t, {
V: () => r
});
var n = a(11373);
let r = async e => (0, n.Jt)("/rtg/outfit-queen/command", {
params: e,
skipAuthCheck: !0
})
},
49855: (e, t, a) => {
function n() {
return "default"
}
a.d(t, {
Mr: () => T,
U9: () => m,
VQ: () => u,
GD: () => p,
fW: () => _.fW,
EJ: () => E,
d5: () => h,
SP: () => c,
g9: () => y,
s8: () => f,
a$: () => n
});
var r = a(25771);
a(87163);
var s = a(57425);
let o = {
body: '',
viewBox: {
left: 0,
top: 0,
width: 24,
height: 24
},
left: 0,
top: 0,
width: 24,
height: 24
},
i = {
body: '',
viewBox: {
left: 0,
top: 0,
width: 24,
height: 24
},
left: 0,
top: 0,
width: 24,
height: 24
},
l = {
body: '',
viewBox: {
left: 0,
top: 0,
width: 20,
height: 19
},
left: 0,
top: 0,
width: 20,
height: 19
};
var d = a(34587);
let c = "https://pixverse.ai/en/blog/pixverse-r1-next-generation-real-time-world-model",
u = [{
icon: (0, r.jsx)(e => {
let {
className: t = "",
...a
} = e;
return (0, r.jsx)("div", {
className: t,
style: {
height: "1em",
aspectRatio: 1
},
children: (0, r.jsx)(s.In, {
...a,
icon: i,
height: "1em"
})
})
}, {
className: "text-text-white-secondary shrink-0 text-xl"
}),
labelKey: "navigation.externalLinks.welcome",
text: "Visit Welcome Page",
url: "/home/?visited=1"
}, {
icon: (0, r.jsx)(e => {
let {
className: t = "",
...a
} = e;
return (0, r.jsx)("div", {
className: t,
style: {
height: "1em",
aspectRatio: 1
},
children: (0, r.jsx)(s.In, {
...a,
icon: o,
height: "1em"
})
})
}, {
className: "text-text-white-secondary shrink-0 text-xl"
}),
labelKey: "navigation.externalLinks.pixverse",
text: "More At PixVerse",
url: (0, d.rx)()
}, {
icon: (0, r.jsx)(e => {
let {
className: t = "",
...a
} = e;
return (0, r.jsx)("div", {
className: t,
style: {
height: "1em",
aspectRatio: 20 / 19
},
children: (0, r.jsx)(s.In, {
...a,
icon: l,
height: "1em"
})
})
}, {
className: "text-text-white-secondary shrink-0 text-xl"
}),
labelKey: "navigation.externalLinks.techReport",
text: "Read Tech Report",
url: c
}];
var _ = a(15202);
let p = 40,
E = {
GET_TOKEN_FAILED: "get_token_failed",
UPLOAD_FAILED: "upload_failed",
UPLOAD_TIMEOUT: "upload_timeout",
UPLOAD_ERROR: "upload_error",
UPLOAD_AUDIT_REJECTED: "upload_audit_rejected",
UPLOAD_AUDIT_FAILED: "upload_audit_failed"
},
m = {
REQUEST_MISSING_TOKEN: "request_missing_token",
AUTHENTICATION_EXPIRED: "authentication_expired"
},
f = {
AUTO_RECONNECT: !0,
RECONNECT_INTERVAL: 3e3,
MAX_RECONNECT_ATTEMPTS: 3
},
h = {
BROWSER_ID: "dreamix_browser_id",
RESERVATION_ID: "dreamix_reservation_id"
},
T = {
DEFAULT_VOLUME: 20
},
y = {
GAME: "R-Game"
}
},
60155: (e, t, a) => {
a.d(t, {
p: () => r,
y: () => n
});
let n = {
END_USER_FEEDBACK: "realtime_user_feedback",
REALTIME_CONTENT_ENTRY_CLICK: "realtime_content_entry_click",
REALTIME_GENERATE_START: "realtime_generate_start",
PROMPT_ENTER_PROCESSED: "prompt_enter_processed",
STREAMING_PLAYER_DURATION: "streaming_player_duration",
SUBMISSION_PAGE_DURATION: "submission_page_duration",
STREAM_PLAYER_PREPARE_DURATION: "stream_player_prepare_duration",
HISTORY_ITEM_IN_VIEWPORT: "real_time_history_video_cover_exposure",
HISTORY_ITEM_PLAY: "realtime_history_video_play",
HISTORY_ITEM_DOWNLOAD: "realtime_history_video_download",
REALTIME_STREAM_INFO: "realtime_stream_play_state",
REALTIME_STREAM_INFO2: "realtime_stream_play_state_live",
REALTIME_CARD_DETAIL_CLICK: "realtime_card_detail_click",
REALTIME_CARD_EXPOSURE: "realtime_card_exposure",
REALTIME_CARD_DETAIL_COMMENT: "realtime_card_detail_comment",
REALTIME_CARD_DETAIL_SHARE: "realtime_card_detail_share",
REALTIME_CARD_IMAGE_LOAD: "realtime_card_image_load",
REALTIME_REQUEST_LOAD: "realtime_request_load",
WEB_VITALS: "web_vitals",
RTG_INIT_SENT: "rtg_init_sent",
RTG_FIRST_FRAME_RENDERED: "rtg_first_frame_rendered",
RTG_STUTTER_DETECTED: "rtg_stutter_detected",
RTG_PLAYBACK_QUALITY: "rtg_playback_quality",
RTG_SESSION_END: "rtg_session_end",
WEBRTC_VIDEO_CODEC_SUPPORT: "webrtc_video_codec_support",
STALL_TOAST: "stall_toast",
REALTIME_PERFORMANCE: "realtime_performance",
REALTIME_DRESS_OUTFIT_SELECT: "realtime_dress_outfit_select",
REALTIME_UPLOAD_MEDIA: "realtime_upload_media",
REALTIME_CLICK_SHARE_BUTTON_START: "realtime_click_share_button_start",
REALTIME_CLICK_SHARE_BUTTON: "realtime_click_share_button",
REALTIME_LIVEROOM_ENTER: "realtime_liveroom_enter",
REALTIME_LIVEROOM_EXIT: "realtime_liveroom_exit",
REALTIME_VOICE_INPUT_START: "realtime_voice_input_start",
REALTIME_DIALOGUE_LATENCY: "realtime_dialogue_latency",
REALTIME_TOP_NAVIGATION_CLICK: "realtime_top_navigation_click",
REALTIME_GALLERY_SIDE_TAB_SWITCH: "realtime_gallery_side_tab_switch"
},
r = {
PAGE_PATH: "page_path",
FEEDBACK_ID: "feedback_id",
ACCOUNT_ID: "account_id",
SESSION_ID: "session_id",
USER_SELECTED_ROLE: "user_selected_role",
FEEDBACK_SOURCE: "feedback_source",
RATING: "rating_stars",
FEEDBACK_DEFAULT_MSG: "feedback_default_msg",
FEEDBACK_CUSTOM_MSG: "feedback_custom_msg",
SESSION_TYPE: "session_type",
PRESET_TYPE: "preset_type",
PRESET_ID: "preset_id",
OFFICIAL_PRESET_NAME: "official_preset_name",
AUTHOR_ID: "author_id",
ASPECT_RATIO: "aspect_ratio",
CUSTOM_STYLE: "custom_style",
PIPELINE: "pipeline",
WORLD_THEME_PROMPT: "world_theme_prompt",
PROMPT_INPUT_TYPE: "prompt_input_type",
PROMPT_INPUT_VALUE: "user_input_prompt",
PLAY_DURATION: "play_duration",
DURATION: "duration",
VIDEO_URL: "video_url",
TOTAL_COUNT: "total_count",
NETWORK_LAG_COUNT: "network_lag_count",
PLAY_LAG_COUNT: "play_lag_count",
TOTAL_DELAY: "total_delay",
NETWORK_OFFLINE_COUNT: "network_offline_count",
COMMENT_CONTENT: "comment_content",
USER_ID: "user_id",
RESOURCE_URL: "resource_url",
LOAD_STATUS: "load_status",
IP: "ip_country",
NETWORK_TYPE: "network_type",
NETWORK_DOWNLINK: "network_downlink",
DEVICE_TYPE: "device_type",
EVENT_TIMESTAMP: "event_timestamp",
REQUEST_URL: "request_url",
REQUEST_METHOD: "request_method",
REQUEST_SUCCESS: "request_success",
REQUEST_STATUS: "request_status",
WEB_VITALS_NAME: "web_vitals_name",
WEB_VITALS_VALUE: "web_vitals_value",
TIMESTAMP_MS: "timestamp_ms",
PLATFORM: "platform",
INIT_SENT_TS: "init_sent_ts",
TTFF_MS: "ttff_ms",
AGORA_JOIN_DURATION_MS: "agora_join_duration_ms",
AGORA_FIRST_FRAME_DELAY_MS: "agora_first_frame_delay_ms",
STUTTER_DURATION_MS: "stutter_duration_ms",
STUTTER_INDEX: "stutter_index",
SAMPLE_INDEX: "sample_index",
SESSION_END_REASON: "end_reason",
TOTAL_STUTTER_COUNT: "total_stutter_count",
SESSION_DURATION_MS: "session_duration_ms",
TOTAL_STUTTER_DURATION_MS: "total_stutter_duration_ms",
EXPERIMENT_GROUP: "experiment_group",
SHARE_TYPE: "live_room_share_type",
SHARE_CHANNEL: "share_channel",
SHARE_TEXT: "share_text",
STALL_TOAST_REASON: "stall_toast_reason",
AGORA_USER_ID: "agora_user_id",
AGORA_SERVER_UID: "agora_server_uid",
AGORA_CHANNEL_NAME: "agora_channel_name",
WEBRTC_VIDEO_CODECS: "webrtc_video_codecs",
IMG_TYPE: "img_type",
COMMON_TYPE: "common_type",
PERFORMANCE_TYPE: "performance_type",
PERFORMANCE_VALUE1: "performance_value1",
PERFORMANCE_VALUE2: "performance_value2",
PERFORMANCE_VALUE3: "performance_value3",
PERFORMANCE_VALUE4: "performance_value4",
PERFORMANCE_VALUE5: "performance_value5",
OUTFIT_IMAGE_URI: "outfit_image_uri",
OUTFIT_THUMBNAIL_URI: "outfit_thumbnail_uri",
OUTFIT_IS_DEFAULT: "outfit_is_default",
OUTFIT_DEFAULT_ID: "outfit_default_id",
IMAGE_URL: "image_url",
IS_SUCCESS: "is_success",
REALTIME_MODEL: "realtime_model",
CARD_POSITION: "card_position",
ENTRY_TYPE: "entry_type",
ENTER_SOURCE: "enter_source",
GALLERY_CATEGORY: "gallery_category",
SHARER_UID: "sharer_uid",
QUEUED_USER_CNT: "queued_user_cnt",
QUEUE_SOURCE: "queue_source",
CURRENT_ACTIVE_CONTENT_TYPE: "current_active_content_type",
EXIT_TYPE: "exit_type",
USER_QUEUE_STATUS: "user_queue_status",
USER_WATCH_ROUND_CNT: "user_watch_round_cnt",
USER_INTERACT_CNT: "user_interact_cnt",
USER_INTERACT_CNT_DEFAULT: "user_interact_cnt_default",
USER_INTERACT_CNT_CUSTOM: "user_interact_cnt_custom",
USER_MEDIA_CNT: "user_media_cnt",
USER_IN_QUEUE_CNT: "user_in_queue_cnt",
UPLOAD_MEDIA_CNT: "upload_media_cnt",
SELECT_MEDIA_CNT: "select_media_cnt",
SHARE_CNT: "share_cnt",
DOWNLOAD_CNT: "download_cnt",
COMMENT_CNT: "comment_cnt",
CHANNEL_ID: "channel_id",
TURN_ID: "turn_id",
STAGE: "stage",
ELAPSED_MS: "elapsed_ms",
PROMPT_ID: "prompt_id",
OUTCOME: "outcome",
ERROR_CODE: "error_code",
PACKET_COUNT: "packet_count",
COMPLETION_REASON: "completion_reason",
TRANSPORT: "transport",
RESPONSE_MODE: "response_mode",
ASTROLOGY_EVENT_CODE: "astrology_event_code",
TURN_INDEX: "turn_index",
SOURCE_PAGE: "source_page",
SECTION: "section",
POSITION: "position",
TARGET_SECTION: "target_section",
TARGET: "target"
}
},
60191: (e, t, a) => {
a.d(t, {
Ge: () => c,
HQ: () => d,
M4: () => _,
MK: () => l,
by: () => o,
gf: () => p,
rL: () => u,
zf: () => i
});
var n = a(85851),
r = a(11373),
s = a(48355);
let o = async e => (0, r.bE)("/api/world/create", {
...e
}), i = async e => await (0, r.bE)("/api/world/create-async", {
...e
}), l = async e => (0, r.Jt)("/api/world/create-async/status", {
params: {
task_id: e
}
}), d = async (e, t) => (0, n.k)({
path: "/api/world/create-async/events?task_id=".concat(encodeURIComponent(e)),
signal: t,
isTerminal: e => "creating" !== e.status
}), c = async e => (0, r.Jt)("/api/my-presets", {
params: e
}).then(e => {
var t;
return {
...e,
items: (null == (t = e.items) ? void 0 : t.map(e => (0, s.OD)(e))) || []
}
}), u = async (e, t) => (0, r.F6)("/api/my-presets/biz/".concat(e), {
...t
}, {
validateCode: !1
}), _ = async () => (0, r.Jt)("/rtg/live-sessions", {
skipAuthCheck: !0
}), p = async e => {
let t = "string" == typeof e ? {
sessionId: e
} : e;
return null != t.presetId && "" !== t.presetId ? (0, r.Jt)("/rtg/preset/".concat(encodeURIComponent(String(t.presetId)), "/live-info"), {
skipAuthCheck: !0
}) : (0, r.Jt)("/rtg/session/".concat(t.sessionId, "/live-info"), {
skipAuthCheck: !0
})
}
},
63193: (e, t, a) => {
a.d(t, {
$W: () => o,
f0: () => d,
Ts: () => r,
iD: () => i,
ri: () => l,
ni: () => s
});
var n = a(654);
let r = e => {
let {
sensorsdata: t
} = e;
t && Object.keys(t).length > 0 && (e => {
let t = window.sensorsDataAnalytic201505;
t && (t.use("PageLeave"), t.init({
use_client_time: !0,
send_type: "beacon",
is_track_single_page: !0,
...e
}))
})(t)
},
s = e => {
let {
sensorsdata: t
} = e;
t && Object.keys(t).length > 0 && (() => {
let e = window.sensorsDataAnalytic201505;
e && e.quick("autoTrack")
})()
},
o = e => {
let {
sensorsdata: t,
...a
} = e;
t && Object.keys(t).length > 0 && (e => {
let t = window.sensorsDataAnalytic201505;
t && t.registerPage({
...e
})
})(a)
},
i = e => {
let {
sensorsdata: t
} = e;
t && Object.keys(t).length > 0 && (e => {
let t = window.sensorsDataAnalytic201505;
if (!t) return;
let {
account_id: a
} = e;
t.login(a)
})(e)
},
l = e => {
let {
sensorsdata: t
} = e;
t && Object.keys(t).length > 0 && (e => {
let t = window.sensorsDataAnalytic201505;
t && t.logout()
})(0)
},
d = (e, t) => {
let {
sensorsdata: a
} = e;
a && Object.keys(a).length > 0 && (e => {
let t = window.sensorsDataAnalytic201505;
if (!t) return;
let {
key: a,
params: r
} = e;
(() => {
let e = window.location.hostname.toLowerCase();
return e.includes("test") || e.includes("preview") || e.includes("localhost")
})() && (0, n.fH)("[Sensors Event]", a, r), t.track(a, r)
})(t)
}
},
65303: (e, t, a) => {
a.d(t, {
d: () => r
});
var n = a(49855);
class r extends Error {
static isResponseUnAuthorized(e) {
var t;
return e instanceof r && (t = [n.U9.AUTHENTICATION_EXPIRED, n.U9.REQUEST_MISSING_TOKEN], t.includes(e.code))
}
constructor(e, t, a) {
super(e), this.name = "ExtendError", this.code = t, void 0 !== a && (this.extra = a), Object.setPrototypeOf(this, new.target.prototype)
}
}
},
65718: (e, t, a) => {
a.d(t, {
w: () => I
});
var n = a(25771),
r = a(87163),
s = a(85151),
o = a(33600),
i = a(99925),
l = a(72564),
d = a(43103),
c = a.n(d),
u = a(35104),
_ = a(92325),
p = a(28827),
E = a(66170),
m = a(36046),
f = a(99146),
h = a(39280),
T = a(71146),
y = a(34587),
v = a(25781),
g = a(45413);
function A(e) {
let {
open: t,
onSuccess: a,
onCancel: d
} = e, {
t: u
} = (0, s.Bd)(), [_, T] = (0, r.useState)(""), [v, A] = (0, r.useState)(!1), [R, w] = (0, r.useState)(null), [I, S] = (0, r.useState)(!1), C = (0, r.useMemo)(() => ({
confirmText: u("pages.invitationCode.unlockAccess"),
cancelText: u("pages.invitationCode.backToDiscover"),
confirmingText: u("pages.invitationCode.unlocking"),
cancelingText: u("pages.invitationCode.backToDiscover")
}), []), N = async () => {
if (!_.trim()) return void w(u("pages.invitationCode.pleaseEnterCode"));
A(!0), w(null);
try {
let e = await (0, p.vd)(_.trim());
e && e.success ? (S(!0), setTimeout(() => {
null == a || a()
}, 1500)) : w((null == e ? void 0 : e.message) || u("pages.invitationCode.failedToBind"))
} catch (t) {
let e = u("pages.invitationCode.failedToBind");
t instanceof Error && (e = t.message), e.includes("Invitation code does not exist") ? e = u("pages.invitationCode.codeNotExist") : e.includes("has been used up") || e.includes("is invalid") ? e = u("pages.invitationCode.codeUsedOrInvalid") : e.includes("has expired") ? e = u("pages.invitationCode.codeExpired") : (e.includes("User already exists") || e.includes("already used this invitation code")) && (e = u("pages.invitationCode.alreadyRegistered"), setTimeout(() => {
null == a || a()
}, 1500)), w(e)
} finally {
A(!1)
}
}, b = () => {
v || null == d || d()
};
return (0, n.jsxs)(m.lG, {
open: t,
onOpenChange: e => !e && b(),
children: [(0, n.jsx)(m.LC, {
className: "z-1049"
}), (0, n.jsxs)(m.Cf, {
className: "z-1050 sm:max-w-[425px]",
onInteractOutside: e => e.preventDefault(),
children: [(0, n.jsxs)(m.c7, {
children: [(0, n.jsx)(m.L3, {
children: u("pages.invitationCode.title")
}), (0, n.jsx)(m.rr, {
children: I ? u("pages.invitationCode.descriptionSuccess") : u("pages.invitationCode.description")
})]
}), I ? (0, n.jsxs)("div", {
className: "flex flex-col items-center justify-center py-8",
children: [(0, n.jsx)(o.A, {
className: "animate-in zoom-in h-16 w-16 text-green-500 duration-300"
}), (0, n.jsx)("p", {
className: "text-muted-foreground mt-4 text-sm",
children: u("pages.invitationCode.redirecting")
})]
}) : (0, n.jsxs)(n.Fragment, {
children: [(0, n.jsxs)("div", {
className: "grid gap-4 py-4",
children: [(0, n.jsx)(h.J, {
className: "text-sm font-bold text-zinc-500",
children: u("pages.invitationCode.inviteCode")
}), (0, n.jsxs)("div", {
className: "grid gap-2",
children: [(0, n.jsx)(f.p, {
id: "invitation-code",
placeholder: u("pages.invitationCode.placeholder"),
value: _,
onChange: e => {
T(e.target.value), w(null)
},
onKeyPress: e => {
"Enter" !== e.key || v || N()
},
disabled: v,
autoFocus: !0,
maxLength: 20,
className: R ? "border-red-500" : ""
}), R && (0, n.jsxs)("div", {
className: "animate-in fade-in flex items-center gap-2 text-sm text-red-500 duration-200",
children: [(0, n.jsx)(i.A, {
className: "h-4 w-4"
}), (0, n.jsx)("span", {
children: R
})]
})]
})]
}), !g.Q && (0, n.jsxs)("div", {
className: "text-sm text-zinc-500",
children: [u("pages.invitationCode.dontHaveCode"), " ", (0, n.jsx)(c(), {
className: "text-text-brand underline",
href: "https://forms.gle/3qzKm5uWJ3gs8dTu6",
target: "_blank",
children: u("pages.invitationCode.joinWaitlist")
}), " "]
}), (0, n.jsxs)(m.Es, {
children: [(0, n.jsx)(E.$, {
variant: "outline",
onClick: b,
disabled: v,
className: "flex-1 transition-all duration-200 hover:scale-105 hover:shadow-lg active:scale-[1.02] active:shadow-lg disabled:hover:scale-100 disabled:hover:shadow-none disabled:active:scale-100 disabled:active:shadow-none",
children: v ? C.cancelingText : C.cancelText
}), (0, n.jsxs)(E.$, {
onClick: N,
disabled: v || !_.trim(),
className: "flex-1 transition-all duration-200 hover:scale-105 hover:shadow-lg active:scale-[1.02] active:shadow-lg disabled:hover:scale-100 disabled:hover:shadow-none disabled:active:scale-100 disabled:active:shadow-none",
children: [v && (0, n.jsx)(l.A, {
className: "mr-2 h-4 w-4 animate-spin"
}), v ? C.confirmingText : C.confirmText]
})]
}), !g.Q && (0, n.jsx)(m.Es, {
children: (0, n.jsx)(E.$, {
onClick: () => {
window.open("".concat((0, y.rx)(), "/subscribe"), "_blank")
},
className: "flex-1 transition-all duration-200 hover:scale-105 hover:shadow-lg active:scale-[1.02] active:shadow-lg disabled:hover:scale-100 disabled:hover:shadow-none disabled:active:scale-100 disabled:active:shadow-none",
children: u("pages.invitationCode.goSubscribe")
})
})]
})]
})]
})
}
let R = null,
w = null,
I = e => {
let t = v.kH.getState().userInfo;
if (!t.loading) {
if (!t.accountId) return void(0, T.jL)();
R && (R.unmount(), R = null), w && w.parentNode && (w.parentNode.removeChild(w), w = null), (w = document.createElement("div")).id = "invitation-code-dialog-container", document.body.appendChild(w), (R = (0, _.createRoot)(w)).render((0, n.jsx)(() => {
let [t, a] = (0, r.useState)(!0), s = (0, u.usePathname)();
return (0, n.jsx)(A, {
open: t,
onSuccess: () => {
if (a(!1), null == e ? void 0 : e.onSuccess) {
var t;
null == e || null == (t = e.onSuccess) || t.call(e)
} else window.location.reload();
setTimeout(() => {
R && (R.unmount(), R = null), w && w.parentNode && (w.parentNode.removeChild(w), w = null)
}, 300)
},
onCancel: () => {
if (a(!1), null == e ? void 0 : e.onCancel) {
var t;
null == e || null == (t = e.onCancel) || t.call(e)
} else {
if (s.startsWith("/discover")) return;
window.location.href = "/discover"
}
setTimeout(() => {
R && (R.unmount(), R = null), w && w.parentNode && (w.parentNode.removeChild(w), w = null)
}, 300)
}
})
}, {}))
}
}
},
71055: (e, t, a) => {
a.d(t, {
UY: () => l,
f_: () => i,
we: () => d,
yx: () => s
});
let n = /(^|\.)aliyuncs\.com$/i,
r = new Set([(e => {
if (!e) return "";
try {
return new URL(e).hostname.toLowerCase()
} catch (e) {
return ""
}
})("https://world-media.pixverse.ai"), "media.pixverseai.cn", "media.pixverseai.com"].filter(Boolean)),
s = (e, t) => {
var a;
if (!e || (null == e || null == (a = e.includes) ? void 0 : a.call(e, "x-oss-process")) || !(e => {
try {
let t = new URL(e).hostname.toLowerCase();
return r.has(t) || n.test(t)
} catch (e) {
return !0
}
})(e)) return e;
let s = {
middle: "style/cover-webp",
large: "style/cover-webp-large",
small: "style/cover-webp-small"
};
return "".concat(e).concat(e.includes("?") ? "&" : "?", "x-oss-process=").concat(s[t || "middle"] || s.middle)
},
o = {
domain: "https://world-media.pixverse.ai",
otherDomainSkipOssProcess: !0
},
i = (e, t) => {
let {
domain: a,
size: n,
otherDomainSkipOssProcess: r
} = {
...o,
...t
}, i = e;
return e ? (e.startsWith("http") || e.startsWith("//") || (i = "".concat(a).concat(e.startsWith("/") ? "" : "/").concat(e)), r && !((e, t) => {
try {
let a = e => new URL(e.startsWith("//") ? "https:".concat(e) : e.includes("://") ? e : "https://".concat(e)).hostname;
return a(e) === a(t)
} catch (e) {
return !1
}
})(i, o.domain)) ? i : n ? s(i, n) : i : e
},
l = function(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "large";
return e.thumbnail_uri ? s(e.thumbnail_uri, t) : ""
},
d = function(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "large";
return e.thumbnail_uri ? s(e.thumbnail_uri, t) : ""
}
},
85851: (e, t, a) => {
a.d(t, {
k: () => d
});
var n = a(19570),
r = a(34587);
let s = /\r?\n\r?\n/,
o = /\r?\n/,
i = e => {
var t;
let a = e.split(s);
return {
completeBlocks: a.slice(0, -1),
rest: null != (t = a[a.length - 1]) ? t : ""
}
},
l = e => {
let t = e.split(o).filter(e => e.startsWith("data:")).map(e => e.slice(5).trimStart());
return 0 === t.length ? null : t.join("\n")
},
d = async e => {
let {
path: t,
signal: a,
timeoutMs: s = 12e4,
isTerminal: o
} = e, d = new AbortController, c = () => d.abort(), u = window.setTimeout(c, s);
null == a || a.addEventListener("abort", c, {
once: !0
});
try {
let e = {
Accept: "text/event-stream"
},
a = (0, n.XL)();
a && (e.Authorization = a);
let s = await fetch("".concat((0, r.xv)()).concat(t), {
method: "GET",
headers: e,
cache: "no-store",
signal: d.signal
});
if (!s.ok || !s.body) throw Error("event stream failed: ".concat(s.status));
let c = s.body.getReader(),
u = new TextDecoder,
_ = "",
p = null;
for (;;) {
let {
done: e,
value: t
} = await c.read();
if (e) break;
_ += u.decode(t, {
stream: !0
});
let {
completeBlocks: a,
rest: n
} = i(_);
for (let e of (_ = n, a)) {
let t = l(e);
if (!t) continue;
let a = JSON.parse(t);
if (p = a, o(a)) return a
}
}
if (p) return p;
throw Error("event stream ended without data")
} finally {
window.clearTimeout(u), null == a || a.removeEventListener("abort", c)
}
}
},
99146: (e, t, a) => {
a.d(t, {
p: () => o
});
var n = a(25771),
r = a(87163),
s = a(51529);
let o = r.forwardRef((e, t) => {
let {
className: a,
type: r,
...o
} = e;
return (0, n.jsx)("input", {
type: r,
className: (0, s.cn)("border-input bg-background file:text-foreground placeholder:text-muted-foreground flex h-11 w-full rounded-lg border p-4 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50", a),
ref: t,
...o
})
});
o.displayName = "Input"
}
}
]);