@usgb/forms 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2,40 +2,40 @@ import { jsx as s, Fragment as ee, jsxs as h } from "react/jsx-runtime";
2
2
  import { useId as K, useMemo as D, useState as te, useRef as G, useEffect as j, forwardRef as R } from "react";
3
3
  import { validate as ne } from "email-validator";
4
4
  import { useForm as re } from "react-hook-form";
5
- import A from "classnames";
6
- const ie = "1.1.0", oe = { version: "1.0.0", transport: "server-proxy" }, ae = { page_url: { destination: "form_submission_url", category: "page", collection: "server", required: !0, states: ["collected", "unavailable"], description: "Canonical landing-page URL at submission time" }, page_title: { destination: "pageName", category: "page", collection: "server", required: !1, states: ["collected", "unavailable"] }, referrer: { destination: "referrer", category: "page", collection: "browser", required: !1, states: ["collected", "unavailable"] }, first_touch_url: { destination: "crossDomain_landing_url", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_source: { destination: "utm_source", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_medium: { destination: "utm_medium", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_campaign: { destination: "utm_campaign", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_term: { destination: "utm_term", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_content: { destination: "utm_content", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, gclid: { destination: "gclid", category: "click-id", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, msclkid: { destination: "msclkid", category: "click-id", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, gbraid: { destination: "gbraid", category: "click-id", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, wbraid: { destination: "wbraid", category: "click-id", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, hubspot_utk: { destination: "hubspot_utk", category: "identity", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, ga_client_id: { destination: "ga_client_id", category: "analytics", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, ga_session_id: { destination: "session_id_start", category: "analytics", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, snowplow_id: { destination: "snowplow_id", category: "analytics", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, vwo_uuid: { destination: "vwo_uuid", category: "experiment", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, user_agent: { destination: "header_http_client_details", category: "technical", collection: "server", required: !1, states: ["collected", "unavailable"] }, ip_address: { destination: "ipAddress", category: "technical", collection: "server", required: !1, states: ["collected", "unavailable"] } }, se = { appearance: { label: "Appearance", control: "select", reactProp: "appearance", attribute: "appearance", required: !1, default: "on-light", valuesFrom: "supportedAppearances", description: "Recolors the form for a light or dark host surface. It never paints a background, padding, or radius — the host container owns those." }, variant: { label: "Size variant", control: "select", reactProp: "variant", attribute: "variant", required: !1, default: "dense", valuesFrom: "supportedVariants", description: "Select exactly one size treatment: `dense`, `large`, or `sidebar`." }, twoColumn: { label: "Two-column name row", control: "checkbox", reactProp: "twoColumn", attribute: "two-column", required: !1, default: !1, description: "Places grouped name fields in two columns when the form container is wide enough." }, heading: { label: "Heading", control: "text", reactProp: "heading", attribute: "heading", required: !1, description: "Placement copy above the fields. Omit to render no heading." }, subheading: { label: "Subheading", control: "text", reactProp: "subheading", attribute: "subheading", required: !1, description: "Supporting copy under the heading. Omit to render none." }, ctaLabel: { label: "Button label", control: "text", reactProp: "ctaLabel", attribute: "cta", required: !1, defaultFrom: "ctaLabel", description: "Overrides the catalog submit label for this placement." }, legalUrls: { label: "Legal document URLs", control: "url-group", reactProp: "legalUrls", attributes: { clientAgreement: "client-agreement-url", privacyPolicy: "privacy-policy-url", userAgreement: "user-agreement-url", marketLossPolicy: "market-loss-policy-url", electronicDisclaimer: "electronic-disclaimer-url", termsOfSale: "terms-of-sale-url" }, required: !0, valuesFrom: "requiredLegalUrls", description: "Host CMS hrefs for the documents named in this form's consent copy. Every key in `requiredLegalUrls` must be a non-empty URL or the form does not render." }, successMessage: { label: "Thank-you message", control: "text", reactProp: "successMessage", attribute: "success-message", required: !1, description: "Inline copy shown after accept. Ignored when a thank-you URL is set; omitted values fall back to a package default line." }, successUrl: { label: "Thank-you URL", control: "url", reactProp: "successUrl", attribute: "success-url", required: !1, description: "Redirect after accept. A full navigation can cut off analytics beacons — prefer measuring the conversion on the thank-you page." } }, le = { "magento-fik": { definitionVersion: "1", kind: "lead", flow: { type: "single" }, fields: [{ name: "firstname", required: !0, group: "name" }, { name: "lastname", required: !0, group: "name" }, { name: "email", required: !0 }, { name: "phone", required: !1 }], ctaLabel: "GET MY FREE GUIDE", consents: [{ definitionId: "lead-tcpa", definitionVersion: "1", required: !1 }, { definitionId: "lead-sms", definitionVersion: "1", required: !1 }, { definitionId: "lead-tospp", definitionVersion: "1", required: !1 }], editor: { label: "Magento FIK", description: "First name, last name, and email required; phone optional. Optional checkboxes: transactional SMS (lead-tcpa v1), marketing SMS (lead-sms v1), and terms and privacy (lead-tospp v1).", whenToUse: "TBD", whenNotToUse: "TBD", options: ["appearance", "variant", "twoColumn", "heading", "subheading", "ctaLabel", "legalUrls", "successMessage", "successUrl"], supportedAppearances: ["on-light", "on-dark"], supportedVariants: ["dense", "large", "sidebar"], requiredLegalUrls: ["userAgreement", "privacyPolicy"] } }, "magento-ira-kick-article": { definitionVersion: "1", kind: "lead", flow: { type: "single" }, fields: [{ name: "firstname", required: !0, group: "name" }, { name: "lastname", required: !0, group: "name" }, { name: "email", required: !0 }, { name: "phone", required: !0 }], ctaLabel: "GET MY FREE GUIDE", consents: [{ definitionId: "lead-tcpa", definitionVersion: "2", required: !1 }], editor: { label: "Magento IRA Kick Article", description: "First name, last name, email, and phone required. Optional telephone and SMS consent checkbox with linked terms and privacy (lead-tcpa v2).", whenToUse: "TBD", whenNotToUse: "TBD", options: ["appearance", "variant", "twoColumn", "heading", "subheading", "ctaLabel", "legalUrls", "successMessage", "successUrl"], supportedAppearances: ["on-light", "on-dark"], supportedVariants: ["dense", "large", "sidebar"], requiredLegalUrls: ["userAgreement", "privacyPolicy"] } }, "magento-fik-blog-rail": { definitionVersion: "1", kind: "lead", flow: { type: "single" }, fields: [{ name: "firstname", required: !0, group: "name" }, { name: "lastname", required: !0, group: "name" }, { name: "email", required: !0 }, { name: "phone", required: !0 }], ctaLabel: "GET MY FREE GUIDE", consents: [{ definitionId: "lead-tcpa", definitionVersion: "2", required: !1 }], editor: { label: "Magento FIK Blog Rail", description: "First name, last name, email, and phone required. Optional telephone and SMS consent checkbox with linked terms and privacy (lead-tcpa v2).", whenToUse: "TBD", whenNotToUse: "TBD", options: ["appearance", "variant", "twoColumn", "heading", "subheading", "ctaLabel", "legalUrls", "successMessage", "successUrl"], supportedAppearances: ["on-light", "on-dark"], supportedVariants: ["dense", "large", "sidebar"], requiredLegalUrls: ["userAgreement", "privacyPolicy"] } }, "main-investors-kit-notice": { definitionVersion: "1", kind: "lead", flow: { type: "single" }, fields: [{ name: "firstname", required: !0, group: "name" }, { name: "lastname", required: !0, group: "name" }, { name: "email", required: !0 }, { name: "phone", required: !1 }], ctaLabel: "CLAIM YOUR OFFER", consents: [{ definitionId: "lead-clickwrap", definitionVersion: "2" }], editor: { label: "Main Investors Kit (clickwrap)", description: "First name, last name, and email required; phone optional. Clickwrap notice only (lead-clickwrap v2); no consent checkboxes.", whenToUse: "TBD", whenNotToUse: "TBD", options: ["appearance", "variant", "twoColumn", "heading", "subheading", "ctaLabel", "legalUrls", "successMessage", "successUrl"], supportedAppearances: ["on-light", "on-dark"], supportedVariants: ["dense", "large", "sidebar"], requiredLegalUrls: ["privacyPolicy", "userAgreement"] } }, newsletter: { definitionVersion: "1", kind: "newsletter", flow: { type: "single" }, fields: [{ name: "email", required: !0 }], ctaLabel: "SUBSCRIBE", editor: { label: "Newsletter", description: "Email only. No consent.", whenToUse: "TBD", whenNotToUse: "TBD", options: ["appearance", "heading", "subheading", "ctaLabel", "successMessage", "successUrl"], supportedAppearances: ["on-light", "on-dark"], supportedVariants: [], requiredLegalUrls: [] } } }, ce = { hosts: ["pwa", "wordpress"], mayProvide: ["legal document URLs", "host/store identity"], mustNotDefine: ["consent definitions", "form fields", "submission endpoints"] }, de = {
5
+ import T from "classnames";
6
+ const ie = "1.1.0", ae = { version: "1.0.0", transport: "server-proxy" }, oe = { page_url: { destination: "form_submission_url", category: "page", collection: "server", required: !0, states: ["collected", "unavailable"], description: "Canonical landing-page URL at submission time" }, page_title: { destination: "pageName", category: "page", collection: "server", required: !1, states: ["collected", "unavailable"] }, referrer: { destination: "referrer", category: "page", collection: "browser", required: !1, states: ["collected", "unavailable"] }, first_touch_url: { destination: "crossDomain_landing_url", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_source: { destination: "utm_source", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_medium: { destination: "utm_medium", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_campaign: { destination: "utm_campaign", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_term: { destination: "utm_term", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, utm_content: { destination: "utm_content", category: "attribution", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, gclid: { destination: "gclid", category: "click-id", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, msclkid: { destination: "msclkid", category: "click-id", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, gbraid: { destination: "gbraid", category: "click-id", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, wbraid: { destination: "wbraid", category: "click-id", collection: "host-adapter", required: !1, states: ["collected", "unavailable"] }, hubspot_utk: { destination: "hubspot_utk", category: "identity", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, ga_client_id: { destination: "ga_client_id", category: "analytics", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, ga_session_id: { destination: "session_id_start", category: "analytics", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, snowplow_id: { destination: "snowplow_id", category: "analytics", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, vwo_uuid: { destination: "vwo_uuid", category: "experiment", collection: "host-adapter", required: !1, states: ["collected", "unavailable", "consent-withheld"] }, user_agent: { destination: "header_http_client_details", category: "technical", collection: "server", required: !1, states: ["collected", "unavailable"] }, ip_address: { destination: "ipAddress", category: "technical", collection: "server", required: !1, states: ["collected", "unavailable"] } }, se = { appearance: { label: "Appearance", control: "select", reactProp: "appearance", attribute: "appearance", required: !1, default: "on-light", valuesFrom: "supportedAppearances", description: "Recolors the form for a light or dark host surface. It never paints a background, padding, or radius — the host container owns those." }, variant: { label: "Size variant", control: "select", reactProp: "variant", attribute: "variant", required: !1, default: "dense", valuesFrom: "supportedVariants", description: "Select exactly one size treatment: `dense`, `large`, or `sidebar`." }, twoColumn: { label: "Two-column name row", control: "checkbox", reactProp: "twoColumn", attribute: "two-column", required: !1, default: !1, description: "Places grouped name fields in two columns when the form container is wide enough." }, heading: { label: "Heading", control: "text", reactProp: "heading", attribute: "heading", required: !1, description: "Placement copy above the fields. Omit to render no heading." }, subheading: { label: "Subheading", control: "text", reactProp: "subheading", attribute: "subheading", required: !1, description: "Supporting copy under the heading. Omit to render none." }, ctaLabel: { label: "Button label", control: "text", reactProp: "ctaLabel", attribute: "cta", required: !1, defaultFrom: "ctaLabel", description: "Overrides the catalog submit label for this placement." }, legalUrls: { label: "Legal document URLs", control: "url-group", reactProp: "legalUrls", attributes: { clientAgreement: "client-agreement-url", privacyPolicy: "privacy-policy-url", userAgreement: "user-agreement-url", marketLossPolicy: "market-loss-policy-url", electronicDisclaimer: "electronic-disclaimer-url", termsOfSale: "terms-of-sale-url" }, required: !0, valuesFrom: "requiredLegalUrls", description: "Host CMS hrefs for the documents named in this form's consent copy. Every key in `requiredLegalUrls` must be a non-empty URL or the form does not render." }, successMessage: { label: "Thank-you message", control: "text", reactProp: "successMessage", attribute: "success-message", required: !1, description: "Inline copy shown after accept. Ignored when a thank-you URL is set; omitted values fall back to a package default line." }, successUrl: { label: "Thank-you URL", control: "url", reactProp: "successUrl", attribute: "success-url", required: !1, description: "Redirect after accept. A full navigation can cut off analytics beacons — prefer measuring the conversion on the thank-you page." } }, le = { "magento-fik": { definitionVersion: "1", kind: "lead", flow: { type: "single" }, fields: [{ name: "firstname", required: !0, group: "name" }, { name: "lastname", required: !0, group: "name" }, { name: "email", required: !0 }, { name: "phone", required: !1 }], ctaLabel: "GET MY FREE GUIDE", consents: [{ definitionId: "lead-tcpa", definitionVersion: "1", required: !1 }, { definitionId: "lead-sms", definitionVersion: "1", required: !1 }, { definitionId: "lead-tospp", definitionVersion: "1", required: !1 }], editor: { label: "Magento FIK", description: "First name, last name, and email required; phone optional. Optional checkboxes: transactional SMS (lead-tcpa v1), marketing SMS (lead-sms v1), and terms and privacy (lead-tospp v1).", whenToUse: "TBD", whenNotToUse: "TBD", options: ["appearance", "variant", "twoColumn", "heading", "subheading", "ctaLabel", "legalUrls", "successMessage", "successUrl"], supportedAppearances: ["on-light", "on-dark"], supportedVariants: ["dense", "large", "sidebar"], requiredLegalUrls: ["userAgreement", "privacyPolicy"] } }, "magento-ira-kick-article": { definitionVersion: "1", kind: "lead", flow: { type: "single" }, fields: [{ name: "firstname", required: !0, group: "name" }, { name: "lastname", required: !0, group: "name" }, { name: "email", required: !0 }, { name: "phone", required: !0 }], ctaLabel: "GET MY FREE GUIDE", consents: [{ definitionId: "lead-tcpa", definitionVersion: "2", required: !1 }], editor: { label: "Magento IRA Kick Article", description: "First name, last name, email, and phone required. Optional telephone and SMS consent checkbox with linked terms and privacy (lead-tcpa v2).", whenToUse: "TBD", whenNotToUse: "TBD", options: ["appearance", "variant", "twoColumn", "heading", "subheading", "ctaLabel", "legalUrls", "successMessage", "successUrl"], supportedAppearances: ["on-light", "on-dark"], supportedVariants: ["dense", "large", "sidebar"], requiredLegalUrls: ["userAgreement", "privacyPolicy"] } }, "magento-fik-blog-rail": { definitionVersion: "1", kind: "lead", flow: { type: "single" }, fields: [{ name: "firstname", required: !0, group: "name" }, { name: "lastname", required: !0, group: "name" }, { name: "email", required: !0 }, { name: "phone", required: !0 }], ctaLabel: "GET MY FREE GUIDE", consents: [{ definitionId: "lead-tcpa", definitionVersion: "3", required: !0 }], editor: { label: "Magento FIK Blog Rail", description: "First name, last name, email, and phone required. Required automated text-message consent checkbox with linked terms of service and privacy policy (lead-tcpa v3).", whenToUse: "TBD", whenNotToUse: "TBD", options: ["appearance", "variant", "twoColumn", "heading", "subheading", "ctaLabel", "legalUrls", "successMessage", "successUrl"], supportedAppearances: ["on-light", "on-dark"], supportedVariants: ["dense", "large", "sidebar"], requiredLegalUrls: ["userAgreement", "privacyPolicy"] } }, "main-investors-kit-notice": { definitionVersion: "1", kind: "lead", flow: { type: "single" }, fields: [{ name: "firstname", required: !0, group: "name" }, { name: "lastname", required: !0, group: "name" }, { name: "email", required: !0 }, { name: "phone", required: !1 }], ctaLabel: "CLAIM YOUR OFFER", consents: [{ definitionId: "lead-clickwrap", definitionVersion: "2" }], editor: { label: "Main Investors Kit (clickwrap)", description: "First name, last name, and email required; phone optional. Clickwrap notice only (lead-clickwrap v2); no consent checkboxes.", whenToUse: "TBD", whenNotToUse: "TBD", options: ["appearance", "variant", "twoColumn", "heading", "subheading", "ctaLabel", "legalUrls", "successMessage", "successUrl"], supportedAppearances: ["on-light", "on-dark"], supportedVariants: ["dense", "large", "sidebar"], requiredLegalUrls: ["privacyPolicy", "userAgreement"] } }, newsletter: { definitionVersion: "1", kind: "newsletter", flow: { type: "single" }, fields: [{ name: "email", required: !0 }], ctaLabel: "SUBSCRIBE", editor: { label: "Newsletter", description: "Email only. No consent.", whenToUse: "TBD", whenNotToUse: "TBD", options: ["appearance", "heading", "subheading", "ctaLabel", "successMessage", "successUrl"], supportedAppearances: ["on-light", "on-dark"], supportedVariants: [], requiredLegalUrls: [] } } }, ce = { hosts: ["pwa", "wordpress"], mayProvide: ["legal document URLs", "host/store identity"], mustNotDefine: ["consent definitions", "form fields", "submission endpoints"] }, de = {
7
7
  schemaVersion: ie,
8
8
  package: { name: "@usgb/forms", compatiblePackageVersions: "^1.0.2" },
9
- submissionContract: oe,
10
- trackingRegistry: ae,
9
+ submissionContract: ae,
10
+ trackingRegistry: oe,
11
11
  editorOptions: se,
12
12
  forms: le,
13
13
  hostAdapterContract: ce
14
- }, N = de;
14
+ }, x = de;
15
15
  function z(t) {
16
- return N.forms[t];
16
+ return x.forms[t];
17
17
  }
18
- function je() {
19
- return Object.entries(N.forms).map(([t, e]) => ({
18
+ function ze() {
19
+ return Object.entries(x.forms).map(([t, e]) => ({
20
20
  formId: t,
21
21
  definition: e
22
22
  }));
23
23
  }
24
- function ze(t) {
24
+ function We(t) {
25
25
  const e = z(t);
26
26
  if (!e)
27
27
  return [];
28
28
  const n = [];
29
29
  for (const i of e.editor.options) {
30
- const o = N.editorOptions[i];
31
- if (!o)
30
+ const a = x.editorOptions[i];
31
+ if (!a)
32
32
  continue;
33
- const r = o.valuesFrom ? [...e.editor[o.valuesFrom]] : void 0;
33
+ const r = a.valuesFrom ? [...e.editor[a.valuesFrom]] : void 0;
34
34
  r && !r.length || n.push({
35
- ...o,
35
+ ...a,
36
36
  key: i,
37
37
  values: r,
38
- defaultValue: o.defaultFrom ? e[o.defaultFrom] : o.default
38
+ defaultValue: a.defaultFrom ? e[a.defaultFrom] : a.default
39
39
  });
40
40
  }
41
41
  return n;
@@ -43,10 +43,10 @@ function ze(t) {
43
43
  function W(t, e) {
44
44
  return typeof t == "string" ? { content: t, language: t } : t(e);
45
45
  }
46
- function Y(t, e) {
46
+ function H(t, e) {
47
47
  return `${t}@${e}`;
48
48
  }
49
- function x(t) {
49
+ function E(t) {
50
50
  return (e) => ({
51
51
  language: t.map(
52
52
  (n) => typeof n == "string" ? n : `${n.label} (${e[n.href] ?? ""})`
@@ -88,7 +88,7 @@ const ue = {
88
88
  grantDateField: "tcpa_form_opt_in_date",
89
89
  requiredLegalUrls: ["userAgreement", "privacyPolicy"],
90
90
  languageKey: "tcpa_consent_language",
91
- copy: x([
91
+ copy: E([
92
92
  "By checking the box you authorize United States Gold Bureau to provide you with telephone calls or SMS messages at the phone number provided, including the use of automatic telephone dialing systems, and you agree to our ",
93
93
  { href: "userAgreement", label: "terms and conditions" },
94
94
  " and ",
@@ -96,6 +96,21 @@ const ue = {
96
96
  ". Calls are recorded and may be monitored."
97
97
  ])
98
98
  }, pe = {
99
+ definitionId: "lead-tcpa",
100
+ definitionVersion: "3",
101
+ type: "checkbox",
102
+ name: "tcpa_form_consent_granted",
103
+ grantDateField: "tcpa_form_opt_in_date",
104
+ requiredLegalUrls: ["userAgreement", "privacyPolicy"],
105
+ languageKey: "tcpa_consent_language",
106
+ copy: E([
107
+ "I agree to receive automated text messages from the US Gold Bureau at the phone number provided. Msg & data rates may apply. Msg frequency varies. Reply HELP for help and STOP to cancel. View our ",
108
+ { href: "userAgreement", label: "Terms of Service" },
109
+ " and ",
110
+ { href: "privacyPolicy", label: "Privacy Policy" },
111
+ "."
112
+ ])
113
+ }, fe = {
99
114
  definitionId: "lead-sms",
100
115
  definitionVersion: "1",
101
116
  type: "checkbox",
@@ -103,21 +118,21 @@ const ue = {
103
118
  requiredLegalUrls: [],
104
119
  languageKey: "sms_consent_language",
105
120
  copy: "By checking, you are allowing to receive promotional/marketing SMS communications from U.S. Gold Bureau. Frequency may vary. Data rates may apply. Reply HELP for help or STOP to opt-out."
106
- }, fe = {
121
+ }, ge = {
107
122
  definitionId: "lead-tospp",
108
123
  definitionVersion: "1",
109
124
  type: "checkbox",
110
125
  name: "tospp_form_consent_granted",
111
126
  requiredLegalUrls: ["userAgreement", "privacyPolicy"],
112
127
  languageKey: "tospp_consent_language",
113
- copy: x([
128
+ copy: E([
114
129
  "By checking, I accept ",
115
130
  { href: "userAgreement", label: "Terms of Conditions" },
116
131
  " & ",
117
132
  { href: "privacyPolicy", label: "Privacy Policy" },
118
133
  "."
119
134
  ])
120
- }, ge = {
135
+ }, he = {
121
136
  definitionId: "lead-clickwrap",
122
137
  definitionVersion: "1",
123
138
  type: "notice",
@@ -129,7 +144,7 @@ const ue = {
129
144
  "termsOfSale"
130
145
  ],
131
146
  languageKey: "clickwrap_consent_language",
132
- copy: x([
147
+ copy: E([
133
148
  "By clicking the button, I agree to be bound by your ",
134
149
  { href: "privacyPolicy", label: "Privacy Policy" },
135
150
  ", ",
@@ -142,13 +157,13 @@ const ue = {
142
157
  { href: "termsOfSale", label: "Terms & Conditions of Sale" },
143
158
  "."
144
159
  ])
145
- }, he = {
160
+ }, be = {
146
161
  definitionId: "lead-clickwrap",
147
162
  definitionVersion: "2",
148
163
  type: "notice",
149
164
  requiredLegalUrls: ["privacyPolicy", "userAgreement"],
150
165
  languageKey: "clickwrap_consent_language",
151
- copy: x([
166
+ copy: E([
152
167
  "By submitting, you agree to United States Gold Bureau’s ",
153
168
  { href: "privacyPolicy", label: "Privacy Policy" },
154
169
  " and ",
@@ -156,31 +171,32 @@ const ue = {
156
171
  ", including dispute resolution, and consent to receive texts and calls for informational, marketing and sales purposes, even if your number is on a do not call list, using automated dialing, voice or AI tech. Consent not required for purchase. Msg & data rates may apply. Calls may be recorded and monitored. Opt out anytime."
157
172
  ])
158
173
  };
159
- function be(...t) {
174
+ function ye(...t) {
160
175
  return Object.fromEntries(
161
176
  t.map((e) => [
162
- Y(e.definitionId, e.definitionVersion),
177
+ H(e.definitionId, e.definitionVersion),
163
178
  e
164
179
  ])
165
180
  );
166
181
  }
167
- const ye = be(
182
+ const ve = ye(
168
183
  ue,
169
184
  me,
170
185
  pe,
171
186
  fe,
172
187
  ge,
173
- he
188
+ he,
189
+ be
174
190
  );
175
- function ve(t, e) {
176
- return ye[Y(t, e)];
191
+ function ke(t, e) {
192
+ return ve[H(t, e)];
177
193
  }
178
- function H(t) {
194
+ function Y(t) {
179
195
  if (!(t != null && t.length))
180
196
  return [];
181
197
  const e = [];
182
198
  for (const n of t) {
183
- const i = ve(
199
+ const i = ke(
184
200
  n.definitionId,
185
201
  n.definitionVersion
186
202
  );
@@ -192,20 +208,20 @@ function H(t) {
192
208
  }
193
209
  return e;
194
210
  }
195
- function ke(t, e, n, i) {
211
+ function we(t, e, n, i) {
196
212
  if (!t.length)
197
213
  return;
198
- const o = {};
214
+ const a = {};
199
215
  for (const r of t) {
200
216
  const { language: l } = W(r.copy, n);
201
- if (o[r.languageKey] = l, r.type === "checkbox") {
202
- const a = !!e[r.name];
203
- o[r.name] = a, a && r.grantDateField && (o[r.grantDateField] = i);
217
+ if (a[r.languageKey] = l, r.type === "checkbox") {
218
+ const o = !!e[r.name];
219
+ a[r.name] = o, o && r.grantDateField && (a[r.grantDateField] = i);
204
220
  }
205
221
  }
206
- return o;
222
+ return a;
207
223
  }
208
- function we(t) {
224
+ function _e(t) {
209
225
  const e = /* @__PURE__ */ new Set();
210
226
  for (const n of t)
211
227
  for (const i of n.requiredLegalUrls)
@@ -218,12 +234,12 @@ function qe(t) {
218
234
  function $(t) {
219
235
  return (e, n) => n ? e.trim().length > 0 || `${t} is required` : !0;
220
236
  }
221
- const _e = /^[2-9]\d{2}[2-9]\d{6}$/;
237
+ const Le = /^[2-9]\d{2}[2-9]\d{6}$/;
222
238
  function Z(t) {
223
239
  let e = t.replace(/\D/g, "");
224
- return e.length === 11 && e.startsWith("1") && (e = e.slice(1)), e.length !== 10 || !_e.test(e) ? null : e;
240
+ return e.length === 11 && e.startsWith("1") && (e = e.slice(1)), e.length !== 10 || !Le.test(e) ? null : e;
225
241
  }
226
- function Le(t) {
242
+ function Se(t) {
227
243
  const e = t.trim();
228
244
  if (!e) return "";
229
245
  const n = Z(e);
@@ -231,7 +247,7 @@ function Le(t) {
231
247
  const i = e.replace(/\D/g, "");
232
248
  return i.length === 11 && i.startsWith("1") ? `1${n}` : n;
233
249
  }
234
- const Se = {
250
+ const Ce = {
235
251
  firstname: {
236
252
  name: "firstname",
237
253
  control: "text",
@@ -249,34 +265,34 @@ const Se = {
249
265
  email: {
250
266
  name: "email",
251
267
  control: "email",
252
- label: "Email",
268
+ label: "Email address",
253
269
  autoComplete: "email",
254
270
  validate: (t, e) => {
255
271
  const n = t.trim();
256
- return n ? ne(n) || "Enter a valid email" : e ? "Email is required" : !0;
272
+ return n ? ne(n) || "Enter a valid email address" : e ? "Email address is required" : !0;
257
273
  }
258
274
  },
259
275
  phone: {
260
276
  name: "phone",
261
277
  control: "tel",
262
- label: "Phone",
278
+ label: "Phone number",
263
279
  autoComplete: "tel",
264
280
  validate: (t, e) => {
265
281
  const n = t.trim();
266
- return n ? Z(n) ? !0 : "Enter a valid phone number" : e ? "Phone is required" : !0;
282
+ return n ? Z(n) ? !0 : "Enter a valid phone number" : e ? "Phone number is required" : !0;
267
283
  },
268
- serialize: Le
284
+ serialize: Se
269
285
  }
270
286
  };
271
287
  function B(t) {
272
- return Se[t];
288
+ return Ce[t];
273
289
  }
274
290
  function J({
275
291
  className: t,
276
292
  appearance: e,
277
293
  variantValue: n,
278
294
  twoColumn: i,
279
- kind: o,
295
+ kind: a,
280
296
  children: r
281
297
  }) {
282
298
  return /* @__PURE__ */ s(
@@ -286,15 +302,15 @@ function J({
286
302
  "data-appearance": e,
287
303
  ...n ? { "data-variant": n } : {},
288
304
  ...i ? { "data-layout": "two-column" } : {},
289
- "data-kind": o,
305
+ "data-kind": a,
290
306
  children: r
291
307
  }
292
308
  );
293
309
  }
294
- function Ce() {
310
+ function Ue() {
295
311
  return typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : `usgb-${Date.now()}-${Math.random().toString(36).slice(2, 10)}`;
296
312
  }
297
- function Ue(t, e) {
313
+ function Pe(t, e) {
298
314
  const n = {};
299
315
  for (const i of t)
300
316
  n[i.name] = "";
@@ -306,24 +322,24 @@ function M(t) {
306
322
  const e = t == null ? void 0 : t.trim();
307
323
  return e || void 0;
308
324
  }
309
- function Pe({
325
+ function De({
310
326
  formId: t,
311
327
  definition: e,
312
328
  legalUrls: n,
313
329
  successUrl: i,
314
- adapter: o,
330
+ adapter: a,
315
331
  analytics: r,
316
332
  onAccepted: l,
317
- onFailed: a
333
+ onFailed: o
318
334
  }) {
319
335
  const d = K(), u = D(
320
- () => H(e.consents) ?? [],
336
+ () => Y(e.consents) ?? [],
321
337
  [e.consents]
322
338
  ), f = D(
323
339
  () => u.filter(qe).map((p) => p.name),
324
340
  [u]
325
341
  ), b = D(
326
- () => Ue(e.fields, f),
342
+ () => Pe(e.fields, f),
327
343
  [e.fields, f]
328
344
  ), {
329
345
  register: g,
@@ -331,7 +347,7 @@ function Pe({
331
347
  formState: { errors: w }
332
348
  } = re({
333
349
  defaultValues: b
334
- }), [m, _] = te({ kind: "idle" }), y = G(!1);
350
+ }), [m, q] = te({ kind: "idle" }), y = G(!1);
335
351
  j(() => {
336
352
  r == null || r({ type: "view", formId: t });
337
353
  }, [r, t]);
@@ -351,49 +367,49 @@ function Pe({
351
367
  async (p) => {
352
368
  if (y.current)
353
369
  return;
354
- y.current = !0, _({ kind: "submitting" }), r == null || r({ type: "submit_attempt", formId: t });
355
- const q = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), P = {};
370
+ y.current = !0, q({ kind: "submitting" }), r == null || r({ type: "submit_attempt", formId: t });
371
+ const _ = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), P = {};
356
372
  for (const L of e.fields) {
357
373
  const S = p[L.name];
358
374
  if (typeof S != "string") {
359
375
  P[L.name] = !!S;
360
376
  continue;
361
377
  }
362
- const F = B(L.name);
363
- P[L.name] = F != null && F.serialize ? F.serialize(S) : S.trim();
378
+ const N = B(L.name);
379
+ P[L.name] = N != null && N.serialize ? N.serialize(S) : S.trim();
364
380
  }
365
- const E = ke(
381
+ const I = we(
366
382
  u,
367
383
  p,
368
384
  n ?? {},
369
- q
370
- ), I = {
385
+ _
386
+ ), F = {
371
387
  formId: t,
372
388
  definitionVersion: e.definitionVersion,
373
- submissionContractVersion: N.submissionContract.version,
374
- idempotencyKey: Ce(),
389
+ submissionContractVersion: x.submissionContract.version,
390
+ idempotencyKey: Ue(),
375
391
  data: P,
376
- consents: E
392
+ consents: I
377
393
  };
378
394
  try {
379
- const L = await o.submit(I);
395
+ const L = await a.submit(F);
380
396
  if (L.status === "accepted") {
381
- r == null || r({ type: "success", formId: t, status: "accepted" }), l == null || l(I), _({ kind: "accepted" });
397
+ r == null || r({ type: "success", formId: t, status: "accepted" }), l == null || l(F), q({ kind: "accepted" });
382
398
  const S = M(i);
383
399
  S && typeof window < "u" && window.location.assign(S);
384
400
  } else
385
- y.current = !1, _({
401
+ y.current = !1, q({
386
402
  kind: "failed",
387
403
  message: L.message ?? "Submission failed"
388
404
  }), r == null || r({
389
405
  type: "failure",
390
406
  formId: t,
391
407
  message: L.message
392
- }), a == null || a(I, L.message);
408
+ }), o == null || o(F, L.message);
393
409
  } catch (L) {
394
410
  y.current = !1;
395
411
  const S = L instanceof Error ? L.message : "Submission failed";
396
- _({ kind: "failed", message: S }), r == null || r({ type: "failure", formId: t, message: S }), a == null || a(I, S);
412
+ q({ kind: "failed", message: S }), r == null || r({ type: "failure", formId: t, message: S }), o == null || o(F, S);
397
413
  }
398
414
  },
399
415
  (p) => {
@@ -414,7 +430,7 @@ function Pe({
414
430
  onSubmit: U
415
431
  };
416
432
  }
417
- function De() {
433
+ function Ae() {
418
434
  return /* @__PURE__ */ h(
419
435
  "svg",
420
436
  {
@@ -482,38 +498,38 @@ function O({
482
498
  {
483
499
  id: t,
484
500
  role: "alert",
485
- className: A("usgb-field-error", n),
501
+ className: T("usgb-field-error", n),
486
502
  children: [
487
- /* @__PURE__ */ s(De, {}),
503
+ /* @__PURE__ */ s(Ae, {}),
488
504
  e
489
505
  ]
490
506
  }
491
507
  ) : null;
492
508
  }
493
- const Ae = R(
494
- function({ id: e, label: n, errorMessage: i, required: o, className: r, ...l }, a) {
509
+ const Ee = R(
510
+ function({ id: e, label: n, errorMessage: i, required: a, className: r, ...l }, o) {
495
511
  const d = i ? `${e}-error` : void 0;
496
- return /* @__PURE__ */ h("div", { className: "usgb-form-group", children: [
512
+ return /* @__PURE__ */ h("div", { className: "usgb-form-group usgb-consent", children: [
497
513
  /* @__PURE__ */ h("div", { className: "usgb-consent-row", children: [
498
514
  /* @__PURE__ */ h("span", { className: "usgb-form-checkbox-wrap", children: [
499
515
  /* @__PURE__ */ s(
500
516
  "input",
501
517
  {
502
518
  ...l,
503
- ref: a,
519
+ ref: o,
504
520
  id: e,
505
521
  type: "checkbox",
506
- className: A("usgb-form-checkbox", r),
522
+ className: T("usgb-form-checkbox", r),
507
523
  "aria-invalid": i ? !0 : void 0,
508
524
  "aria-describedby": d,
509
- "aria-required": o || void 0
525
+ "aria-required": a || void 0
510
526
  }
511
527
  ),
512
528
  /* @__PURE__ */ s(Te, {})
513
529
  ] }),
514
530
  /* @__PURE__ */ h("label", { htmlFor: e, className: "usgb-consent-copy", children: [
515
531
  n,
516
- o ? /* @__PURE__ */ s(
532
+ a ? /* @__PURE__ */ s(
517
533
  "span",
518
534
  {
519
535
  className: "usgb-field-label-asterisk",
@@ -531,19 +547,19 @@ const Ae = R(
531
547
  className: e,
532
548
  variant: n = "primary",
533
549
  loading: i = !1,
534
- disabled: o = !1,
550
+ disabled: a = !1,
535
551
  children: r,
536
552
  onClick: l,
537
- type: a = "button",
553
+ type: o = "button",
538
554
  ...d
539
555
  }, u) {
540
- const f = o || i, b = o && !i ? !0 : void 0;
556
+ const f = a || i, b = a && !i ? !0 : void 0;
541
557
  return /* @__PURE__ */ s(
542
558
  "button",
543
559
  {
544
560
  ref: u,
545
- type: a,
546
- className: A(
561
+ type: o,
562
+ className: T(
547
563
  "usgb-btn",
548
564
  n === "primary" && "usgb-btn-primary",
549
565
  e
@@ -564,54 +580,54 @@ const Ae = R(
564
580
  );
565
581
  }
566
582
  );
567
- function Ee(t) {
583
+ function Ie(t) {
568
584
  const e = [];
569
585
  let n = 0;
570
586
  for (; n < t.length; ) {
571
587
  const i = t[n];
572
588
  if (i.group) {
573
- const o = i.group, r = [];
574
- for (; n < t.length && t[n].group === o; )
589
+ const a = i.group, r = [];
590
+ for (; n < t.length && t[n].group === a; )
575
591
  r.push(t[n]), n += 1;
576
- e.push({ type: "group", group: o, fields: r });
592
+ e.push({ type: "group", group: a, fields: r });
577
593
  continue;
578
594
  }
579
595
  e.push({ type: "field", field: i }), n += 1;
580
596
  }
581
597
  return e;
582
598
  }
583
- function Ie({
599
+ function Fe({
584
600
  htmlFor: t,
585
601
  children: e,
586
602
  className: n,
587
603
  required: i
588
604
  }) {
589
- return /* @__PURE__ */ h("label", { htmlFor: t, className: A("usgb-field-label", n), children: [
605
+ return /* @__PURE__ */ h("label", { htmlFor: t, className: T("usgb-field-label", n), children: [
590
606
  e,
591
607
  i ? /* @__PURE__ */ s("span", { className: "usgb-field-label-asterisk", "aria-hidden": "true", children: "*" }) : null
592
608
  ] });
593
609
  }
594
- function Fe(t) {
610
+ function Ne(t) {
595
611
  return t.replace(/\b\w/g, (e) => e.toUpperCase());
596
612
  }
597
- const Ne = R(
613
+ const xe = R(
598
614
  function({
599
615
  id: e,
600
616
  label: n,
601
617
  type: i = "text",
602
- errorMessage: o,
618
+ errorMessage: a,
603
619
  required: r,
604
620
  hideLabel: l = !1,
605
- placeholderCase: a = "upper",
621
+ placeholderCase: o = "upper",
606
622
  showError: d = !0,
607
623
  className: u,
608
624
  placeholder: f,
609
625
  ...b
610
626
  }, g) {
611
- const C = o ? `${e}-error` : void 0, w = l ? `${n}${r ? "*" : ""}` : f, m = l && w ? a === "title" ? Fe(w) : w.toUpperCase() : w;
627
+ const C = a ? `${e}-error` : void 0, w = l ? `${n}${r ? "*" : ""}` : f, m = l && w ? o === "title" ? Ne(w) : w.toUpperCase() : w;
612
628
  return /* @__PURE__ */ h("div", { className: "usgb-form-group", children: [
613
629
  /* @__PURE__ */ s(
614
- Ie,
630
+ Fe,
615
631
  {
616
632
  htmlFor: e,
617
633
  required: r,
@@ -625,19 +641,19 @@ const Ne = R(
625
641
  ref: g,
626
642
  id: e,
627
643
  type: i,
628
- className: A(
644
+ className: T(
629
645
  "usgb-field-control",
630
- o && "usgb-field-invalid",
646
+ a && "usgb-field-invalid",
631
647
  u
632
648
  ),
633
649
  placeholder: m,
634
- "aria-invalid": o ? !0 : void 0,
650
+ "aria-invalid": a ? !0 : void 0,
635
651
  "aria-describedby": C,
636
652
  "aria-required": r || void 0,
637
653
  ...b
638
654
  }
639
655
  ),
640
- d ? /* @__PURE__ */ s(O, { id: C, message: o }) : null
656
+ d ? /* @__PURE__ */ s(O, { id: C, message: a }) : null
641
657
  ] });
642
658
  }
643
659
  );
@@ -646,27 +662,27 @@ function V({
646
662
  fieldIds: e,
647
663
  register: n,
648
664
  errors: i,
649
- hideLabel: o,
665
+ hideLabel: a,
650
666
  placeholderCase: r,
651
667
  showError: l = !0
652
668
  }) {
653
- const a = B(t.name);
654
- if (!a) return null;
669
+ const o = B(t.name);
670
+ if (!o) return null;
655
671
  const d = i[t.name], u = typeof (d == null ? void 0 : d.message) == "string" ? d.message : void 0;
656
672
  return /* @__PURE__ */ s(
657
- Ne,
673
+ xe,
658
674
  {
659
675
  id: e[t.name],
660
- label: a.label,
661
- type: a.control,
676
+ label: o.label,
677
+ type: o.control,
662
678
  required: t.required,
663
- hideLabel: o,
679
+ hideLabel: a,
664
680
  placeholderCase: r,
665
681
  showError: l,
666
- autoComplete: a.autoComplete,
682
+ autoComplete: o.autoComplete,
667
683
  errorMessage: u,
668
684
  ...n(t.name, {
669
- validate: (f) => a.validate(
685
+ validate: (f) => o.validate(
670
686
  typeof f == "string" ? f : "",
671
687
  t.required
672
688
  )
@@ -674,26 +690,26 @@ function V({
674
690
  }
675
691
  );
676
692
  }
677
- function xe({
693
+ function Me({
678
694
  definition: t,
679
695
  variant: e,
680
696
  ctaLabel: n,
681
697
  legalUrls: i,
682
- session: o,
698
+ session: a,
683
699
  headingId: r
684
700
  }) {
685
701
  const {
686
702
  register: l,
687
- errors: a,
703
+ errors: o,
688
704
  fieldIds: d,
689
705
  noticeIds: u,
690
706
  consentDefs: f,
691
707
  uiState: b,
692
708
  onSubmit: g
693
- } = o, C = D(
694
- () => Ee(t.fields),
709
+ } = a, C = D(
710
+ () => Ie(t.fields),
695
711
  [t.fields]
696
- ), w = e === "sidebar", m = e === "dense" || w, _ = w ? "title" : "upper", y = Object.values(u).join(" ");
712
+ ), w = e === "sidebar", m = e === "dense" || w, q = w ? "title" : "upper", y = Object.values(u).join(" ");
697
713
  return /* @__PURE__ */ h(
698
714
  "form",
699
715
  {
@@ -711,9 +727,9 @@ function xe({
711
727
  fieldRef: v,
712
728
  fieldIds: d,
713
729
  register: l,
714
- errors: a,
730
+ errors: o,
715
731
  hideLabel: m,
716
- placeholderCase: _
732
+ placeholderCase: q
717
733
  },
718
734
  v.name
719
735
  ))
@@ -725,9 +741,9 @@ function xe({
725
741
  fieldRef: c.field,
726
742
  fieldIds: d,
727
743
  register: l,
728
- errors: a,
744
+ errors: o,
729
745
  hideLabel: m,
730
- placeholderCase: _
746
+ placeholderCase: q
731
747
  },
732
748
  c.field.name
733
749
  )),
@@ -741,14 +757,14 @@ function xe({
741
757
  "p",
742
758
  {
743
759
  id: u[c.definitionId],
744
- className: "usgb-consent-copy usgb-consent-notice",
760
+ className: "usgb-consent usgb-consent-copy usgb-consent-notice",
745
761
  children: v
746
762
  },
747
763
  c.definitionId
748
764
  );
749
- const U = a[c.name], p = typeof (U == null ? void 0 : U.message) == "string" ? U.message : void 0;
765
+ const U = o[c.name], p = typeof (U == null ? void 0 : U.message) == "string" ? U.message : void 0;
750
766
  return /* @__PURE__ */ s(
751
- Ae,
767
+ Ee,
752
768
  {
753
769
  id: d[c.name],
754
770
  label: v,
@@ -782,14 +798,14 @@ function xe({
782
798
  }
783
799
  );
784
800
  }
785
- function Me({
801
+ function Ve({
786
802
  definition: t,
787
803
  ctaLabel: e,
788
804
  session: n,
789
805
  headingId: i
790
806
  }) {
791
807
  var b;
792
- const { register: o, errors: r, fieldIds: l, uiState: a, onSubmit: d } = n, u = t.fields.find((g) => g.name === "email"), f = typeof ((b = r.email) == null ? void 0 : b.message) == "string" ? r.email.message : void 0;
808
+ const { register: a, errors: r, fieldIds: l, uiState: o, onSubmit: d } = n, u = t.fields.find((g) => g.name === "email"), f = typeof ((b = r.email) == null ? void 0 : b.message) == "string" ? r.email.message : void 0;
793
809
  return u ? /* @__PURE__ */ h(
794
810
  "form",
795
811
  {
@@ -803,14 +819,14 @@ function Me({
803
819
  {
804
820
  fieldRef: u,
805
821
  fieldIds: l,
806
- register: o,
822
+ register: a,
807
823
  errors: r,
808
824
  hideLabel: !0,
809
825
  placeholderCase: "upper",
810
826
  showError: !1
811
827
  }
812
828
  ),
813
- /* @__PURE__ */ s(Q, { type: "submit", loading: a.kind === "submitting", children: e })
829
+ /* @__PURE__ */ s(Q, { type: "submit", loading: o.kind === "submitting", children: e })
814
830
  ] }),
815
831
  /* @__PURE__ */ s(
816
832
  O,
@@ -819,12 +835,12 @@ function Me({
819
835
  message: f
820
836
  }
821
837
  ),
822
- a.kind === "failed" ? /* @__PURE__ */ s(
838
+ o.kind === "failed" ? /* @__PURE__ */ s(
823
839
  "p",
824
840
  {
825
841
  className: "usgb-form-status usgb-form-status-error",
826
842
  role: "alert",
827
- children: a.message ?? "Something went wrong. Please try again."
843
+ children: o.message ?? "Something went wrong. Please try again."
828
844
  }
829
845
  ) : null
830
846
  ]
@@ -832,15 +848,15 @@ function Me({
832
848
  ) : /* @__PURE__ */ s("p", { className: "usgb-form-status usgb-form-status-error", role: "alert", children: "Newsletter kind requires an email field" });
833
849
  }
834
850
  const X = {
835
- lead: xe,
836
- newsletter: Me
837
- }, Ve = "Thank you. Your request has been accepted and is being processed.";
838
- function T({
851
+ lead: Me,
852
+ newsletter: Ve
853
+ }, Re = "Thank you. Your request has been accepted and is being processed.";
854
+ function A({
839
855
  className: t,
840
856
  appearance: e,
841
857
  variantValue: n,
842
858
  twoColumn: i,
843
- kind: o,
859
+ kind: a,
844
860
  children: r
845
861
  }) {
846
862
  return /* @__PURE__ */ s(
@@ -850,20 +866,20 @@ function T({
850
866
  appearance: e,
851
867
  variantValue: n,
852
868
  twoColumn: i,
853
- kind: o,
869
+ kind: a,
854
870
  children: /* @__PURE__ */ s("p", { className: "usgb-form-status usgb-form-status-error", role: "alert", children: r })
855
871
  }
856
872
  );
857
873
  }
858
- function Re({
874
+ function Be({
859
875
  formId: t,
860
876
  definition: e,
861
877
  appearance: n,
862
878
  variant: i,
863
- variantValue: o,
879
+ variantValue: a,
864
880
  twoColumn: r,
865
881
  heading: l,
866
- subheading: a,
882
+ subheading: o,
867
883
  ctaLabel: d,
868
884
  legalUrls: u,
869
885
  successMessage: f,
@@ -872,9 +888,9 @@ function Re({
872
888
  analytics: C,
873
889
  className: w,
874
890
  onAccepted: m,
875
- onFailed: _
891
+ onFailed: q
876
892
  }) {
877
- const y = K(), c = l ? `${y}-heading` : void 0, v = G(null), U = Pe({
893
+ const y = K(), c = l ? `${y}-heading` : void 0, v = G(null), U = De({
878
894
  formId: t,
879
895
  definition: e,
880
896
  legalUrls: u,
@@ -882,24 +898,24 @@ function Re({
882
898
  adapter: g,
883
899
  analytics: C,
884
900
  onAccepted: m,
885
- onFailed: _
886
- }), p = U.uiState.kind === "accepted", k = p && !!M(b), q = p && !k ? M(f) ?? Ve : "";
901
+ onFailed: q
902
+ }), p = U.uiState.kind === "accepted", k = p && !!M(b), _ = p && !k ? M(f) ?? Re : "";
887
903
  j(() => {
888
- var E;
889
- q && ((E = v.current) == null || E.focus());
890
- }, [q]);
904
+ var I;
905
+ _ && ((I = v.current) == null || I.focus());
906
+ }, [_]);
891
907
  const P = X[e.kind];
892
908
  return /* @__PURE__ */ h(
893
909
  J,
894
910
  {
895
911
  className: w,
896
912
  appearance: n,
897
- variantValue: o,
913
+ variantValue: a,
898
914
  twoColumn: r,
899
915
  kind: e.kind,
900
916
  children: [
901
917
  l ? /* @__PURE__ */ s("h2", { id: c, className: "usgb-form-heading", children: l }) : null,
902
- !p && a ? /* @__PURE__ */ s("p", { className: "usgb-form-subheading", children: a }) : null,
918
+ !p && o ? /* @__PURE__ */ s("p", { className: "usgb-form-subheading", children: o }) : null,
903
919
  p ? null : /* @__PURE__ */ s(
904
920
  P,
905
921
  {
@@ -915,26 +931,26 @@ function Re({
915
931
  "p",
916
932
  {
917
933
  ref: v,
918
- className: q ? "usgb-form-status usgb-form-status-success" : "usgb-field-label--sr-only",
934
+ className: _ ? "usgb-form-status usgb-form-status-success" : "usgb-field-label--sr-only",
919
935
  role: "status",
920
936
  "aria-live": "polite",
921
- tabIndex: q ? -1 : void 0,
922
- children: q
937
+ tabIndex: _ ? -1 : void 0,
938
+ children: _
923
939
  }
924
940
  )
925
941
  ]
926
942
  }
927
943
  );
928
944
  }
929
- function We({
945
+ function He({
930
946
  formId: t,
931
947
  appearance: e = "on-light",
932
948
  variant: n = "dense",
933
949
  twoColumn: i = !1,
934
- heading: o,
950
+ heading: a,
935
951
  subheading: r,
936
952
  ctaLabel: l,
937
- legalUrls: a,
953
+ legalUrls: o,
938
954
  successMessage: d,
939
955
  successUrl: u,
940
956
  adapter: f,
@@ -943,10 +959,10 @@ function We({
943
959
  onAccepted: C,
944
960
  onFailed: w
945
961
  }) {
946
- const m = z(t), _ = (m == null ? void 0 : m.kind) === "newsletter", y = _ ? "" : n, c = !_ && i;
962
+ const m = z(t), q = (m == null ? void 0 : m.kind) === "newsletter", y = q ? "" : n, c = !q && i;
947
963
  if (!m)
948
964
  return /* @__PURE__ */ h(
949
- T,
965
+ A,
950
966
  {
951
967
  className: g,
952
968
  appearance: e,
@@ -958,10 +974,10 @@ function We({
958
974
  ]
959
975
  }
960
976
  );
961
- const v = H(m.consents);
977
+ const v = Y(m.consents);
962
978
  if (v === null)
963
979
  return /* @__PURE__ */ h(
964
- T,
980
+ A,
965
981
  {
966
982
  className: g,
967
983
  appearance: e,
@@ -974,15 +990,15 @@ function We({
974
990
  ]
975
991
  }
976
992
  );
977
- const p = we(v).filter(
978
- (q) => {
993
+ const p = _e(v).filter(
994
+ (_) => {
979
995
  var P;
980
- return !((P = a == null ? void 0 : a[q]) != null && P.trim());
996
+ return !((P = o == null ? void 0 : o[_]) != null && P.trim());
981
997
  }
982
998
  );
983
999
  if (p.length)
984
1000
  return /* @__PURE__ */ h(
985
- T,
1001
+ A,
986
1002
  {
987
1003
  className: g,
988
1004
  appearance: e,
@@ -998,10 +1014,10 @@ function We({
998
1014
  }
999
1015
  );
1000
1016
  const k = m.fields.filter(
1001
- (q) => !B(q.name)
1017
+ (_) => !B(_.name)
1002
1018
  );
1003
1019
  return k.length ? /* @__PURE__ */ h(
1004
- T,
1020
+ A,
1005
1021
  {
1006
1022
  className: g,
1007
1023
  appearance: e,
@@ -1013,11 +1029,11 @@ function We({
1013
1029
  t,
1014
1030
  ":",
1015
1031
  " ",
1016
- k.map((q) => q.name).join(", ")
1032
+ k.map((_) => _.name).join(", ")
1017
1033
  ]
1018
1034
  }
1019
1035
  ) : m.kind in X ? /* @__PURE__ */ s(
1020
- Re,
1036
+ Be,
1021
1037
  {
1022
1038
  formId: t,
1023
1039
  definition: m,
@@ -1025,10 +1041,10 @@ function We({
1025
1041
  variant: n,
1026
1042
  variantValue: y,
1027
1043
  twoColumn: c,
1028
- heading: o,
1044
+ heading: a,
1029
1045
  subheading: r,
1030
1046
  ctaLabel: l ?? m.ctaLabel,
1031
- legalUrls: a,
1047
+ legalUrls: o,
1032
1048
  successMessage: d,
1033
1049
  successUrl: u,
1034
1050
  adapter: f,
@@ -1038,7 +1054,7 @@ function We({
1038
1054
  onFailed: w
1039
1055
  }
1040
1056
  ) : /* @__PURE__ */ h(
1041
- T,
1057
+ A,
1042
1058
  {
1043
1059
  className: g,
1044
1060
  appearance: e,
@@ -1053,23 +1069,23 @@ function We({
1053
1069
  );
1054
1070
  }
1055
1071
  function Ye(t = {}) {
1056
- const e = typeof t == "string" ? { host: t } : t, n = e.host ?? "pwa", i = e.delayMs ?? 400, o = e.result ?? { status: "accepted" };
1072
+ const e = typeof t == "string" ? { host: t } : t, n = e.host ?? "pwa", i = e.delayMs ?? 400, a = e.result ?? { status: "accepted" };
1057
1073
  return {
1058
1074
  host: n,
1059
1075
  async submit(r) {
1060
1076
  var l;
1061
- return (l = e.onSubmit) == null || l.call(e, r), await new Promise((a) => setTimeout(a, i)), o;
1077
+ return (l = e.onSubmit) == null || l.call(e, r), await new Promise((o) => setTimeout(o, i)), a;
1062
1078
  }
1063
1079
  };
1064
1080
  }
1065
- const He = {
1081
+ const Ze = {
1066
1082
  clientAgreement: "client-agreement-url",
1067
1083
  privacyPolicy: "privacy-policy-url",
1068
1084
  userAgreement: "user-agreement-url",
1069
1085
  marketLossPolicy: "market-loss-policy-url",
1070
1086
  electronicDisclaimer: "electronic-disclaimer-url",
1071
1087
  termsOfSale: "terms-of-sale-url"
1072
- }, Ze = {
1088
+ }, Je = {
1073
1089
  clientAgreement: "/content/client-agreement",
1074
1090
  privacyPolicy: "/content/privacy-policy",
1075
1091
  userAgreement: "/content/user-agreement",
@@ -1077,7 +1093,7 @@ const He = {
1077
1093
  electronicDisclaimer: "/content/electronic-disclaimer",
1078
1094
  termsOfSale: "/content/terms-of-sale"
1079
1095
  };
1080
- function Je(t, e) {
1096
+ function Qe(t, e) {
1081
1097
  return e.every((n) => {
1082
1098
  var i;
1083
1099
  return !!((i = t == null ? void 0 : t[n]) != null && i.trim());
@@ -1085,30 +1101,31 @@ function Je(t, e) {
1085
1101
  }
1086
1102
  export {
1087
1103
  Q as Button,
1088
- Ae as ConsentField,
1089
- Se as FIELD_REGISTRY,
1104
+ Ee as ConsentField,
1105
+ Ce as FIELD_REGISTRY,
1090
1106
  O as FieldError,
1091
- Ie as FieldLabel,
1092
- ge as LEAD_CLICKWRAP,
1093
- he as LEAD_CLICKWRAP_V2,
1094
- pe as LEAD_SMS,
1107
+ Fe as FieldLabel,
1108
+ he as LEAD_CLICKWRAP,
1109
+ be as LEAD_CLICKWRAP_V2,
1110
+ fe as LEAD_SMS,
1095
1111
  ue as LEAD_TCPA,
1096
1112
  me as LEAD_TCPA_V2,
1097
- fe as LEAD_TOSPP,
1098
- He as LEGAL_URL_ATTRS,
1099
- Ze as PWA_LEGAL_URLS,
1100
- Ne as TextField,
1101
- We as UsgbForm,
1102
- we as collectRequiredLegalUrls,
1103
- Ce as createIdempotencyKey,
1113
+ pe as LEAD_TCPA_V3,
1114
+ ge as LEAD_TOSPP,
1115
+ Ze as LEGAL_URL_ATTRS,
1116
+ Je as PWA_LEGAL_URLS,
1117
+ xe as TextField,
1118
+ He as UsgbForm,
1119
+ _e as collectRequiredLegalUrls,
1120
+ Ue as createIdempotencyKey,
1104
1121
  Ye as createStubAdapter,
1105
- N as formsManifest,
1106
- ve as getConsentDefinition,
1122
+ x as formsManifest,
1123
+ ke as getConsentDefinition,
1107
1124
  B as getFieldDefinition,
1108
1125
  z as getFormDefinition,
1109
- Je as isCompleteLegalUrls,
1110
- ze as listEditorOptions,
1111
- je as listFormDefinitions,
1126
+ Qe as isCompleteLegalUrls,
1127
+ We as listEditorOptions,
1128
+ ze as listFormDefinitions,
1112
1129
  W as resolveConsentCopy,
1113
- H as resolveFormConsents
1130
+ Y as resolveFormConsents
1114
1131
  };