'use client';
const h = (e) => {
  const r = [];
  return e.signUp && r.push("password"), e.oauth && r.push("oauth"), e.magicLink && r.push("magic-link"), e.passkeys && r.push("passkey"), {
    methods: r,
    showSignInLink: e.signIn,
    requireTerms: !0
  };
}, c = {
  email: (e) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),
  password: (e, r) => {
    const t = r || {};
    return t.minLength && e.length < t.minLength || t.requireUppercase && !/[A-Z]/.test(e) || t.requireLowercase && !/[a-z]/.test(e) || t.requireNumbers && !/\d/.test(e) || t.requireSymbols && !/[!@#$%^&*(),.?":{}|<>]/.test(e) ? !1 : e.length >= (t.minLength || 8);
  },
  firstName: (e) => e.length >= 2 && /^[a-zA-Z\s]+$/.test(e),
  lastName: (e) => e.length >= 2 && /^[a-zA-Z\s]+$/.test(e),
  username: (e) => e.length >= 3 && /^[a-zA-Z0-9_-]+$/.test(e),
  phoneNumber: (e) => /^\+?[1-9]\d{1,14}$/.test(e.replace(/\s/g, ""))
}, m = (e) => {
  const r = [];
  let t = 0;
  e.length >= 8 ? t += 1 : r.push("Use at least 8 characters"), e.length >= 12 && (t += 1), /[a-z]/.test(e) ? t += 1 : r.push("Include lowercase letters"), /[A-Z]/.test(e) ? t += 1 : r.push("Include uppercase letters"), /\d/.test(e) ? t += 1 : r.push("Include numbers"), /[!@#$%^&*(),.?":{}|<>]/.test(e) ? t += 1 : r.push("Include symbols"), /(.)\1{2,}/.test(e) && (t -= 1, r.push("Avoid repeated characters")), /123|abc|qwe/i.test(e) && (t -= 1, r.push("Avoid common patterns"));
  let s;
  return t <= 2 ? s = "weak" : t <= 4 ? s = "fair" : t <= 5 ? s = "good" : s = "strong", {
    score: Math.max(0, Math.min(6, t)),
    feedback: r,
    strength: s
  };
}, g = (e = 12) => {
  const r = "abcdefghijklmnopqrstuvwxyz", t = "ABCDEFGHIJKLMNOPQRSTUVWXYZ", s = "0123456789", a = '!@#$%^&*(),.?":{}|<>', i = r + t + s + a, l = [];
  for (let o = 0; o < 3; o++) {
    let n = "";
    n += r[Math.floor(Math.random() * r.length)], n += t[Math.floor(Math.random() * t.length)], n += s[Math.floor(Math.random() * s.length)], n += a[Math.floor(Math.random() * a.length)];
    for (let u = 4; u < e; u++)
      n += i[Math.floor(Math.random() * i.length)];
    n = n.split("").sort(() => Math.random() - 0.5).join(""), l.push(n);
  }
  return l;
}, f = (e) => {
  if (!e) return null;
  try {
    const r = atob(e), t = JSON.parse(r);
    return {
      organizationId: t.orgId,
      organizationName: t.orgName,
      inviterName: t.inviterName,
      inviterEmail: t.inviterEmail,
      role: t.role,
      expiresAt: new Date(t.expiresAt)
    };
  } catch {
    return null;
  }
}, p = {
  minLength: 8,
  requireUppercase: !0,
  requireLowercase: !0,
  requireNumbers: !0,
  requireSymbols: !1
}, d = [
  { key: "firstName", label: "First Name", required: !0 },
  { key: "lastName", label: "Last Name", required: !0 },
  { key: "username", label: "Username", required: !1 },
  { key: "phoneNumber", label: "Phone Number", required: !1 }
];
export {
  d as COLLECT_FIELDS_OPTIONS,
  p as DEFAULT_PASSWORD_REQUIREMENTS,
  f as formatInvitationData,
  g as generatePasswordSuggestions,
  h as getDefaultSignUpConfig,
  m as getPasswordStrength,
  c as signUpValidation
};
//# sourceMappingURL=index.js.map
