@usgb/forms 1.0.4 → 1.0.5
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/README.md +41 -34
- package/dist/{forms-manifest.1.0.4.json → forms-manifest.1.0.5.json} +368 -25
- package/dist/forms-manifest.json +368 -25
- package/dist/index.js +293 -292
- package/dist/src/contract/types.d.ts +7 -1
- package/dist/src/contract/types.d.ts.map +1 -1
- package/dist/src/form/useUsgbFormSession.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/usgb-forms.1.0.5.js +44 -0
- package/dist/usgb-forms.js +11 -11
- package/forms-manifest.json +368 -25
- package/package.json +1 -1
- package/dist/usgb-forms.1.0.4.js +0 -44
package/dist/index.js
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
import { jsx as s, Fragment as ee, jsxs as h } from "react/jsx-runtime";
|
|
2
|
-
import { useId as
|
|
2
|
+
import { useId as $, useMemo as T, useState as te, useRef as K, useEffect as H, forwardRef as M } from "react";
|
|
3
3
|
import { validate as ne } from "email-validator";
|
|
4
4
|
import { useForm as re } from "react-hook-form";
|
|
5
|
-
import
|
|
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
|
-
schemaVersion:
|
|
5
|
+
import D from "classnames";
|
|
6
|
+
const ae = "1.1.0", ie = { 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-10dlc": { 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 10DLC", 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-401k": { 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 401k", 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": { 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", 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"] } }, "magento-footer": { definitionVersion: "1", kind: "newsletter", flow: { type: "single" }, fields: [{ name: "email", required: !0 }], ctaLabel: "SUBSCRIBE", editor: { label: "Magento Footer", description: "Email only. No consent.", whenToUse: "TBD", whenNotToUse: "TBD", options: ["appearance", "heading", "subheading", "ctaLabel", "successMessage", "successUrl"], supportedAppearances: ["on-light", "on-dark"], supportedVariants: [], requiredLegalUrls: [] } }, "wp-full-lead": { 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: "Submit", consents: [{ definitionId: "lead-clickwrap", definitionVersion: "2" }], editor: { label: "Full Lead Form (WP GF 1)", description: "First name, last name, email, and phone required. Clickwrap notice only (lead-clickwrap v2); no consent checkboxes. GF form 1 → HubSpot 1ebf148f.", 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"] } }, "wp-request-call-back": { 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: "Submit", consents: [{ definitionId: "lead-clickwrap", definitionVersion: "2" }], editor: { label: "Request Call Back (WP GF 11)", description: "First name, last name, email, and phone required. Clickwrap notice only (lead-clickwrap v2). Host sets `requested_callback=true` as context. GF form 11 → HubSpot 25c0c6ca.", 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"] } }, "wp-investor-kit-lead-nurturing": { 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: "Submit", consents: [{ definitionId: "lead-clickwrap", definitionVersion: "2" }], editor: { label: "Investor Kit Lead Nurturing (WP GF 13)", description: "First name, last name, email, and phone required. Clickwrap notice only (lead-clickwrap v2). GF form 13 → HubSpot 1ebf148f.", 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"] } }, "wp-product-launch": { 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: "Reserve Yours Today", consents: [{ definitionId: "lead-clickwrap", definitionVersion: "2" }], editor: { label: "Product Launch (WP GF 15)", description: "First name, last name, email, and phone required. Clickwrap notice only (lead-clickwrap v2). Product IPO/pre-IPO pages. GF form 15 → HubSpot 950c50a1.", 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"] } }, "wp-ira-full-lead": { 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: "Submit", consents: [{ definitionId: "lead-clickwrap", definitionVersion: "2" }], editor: { label: "IRA Full Lead Form (WP GF 20)", description: "First name, last name, email, and phone required. Clickwrap notice only (lead-clickwrap v2). Host sets `ira_lead=true` as context. GF form 20 → HubSpot b42770ef.", 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"] } }, "wp-affiliate-ira-full-lead": { 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: "Submit", consents: [{ definitionId: "lead-clickwrap", definitionVersion: "2" }], editor: { label: "Affiliate — IRA Full Lead Form (WP GF 21)", description: "First name, last name, email, and phone required. Clickwrap notice only (lead-clickwrap v2). Host supplies affiliate_id/affiliate_offer_id/affiliate_transaction_id as context (not schema fields). GF form 21 → HubSpot 1d4e44b3.", 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"] } }, "wp-full-lead-captcha": { 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: "Submit", consents: [{ definitionId: "lead-clickwrap", definitionVersion: "2" }], editor: { label: "Full Lead Form — captcha (WP GF 22)", description: "First name, last name, email, and phone required. Clickwrap notice only (lead-clickwrap v2). reCAPTCHA is a host bot-control concern, not a schema field. GF form 22 → HubSpot 034c00e5.", 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"] } } }, ce = { hosts: ["pwa", "wordpress"], mayProvide: ["legal document URLs", "host/store identity"], mustNotDefine: ["consent definitions", "form fields", "submission endpoints"] }, de = {
|
|
7
|
+
schemaVersion: ae,
|
|
8
8
|
package: { name: "@usgb/forms", compatiblePackageVersions: "^1.0.2" },
|
|
9
|
-
submissionContract:
|
|
9
|
+
submissionContract: ie,
|
|
10
10
|
trackingRegistry: oe,
|
|
11
11
|
editorOptions: se,
|
|
12
12
|
forms: le,
|
|
13
13
|
hostAdapterContract: ce
|
|
14
|
-
},
|
|
15
|
-
function
|
|
16
|
-
return
|
|
14
|
+
}, E = de;
|
|
15
|
+
function W(t) {
|
|
16
|
+
return E.forms[t];
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
return Object.entries(
|
|
18
|
+
function We() {
|
|
19
|
+
return Object.entries(E.forms).map(([t, e]) => ({
|
|
20
20
|
formId: t,
|
|
21
21
|
definition: e
|
|
22
22
|
}));
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
const e =
|
|
24
|
+
function je(t) {
|
|
25
|
+
const e = W(t);
|
|
26
26
|
if (!e)
|
|
27
27
|
return [];
|
|
28
28
|
const n = [];
|
|
29
|
-
for (const
|
|
30
|
-
const
|
|
31
|
-
if (!
|
|
29
|
+
for (const a of e.editor.options) {
|
|
30
|
+
const i = E.editorOptions[a];
|
|
31
|
+
if (!i)
|
|
32
32
|
continue;
|
|
33
|
-
const r =
|
|
33
|
+
const r = i.valuesFrom ? [...e.editor[i.valuesFrom]] : void 0;
|
|
34
34
|
r && !r.length || n.push({
|
|
35
|
-
...
|
|
36
|
-
key:
|
|
35
|
+
...i,
|
|
36
|
+
key: a,
|
|
37
37
|
values: r,
|
|
38
|
-
defaultValue:
|
|
38
|
+
defaultValue: i.defaultFrom ? e[i.defaultFrom] : i.default
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
return n;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function j(t, e) {
|
|
44
44
|
return typeof t == "string" ? { content: t, language: t } : t(e);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function z(t, e) {
|
|
47
47
|
return `${t}@${e}`;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function A(t) {
|
|
50
50
|
return (e) => ({
|
|
51
51
|
language: t.map(
|
|
52
52
|
(n) => typeof n == "string" ? n : `${n.label} (${e[n.href] ?? ""})`
|
|
53
53
|
).join(""),
|
|
54
54
|
content: /* @__PURE__ */ s(ee, { children: t.map(
|
|
55
|
-
(n,
|
|
55
|
+
(n, a) => typeof n == "string" ? n : /* @__PURE__ */ h(
|
|
56
56
|
"a",
|
|
57
57
|
{
|
|
58
58
|
href: e[n.href],
|
|
@@ -66,7 +66,7 @@ function E(t) {
|
|
|
66
66
|
] })
|
|
67
67
|
]
|
|
68
68
|
},
|
|
69
|
-
`${n.href}-${
|
|
69
|
+
`${n.href}-${a}`
|
|
70
70
|
)
|
|
71
71
|
) })
|
|
72
72
|
});
|
|
@@ -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:
|
|
91
|
+
copy: A([
|
|
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 ",
|
|
@@ -103,14 +103,14 @@ const ue = {
|
|
|
103
103
|
grantDateField: "tcpa_form_opt_in_date",
|
|
104
104
|
requiredLegalUrls: ["userAgreement", "privacyPolicy"],
|
|
105
105
|
languageKey: "tcpa_consent_language",
|
|
106
|
-
copy:
|
|
106
|
+
copy: A([
|
|
107
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
108
|
{ href: "userAgreement", label: "Terms of Service" },
|
|
109
109
|
" and ",
|
|
110
110
|
{ href: "privacyPolicy", label: "Privacy Policy" },
|
|
111
111
|
"."
|
|
112
112
|
])
|
|
113
|
-
},
|
|
113
|
+
}, ge = {
|
|
114
114
|
definitionId: "lead-sms",
|
|
115
115
|
definitionVersion: "1",
|
|
116
116
|
type: "checkbox",
|
|
@@ -118,14 +118,14 @@ const ue = {
|
|
|
118
118
|
requiredLegalUrls: [],
|
|
119
119
|
languageKey: "sms_consent_language",
|
|
120
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."
|
|
121
|
-
},
|
|
121
|
+
}, fe = {
|
|
122
122
|
definitionId: "lead-tospp",
|
|
123
123
|
definitionVersion: "1",
|
|
124
124
|
type: "checkbox",
|
|
125
125
|
name: "tospp_form_consent_granted",
|
|
126
126
|
requiredLegalUrls: ["userAgreement", "privacyPolicy"],
|
|
127
127
|
languageKey: "tospp_consent_language",
|
|
128
|
-
copy:
|
|
128
|
+
copy: A([
|
|
129
129
|
"By checking, I accept ",
|
|
130
130
|
{ href: "userAgreement", label: "Terms of Conditions" },
|
|
131
131
|
" & ",
|
|
@@ -144,7 +144,7 @@ const ue = {
|
|
|
144
144
|
"termsOfSale"
|
|
145
145
|
],
|
|
146
146
|
languageKey: "clickwrap_consent_language",
|
|
147
|
-
copy:
|
|
147
|
+
copy: A([
|
|
148
148
|
"By clicking the button, I agree to be bound by your ",
|
|
149
149
|
{ href: "privacyPolicy", label: "Privacy Policy" },
|
|
150
150
|
", ",
|
|
@@ -163,7 +163,7 @@ const ue = {
|
|
|
163
163
|
type: "notice",
|
|
164
164
|
requiredLegalUrls: ["privacyPolicy", "userAgreement"],
|
|
165
165
|
languageKey: "clickwrap_consent_language",
|
|
166
|
-
copy:
|
|
166
|
+
copy: A([
|
|
167
167
|
"By submitting, you agree to United States Gold Bureau’s ",
|
|
168
168
|
{ href: "privacyPolicy", label: "Privacy Policy" },
|
|
169
169
|
" and ",
|
|
@@ -174,7 +174,7 @@ const ue = {
|
|
|
174
174
|
function ye(...t) {
|
|
175
175
|
return Object.fromEntries(
|
|
176
176
|
t.map((e) => [
|
|
177
|
-
|
|
177
|
+
z(e.definitionId, e.definitionVersion),
|
|
178
178
|
e
|
|
179
179
|
])
|
|
180
180
|
);
|
|
@@ -183,84 +183,84 @@ const ve = ye(
|
|
|
183
183
|
ue,
|
|
184
184
|
me,
|
|
185
185
|
pe,
|
|
186
|
-
fe,
|
|
187
186
|
ge,
|
|
187
|
+
fe,
|
|
188
188
|
he,
|
|
189
189
|
be
|
|
190
190
|
);
|
|
191
|
-
function
|
|
192
|
-
return ve[
|
|
191
|
+
function we(t, e) {
|
|
192
|
+
return ve[z(t, e)];
|
|
193
193
|
}
|
|
194
194
|
function Y(t) {
|
|
195
195
|
if (!(t != null && t.length))
|
|
196
196
|
return [];
|
|
197
197
|
const e = [];
|
|
198
198
|
for (const n of t) {
|
|
199
|
-
const
|
|
199
|
+
const a = we(
|
|
200
200
|
n.definitionId,
|
|
201
201
|
n.definitionVersion
|
|
202
202
|
);
|
|
203
|
-
if (!
|
|
203
|
+
if (!a)
|
|
204
204
|
return null;
|
|
205
205
|
e.push(
|
|
206
|
-
|
|
206
|
+
a.type === "checkbox" ? { ...a, required: !!n.required } : a
|
|
207
207
|
);
|
|
208
208
|
}
|
|
209
209
|
return e;
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function ke(t, e, n, a) {
|
|
212
212
|
if (!t.length)
|
|
213
213
|
return;
|
|
214
|
-
const
|
|
214
|
+
const i = {};
|
|
215
215
|
for (const r of t) {
|
|
216
|
-
const { language: l } =
|
|
217
|
-
if (
|
|
216
|
+
const { language: l } = j(r.copy, n);
|
|
217
|
+
if (i[r.languageKey] = l, r.type === "checkbox") {
|
|
218
218
|
const o = !!e[r.name];
|
|
219
|
-
|
|
219
|
+
i[r.name] = o, o && r.grantDateField && (i[r.grantDateField] = a);
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
|
-
return
|
|
222
|
+
return i;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function qe(t) {
|
|
225
225
|
const e = /* @__PURE__ */ new Set();
|
|
226
226
|
for (const n of t)
|
|
227
|
-
for (const
|
|
228
|
-
e.add(
|
|
227
|
+
for (const a of n.requiredLegalUrls)
|
|
228
|
+
e.add(a);
|
|
229
229
|
return [...e];
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function Le(t) {
|
|
232
232
|
return t.type === "checkbox";
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function O(t) {
|
|
235
235
|
return (e, n) => n ? e.trim().length > 0 || `${t} is required` : !0;
|
|
236
236
|
}
|
|
237
|
-
const
|
|
237
|
+
const _e = /^[2-9]\d{2}[2-9]\d{6}$/;
|
|
238
238
|
function Z(t) {
|
|
239
239
|
let e = t.replace(/\D/g, "");
|
|
240
|
-
return e.length === 11 && e.startsWith("1") && (e = e.slice(1)), e.length !== 10 || !
|
|
240
|
+
return e.length === 11 && e.startsWith("1") && (e = e.slice(1)), e.length !== 10 || !_e.test(e) ? null : e;
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function Ue(t) {
|
|
243
243
|
const e = t.trim();
|
|
244
244
|
if (!e) return "";
|
|
245
245
|
const n = Z(e);
|
|
246
246
|
if (!n) return e;
|
|
247
|
-
const
|
|
248
|
-
return
|
|
247
|
+
const a = e.replace(/\D/g, "");
|
|
248
|
+
return a.length === 11 && a.startsWith("1") ? `1${n}` : n;
|
|
249
249
|
}
|
|
250
|
-
const
|
|
250
|
+
const Se = {
|
|
251
251
|
firstname: {
|
|
252
252
|
name: "firstname",
|
|
253
253
|
control: "text",
|
|
254
254
|
label: "First name",
|
|
255
255
|
autoComplete: "given-name",
|
|
256
|
-
validate:
|
|
256
|
+
validate: O("First name")
|
|
257
257
|
},
|
|
258
258
|
lastname: {
|
|
259
259
|
name: "lastname",
|
|
260
260
|
control: "text",
|
|
261
261
|
label: "Last name",
|
|
262
262
|
autoComplete: "family-name",
|
|
263
|
-
validate:
|
|
263
|
+
validate: O("Last name")
|
|
264
264
|
},
|
|
265
265
|
email: {
|
|
266
266
|
name: "email",
|
|
@@ -281,18 +281,18 @@ const Ce = {
|
|
|
281
281
|
const n = t.trim();
|
|
282
282
|
return n ? Z(n) ? !0 : "Enter a valid phone number" : e ? "Phone number is required" : !0;
|
|
283
283
|
},
|
|
284
|
-
serialize:
|
|
284
|
+
serialize: Ue
|
|
285
285
|
}
|
|
286
286
|
};
|
|
287
|
-
function
|
|
288
|
-
return
|
|
287
|
+
function R(t) {
|
|
288
|
+
return Se[t];
|
|
289
289
|
}
|
|
290
290
|
function J({
|
|
291
291
|
className: t,
|
|
292
292
|
appearance: e,
|
|
293
293
|
variantValue: n,
|
|
294
|
-
twoColumn:
|
|
295
|
-
kind:
|
|
294
|
+
twoColumn: a,
|
|
295
|
+
kind: i,
|
|
296
296
|
children: r
|
|
297
297
|
}) {
|
|
298
298
|
return /* @__PURE__ */ s(
|
|
@@ -301,115 +301,116 @@ function J({
|
|
|
301
301
|
className: `usgb-form ${t ?? ""}`,
|
|
302
302
|
"data-appearance": e,
|
|
303
303
|
...n ? { "data-variant": n } : {},
|
|
304
|
-
...
|
|
305
|
-
"data-kind":
|
|
304
|
+
...a ? { "data-layout": "two-column" } : {},
|
|
305
|
+
"data-kind": i,
|
|
306
306
|
children: r
|
|
307
307
|
}
|
|
308
308
|
);
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function Ce() {
|
|
311
311
|
return typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : `usgb-${Date.now()}-${Math.random().toString(36).slice(2, 10)}`;
|
|
312
312
|
}
|
|
313
313
|
function Pe(t, e) {
|
|
314
314
|
const n = {};
|
|
315
|
-
for (const
|
|
316
|
-
n[
|
|
317
|
-
for (const
|
|
318
|
-
n[
|
|
315
|
+
for (const a of t)
|
|
316
|
+
n[a.name] = "";
|
|
317
|
+
for (const a of e)
|
|
318
|
+
n[a] = !1;
|
|
319
319
|
return n;
|
|
320
320
|
}
|
|
321
|
-
function
|
|
321
|
+
function x(t) {
|
|
322
322
|
const e = t == null ? void 0 : t.trim();
|
|
323
323
|
return e || void 0;
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function Te({
|
|
326
326
|
formId: t,
|
|
327
327
|
definition: e,
|
|
328
328
|
legalUrls: n,
|
|
329
|
-
successUrl:
|
|
330
|
-
adapter:
|
|
329
|
+
successUrl: a,
|
|
330
|
+
adapter: i,
|
|
331
331
|
analytics: r,
|
|
332
332
|
onAccepted: l,
|
|
333
333
|
onFailed: o
|
|
334
334
|
}) {
|
|
335
|
-
const d =
|
|
335
|
+
const d = $(), u = T(
|
|
336
336
|
() => Y(e.consents) ?? [],
|
|
337
337
|
[e.consents]
|
|
338
|
-
),
|
|
339
|
-
() => u.filter(
|
|
338
|
+
), g = T(
|
|
339
|
+
() => u.filter(Le).map((p) => p.name),
|
|
340
340
|
[u]
|
|
341
|
-
), b =
|
|
342
|
-
() => Pe(e.fields,
|
|
343
|
-
[e.fields,
|
|
341
|
+
), b = T(
|
|
342
|
+
() => Pe(e.fields, g),
|
|
343
|
+
[e.fields, g]
|
|
344
344
|
), {
|
|
345
|
-
register:
|
|
346
|
-
handleSubmit:
|
|
347
|
-
formState: { errors:
|
|
345
|
+
register: f,
|
|
346
|
+
handleSubmit: S,
|
|
347
|
+
formState: { errors: k }
|
|
348
348
|
} = re({
|
|
349
349
|
defaultValues: b
|
|
350
|
-
}), [m,
|
|
351
|
-
|
|
350
|
+
}), [m, L] = te({ kind: "idle" }), y = K(!1);
|
|
351
|
+
H(() => {
|
|
352
352
|
r == null || r({ type: "view", formId: t });
|
|
353
353
|
}, [r, t]);
|
|
354
|
-
const c =
|
|
354
|
+
const c = T(() => {
|
|
355
355
|
const p = {};
|
|
356
|
-
for (const
|
|
357
|
-
p[
|
|
358
|
-
for (const
|
|
359
|
-
p[
|
|
356
|
+
for (const w of e.fields)
|
|
357
|
+
p[w.name] = `${d}-${w.name}`;
|
|
358
|
+
for (const w of g)
|
|
359
|
+
p[w] = `${d}-${w}`;
|
|
360
360
|
return p;
|
|
361
|
-
}, [d, e.fields,
|
|
361
|
+
}, [d, e.fields, g]), v = T(() => {
|
|
362
362
|
const p = {};
|
|
363
|
-
for (const
|
|
364
|
-
|
|
363
|
+
for (const w of u)
|
|
364
|
+
w.type === "notice" && (p[w.definitionId] = `${d}-notice-${w.definitionId}`);
|
|
365
365
|
return p;
|
|
366
|
-
}, [d, u]),
|
|
366
|
+
}, [d, u]), C = S(
|
|
367
367
|
async (p) => {
|
|
368
368
|
if (y.current)
|
|
369
369
|
return;
|
|
370
|
-
y.current = !0,
|
|
371
|
-
const
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
370
|
+
y.current = !0, L({ kind: "submitting" }), r == null || r({ type: "submit_attempt", formId: t });
|
|
371
|
+
const q = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), P = e.fields.map(
|
|
372
|
+
(_) => {
|
|
373
|
+
const U = p[_.name];
|
|
374
|
+
if (typeof U != "string")
|
|
375
|
+
return { name: _.name, value: !!U };
|
|
376
|
+
const N = R(_.name);
|
|
377
|
+
return {
|
|
378
|
+
name: _.name,
|
|
379
|
+
value: N != null && N.serialize ? N.serialize(U) : U.trim()
|
|
380
|
+
};
|
|
377
381
|
}
|
|
378
|
-
|
|
379
|
-
P[L.name] = N != null && N.serialize ? N.serialize(S) : S.trim();
|
|
380
|
-
}
|
|
381
|
-
const I = we(
|
|
382
|
+
), I = ke(
|
|
382
383
|
u,
|
|
383
384
|
p,
|
|
384
385
|
n ?? {},
|
|
385
|
-
|
|
386
|
-
),
|
|
386
|
+
q
|
|
387
|
+
), V = {
|
|
387
388
|
formId: t,
|
|
388
389
|
definitionVersion: e.definitionVersion,
|
|
389
|
-
submissionContractVersion:
|
|
390
|
-
idempotencyKey:
|
|
390
|
+
submissionContractVersion: E.submissionContract.version,
|
|
391
|
+
idempotencyKey: Ce(),
|
|
391
392
|
data: P,
|
|
392
393
|
consents: I
|
|
393
394
|
};
|
|
394
395
|
try {
|
|
395
|
-
const
|
|
396
|
-
if (
|
|
397
|
-
r == null || r({ type: "success", formId: t, status: "accepted" }), l == null || l(
|
|
398
|
-
const
|
|
399
|
-
|
|
396
|
+
const _ = await i.submit(V);
|
|
397
|
+
if (_.status === "accepted") {
|
|
398
|
+
r == null || r({ type: "success", formId: t, status: "accepted" }), l == null || l(V), L({ kind: "accepted" });
|
|
399
|
+
const U = x(a);
|
|
400
|
+
U && typeof window < "u" && window.location.assign(U);
|
|
400
401
|
} else
|
|
401
|
-
y.current = !1,
|
|
402
|
+
y.current = !1, L({
|
|
402
403
|
kind: "failed",
|
|
403
|
-
message:
|
|
404
|
+
message: _.message ?? "Submission failed"
|
|
404
405
|
}), r == null || r({
|
|
405
406
|
type: "failure",
|
|
406
407
|
formId: t,
|
|
407
|
-
message:
|
|
408
|
-
}), o == null || o(
|
|
409
|
-
} catch (
|
|
408
|
+
message: _.message
|
|
409
|
+
}), o == null || o(V, _.message);
|
|
410
|
+
} catch (_) {
|
|
410
411
|
y.current = !1;
|
|
411
|
-
const
|
|
412
|
-
|
|
412
|
+
const U = _ instanceof Error ? _.message : "Submission failed";
|
|
413
|
+
L({ kind: "failed", message: U }), r == null || r({ type: "failure", formId: t, message: U }), o == null || o(V, U);
|
|
413
414
|
}
|
|
414
415
|
},
|
|
415
416
|
(p) => {
|
|
@@ -421,16 +422,16 @@ function De({
|
|
|
421
422
|
}
|
|
422
423
|
);
|
|
423
424
|
return {
|
|
424
|
-
register:
|
|
425
|
-
errors:
|
|
425
|
+
register: f,
|
|
426
|
+
errors: k,
|
|
426
427
|
fieldIds: c,
|
|
427
428
|
noticeIds: v,
|
|
428
429
|
consentDefs: u,
|
|
429
430
|
uiState: m,
|
|
430
|
-
onSubmit:
|
|
431
|
+
onSubmit: C
|
|
431
432
|
};
|
|
432
433
|
}
|
|
433
|
-
function
|
|
434
|
+
function Fe() {
|
|
434
435
|
return /* @__PURE__ */ h(
|
|
435
436
|
"svg",
|
|
436
437
|
{
|
|
@@ -463,7 +464,7 @@ function Ae() {
|
|
|
463
464
|
}
|
|
464
465
|
);
|
|
465
466
|
}
|
|
466
|
-
function
|
|
467
|
+
function De() {
|
|
467
468
|
return /* @__PURE__ */ s(
|
|
468
469
|
"svg",
|
|
469
470
|
{
|
|
@@ -488,7 +489,7 @@ function Te() {
|
|
|
488
489
|
}
|
|
489
490
|
);
|
|
490
491
|
}
|
|
491
|
-
function
|
|
492
|
+
function G({
|
|
492
493
|
id: t,
|
|
493
494
|
message: e,
|
|
494
495
|
className: n
|
|
@@ -498,17 +499,17 @@ function O({
|
|
|
498
499
|
{
|
|
499
500
|
id: t,
|
|
500
501
|
role: "alert",
|
|
501
|
-
className:
|
|
502
|
+
className: D("usgb-field-error", n),
|
|
502
503
|
children: [
|
|
503
|
-
/* @__PURE__ */ s(
|
|
504
|
+
/* @__PURE__ */ s(Fe, {}),
|
|
504
505
|
e
|
|
505
506
|
]
|
|
506
507
|
}
|
|
507
508
|
) : null;
|
|
508
509
|
}
|
|
509
|
-
const
|
|
510
|
-
function({ id: e, label: n, errorMessage:
|
|
511
|
-
const d =
|
|
510
|
+
const Ae = M(
|
|
511
|
+
function({ id: e, label: n, errorMessage: a, required: i, className: r, ...l }, o) {
|
|
512
|
+
const d = a ? `${e}-error` : void 0;
|
|
512
513
|
return /* @__PURE__ */ h("div", { className: "usgb-form-group usgb-consent", children: [
|
|
513
514
|
/* @__PURE__ */ h("div", { className: "usgb-consent-row", children: [
|
|
514
515
|
/* @__PURE__ */ h("span", { className: "usgb-form-checkbox-wrap", children: [
|
|
@@ -519,17 +520,17 @@ const Ee = R(
|
|
|
519
520
|
ref: o,
|
|
520
521
|
id: e,
|
|
521
522
|
type: "checkbox",
|
|
522
|
-
className:
|
|
523
|
-
"aria-invalid":
|
|
523
|
+
className: D("usgb-form-checkbox", r),
|
|
524
|
+
"aria-invalid": a ? !0 : void 0,
|
|
524
525
|
"aria-describedby": d,
|
|
525
|
-
"aria-required":
|
|
526
|
+
"aria-required": i || void 0
|
|
526
527
|
}
|
|
527
528
|
),
|
|
528
|
-
/* @__PURE__ */ s(
|
|
529
|
+
/* @__PURE__ */ s(De, {})
|
|
529
530
|
] }),
|
|
530
531
|
/* @__PURE__ */ h("label", { htmlFor: e, className: "usgb-consent-copy", children: [
|
|
531
532
|
n,
|
|
532
|
-
|
|
533
|
+
i ? /* @__PURE__ */ s(
|
|
533
534
|
"span",
|
|
534
535
|
{
|
|
535
536
|
className: "usgb-field-label-asterisk",
|
|
@@ -539,43 +540,43 @@ const Ee = R(
|
|
|
539
540
|
) : null
|
|
540
541
|
] })
|
|
541
542
|
] }),
|
|
542
|
-
/* @__PURE__ */ s(
|
|
543
|
+
/* @__PURE__ */ s(G, { id: d, message: a })
|
|
543
544
|
] });
|
|
544
545
|
}
|
|
545
|
-
), Q =
|
|
546
|
+
), Q = M(
|
|
546
547
|
function({
|
|
547
548
|
className: e,
|
|
548
549
|
variant: n = "primary",
|
|
549
|
-
loading:
|
|
550
|
-
disabled:
|
|
550
|
+
loading: a = !1,
|
|
551
|
+
disabled: i = !1,
|
|
551
552
|
children: r,
|
|
552
553
|
onClick: l,
|
|
553
554
|
type: o = "button",
|
|
554
555
|
...d
|
|
555
556
|
}, u) {
|
|
556
|
-
const
|
|
557
|
+
const g = i || a, b = i && !a ? !0 : void 0;
|
|
557
558
|
return /* @__PURE__ */ s(
|
|
558
559
|
"button",
|
|
559
560
|
{
|
|
560
561
|
ref: u,
|
|
561
562
|
type: o,
|
|
562
|
-
className:
|
|
563
|
+
className: D(
|
|
563
564
|
"usgb-btn",
|
|
564
565
|
n === "primary" && "usgb-btn-primary",
|
|
565
566
|
e
|
|
566
567
|
),
|
|
567
568
|
...d,
|
|
568
569
|
disabled: b,
|
|
569
|
-
"aria-disabled":
|
|
570
|
-
"aria-busy":
|
|
571
|
-
onClick: (
|
|
572
|
-
if (
|
|
573
|
-
|
|
570
|
+
"aria-disabled": g || void 0,
|
|
571
|
+
"aria-busy": a || void 0,
|
|
572
|
+
onClick: (f) => {
|
|
573
|
+
if (g) {
|
|
574
|
+
f.preventDefault();
|
|
574
575
|
return;
|
|
575
576
|
}
|
|
576
|
-
l == null || l(
|
|
577
|
+
l == null || l(f);
|
|
577
578
|
},
|
|
578
|
-
children:
|
|
579
|
+
children: a ? "Submitting…" : r
|
|
579
580
|
}
|
|
580
581
|
);
|
|
581
582
|
}
|
|
@@ -584,50 +585,50 @@ function Ie(t) {
|
|
|
584
585
|
const e = [];
|
|
585
586
|
let n = 0;
|
|
586
587
|
for (; n < t.length; ) {
|
|
587
|
-
const
|
|
588
|
-
if (
|
|
589
|
-
const
|
|
590
|
-
for (; n < t.length && t[n].group ===
|
|
588
|
+
const a = t[n];
|
|
589
|
+
if (a.group) {
|
|
590
|
+
const i = a.group, r = [];
|
|
591
|
+
for (; n < t.length && t[n].group === i; )
|
|
591
592
|
r.push(t[n]), n += 1;
|
|
592
|
-
e.push({ type: "group", group:
|
|
593
|
+
e.push({ type: "group", group: i, fields: r });
|
|
593
594
|
continue;
|
|
594
595
|
}
|
|
595
|
-
e.push({ type: "field", field:
|
|
596
|
+
e.push({ type: "field", field: a }), n += 1;
|
|
596
597
|
}
|
|
597
598
|
return e;
|
|
598
599
|
}
|
|
599
|
-
function
|
|
600
|
+
function Ve({
|
|
600
601
|
htmlFor: t,
|
|
601
602
|
children: e,
|
|
602
603
|
className: n,
|
|
603
|
-
required:
|
|
604
|
+
required: a
|
|
604
605
|
}) {
|
|
605
|
-
return /* @__PURE__ */ h("label", { htmlFor: t, className:
|
|
606
|
+
return /* @__PURE__ */ h("label", { htmlFor: t, className: D("usgb-field-label", n), children: [
|
|
606
607
|
e,
|
|
607
|
-
|
|
608
|
+
a ? /* @__PURE__ */ s("span", { className: "usgb-field-label-asterisk", "aria-hidden": "true", children: "*" }) : null
|
|
608
609
|
] });
|
|
609
610
|
}
|
|
610
611
|
function Ne(t) {
|
|
611
612
|
return t.replace(/\b\w/g, (e) => e.toUpperCase());
|
|
612
613
|
}
|
|
613
|
-
const
|
|
614
|
+
const Ee = M(
|
|
614
615
|
function({
|
|
615
616
|
id: e,
|
|
616
617
|
label: n,
|
|
617
|
-
type:
|
|
618
|
-
errorMessage:
|
|
618
|
+
type: a = "text",
|
|
619
|
+
errorMessage: i,
|
|
619
620
|
required: r,
|
|
620
621
|
hideLabel: l = !1,
|
|
621
622
|
placeholderCase: o = "upper",
|
|
622
623
|
showError: d = !0,
|
|
623
624
|
className: u,
|
|
624
|
-
placeholder:
|
|
625
|
+
placeholder: g,
|
|
625
626
|
...b
|
|
626
|
-
},
|
|
627
|
-
const
|
|
627
|
+
}, f) {
|
|
628
|
+
const S = i ? `${e}-error` : void 0, k = l ? `${n}${r ? "*" : ""}` : g, m = l && k ? o === "title" ? Ne(k) : k.toUpperCase() : k;
|
|
628
629
|
return /* @__PURE__ */ h("div", { className: "usgb-form-group", children: [
|
|
629
630
|
/* @__PURE__ */ s(
|
|
630
|
-
|
|
631
|
+
Ve,
|
|
631
632
|
{
|
|
632
633
|
htmlFor: e,
|
|
633
634
|
required: r,
|
|
@@ -638,64 +639,64 @@ const xe = R(
|
|
|
638
639
|
/* @__PURE__ */ s(
|
|
639
640
|
"input",
|
|
640
641
|
{
|
|
641
|
-
ref:
|
|
642
|
+
ref: f,
|
|
642
643
|
id: e,
|
|
643
|
-
type:
|
|
644
|
-
className:
|
|
644
|
+
type: a,
|
|
645
|
+
className: D(
|
|
645
646
|
"usgb-field-control",
|
|
646
|
-
|
|
647
|
+
i && "usgb-field-invalid",
|
|
647
648
|
u
|
|
648
649
|
),
|
|
649
650
|
placeholder: m,
|
|
650
|
-
"aria-invalid":
|
|
651
|
-
"aria-describedby":
|
|
651
|
+
"aria-invalid": i ? !0 : void 0,
|
|
652
|
+
"aria-describedby": S,
|
|
652
653
|
"aria-required": r || void 0,
|
|
653
654
|
...b
|
|
654
655
|
}
|
|
655
656
|
),
|
|
656
|
-
d ? /* @__PURE__ */ s(
|
|
657
|
+
d ? /* @__PURE__ */ s(G, { id: S, message: i }) : null
|
|
657
658
|
] });
|
|
658
659
|
}
|
|
659
660
|
);
|
|
660
|
-
function
|
|
661
|
+
function B({
|
|
661
662
|
fieldRef: t,
|
|
662
663
|
fieldIds: e,
|
|
663
664
|
register: n,
|
|
664
|
-
errors:
|
|
665
|
-
hideLabel:
|
|
665
|
+
errors: a,
|
|
666
|
+
hideLabel: i,
|
|
666
667
|
placeholderCase: r,
|
|
667
668
|
showError: l = !0
|
|
668
669
|
}) {
|
|
669
|
-
const o =
|
|
670
|
+
const o = R(t.name);
|
|
670
671
|
if (!o) return null;
|
|
671
|
-
const d =
|
|
672
|
+
const d = a[t.name], u = typeof (d == null ? void 0 : d.message) == "string" ? d.message : void 0;
|
|
672
673
|
return /* @__PURE__ */ s(
|
|
673
|
-
|
|
674
|
+
Ee,
|
|
674
675
|
{
|
|
675
676
|
id: e[t.name],
|
|
676
677
|
label: o.label,
|
|
677
678
|
type: o.control,
|
|
678
679
|
required: t.required,
|
|
679
|
-
hideLabel:
|
|
680
|
+
hideLabel: i,
|
|
680
681
|
placeholderCase: r,
|
|
681
682
|
showError: l,
|
|
682
683
|
autoComplete: o.autoComplete,
|
|
683
684
|
errorMessage: u,
|
|
684
685
|
...n(t.name, {
|
|
685
|
-
validate: (
|
|
686
|
-
typeof
|
|
686
|
+
validate: (g) => o.validate(
|
|
687
|
+
typeof g == "string" ? g : "",
|
|
687
688
|
t.required
|
|
688
689
|
)
|
|
689
690
|
})
|
|
690
691
|
}
|
|
691
692
|
);
|
|
692
693
|
}
|
|
693
|
-
function
|
|
694
|
+
function xe({
|
|
694
695
|
definition: t,
|
|
695
696
|
variant: e,
|
|
696
697
|
ctaLabel: n,
|
|
697
|
-
legalUrls:
|
|
698
|
-
session:
|
|
698
|
+
legalUrls: a,
|
|
699
|
+
session: i,
|
|
699
700
|
headingId: r
|
|
700
701
|
}) {
|
|
701
702
|
const {
|
|
@@ -703,54 +704,54 @@ function Me({
|
|
|
703
704
|
errors: o,
|
|
704
705
|
fieldIds: d,
|
|
705
706
|
noticeIds: u,
|
|
706
|
-
consentDefs:
|
|
707
|
+
consentDefs: g,
|
|
707
708
|
uiState: b,
|
|
708
|
-
onSubmit:
|
|
709
|
-
} =
|
|
709
|
+
onSubmit: f
|
|
710
|
+
} = i, S = T(
|
|
710
711
|
() => Ie(t.fields),
|
|
711
712
|
[t.fields]
|
|
712
|
-
),
|
|
713
|
+
), k = e === "sidebar", m = e === "dense" || k, L = k ? "title" : "upper", y = Object.values(u).join(" ");
|
|
713
714
|
return /* @__PURE__ */ h(
|
|
714
715
|
"form",
|
|
715
716
|
{
|
|
716
|
-
onSubmit:
|
|
717
|
+
onSubmit: f,
|
|
717
718
|
noValidate: !0,
|
|
718
719
|
...r ? { "aria-labelledby": r } : {},
|
|
719
720
|
children: [
|
|
720
|
-
|
|
721
|
+
S.map((c) => c.type === "group" ? /* @__PURE__ */ s(
|
|
721
722
|
"div",
|
|
722
723
|
{
|
|
723
724
|
className: "usgb-form-grid",
|
|
724
725
|
children: c.fields.map((v) => /* @__PURE__ */ s(
|
|
725
|
-
|
|
726
|
+
B,
|
|
726
727
|
{
|
|
727
728
|
fieldRef: v,
|
|
728
729
|
fieldIds: d,
|
|
729
730
|
register: l,
|
|
730
731
|
errors: o,
|
|
731
732
|
hideLabel: m,
|
|
732
|
-
placeholderCase:
|
|
733
|
+
placeholderCase: L
|
|
733
734
|
},
|
|
734
735
|
v.name
|
|
735
736
|
))
|
|
736
737
|
},
|
|
737
738
|
`group-${c.group}-${c.fields.map((v) => v.name).join("-")}`
|
|
738
739
|
) : /* @__PURE__ */ s(
|
|
739
|
-
|
|
740
|
+
B,
|
|
740
741
|
{
|
|
741
742
|
fieldRef: c.field,
|
|
742
743
|
fieldIds: d,
|
|
743
744
|
register: l,
|
|
744
745
|
errors: o,
|
|
745
746
|
hideLabel: m,
|
|
746
|
-
placeholderCase:
|
|
747
|
+
placeholderCase: L
|
|
747
748
|
},
|
|
748
749
|
c.field.name
|
|
749
750
|
)),
|
|
750
|
-
|
|
751
|
-
const { content: v } =
|
|
751
|
+
g.map((c) => {
|
|
752
|
+
const { content: v } = j(
|
|
752
753
|
c.copy,
|
|
753
|
-
|
|
754
|
+
a ?? {}
|
|
754
755
|
);
|
|
755
756
|
if (c.type === "notice")
|
|
756
757
|
return /* @__PURE__ */ s(
|
|
@@ -762,9 +763,9 @@ function Me({
|
|
|
762
763
|
},
|
|
763
764
|
c.definitionId
|
|
764
765
|
);
|
|
765
|
-
const
|
|
766
|
+
const C = o[c.name], p = typeof (C == null ? void 0 : C.message) == "string" ? C.message : void 0;
|
|
766
767
|
return /* @__PURE__ */ s(
|
|
767
|
-
|
|
768
|
+
Ae,
|
|
768
769
|
{
|
|
769
770
|
id: d[c.name],
|
|
770
771
|
label: v,
|
|
@@ -798,28 +799,28 @@ function Me({
|
|
|
798
799
|
}
|
|
799
800
|
);
|
|
800
801
|
}
|
|
801
|
-
function
|
|
802
|
+
function Be({
|
|
802
803
|
definition: t,
|
|
803
804
|
ctaLabel: e,
|
|
804
805
|
session: n,
|
|
805
|
-
headingId:
|
|
806
|
+
headingId: a
|
|
806
807
|
}) {
|
|
807
808
|
var b;
|
|
808
|
-
const { register:
|
|
809
|
+
const { register: i, errors: r, fieldIds: l, uiState: o, onSubmit: d } = n, u = t.fields.find((f) => f.name === "email"), g = typeof ((b = r.email) == null ? void 0 : b.message) == "string" ? r.email.message : void 0;
|
|
809
810
|
return u ? /* @__PURE__ */ h(
|
|
810
811
|
"form",
|
|
811
812
|
{
|
|
812
813
|
onSubmit: d,
|
|
813
814
|
noValidate: !0,
|
|
814
|
-
...
|
|
815
|
+
...a ? { "aria-labelledby": a } : {},
|
|
815
816
|
children: [
|
|
816
817
|
/* @__PURE__ */ h("div", { className: "usgb-form-inline", children: [
|
|
817
818
|
/* @__PURE__ */ s(
|
|
818
|
-
|
|
819
|
+
B,
|
|
819
820
|
{
|
|
820
821
|
fieldRef: u,
|
|
821
822
|
fieldIds: l,
|
|
822
|
-
register:
|
|
823
|
+
register: i,
|
|
823
824
|
errors: r,
|
|
824
825
|
hideLabel: !0,
|
|
825
826
|
placeholderCase: "upper",
|
|
@@ -829,10 +830,10 @@ function Ve({
|
|
|
829
830
|
/* @__PURE__ */ s(Q, { type: "submit", loading: o.kind === "submitting", children: e })
|
|
830
831
|
] }),
|
|
831
832
|
/* @__PURE__ */ s(
|
|
832
|
-
|
|
833
|
+
G,
|
|
833
834
|
{
|
|
834
|
-
id:
|
|
835
|
-
message:
|
|
835
|
+
id: g ? `${l.email}-error` : void 0,
|
|
836
|
+
message: g
|
|
836
837
|
}
|
|
837
838
|
),
|
|
838
839
|
o.kind === "failed" ? /* @__PURE__ */ s(
|
|
@@ -848,15 +849,15 @@ function Ve({
|
|
|
848
849
|
) : /* @__PURE__ */ s("p", { className: "usgb-form-status usgb-form-status-error", role: "alert", children: "Newsletter kind requires an email field" });
|
|
849
850
|
}
|
|
850
851
|
const X = {
|
|
851
|
-
lead:
|
|
852
|
-
newsletter:
|
|
853
|
-
},
|
|
854
|
-
function
|
|
852
|
+
lead: xe,
|
|
853
|
+
newsletter: Be
|
|
854
|
+
}, Me = "Thank you. Your request has been accepted and is being processed.";
|
|
855
|
+
function F({
|
|
855
856
|
className: t,
|
|
856
857
|
appearance: e,
|
|
857
858
|
variantValue: n,
|
|
858
|
-
twoColumn:
|
|
859
|
-
kind:
|
|
859
|
+
twoColumn: a,
|
|
860
|
+
kind: i,
|
|
860
861
|
children: r
|
|
861
862
|
}) {
|
|
862
863
|
return /* @__PURE__ */ s(
|
|
@@ -865,52 +866,52 @@ function A({
|
|
|
865
866
|
className: t,
|
|
866
867
|
appearance: e,
|
|
867
868
|
variantValue: n,
|
|
868
|
-
twoColumn:
|
|
869
|
-
kind:
|
|
869
|
+
twoColumn: a,
|
|
870
|
+
kind: i,
|
|
870
871
|
children: /* @__PURE__ */ s("p", { className: "usgb-form-status usgb-form-status-error", role: "alert", children: r })
|
|
871
872
|
}
|
|
872
873
|
);
|
|
873
874
|
}
|
|
874
|
-
function
|
|
875
|
+
function Re({
|
|
875
876
|
formId: t,
|
|
876
877
|
definition: e,
|
|
877
878
|
appearance: n,
|
|
878
|
-
variant:
|
|
879
|
-
variantValue:
|
|
879
|
+
variant: a,
|
|
880
|
+
variantValue: i,
|
|
880
881
|
twoColumn: r,
|
|
881
882
|
heading: l,
|
|
882
883
|
subheading: o,
|
|
883
884
|
ctaLabel: d,
|
|
884
885
|
legalUrls: u,
|
|
885
|
-
successMessage:
|
|
886
|
+
successMessage: g,
|
|
886
887
|
successUrl: b,
|
|
887
|
-
adapter:
|
|
888
|
-
analytics:
|
|
889
|
-
className:
|
|
888
|
+
adapter: f,
|
|
889
|
+
analytics: S,
|
|
890
|
+
className: k,
|
|
890
891
|
onAccepted: m,
|
|
891
|
-
onFailed:
|
|
892
|
+
onFailed: L
|
|
892
893
|
}) {
|
|
893
|
-
const y =
|
|
894
|
+
const y = $(), c = l ? `${y}-heading` : void 0, v = K(null), C = Te({
|
|
894
895
|
formId: t,
|
|
895
896
|
definition: e,
|
|
896
897
|
legalUrls: u,
|
|
897
898
|
successUrl: b,
|
|
898
|
-
adapter:
|
|
899
|
-
analytics:
|
|
899
|
+
adapter: f,
|
|
900
|
+
analytics: S,
|
|
900
901
|
onAccepted: m,
|
|
901
|
-
onFailed:
|
|
902
|
-
}), p =
|
|
903
|
-
|
|
902
|
+
onFailed: L
|
|
903
|
+
}), p = C.uiState.kind === "accepted", w = p && !!x(b), q = p && !w ? x(g) ?? Me : "";
|
|
904
|
+
H(() => {
|
|
904
905
|
var I;
|
|
905
|
-
|
|
906
|
-
}, [
|
|
906
|
+
q && ((I = v.current) == null || I.focus());
|
|
907
|
+
}, [q]);
|
|
907
908
|
const P = X[e.kind];
|
|
908
909
|
return /* @__PURE__ */ h(
|
|
909
910
|
J,
|
|
910
911
|
{
|
|
911
|
-
className:
|
|
912
|
+
className: k,
|
|
912
913
|
appearance: n,
|
|
913
|
-
variantValue:
|
|
914
|
+
variantValue: i,
|
|
914
915
|
twoColumn: r,
|
|
915
916
|
kind: e.kind,
|
|
916
917
|
children: [
|
|
@@ -920,10 +921,10 @@ function Be({
|
|
|
920
921
|
P,
|
|
921
922
|
{
|
|
922
923
|
definition: e,
|
|
923
|
-
variant:
|
|
924
|
+
variant: a,
|
|
924
925
|
ctaLabel: d,
|
|
925
926
|
legalUrls: u,
|
|
926
|
-
session:
|
|
927
|
+
session: C,
|
|
927
928
|
headingId: c
|
|
928
929
|
}
|
|
929
930
|
),
|
|
@@ -931,40 +932,40 @@ function Be({
|
|
|
931
932
|
"p",
|
|
932
933
|
{
|
|
933
934
|
ref: v,
|
|
934
|
-
className:
|
|
935
|
+
className: q ? "usgb-form-status usgb-form-status-success" : "usgb-field-label--sr-only",
|
|
935
936
|
role: "status",
|
|
936
937
|
"aria-live": "polite",
|
|
937
|
-
tabIndex:
|
|
938
|
-
children:
|
|
938
|
+
tabIndex: q ? -1 : void 0,
|
|
939
|
+
children: q
|
|
939
940
|
}
|
|
940
941
|
)
|
|
941
942
|
]
|
|
942
943
|
}
|
|
943
944
|
);
|
|
944
945
|
}
|
|
945
|
-
function
|
|
946
|
+
function ze({
|
|
946
947
|
formId: t,
|
|
947
948
|
appearance: e = "on-light",
|
|
948
949
|
variant: n = "dense",
|
|
949
|
-
twoColumn:
|
|
950
|
-
heading:
|
|
950
|
+
twoColumn: a = !1,
|
|
951
|
+
heading: i,
|
|
951
952
|
subheading: r,
|
|
952
953
|
ctaLabel: l,
|
|
953
954
|
legalUrls: o,
|
|
954
955
|
successMessage: d,
|
|
955
956
|
successUrl: u,
|
|
956
|
-
adapter:
|
|
957
|
+
adapter: g,
|
|
957
958
|
analytics: b,
|
|
958
|
-
className:
|
|
959
|
-
onAccepted:
|
|
960
|
-
onFailed:
|
|
959
|
+
className: f,
|
|
960
|
+
onAccepted: S,
|
|
961
|
+
onFailed: k
|
|
961
962
|
}) {
|
|
962
|
-
const m =
|
|
963
|
+
const m = W(t), L = (m == null ? void 0 : m.kind) === "newsletter", y = L ? "" : n, c = !L && a;
|
|
963
964
|
if (!m)
|
|
964
965
|
return /* @__PURE__ */ h(
|
|
965
|
-
|
|
966
|
+
F,
|
|
966
967
|
{
|
|
967
|
-
className:
|
|
968
|
+
className: f,
|
|
968
969
|
appearance: e,
|
|
969
970
|
variantValue: y,
|
|
970
971
|
twoColumn: c,
|
|
@@ -977,9 +978,9 @@ function He({
|
|
|
977
978
|
const v = Y(m.consents);
|
|
978
979
|
if (v === null)
|
|
979
980
|
return /* @__PURE__ */ h(
|
|
980
|
-
|
|
981
|
+
F,
|
|
981
982
|
{
|
|
982
|
-
className:
|
|
983
|
+
className: f,
|
|
983
984
|
appearance: e,
|
|
984
985
|
variantValue: y,
|
|
985
986
|
twoColumn: c,
|
|
@@ -990,17 +991,17 @@ function He({
|
|
|
990
991
|
]
|
|
991
992
|
}
|
|
992
993
|
);
|
|
993
|
-
const p =
|
|
994
|
-
(
|
|
994
|
+
const p = qe(v).filter(
|
|
995
|
+
(q) => {
|
|
995
996
|
var P;
|
|
996
|
-
return !((P = o == null ? void 0 : o[
|
|
997
|
+
return !((P = o == null ? void 0 : o[q]) != null && P.trim());
|
|
997
998
|
}
|
|
998
999
|
);
|
|
999
1000
|
if (p.length)
|
|
1000
1001
|
return /* @__PURE__ */ h(
|
|
1001
|
-
|
|
1002
|
+
F,
|
|
1002
1003
|
{
|
|
1003
|
-
className:
|
|
1004
|
+
className: f,
|
|
1004
1005
|
appearance: e,
|
|
1005
1006
|
variantValue: y,
|
|
1006
1007
|
twoColumn: c,
|
|
@@ -1013,13 +1014,13 @@ function He({
|
|
|
1013
1014
|
]
|
|
1014
1015
|
}
|
|
1015
1016
|
);
|
|
1016
|
-
const
|
|
1017
|
-
(
|
|
1017
|
+
const w = m.fields.filter(
|
|
1018
|
+
(q) => !R(q.name)
|
|
1018
1019
|
);
|
|
1019
|
-
return
|
|
1020
|
-
|
|
1020
|
+
return w.length ? /* @__PURE__ */ h(
|
|
1021
|
+
F,
|
|
1021
1022
|
{
|
|
1022
|
-
className:
|
|
1023
|
+
className: f,
|
|
1023
1024
|
appearance: e,
|
|
1024
1025
|
variantValue: y,
|
|
1025
1026
|
twoColumn: c,
|
|
@@ -1029,11 +1030,11 @@ function He({
|
|
|
1029
1030
|
t,
|
|
1030
1031
|
":",
|
|
1031
1032
|
" ",
|
|
1032
|
-
|
|
1033
|
+
w.map((q) => q.name).join(", ")
|
|
1033
1034
|
]
|
|
1034
1035
|
}
|
|
1035
1036
|
) : m.kind in X ? /* @__PURE__ */ s(
|
|
1036
|
-
|
|
1037
|
+
Re,
|
|
1037
1038
|
{
|
|
1038
1039
|
formId: t,
|
|
1039
1040
|
definition: m,
|
|
@@ -1041,22 +1042,22 @@ function He({
|
|
|
1041
1042
|
variant: n,
|
|
1042
1043
|
variantValue: y,
|
|
1043
1044
|
twoColumn: c,
|
|
1044
|
-
heading:
|
|
1045
|
+
heading: i,
|
|
1045
1046
|
subheading: r,
|
|
1046
1047
|
ctaLabel: l ?? m.ctaLabel,
|
|
1047
1048
|
legalUrls: o,
|
|
1048
1049
|
successMessage: d,
|
|
1049
1050
|
successUrl: u,
|
|
1050
|
-
adapter:
|
|
1051
|
+
adapter: g,
|
|
1051
1052
|
analytics: b,
|
|
1052
|
-
className:
|
|
1053
|
-
onAccepted:
|
|
1054
|
-
onFailed:
|
|
1053
|
+
className: f,
|
|
1054
|
+
onAccepted: S,
|
|
1055
|
+
onFailed: k
|
|
1055
1056
|
}
|
|
1056
1057
|
) : /* @__PURE__ */ h(
|
|
1057
|
-
|
|
1058
|
+
F,
|
|
1058
1059
|
{
|
|
1059
|
-
className:
|
|
1060
|
+
className: f,
|
|
1060
1061
|
appearance: e,
|
|
1061
1062
|
variantValue: y,
|
|
1062
1063
|
twoColumn: c,
|
|
@@ -1069,12 +1070,12 @@ function He({
|
|
|
1069
1070
|
);
|
|
1070
1071
|
}
|
|
1071
1072
|
function Ye(t = {}) {
|
|
1072
|
-
const e = typeof t == "string" ? { host: t } : t, n = e.host ?? "pwa",
|
|
1073
|
+
const e = typeof t == "string" ? { host: t } : t, n = e.host ?? "pwa", a = e.delayMs ?? 400, i = e.result ?? { status: "accepted" };
|
|
1073
1074
|
return {
|
|
1074
1075
|
host: n,
|
|
1075
1076
|
async submit(r) {
|
|
1076
1077
|
var l;
|
|
1077
|
-
return (l = e.onSubmit) == null || l.call(e, r), await new Promise((o) => setTimeout(o,
|
|
1078
|
+
return (l = e.onSubmit) == null || l.call(e, r), await new Promise((o) => setTimeout(o, a)), i;
|
|
1078
1079
|
}
|
|
1079
1080
|
};
|
|
1080
1081
|
}
|
|
@@ -1095,37 +1096,37 @@ const Ze = {
|
|
|
1095
1096
|
};
|
|
1096
1097
|
function Qe(t, e) {
|
|
1097
1098
|
return e.every((n) => {
|
|
1098
|
-
var
|
|
1099
|
-
return !!((
|
|
1099
|
+
var a;
|
|
1100
|
+
return !!((a = t == null ? void 0 : t[n]) != null && a.trim());
|
|
1100
1101
|
});
|
|
1101
1102
|
}
|
|
1102
1103
|
export {
|
|
1103
1104
|
Q as Button,
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1105
|
+
Ae as ConsentField,
|
|
1106
|
+
Se as FIELD_REGISTRY,
|
|
1107
|
+
G as FieldError,
|
|
1108
|
+
Ve as FieldLabel,
|
|
1108
1109
|
he as LEAD_CLICKWRAP,
|
|
1109
1110
|
be as LEAD_CLICKWRAP_V2,
|
|
1110
|
-
|
|
1111
|
+
ge as LEAD_SMS,
|
|
1111
1112
|
ue as LEAD_TCPA,
|
|
1112
1113
|
me as LEAD_TCPA_V2,
|
|
1113
1114
|
pe as LEAD_TCPA_V3,
|
|
1114
|
-
|
|
1115
|
+
fe as LEAD_TOSPP,
|
|
1115
1116
|
Ze as LEGAL_URL_ATTRS,
|
|
1116
1117
|
Je as PWA_LEGAL_URLS,
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1118
|
+
Ee as TextField,
|
|
1119
|
+
ze as UsgbForm,
|
|
1120
|
+
qe as collectRequiredLegalUrls,
|
|
1121
|
+
Ce as createIdempotencyKey,
|
|
1121
1122
|
Ye as createStubAdapter,
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1123
|
+
E as formsManifest,
|
|
1124
|
+
we as getConsentDefinition,
|
|
1125
|
+
R as getFieldDefinition,
|
|
1126
|
+
W as getFormDefinition,
|
|
1126
1127
|
Qe as isCompleteLegalUrls,
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1128
|
+
je as listEditorOptions,
|
|
1129
|
+
We as listFormDefinitions,
|
|
1130
|
+
j as resolveConsentCopy,
|
|
1130
1131
|
Y as resolveFormConsents
|
|
1131
1132
|
};
|