import { DID_SPACES_BASE_URL as t, BLOCKLET_SERVICE_PATH_PREFIX as d } from "../../constant.js";
async function c(i) {
  if (i?.didSpace?.endpoint || !window.blocklet || window.self !== window.top || window.location.origin === new URL(t).origin || window.location.href.includes(d))
    return !1;
  const { componentMountPoints: o } = window.blocklet, [, e] = window.blocklet.componentId.split("/");
  return o.some((n) => n?.capabilities?.didSpace === "requiredOnConnect" && e === n.did);
}
export {
  c as didSpacesIsRequired
};
