{"version":3,"sources":["../src/vue.ts","../src/brands.ts","../src/format.ts","../src/logos.ts","../src/card.ts"],"sourcesContent":["import {\n  type PropType,\n  defineComponent,\n  h,\n  normalizeClass,\n  onBeforeUnmount,\n  onMounted,\n  ref,\n  watch,\n} from 'vue';\nimport {\n  type Brand,\n  type CardInstance,\n  type CardOptions,\n  type CardSlot,\n  type CardVariant,\n  type CopyField,\n  type FocusedField,\n  createCard,\n} from './index';\n\nexport type { Brand, CardSlot, CardVariant, CopyField, FocusedField };\nexport { brandFromStripe } from './index';\n\n/**\n * Controlled card preview. Wraps the vanilla `crd-ui` renderer: the core owns\n * the markup; this component only forwards props on each update. Emits\n * `brandChange` whenever the detected brand changes (null when unrecognized).\n */\nexport const Card = defineComponent({\n  name: 'CrdCard',\n  props: {\n    number: { type: String, default: '' },\n    name: { type: String, default: '' },\n    expiry: { type: String, default: '' },\n    cvc: { type: String, default: '' },\n    focused: { type: String as PropType<FocusedField | null>, default: null },\n    /** Visual finish of the card. Default: 'sunset' (brand-tinted blooms). */\n    variant: { type: String as PropType<CardVariant>, default: 'sunset' },\n    /** Pointer-tracked 3D hover tilt with a light glare. Default: false. */\n    tilt: { type: Boolean, default: false },\n    /**\n     * Force the displayed brand (e.g. from Stripe Elements' metadata) instead\n     * of deriving it from `number`. `null` shows the unknown state; leave\n     * unset for automatic detection.\n     */\n    brand: { type: String as PropType<Brand | null>, default: undefined },\n    /**\n     * Show only the last digits ('•••• •••• •••• 4242') when the full number\n     * is unknown — saved cards or post-tokenization summaries. Ignored while\n     * `number` has digits.\n     */\n    last4: { type: String, default: '' },\n    /**\n     * 'form' (default) is the payment-form preview; 'display' presents an\n     * existing card for dashboards (expiry/CVC on the front, no flip).\n     */\n    layout: { type: String as PropType<'form' | 'display'>, default: 'form' },\n    /**\n     * Make the revealed number, expiry and CVC click-to-copy (display layout\n     * only). Default: false.\n     */\n    copyable: { type: Boolean, default: false },\n    /**\n     * Extra classes per part of the card (utility-first styling of internal\n     * sections). Merged with the built-in classes. See CardSlot for the keys.\n     */\n    classNames: {\n      type: Object as PropType<Partial<Record<CardSlot, string>>>,\n      default: undefined,\n    },\n    placeholders: { type: Object as PropType<CardOptions['placeholders']>, default: undefined },\n    locale: { type: Object as PropType<CardOptions['locale']>, default: undefined },\n    logos: { type: Object as PropType<CardOptions['logos']>, default: undefined },\n  },\n  // `class` is taken off the fallthrough attrs and applied to the card root\n  // (.crd) instead of the container div, matching every other component\n  // library — a custom property on the container would never reach the card.\n  inheritAttrs: false,\n  emits: {\n    brandChange: (_brand: Brand | null) => true,\n    copy: (_field: CopyField, _value: string) => true,\n  },\n  setup(props, { emit, attrs }) {\n    const container = ref<HTMLDivElement>();\n    let card: CardInstance | null = null;\n    let brand: Brand | null = null;\n\n    const sync = (): void => {\n      if (!card) return;\n      const root = [normalizeClass(attrs.class), props.classNames?.root]\n        .filter(Boolean)\n        .join(' ');\n      card.update({\n        number: props.number,\n        name: props.name,\n        expiry: props.expiry,\n        cvc: props.cvc,\n        focused: props.focused,\n        variant: props.variant,\n        tilt: props.tilt,\n        brand: props.brand,\n        last4: props.last4,\n        layout: props.layout,\n        copyable: props.copyable,\n        classNames: root ? { ...props.classNames, root } : props.classNames,\n      });\n      if (card.brand !== brand) {\n        brand = card.brand;\n        emit('brandChange', brand);\n      }\n    };\n\n    onMounted(() => {\n      if (!container.value) return;\n      // placeholders/locale/logos are creation-time options of the core;\n      // changing them after mount is not supported (recreate with a `key`).\n      card = createCard(container.value, {\n        placeholders: props.placeholders,\n        locale: props.locale,\n        logos: props.logos,\n        onCopy: (field, value) => emit('copy', field, value),\n      });\n      sync();\n    });\n\n    watch(\n      () => [\n        props.number,\n        props.name,\n        props.expiry,\n        props.cvc,\n        props.focused,\n        props.variant,\n        props.tilt,\n        props.brand,\n        props.last4,\n        props.layout,\n        props.copyable,\n        props.classNames,\n        attrs.class,\n      ],\n      sync,\n    );\n\n    onBeforeUnmount(() => {\n      card?.destroy();\n      card = null;\n    });\n\n    return () => {\n      const { class: _class, ...rest } = attrs;\n      return h('div', { ...rest, ref: container });\n    };\n  },\n});\n","export type Brand =\n  | 'visa'\n  | 'mastercard'\n  | 'amex'\n  | 'discover'\n  | 'dinersclub'\n  | 'jcb'\n  | 'unionpay'\n  | 'maestro'\n  | 'elo'\n  | 'hipercard';\n\n/** Inclusive numeric prefix range, e.g. ['51', '55'] matches 51xx… through 55xx… */\ntype PrefixRange = [string, string];\n\nexport interface BrandSpec {\n  name: Brand;\n  displayName: string;\n  ranges: PrefixRange[];\n  /** Indices where a space goes when formatting, e.g. [4, 8, 12] for 4-4-4-4. */\n  gaps: number[];\n  /** Valid full lengths. */\n  lengths: number[];\n  /** Conventional display length used to pad the masked number. */\n  maskLength: number;\n  cvcLength: number;\n}\n\nconst range = (start: string, end: string = start): PrefixRange => [start, end];\n\n// Generic brands first: on ambiguous short input (e.g. a lone '4') the earlier,\n// more common brand wins until enough digits arrive to confirm a specific one.\nexport const BRANDS: BrandSpec[] = [\n  {\n    name: 'visa',\n    displayName: 'Visa',\n    ranges: [range('4')],\n    gaps: [4, 8, 12],\n    lengths: [13, 16, 19],\n    maskLength: 16,\n    cvcLength: 3,\n  },\n  {\n    name: 'mastercard',\n    displayName: 'Mastercard',\n    ranges: [range('51', '55'), range('2221', '2720')],\n    gaps: [4, 8, 12],\n    lengths: [16],\n    maskLength: 16,\n    cvcLength: 3,\n  },\n  {\n    name: 'amex',\n    displayName: 'American Express',\n    ranges: [range('34'), range('37')],\n    gaps: [4, 10],\n    lengths: [15],\n    maskLength: 15,\n    cvcLength: 4,\n  },\n  {\n    name: 'discover',\n    displayName: 'Discover',\n    ranges: [range('6011'), range('644', '649'), range('65')],\n    gaps: [4, 8, 12],\n    lengths: [16, 19],\n    maskLength: 16,\n    cvcLength: 3,\n  },\n  {\n    name: 'dinersclub',\n    displayName: 'Diners Club',\n    ranges: [range('300', '305'), range('36'), range('38', '39')],\n    gaps: [4, 10],\n    lengths: [14, 16, 19],\n    maskLength: 14,\n    cvcLength: 3,\n  },\n  {\n    name: 'jcb',\n    displayName: 'JCB',\n    ranges: [range('3528', '3589')],\n    gaps: [4, 8, 12],\n    lengths: [16, 17, 18, 19],\n    maskLength: 16,\n    cvcLength: 3,\n  },\n  {\n    name: 'unionpay',\n    displayName: 'UnionPay',\n    ranges: [range('62')],\n    gaps: [4, 8, 12],\n    lengths: [16, 17, 18, 19],\n    maskLength: 16,\n    cvcLength: 3,\n  },\n  {\n    name: 'maestro',\n    displayName: 'Maestro',\n    ranges: [\n      range('5018'),\n      range('5020'),\n      range('5038'),\n      range('5893'),\n      range('6304'),\n      range('6759'),\n      range('6761', '6763'),\n    ],\n    gaps: [4, 8, 12],\n    lengths: [12, 13, 14, 15, 16, 17, 18, 19],\n    maskLength: 16,\n    cvcLength: 3,\n  },\n  {\n    name: 'elo',\n    displayName: 'Elo',\n    ranges: [\n      range('401178'),\n      range('401179'),\n      range('431274'),\n      range('438935'),\n      range('451416'),\n      range('457393'),\n      range('457631'),\n      range('457632'),\n      range('504175'),\n      range('506699', '506778'),\n      range('509000', '509999'),\n      range('627780'),\n      range('636297'),\n      range('636368'),\n      range('650031', '650051'),\n      range('650405', '650439'),\n      range('650485', '650538'),\n      range('650541', '650598'),\n      range('650700', '650718'),\n      range('650720', '650727'),\n      range('650901', '650978'),\n      range('651652', '651679'),\n      range('655000', '655058'),\n    ],\n    gaps: [4, 8, 12],\n    lengths: [16],\n    maskLength: 16,\n    cvcLength: 3,\n  },\n  {\n    name: 'hipercard',\n    displayName: 'Hipercard',\n    ranges: [range('606282')],\n    gaps: [4, 8, 12],\n    lengths: [16],\n    maskLength: 16,\n    cvcLength: 3,\n  },\n];\n\nconst SPECS_BY_NAME = new Map(BRANDS.map((spec) => [spec.name, spec]));\n\nexport function getBrandSpec(brand: Brand): BrandSpec {\n  // The map is built from BRANDS, which covers every Brand value.\n  return SPECS_BY_NAME.get(brand)!;\n}\n\n/**\n * Map the brand slug Stripe reports (Elements' change event or\n * PaymentMethod.card.brand) to a crd-ui Brand, ready for the `brand` option:\n * Stripe says 'diners' where crd-ui says 'dinersclub'; 'unknown' and any\n * slug crd-ui doesn't support return null (the unknown card state).\n */\nexport function brandFromStripe(stripeBrand: string): Brand | null {\n  if (stripeBrand === 'diners') return 'dinersclub';\n  return SPECS_BY_NAME.has(stripeBrand as Brand) ? (stripeBrand as Brand) : null;\n}\n\n/**\n * How well `digits` matches a range: the range's prefix length when the input\n * fully covers it, 0.5 when the input is a shorter prefix that could still\n * grow into a match, 0 when it cannot match.\n */\nfunction rangeMatchStrength(digits: string, [start, end]: PrefixRange): number {\n  const compareLength = Math.min(digits.length, start.length);\n  if (compareLength === 0) return 0;\n  const value = Number(digits.slice(0, compareLength));\n  const min = Number(start.slice(0, compareLength));\n  const max = Number(end.slice(0, compareLength));\n  if (value < min || value > max) return 0;\n  return digits.length >= start.length ? start.length : 0.5;\n}\n\n/**\n * Detect the card brand from a (possibly partial) card number.\n * Non-digit characters are ignored. Returns null when nothing matches.\n *\n * When several brands match, the one with the longest confirmed prefix wins\n * (e.g. '4011 78…' is Elo, not Visa); a tentative partial match never beats a\n * confirmed one, so a lone '4' is reported as Visa.\n */\nexport function detectBrand(number: string): Brand | null {\n  const digits = number.replace(/\\D/g, '');\n  let best: Brand | null = null;\n  let bestStrength = 0;\n  for (const spec of BRANDS) {\n    for (const r of spec.ranges) {\n      const strength = rangeMatchStrength(digits, r);\n      if (strength > bestStrength) {\n        bestStrength = strength;\n        best = spec.name;\n      }\n    }\n  }\n  return best;\n}\n","import { type Brand, getBrandSpec } from './brands';\n\nconst DEFAULT_GAPS = [4, 8, 12];\nconst DEFAULT_LENGTH = 16;\nexport const MASK_CHAR = '•';\n\nexport function normalizeDigits(value: string, maxLength?: number): string {\n  const digits = value.replace(/\\D/g, '');\n  return maxLength === undefined ? digits : digits.slice(0, maxLength);\n}\n\nfunction groupDigits(digits: string, gaps: number[]): string {\n  const parts: string[] = [];\n  let previous = 0;\n  for (const gap of gaps) {\n    if (digits.length <= previous) break;\n    parts.push(digits.slice(previous, gap));\n    previous = gap;\n  }\n  if (digits.length > previous) parts.push(digits.slice(previous));\n  return parts.join(' ');\n}\n\n/** Group the typed digits with spaces according to the brand ('4-6-5' for Amex, etc.). */\nexport function formatCardNumber(raw: string, brand?: Brand | null): string {\n  const spec = brand ? getBrandSpec(brand) : undefined;\n  const maxLength = spec ? spec.lengths[spec.lengths.length - 1]! : DEFAULT_LENGTH;\n  const digits = normalizeDigits(raw, maxLength);\n  return groupDigits(digits, spec?.gaps ?? DEFAULT_GAPS);\n}\n\n/**\n * Like formatCardNumber but pads the missing digits with a mask character up\n * to the brand's conventional display length, so the card face always shows a\n * full number silhouette ('4111 11•• •••• ••••').\n */\nexport function maskCardNumber(raw: string, brand?: Brand | null, maskChar = MASK_CHAR): string {\n  const spec = brand ? getBrandSpec(brand) : undefined;\n  const targetLength = spec ? spec.maskLength : DEFAULT_LENGTH;\n  const maxLength = spec ? spec.lengths[spec.lengths.length - 1]! : DEFAULT_LENGTH;\n  const digits = normalizeDigits(raw, maxLength);\n  const padded =\n    digits.length >= targetLength\n      ? digits\n      : digits + maskChar.repeat(targetLength - digits.length);\n  return groupDigits(padded, spec?.gaps ?? DEFAULT_GAPS);\n}\n\n/**\n * A fully masked number with only the last digits visible\n * ('•••• •••• •••• 4242') — for saved cards or post-tokenization summaries\n * where only the last4 is known (e.g. Stripe's PaymentMethod.card.last4).\n */\nexport function maskLast4(last4: string, brand?: Brand | null, maskChar = MASK_CHAR): string {\n  const spec = brand ? getBrandSpec(brand) : undefined;\n  const targetLength = spec ? spec.maskLength : DEFAULT_LENGTH;\n  const digits = normalizeDigits(last4, 4);\n  const masked = maskChar.repeat(Math.max(targetLength - digits.length, 0)) + digits;\n  return groupDigits(masked, spec?.gaps ?? DEFAULT_GAPS);\n}\n\n/** Normalize an expiry to 'MM/YY'. Accepts '1224', '12/24', '12/2024', '1/24'… */\nexport function formatExpiry(raw: string, maskChar = MASK_CHAR): string {\n  const digits = normalizeDigits(raw, 6);\n  let month = digits.slice(0, 2);\n  let year = digits.slice(2);\n  // A single leading digit above 1 can only be a month typed without the zero.\n  if (month.length === 1 && Number(month) > 1) {\n    year = '';\n    month = `0${month}`;\n  }\n  if (year.length === 4) year = year.slice(2);\n  else year = year.slice(0, 2);\n  const mm = month.padEnd(2, maskChar);\n  const yy = year.padEnd(2, maskChar);\n  return `${mm}/${yy}`;\n}\n\n/** Mask a CVC to its expected length ('•••' or '••••' for Amex). */\nexport function maskCvc(raw: string, brand?: Brand | null, maskChar = MASK_CHAR): string {\n  const length = brand ? getBrandSpec(brand).cvcLength : 3;\n  return normalizeDigits(raw, length).replace(/\\d/g, maskChar).padEnd(length, maskChar);\n}\n\n/** The CVC digits themselves, capped to the brand's expected length. */\nexport function formatCvc(raw: string, brand?: Brand | null): string {\n  const length = brand ? getBrandSpec(brand).cvcLength : 4;\n  return normalizeDigits(raw, length);\n}\n","import type { Brand } from './brands';\n\n// Generic, home-made marks — deliberately NOT the official brand logos, to keep\n// the package free of trademarked assets (same approach as react-credit-cards).\n// Consumers can replace them via the `logos` option of createCard.\n\nconst wordmark = (text: string, options: { italic?: boolean } = {}): string => {\n  // Long names get a smaller size so they never overflow the 120-unit viewBox.\n  const size = text.length >= 7 ? 15 : 22;\n  return (\n    `<svg viewBox=\"0 0 120 40\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-hidden=\"true\">` +\n    `<text x=\"118\" y=\"28\" text-anchor=\"end\" font-family=\"'Avenir Next', 'Segoe UI', sans-serif\" ` +\n    `font-size=\"${size}\" font-weight=\"700\" letter-spacing=\"1\" ` +\n    `${options.italic ? 'font-style=\"italic\" ' : ''}fill=\"currentColor\">${text}</text></svg>`\n  );\n};\n\nconst circles =\n  `<svg viewBox=\"0 0 120 40\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-hidden=\"true\">` +\n  `<circle cx=\"85\" cy=\"20\" r=\"15\" fill=\"currentColor\" opacity=\"0.85\"/>` +\n  `<circle cx=\"103\" cy=\"20\" r=\"15\" fill=\"currentColor\" opacity=\"0.5\"/></svg>`;\n\nexport const LOGOS: Record<Brand, string> = {\n  visa: wordmark('VISA', { italic: true }),\n  mastercard: circles,\n  amex: wordmark('AMEX'),\n  discover: wordmark('DISCOVER'),\n  dinersclub: wordmark('DINERS'),\n  jcb: wordmark('JCB'),\n  unionpay: wordmark('UNIONPAY'),\n  maestro: circles,\n  elo: wordmark('elo'),\n  hipercard: wordmark('Hipercard'),\n};\n\nexport const CHIP_SVG =\n  `<svg viewBox=\"0 0 48 36\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-hidden=\"true\">` +\n  `<rect x=\"1\" y=\"1\" width=\"46\" height=\"34\" rx=\"6\" fill=\"currentColor\" opacity=\"0.9\"/>` +\n  `<path d=\"M1 13h14M1 23h14M33 13h14M33 23h14M24 1v10M24 25v10M15 11h18v14H15z\" ` +\n  `stroke=\"rgba(0,0,0,0.45)\" stroke-width=\"1.6\" fill=\"none\"/></svg>`;\n","import { type Brand, detectBrand, getBrandSpec } from './brands';\nimport {\n  formatCvc,\n  formatExpiry,\n  maskCardNumber,\n  maskCvc,\n  maskLast4,\n  normalizeDigits,\n} from './format';\nimport { CHIP_SVG, LOGOS } from './logos';\n\nexport type FocusedField = 'number' | 'name' | 'expiry' | 'cvc';\n\n/**\n * Visual style of the card. 'gradient' is the classic per-brand gradient;\n * the rest are brand-agnostic finishes (the brand still shows via its logo).\n */\nexport type CardVariant = 'gradient' | 'ember' | 'holo' | 'porcelain' | 'sunset' | 'graphite';\n\nexport interface CardData {\n  number: string;\n  name: string;\n  expiry: string;\n  cvc: string;\n  focused?: FocusedField | null;\n  variant?: CardVariant;\n  /** Pointer-tracked 3D hover tilt with a light glare. Default: false. */\n  tilt?: boolean;\n  /**\n   * Force the displayed brand instead of deriving it from `number` — for\n   * integrations where the number never reaches you but the provider reports\n   * the brand (e.g. Stripe Elements). `null` shows the unknown state;\n   * `undefined` (default) keeps automatic detection.\n   */\n  brand?: Brand | null;\n  /**\n   * Show only the last digits ('•••• •••• •••• 4242') when the full number is\n   * unknown — saved cards or post-tokenization summaries (e.g. Stripe's\n   * PaymentMethod.card.last4). Ignored while `number` has digits.\n   */\n  last4?: string;\n  /**\n   * 'form' (default) is the payment-form preview: CVC on the back, flip on\n   * focus, name placeholder. 'display' presents an existing card (dashboards):\n   * expiry and CVC move to a meta row on the front, empty values stay masked\n   * (reveal = update() with the real data), the empty name hides, and the CVC\n   * focus no longer flips.\n   */\n  layout?: 'form' | 'display';\n  /**\n   * Make the revealed number, expiry and CVC click-to-copy (display layout\n   * only). Masked values aren't copyable — only what the app has revealed.\n   * Default: false.\n   */\n  copyable?: boolean;\n  /**\n   * Extra classes per part of the card — for utility-first styling (Tailwind\n   * etc.) of sections the library owns. Merged with the built-in classes, so\n   * `.crd__number` (and state modifiers) stay intact. Keys are stable slot\n   * names (see CardSlot); the `root` slot also merges the top-level `.crd`.\n   */\n  classNames?: Partial<Record<CardSlot, string>>;\n}\n\n/** A copyable field in the display layout. */\nexport type CopyField = 'number' | 'expiry' | 'cvc';\n\n/**\n * A styleable part of the card, for the `classNames` slot map. Keys are stable\n * across versions even if the internal CSS class names change.\n */\nexport type CardSlot =\n  | 'root'\n  | 'inner'\n  | 'front'\n  | 'back'\n  | 'chip'\n  | 'logo'\n  | 'number'\n  | 'footer'\n  | 'name'\n  | 'expiry'\n  | 'expiryLabel'\n  | 'expiryValue'\n  | 'meta'\n  | 'metaExpiry'\n  | 'metaCvc'\n  | 'cvc';\n\nexport interface CardOptions extends Partial<CardData> {\n  placeholders?: {\n    /** Shown on the card while the name is empty. Default: 'FULL NAME'. */\n    name?: string;\n  };\n  locale?: {\n    /** Label next to the expiry date. Default: 'valid thru'. */\n    validThru?: string;\n    /** Expiry label on the display-layout meta row. Default: 'Exp'. */\n    exp?: string;\n    /** CVC label on the display-layout meta row. Default: 'CVC'. */\n    cvc?: string;\n    /** Hover hint on a copyable field. Default: 'Click to copy'. */\n    copy?: string;\n    /** Feedback bubble shown after copying a field. Default: 'Copied'. */\n    copied?: string;\n  };\n  /** Override the built-in generic brand marks with your own inline SVG. */\n  logos?: Partial<Record<Brand, string>>;\n  /**\n   * Called after a copyable field is copied to the clipboard (analytics, your\n   * own toast…). The card already writes the value; this is just an observer.\n   */\n  onCopy?: (field: CopyField, value: string) => void;\n}\n\nexport interface CardInstance {\n  /** Merge new values and re-render the affected parts of the card. */\n  update(data: Partial<CardData>): void;\n  /** Brand detected from the current number, or null. */\n  readonly brand: Brand | null;\n  /** The root `.crd` element, in case you need direct access. */\n  readonly element: HTMLElement;\n  /** Remove the card from the DOM. The instance must not be used afterwards. */\n  destroy(): void;\n}\n\nconst TEMPLATE = `\n<div class=\"crd__inner\">\n  <div class=\"crd__front\">\n    <div class=\"crd__chip\">${CHIP_SVG}</div>\n    <div class=\"crd__logo\"></div>\n    <div class=\"crd__number\"></div>\n    <div class=\"crd__meta\">\n      <span class=\"crd__meta-item\">\n        <span class=\"crd__meta-label crd__meta-label--exp\"></span>\n        <span class=\"crd__meta-expiry\"></span>\n      </span>\n      <span class=\"crd__meta-item\">\n        <span class=\"crd__meta-label crd__meta-label--cvc\"></span>\n        <span class=\"crd__meta-cvc\"></span>\n      </span>\n    </div>\n    <div class=\"crd__footer\">\n      <div class=\"crd__name\"></div>\n      <div class=\"crd__expiry\">\n        <span class=\"crd__expiry-label\"></span>\n        <span class=\"crd__expiry-value\"></span>\n      </div>\n    </div>\n    <div class=\"crd__ring\"></div>\n  </div>\n  <div class=\"crd__back\">\n    <div class=\"crd__stripe\"></div>\n    <div class=\"crd__signature\"><span class=\"crd__cvc\"></span></div>\n    <div class=\"crd__logo crd__logo--back\"></div>\n  </div>\n</div>\n<div class=\"crd__glare\"></div>`;\n\nexport function createCard(container: HTMLElement, options: CardOptions = {}): CardInstance {\n  const state: CardData = {\n    number: options.number ?? '',\n    name: options.name ?? '',\n    expiry: options.expiry ?? '',\n    cvc: options.cvc ?? '',\n    focused: options.focused ?? null,\n    variant: options.variant ?? 'sunset',\n    tilt: options.tilt ?? false,\n    brand: options.brand,\n    last4: options.last4 ?? '',\n    layout: options.layout ?? 'form',\n    copyable: options.copyable ?? false,\n    classNames: options.classNames,\n  };\n  const namePlaceholder = options.placeholders?.name ?? 'FULL NAME';\n  const validThru = options.locale?.validThru ?? 'valid thru';\n  const expLabel = options.locale?.exp ?? 'Exp';\n  const cvcLabel = options.locale?.cvc ?? 'CVC';\n  const copyLabel = options.locale?.copy ?? 'Click to copy';\n  const copiedLabel = options.locale?.copied ?? 'Copied';\n  const onCopy = options.onCopy;\n  const logos: Record<Brand, string> = { ...LOGOS, ...options.logos };\n  const COPY_ARIA: Record<CopyField, string> = {\n    number: 'Copy card number',\n    expiry: 'Copy expiry date',\n    cvc: 'Copy security code',\n  };\n\n  const root = document.createElement('div');\n  root.setAttribute('role', 'img');\n  root.innerHTML = TEMPLATE;\n  container.appendChild(root);\n\n  const query = (selector: string): HTMLElement => root.querySelector<HTMLElement>(selector)!;\n  const refs = {\n    number: query('.crd__number'),\n    name: query('.crd__name'),\n    expiry: query('.crd__expiry'),\n    expiryLabel: query('.crd__expiry-label'),\n    expiryValue: query('.crd__expiry-value'),\n    cvc: query('.crd__cvc'),\n    metaExpiry: query('.crd__meta-expiry'),\n    metaCvc: query('.crd__meta-cvc'),\n    logoFront: query('.crd__logo'),\n    logoBack: query('.crd__logo--back'),\n    ring: query('.crd__ring'),\n    inner: query('.crd__inner'),\n    front: query('.crd__front'),\n    back: query('.crd__back'),\n    chip: query('.crd__chip'),\n    footer: query('.crd__footer'),\n    meta: query('.crd__meta'),\n  };\n\n  // Maps each slot to the element(s) whose base class it augments. `root` is\n  // handled inline (its class is rebuilt every render); the rest set here.\n  const slotTargets: Partial<Record<CardSlot, { el: HTMLElement; base: string }>> = {\n    inner: { el: refs.inner, base: 'crd__inner' },\n    front: { el: refs.front, base: 'crd__front' },\n    back: { el: refs.back, base: 'crd__back' },\n    chip: { el: refs.chip, base: 'crd__chip' },\n    logo: { el: refs.logoFront, base: 'crd__logo' },\n    number: { el: refs.number, base: 'crd__number' },\n    footer: { el: refs.footer, base: 'crd__footer' },\n    expiry: { el: refs.expiry, base: 'crd__expiry' },\n    expiryLabel: { el: refs.expiryLabel, base: 'crd__expiry-label' },\n    expiryValue: { el: refs.expiryValue, base: 'crd__expiry-value' },\n    meta: { el: refs.meta, base: 'crd__meta' },\n    metaExpiry: { el: refs.metaExpiry, base: 'crd__meta-expiry' },\n    metaCvc: { el: refs.metaCvc, base: 'crd__meta-cvc' },\n    cvc: { el: refs.cvc, base: 'crd__cvc' },\n  };\n\n  const withSlot = (base: string, slot: CardSlot): string => {\n    const extra = state.classNames?.[slot];\n    return extra ? `${base} ${extra}` : base;\n  };\n  refs.expiryLabel.textContent = validThru;\n  query('.crd__meta-label--exp').textContent = expLabel;\n  query('.crd__meta-label--cvc').textContent = cvcLabel;\n\n  // The focus ring is one element that travels between sections: on focus\n  // changes it slides/resizes to the target (spring transition in CSS); when\n  // it (re)appears it snaps into place first so it never slides in from a\n  // stale position. Geometry is re-synced on every render so the ring tracks\n  // content growth (e.g. the number widening while typing).\n  let ringHideTimer: ReturnType<typeof setTimeout> | undefined;\n\n  function updateRing(): void {\n    const targets = { number: refs.number, name: refs.name, expiry: refs.expiry } as const;\n    const target =\n      state.focused && state.focused !== 'cvc' ? targets[state.focused] : undefined;\n    const width = target?.offsetWidth ?? 0;\n    if (!target || !width) {\n      // Grace period before hiding: moving between inputs fires blur before\n      // focus, which passes through a focused=null render — deferring the\n      // hide lets the ring travel to the next section instead of fading out\n      // and reappearing.\n      if (!ringHideTimer && refs.ring.classList.contains('crd__ring--on')) {\n        ringHideTimer = setTimeout(() => {\n          ringHideTimer = undefined;\n          refs.ring.classList.remove('crd__ring--on');\n        }, 90);\n      }\n      return;\n    }\n    if (ringHideTimer) {\n      clearTimeout(ringHideTimer);\n      ringHideTimer = undefined;\n    }\n    const wasOn = refs.ring.classList.contains('crd__ring--on');\n    if (!wasOn) refs.ring.classList.add('crd__ring--instant');\n    refs.ring.style.transform = `translate(${target.offsetLeft}px, ${target.offsetTop}px)`;\n    refs.ring.style.width = `${width}px`;\n    refs.ring.style.height = `${target.offsetHeight}px`;\n    refs.ring.classList.add('crd__ring--on');\n    if (!wasOn) {\n      void refs.ring.offsetWidth;\n      refs.ring.classList.remove('crd__ring--instant');\n    }\n  }\n\n  // Hover tilt (adapted from Transitions.dev's card tilt): pointer position\n  // over the card drives rotateX/rotateY and the glare spotlight through CSS\n  // custom properties. The handlers stay attached and simply no-op while the\n  // option is off, so tilt can be toggled at any time via update().\n  const TILT_MAX = 12;\n  let tiltHover = false;\n\n  function onTiltMove(event: PointerEvent): void {\n    if (!state.tilt) return;\n    const rect = root.getBoundingClientRect();\n    if (!rect.width || !rect.height) return;\n    const px = Math.min(1, Math.max(0, (event.clientX - rect.left) / rect.width));\n    const py = Math.min(1, Math.max(0, (event.clientY - rect.top) / rect.height));\n    tiltHover = true;\n    root.classList.add('crd--tilt-hover');\n    root.style.setProperty('--crd-tilt-ry', `${((px - 0.5) * TILT_MAX).toFixed(2)}deg`);\n    root.style.setProperty('--crd-tilt-rx', `${((0.5 - py) * TILT_MAX).toFixed(2)}deg`);\n    root.style.setProperty('--crd-tilt-gx', `${(px * 100).toFixed(1)}%`);\n    root.style.setProperty('--crd-tilt-gy', `${(py * 100).toFixed(1)}%`);\n  }\n\n  function onTiltLeave(): void {\n    tiltHover = false;\n    root.classList.remove('crd--tilt-hover');\n    root.style.setProperty('--crd-tilt-rx', '0deg');\n    root.style.setProperty('--crd-tilt-ry', '0deg');\n  }\n\n  root.addEventListener('pointermove', onTiltMove);\n  root.addEventListener('pointerleave', onTiltLeave);\n\n  // Click-to-copy for the revealed display-layout fields. The element carries\n  // its field via data-crd-copy; the raw value is derived from state on demand\n  // so it's always current. A transient data-copied attribute drives the CSS\n  // feedback bubble.\n  const copyTimers = new Map<HTMLElement, ReturnType<typeof setTimeout>>();\n\n  function markCopyable(el: HTMLElement, field: CopyField, on: boolean): void {\n    if (on) {\n      el.dataset.crdCopy = field;\n      el.setAttribute('role', 'button');\n      el.setAttribute('tabindex', '0');\n      el.setAttribute('aria-label', COPY_ARIA[field]);\n      el.dataset.copyLabel = copyLabel;\n      el.dataset.copiedLabel = copiedLabel;\n    } else if (el.dataset.crdCopy) {\n      delete el.dataset.crdCopy;\n      delete el.dataset.copyLabel;\n      delete el.dataset.copiedLabel;\n      delete el.dataset.copied;\n      el.removeAttribute('role');\n      el.removeAttribute('tabindex');\n      el.removeAttribute('aria-label');\n    }\n  }\n\n  function copyRawValue(field: CopyField): string {\n    if (field === 'number') return normalizeDigits(state.number);\n    if (field === 'expiry') return formatExpiry(state.expiry);\n    return formatCvc(state.cvc, brand);\n  }\n\n  function doCopy(el: HTMLElement): void {\n    const field = el.dataset.crdCopy as CopyField | undefined;\n    if (!field) return;\n    const value = copyRawValue(field);\n    if (!value) return;\n    const clipboard = navigator?.clipboard;\n    const done = () => {\n      el.dataset.copied = '';\n      const prev = copyTimers.get(el);\n      if (prev) clearTimeout(prev);\n      copyTimers.set(\n        el,\n        setTimeout(() => {\n          delete el.dataset.copied;\n          copyTimers.delete(el);\n        }, 1200),\n      );\n      onCopy?.(field, value);\n    };\n    if (clipboard?.writeText) {\n      clipboard.writeText(value).then(done, () => {});\n    } else {\n      done();\n    }\n  }\n\n  root.addEventListener('click', (event) => {\n    const el = (event.target as HTMLElement | null)?.closest<HTMLElement>('[data-crd-copy]');\n    if (el && root.contains(el)) doCopy(el);\n  });\n  root.addEventListener('keydown', (event) => {\n    if (event.key !== 'Enter' && event.key !== ' ') return;\n    const el = (event.target as HTMLElement | null)?.closest<HTMLElement>('[data-crd-copy]');\n    if (el && root.contains(el)) {\n      event.preventDefault();\n      doCopy(el);\n    }\n  });\n\n  let brand: Brand | null = null;\n  let renderedLogoBrand: Brand | null | undefined;\n\n  // Flip choreography: crd--flipping is added for the duration of one flip\n  // (either direction) so the CSS can play the lift/sheen/shadow animation,\n  // and removed when it ends. Cards created already flipped don't animate.\n  let flipped = (options.focused ?? null) === 'cvc';\n  let flipping = false;\n  root.addEventListener('animationend', (event) => {\n    if (event.animationName === 'crd-lift' && event.target === root) {\n      flipping = false;\n      root.classList.remove('crd--flipping');\n    }\n  });\n\n  function render(): void {\n    brand = state.brand !== undefined ? state.brand : detectBrand(state.number);\n\n    // In the display layout the CVC lives on the front, so its focus no\n    // longer flips the card.\n    const nowFlipped = state.focused === 'cvc' && state.layout !== 'display';\n    if (nowFlipped !== flipped) {\n      flipped = nowFlipped;\n      if (flipping) {\n        // Restart the animation when the flip reverses mid-air.\n        root.classList.remove('crd--flipping');\n        void root.offsetWidth;\n      }\n      flipping = true;\n    }\n\n    if (!state.tilt && tiltHover) onTiltLeave();\n\n    root.className = [\n      'crd',\n      brand ? `crd--brand-${brand}` : 'crd--unknown',\n      state.variant && state.variant !== 'gradient' ? `crd--v-${state.variant}` : '',\n      state.layout === 'display' ? 'crd--l-display' : '',\n      state.tilt ? 'crd--tilt' : '',\n      tiltHover ? 'crd--tilt-hover' : '',\n      flipped ? 'crd--flipped' : '',\n      flipping ? 'crd--flipping' : '',\n      state.focused ? `crd--focus-${state.focused}` : '',\n      state.classNames?.root ?? '',\n    ]\n      .filter(Boolean)\n      .join(' ');\n\n    // User slot classes: append to each part's base (root handled above; name\n    // handled below with its placeholder modifier).\n    for (const [slot, target] of Object.entries(slotTargets)) {\n      if (target) target.el.className = withSlot(target.base, slot as CardSlot);\n    }\n\n    refs.number.textContent =\n      !state.number && state.last4\n        ? maskLast4(state.last4, brand)\n        : maskCardNumber(state.number, brand);\n\n    const name = state.name.trim();\n    // The display layout presents an existing card: no placeholder invitation\n    // to type — an empty name simply doesn't render.\n    refs.name.textContent = name || (state.layout === 'display' ? '' : namePlaceholder);\n    refs.name.className = withSlot(\n      name ? 'crd__name' : 'crd__name crd__name--placeholder',\n      'name',\n    );\n\n    refs.expiryValue.textContent = formatExpiry(state.expiry);\n    // Masked placeholder while empty ('•••'), consistent with the number and\n    // expiry — also what PCI integrations show, where the CVC never arrives.\n    refs.cvc.textContent = state.cvc ? formatCvc(state.cvc, brand) : maskCvc('', brand);\n\n    // Display-layout meta row: values render verbatim when known, masked when\n    // not — presence of data is what \"revealed\" means.\n    refs.metaExpiry.textContent = formatExpiry(state.expiry);\n    refs.metaCvc.textContent = state.cvc ? formatCvc(state.cvc, brand) : maskCvc('', brand);\n\n    // Mark the revealed fields copyable (display layout only). Masked values\n    // carry no data to copy, so they stay plain.\n    const canCopy = state.layout === 'display' && !!state.copyable;\n    markCopyable(refs.number, 'number', canCopy && !!state.number.trim());\n    markCopyable(refs.metaExpiry, 'expiry', canCopy && !!state.expiry.trim());\n    markCopyable(refs.metaCvc, 'cvc', canCopy && !!state.cvc.trim());\n\n    if (brand !== renderedLogoBrand) {\n      const logo = brand ? logos[brand] : '';\n      refs.logoFront.innerHTML = logo;\n      refs.logoBack.innerHTML = logo;\n      renderedLogoBrand = brand;\n    }\n\n    const brandLabel = brand ? getBrandSpec(brand).displayName : 'Payment';\n    root.setAttribute('aria-label', `${brandLabel} card preview`);\n\n    updateRing();\n  }\n\n  render();\n\n  return {\n    update(data) {\n      Object.assign(state, data);\n      render();\n    },\n    get brand() {\n      return brand;\n    },\n    get element() {\n      return root;\n    },\n    destroy() {\n      if (ringHideTimer) clearTimeout(ringHideTimer);\n      for (const timer of copyTimers.values()) clearTimeout(timer);\n      root.remove();\n    },\n  };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBASO;;;ACmBP,IAAM,QAAQ,CAAC,OAAe,MAAc,UAAuB,CAAC,OAAO,GAAG;AAIvE,IAAM,SAAsB;AAAA,EACjC;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,QAAQ,CAAC,MAAM,GAAG,CAAC;AAAA,IACnB,MAAM,CAAC,GAAG,GAAG,EAAE;AAAA,IACf,SAAS,CAAC,IAAI,IAAI,EAAE;AAAA,IACpB,YAAY;AAAA,I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