const pc = window.pc;
const t = {}, a = {
  assetDomain: t?.VITE_ASSET_DOMAIN ?? "https://create.viverse.com",
  viverseSdkUrl: t?.VITE_VIVERSE_SDK_URL ?? "https://www.viverse.com/static-assets/viverse-sdk/1.3.3/index.umd.cjs",
  viverseSdkApiDomain: t?.VITE_VIVERSE_SDK_API_DOMAIN ?? "https://sdk-api.viverse.com/",
  // --> / is required!
  viverseAvatarDomain: t?.VITE_VIVERSE_AVATAR_DOMAIN ?? "https://dts-vrprod.viverse.com",
  htcAccountDomain: t?.VITE_HTC_ACCOUNT_DOMAIN ?? "account.htcvive.com"
};
function _() {
  return a;
}
function l(e) {
  Object.assign(a, e);
}
function v(e) {
  const s = pc.Application.getApplication();
  if (!s)
    throw new Error("getAssetPathFromEditor: pc.Application is not initialized.");
  let i = e.split("/").pop() || "";
  i = i.replace(/\.glb$/i, ".glb.bin");
  const o = s.assets.findAll(i), n = o.find((c) => c.tags.has("viverse")) || o[0];
  if (!n)
    throw new Error(`getAssetPathFromEditor: Asset not found for ${i}`);
  const r = n.getFileUrl() || "";
  return r.startsWith("/api/") ? r.slice(5) : r;
}
function E(e, s) {
  return v(s);
}
export {
  _ as getViverseConfig,
  E as resolveAssetPath,
  l as setViverseEnv
};
