
/**
 *   WARNING: This file is intended to be used within MySheerID.
 *   This file is not intended for use in other contexts and there are no guarantees about its behavior outside of MySheerID.
 */ 
/**
 *   VERSION: 2.239.0-alpha.0
 *   BUILD_TIMESTAMP: 1780013005605
 *   BUILD_DATE: Fri May 29 2026 00:03:25 GMT+0000 (Coordinated Universal Time)
 *   BUILD_COMMIT: 3344b6c0fd9fa858907db310cfb1ef5e0d224da2
 */
import { p as l, q as c, v as m, d as f, j as i, f as x, E as g, w as h } from "../_mysheerid-preview.js";
const D = async () => {
  if (!document.getElementById("ipqs"))
    return new Promise((t) => {
      const e = document.createElement("script");
      e.src = "https://fd.sheerid.com/api/*/BJOvvIiNpZnA9XHXIHVc0S4FO87k4eub6NLOfmShTU7nRqamLKTzQixwD7XETz7bvtNHmicHNx9hEtOJ9NPo3kUJBl7o1jpwcbcXeOMDJjvulAWSrRnO7WYq9gxL6xNT0xnfou5UlshUGWQ2g68qBuWajMWbxZ25JELntxaP0neiVUbephG5E79ES89qBo4uIGBDvykdJb75hpo0URvJ0Fm1j6fuEqHQBq64Mi390KC9XoQwiFxyboxQ5lSooY4p/learn.js", e.async = !0, e.id = "ipqs", document.body.appendChild(e), e.onload = () => {
        t();
      };
    });
}, E = async (n, t) => {
  if (l(() => n.ipqsDeviceFingerprintEnabled, !1))
    try {
      await D(), window.IPQ = {
        Callback: () => {
          window.Startup.Store("transactionID", t), window.Startup.Init();
        }
      };
    } catch (e) {
      c.error(e, "Failed to collect IPQS device data");
    }
}, v = async (n, t) => {
  if (!l(() => n.threatMetrixEnabled, !1))
    return;
  const r = n.threatMetrixOrgId || "cnl2my47";
  try {
    const { ThreatMetrix: o } = await import(
      /* webpackChunkName: "Tmetrix" */
      "./index-DIkWpujR.js"
    );
    o !== void 0 && o.hasOwnProperty("profile") && typeof o.profile == "function" && o.profile("content.sheerid.com", r, t);
  } catch (o) {
    c.error(o, "Failed to collect ThreatMetrix device data");
  }
}, s = /* @__PURE__ */ new Map(), y = (n, t) => {
  const e = s.get(t);
  if (e)
    return e;
  const r = (async () => {
    const [, , o] = await Promise.all([
      v(n, t),
      E(n, t),
      m(n, t)
    ]);
    return o ? { fpSessionId: o } : {};
  })();
  return s.set(t, r), r;
}, I = (n) => {
  try {
    const t = n.target instanceof HTMLInputElement ? n.target : void 0;
    if (t && (t.id || t.name)) {
      const e = {
        eventName: g.FORM_PASTE,
        params: {
          id: t.id || t.name,
          queryLength: n.clipboardData.getData("text").length
        }
      };
      h(e);
    }
  } catch (t) {
    c.error(t);
  }
}, w = ({
  step: n,
  verificationService: t,
  className: e,
  children: r
}) => {
  const o = f(n).replace(/^collect-/, ""), a = [`sid-${o}-container`, "sid-l-container", "sid-left-align"];
  e && a.push(e);
  const d = () => {
    const { programTheme: p, verificationResponse: u } = t;
    y(p, u.verificationId);
  };
  return /* @__PURE__ */ i.jsxs(
    "div",
    {
      id: `sid-step-${o}`,
      className: a.join(" "),
      onPaste: I,
      onFocusCapture: d,
      children: [
        /* @__PURE__ */ i.jsx("div", { role: "main", children: r }),
        /* @__PURE__ */ i.jsx(x, { verificationService: t })
      ]
    }
  );
};
export {
  w as P
};
