aw-wizard-forms 4.9.0 → 4.9.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wizard-form.esm.js","sources":["../src/adapters/hubspot.ts","../src/adapters/webhook.ts","../src/adapters/revenuehero.ts","../node_modules/@lit/reactive-element/css-tag.js","../node_modules/@lit/reactive-element/reactive-element.js","../node_modules/lit-html/lit-html.js","../node_modules/lit-element/lit-element.js","../node_modules/@lit/reactive-element/decorators/custom-element.js","../node_modules/@lit/reactive-element/decorators/property.js","../node_modules/@lit/reactive-element/decorators/state.js","../node_modules/@lit/reactive-element/decorators/base.js","../node_modules/@lit/reactive-element/decorators/query.js","../src/styles/shared.styles.ts","../src/components/wizard-form.styles.ts","../src/controllers/FormStateController.ts","../src/controllers/KeyboardController.ts","../src/components/wf-badge.styles.ts","../src/components/wf-badge.ts","../src/components/wizard-form.ts","../src/components/wf-step.styles.ts","../src/components/wf-step.ts","../src/components/wf-layout.styles.ts","../src/components/wf-layout.ts","../src/components/wf-options.styles.ts","../src/components/wf-other.styles.ts","../src/components/wf-other.ts","../src/components/wf-options.ts","../src/components/wf-option.styles.ts","../src/components/wf-option.ts","../src/components/base/form-input-base.styles.ts","../src/components/base/form-input-base.ts","../src/controllers/ValidationController.ts","../src/components/wf-email.ts","../src/components/wf-input.ts","../src/components/wf-number.ts","../src/components/wf-textarea.ts","../src/init.ts","../src/components/wf-progress.styles.ts","../src/components/wf-progress.ts","../src/components/base/navigation-button-base.ts","../src/components/wf-next-btn.styles.ts","../src/components/wf-next-btn.ts","../src/components/wf-back-btn.styles.ts","../src/components/wf-back-btn.ts"],"sourcesContent":["/**\n * HubSpot Adapter - Submit form data to HubSpot Forms API\n *\n * This adapter formats the payload for HubSpot's Forms API v3.\n * The consumer website loads the HubSpot tracking script separately.\n *\n * @example\n * const adapter = createHubSpotAdapter({\n * portalId: '12345678',\n * formId: 'abc-123-def',\n * fieldMapping: { fullName: 'firstname' }\n * });\n * await adapter.submit(formData, context);\n */\n\nimport type {\n FormData,\n SubmissionContext,\n SubmissionResult,\n SubmissionAdapter,\n HubSpotConfig,\n HubSpotSubmissionPayload,\n HubSpotField,\n} from './types.js';\n\n/**\n * Get HubSpot tracking cookie (hutk)\n */\nexport function getHubSpotCookie(): string | undefined {\n if (typeof document === 'undefined') {return undefined;}\n\n const match = document.cookie.match(/hubspotutk=([^;]+)/);\n return match ? match[1] : undefined;\n}\n\n/**\n * Create a HubSpot submission adapter\n */\nexport function createHubSpotAdapter(config: HubSpotConfig): SubmissionAdapter {\n const { portalId, formId, fieldMapping = {}, mock = false } = config;\n\n return {\n name: 'hubspot',\n\n mapFields(data: FormData): FormData {\n const mapped: FormData = {};\n for (const [key, value] of Object.entries(data)) {\n const mappedKey = fieldMapping[key] || key;\n mapped[mappedKey] = value;\n }\n return mapped;\n },\n\n async submit(data: FormData, context: SubmissionContext): Promise<SubmissionResult> {\n // Mock mode for testing\n if (mock) {\n await new Promise((resolve) => setTimeout(resolve, 500));\n return { success: true, data: { mock: true, formData: data } };\n }\n\n const endpoint = `https://api.hsforms.com/submissions/v3/integration/submit/${portalId}/${formId}`;\n\n // Map fields to HubSpot format\n const mappedData = this.mapFields(data);\n const fields: HubSpotField[] = Object.entries(mappedData).map(([name, value]) => ({\n name,\n value: Array.isArray(value) ? value.join(';') : String(value ?? ''),\n }));\n\n const payload: HubSpotSubmissionPayload = {\n fields,\n context: {\n pageUri: context.pageUrl,\n pageName: context.pageTitle,\n hutk: getHubSpotCookie(),\n },\n };\n\n try {\n const response = await fetch(endpoint, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(payload),\n });\n\n if (!response.ok) {\n const errorData = await response.json().catch(() => ({}));\n const errorMessage =\n errorData.message || `HubSpot submission failed: ${response.status}`;\n return { success: false, error: errorMessage };\n }\n\n const responseData = await response.json();\n return { success: true, data: responseData };\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Network error';\n return { success: false, error: errorMessage };\n }\n },\n };\n}\n\nexport type { HubSpotConfig };\n","/**\n * Webhook Adapter - Submit form data to any webhook endpoint\n *\n * A generic adapter for sending form data to any HTTP endpoint.\n *\n * @example\n * const adapter = createWebhookAdapter({\n * url: 'https://api.example.com/forms',\n * headers: { 'Authorization': 'Bearer token' }\n * });\n * await adapter.submit(formData, context);\n */\n\nimport type {\n FormData,\n SubmissionContext,\n SubmissionResult,\n SubmissionAdapter,\n WebhookConfig,\n} from './types.js';\n\n/**\n * Create a webhook submission adapter\n */\nexport function createWebhookAdapter(config: WebhookConfig): SubmissionAdapter {\n const { url, method = 'POST', headers = {}, fieldMapping = {}, mock = false } = config;\n\n return {\n name: 'webhook',\n\n mapFields(data: FormData): FormData {\n const mapped: FormData = {};\n for (const [key, value] of Object.entries(data)) {\n const mappedKey = fieldMapping[key] || key;\n mapped[mappedKey] = value;\n }\n return mapped;\n },\n\n async submit(data: FormData, context: SubmissionContext): Promise<SubmissionResult> {\n // Mock mode for testing\n if (mock) {\n await new Promise((resolve) => setTimeout(resolve, 500));\n return { success: true, data: { mock: true, formData: data } };\n }\n\n if (!url) {\n return { success: false, error: 'Webhook URL is required' };\n }\n\n const mappedData = this.mapFields(data);\n\n const payload = {\n formData: mappedData,\n context: {\n pageUrl: context.pageUrl,\n pageTitle: context.pageTitle,\n referrer: context.referrer,\n submittedAt: context.timestamp,\n },\n };\n\n try {\n const response = await fetch(url, {\n method,\n headers: {\n 'Content-Type': 'application/json',\n ...headers,\n },\n body: JSON.stringify(payload),\n });\n\n if (!response.ok) {\n const errorText = await response.text().catch(() => '');\n return {\n success: false,\n error: `Webhook failed: ${response.status} ${errorText}`.trim(),\n };\n }\n\n // Try to parse JSON response, fall back to success with no data\n let responseData: unknown;\n try {\n responseData = await response.json();\n } catch {\n responseData = { status: response.status };\n }\n\n return { success: true, data: responseData };\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Network error';\n return { success: false, error: errorMessage };\n }\n },\n };\n}\n\nexport type { WebhookConfig };\n","/**\n * RevenueHero Adapter - Trigger RevenueHero calendar scheduling\n *\n * This adapter triggers the RevenueHero scheduler after form submission.\n * The consumer website loads the RevenueHero SDK separately.\n *\n * @example\n * const adapter = createRevenueHeroAdapter({\n * routerId: 'your-router-id'\n * });\n * await adapter.submit(formData, context);\n */\n\nimport type {\n FormData,\n SubmissionContext,\n SubmissionResult,\n SubmissionAdapter,\n RevenueHeroConfig,\n} from './types.js';\n\n/**\n * Check if RevenueHero SDK is loaded\n */\nexport function isRevenueHeroLoaded(): boolean {\n return typeof window !== 'undefined' && typeof window.RevenueHero !== 'undefined';\n}\n\n/**\n * Create a RevenueHero submission adapter\n *\n * Note: This adapter triggers the RevenueHero scheduler but doesn't\n * submit data to a backend. Use it in combination with another adapter\n * (like HubSpot or webhook) for data persistence.\n */\nexport function createRevenueHeroAdapter(config: RevenueHeroConfig): SubmissionAdapter {\n const { routerId, fieldMapping = {}, mock = false } = config;\n\n return {\n name: 'revenuehero',\n\n mapFields(data: FormData): FormData {\n const mapped: FormData = {};\n for (const [key, value] of Object.entries(data)) {\n const mappedKey = fieldMapping[key] || key;\n mapped[mappedKey] = value;\n }\n return mapped;\n },\n\n async submit(data: FormData, _context: SubmissionContext): Promise<SubmissionResult> {\n // Mock mode for testing\n if (mock) {\n await new Promise((resolve) => setTimeout(resolve, 500));\n return { success: true, data: { mock: true, scheduled: true } };\n }\n\n if (!routerId) {\n return { success: false, error: 'RevenueHero router ID is required' };\n }\n\n // Check if SDK is loaded\n if (!isRevenueHeroLoaded()) {\n console.warn(\n '[RevenueHeroAdapter] RevenueHero SDK not loaded. ' +\n 'Load the SDK in your page: <script src=\"https://app.revenuehero.io/js/widget.js\"></script>'\n );\n return {\n success: false,\n error: 'RevenueHero SDK not loaded. Please load the SDK in your page.',\n };\n }\n\n const mappedData = this.mapFields(data);\n\n // Extract email (required for RevenueHero)\n const email = String(mappedData.email || mappedData.workEmail || '');\n if (!email) {\n return { success: false, error: 'Email is required for RevenueHero scheduling' };\n }\n\n try {\n // Trigger RevenueHero scheduler\n window.RevenueHero!.schedule({\n routerId,\n email,\n ...mappedData,\n });\n\n return {\n success: true,\n data: { scheduled: true, email },\n };\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'RevenueHero error';\n return { success: false, error: errorMessage };\n }\n },\n };\n}\n\nexport type { RevenueHeroConfig };\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1],t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,css,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null}}requestUpdate(t,s,i,e=!1,h){if(void 0!==t){const r=this.constructor;if(!1===e&&(h=this[t]),i??=r.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:\"open\"},y[d(\"elementProperties\")]=new Map,y[d(\"finalized\")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push(\"2.1.2\");export{y as ReactiveElement,s as adoptStyles,u as defaultConverter,t as getCompatibleStyle,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t=>t,s=t.trustedTypes,e=s?s.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,h=\"$lit$\",o=`lit$${Math.random().toFixed(9).slice(2)}$`,n=\"?\"+o,r=`<${n}>`,l=document,c=()=>l.createComment(\"\"),a=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,u=Array.isArray,d=t=>u(t)||\"function\"==typeof t?.[Symbol.iterator],f=\"[ \\t\\n\\f\\r]\",v=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${f}(?:([^\\\\s\"'>=/]+)(${f}*=${f}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),g=/'/g,$=/\"/g,y=/^(?:script|style|textarea|title)$/i,x=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),b=x(1),w=x(2),T=x(3),E=Symbol.for(\"lit-noChange\"),A=Symbol.for(\"lit-nothing\"),C=new WeakMap,P=l.createTreeWalker(l,129);function V(t,i){if(!u(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==e?e.createHTML(i):i}const N=(t,i)=>{const s=t.length-1,e=[];let n,l=2===i?\"<svg>\":3===i?\"<math>\":\"\",c=v;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,f=0;for(;f<s.length&&(c.lastIndex=f,u=c.exec(s),null!==u);)f=c.lastIndex,c===v?\"!--\"===u[1]?c=_:void 0!==u[1]?c=m:void 0!==u[2]?(y.test(u[2])&&(n=RegExp(\"</\"+u[2],\"g\")),c=p):void 0!==u[3]&&(c=p):c===p?\">\"===u[0]?(c=n??v,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?p:'\"'===u[3]?$:g):c===$||c===g?c=p:c===_||c===m?c=v:(c=p,n=void 0);const x=c===p&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===v?s+r:d>=0?(e.push(a),s.slice(0,d)+h+s.slice(d)+o+x):s+o+(-2===d?i:x)}return[V(t,l+(t[s]||\"<?>\")+(2===i?\"</svg>\":3===i?\"</math>\":\"\")),e]};class S{constructor({strings:t,_$litType$:i},e){let r;this.parts=[];let l=0,a=0;const u=t.length-1,d=this.parts,[f,v]=N(t,i);if(this.el=S.createElement(f,e),P.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=P.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(h)){const i=v[a++],s=r.getAttribute(t).split(o),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:l,name:e[2],strings:s,ctor:\".\"===e[1]?I:\"?\"===e[1]?L:\"@\"===e[1]?z:H}),r.removeAttribute(t)}else t.startsWith(o)&&(d.push({type:6,index:l}),r.removeAttribute(t));if(y.test(r.tagName)){const t=r.textContent.split(o),i=t.length-1;if(i>0){r.textContent=s?s.emptyScript:\"\";for(let s=0;s<i;s++)r.append(t[s],c()),P.nextNode(),d.push({type:2,index:++l});r.append(t[i],c())}}}else if(8===r.nodeType)if(r.data===n)d.push({type:2,index:l});else{let t=-1;for(;-1!==(t=r.data.indexOf(o,t+1));)d.push({type:7,index:l}),t+=o.length-1}l++}}static createElement(t,i){const s=l.createElement(\"template\");return s.innerHTML=t,s}}function M(t,i,s=t,e){if(i===E)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=a(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=M(t,h._$AS(t,i.values),h,e)),i}class R{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??l).importNode(i,!0);P.currentNode=e;let h=P.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let i;2===r.type?i=new k(h,h.nextSibling,this,t):1===r.type?i=new r.ctor(h,r.name,r.strings,this,t):6===r.type&&(i=new Z(h,this,t)),this._$AV.push(i),r=s[++n]}o!==r?.index&&(h=P.nextNode(),o++)}return P.currentNode=l,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class k{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=M(this,t,i),a(t)?t===A||null==t||\"\"===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==E&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):d(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==A&&a(this._$AH)?this._$AA.nextSibling.data=t:this.T(l.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:s}=t,e=\"number\"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=S.createElement(V(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new R(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t}}_$AC(t){let i=C.get(t.strings);return void 0===i&&C.set(t.strings,i=new S(t)),i}k(t){u(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new k(this.O(c()),this.O(c()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t!==this._$AB;){const s=i(t).nextSibling;i(t).remove(),t=s}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=M(this,t,i,0),o=!a(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M(this,e[s+n],i,n),r===E&&(r=this._$AH[n]),o||=!a(r)||r!==this._$AH[n],r===A?t=A:t!==A&&(t+=(r??\"\")+h[n+1]),this._$AH[n]=r}o&&!e&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??\"\")}}class I extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}}class L extends H{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A)}}class z extends H{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=M(this,t,i,0)??A)===E)return;const s=this._$AH,e=t===A&&s!==A||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==A&&(s===A||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){\"function\"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const j={M:h,P:o,A:n,C:1,L:N,R,D:d,V:M,I:k,H,N:L,U:z,B:I,F:Z},B=t.litHtmlPolyfillSupport;B?.(S,k),(t.litHtmlVersions??=[]).push(\"3.3.2\");const D=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new k(i.insertBefore(c(),t),t,void 0,s??{})}return h._$AI(t),h};export{j as _$LH,b as html,T as mathml,E as noChange,A as nothing,D as render,w as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as r}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s=globalThis;class i extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return r}}i._$litElement$=!0,i[\"finalized\"]=!0,s.litElementHydrateSupport?.({LitElement:i});const o=s.litElementPolyfillSupport;o?.({LitElement:i});const n={_$AK:(t,e,r)=>{t._$AK(e,r)},_$AL:t=>t._$AL};(s.litElementVersions??=[]).push(\"4.2.2\");export{i as LitElement,n as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=t=>(e,o)=>{void 0!==o?o.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)};export{t as customElement};\n//# sourceMappingURL=custom-element.js.map\n","import{notEqual as t,defaultConverter as e}from\"../reactive-element.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o={attribute:!0,type:String,converter:e,reflect:!1,hasChanged:t},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),\"setter\"===n&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),\"accessor\"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t,!0,r)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if(\"setter\"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t,!0,r)}}throw Error(\"Unsupported decorator location: \"+n)};function n(t){return(e,o)=>\"object\"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};\n//# sourceMappingURL=property.js.map\n","import{property as t}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function r(r){return t({...r,state:!0,attribute:!1})}export{r as state};\n//# sourceMappingURL=state.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst e=(e,t,c)=>(c.configurable=!0,c.enumerable=!0,Reflect.decorate&&\"object\"!=typeof t&&Object.defineProperty(e,t,c),c);export{e as desc};\n//# sourceMappingURL=base.js.map\n","import{desc as t}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function e(e,r){return(n,s,i)=>{const o=t=>t.renderRoot?.querySelector(e)??null;if(r){const{get:e,set:r}=\"object\"==typeof s?n:i??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return t(n,s,{get(){let t=e.call(this);return void 0===t&&(t=o(this),(null!==t||this.hasUpdated)&&r.call(this,t)),t}})}return t(n,s,{get(){return o(this)}})}}export{e as query};\n//# sourceMappingURL=query.js.map\n","/**\n * Shared styles for Shadow DOM components\n *\n * Contains:\n * - CSS custom properties (design tokens)\n * - Shared animations (@keyframes)\n * - Common utility styles\n *\n * Import and spread into component's static styles array:\n * static styles = [sharedStyles, css`...`];\n */\n\nimport { css } from 'lit';\n\n/**\n * Design tokens - CSS custom properties\n * These are defined on :host of wizard-form and pierce Shadow DOM boundaries\n */\nexport const designTokens = css`\n /* Colors */\n --wf-color-primary: #8040f0;\n --wf-color-primary-border: #602cbb;\n --wf-color-primary-light: rgba(128, 64, 240, 0.08);\n --wf-color-surface: #f3f3f5;\n --wf-color-surface-hover: #e9e9eb;\n --wf-color-border: #d4d4d4;\n --wf-color-text: #0a0a0a;\n --wf-color-text-secondary: #404040;\n --wf-color-text-muted: #646464;\n --wf-color-error: #dc3545;\n --wf-color-error-light: rgba(220, 53, 69, 0.1);\n --wf-color-badge-bg: #fcfcfc;\n --wf-color-badge-border: #d4d4d4;\n --wf-color-badge-text: #5f5f5f;\n --wf-color-progress-active: rgba(0, 0, 0, 0.1);\n --wf-color-progress-inactive: rgba(0, 0, 0, 0.05);\n\n /* Focus ring */\n --wf-focus-ring-width: 3px;\n --wf-focus-ring-primary: rgba(128, 64, 240, 0.2);\n --wf-focus-ring-error: rgba(220, 53, 69, 0.2);\n\n /* Spacing scale */\n --wf-spacing-05: 2px;\n --wf-spacing-1: 4px;\n --wf-spacing-2: 8px;\n --wf-spacing-3: 12px;\n --wf-spacing-4: 16px;\n --wf-spacing-5: 20px;\n --wf-spacing-6: 24px;\n --wf-spacing-8: 32px;\n\n /* Border radius */\n --wf-radius-sm: 4px;\n --wf-radius-md: 8px;\n --wf-radius-lg: 8px;\n --wf-radius-full: 99px;\n\n /* Typography */\n --wf-font-size-xs: 0.75rem;\n --wf-font-size-sm: 0.875rem;\n --wf-font-size-base: 1rem;\n --wf-font-size-lg: 1.25rem;\n --wf-font-size-xl: 1.5rem;\n --wf-font-size-2xl: 2rem;\n --wf-font-size-3xl: 2.5rem;\n --wf-font-family-mono: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;\n --wf-font-weight-input: 400;\n --wf-font-weight-label: 500;\n --wf-font-weight-heading: 600;\n --wf-font-weight-button: 400;\n\n /* Input dimensions */\n --wf-input-min-height: 56px;\n --wf-textarea-min-height: 100px;\n\n /* Component dimensions */\n --wf-btn-min-height: 48px;\n --wf-badge-size: 24px;\n --wf-spinner-size: 20px;\n --wf-progress-height: 4px;\n\n /* Frosted glass effect (iOS-style) */\n --wf-glass-bg: rgba(255, 255, 255, 0.7);\n --wf-glass-bg-hover: rgba(255, 255, 255, 0.85);\n --wf-glass-border: rgba(0, 0, 0, 0.1);\n --wf-glass-blur: 20px;\n --wf-glass-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);\n`;\n\n/**\n * Design tokens wrapped in :host for standalone components\n * Use this in components that may be rendered outside wizard-form\n */\nexport const hostTokens = css`\n :host {\n ${designTokens}\n }\n`;\n\n/**\n * Dark theme token overrides\n */\nexport const darkThemeTokens = css`\n --wf-color-surface: #2d2d2d;\n --wf-color-surface-hover: #3d3d3d;\n --wf-color-border: #4d4d4d;\n --wf-color-text: #f8f9fa;\n --wf-color-text-secondary: #d0d0d0;\n --wf-color-text-muted: #adb5bd;\n --wf-color-badge-bg: #3d3d3d;\n --wf-color-badge-border: #4d4d4d;\n --wf-color-badge-text: #adb5bd;\n --wf-color-progress-active: rgba(200, 200, 200, 0.6);\n --wf-color-progress-inactive: rgba(100, 100, 100, 0.6);\n\n /* Dark theme frosted glass */\n --wf-glass-bg: rgba(45, 45, 45, 0.7);\n --wf-glass-bg-hover: rgba(60, 60, 60, 0.8);\n --wf-glass-border: rgba(255, 255, 255, 0.1);\n`;\n\n/**\n * Shared animations used across components\n */\nexport const sharedAnimations = css`\n @keyframes wf-spin {\n to {\n transform: rotate(360deg);\n }\n }\n\n @keyframes wf-blink {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.5;\n }\n }\n\n @keyframes wf-stepFadeIn {\n from {\n opacity: 0;\n transform: translateY(10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n\n @keyframes wf-stepFadeOut {\n from {\n opacity: 1;\n transform: translateY(0);\n }\n to {\n opacity: 0;\n transform: translateY(-10px);\n }\n }\n\n @keyframes wf-stepSlideInRight {\n from {\n opacity: 0;\n transform: translateX(30px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n }\n\n @keyframes wf-stepSlideInLeft {\n from {\n opacity: 0;\n transform: translateX(-30px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n }\n`;\n\n/**\n * Common button base styles\n */\nexport const buttonBaseStyles = css`\n .wf-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--wf-spacing-2);\n padding: var(--wf-spacing-3) var(--wf-spacing-4);\n min-height: var(--wf-btn-min-height);\n font-size: var(--wf-font-size-base);\n font-weight: var(--wf-font-weight-button);\n font-family: inherit;\n border-radius: var(--wf-radius-md);\n cursor: pointer;\n transition: all 150ms ease;\n border: 1px solid transparent;\n outline: none;\n box-sizing: border-box;\n }\n\n .wf-btn:focus-visible {\n box-shadow: 0 0 0 var(--wf-focus-ring-width) var(--wf-focus-ring-primary);\n }\n\n .wf-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n`;\n\n/**\n * Glass morphism styles (frosted glass effect)\n */\nexport const glassStyles = css`\n .wf-glass {\n background: var(--wf-glass-bg);\n backdrop-filter: blur(var(--wf-glass-blur));\n -webkit-backdrop-filter: blur(var(--wf-glass-blur));\n border: 1px solid var(--wf-glass-border);\n box-shadow: var(--wf-glass-shadow);\n }\n\n .wf-glass:hover {\n background: var(--wf-glass-bg-hover);\n }\n`;\n\n/* Note: Input base styles (.wf-field-container, .wf-label, .wf-input, .wf-error-message, etc.)\n are now in Shadow DOM - see src/components/base/form-input-base.styles.ts */\n\n/**\n * Default shared styles to include in all components\n * Contains animations and resets\n */\nexport const sharedStyles = css`\n ${sharedAnimations}\n\n * {\n box-sizing: border-box;\n }\n`;\n","/**\n * Wizard-Form styles for Shadow DOM\n *\n * Defines all CSS custom properties (design tokens) on :host\n * These properties pierce Shadow DOM and are available to all child components.\n */\n\nimport { css } from 'lit';\n\nimport { sharedAnimations } from '../styles/shared.styles.js';\n\nexport const wizardFormStyles = [\n sharedAnimations,\n css`\n /* ----------------------------------------\n :host - Design tokens & base styles\n ---------------------------------------- */\n :host {\n display: block;\n\n /* Color tokens */\n --wf-color-primary: #8040f0;\n --wf-color-primary-border: #602cbb;\n --wf-color-primary-light: rgba(128, 64, 240, 0.08);\n --wf-color-surface: #f3f3f5;\n --wf-color-surface-hover: #e9e9eb;\n --wf-color-border: #d4d4d4;\n --wf-color-text: #0a0a0a;\n --wf-color-text-secondary: #404040;\n --wf-color-text-muted: #646464;\n --wf-color-error: #dc3545;\n --wf-color-error-light: rgba(220, 53, 69, 0.1);\n --wf-color-badge-bg: #fcfcfc;\n --wf-color-badge-border: #d4d4d4;\n --wf-color-badge-text: #5f5f5f;\n --wf-color-progress-active: rgba(0, 0, 0, 0.1);\n --wf-color-progress-inactive: rgba(0, 0, 0, 0.05);\n\n /* Focus ring */\n --wf-focus-ring-width: 3px;\n --wf-focus-ring-primary: rgba(128, 64, 240, 0.2);\n --wf-focus-ring-error: rgba(220, 53, 69, 0.2);\n\n /* Spacing tokens */\n --wf-spacing-05: 2px;\n --wf-spacing-1: 4px;\n --wf-spacing-2: 8px;\n --wf-spacing-3: 12px;\n --wf-spacing-4: 16px;\n --wf-spacing-5: 20px;\n --wf-spacing-6: 24px;\n --wf-spacing-8: 32px;\n\n /* Border radius tokens */\n --wf-radius-sm: 4px;\n --wf-radius-md: 8px;\n --wf-radius-lg: 8px;\n --wf-radius-full: 99px;\n\n /* Typography tokens */\n --wf-font-size-xs: 0.75rem;\n --wf-font-size-sm: 0.875rem;\n --wf-font-size-base: 1rem;\n --wf-font-size-lg: 1.25rem;\n --wf-font-size-xl: 1.5rem;\n --wf-font-size-2xl: 2rem;\n --wf-font-size-3xl: 2.5rem;\n --wf-font-family-mono: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;\n --wf-font-weight-input: 400;\n --wf-font-weight-label: 500;\n --wf-font-weight-heading: 600;\n --wf-font-weight-button: 400;\n\n /* Input tokens */\n --wf-input-min-height: 56px;\n --wf-textarea-min-height: 100px;\n\n /* Component dimensions */\n --wf-btn-min-height: 48px;\n --wf-badge-size: 24px;\n --wf-spinner-size: 20px;\n --wf-progress-height: 4px;\n\n /* Frosted glass effect (iOS-style) */\n --wf-glass-bg: rgba(255, 255, 255, 0.7);\n --wf-glass-bg-hover: rgba(255, 255, 255, 0.85);\n --wf-glass-border: rgba(0, 0, 0, 0.1);\n --wf-glass-blur: 20px;\n --wf-glass-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);\n }\n\n :host([hidden]) {\n display: none;\n }\n\n /* Dark theme */\n :host([theme='dark']) {\n --wf-color-surface: #2d2d2d;\n --wf-color-surface-hover: #3d3d3d;\n --wf-color-border: #4d4d4d;\n --wf-color-text: #f8f9fa;\n --wf-color-text-secondary: #d0d0d0;\n --wf-color-text-muted: #adb5bd;\n --wf-color-badge-bg: #3d3d3d;\n --wf-color-badge-border: #4d4d4d;\n --wf-color-badge-text: #adb5bd;\n --wf-color-progress-active: rgba(200, 200, 200, 0.6);\n --wf-color-progress-inactive: rgba(100, 100, 100, 0.6);\n\n /* Dark theme frosted glass */\n --wf-glass-bg: rgba(45, 45, 45, 0.7);\n --wf-glass-bg-hover: rgba(60, 60, 60, 0.8);\n --wf-glass-border: rgba(255, 255, 255, 0.1);\n }\n\n /* Auto theme (respects system preference) */\n @media (prefers-color-scheme: dark) {\n :host([theme='auto']) {\n --wf-color-surface: #2d2d2d;\n --wf-color-surface-hover: #3d3d3d;\n --wf-color-border: #4d4d4d;\n --wf-color-text: #f8f9fa;\n --wf-color-text-secondary: #d0d0d0;\n --wf-color-text-muted: #adb5bd;\n --wf-color-badge-bg: #3d3d3d;\n --wf-color-badge-border: #4d4d4d;\n --wf-color-badge-text: #adb5bd;\n --wf-color-progress-active: rgba(200, 200, 200, 0.6);\n --wf-color-progress-inactive: rgba(100, 100, 100, 0.6);\n\n /* Dark theme frosted glass */\n --wf-glass-bg: rgba(45, 45, 45, 0.7);\n --wf-glass-bg-hover: rgba(60, 60, 60, 0.8);\n --wf-glass-border: rgba(255, 255, 255, 0.1);\n }\n }\n\n /* ----------------------------------------\n Container\n ---------------------------------------- */\n .wf-container {\n margin: 0 auto;\n }\n\n /* ----------------------------------------\n Success screen\n ---------------------------------------- */\n .wf-success-screen {\n text-align: center;\n padding: var(--wf-spacing-6);\n }\n\n /* ----------------------------------------\n Error message\n ---------------------------------------- */\n .wf-form-error {\n padding: var(--wf-spacing-4);\n margin-bottom: var(--wf-spacing-4);\n background-color: var(--wf-color-error-light);\n border: 1px solid var(--wf-color-error);\n border-radius: var(--wf-radius-md);\n color: var(--wf-color-error);\n font-size: var(--wf-font-size-base);\n }\n\n /* ----------------------------------------\n Slot styles\n ---------------------------------------- */\n ::slotted(wf-step) {\n display: none;\n width: 100%;\n }\n\n ::slotted(wf-step[active]) {\n display: block;\n animation: wf-stepFadeIn 0.3s ease forwards;\n }\n\n ::slotted(wf-step[direction='forward'][active]) {\n animation: wf-stepSlideInRight 0.3s ease forwards;\n }\n\n ::slotted(wf-step[direction='backward'][active]) {\n animation: wf-stepSlideInLeft 0.3s ease forwards;\n }\n\n ::slotted(wf-step[leaving]) {\n display: block;\n animation: wf-stepFadeOut 0.2s ease forwards;\n }\n\n /* Success slot hidden by default, shown when submitted */\n ::slotted([slot='success']) {\n display: none;\n }\n\n :host([submitted]) ::slotted([slot='success']) {\n display: block;\n }\n\n :host([submitted]) ::slotted(wf-step) {\n display: none !important;\n }\n`,\n];\n","/**\n * FormStateController - Centralized state management for wizard forms\n *\n * Uses Lit's ReactiveController pattern for automatic re-rendering\n * when state changes.\n */\n\nimport type { ReactiveController, ReactiveControllerHost } from 'lit';\n\nimport type { FormState, FieldValidation, ValidationResult, StepConfig } from '../types.js';\n\ntype StateSubscriber = (state: FormState) => void;\n\nexport class FormStateController implements ReactiveController {\n host: ReactiveControllerHost;\n\n // Internal state\n private _formData: Record<string, unknown> = {};\n private _validation: Record<string, FieldValidation> = {};\n private _currentStep = 1;\n private _totalSteps = 0;\n private _submitting = false;\n private _submitted = false;\n private _error?: string;\n private _stepConfigs: Map<number, StepConfig> = new Map();\n private _subscribers: Set<StateSubscriber> = new Set();\n\n constructor(host: ReactiveControllerHost) {\n this.host = host;\n host.addController(this);\n }\n\n // ============================================\n // Lifecycle\n // ============================================\n\n hostConnected(): void {\n // Controller connected to host\n }\n\n hostDisconnected(): void {\n // Clean up subscriptions\n this._subscribers.clear();\n }\n\n // ============================================\n // State Getters\n // ============================================\n\n get formData(): Record<string, unknown> {\n return { ...this._formData };\n }\n\n get validation(): Record<string, FieldValidation> {\n return { ...this._validation };\n }\n\n get currentStep(): number {\n return this._currentStep;\n }\n\n get totalSteps(): number {\n return this._totalSteps;\n }\n\n get submitting(): boolean {\n return this._submitting;\n }\n\n get submitted(): boolean {\n return this._submitted;\n }\n\n get error(): string | undefined {\n return this._error;\n }\n\n get state(): FormState {\n return {\n formData: this.formData,\n validation: this.validation,\n currentStep: this._currentStep,\n totalSteps: this._totalSteps,\n submitting: this._submitting,\n submitted: this._submitted,\n error: this._error,\n };\n }\n\n // ============================================\n // State Mutations\n // ============================================\n\n setValue(name: string, value: unknown): void {\n this._formData[name] = value;\n\n // Mark field as dirty\n if (this._validation[name]) {\n this._validation[name] = {\n ...this._validation[name],\n value,\n dirty: true,\n };\n } else {\n this._validation[name] = {\n name,\n value,\n result: { valid: true },\n touched: false,\n dirty: true,\n };\n }\n\n this._notifyChange();\n }\n\n getValue(name: string): unknown {\n return this._formData[name];\n }\n\n setValidation(name: string, result: ValidationResult): void {\n const existing = this._validation[name];\n this._validation[name] = {\n name,\n value: existing?.value ?? this._formData[name],\n result,\n touched: existing?.touched ?? false,\n dirty: existing?.dirty ?? false,\n };\n this._notifyChange();\n }\n\n markTouched(name: string): void {\n if (this._validation[name]) {\n this._validation[name] = {\n ...this._validation[name],\n touched: true,\n };\n } else {\n this._validation[name] = {\n name,\n value: this._formData[name],\n result: { valid: true },\n touched: true,\n dirty: false,\n };\n }\n this._notifyChange();\n }\n\n // ============================================\n // Step Management\n // ============================================\n\n setTotalSteps(total: number): void {\n this._totalSteps = total;\n this._notifyChange();\n }\n\n setStepConfig(step: number, config: StepConfig): void {\n this._stepConfigs.set(step, config);\n }\n\n getStepConfig(step: number): StepConfig | undefined {\n return this._stepConfigs.get(step);\n }\n\n getStepFields(step: number): string[] {\n return this._stepConfigs.get(step)?.fields ?? [];\n }\n\n goToStep(step: number): boolean {\n if (step < 1 || step > this._totalSteps) {\n return false;\n }\n\n // Check for skip conditions\n const config = this._stepConfigs.get(step);\n if (config?.skipIf?.(this._formData)) {\n // Skip this step, try next/previous\n if (step > this._currentStep) {\n return this.goToStep(step + 1);\n } else {\n return this.goToStep(step - 1);\n }\n }\n\n this._currentStep = step;\n this._notifyChange();\n return true;\n }\n\n nextStep(): boolean {\n return this.goToStep(this._currentStep + 1);\n }\n\n previousStep(): boolean {\n return this.goToStep(this._currentStep - 1);\n }\n\n isFirstStep(): boolean {\n return this._currentStep === 1;\n }\n\n isLastStep(): boolean {\n return this._currentStep === this._totalSteps;\n }\n\n // ============================================\n // Validation Helpers\n // ============================================\n\n isStepValid(step: number): boolean {\n const fields = this.getStepFields(step);\n return fields.every((name) => {\n const validation = this._validation[name];\n return !validation || validation.result.valid;\n });\n }\n\n isCurrentStepValid(): boolean {\n return this.isStepValid(this._currentStep);\n }\n\n getFieldError(name: string): string | undefined {\n const validation = this._validation[name];\n if (validation?.touched && !validation.result.valid) {\n return validation.result.error;\n }\n return undefined;\n }\n\n hasFieldError(name: string): boolean {\n return this.getFieldError(name) !== undefined;\n }\n\n // ============================================\n // Submission State\n // ============================================\n\n setSubmitting(submitting: boolean): void {\n this._submitting = submitting;\n this._notifyChange();\n }\n\n setSubmitted(submitted: boolean): void {\n this._submitted = submitted;\n this._notifyChange();\n }\n\n setError(error: string | undefined): void {\n this._error = error;\n this._notifyChange();\n }\n\n // ============================================\n // Reset\n // ============================================\n\n reset(): void {\n this._formData = {};\n this._validation = {};\n this._currentStep = 1;\n this._submitting = false;\n this._submitted = false;\n this._error = undefined;\n this._notifyChange();\n }\n\n // ============================================\n // Subscriptions\n // ============================================\n\n subscribe(callback: StateSubscriber): () => void {\n this._subscribers.add(callback);\n return () => {\n this._subscribers.delete(callback);\n };\n }\n\n private _notifyChange(): void {\n // Request host update\n this.host.requestUpdate();\n\n // Notify subscribers\n const state = this.state;\n this._subscribers.forEach((callback) => {\n try {\n callback(state);\n } catch (error) {\n console.error('[FormStateController] Subscriber error:', error);\n }\n });\n }\n}\n","/**\n * KeyboardController - Global keyboard shortcut management\n *\n * Handles Enter, Escape, and other keyboard navigation for wizard forms.\n */\n\nimport type { ReactiveController, ReactiveControllerHost } from 'lit';\n\nexport interface KeyboardConfig {\n onEnter?: () => void;\n onEscape?: () => void;\n onArrowUp?: () => void;\n onArrowDown?: () => void;\n onArrowLeft?: () => void;\n onArrowRight?: () => void;\n /** Whether to prevent Enter on textareas (default: true) */\n blockEnterOnTextarea?: boolean;\n}\n\nexport class KeyboardController implements ReactiveController {\n host: ReactiveControllerHost & HTMLElement;\n private _config: KeyboardConfig;\n private _enabled = true;\n private _boundHandler: (e: KeyboardEvent) => void;\n\n constructor(host: ReactiveControllerHost & HTMLElement, config: KeyboardConfig = {}) {\n this.host = host;\n this._config = {\n blockEnterOnTextarea: true,\n ...config,\n };\n this._boundHandler = this._handleKeydown.bind(this);\n host.addController(this);\n }\n\n hostConnected(): void {\n // Listen on the host element\n this.host.addEventListener('keydown', this._boundHandler);\n // Also listen on document for global shortcuts\n document.addEventListener('keydown', this._boundHandler);\n }\n\n hostDisconnected(): void {\n this.host.removeEventListener('keydown', this._boundHandler);\n document.removeEventListener('keydown', this._boundHandler);\n }\n\n private _handleKeydown(e: KeyboardEvent): void {\n if (!this._enabled) {return;}\n\n // Get active element, accounting for shadow DOM\n const activeElement = this._getActiveElement();\n const isTextarea = activeElement?.tagName === 'TEXTAREA';\n const isInput = activeElement?.tagName === 'INPUT';\n const isContentEditable = activeElement?.getAttribute('contenteditable') === 'true';\n const isTextInput = isTextarea || isInput || isContentEditable;\n\n switch (e.key) {\n case 'Enter':\n // Block Enter on textareas if configured\n if (isTextarea && this._config.blockEnterOnTextarea) {\n return;\n }\n // Allow Enter on inputs and other elements\n if (this._config.onEnter) {\n e.preventDefault();\n this._config.onEnter();\n }\n break;\n\n case 'Escape':\n if (this._config.onEscape) {\n e.preventDefault();\n this._config.onEscape();\n }\n break;\n\n case 'ArrowUp':\n if (!isTextInput && this._config.onArrowUp) {\n e.preventDefault();\n this._config.onArrowUp();\n }\n break;\n\n case 'ArrowDown':\n if (!isTextInput && this._config.onArrowDown) {\n e.preventDefault();\n this._config.onArrowDown();\n }\n break;\n\n case 'ArrowLeft':\n if (!isTextInput && this._config.onArrowLeft) {\n e.preventDefault();\n this._config.onArrowLeft();\n }\n break;\n\n case 'ArrowRight':\n if (!isTextInput && this._config.onArrowRight) {\n e.preventDefault();\n this._config.onArrowRight();\n }\n break;\n }\n }\n\n /**\n * Get the actual active element, traversing shadow DOMs\n */\n private _getActiveElement(): Element | null {\n let active = document.activeElement;\n while (active?.shadowRoot?.activeElement) {\n active = active.shadowRoot.activeElement;\n }\n return active;\n }\n\n /**\n * Update keyboard config\n */\n updateConfig(config: Partial<KeyboardConfig>): void {\n this._config = { ...this._config, ...config };\n }\n\n /**\n * Enable keyboard shortcuts\n */\n enable(): void {\n this._enabled = true;\n }\n\n /**\n * Disable keyboard shortcuts\n */\n disable(): void {\n this._enabled = false;\n }\n\n /**\n * Check if keyboard shortcuts are enabled\n */\n get enabled(): boolean {\n return this._enabled;\n }\n}\n","/**\n * Styles for wf-badge component (Shadow DOM)\n */\n\nimport { css } from 'lit';\n\nexport const wfBadgeStyles = css`\n :host {\n display: inline-flex;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .wf-badge {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n min-width: var(--wf-badge-size);\n height: var(--wf-badge-size);\n padding: var(--wf-spacing-1) var(--wf-spacing-2);\n font-size: var(--wf-font-size-xs);\n font-weight: var(--wf-font-weight-label);\n font-family: var(--wf-font-family-mono);\n text-transform: uppercase;\n flex-shrink: 0;\n line-height: 1;\n }\n\n .wf-badge--default {\n background-color: var(--wf-color-badge-bg);\n border: 1px solid var(--wf-color-badge-border);\n border-radius: var(--wf-radius-sm);\n color: var(--wf-color-badge-text);\n }\n\n .wf-badge--selected {\n background-color: var(--wf-color-primary);\n border: 1px solid var(--wf-color-primary);\n border-radius: var(--wf-radius-sm);\n color: white;\n }\n\n .wf-badge--button {\n background-color: transparent;\n border: none;\n border-radius: var(--wf-radius-sm);\n color: rgba(255, 255, 255, 0.65);\n }\n\n .wf-badge--button-secondary {\n background-color: transparent;\n border: none;\n border-radius: var(--wf-radius-sm);\n color: var(--wf-color-text-muted);\n }\n`;\n","/**\n * WF-Badge - Keyboard shortcut badge component for wizard forms\n *\n * A reusable badge component with multiple variants for displaying keyboard shortcuts.\n *\n * @example\n * <wf-badge shortcut=\"A\"></wf-badge>\n * <wf-badge shortcut=\"Enter\" variant=\"selected\"></wf-badge>\n * <wf-badge shortcut=\"↵\" variant=\"button\"></wf-badge>\n */\n\nimport { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { wfBadgeStyles } from './wf-badge.styles.js';\n\nexport type BadgeVariant = 'default' | 'selected' | 'button' | 'button-secondary';\n\n@customElement('wf-badge')\nexport class WfBadge extends LitElement {\n static styles = wfBadgeStyles;\n\n /**\n * The text to display in the badge (e.g., 'A', 'Enter', '↵')\n */\n @property({ type: String })\n shortcut = '';\n\n /**\n * Visual variant of the badge\n */\n @property({ type: String })\n variant: BadgeVariant = 'default';\n\n render() {\n return html`\n <span\n class=\"wf-badge wf-badge--${this.variant}\"\n aria-hidden=\"true\"\n data-testid=\"wf-badge\"\n >\n ${this.shortcut}\n </span>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-badge': WfBadge;\n }\n}\n","/**\n * Wizard-Form - Main orchestrator component\n *\n * Manages multi-step form flow, validation, and submission.\n *\n * @example\n * <wizard-form hubspot-portal=\"12345\" hubspot-form=\"abc-123\">\n * <wf-step data-step=\"1\">...</wf-step>\n * <wf-step data-step=\"2\">...</wf-step>\n * <wf-success>Thank you!</wf-success>\n * </wizard-form>\n */\n\nimport { LitElement, html, nothing, css } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\n\nimport { wizardFormStyles } from './wizard-form.styles.js';\nimport { FormStateController } from '../controllers/FormStateController.js';\nimport { KeyboardController } from '../controllers/KeyboardController.js';\nimport type { WfStep } from './wf-step.js';\nimport type { Theme, HubSpotSubmissionData } from '../types.js';\n// Import wf-badge for button shortcuts\nimport './wf-badge.js';\n\n// Event detail types\nexport interface StepChangeDetail {\n from: number;\n to: number;\n direction: 'forward' | 'backward';\n submitted?: boolean;\n adapter?: 'hubspot';\n}\n\nexport interface FieldChangeDetail {\n name: string;\n value: unknown;\n formData: Record<string, unknown>;\n}\n\nexport interface SubmitDetail {\n formData: Record<string, unknown>;\n}\n\nexport interface SuccessDetail {\n formData: Record<string, unknown>;\n response?: unknown;\n}\n\nexport interface ErrorDetail {\n error: string;\n formData?: Record<string, unknown>;\n}\n\n@customElement('wizard-form')\nexport class WizardForm extends LitElement {\n static styles = wizardFormStyles;\n\n // ============================================\n // Properties\n // ============================================\n\n /**\n * HubSpot portal ID\n */\n @property({ type: String, attribute: 'hubspot-portal' })\n hubspotPortal = '';\n\n /**\n * HubSpot form ID\n */\n @property({ type: String, attribute: 'hubspot-form' })\n hubspotForm = '';\n\n /**\n * Color theme\n */\n @property({ type: String, reflect: true })\n theme: Theme = 'light';\n\n /**\n * Mock submission mode (for testing)\n */\n @property({ type: Boolean })\n mock = false;\n\n /**\n * Show progress bar\n */\n @property({ type: Boolean, attribute: 'show-progress' })\n showProgress = false;\n\n /**\n * Auto-advance after single-select option\n */\n @property({ type: Boolean, attribute: 'auto-advance' })\n autoAdvance = true;\n\n /**\n * Hide the back button in navigation\n */\n @property({ type: Boolean, attribute: 'hide-back' })\n hideBack = true;\n\n /**\n * Transform form data before submission.\n * Applied before HubSpot submission and passed to wf:success event.\n */\n @property({ attribute: false })\n serialize?: (data: Record<string, unknown>) => Record<string, unknown>;\n\n /**\n * Submit partial form data to HubSpot after each step change.\n * When enabled, form data is submitted after each step navigation (blocking).\n * Only fields from completed steps are included in partial submissions.\n */\n @property({ type: Boolean, attribute: 'submit-on-step' })\n submitOnStep = false;\n\n // ============================================\n // State\n // ============================================\n\n @state()\n private _steps: WfStep[] = [];\n\n @state()\n private _currentStep = 1;\n\n @state()\n private _totalSteps = 0;\n\n @state()\n private _formData: Record<string, unknown> = {};\n\n @state()\n private _submitting = false;\n\n /**\n * Whether form has been successfully submitted\n * Reflected to attribute for CSS styling of slotted elements\n */\n @property({ type: Boolean, reflect: true })\n submitted = false;\n\n @state()\n private _error = '';\n\n /**\n * Tracks if user is typing in \"Others\" input (for dynamic Continue button visibility)\n */\n @state()\n private _otherInputActive = false;\n\n /**\n * Tracks if partial submission is in progress (prevents duplicate submissions)\n */\n private _partialSubmitting = false;\n\n // ============================================\n // Controllers\n // ============================================\n\n private _stateController = new FormStateController(this);\n\n constructor() {\n super();\n\n // Initialize keyboard controller (attaches to host automatically)\n new KeyboardController(this, {\n onEnter: () => this._handleEnter(),\n onEscape: () => this._handleEscape(),\n });\n }\n\n // ============================================\n // Lifecycle\n // ============================================\n\n connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener('wf-change', this._handleFieldChange as EventListener);\n this.addEventListener('wf-option-select', this._handleOptionSelect as EventListener);\n // Listen for composable navigation events\n this.addEventListener('wf:nav-next', this._handleNavNext);\n this.addEventListener('wf:nav-back', this._handleNavBack);\n this.addEventListener('wf:nav-state-request', this._handleNavStateRequest);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener('wf-change', this._handleFieldChange as EventListener);\n this.removeEventListener('wf-option-select', this._handleOptionSelect as EventListener);\n this.removeEventListener('wf:nav-next', this._handleNavNext);\n this.removeEventListener('wf:nav-back', this._handleNavBack);\n this.removeEventListener('wf:nav-state-request', this._handleNavStateRequest);\n }\n\n firstUpdated(): void {\n this._discoverSteps();\n this._showCurrentStep();\n\n // Broadcast initial nav state for composable buttons\n this._broadcastNavState();\n }\n\n // ============================================\n // Rendering\n // ============================================\n\n render() {\n // When submitted, hide steps (via CSS) and show success slot\n if (this.submitted) {\n // Deactivate all steps\n this._steps.forEach(step => {\n step.active = false;\n });\n\n return html`\n <div class=\"wf-container\" data-testid=\"wf-container\">\n <slot name=\"success\">\n <div class=\"wf-success-screen\">\n <h2>Thank you!</h2>\n <p>Your submission has been received.</p>\n </div>\n </slot>\n </div>\n `;\n }\n\n return html`\n <div class=\"wf-container\" data-testid=\"wf-container\">\n ${this._error\n ? html`<div class=\"wf-form-error\" role=\"alert\" data-testid=\"wf-form-error\">${this._error}</div>`\n : nothing}\n\n <slot @slotchange=\"${this._handleSlotChange}\"></slot>\n </div>\n `;\n }\n\n /**\n * Handle slot changes to re-discover steps when DOM changes\n */\n private _handleSlotChange(): void {\n this._discoverSteps();\n }\n\n private _renderProgress() {\n const segments = [];\n for (let i = 1; i <= this._totalSteps; i++) {\n const completed = i < this._currentStep;\n const active = i === this._currentStep;\n segments.push(html`\n <div\n class=\"wf-progress-segment ${completed ? 'completed' : ''} ${active ? 'active' : ''}\"\n ></div>\n `);\n }\n return html`<div class=\"wf-progress\">${segments}</div>`;\n }\n\n /**\n * Centralized navigation is no longer rendered.\n * All navigation is now fully composable via <wf-next-btn> and <wf-back-btn>.\n * Keyboard shortcuts (Enter/Esc) still work regardless of button presence.\n */\n private _renderNavigation() {\n // Navigation is fully composable - nothing to render centrally\n return nothing;\n }\n\n // ============================================\n // Step Discovery\n // ============================================\n\n private _discoverSteps(): void {\n // Shadow DOM: Get slotted wf-step elements\n const slot = this.shadowRoot?.querySelector('slot:not([name])') as HTMLSlotElement | null;\n if (slot) {\n const assignedElements = slot.assignedElements({ flatten: true });\n this._steps = assignedElements.filter(\n (el): el is WfStep => el.tagName.toLowerCase() === 'wf-step'\n );\n } else {\n // Fallback: query light DOM (for initial render before slot is ready)\n this._steps = Array.from(this.querySelectorAll(':scope > wf-step')) as WfStep[];\n }\n\n // Auto-assign step numbers based on DOM order (1-indexed)\n // This makes data-step attribute optional\n this._steps.forEach((step, index) => {\n step.step = index + 1;\n });\n\n this._totalSteps = this._steps.length;\n this._stateController.setTotalSteps(this._totalSteps);\n\n // Dispatch event on document so wf-progress can always catch it\n // (even if wf-progress is positioned before wizard-form in DOM)\n document.dispatchEvent(\n new CustomEvent('wf:steps-discovered', {\n detail: {\n wizard: this,\n wizardId: this.id,\n totalSteps: this._totalSteps,\n currentStep: this._currentStep,\n },\n })\n );\n }\n\n private _showCurrentStep(): void {\n this._steps.forEach((step, index) => {\n const stepNumber = index + 1;\n if (stepNumber === this._currentStep) {\n step.show('forward');\n } else {\n step.active = false;\n }\n });\n }\n\n /**\n * Get step element by step number (1-indexed)\n */\n private _getStepByNumber(stepNumber: number): WfStep | undefined {\n const index = stepNumber - 1;\n return this._steps[index];\n }\n\n // ============================================\n // Navigation\n // ============================================\n\n /**\n * Check if the current step requires manual navigation (Continue button).\n * Returns true if step contains typing inputs or multi-select options.\n * Returns false if step only has single-select options (auto-advance handles it).\n */\n private _stepRequiresManualNav(): boolean {\n // If auto-advance is disabled, always show nav\n if (!this.autoAdvance) {\n return true;\n }\n\n const currentStep = this._getStepByNumber(this._currentStep);\n if (!currentStep) {\n return true;\n }\n\n // Check for typing controls\n const typingControls = ['wf-input', 'wf-email', 'wf-textarea', 'wf-number'];\n for (const selector of typingControls) {\n if (currentStep.querySelector(selector)) {\n return true;\n }\n }\n\n // Check for multi-select options\n const multiSelectOptions = currentStep.querySelector('wf-options[multi]');\n if (multiSelectOptions) {\n return true;\n }\n\n // For \"allow-other\" options: only show nav if user is typing in \"Other\" input\n // Otherwise, auto-advance will handle regular option selection\n const allowOtherOptions = currentStep.querySelector('wf-options[allow-other]');\n if (allowOtherOptions && this._otherInputActive) {\n return true;\n }\n\n // Step only has single-select options (or allow-other without text) - auto-advance handles it\n return false;\n }\n\n /**\n * Check if the current step has composable navigation buttons at the step level.\n * Excludes buttons inside wf-other (those are for inline \"Others\" input only).\n * When present, auto-advance is disabled for the step.\n */\n private _stepHasComposableNav(): boolean {\n const currentStep = this._getStepByNumber(this._currentStep);\n if (!currentStep) {return false;}\n // Find nav buttons that are NOT inside wf-other\n const navButtons = currentStep.querySelectorAll('wf-next-btn, wf-back-btn');\n for (const btn of navButtons) {\n // Check if this button is inside a wf-other element\n if (!btn.closest('wf-other')) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Broadcast navigation state to composable buttons.\n * Called on step changes and submit state changes.\n */\n private _broadcastNavState(): void {\n this.dispatchEvent(\n new CustomEvent('wf:nav-state', {\n detail: {\n currentStep: this._currentStep,\n totalSteps: this._totalSteps,\n isFirstStep: this._currentStep === 1,\n isLastStep: this._currentStep === this._totalSteps,\n isSubmitting: this._submitting,\n },\n bubbles: false,\n })\n );\n }\n\n private async _goNext(): Promise<void> {\n if (this._submitting) {return;}\n\n // Validate current step\n const currentStep = this._getStepByNumber(this._currentStep);\n if (currentStep) {\n const isValid = await currentStep.validate();\n if (!isValid) {\n return;\n }\n }\n\n if (this._currentStep >= this._totalSteps) {\n // Submit form\n await this._submit();\n } else {\n // Go to next step\n this._navigateToStep(this._currentStep + 1, 'forward');\n }\n }\n\n private _goBack(): void {\n if (this._submitting) {return;}\n if (this._currentStep <= 1) {return;}\n\n this._navigateToStep(this._currentStep - 1, 'backward');\n }\n\n private async _navigateToStep(\n targetStep: number,\n direction: 'forward' | 'backward'\n ): Promise<void> {\n if (targetStep < 1 || targetStep > this._totalSteps) {return;}\n\n const targetStepEl = this._getStepByNumber(targetStep);\n if (!targetStepEl) {return;}\n\n // Check skip condition\n if (targetStepEl.shouldSkip(this._formData)) {\n const nextTarget = direction === 'forward' ? targetStep + 1 : targetStep - 1;\n if (nextTarget >= 1 && nextTarget <= this._totalSteps) {\n return this._navigateToStep(nextTarget, direction);\n }\n return;\n }\n\n const previousStep = this._currentStep;\n\n // Partial submission (blocking) - submit before navigation\n let submitted = false;\n let adapter: 'hubspot' | undefined;\n\n // Only do partial submission if:\n // 1. submitOnStep is enabled\n // 2. HubSpot config exists\n // 3. Going forward (not backward)\n // 4. Not already submitting a partial\n if (\n this.submitOnStep &&\n this.hubspotPortal &&\n this.hubspotForm &&\n direction === 'forward' &&\n !this._partialSubmitting\n ) {\n try {\n this._partialSubmitting = true;\n await this._submitPartialToHubSpot();\n submitted = true;\n adapter = 'hubspot';\n } catch (error) {\n // Block navigation on failure\n console.error('[wizard-form] Partial submission failed:', error);\n this.dispatchEvent(\n new CustomEvent<ErrorDetail>('wf:error', {\n detail: {\n error: error instanceof Error ? error.message : 'Partial submission failed',\n formData: this._getFieldsUpToStep(this._currentStep),\n },\n bubbles: true,\n composed: true,\n })\n );\n return; // Don't proceed to next step\n } finally {\n this._partialSubmitting = false;\n }\n }\n\n // Hide current step\n const currentStepEl = this._getStepByNumber(this._currentStep);\n if (currentStepEl) {\n await currentStepEl.hide();\n }\n\n // Update current step\n this._currentStep = targetStep;\n this._stateController.goToStep(targetStep);\n\n // Reset \"Other\" input state for new step\n this._otherInputActive = false;\n\n // Broadcast nav state for composable buttons\n this._broadcastNavState();\n\n // Show new step\n targetStepEl.show(direction);\n\n // Dispatch step change event with submission metadata\n this.dispatchEvent(\n new CustomEvent<StepChangeDetail>('wf:step-change', {\n detail: {\n from: previousStep,\n to: targetStep,\n direction,\n submitted,\n adapter,\n },\n bubbles: true,\n composed: true,\n })\n );\n }\n\n // ============================================\n // Event Handlers\n // ============================================\n\n private _handleFieldChange = (e: CustomEvent): void => {\n const { name, value, extraFields } = e.detail;\n this._formData[name] = value;\n this._stateController.setValue(name, value);\n\n // Handle dual-field submission (e.g., \"Others\" with custom text from wf-options)\n if (extraFields) {\n Object.entries(extraFields).forEach(([fieldName, fieldValue]) => {\n this._formData[fieldName] = fieldValue;\n this._stateController.setValue(fieldName, fieldValue as string);\n });\n\n // Track if \"Other\" input has text (for dynamic Continue button visibility)\n const hasOtherText = Object.values(extraFields).some(v => v && String(v).trim());\n this._otherInputActive = hasOtherText;\n } else {\n // If no extraFields, user selected a regular option - reset Other state\n this._otherInputActive = false;\n }\n\n // Clear form error on field change\n this._error = '';\n\n this.dispatchEvent(\n new CustomEvent<FieldChangeDetail>('wf:field-change', {\n detail: {\n name,\n value,\n formData: { ...this._formData },\n },\n bubbles: true,\n composed: true,\n })\n );\n };\n\n private _handleOptionSelect = (e: CustomEvent): void => {\n // Skip auto-advance if step has composable navigation buttons\n if (this._stepHasComposableNav()) {\n return;\n }\n\n // Check if this is a single-select option and auto-advance is enabled\n if (this.autoAdvance) {\n const target = e.target as Element;\n const optionsParent = target.closest('wf-options');\n if (optionsParent && !optionsParent.hasAttribute('multi')) {\n // Delay to show selection animation\n setTimeout(() => {\n this._goNext();\n }, 300);\n }\n }\n };\n\n private async _handleEnter(): Promise<void> {\n await this._goNext();\n }\n\n private _handleEscape(): void {\n this._goBack();\n }\n\n /**\n * Handle composable wf-next-btn click\n */\n private _handleNavNext = async (e: Event): Promise<void> => {\n e.stopPropagation();\n await this._goNext();\n };\n\n /**\n * Handle composable wf-back-btn click\n */\n private _handleNavBack = (e: Event): void => {\n e.stopPropagation();\n this._goBack();\n };\n\n /**\n * Handle request for navigation state (from composable buttons on connect)\n */\n private _handleNavStateRequest = (): void => {\n this._broadcastNavState();\n };\n\n // ============================================\n // Submission\n // ============================================\n\n private async _submit(): Promise<void> {\n if (this._submitting) {return;}\n\n const rawData: Record<string, unknown> = { ...this._formData };\n\n // Dispatch submit event with RAW data (cancelable)\n // This allows init() or user code to apply their own transformations\n const submitEvent = new CustomEvent<SubmitDetail>('wf:submit', {\n detail: { formData: rawData },\n bubbles: true,\n composed: true,\n cancelable: true,\n });\n\n this.dispatchEvent(submitEvent);\n\n if (submitEvent.defaultPrevented) {\n return;\n }\n\n this._submitting = true;\n this._error = '';\n\n // Broadcast nav state to update composable button loading state\n this._broadcastNavState();\n\n // Apply serialize transform if provided (for built-in HubSpot submission)\n let submitData = rawData;\n if (this.serialize) {\n submitData = this.serialize(rawData);\n }\n\n try {\n let response: unknown;\n\n if (this.mock) {\n // Mock submission for testing\n await new Promise((resolve) => setTimeout(resolve, 1000));\n response = { success: true };\n } else if (this.hubspotPortal && this.hubspotForm) {\n // Submit to HubSpot with serialized data\n response = await this._submitToHubSpot(submitData);\n } else {\n // No submission target configured\n console.warn('[WizardForm] No submission target configured. Use hubspot-portal/hubspot-form or mock.');\n response = { success: true };\n }\n\n this.submitted = true;\n\n // wf:success receives serialized data (same as what went to HubSpot)\n this.dispatchEvent(\n new CustomEvent<SuccessDetail>('wf:success', {\n detail: {\n formData: submitData,\n response,\n },\n bubbles: true,\n composed: true,\n })\n );\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Submission failed';\n this._error = errorMessage;\n\n this.dispatchEvent(\n new CustomEvent<ErrorDetail>('wf:error', {\n detail: {\n error: errorMessage,\n formData: submitData,\n },\n bubbles: true,\n composed: true,\n })\n );\n } finally {\n this._submitting = false;\n // Broadcast nav state to update composable button loading state\n this._broadcastNavState();\n }\n }\n\n private async _submitToHubSpot(formData: Record<string, unknown>): Promise<unknown> {\n const endpoint = `https://api.hsforms.com/submissions/v3/integration/submit/${this.hubspotPortal}/${this.hubspotForm}`;\n\n // Convert form data to HubSpot format\n const fields = Object.entries(formData).map(([name, value]) => ({\n name,\n value: Array.isArray(value) ? value.join(';') : String(value ?? ''),\n }));\n\n const data: HubSpotSubmissionData = {\n fields,\n context: {\n pageUri: window.location.href,\n pageName: document.title,\n },\n };\n\n const response = await fetch(endpoint, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(data),\n });\n\n if (!response.ok) {\n const errorData = await response.json().catch(() => ({}));\n throw new Error(errorData.message || `HubSpot submission failed: ${response.status}`);\n }\n\n return response.json();\n }\n\n // ============================================\n // Partial Submission\n // ============================================\n\n /**\n * Get form fields from steps up to and including the specified step number.\n * Used for partial submission to only include completed step data.\n */\n private _getFieldsUpToStep(stepNumber: number): Record<string, unknown> {\n const result: Record<string, unknown> = {};\n\n // Get all steps up to and including the specified step\n for (let i = 0; i < stepNumber && i < this._steps.length; i++) {\n const step = this._steps[i];\n // Find all field components in this step\n const fields = step.querySelectorAll('[name]') as NodeListOf<HTMLElement & { name: string }>;\n fields.forEach((field) => {\n if (field.name && this._formData[field.name] !== undefined) {\n result[field.name] = this._formData[field.name];\n }\n });\n }\n\n return result;\n }\n\n /**\n * Submit partial form data to HubSpot.\n * Only includes fields from steps up to and including the current step.\n * Filters out empty/blank values to avoid submitting unfilled fields.\n */\n private async _submitPartialToHubSpot(): Promise<void> {\n // Only include fields from steps up to and including the current step\n const partialData = this._getFieldsUpToStep(this._currentStep);\n\n // Apply serialize transform if provided\n let submitData = { ...partialData };\n if (this.serialize) {\n submitData = this.serialize(submitData);\n }\n\n // Filter out empty/blank values from partial submission\n const filteredData = Object.fromEntries(\n Object.entries(submitData).filter(([, value]) => {\n // Keep the value if it's not null, undefined, or empty string\n if (value === null || value === undefined || value === '') {\n return false;\n }\n // For arrays, keep if not empty\n if (Array.isArray(value) && value.length === 0) {\n return false;\n }\n return true;\n })\n );\n\n await this._submitToHubSpot(filteredData);\n }\n\n // ============================================\n // Public API\n // ============================================\n\n /**\n * Get current form data\n */\n get formData(): Record<string, unknown> {\n return { ...this._formData };\n }\n\n /**\n * Get current step number\n */\n get currentStep(): number {\n return this._currentStep;\n }\n\n /**\n * Get total number of steps\n */\n get totalSteps(): number {\n return this._totalSteps;\n }\n\n /**\n * Check if form is submitting\n */\n get isSubmitting(): boolean {\n return this._submitting;\n }\n\n /**\n * Check if form was submitted\n */\n get isSubmitted(): boolean {\n return this.submitted;\n }\n\n /**\n * Go to a specific step\n */\n goToStep(step: number): void {\n const direction = step > this._currentStep ? 'forward' : 'backward';\n this._navigateToStep(step, direction);\n }\n\n /**\n * Go to next step\n */\n next(): Promise<void> {\n return this._goNext();\n }\n\n /**\n * Go to previous step\n */\n back(): void {\n this._goBack();\n }\n\n /**\n * Submit the form\n */\n submit(): Promise<void> {\n return this._submit();\n }\n\n /**\n * Reset the form\n */\n reset(): void {\n this._formData = {};\n this._currentStep = 1;\n this._submitting = false;\n this.submitted = false;\n this._error = '';\n this._stateController.reset();\n this._showCurrentStep();\n\n // Reset all field components\n this._steps.forEach((step) => {\n const fields = step.querySelectorAll('wf-options, wf-field, wf-email');\n fields.forEach((field) => {\n if ('reset' in field && typeof (field as { reset: () => void }).reset === 'function') {\n (field as { reset: () => void }).reset();\n }\n });\n });\n }\n\n /**\n * Set form data\n */\n setFormData(data: Record<string, unknown>): void {\n this._formData = { ...this._formData, ...data };\n Object.entries(data).forEach(([name, value]) => {\n this._stateController.setValue(name, value);\n });\n }\n}\n\n// Success screen component\n@customElement('wf-success')\nexport class WfSuccess extends LitElement {\n static styles = css`\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none;\n }\n `;\n\n render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wizard-form': WizardForm;\n 'wf-success': WfSuccess;\n }\n}\n","/**\n * WF-Step styles for Shadow DOM\n */\n\nimport { css } from 'lit';\n\nimport { sharedAnimations } from '../styles/shared.styles.js';\n\nexport const wfStepStyles = [\n sharedAnimations,\n css`\n :host {\n display: none;\n width: 100%;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n :host([active]) {\n display: block;\n animation: wf-stepFadeIn 0.3s ease forwards;\n }\n\n :host([direction='forward'][active]) {\n animation: wf-stepSlideInRight 0.3s ease forwards;\n }\n\n :host([direction='backward'][active]) {\n animation: wf-stepSlideInLeft 0.3s ease forwards;\n }\n\n :host([leaving]) {\n display: block;\n animation: wf-stepFadeOut 0.2s ease forwards;\n }\n\n .wf-step-content {\n display: flex;\n flex-direction: column;\n gap: var(--wf-spacing-4);\n }\n\n /* Slotted heading styles */\n ::slotted(h1),\n ::slotted(h2),\n ::slotted(h3) {\n margin: 0;\n font-weight: var(--wf-font-weight-heading);\n color: var(--wf-color-text);\n }\n\n ::slotted(h2) {\n font-size: var(--wf-font-size-3xl);\n }\n\n ::slotted(p) {\n margin: 0;\n color: var(--wf-color-text-muted);\n font-size: var(--wf-font-size-xl);\n }\n`,\n];\n","/**\n * WF-Step - Step container component for wizard forms\n *\n * Wraps step content and handles visibility/transitions.\n *\n * @example\n * <wf-step data-step=\"1\">\n * <h2>What's your role?</h2>\n * <wf-options name=\"role\" required>\n * <wf-option value=\"developer\">Developer</wf-option>\n * </wf-options>\n * </wf-step>\n */\n\nimport { LitElement, html, PropertyValues } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\n\nimport { wfStepStyles } from './wf-step.styles.js';\n\n@customElement('wf-step')\nexport class WfStep extends LitElement {\n static styles = wfStepStyles;\n\n /**\n * Step number (1-indexed)\n */\n @property({ type: Number, attribute: 'data-step' })\n step = 0;\n\n /**\n * Whether this step is currently active\n */\n @property({ type: Boolean, reflect: true })\n active = false;\n\n /**\n * Animation direction (forward/backward)\n */\n @property({ type: String, reflect: true })\n direction: 'forward' | 'backward' = 'forward';\n\n /**\n * Whether this step is leaving (for exit animation)\n */\n @property({ type: Boolean, reflect: true })\n leaving = false;\n\n /**\n * Skip condition expression (evaluated against form data)\n */\n @property({ type: String, attribute: 'data-skip-if' })\n skipIf = '';\n\n /**\n * List of field names in this step (auto-discovered)\n */\n @state()\n private _fields: string[] = [];\n\n render() {\n return html`\n <div class=\"wf-step-content\" data-testid=\"wf-step-content\">\n <slot></slot>\n </div>\n `;\n }\n\n firstUpdated(): void {\n this._discoverFields();\n }\n\n protected updated(changedProperties: PropertyValues): void {\n if (changedProperties.has('active')) {\n if (this.active) {\n this.leaving = false;\n this._focusFirstField();\n }\n }\n }\n\n /**\n * Discover field elements within this step\n */\n private _discoverFields(): void {\n // Light DOM: Query all field elements within this step\n const fieldElements = ['wf-options', 'wf-field', 'wf-email', 'wf-input', 'wf-textarea', 'wf-number'];\n const fields: string[] = [];\n\n const findFields = (el: Element): void => {\n if (fieldElements.includes(el.tagName.toLowerCase())) {\n const name = el.getAttribute('name');\n if (name) {\n fields.push(name);\n }\n }\n // Recurse into children\n Array.from(el.children).forEach(findFields);\n };\n\n Array.from(this.children).forEach(findFields);\n this._fields = fields;\n }\n\n /**\n * Focus the first focusable field in this step\n */\n private _focusFirstField(): void {\n // Delay to allow DOM updates\n requestAnimationFrame(() => {\n // Light DOM: Find first focusable element among children\n for (const el of this.children) {\n const focusable = this._findFocusable(el);\n if (focusable) {\n focusable.focus();\n return;\n }\n }\n });\n }\n\n private _findFocusable(el: Element): HTMLElement | null {\n // Check if element itself is focusable\n if (el instanceof HTMLElement && typeof el.focus === 'function') {\n // Skip wf-options - don't auto-focus as the focus style looks like selection\n const fieldElements = ['wf-field', 'wf-email', 'wf-input', 'wf-textarea'];\n if (fieldElements.includes(el.tagName.toLowerCase())) {\n return el;\n }\n }\n\n // Recurse into children\n for (const child of el.children) {\n const found = this._findFocusable(child);\n if (found) {return found;}\n }\n\n return null;\n }\n\n // ============================================\n // Public API\n // ============================================\n\n /**\n * Get field names in this step\n */\n get fields(): string[] {\n return [...this._fields];\n }\n\n /**\n * Check if step should be skipped based on form data\n */\n shouldSkip(formData: Record<string, unknown>): boolean {\n if (!this.skipIf) {return false;}\n\n try {\n // Simple expression evaluation\n // Supports: \"fieldName === 'value'\" or \"!fieldName\"\n const expression = this.skipIf.trim();\n\n // Handle negation\n if (expression.startsWith('!')) {\n const fieldName = expression.slice(1);\n return !formData[fieldName];\n }\n\n // Handle equality check\n if (expression.includes('===')) {\n const [left, right] = expression.split('===').map((s) => s.trim());\n const fieldValue = formData[left];\n const compareValue = right.replace(/['\"]/g, ''); // Remove quotes\n return fieldValue === compareValue;\n }\n\n // Handle inequality check\n if (expression.includes('!==')) {\n const [left, right] = expression.split('!==').map((s) => s.trim());\n const fieldValue = formData[left];\n const compareValue = right.replace(/['\"]/g, '');\n return fieldValue !== compareValue;\n }\n\n // Simple truthy check\n return Boolean(formData[expression]);\n } catch (error) {\n console.error('[WfStep] Error evaluating skip condition:', error);\n return false;\n }\n }\n\n /**\n * Show this step with animation\n */\n show(direction: 'forward' | 'backward' = 'forward'): void {\n this.direction = direction;\n this.leaving = false;\n this.active = true;\n }\n\n /**\n * Hide this step with animation\n */\n hide(): Promise<void> {\n return new Promise((resolve) => {\n this.leaving = true;\n\n const handleAnimationEnd = (): void => {\n this.active = false;\n this.leaving = false;\n this.removeEventListener('animationend', handleAnimationEnd);\n resolve();\n };\n\n this.addEventListener('animationend', handleAnimationEnd);\n\n // Fallback timeout\n setTimeout(() => {\n this.active = false;\n this.leaving = false;\n this.removeEventListener('animationend', handleAnimationEnd);\n resolve();\n }, 300);\n });\n }\n\n /**\n * Validate all fields in this step\n * Returns true if all fields are valid\n * Scrolls to and focuses the first invalid field if validation fails\n */\n async validate(): Promise<boolean> {\n // Light DOM: Validate all child elements\n const invalidElements: Element[] = [];\n let allValid = true;\n\n const validateElement = async (el: Element): Promise<void> => {\n // Check for validate method on field elements\n if ('validate' in el && typeof (el as { validate: () => boolean | Promise<boolean> }).validate === 'function') {\n const isValid = await (el as { validate: () => boolean | Promise<boolean> }).validate();\n if (!isValid) {\n // Track invalid elements\n invalidElements.push(el);\n allValid = false;\n }\n }\n\n // Recurse into children\n for (const child of el.children) {\n await validateElement(child);\n }\n };\n\n for (const el of this.children) {\n await validateElement(el);\n }\n\n // Scroll to and focus first invalid field\n if (invalidElements.length > 0) {\n const firstInvalid = invalidElements[0];\n\n // Smooth scroll to the element\n firstInvalid.scrollIntoView({\n behavior: 'smooth',\n block: 'center'\n });\n\n // Focus the element after a brief delay for scroll to complete\n setTimeout(() => {\n if ('focus' in firstInvalid && typeof (firstInvalid as HTMLElement).focus === 'function') {\n (firstInvalid as HTMLElement).focus();\n }\n }, 100);\n }\n\n return allValid;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-step': WfStep;\n }\n}\n","/**\n * WF-Layout styles for Shadow DOM\n */\n\nimport { css } from 'lit';\n\nexport const wfLayoutStyles = css`\n :host {\n display: block;\n box-sizing: border-box;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n /* Width classes */\n :host(.wf-layout--width-full) {\n width: 100%;\n }\n\n :host(.wf-layout--width-auto) {\n width: auto;\n }\n\n :host(.wf-layout--width-fit) {\n width: fit-content;\n }\n`;\n","/**\n * WF-Layout - Figma-style auto-layout container for wizard forms\n *\n * A flexible layout component supporting both flexbox and CSS grid modes\n * with independent horizontal/vertical gutters and padding.\n *\n * @example\n * <!-- Flex mode (default) -->\n * <wf-layout direction=\"column\" gap=\"md\">\n * <wf-input name=\"name\" label=\"Name\"></wf-input>\n * <wf-email name=\"email\" label=\"Email\"></wf-email>\n * </wf-layout>\n *\n * <!-- Grid mode with responsive columns -->\n * <wf-layout mode=\"grid\" columns=\"2\" gap-x=\"lg\" gap-y=\"md\">\n * <wf-option value=\"a\">A</wf-option>\n * <wf-option value=\"b\">B</wf-option>\n * </wf-layout>\n */\n\nimport { LitElement, html, type CSSResultGroup } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\n\nimport { wfLayoutStyles } from './wf-layout.styles.js';\n\nexport type LayoutMode = 'flex' | 'grid';\nexport type FlexDirection = 'row' | 'column';\nexport type AlignItems = 'start' | 'center' | 'end' | 'stretch';\nexport type JustifyContent = 'start' | 'center' | 'end' | 'space-between' | 'space-around';\nexport type WidthBehavior = 'full' | 'auto' | 'fit';\nexport type SpacingPreset = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n// Spacing scale in pixels\nconst SPACING_SCALE: Record<SpacingPreset, number> = {\n none: 0,\n xs: 4,\n sm: 8,\n md: 16,\n lg: 24,\n xl: 32,\n};\n\n@customElement('wf-layout')\nexport class WfLayout extends LitElement {\n static styles: CSSResultGroup = wfLayoutStyles;\n\n /**\n * Layout mode: 'flex' for flexbox, 'grid' for CSS grid\n */\n @property({ type: String })\n mode: LayoutMode = 'flex';\n\n /**\n * Flex direction (flex mode only)\n */\n @property({ type: String })\n direction: FlexDirection = 'column';\n\n /**\n * Uniform gap (sets both gap-x and gap-y)\n */\n @property({ type: String })\n gap: SpacingPreset | string = 'none';\n\n /**\n * Horizontal gutter (column-gap)\n */\n @property({ type: String, attribute: 'gap-x' })\n gapX: SpacingPreset | string = '';\n\n /**\n * Vertical gutter (row-gap)\n */\n @property({ type: String, attribute: 'gap-y' })\n gapY: SpacingPreset | string = '';\n\n /**\n * Cross-axis alignment\n */\n @property({ type: String })\n align: AlignItems = 'stretch';\n\n /**\n * Main-axis justification\n */\n @property({ type: String })\n justify: JustifyContent = 'start';\n\n /**\n * Uniform padding (all sides)\n */\n @property({ type: String })\n padding: SpacingPreset | string = 'none';\n\n /**\n * Horizontal padding (left/right)\n */\n @property({ type: String, attribute: 'padding-x' })\n paddingX: SpacingPreset | string = '';\n\n /**\n * Vertical padding (top/bottom)\n */\n @property({ type: String, attribute: 'padding-y' })\n paddingY: SpacingPreset | string = '';\n\n /**\n * Enable flex-wrap (flex mode only)\n */\n @property({ type: Boolean })\n wrap = false;\n\n /**\n * Width behavior\n */\n @property({ type: String })\n width: WidthBehavior = 'full';\n\n /**\n * Number of columns or 'auto' for responsive (grid mode only)\n */\n @property({ type: String })\n columns: string = 'auto';\n\n /**\n * Minimum item width for auto-fit grid\n */\n @property({ type: String, attribute: 'min-item-width' })\n minItemWidth = '200px';\n\n /**\n * Reference to the slot element\n */\n @query('slot')\n private _slot!: HTMLSlotElement;\n\n /**\n * Convert spacing value to pixels\n */\n private _resolveSpacing(value: SpacingPreset | string): string {\n if (!value || value === 'none') {\n return '0';\n }\n\n // Check if it's a preset\n if (value in SPACING_SCALE) {\n return `${SPACING_SCALE[value as SpacingPreset]}px`;\n }\n\n // Check if it's a number (treat as pixels)\n const num = parseFloat(value);\n if (!isNaN(num)) {\n return `${num}px`;\n }\n\n // Return as-is (could be a CSS value like '1rem')\n return value;\n }\n\n /**\n * Get computed gap-x value\n */\n private _getGapX(): string {\n return this._resolveSpacing(this.gapX || this.gap);\n }\n\n /**\n * Get computed gap-y value\n */\n private _getGapY(): string {\n return this._resolveSpacing(this.gapY || this.gap);\n }\n\n /**\n * Get computed padding values\n */\n private _getPadding(): string {\n const uniformPadding = this._resolveSpacing(this.padding);\n const px = this.paddingX ? this._resolveSpacing(this.paddingX) : uniformPadding;\n const py = this.paddingY ? this._resolveSpacing(this.paddingY) : uniformPadding;\n return `${py} ${px}`;\n }\n\n /**\n * Build inline styles based on properties\n */\n private _buildStyles(): string {\n const styles: string[] = [];\n\n if (this.mode === 'grid') {\n styles.push('display: grid');\n\n // Grid columns\n const cols = parseInt(this.columns, 10);\n if (!isNaN(cols) && cols > 0) {\n styles.push(`grid-template-columns: repeat(${cols}, 1fr)`);\n } else {\n // Auto-fit responsive grid\n styles.push(\n `grid-template-columns: repeat(auto-fit, minmax(${this.minItemWidth}, 1fr))`\n );\n }\n\n // Grid alignment\n if (this.align !== 'stretch') {\n styles.push(`align-items: ${this.align}`);\n }\n if (this.justify !== 'start') {\n styles.push(`justify-content: ${this.justify}`);\n }\n } else {\n // Flex mode\n styles.push('display: flex');\n styles.push(`flex-direction: ${this.direction}`);\n\n if (this.wrap) {\n styles.push('flex-wrap: wrap');\n }\n\n // Flex alignment\n if (this.align !== 'stretch') {\n styles.push(`align-items: ${this.align}`);\n }\n if (this.justify !== 'start') {\n styles.push(`justify-content: ${this.justify}`);\n }\n }\n\n // Gap (works for both flex and grid)\n const gapX = this._getGapX();\n const gapY = this._getGapY();\n if (gapX !== '0' || gapY !== '0') {\n styles.push(`column-gap: ${gapX}`);\n styles.push(`row-gap: ${gapY}`);\n }\n\n // Padding\n const padding = this._getPadding();\n if (padding !== '0 0') {\n styles.push(`padding: ${padding}`);\n }\n\n return styles.join('; ');\n }\n\n /**\n * Apply data-* attributes from children as inline styles\n * Supports: data-span, data-row-span, data-grow, data-shrink, data-align, data-order\n */\n private _applyChildStyles(): void {\n if (!this._slot) {return;}\n\n const children = this._slot.assignedElements({ flatten: true });\n\n for (const child of children) {\n const el = child as HTMLElement;\n const styles: string[] = [];\n\n // Grid column span\n const span = el.getAttribute('data-span');\n if (span) {\n styles.push(`grid-column: span ${span}`);\n }\n\n // Grid row span\n const rowSpan = el.getAttribute('data-row-span');\n if (rowSpan) {\n styles.push(`grid-row: span ${rowSpan}`);\n }\n\n // Flex grow\n if (el.hasAttribute('data-grow')) {\n styles.push('flex-grow: 1');\n }\n\n // Flex shrink (opt out)\n if (el.hasAttribute('data-shrink')) {\n styles.push('flex-shrink: 0');\n }\n\n // Alignment override\n const align = el.getAttribute('data-align');\n if (align) {\n styles.push(`align-self: ${align}`);\n }\n\n // Order\n const order = el.getAttribute('data-order');\n if (order) {\n styles.push(`order: ${order}`);\n }\n\n // Apply styles if any data attributes were found\n if (styles.length > 0) {\n // Preserve existing inline styles\n const existingStyles = el.style.cssText;\n const newStyles = styles.join('; ');\n el.style.cssText = existingStyles ? `${existingStyles}; ${newStyles}` : newStyles;\n }\n }\n }\n\n /**\n * Handle slot changes to apply child styles\n */\n private _handleLayoutSlotChange(): void {\n this._applyChildStyles();\n }\n\n /**\n * Apply styles to host element when properties change\n */\n updated(changedProperties: Map<string, unknown>) {\n super.updated(changedProperties);\n\n // Apply layout styles to host element\n this.style.cssText = this._buildStyles();\n\n // Update width class on host\n this.classList.remove('wf-layout--width-full', 'wf-layout--width-auto', 'wf-layout--width-fit');\n this.classList.add(`wf-layout--width-${this.width}`);\n\n // Apply data-* attribute styles to children\n this._applyChildStyles();\n }\n\n render() {\n // Slotted content flows directly into the host with applied layout styles\n return html`<slot @slotchange=\"${this._handleLayoutSlotChange}\"></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-layout': WfLayout;\n }\n}\n","/**\n * Styles for wf-options component (Shadow DOM)\n *\n * Co-located with the component for better maintainability.\n */\n\nimport { css } from 'lit';\n\nexport const wfOptionsStyles = css`\n :host {\n display: grid;\n box-sizing: border-box;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n /* Width classes inherited from WfLayout */\n :host(.wf-layout--width-full) {\n width: 100%;\n }\n\n :host(.wf-layout--width-auto) {\n width: auto;\n }\n\n :host(.wf-layout--width-fit) {\n width: fit-content;\n }\n\n /* Error wrapper for animated expand/collapse */\n .wf-error-wrapper {\n grid-column: 1 / -1;\n order: 1000;\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 200ms ease-out;\n }\n\n .wf-error-wrapper.wf-has-error {\n grid-template-rows: 1fr;\n }\n\n .wf-error-message {\n overflow: hidden;\n min-height: 0;\n font-size: var(--wf-font-size-sm);\n color: var(--wf-color-error);\n opacity: 0;\n transform: translateY(-4px);\n transition: opacity 200ms ease-out, transform 200ms ease-out;\n }\n\n .wf-has-error .wf-error-message {\n margin-top: var(--wf-spacing-2);\n opacity: 1;\n transform: translateY(0);\n }\n\n /* Slotted wf-other spans full width and appears after options */\n ::slotted(wf-other) {\n grid-column: 1 / -1;\n order: 999;\n }\n`;\n","/**\n * Styles for wf-other component (Shadow DOM)\n *\n * Co-located with the component for better maintainability.\n */\n\nimport { css } from 'lit';\n\nexport const wfOtherStyles = css`\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .wf-other-container {\n margin-top: var(--wf-spacing-4);\n }\n\n .wf-other-label {\n display: block;\n margin-bottom: var(--wf-spacing-2);\n font-size: var(--wf-font-size-sm);\n font-weight: var(--wf-font-weight-label);\n color: var(--wf-color-text);\n }\n\n .wf-other-label span {\n font-weight: var(--wf-font-weight-input);\n color: var(--wf-color-text-muted);\n }\n\n .wf-other-input-wrapper {\n display: flex;\n align-items: center;\n gap: var(--wf-spacing-3);\n height: var(--wf-input-min-height);\n background: var(--wf-glass-bg);\n backdrop-filter: blur(var(--wf-glass-blur));\n -webkit-backdrop-filter: blur(var(--wf-glass-blur));\n border: 1px solid var(--wf-glass-border);\n border-radius: var(--wf-radius-md);\n box-shadow: var(--wf-glass-shadow);\n padding-left: var(--wf-spacing-3);\n padding-right: var(--wf-spacing-2);\n transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;\n }\n\n .wf-other-input-wrapper:focus-within {\n border-color: var(--wf-color-primary);\n box-shadow: 0 0 0 var(--wf-focus-ring-width) var(--wf-focus-ring-primary);\n }\n\n .wf-other-input {\n flex: 1;\n min-height: calc(var(--wf-input-min-height) - 2px);\n padding: var(--wf-spacing-3);\n padding-left: 0;\n font-size: var(--wf-font-size-base);\n font-weight: var(--wf-font-weight-input);\n color: var(--wf-color-text);\n background: transparent;\n border: none;\n outline: none;\n box-sizing: border-box;\n }\n\n .wf-other-input::placeholder {\n color: var(--wf-color-text-muted);\n font-weight: var(--wf-font-weight-input);\n }\n\n .wf-other-actions {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex-shrink: 0;\n opacity: 0;\n visibility: hidden;\n transition: opacity 200ms ease, visibility 200ms ease;\n }\n\n /* Show button when input has value */\n .wf-other-input-wrapper.has-value .wf-other-actions {\n opacity: 1;\n visibility: visible;\n }\n\n /* Button inside input box should not stretch */\n .wf-other-actions ::slotted(*) {\n width: auto;\n }\n`;\n","/**\n * WF-Other - Composable \"Others\" input for wf-options\n *\n * Placed INSIDE <wf-options> as a composable child.\n * Contains a text input and a slot for inline buttons.\n * Dispatches 'wf-other-change' event for wf-options to handle.\n *\n * @example\n * <wf-options name=\"industry\" other-name=\"industry_other\">\n * <wf-option value=\"tech\">Technology</wf-option>\n * <wf-option value=\"finance\">Finance</wf-option>\n *\n * <wf-other label=\"Others, please specify:\">\n * <wf-next-btn inline label=\"Next →\"></wf-next-btn>\n * </wf-other>\n * </wf-options>\n */\n\nimport { LitElement, html, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\n\n// Import wf-badge for shortcut display\nimport './wf-badge.js';\n// Import wf-layout for grid composition\nimport './wf-layout.js';\n\n// Co-located styles (Shadow DOM)\nimport { wfOtherStyles } from './wf-other.styles.js';\n\nexport interface OtherChangeDetail {\n value: string;\n name?: string;\n}\n\n@customElement('wf-other')\nexport class WfOther extends LitElement {\n static styles = wfOtherStyles;\n\n // ============================================\n // Properties\n // ============================================\n\n /**\n * Label text (default: \"Others, please specify:\")\n */\n @property({ type: String })\n label = 'Others, please specify:';\n\n /**\n * Optional hint text shown after the label\n */\n @property({ type: String, attribute: 'label-hint' })\n labelHint?: string;\n\n /**\n * Input placeholder\n */\n @property({ type: String })\n placeholder = '';\n\n /**\n * Field name for \"other\" value (optional, wf-options can auto-derive)\n */\n @property({ type: String })\n name?: string;\n\n /**\n * Value to use for the parent field when this \"Other\" input is active.\n * Defaults to \"Others\" if not specified.\n * @example <wf-other parent-value=\"Other\" label=\"Other:\"></wf-other>\n */\n @property({ type: String, attribute: 'parent-value' })\n parentValue = 'Others';\n\n /**\n * Make input required when visible\n */\n @property({ type: Boolean })\n required = false;\n\n /**\n * Disabled state\n */\n @property({ type: Boolean })\n disabled = false;\n\n /**\n * Keyboard shortcut (set by parent wf-options)\n */\n @property({ type: String })\n shortcut = '';\n\n // ============================================\n // Internal State\n // ============================================\n\n @state()\n private _value = '';\n\n // ============================================\n // Public API\n // ============================================\n\n /**\n * Get current value\n */\n get value(): string {\n return this._value;\n }\n\n /**\n * Set value\n */\n set value(val: string) {\n this._value = val;\n }\n\n /**\n * Clear the input value\n */\n clear(): void {\n this._value = '';\n this._notifyChange();\n }\n\n /**\n * Focus the input\n */\n focusInput(): void {\n const input = this.shadowRoot?.querySelector<HTMLInputElement>('.wf-other-input');\n input?.focus();\n }\n\n // ============================================\n // Event Handlers\n // ============================================\n\n private _handleInput = (e: Event): void => {\n const input = e.target as HTMLInputElement;\n this._value = input.value;\n this._notifyChange();\n };\n\n private _notifyChange(): void {\n this.dispatchEvent(\n new CustomEvent<OtherChangeDetail>('wf-other-change', {\n detail: {\n value: this._value,\n name: this.name,\n },\n bubbles: true,\n composed: true,\n })\n );\n }\n\n // ============================================\n // Render\n // ============================================\n\n override render() {\n const hasValue = this._value.trim().length > 0;\n\n return html`\n <div class=\"wf-other-container\" data-testid=\"wf-other\">\n <label class=\"wf-other-label\">\n ${this.label}\n ${this.labelHint ? html`<span>${this.labelHint}</span>` : nothing}\n </label>\n <div class=\"wf-other-input-wrapper ${hasValue ? 'has-value' : ''}\">\n ${this.shortcut ? html`<wf-badge shortcut=\"${this.shortcut}\"></wf-badge>` : nothing}\n <input\n type=\"text\"\n class=\"wf-other-input\"\n placeholder=\"${this.placeholder}\"\n .value=\"${this._value}\"\n ?disabled=\"${this.disabled}\"\n ?required=\"${this.required}\"\n @input=\"${this._handleInput}\"\n data-testid=\"wf-other-input\"\n />\n <!-- Slot for action buttons (like wf-next-btn) inside input -->\n <div class=\"wf-other-actions\">\n <slot></slot>\n </div>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-other': WfOther;\n }\n}\n","/**\n * WF-Options - Option group component for wizard forms\n *\n * Manages a group of wf-option elements with single/multi-select support.\n * Auto-assigns keyboard shortcuts to child options.\n *\n * @example\n * <!-- Single select (default) -->\n * <wf-options name=\"role\" required>\n * <wf-option value=\"developer\">Developer</wf-option>\n * <wf-option value=\"designer\">Designer</wf-option>\n * </wf-options>\n *\n * <!-- Multi-select with constraints -->\n * <wf-options name=\"interests\" multi required min=\"1\" max=\"3\">\n * <wf-option value=\"ai\">AI</wf-option>\n * <wf-option value=\"web\">Web</wf-option>\n * <wf-option value=\"mobile\">Mobile</wf-option>\n * </wf-options>\n */\n\nimport { html, type CSSResultGroup } from 'lit';\nimport { customElement, property, state, query } from 'lit/decorators.js';\n\nimport type { WfOption, OptionSelectDetail } from './wf-option.js';\nimport type { WfOther, OtherChangeDetail } from './wf-other.js';\nimport { WfLayout, LayoutMode } from './wf-layout.js';\nimport { wfOptionsStyles } from './wf-options.styles.js';\nimport './wf-badge.js';\nimport './wf-other.js';\n\n// Event detail types\nexport interface OptionsChangeDetail {\n name: string;\n value: string | string[];\n selected: string[];\n /** Extra fields for dual-field submission (e.g., \"Other\" with custom text) */\n extraFields?: Record<string, unknown>;\n}\n\n@customElement('wf-options')\nexport class WfOptions extends WfLayout {\n // Override styles to add wf-options specific styles\n static override styles: CSSResultGroup = [WfLayout.styles, wfOptionsStyles];\n\n /**\n * Slot reference for discovering options\n */\n @query('slot:not([name])')\n private _defaultSlot!: HTMLSlotElement;\n\n /**\n * Override layout mode to grid by default\n */\n @property({ type: String })\n override mode: LayoutMode = 'grid';\n\n /**\n * Override gap to 16px (md) by default for options grid\n */\n @property({ type: String })\n override gap = 'md';\n\n /**\n * Field name for form data\n */\n @property({ type: String })\n name = '';\n\n /**\n * Enable multi-select mode\n */\n @property({ type: Boolean })\n multi = false;\n\n /**\n * Whether selection is required\n */\n @property({ type: Boolean })\n required = false;\n\n /**\n * Minimum selections required (multi-select only)\n */\n @property({ type: Number })\n min = 0;\n\n /**\n * Maximum selections allowed (multi-select only, 0 = unlimited)\n */\n @property({ type: Number })\n max = 0;\n\n /**\n * Number of grid columns (2 by default)\n * Override type to match WfLayout's string type\n */\n @property({ type: String, reflect: true })\n override columns = '2';\n\n /**\n * Currently selected values\n */\n @state()\n private _selected: Set<string> = new Set();\n\n /**\n * Value of the \"Other\" text input\n */\n @state()\n private _otherValue = '';\n\n /**\n * Validation error message\n */\n @state()\n private _errorMessage = '';\n\n /**\n * Whether validation has been activated (after first Next press)\n */\n private _validationActivated = false;\n\n /**\n * Child option elements\n */\n private _options: WfOption[] = [];\n\n /**\n * Keyboard shortcut map (key -> option)\n */\n private _shortcutMap: Map<string, WfOption> = new Map();\n\n /**\n * Reference to composable wf-other child (if present)\n */\n private _composableOther: WfOther | null = null;\n\n connectedCallback(): void {\n super.connectedCallback();\n // Ensure clean state on mount\n this._errorMessage = '';\n this._validationActivated = false;\n // Listen for option selection events\n this.addEventListener('wf-option-select', this._handleOptionSelect as EventListener);\n // Listen for composable wf-other-change events\n this.addEventListener('wf-other-change', this._handleComposableOtherChange as EventListener);\n // Listen for keyboard events at document level so shortcuts work globally\n document.addEventListener('keydown', this._handleKeydown);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener('wf-option-select', this._handleOptionSelect as EventListener);\n this.removeEventListener('wf-other-change', this._handleComposableOtherChange as EventListener);\n document.removeEventListener('keydown', this._handleKeydown);\n }\n\n firstUpdated(changedProperties: Map<string, unknown>): void {\n // Call parent to ensure layout styles are applied\n super.firstUpdated(changedProperties);\n\n // Detect composable wf-other child from slotted elements\n const slottedElements = this._defaultSlot?.assignedElements({ flatten: true }) || [];\n const foundOther = slottedElements.find(\n (el) => el.tagName.toLowerCase() === 'wf-other'\n );\n this._composableOther = foundOther ? (foundOther as WfOther) : null;\n\n this._discoverOptions();\n\n // Force re-render to ensure _otherShortcut badge appears\n this.requestUpdate();\n }\n\n /**\n * Check if this component has a composable wf-other child\n */\n private _hasComposableOther(): boolean {\n return this._composableOther !== null;\n }\n\n updated(changedProperties: Map<string, unknown>): void {\n // Call parent to apply layout styles\n super.updated(changedProperties);\n\n if (changedProperties.has('multi') || changedProperties.has('max')) {\n // Just update option states, don't validate (lazy validation)\n this._updateOptionStates();\n }\n }\n\n render() {\n // Apply layout styles to host element (inherited from WfLayout)\n super.updated(new Map());\n\n // Set ARIA attributes on host\n this.setAttribute('role', 'listbox');\n this.setAttribute('aria-multiselectable', String(this.multi));\n this.setAttribute('aria-required', String(this.required));\n\n // Shadow DOM: slot for wf-option children\n return html`\n <slot @slotchange=\"${this._handleSlotChange}\"></slot>\n <div class=\"wf-error-wrapper ${this._errorMessage ? 'wf-has-error' : ''}\">\n <span class=\"wf-error-message\" role=\"alert\" aria-live=\"polite\" data-testid=\"wf-error\">\n ${this._errorMessage || ''}\n </span>\n </div>\n `;\n }\n\n /**\n * Handle slot content changes to rediscover options\n */\n private _handleSlotChange(): void {\n // Update composable wf-other reference\n const slottedElements = this._defaultSlot?.assignedElements({ flatten: true }) || [];\n const foundOther = slottedElements.find(\n (el) => el.tagName.toLowerCase() === 'wf-other'\n );\n this._composableOther = foundOther ? (foundOther as WfOther) : null;\n\n // Rediscover options\n this._discoverOptions();\n }\n\n /**\n * Handle change events from composable wf-other child\n */\n private _handleComposableOtherChange = (e: CustomEvent<OtherChangeDetail>): void => {\n e.stopPropagation();\n this._otherValue = e.detail.value;\n\n // When typing in \"Others\", deselect any selected options (mutually exclusive)\n if (this._otherValue.trim() && this._selected.size > 0) {\n this._selected.clear();\n this._updateOptionStates();\n }\n\n this._dispatchChange();\n };\n\n private _discoverOptions(): void {\n // Shadow DOM: Get wf-option children from slot's assigned elements\n const slottedElements = this._defaultSlot?.assignedElements({ flatten: true }) || [];\n this._options = slottedElements.filter(\n (el) => el.tagName.toLowerCase() === 'wf-option'\n ) as WfOption[];\n\n // Assign keyboard shortcuts (A, B, C, etc.)\n this._shortcutMap.clear();\n this._options.forEach((option, index) => {\n if (index < 26) {\n const shortcut = String.fromCharCode(65 + index); // A, B, C...\n option.shortcut = shortcut;\n this._shortcutMap.set(shortcut, option);\n }\n\n // Restore selected state if value is in _selected\n option.setSelected(this._selected.has(option.value));\n });\n\n // Assign shortcut to composable wf-other child\n if (this._composableOther && this._options.length < 26) {\n const otherShortcut = String.fromCharCode(65 + this._options.length);\n this._composableOther.shortcut = otherShortcut;\n }\n }\n\n private _handleOptionSelect = (e: CustomEvent<OptionSelectDetail>): void => {\n // Skip if this is a forwarded event (already processed, just bubbling to wizard-form)\n if ((e.detail as OptionSelectDetail & { forwarded?: boolean }).forwarded) {\n return;\n }\n\n e.stopPropagation();\n const { value } = e.detail;\n this._selectValue(value);\n\n // Re-dispatch for wizard-form auto-advance (single-select only)\n if (!this.multi) {\n this.dispatchEvent(\n new CustomEvent('wf-option-select', {\n detail: { ...e.detail, forwarded: true },\n bubbles: true,\n composed: true,\n })\n );\n }\n };\n\n private _selectValue(value: string): void {\n if (this.multi) {\n this._handleMultiSelect(value);\n } else {\n this._handleSingleSelect(value);\n }\n\n // When selecting an option, clear the \"Others\" text (mutually exclusive)\n if (this._otherValue) {\n this._otherValue = '';\n // Also clear composable wf-other if present\n if (this._composableOther) {\n this._composableOther.clear();\n }\n }\n\n this._updateOptionStates();\n this._validateSelection();\n this._dispatchChange();\n }\n\n private _handleSingleSelect(value: string): void {\n // Clear previous selection and select new\n this._selected.clear();\n this._selected.add(value);\n }\n\n private _handleMultiSelect(value: string): void {\n if (this._selected.has(value)) {\n // Deselect\n this._selected.delete(value);\n } else {\n // Check max constraint\n if (this.max > 0 && this._selected.size >= this.max) {\n // At max capacity, don't add more\n return;\n }\n this._selected.add(value);\n }\n }\n\n private _updateOptionStates(): void {\n this._options.forEach((option) => {\n option.setSelected(this._selected.has(option.value));\n });\n }\n\n /**\n * Silent validation check (no side effects)\n */\n private _checkValidation(): boolean {\n // Check for \"Others\" text from composable wf-other\n const hasOtherValue = this._hasComposableOther() && this._otherValue.trim();\n const hasSelection = this._selected.size > 0 || hasOtherValue;\n\n if (this.required && !hasSelection) {\n return false;\n }\n\n if (this.multi) {\n if (this.min > 0 && this._selected.size < this.min && !hasOtherValue) {\n return false;\n }\n\n if (this.max > 0 && this._selected.size > this.max) {\n return false;\n }\n }\n\n return true;\n }\n\n /**\n * Validate and show error messages (only when activated)\n */\n private _validateSelection(): boolean {\n // Only show error messages if validation has been activated\n if (!this._validationActivated) {\n // Clear any stale error message\n this._errorMessage = '';\n return this._checkValidation();\n }\n\n this._errorMessage = '';\n\n // Check for \"Others\" text from composable wf-other\n const hasOtherValue = this._hasComposableOther() && this._otherValue.trim();\n const hasSelection = this._selected.size > 0 || hasOtherValue;\n\n if (this.required && !hasSelection) {\n this._errorMessage = this._hasComposableOther()\n ? 'Please select an option or specify in the text field'\n : 'Please select an option';\n return false;\n }\n\n if (this.multi) {\n if (this.min > 0 && this._selected.size < this.min && !hasOtherValue) {\n this._errorMessage = `Please select at least ${this.min} option${this.min > 1 ? 's' : ''}`;\n return false;\n }\n\n if (this.max > 0 && this._selected.size > this.max) {\n this._errorMessage = `Please select at most ${this.max} option${this.max > 1 ? 's' : ''}`;\n return false;\n }\n }\n\n return true;\n }\n\n private _dispatchChange(): void {\n const selectedArray = Array.from(this._selected);\n\n const detail: OptionsChangeDetail = {\n name: this.name,\n value: this.value,\n selected: selectedArray,\n };\n\n // Add extraFields for composable wf-other\n if (this._hasComposableOther() && this._otherValue.trim() && this._selected.size === 0) {\n const otherName = this._composableOther?.name || `${this.name}_other`;\n detail.extraFields = {\n [otherName]: this._otherValue,\n };\n // Use wf-other's parentValue attribute for parent field (defaults to \"Others\")\n detail.value = this._composableOther?.parentValue || 'Others';\n }\n\n this.dispatchEvent(\n new CustomEvent('wf-change', {\n detail,\n bubbles: true,\n composed: true,\n })\n );\n }\n\n private _handleKeydown = (e: KeyboardEvent): void => {\n // Only handle shortcuts if this component is in the active step\n const parentStep = this.closest('wf-step');\n if (!parentStep || !parentStep.hasAttribute('active')) {\n return;\n }\n\n // Don't handle A-Z shortcuts if user is typing in an input field\n // Use composedPath to get actual target (works with Shadow DOM)\n const path = e.composedPath();\n const actualTarget = path[0] as HTMLElement;\n if (actualTarget?.tagName === 'INPUT' || actualTarget?.tagName === 'TEXTAREA') {\n return;\n }\n\n // Handle A-Z keys for shortcuts\n const key = e.key.toUpperCase();\n if (key.length === 1 && key >= 'A' && key <= 'Z') {\n // Check if this is the composable wf-other shortcut\n if (this._composableOther && key === this._composableOther.shortcut) {\n e.preventDefault();\n this._composableOther.focusInput();\n return;\n }\n\n const option = this._shortcutMap.get(key);\n if (option && !option.disabled) {\n e.preventDefault();\n option.triggerSelect();\n }\n }\n };\n\n // ============================================\n // Public API\n // ============================================\n\n /**\n * Get current value (string for single, array for multi)\n * If wf-other child is present and has text, returns the custom text\n */\n get value(): string | string[] {\n // If \"Others\" text has value and no options selected, return the custom text\n if (this._hasComposableOther() && this._otherValue.trim() && this._selected.size === 0) {\n return this.multi ? [this._otherValue] : this._otherValue;\n }\n\n const selectedArray = Array.from(this._selected);\n\n if (this.multi) {\n return selectedArray;\n }\n\n // For single-select\n return selectedArray[0] ?? '';\n }\n\n /**\n * Set value programmatically\n */\n set value(val: string | string[]) {\n this._selected.clear();\n\n if (Array.isArray(val)) {\n val.forEach((v) => this._selected.add(v));\n } else if (val) {\n this._selected.add(val);\n }\n\n this._updateOptionStates();\n this._validateSelection();\n }\n\n /**\n * Get selected values as array\n */\n getSelected(): string[] {\n return Array.from(this._selected);\n }\n\n /**\n * Check if option is selected\n */\n isSelected(value: string): boolean {\n return this._selected.has(value);\n }\n\n /**\n * Select an option by value\n */\n select(value: string): void {\n this._selectValue(value);\n }\n\n /**\n * Deselect an option by value\n */\n deselect(value: string): void {\n if (this._selected.has(value)) {\n this._selected.delete(value);\n this._updateOptionStates();\n this._validateSelection();\n this._dispatchChange();\n }\n }\n\n /**\n * Clear all selections\n */\n clear(): void {\n this._selected.clear();\n this._updateOptionStates();\n this._validateSelection();\n this._dispatchChange();\n }\n\n /**\n * Validate current selection\n */\n validate(): boolean {\n // Activate validation mode (enables showing error messages)\n this._validationActivated = true;\n return this._validateSelection();\n }\n\n /**\n * Check if selection is valid (no side effects)\n */\n get isValid(): boolean {\n return this._checkValidation();\n }\n\n /**\n * Show error message\n */\n showError(message: string): void {\n this._errorMessage = message;\n }\n\n /**\n * Clear error message\n */\n clearError(): void {\n this._errorMessage = '';\n }\n\n /**\n * Focus first option\n */\n focus(): void {\n this._options[0]?.focus();\n }\n\n /**\n * Reset to initial state\n */\n reset(): void {\n this._selected.clear();\n this._otherValue = '';\n this._errorMessage = '';\n this._validationActivated = false;\n\n // Clear composable wf-other if present\n if (this._composableOther) {\n this._composableOther.clear();\n }\n\n // Restore any pre-selected options from attributes\n this._options.forEach((option) => {\n if (option.hasAttribute('selected')) {\n this._selected.add(option.value);\n }\n option.setSelected(this._selected.has(option.value));\n });\n\n this._dispatchChange();\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-options': WfOptions;\n }\n}\n","/**\n * WF-Option styles for Shadow DOM\n */\n\nimport { css } from 'lit';\n\nexport const wfOptionStyles = css`\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .wf-option-card {\n display: flex;\n align-items: center;\n gap: var(--wf-spacing-3);\n width: 100%;\n min-height: var(--wf-input-min-height);\n padding: var(--wf-spacing-3);\n background: var(--wf-glass-bg);\n backdrop-filter: blur(var(--wf-glass-blur));\n -webkit-backdrop-filter: blur(var(--wf-glass-blur));\n border: 1px solid var(--wf-glass-border);\n border-radius: var(--wf-radius-md);\n box-shadow: var(--wf-glass-shadow);\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n font-size: var(--wf-font-size-base);\n font-weight: var(--wf-font-weight-input);\n color: var(--wf-color-text);\n transition: border-color 150ms ease, background 150ms ease, transform 100ms ease;\n outline: none;\n box-sizing: border-box;\n }\n\n .wf-option-card:hover:not(:disabled) {\n border-color: var(--wf-color-primary);\n background: var(--wf-glass-bg-hover);\n }\n\n .wf-option-card:focus-visible {\n border-color: var(--wf-color-primary);\n box-shadow: 0 0 0 var(--wf-focus-ring-width) var(--wf-focus-ring-primary);\n }\n\n .wf-option-card[aria-selected='true'] {\n border-color: var(--wf-color-primary);\n background-color: var(--wf-color-primary-light);\n }\n\n .wf-option-card:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .wf-option-card:active:not(:disabled) {\n transform: scale(0.98);\n }\n\n .wf-option-card.selecting {\n animation: wf-blink 0.3s ease;\n }\n\n @keyframes wf-blink {\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.5;\n }\n }\n\n .wf-option-content {\n flex: 1;\n min-width: 0;\n }\n\n /* Slotted content styling */\n ::slotted(strong),\n ::slotted(h3),\n ::slotted(h4) {\n display: block;\n font-weight: var(--wf-font-weight-heading);\n margin: 0;\n }\n\n ::slotted(span),\n ::slotted(p) {\n display: block;\n font-size: var(--wf-font-size-sm);\n color: var(--wf-color-text-muted);\n margin: var(--wf-spacing-1) 0 0 0;\n }\n`;\n","/**\n * WF-Option - Individual option component for wizard forms\n *\n * A selectable option card with slot content and auto-injected shortcut badge.\n *\n * @example\n * <wf-option value=\"developer\">\n * <strong>Developer</strong>\n * <span>I write code</span>\n * </wf-option>\n */\n\nimport { LitElement, html, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\n\nimport { wfOptionStyles } from './wf-option.styles.js';\n\n// Import wf-badge for shortcut display\nimport './wf-badge.js';\n\n// Event detail types\nexport interface OptionSelectDetail {\n value: string;\n selected: boolean;\n}\n\n@customElement('wf-option')\nexport class WfOption extends LitElement {\n static styles = wfOptionStyles;\n\n /**\n * The value associated with this option (required)\n */\n @property({ type: String })\n value = '';\n\n /**\n * Whether this option is selected\n */\n @property({ type: Boolean, reflect: true })\n selected = false;\n\n /**\n * Whether this option is disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * The keyboard shortcut key for this option (auto-assigned by parent)\n */\n @property({ type: String })\n shortcut = '';\n\n /**\n * Internal state for selection animation\n */\n @state()\n private _selecting = false;\n\n render() {\n return html`\n <button\n class=\"wf-option-card ${this._selecting ? 'selecting' : ''}\"\n role=\"option\"\n aria-selected=\"${this.selected}\"\n ?disabled=\"${this.disabled}\"\n data-testid=\"wf-option-btn\"\n @click=\"${this._handleClick}\"\n >\n ${this.shortcut\n ? html`<wf-badge\n shortcut=\"${this.shortcut}\"\n variant=\"${this.selected ? 'selected' : 'default'}\"\n ></wf-badge>`\n : nothing}\n <div class=\"wf-option-content\">\n <slot></slot>\n </div>\n </button>\n `;\n }\n\n private _handleClick(e: Event): void {\n if (this.disabled) {\n e.preventDefault();\n return;\n }\n\n this._triggerSelect();\n }\n\n /**\n * Programmatically trigger selection (used by keyboard shortcuts)\n */\n triggerSelect(): void {\n if (!this.disabled) {\n this._triggerSelect();\n }\n }\n\n private _triggerSelect(): void {\n // Start selection animation\n this._selecting = true;\n\n // Dispatch selection event\n const detail: OptionSelectDetail = {\n value: this.value,\n selected: !this.selected, // Toggle for multi-select, parent handles logic\n };\n\n this.dispatchEvent(\n new CustomEvent('wf-option-select', {\n detail,\n bubbles: true,\n composed: true,\n })\n );\n\n // Clear animation after it completes\n setTimeout(() => {\n this._selecting = false;\n }, 300);\n }\n\n /**\n * Focus the option button\n */\n focus(): void {\n const button = this.shadowRoot?.querySelector('button');\n button?.focus();\n }\n\n /**\n * Set selected state programmatically\n */\n setSelected(selected: boolean): void {\n this.selected = selected;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-option': WfOption;\n }\n}\n","/**\n * Shared styles for all form input components (FormInputBase children)\n *\n * Used by: wf-input, wf-email, wf-textarea, wf-field, wf-number\n */\n\nimport { css } from 'lit';\n\nexport const formInputBaseStyles = css`\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .wf-field-container {\n display: flex;\n flex-direction: column;\n }\n\n .wf-label {\n font-size: var(--wf-font-size-sm);\n font-weight: var(--wf-font-weight-label);\n color: var(--wf-color-text);\n margin-bottom: var(--wf-spacing-2);\n }\n\n .wf-label-required::after {\n content: ' *';\n color: var(--wf-color-error);\n }\n\n /* Error wrapper for animated expand/collapse */\n .wf-error-wrapper {\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 200ms ease-out;\n }\n\n .wf-error-wrapper.wf-has-error {\n grid-template-rows: 1fr;\n }\n\n .wf-error-message {\n overflow: hidden;\n min-height: 0;\n font-size: var(--wf-font-size-sm);\n color: var(--wf-color-error);\n opacity: 0;\n transform: translateY(-4px);\n transition: opacity 200ms ease-out, transform 200ms ease-out;\n }\n\n .wf-has-error .wf-error-message {\n margin-top: var(--wf-spacing-2);\n opacity: 1;\n transform: translateY(0);\n }\n\n .wf-hint {\n font-size: var(--wf-font-size-sm);\n color: var(--wf-color-text-muted);\n margin-top: var(--wf-spacing-2);\n }\n\n .wf-input {\n width: 100%;\n min-height: var(--wf-input-min-height);\n padding: var(--wf-spacing-4);\n font-size: var(--wf-font-size-base);\n font-weight: var(--wf-font-weight-input);\n font-family: inherit;\n background: var(--wf-glass-bg);\n backdrop-filter: blur(var(--wf-glass-blur));\n -webkit-backdrop-filter: blur(var(--wf-glass-blur));\n border: 1px solid var(--wf-glass-border);\n border-radius: var(--wf-radius-md);\n box-shadow: var(--wf-glass-shadow);\n color: var(--wf-color-text);\n transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;\n outline: none;\n box-sizing: border-box;\n }\n\n .wf-input::placeholder {\n color: var(--wf-color-text-muted);\n font-weight: var(--wf-font-weight-input);\n }\n\n .wf-input:focus {\n border-color: var(--wf-color-primary);\n box-shadow: 0 0 0 var(--wf-focus-ring-width) var(--wf-focus-ring-primary);\n }\n\n .wf-input:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .wf-input.wf-input-error {\n border-color: var(--wf-color-error);\n }\n\n .wf-input.wf-input-error:focus {\n box-shadow: 0 0 0 var(--wf-focus-ring-width) var(--wf-focus-ring-error);\n }\n\n /* Textarea-specific styles */\n .wf-textarea {\n width: 100%;\n padding: var(--wf-spacing-4);\n font-size: var(--wf-font-size-base);\n font-family: inherit;\n background: var(--wf-glass-bg);\n backdrop-filter: blur(var(--wf-glass-blur));\n -webkit-backdrop-filter: blur(var(--wf-glass-blur));\n border: 1px solid var(--wf-glass-border);\n border-radius: var(--wf-radius-lg);\n box-shadow: var(--wf-glass-shadow);\n color: var(--wf-color-text);\n transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;\n outline: none;\n box-sizing: border-box;\n resize: vertical;\n min-height: var(--wf-textarea-min-height);\n }\n\n .wf-textarea::placeholder {\n color: var(--wf-color-text-muted);\n }\n\n .wf-textarea:focus {\n border-color: var(--wf-color-primary);\n box-shadow: 0 0 0 var(--wf-focus-ring-width) var(--wf-focus-ring-primary);\n }\n\n .wf-textarea:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .wf-textarea.wf-textarea-error {\n border-color: var(--wf-color-error);\n }\n\n .wf-textarea.wf-textarea-error:focus {\n box-shadow: 0 0 0 var(--wf-focus-ring-width) var(--wf-focus-ring-error);\n }\n\n .wf-char-count {\n font-size: var(--wf-font-size-sm);\n color: var(--wf-color-text-muted);\n text-align: right;\n }\n\n .wf-char-count.wf-char-limit {\n color: var(--wf-color-error);\n }\n\n /* wf-field slotted input styles */\n .wf-input-wrapper {\n position: relative;\n }\n\n /* Number input - hide spinners */\n .wf-input::-webkit-outer-spin-button,\n .wf-input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n .wf-input[type='number'] {\n -moz-appearance: textfield;\n }\n`;\n","/**\n * FormInputBase - Abstract base class for form input components\n *\n * Provides shared validation, event handling, and state management for:\n * - wf-input\n * - wf-email\n * - wf-textarea\n * - wf-field\n *\n * Subclasses must implement:\n * - _setupValidators(): Configure validators based on component properties\n * - _getValidationTriggerProperties(): Return property names that trigger validator rebuild\n * - render(): Render the component-specific template\n *\n * Subclasses may override:\n * - _getDebounceMs(): Return debounce delay for input validation (default: 600ms)\n * - _getFocusableElement(): Return the focusable element (default: 'input')\n */\n\nimport { LitElement, CSSResultGroup, html, nothing, TemplateResult } from 'lit';\nimport { property, state } from 'lit/decorators.js';\n\nimport { formInputBaseStyles } from './form-input-base.styles.js';\nimport type { Validator } from '../../types.js';\n\n/**\n * Default debounce delay for input validation (in milliseconds)\n */\nconst DEFAULT_DEBOUNCE_MS = 600;\n\n/**\n * Abstract base class for form input components\n */\nexport abstract class FormInputBase extends LitElement {\n /**\n * Base styles for all form input components\n * Subclasses can extend by providing their own static styles array\n */\n static styles: CSSResultGroup = formInputBaseStyles;\n\n // ============================================\n // Common Properties\n // ============================================\n\n /**\n * Field name for form data\n */\n @property({ type: String })\n name = '';\n\n /**\n * Label text\n */\n @property({ type: String })\n label = '';\n\n /**\n * Whether field is required\n */\n @property({ type: Boolean })\n required = false;\n\n /**\n * Hint text displayed below the input\n */\n @property({ type: String })\n hint = '';\n\n // ============================================\n // Internal State\n // ============================================\n\n /**\n * Validation error message (displayed to user)\n */\n @state()\n protected _errorMessage = '';\n\n /**\n * Current field value\n */\n @state()\n protected _value = '';\n\n /**\n * Whether validation has been activated (after first validation attempt)\n * When true, input changes trigger debounced validation\n */\n protected _validationActivated = false;\n\n /**\n * Debounce timer for input validation\n */\n protected _debounceTimer: ReturnType<typeof setTimeout> | null = null;\n\n /**\n * Array of validators for this field\n */\n protected _validators: Validator[] = [];\n\n // ============================================\n // Lifecycle Methods\n // ============================================\n\n connectedCallback(): void {\n super.connectedCallback();\n this._setupValidators();\n }\n\n updated(changedProperties: Map<string, unknown>): void {\n const triggerProps = this._getValidationTriggerProperties();\n const shouldRebuild = triggerProps.some((prop) => changedProperties.has(prop));\n if (shouldRebuild) {\n this._setupValidators();\n }\n }\n\n // ============================================\n // Abstract Methods (must be implemented by subclasses)\n // ============================================\n\n /**\n * Setup validators based on component properties.\n * Called on connectedCallback and when validation-triggering properties change.\n */\n protected abstract _setupValidators(): void;\n\n /**\n * Return property names that should trigger validator rebuild when changed.\n * At minimum, should include 'required'.\n */\n protected abstract _getValidationTriggerProperties(): string[];\n\n // ============================================\n // Overridable Methods\n // ============================================\n\n /**\n * Return the debounce delay for input validation (in milliseconds).\n * Override in subclasses that need different debounce timing.\n */\n protected _getDebounceMs(): number {\n return DEFAULT_DEBOUNCE_MS;\n }\n\n /**\n * Return the CSS selector for the focusable element.\n * Override in subclasses with different focusable elements (e.g., 'textarea').\n */\n protected _getFocusableSelector(): string {\n return 'input';\n }\n\n // ============================================\n // Shared Render Helpers\n // ============================================\n\n /**\n * Render the label element\n */\n protected _renderLabel(): TemplateResult | typeof nothing {\n if (!this.label) {return nothing;}\n return html`<label\n class=\"wf-label ${this.required ? 'wf-label-required' : ''}\"\n for=\"${this.name}\"\n data-testid=\"wf-label\"\n >${this.label}</label>`;\n }\n\n /**\n * Render the hint text (only shown when no error)\n */\n protected _renderHint(): TemplateResult | typeof nothing {\n if (!this.hint || this._errorMessage) {return nothing;}\n return html`<span class=\"wf-hint\">${this.hint}</span>`;\n }\n\n /**\n * Render the error message container with animation support\n */\n protected _renderError(): TemplateResult {\n return html`<div class=\"wf-error-wrapper ${this._errorMessage ? 'wf-has-error' : ''}\">\n <span class=\"wf-error-message\" role=\"alert\" aria-live=\"polite\" data-testid=\"wf-error\">\n ${this._errorMessage || ''}\n </span>\n </div>`;\n }\n\n // ============================================\n // Event Handlers\n // ============================================\n\n /**\n * Handle input events with debounced validation\n */\n protected _handleInput = (e: Event): void => {\n const target = e.target as HTMLInputElement | HTMLTextAreaElement;\n this._value = target.value;\n\n // Debounced validation after activation\n if (this._validationActivated) {\n if (this._debounceTimer) {\n clearTimeout(this._debounceTimer);\n }\n this._debounceTimer = setTimeout(() => {\n this.validate();\n }, this._getDebounceMs());\n }\n\n // Dispatch change event\n this.dispatchEvent(\n new CustomEvent('wf-change', {\n detail: {\n name: this.name,\n value: this._value,\n },\n bubbles: true,\n composed: true,\n })\n );\n };\n\n /**\n * Handle blur events\n */\n protected _handleBlur = (): void => {\n this.dispatchEvent(\n new CustomEvent('wf-blur', {\n detail: { name: this.name, value: this._value },\n bubbles: true,\n composed: true,\n })\n );\n };\n\n /**\n * Handle focus events\n */\n protected _handleFocus = (): void => {\n this.dispatchEvent(\n new CustomEvent('wf-focus', {\n detail: { name: this.name },\n bubbles: true,\n composed: true,\n })\n );\n };\n\n // ============================================\n // Public API\n // ============================================\n\n /**\n * Get current value\n */\n get value(): string {\n return this._value;\n }\n\n /**\n * Set value programmatically\n */\n set value(val: string) {\n this._value = val;\n }\n\n /**\n * Add a custom validator\n */\n addValidator(validator: Validator): void {\n this._validators.push(validator);\n }\n\n /**\n * Validate the field asynchronously\n * @returns Promise resolving to true if valid, false otherwise\n */\n async validate(): Promise<boolean> {\n // Activate validation mode (enables debounced input validation)\n this._validationActivated = true;\n\n // Use getter to allow subclasses to customize value retrieval\n const currentValue = this.value;\n\n for (const validator of this._validators) {\n try {\n const result = await validator.validate(currentValue);\n if (!result.valid) {\n this._errorMessage = result.error ?? validator.message ?? 'Validation failed';\n return false;\n }\n } catch (error) {\n console.error(`[${this.tagName}] Validator error:`, error);\n this._errorMessage = 'Validation error occurred';\n return false;\n }\n }\n\n this._errorMessage = '';\n return true;\n }\n\n /**\n * Check if field is valid synchronously (doesn't update UI)\n */\n get isValid(): boolean {\n // Use getter to allow subclasses to customize value retrieval\n const currentValue = this.value;\n\n for (const validator of this._validators) {\n const result = validator.validate(currentValue);\n if (result instanceof Promise) {\n console.warn(`[${this.tagName}] Async validator called synchronously`);\n continue;\n }\n if (!result.valid) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Show an error message manually\n */\n showError(message: string): void {\n this._errorMessage = message;\n }\n\n /**\n * Clear the error message\n */\n clearError(): void {\n this._errorMessage = '';\n }\n\n /**\n * Focus the input element\n */\n focus(): void {\n const element = this.shadowRoot?.querySelector(this._getFocusableSelector());\n (element as HTMLElement | null)?.focus();\n }\n\n /**\n * Reset field to initial state\n */\n reset(): void {\n this._value = '';\n this._errorMessage = '';\n this._validationActivated = false;\n if (this._debounceTimer) {\n clearTimeout(this._debounceTimer);\n this._debounceTimer = null;\n }\n }\n}\n","/**\n * ValidationController - Validation management for wizard forms\n *\n * Provides built-in validators and custom validator support.\n */\n\nimport type { ReactiveController, ReactiveControllerHost } from 'lit';\n\nimport type { Validator, ValidatorFn, ValidationResult } from '../types.js';\n\n// Default blocked email domains for work email validation\nconst DEFAULT_BLOCKED_DOMAINS = [\n 'gmail.com',\n 'yahoo.com',\n 'hotmail.com',\n 'outlook.com',\n 'aol.com',\n 'icloud.com',\n 'mail.com',\n 'protonmail.com',\n 'zoho.com',\n 'yandex.com',\n 'live.com',\n 'msn.com',\n 'me.com',\n 'inbox.com',\n 'gmx.com',\n];\n\nexport class ValidationController implements ReactiveController {\n host: ReactiveControllerHost;\n\n private _validators: Map<string, Validator[]> = new Map();\n\n constructor(host: ReactiveControllerHost) {\n this.host = host;\n host.addController(this);\n }\n\n // ============================================\n // Lifecycle\n // ============================================\n\n hostConnected(): void {\n // Controller connected\n }\n\n hostDisconnected(): void {\n // Clean up\n this._validators.clear();\n }\n\n // ============================================\n // Validator Management\n // ============================================\n\n addValidator(name: string, validator: Validator): void {\n const existing = this._validators.get(name) ?? [];\n this._validators.set(name, [...existing, validator]);\n }\n\n addValidators(name: string, validators: Validator[]): void {\n validators.forEach((v) => this.addValidator(name, v));\n }\n\n removeValidator(name: string, validatorName: string): void {\n const existing = this._validators.get(name) ?? [];\n this._validators.set(\n name,\n existing.filter((v) => v.name !== validatorName)\n );\n }\n\n clearValidators(name: string): void {\n this._validators.delete(name);\n }\n\n getValidators(name: string): Validator[] {\n return this._validators.get(name) ?? [];\n }\n\n // ============================================\n // Validation Execution\n // ============================================\n\n async validate(name: string, value: unknown): Promise<ValidationResult> {\n const validators = this.getValidators(name);\n\n for (const validator of validators) {\n try {\n const result = await validator.validate(value);\n if (!result.valid) {\n return {\n valid: false,\n error: result.error ?? validator.message ?? 'Validation failed',\n };\n }\n } catch (error) {\n console.error(`[ValidationController] Validator \"${validator.name}\" threw:`, error);\n return {\n valid: false,\n error: 'Validation error occurred',\n };\n }\n }\n\n return { valid: true };\n }\n\n validateSync(name: string, value: unknown): ValidationResult {\n const validators = this.getValidators(name);\n\n for (const validator of validators) {\n const result = validator.validate(value);\n\n // If it's a promise, we can't handle it synchronously\n if (result instanceof Promise) {\n console.warn(`[ValidationController] Async validator \"${validator.name}\" called synchronously`);\n continue;\n }\n\n if (!result.valid) {\n return {\n valid: false,\n error: result.error ?? validator.message ?? 'Validation failed',\n };\n }\n }\n\n return { valid: true };\n }\n\n // ============================================\n // Built-in Validators (Static Factory Methods)\n // ============================================\n\n static required(message = 'This field is required'): Validator {\n return {\n name: 'required',\n message,\n validate: (value: unknown): ValidationResult => {\n if (value === null || value === undefined) {\n return { valid: false, error: message };\n }\n if (typeof value === 'string' && value.trim() === '') {\n return { valid: false, error: message };\n }\n if (Array.isArray(value) && value.length === 0) {\n return { valid: false, error: message };\n }\n return { valid: true };\n },\n };\n }\n\n static email(message = 'Please enter a valid email address'): Validator {\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n\n return {\n name: 'email',\n message,\n validate: (value: unknown): ValidationResult => {\n if (typeof value !== 'string' || value.trim() === '') {\n return { valid: true }; // Let required validator handle empty\n }\n if (!emailRegex.test(value)) {\n return { valid: false, error: message };\n }\n return { valid: true };\n },\n };\n }\n\n static workEmail(\n blockedDomains: string[] = DEFAULT_BLOCKED_DOMAINS,\n message = 'Please use your work email address'\n ): Validator {\n return {\n name: 'workEmail',\n message,\n validate: (value: unknown): ValidationResult => {\n if (typeof value !== 'string' || value.trim() === '') {\n return { valid: true }; // Let required validator handle empty\n }\n\n const domain = value.split('@')[1]?.toLowerCase();\n if (domain && blockedDomains.includes(domain)) {\n return { valid: false, error: message };\n }\n return { valid: true };\n },\n };\n }\n\n static pattern(regex: RegExp, message = 'Invalid format'): Validator {\n return {\n name: 'pattern',\n message,\n validate: (value: unknown): ValidationResult => {\n if (typeof value !== 'string' || value.trim() === '') {\n return { valid: true }; // Let required validator handle empty\n }\n if (!regex.test(value)) {\n return { valid: false, error: message };\n }\n return { valid: true };\n },\n };\n }\n\n static minLength(min: number, message?: string): Validator {\n const errorMessage = message ?? `Minimum ${min} characters required`;\n\n return {\n name: 'minLength',\n message: errorMessage,\n validate: (value: unknown): ValidationResult => {\n if (typeof value !== 'string') {\n return { valid: true };\n }\n if (value.length < min) {\n return { valid: false, error: errorMessage };\n }\n return { valid: true };\n },\n };\n }\n\n static maxLength(max: number, message?: string): Validator {\n const errorMessage = message ?? `Maximum ${max} characters allowed`;\n\n return {\n name: 'maxLength',\n message: errorMessage,\n validate: (value: unknown): ValidationResult => {\n if (typeof value !== 'string') {\n return { valid: true };\n }\n if (value.length > max) {\n return { valid: false, error: errorMessage };\n }\n return { valid: true };\n },\n };\n }\n\n static minSelections(min: number, message?: string): Validator {\n const errorMessage = message ?? `Select at least ${min} option${min > 1 ? 's' : ''}`;\n\n return {\n name: 'minSelections',\n message: errorMessage,\n validate: (value: unknown): ValidationResult => {\n if (!Array.isArray(value)) {\n return { valid: true };\n }\n if (value.length < min) {\n return { valid: false, error: errorMessage };\n }\n return { valid: true };\n },\n };\n }\n\n static maxSelections(max: number, message?: string): Validator {\n const errorMessage = message ?? `Select at most ${max} option${max > 1 ? 's' : ''}`;\n\n return {\n name: 'maxSelections',\n message: errorMessage,\n validate: (value: unknown): ValidationResult => {\n if (!Array.isArray(value)) {\n return { valid: true };\n }\n if (value.length > max) {\n return { valid: false, error: errorMessage };\n }\n return { valid: true };\n },\n };\n }\n\n static custom(name: string, validateFn: ValidatorFn, message?: string): Validator {\n return {\n name,\n message,\n validate: validateFn,\n };\n }\n}\n\n// Export default blocked domains for external use\nexport { DEFAULT_BLOCKED_DOMAINS };\n","/**\n * WF-Email - Email input component for wizard forms\n *\n * A convenience component for email inputs with optional work email validation.\n *\n * @example\n * <wf-email name=\"email\" label=\"Email Address\" work-email required />\n */\n\nimport { html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { FormInputBase } from './base/form-input-base.js';\nimport { ValidationController, DEFAULT_BLOCKED_DOMAINS } from '../controllers/ValidationController.js';\n\n@customElement('wf-email')\nexport class WfEmail extends FormInputBase {\n\n // ============================================\n // Email-specific Properties\n // ============================================\n\n /**\n * Placeholder text\n */\n @property({ type: String })\n placeholder = 'you@company.com';\n\n /**\n * Whether to validate as work email (block personal domains)\n */\n @property({ type: Boolean, attribute: 'work-email' })\n workEmail = false;\n\n /**\n * Custom blocked domains (comma-separated or array)\n */\n @property({ type: String, attribute: 'blocked-domains' })\n blockedDomains = '';\n\n /**\n * Work email validation message\n */\n @property({ type: String, attribute: 'work-email-message' })\n workEmailMessage = 'Please use your work email address';\n\n /**\n * Whether field is disabled\n */\n @property({ type: Boolean })\n disabled = false;\n\n // ============================================\n // Abstract Method Implementations\n // ============================================\n\n protected _getValidationTriggerProperties(): string[] {\n return ['required', 'workEmail', 'blockedDomains'];\n }\n\n /**\n * Email uses faster debounce (300ms) for responsive validation\n */\n protected override _getDebounceMs(): number {\n return 300;\n }\n\n protected _setupValidators(): void {\n this._validators = [];\n\n // Required validator\n if (this.required) {\n this._validators.push(ValidationController.required());\n }\n\n // Email format validator (always applied)\n this._validators.push(ValidationController.email());\n\n // Work email validator\n if (this.workEmail) {\n let domains = DEFAULT_BLOCKED_DOMAINS;\n\n if (this.blockedDomains) {\n domains = this.blockedDomains.split(',').map((d) => d.trim().toLowerCase());\n }\n\n this._validators.push(\n ValidationController.workEmail(domains, this.workEmailMessage)\n );\n }\n }\n\n // ============================================\n // Render\n // ============================================\n\n render() {\n return html`\n <div class=\"wf-field-container\">\n ${this._renderLabel()}\n <input\n type=\"email\"\n class=\"wf-input ${this._errorMessage ? 'wf-input-error' : ''}\"\n id=\"${this.name}\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder}\"\n .value=\"${this._value}\"\n ?disabled=\"${this.disabled}\"\n ?required=\"${this.required}\"\n data-testid=\"wf-input\"\n @input=\"${this._handleInput}\"\n @blur=\"${this._handleBlur}\"\n @focus=\"${this._handleFocus}\"\n />\n ${this._renderHint()}\n ${this._renderError()}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-email': WfEmail;\n }\n}\n","/**\n * WF-Input - Base text input component for wizard forms\n *\n * A standalone text input with validation, styling, and form integration.\n *\n * @example\n * <wf-input name=\"fullName\" label=\"Full Name\" required placeholder=\"John Doe\" />\n */\n\nimport { html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { FormInputBase } from './base/form-input-base.js';\nimport { ValidationController } from '../controllers/ValidationController.js';\n\n@customElement('wf-input')\nexport class WfInput extends FormInputBase {\n\n // ============================================\n // Input-specific Properties\n // ============================================\n\n /**\n * Placeholder text\n */\n @property({ type: String })\n placeholder = '';\n\n /**\n * Input type (text, tel, url, etc.)\n */\n @property({ type: String })\n type: 'text' | 'tel' | 'url' | 'search' = 'text';\n\n /**\n * Minimum length\n */\n @property({ type: Number })\n minlength?: number;\n\n /**\n * Maximum length\n */\n @property({ type: Number })\n maxlength?: number;\n\n /**\n * Pattern regex string\n */\n @property({ type: String })\n pattern?: string;\n\n /**\n * Pattern validation message\n */\n @property({ type: String, attribute: 'pattern-message' })\n patternMessage = 'Invalid format';\n\n /**\n * Whether field is disabled\n */\n @property({ type: Boolean })\n disabled = false;\n\n /**\n * Autocomplete attribute\n */\n @property({ type: String })\n autocomplete = '';\n\n // ============================================\n // Abstract Method Implementations\n // ============================================\n\n protected _getValidationTriggerProperties(): string[] {\n return ['required', 'minlength', 'maxlength', 'pattern'];\n }\n\n protected _setupValidators(): void {\n this._validators = [];\n\n if (this.required) {\n this._validators.push(ValidationController.required());\n }\n\n if (this.minlength !== undefined) {\n this._validators.push(ValidationController.minLength(this.minlength));\n }\n\n if (this.maxlength !== undefined) {\n this._validators.push(ValidationController.maxLength(this.maxlength));\n }\n\n if (this.pattern) {\n this._validators.push(\n ValidationController.pattern(new RegExp(this.pattern), this.patternMessage)\n );\n }\n }\n\n // ============================================\n // Render\n // ============================================\n\n render() {\n return html`\n <div class=\"wf-field-container\">\n ${this._renderLabel()}\n <input\n type=\"${this.type}\"\n class=\"wf-input ${this._errorMessage ? 'wf-input-error' : ''}\"\n id=\"${this.name}\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder}\"\n .value=\"${this._value}\"\n ?disabled=\"${this.disabled}\"\n ?required=\"${this.required}\"\n autocomplete=\"${this.autocomplete || 'off'}\"\n data-testid=\"wf-input\"\n @input=\"${this._handleInput}\"\n @blur=\"${this._handleBlur}\"\n @focus=\"${this._handleFocus}\"\n />\n ${this._renderHint()}\n ${this._renderError()}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-input': WfInput;\n }\n}\n","/**\n * WF-Number - Number input component for wizard forms\n *\n * A specialized input for numeric values with min/max/step support.\n *\n * @example\n * <wf-number name=\"employees\" label=\"Number of Employees\" min=\"1\" max=\"10000\" />\n */\n\nimport { html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { WfInput } from './wf-input.js';\nimport { ValidationController } from '../controllers/ValidationController.js';\n\n@customElement('wf-number')\nexport class WfNumber extends WfInput {\n\n /**\n * Minimum value\n */\n @property({ type: Number })\n min?: number;\n\n /**\n * Maximum value\n */\n @property({ type: Number })\n max?: number;\n\n /**\n * Step increment\n */\n @property({ type: Number })\n step = 1;\n\n protected _setupValidators(): void {\n this._validators = [];\n\n if (this.required) {\n this._validators.push(ValidationController.required());\n }\n\n // Number range validator\n if (this.min !== undefined || this.max !== undefined) {\n this._validators.push(\n ValidationController.custom(\n 'range',\n (value: unknown) => {\n if (value === '' || value === null || value === undefined) {\n return { valid: true }; // Let required handle empty\n }\n\n const num = Number(value);\n if (isNaN(num)) {\n return { valid: false, error: 'Please enter a valid number' };\n }\n\n if (this.min !== undefined && num < this.min) {\n return { valid: false, error: `Value must be at least ${this.min}` };\n }\n\n if (this.max !== undefined && num > this.max) {\n return { valid: false, error: `Value must be at most ${this.max}` };\n }\n\n return { valid: true };\n },\n 'Value out of range'\n )\n );\n }\n }\n\n render() {\n return html`\n <div class=\"wf-field-container\">\n ${this._renderLabel()}\n <input\n type=\"number\"\n class=\"wf-input ${this._errorMessage ? 'wf-input-error' : ''}\"\n id=\"${this.name}\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder}\"\n .value=\"${this._value}\"\n ?disabled=\"${this.disabled}\"\n ?required=\"${this.required}\"\n min=\"${this.min ?? ''}\"\n max=\"${this.max ?? ''}\"\n step=\"${this.step}\"\n autocomplete=\"${this.autocomplete || 'off'}\"\n data-testid=\"wf-input\"\n @input=\"${this._handleInput}\"\n @blur=\"${this._handleBlur}\"\n @focus=\"${this._handleFocus}\"\n />\n ${this._renderHint()}\n ${this._renderError()}\n </div>\n `;\n }\n\n /**\n * Get current value as number\n */\n get valueAsNumber(): number {\n return Number(this._value) || 0;\n }\n\n /**\n * Set value as number\n */\n set valueAsNumber(val: number) {\n this._value = String(val);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-number': WfNumber;\n }\n}\n","/**\n * WF-Textarea - Multiline text input component for wizard forms\n *\n * A textarea with validation, styling, and form integration.\n * Enter key inserts newline (does NOT submit the form).\n *\n * @example\n * <wf-textarea name=\"message\" label=\"Message\" rows=\"4\" required />\n */\n\nimport { html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { FormInputBase } from './base/form-input-base.js';\nimport { ValidationController } from '../controllers/ValidationController.js';\n\n@customElement('wf-textarea')\nexport class WfTextarea extends FormInputBase {\n\n // ============================================\n // Textarea-specific Properties\n // ============================================\n\n /**\n * Placeholder text\n */\n @property({ type: String })\n placeholder = '';\n\n /**\n * Number of visible rows\n */\n @property({ type: Number })\n rows = 4;\n\n /**\n * Minimum length\n */\n @property({ type: Number })\n minlength?: number;\n\n /**\n * Maximum length\n */\n @property({ type: Number })\n maxlength?: number;\n\n /**\n * Whether field is disabled\n */\n @property({ type: Boolean })\n disabled = false;\n\n /**\n * Show character count\n */\n @property({ type: Boolean, attribute: 'show-count' })\n showCount = false;\n\n // ============================================\n // Abstract Method Implementations\n // ============================================\n\n protected _getValidationTriggerProperties(): string[] {\n return ['required', 'minlength', 'maxlength'];\n }\n\n protected override _getFocusableSelector(): string {\n return 'textarea';\n }\n\n protected _setupValidators(): void {\n this._validators = [];\n\n if (this.required) {\n this._validators.push(ValidationController.required());\n }\n\n if (this.minlength !== undefined) {\n this._validators.push(ValidationController.minLength(this.minlength));\n }\n\n if (this.maxlength !== undefined) {\n this._validators.push(ValidationController.maxLength(this.maxlength));\n }\n }\n\n // ============================================\n // Textarea-specific Event Handlers\n // ============================================\n\n private _handleKeydown = (e: KeyboardEvent): void => {\n // Allow Enter to insert newline (don't trigger form navigation)\n if (e.key === 'Enter') {\n e.stopPropagation();\n }\n };\n\n // ============================================\n // Render\n // ============================================\n\n render() {\n const charCount = this._value.length;\n const isAtLimit = this.maxlength !== undefined && charCount >= this.maxlength;\n\n return html`\n <div class=\"wf-field-container\">\n ${this._renderLabel()}\n <textarea\n class=\"wf-textarea ${this._errorMessage ? 'wf-textarea-error' : ''}\"\n id=\"${this.name}\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder}\"\n rows=\"${this.rows}\"\n .value=\"${this._value}\"\n ?disabled=\"${this.disabled}\"\n ?required=\"${this.required}\"\n maxlength=\"${this.maxlength ?? ''}\"\n data-testid=\"wf-textarea\"\n @input=\"${this._handleInput}\"\n @blur=\"${this._handleBlur}\"\n @focus=\"${this._handleFocus}\"\n @keydown=\"${this._handleKeydown}\"\n ></textarea>\n ${this.showCount && this.maxlength\n ? html`<span class=\"wf-char-count ${isAtLimit ? 'wf-char-limit' : ''}\" data-testid=\"wf-counter\">\n ${charCount}/${this.maxlength}\n </span>`\n : ''}\n ${this._renderHint()}\n ${this._renderError()}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-textarea': WfTextarea;\n }\n}\n","/**\n * WizardForm.init() - Imperative API for wizard forms\n *\n * Provides a simple way to initialize wizard forms from a script tag.\n *\n * @example\n * <script src=\"wizard-form.min.js\"></script>\n * <script>\n * WizardForm.init({\n * container: '#signup-form',\n * adapter: 'hubspot',\n * hubspot: { portalId: '123', formId: 'abc' },\n * onSubmit: (data) => console.log(data),\n * onSuccess: () => console.log('Success!'),\n * onError: (err) => console.error(err)\n * });\n * </script>\n */\n\nimport type { WizardForm } from './components/wizard-form.js';\nimport type { SubmissionAdapter, SubmissionContext } from './adapters/types.js';\nimport { createHubSpotAdapter } from './adapters/hubspot.js';\nimport { createWebhookAdapter } from './adapters/webhook.js';\nimport { createRevenueHeroAdapter } from './adapters/revenuehero.js';\n\n// Ensure components are registered\nimport './components/wizard-form.js';\nimport './components/wf-step.js';\nimport './components/wf-options.js';\nimport './components/wf-option.js';\nimport './components/wf-email.js';\nimport './components/wf-input.js';\nimport './components/wf-number.js';\nimport './components/wf-textarea.js';\n\nexport type FormData = Record<string, unknown>;\n\nexport interface WizardFormConfig {\n /**\n * Container element or selector\n */\n container: string | HTMLElement;\n\n /**\n * Adapter type or custom adapter\n */\n adapter?: 'hubspot' | 'webhook' | 'revenuehero' | 'json' | SubmissionAdapter;\n\n /**\n * HubSpot configuration\n */\n hubspot?: {\n portalId: string;\n formId: string;\n fieldMapping?: Record<string, string>;\n };\n\n /**\n * Webhook configuration\n */\n webhook?: {\n url: string;\n method?: 'POST' | 'PUT';\n headers?: Record<string, string>;\n fieldMapping?: Record<string, string>;\n };\n\n /**\n * RevenueHero configuration\n */\n revenuehero?: {\n routerId: string;\n fieldMapping?: Record<string, string>;\n };\n\n /**\n * Color theme\n */\n theme?: 'light' | 'dark' | 'auto';\n\n /**\n * Show progress bar\n */\n showProgress?: boolean;\n\n /**\n * Auto-advance after single-select option\n */\n autoAdvance?: boolean;\n\n /**\n * Mock mode (for testing)\n */\n mock?: boolean;\n\n /**\n * Callback before submission (can cancel)\n */\n onSubmit?: (data: FormData) => boolean | void;\n\n /**\n * Callback on successful submission\n */\n onSuccess?: (data: FormData, response?: unknown) => void;\n\n /**\n * Callback on submission error\n */\n onError?: (error: string, data?: FormData) => void;\n\n /**\n * Callback on step change\n */\n onStepChange?: (from: number, to: number, direction: 'forward' | 'backward') => void;\n\n /**\n * Callback on field value change\n */\n onFieldChange?: (name: string, value: unknown, formData: FormData) => void;\n\n /**\n * Transform form data before submission to adapter.\n * Called after validation, before adapter.submit().\n */\n serialize?: (data: FormData) => FormData;\n}\n\nexport interface WizardFormInstance {\n /**\n * The wizard-form element\n */\n element: WizardForm;\n\n /**\n * Current form data\n */\n readonly formData: FormData;\n\n /**\n * Current step number\n */\n readonly currentStep: number;\n\n /**\n * Total number of steps\n */\n readonly totalSteps: number;\n\n /**\n * Go to next step\n */\n next(): Promise<void>;\n\n /**\n * Go to previous step\n */\n back(): void;\n\n /**\n * Go to a specific step\n */\n goToStep(step: number): void;\n\n /**\n * Submit the form\n */\n submit(): Promise<void>;\n\n /**\n * Reset the form\n */\n reset(): void;\n\n /**\n * Set form data\n */\n setFormData(data: FormData): void;\n\n /**\n * Destroy the instance (remove event listeners)\n */\n destroy(): void;\n\n /**\n * Serialize function (if configured)\n */\n serialize?: (data: FormData) => FormData;\n}\n\n/**\n * Initialize a wizard form with the given configuration\n *\n * @deprecated Use event-based API instead. Listen to wf:submit, wf:success, wf:error events\n * directly on the wizard-form element. See https://github.com/atomicwork/aw-wizard-forms\n */\nexport function init(config: WizardFormConfig): WizardFormInstance {\n console.warn(\n '[WizardForm] init() is deprecated. Use the event-based API instead:\\n' +\n ' form.addEventListener(\"wf:submit\", (e) => { ... });\\n' +\n ' form.addEventListener(\"wf:success\", (e) => { ... });\\n' +\n 'See https://github.com/atomicwork/aw-wizard-forms for migration guide.'\n );\n\n // Get container element\n const container =\n typeof config.container === 'string'\n ? document.querySelector<HTMLElement>(config.container)\n : config.container;\n\n if (!container) {\n throw new Error(`[WizardForm] Container not found: ${config.container}`);\n }\n\n // Find or create wizard-form element\n let wizardForm = container.querySelector<WizardForm>('wizard-form');\n if (!wizardForm) {\n wizardForm = container as unknown as WizardForm;\n if (wizardForm.tagName.toLowerCase() !== 'wizard-form') {\n throw new Error(\n '[WizardForm] Container must be a <wizard-form> element or contain one'\n );\n }\n }\n\n // Apply configuration attributes\n if (config.theme) {\n wizardForm.setAttribute('theme', config.theme);\n }\n if (config.showProgress !== undefined) {\n wizardForm.showProgress = config.showProgress;\n }\n if (config.autoAdvance !== undefined) {\n wizardForm.autoAdvance = config.autoAdvance;\n }\n if (config.mock) {\n wizardForm.mock = config.mock;\n }\n\n // Create adapter\n let adapter: SubmissionAdapter | null = null;\n\n if (typeof config.adapter === 'object') {\n // Custom adapter\n adapter = config.adapter;\n } else {\n const adapterType = config.adapter || 'json';\n\n switch (adapterType) {\n case 'hubspot':\n if (!config.hubspot?.portalId || !config.hubspot?.formId) {\n throw new Error('[WizardForm] HubSpot config requires portalId and formId');\n }\n adapter = createHubSpotAdapter({\n portalId: config.hubspot.portalId,\n formId: config.hubspot.formId,\n fieldMapping: config.hubspot.fieldMapping,\n mock: config.mock,\n });\n // Also set attributes for built-in HubSpot support\n wizardForm.setAttribute('hubspot-portal', config.hubspot.portalId);\n wizardForm.setAttribute('hubspot-form', config.hubspot.formId);\n break;\n\n case 'webhook':\n if (!config.webhook?.url) {\n throw new Error('[WizardForm] Webhook config requires url');\n }\n adapter = createWebhookAdapter({\n url: config.webhook.url,\n method: config.webhook.method,\n headers: config.webhook.headers,\n fieldMapping: config.webhook.fieldMapping,\n mock: config.mock,\n });\n break;\n\n case 'revenuehero':\n if (!config.revenuehero?.routerId) {\n throw new Error('[WizardForm] RevenueHero config requires routerId');\n }\n adapter = createRevenueHeroAdapter({\n routerId: config.revenuehero.routerId,\n fieldMapping: config.revenuehero.fieldMapping,\n mock: config.mock,\n });\n break;\n\n case 'json':\n // No adapter - just emit events\n adapter = null;\n break;\n }\n }\n\n // Event handlers\n const handleSubmit = (e: CustomEvent) => {\n const rawFormData = e.detail.formData;\n\n // Apply serialize transform if provided\n let submitData = { ...rawFormData };\n if (config.serialize) {\n submitData = config.serialize(submitData);\n }\n\n // Auto-expose test refs when mock mode is enabled\n if (config.mock) {\n (window as unknown as Record<string, unknown>).__wizardFormData = submitData;\n (window as unknown as Record<string, unknown>).__wizardFormRawData = rawFormData;\n (window as unknown as Record<string, unknown>).__wizardFormInstance = instance;\n }\n\n // Call user's onSubmit callback\n if (config.onSubmit) {\n const result = config.onSubmit(submitData);\n if (result === false) {\n e.preventDefault();\n return;\n }\n }\n\n // Submit via adapter if configured\n if (adapter) {\n e.preventDefault();\n\n const context: SubmissionContext = {\n pageUrl: window.location.href,\n pageTitle: document.title,\n referrer: document.referrer,\n timestamp: new Date().toISOString(),\n };\n\n adapter.submit(submitData, context).then((result) => {\n // Auto-expose response in mock mode\n if (config.mock) {\n (window as unknown as Record<string, unknown>).__wizardFormResponse = result;\n }\n\n if (result.success) {\n // Manually show success screen\n (wizardForm as unknown as { _submitted: boolean })._submitted = true;\n wizardForm!.requestUpdate();\n\n // Dispatch wf:success event (triggers handleSuccess listener + progress bar hide)\n wizardForm!.dispatchEvent(\n new CustomEvent('wf:success', {\n detail: { formData: rawFormData, response: result.data },\n bubbles: true,\n composed: true,\n })\n );\n // Note: onSuccess callback is triggered by handleSuccess listener\n } else {\n // Auto-expose error in mock mode\n if (config.mock) {\n (window as unknown as Record<string, unknown>).__wizardFormError = result.error;\n }\n\n if (config.onError) {\n // Pass raw form data (not serialized) for user callbacks\n config.onError(result.error || 'Submission failed', rawFormData);\n }\n }\n });\n }\n };\n\n const handleSuccess = (e: CustomEvent) => {\n // Auto-expose response in mock mode (for built-in HubSpot handler)\n if (config.mock) {\n (window as unknown as Record<string, unknown>).__wizardFormResponse = {\n success: true,\n data: e.detail.response,\n };\n }\n\n if (config.onSuccess) {\n config.onSuccess(e.detail.formData, e.detail.response);\n }\n };\n\n const handleError = (e: CustomEvent) => {\n // Auto-expose error in mock mode\n if (config.mock) {\n (window as unknown as Record<string, unknown>).__wizardFormError = e.detail.error;\n }\n\n if (config.onError) {\n config.onError(e.detail.error, e.detail.formData);\n }\n };\n\n const handleStepChange = (e: CustomEvent) => {\n if (config.onStepChange) {\n config.onStepChange(e.detail.from, e.detail.to, e.detail.direction);\n }\n };\n\n const handleFieldChange = (e: CustomEvent) => {\n if (config.onFieldChange) {\n config.onFieldChange(e.detail.name, e.detail.value, e.detail.formData);\n }\n };\n\n // Attach event listeners\n wizardForm.addEventListener('wf:submit', handleSubmit as EventListener);\n wizardForm.addEventListener('wf:success', handleSuccess as EventListener);\n wizardForm.addEventListener('wf:error', handleError as EventListener);\n wizardForm.addEventListener('wf:step-change', handleStepChange as EventListener);\n wizardForm.addEventListener('wf:field-change', handleFieldChange as EventListener);\n\n // Create instance\n const instance: WizardFormInstance = {\n element: wizardForm,\n\n get formData() {\n return wizardForm!.formData;\n },\n\n get currentStep() {\n return wizardForm!.currentStep;\n },\n\n get totalSteps() {\n return wizardForm!.totalSteps;\n },\n\n next() {\n return wizardForm!.next();\n },\n\n back() {\n wizardForm!.back();\n },\n\n goToStep(step: number) {\n wizardForm!.goToStep(step);\n },\n\n submit() {\n return wizardForm!.submit();\n },\n\n reset() {\n wizardForm!.reset();\n },\n\n setFormData(data: FormData) {\n wizardForm!.setFormData(data);\n },\n\n destroy() {\n wizardForm!.removeEventListener('wf:submit', handleSubmit as EventListener);\n wizardForm!.removeEventListener('wf:success', handleSuccess as EventListener);\n wizardForm!.removeEventListener('wf:error', handleError as EventListener);\n wizardForm!.removeEventListener('wf:step-change', handleStepChange as EventListener);\n wizardForm!.removeEventListener('wf:field-change', handleFieldChange as EventListener);\n },\n\n // Expose serialize function if configured\n serialize: config.serialize,\n };\n\n return instance;\n}\n\nexport default { init };\n","/**\n * Styles for wf-progress component (Shadow DOM)\n */\n\nimport { css } from 'lit';\n\nimport { hostTokens } from '../styles/shared.styles.js';\n\nexport const wfProgressStyles = [\n hostTokens,\n css`\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .wf-progress {\n display: flex;\n gap: 16px;\n align-items: center;\n justify-content: center;\n }\n\n .wf-progress-segment {\n width: 32px;\n height: 8px;\n background-color: rgba(255, 255, 255, 0.6);\n \n border-radius: 100vw;\n transition: background-color 300ms ease;\n }\n\n .wf-progress-segment.completed,\n .wf-progress-segment.active {\n background-color: rgba(136, 66, 240, 0.6);\n }\n `,\n];\n","/**\n * WF-Progress - Composable progress bar component for wizard forms\n *\n * A standalone progress indicator that can be placed inside or outside the wizard.\n * Connects to wizard-form via `for` attribute or auto-discovers parent wizard.\n *\n * @example\n * <!-- Inside wizard (auto-connects) -->\n * <wizard-form id=\"my-form\">\n * <wf-progress></wf-progress>\n * <wf-step>...</wf-step>\n * </wizard-form>\n *\n * @example\n * <!-- Outside wizard (uses for attribute) -->\n * <wf-progress for=\"my-form\"></wf-progress>\n * <wizard-form id=\"my-form\">...</wizard-form>\n */\n\nimport { LitElement, html } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\n\nimport { wfProgressStyles } from './wf-progress.styles.js';\nimport type { WizardForm, StepChangeDetail } from './wizard-form.js';\n\n@customElement('wf-progress')\nexport class WfProgress extends LitElement {\n static styles = wfProgressStyles;\n\n /**\n * ID of the wizard-form to connect to.\n * If not specified, auto-connects to parent wizard-form.\n */\n @property({ type: String })\n for = '';\n\n @state()\n private _currentStep = 1;\n\n @state()\n private _totalSteps = 1;\n\n @state()\n private _isComplete = false;\n\n private _wizard: WizardForm | null = null;\n private _boundHandleStepChange = this._handleStepChange.bind(this);\n private _boundHandleSuccess = this._handleSuccess.bind(this);\n\n private _boundHandleStepsDiscovered = this._handleStepsDiscovered.bind(this);\n\n connectedCallback(): void {\n super.connectedCallback();\n\n // Listen for steps-discovered event IMMEDIATELY on document (bubbles up)\n // This catches the event even if wizard-form fires it before we connect to it\n document.addEventListener('wf:steps-discovered', this._boundHandleStepsDiscovered as EventListener);\n\n // Defer wizard connection to allow DOM to settle\n requestAnimationFrame(() => {\n this._connectToWizard();\n });\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n document.removeEventListener('wf:steps-discovered', this._boundHandleStepsDiscovered as EventListener);\n this._disconnectFromWizard();\n }\n\n private _connectToWizard(): void {\n // Find wizard by ID or by closest parent\n if (this.for) {\n this._wizard = document.getElementById(this.for) as WizardForm | null;\n } else {\n this._wizard = this.closest('wizard-form') as WizardForm | null;\n }\n\n if (this._wizard) {\n // Get initial state\n this._currentStep = this._wizard.currentStep || 1;\n this._totalSteps = this._wizard.totalSteps || 1;\n this._isComplete = this._wizard.isSubmitted || false;\n\n // Listen for step changes\n this._wizard.addEventListener('wf:step-change', this._boundHandleStepChange as EventListener);\n\n // Listen for success (form complete)\n this._wizard.addEventListener('wf:success', this._boundHandleSuccess as EventListener);\n\n // Note: wf:steps-discovered is listened on document in connectedCallback\n }\n }\n\n private _disconnectFromWizard(): void {\n if (this._wizard) {\n this._wizard.removeEventListener('wf:step-change', this._boundHandleStepChange as EventListener);\n this._wizard.removeEventListener('wf:success', this._boundHandleSuccess as EventListener);\n this._wizard = null;\n }\n }\n\n private _handleStepChange(e: CustomEvent<StepChangeDetail>): void {\n this._currentStep = e.detail.to;\n // Re-read total steps in case it changed\n if (this._wizard) {\n this._totalSteps = this._wizard.totalSteps;\n }\n }\n\n private _handleStepsDiscovered(e: CustomEvent): void {\n const { wizard, wizardId, totalSteps, currentStep } = e.detail;\n\n // Check if this event is from our target wizard\n if (this.for) {\n // We have a specific target - check if event is from that wizard\n if (wizardId !== this.for) {\n return;\n }\n } else {\n // No specific target - check if event is from a parent wizard\n const parentWizard = this.closest('wizard-form');\n if (!parentWizard || parentWizard !== wizard) {\n return;\n }\n }\n\n // Connect to wizard if not already connected\n if (!this._wizard && wizard) {\n this._wizard = wizard;\n wizard.addEventListener('wf:step-change', this._boundHandleStepChange as EventListener);\n wizard.addEventListener('wf:success', this._boundHandleSuccess as EventListener);\n }\n\n // Update state from event detail\n this._totalSteps = totalSteps;\n this._currentStep = currentStep;\n }\n\n private _handleSuccess(): void {\n this._isComplete = true;\n }\n\n render() {\n // Hide progress when form is complete\n if (this._isComplete) {\n return null;\n }\n\n const segments = [];\n for (let i = 1; i <= this._totalSteps; i++) {\n const completed = i < this._currentStep;\n const active = i === this._currentStep;\n segments.push(html`\n <div\n class=\"wf-progress-segment ${completed ? 'completed' : ''} ${active ? 'active' : ''}\"\n data-testid=\"wf-progress-segment\"\n data-step=\"${i}\"\n data-completed=\"${completed}\"\n data-active=\"${active}\"\n role=\"progressbar\"\n aria-valuenow=\"${this._currentStep}\"\n aria-valuemin=\"1\"\n aria-valuemax=\"${this._totalSteps}\"\n ></div>\n `);\n }\n return html`<div class=\"wf-progress\" data-testid=\"wf-progress-bar\" role=\"group\" aria-label=\"Form progress\">${segments}</div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-progress': WfProgress;\n }\n}\n","/**\n * NavigationButtonBase - Shared base class for wf-back-btn and wf-next-btn\n *\n * Provides common functionality:\n * - Nav state event handling\n * - Wizard form discovery\n * - State request lifecycle\n */\n\nimport { LitElement } from 'lit';\nimport { state } from 'lit/decorators.js';\n\nexport interface NavStateDetail {\n currentStep: number;\n totalSteps: number;\n isFirstStep: boolean;\n isLastStep: boolean;\n isSubmitting: boolean;\n}\n\nexport abstract class NavigationButtonBase extends LitElement {\n // ============================================\n // Shared State\n // ============================================\n\n @state()\n protected _isFirstStep = true;\n\n @state()\n protected _isLastStep = false;\n\n @state()\n protected _isSubmitting = false;\n\n // ============================================\n // Lifecycle\n // ============================================\n\n override connectedCallback(): void {\n super.connectedCallback();\n this._findWizardForm()?.addEventListener('wf:nav-state', this._handleNavState as EventListener);\n this._requestNavState();\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this._findWizardForm()?.removeEventListener('wf:nav-state', this._handleNavState as EventListener);\n }\n\n // ============================================\n // Event Handlers\n // ============================================\n\n protected _handleNavState = (e: CustomEvent<NavStateDetail>): void => {\n this._isFirstStep = e.detail.isFirstStep;\n this._isLastStep = e.detail.isLastStep;\n this._isSubmitting = e.detail.isSubmitting;\n };\n\n // ============================================\n // Helpers\n // ============================================\n\n protected _findWizardForm(): HTMLElement | null {\n return this.closest('wizard-form');\n }\n\n protected _requestNavState(): void {\n this.dispatchEvent(\n new CustomEvent('wf:nav-state-request', {\n bubbles: true,\n composed: true,\n })\n );\n }\n\n /**\n * Get the event name to dispatch on click\n */\n protected abstract _getEventName(): string;\n\n /**\n * Dispatch the navigation event\n */\n protected _dispatchNavEvent(): void {\n this.dispatchEvent(\n new CustomEvent(this._getEventName(), {\n bubbles: true,\n composed: true,\n })\n );\n }\n}\n","/**\n * Styles for wf-next-btn component (Shadow DOM)\n */\n\nimport { css } from 'lit';\n\nimport { sharedAnimations, buttonBaseStyles } from '../styles/shared.styles.js';\n\nexport const wfNextBtnStyles = [\n sharedAnimations,\n buttonBaseStyles,\n css`\n :host {\n display: block;\n width: 100%;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .wf-btn-next {\n width: 100%;\n flex: 1;\n background-color: var(--wf-color-primary);\n border: 1px solid var(--wf-color-primary-border);\n color: white;\n position: relative;\n }\n\n .wf-btn-next:hover:not(:disabled) {\n filter: brightness(1.1);\n }\n\n .wf-btn-shortcut {\n display: inline-flex;\n align-items: center;\n gap: var(--wf-spacing-05);\n }\n\n .wf-loading {\n display: inline-block;\n width: var(--wf-spinner-size);\n height: var(--wf-spinner-size);\n border: 2px solid rgba(0, 0, 0, 0.1);\n border-radius: 50%;\n border-top-color: white;\n animation: wf-spin 0.8s linear infinite;\n }\n\n /* Inline button styles (for use inside wf-other) */\n :host([inline]) {\n display: inline-block;\n width: auto;\n }\n\n :host([inline]) .wf-btn {\n min-height: 16px;\n width: auto;\n padding-top: 8px;\n padding-bottom: 8px;\n padding-left: 12px;\n padding-right: 8px;\n }\n `,\n];\n","/**\n * WF-Next-Btn - Composable Continue/Submit button for wizard forms\n *\n * Auto-detects the last step and becomes \"Submit\" button.\n * Dispatches 'wf:nav-next' event that bubbles to wizard-form.\n *\n * @example\n * <wf-step data-step=\"1\">\n * <wf-input name=\"fullName\" required></wf-input>\n * <wf-next-btn></wf-next-btn>\n * </wf-step>\n *\n * @example\n * <wf-other label=\"Others, please specify:\">\n * <wf-next-btn inline label=\"Next →\"></wf-next-btn>\n * </wf-other>\n */\n\nimport { html, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { NavigationButtonBase } from './base/navigation-button-base.js';\nimport { wfNextBtnStyles } from './wf-next-btn.styles.js';\nimport './wf-badge.js';\n\n// Re-export NavStateDetail for backward compatibility\nexport type { NavStateDetail } from './base/navigation-button-base.js';\n\n@customElement('wf-next-btn')\nexport class WfNextBtn extends NavigationButtonBase {\n static styles = wfNextBtnStyles;\n\n // ============================================\n // Properties\n // ============================================\n\n /**\n * Custom label (overrides auto \"Continue\"/\"Submit\")\n */\n @property({ type: String })\n label?: string;\n\n /**\n * Force action type (auto-detected by default)\n */\n @property({ type: String })\n action?: 'next' | 'submit';\n\n /**\n * Show \"Enter ↵\" badge (default: true)\n */\n @property({ type: Boolean, attribute: 'show-shortcut' })\n showShortcut = true;\n\n /**\n * Inline styling for placement next to inputs\n */\n @property({ type: Boolean })\n inline = false;\n\n /**\n * Disabled state\n */\n @property({ type: Boolean })\n disabled = false;\n\n // ============================================\n // Abstract Implementation\n // ============================================\n\n protected _getEventName(): string {\n return 'wf:nav-next';\n }\n\n // ============================================\n // Event Handlers\n // ============================================\n\n private _handleClick = (): void => {\n if (this.disabled || this._isSubmitting) {\n return;\n }\n this._dispatchNavEvent();\n };\n\n // ============================================\n // Helpers\n // ============================================\n\n private _getButtonLabel(): string {\n if (this.label) {\n return this.label;\n }\n // Inline buttons (in wf-other) always show \"Continue\", not \"Submit\"\n const isSubmit = !this.inline && (this.action === 'submit' || (this.action !== 'next' && this._isLastStep));\n return isSubmit ? 'Submit' : 'Continue';\n }\n\n private _isSubmitAction(): boolean {\n // Inline buttons (in wf-other) always act as \"next\", not \"submit\"\n return !this.inline && (this.action === 'submit' || (this.action !== 'next' && this._isLastStep));\n }\n\n // ============================================\n // Render\n // ============================================\n\n override render() {\n const buttonLabel = this._getButtonLabel();\n const isDisabled = this.disabled || this._isSubmitting;\n\n return html`\n <button\n type=\"button\"\n class=\"wf-btn wf-btn-next\"\n ?disabled=\"${isDisabled}\"\n @click=\"${this._handleClick}\"\n data-testid=\"wf-next-btn\"\n >\n ${this._isSubmitting\n ? html`<span class=\"wf-loading\"></span>`\n : html`\n ${buttonLabel}\n ${this.showShortcut\n ? html`\n <span class=\"wf-btn-shortcut ${this.inline ? 'wf-btn-shortcut-inline' : ''}\">\n <wf-badge variant=\"button\" shortcut=\"Enter ↵\"></wf-badge>\n </span>\n `\n : nothing}\n `}\n </button>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-next-btn': WfNextBtn;\n }\n}\n","/**\n * Styles for wf-back-btn component (Shadow DOM)\n */\n\nimport { css } from 'lit';\n\nimport { buttonBaseStyles } from '../styles/shared.styles.js';\n\nexport const wfBackBtnStyles = [\n buttonBaseStyles,\n css`\n :host {\n display: inline-block;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .wf-btn-back {\n background: var(--wf-glass-bg);\n backdrop-filter: blur(var(--wf-glass-blur));\n -webkit-backdrop-filter: blur(var(--wf-glass-blur));\n border: 1px solid var(--wf-glass-border);\n box-shadow: var(--wf-glass-shadow);\n color: var(--wf-color-text);\n }\n\n .wf-btn-back:hover:not(:disabled) {\n background: var(--wf-glass-bg-hover);\n }\n\n .wf-btn-shortcut {\n display: inline-flex;\n align-items: center;\n gap: var(--wf-spacing-05);\n }\n `,\n];\n","/**\n * WF-Back-Btn - Composable Back button for wizard forms\n *\n * Dispatches 'wf:nav-back' event that bubbles to wizard-form.\n * Hidden on the first step by default.\n *\n * @example\n * <wf-step data-step=\"2\">\n * <wf-layout direction=\"row\" justify=\"between\">\n * <wf-back-btn></wf-back-btn>\n * <wf-next-btn></wf-next-btn>\n * </wf-layout>\n * </wf-step>\n */\n\nimport { html, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { NavigationButtonBase } from './base/navigation-button-base.js';\nimport { wfBackBtnStyles } from './wf-back-btn.styles.js';\nimport './wf-badge.js';\n\n@customElement('wf-back-btn')\nexport class WfBackBtn extends NavigationButtonBase {\n static styles = wfBackBtnStyles;\n\n // ============================================\n // Properties\n // ============================================\n\n /**\n * Custom label (default: \"Back\")\n */\n @property({ type: String })\n label = 'Back';\n\n /**\n * Show \"Esc\" badge (default: true)\n */\n @property({ type: Boolean, attribute: 'show-shortcut' })\n showShortcut = true;\n\n /**\n * Disabled state\n */\n @property({ type: Boolean })\n disabled = false;\n\n /**\n * Hide on first step (default: true)\n */\n @property({ type: Boolean, attribute: 'hide-on-first' })\n hideOnFirst = true;\n\n // ============================================\n // Abstract Implementation\n // ============================================\n\n protected _getEventName(): string {\n return 'wf:nav-back';\n }\n\n // ============================================\n // Event Handlers\n // ============================================\n\n private _handleClick = (): void => {\n if (this.disabled) {return;}\n this._dispatchNavEvent();\n };\n\n // ============================================\n // Render\n // ============================================\n\n override render() {\n if (this.hideOnFirst && this._isFirstStep) {\n return nothing;\n }\n\n return html`\n <button\n type=\"button\"\n class=\"wf-btn wf-btn-back\"\n ?disabled=\"${this.disabled}\"\n @click=\"${this._handleClick}\"\n data-testid=\"wf-back-btn\"\n >\n ${this.showShortcut\n ? html`\n <span class=\"wf-btn-shortcut\">\n <wf-badge variant=\"button-secondary\">Esc</wf-badge>\n </span>\n `\n : nothing}\n ${this.label}\n </button>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-back-btn': WfBackBtn;\n }\n}\n"],"names":["t","e","s","o","r","n","i","S","c","h","a","l","p","d","u","f","b","y","x","v","css","LitElement","html","__decorateClass","property","customElement","nothing","state","query"],"mappings":"AA4BO,SAAS,mBAAuC;AACrD,MAAI,OAAO,aAAa,aAAa;AAAC,WAAO;AAAA,EAAU;AAEvD,QAAM,QAAQ,SAAS,OAAO,MAAM,oBAAoB;AACxD,SAAO,QAAQ,MAAM,CAAC,IAAI;AAC5B;AAKO,SAAS,qBAAqB,QAA0C;AAC7E,QAAM,EAAE,UAAU,QAAQ,eAAe,CAAA,GAAI,OAAO,UAAU;AAE9D,SAAO;AAAA,IACL,MAAM;AAAA,IAEN,UAAU,MAA0B;AAClC,YAAM,SAAmB,CAAA;AACzB,iBAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,IAAI,GAAG;AAC/C,cAAM,YAAY,aAAa,GAAG,KAAK;AACvC,eAAO,SAAS,IAAI;AAAA,MACtB;AACA,aAAO;AAAA,IACT;AAAA,IAEA,MAAM,OAAO,MAAgB,SAAuD;AAElF,UAAI,MAAM;AACR,cAAM,IAAI,QAAQ,CAAC,YAAY,WAAW,SAAS,GAAG,CAAC;AACvD,eAAO,EAAE,SAAS,MAAM,MAAM,EAAE,MAAM,MAAM,UAAU,OAAK;AAAA,MAC7D;AAEA,YAAM,WAAW,6DAA6D,QAAQ,IAAI,MAAM;AAGhG,YAAM,aAAa,KAAK,UAAU,IAAI;AACtC,YAAM,SAAyB,OAAO,QAAQ,UAAU,EAAE,IAAI,CAAC,CAAC,MAAM,KAAK,OAAO;AAAA,QAChF;AAAA,QACA,OAAO,MAAM,QAAQ,KAAK,IAAI,MAAM,KAAK,GAAG,IAAI,OAAO,SAAS,EAAE;AAAA,MAAA,EAClE;AAEF,YAAM,UAAoC;AAAA,QACxC;AAAA,QACA,SAAS;AAAA,UACP,SAA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AAAA;AAAA;AAAA,EAGlB;AACF;AA5Ea,UACJ,SAAS;AAUhB,gBAAA;AAAA,EADCF,GAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAVf,UAWX,WAAA,SAAA,CAAA;AAMA,gBAAA;AAAA,EADCA,GAAS,EAAE,MAAM,SAAS,WAAW,iBAAiB;AAAA,GAhB5C,UAiBX,WAAA,gBAAA,CAAA;AAMA,gBAAA;AAAA,EADCA,GAAS,EAAE,MAAM,QAAA,CAAS;AAAA,GAtBhB,UAuBX,WAAA,YAAA,CAAA;AAMA,gBAAA;AAAA,EADCA,GAAS,EAAE,MAAM,SAAS,WAAW,iBAAiB;AAAA,GA5B5C,UA6BX,WAAA,eAAA,CAAA;AA7BW,YAAN,gBAAA;AAAA,EADNC,EAAc,aAAa;AAAA,GACf,SAAA;","x_google_ignoreList":[3,4,5,6,7,8,9,10,11]}
|
|
1
|
+
{"version":3,"file":"wizard-form.esm.js","sources":["../src/adapters/hubspot.ts","../src/adapters/webhook.ts","../src/adapters/revenuehero.ts","../node_modules/@lit/reactive-element/css-tag.js","../node_modules/@lit/reactive-element/reactive-element.js","../node_modules/lit-html/lit-html.js","../node_modules/lit-element/lit-element.js","../node_modules/@lit/reactive-element/decorators/custom-element.js","../node_modules/@lit/reactive-element/decorators/property.js","../node_modules/@lit/reactive-element/decorators/state.js","../node_modules/@lit/reactive-element/decorators/base.js","../node_modules/@lit/reactive-element/decorators/query.js","../src/styles/shared.styles.ts","../src/components/wizard-form.styles.ts","../src/controllers/FormStateController.ts","../src/controllers/KeyboardController.ts","../src/components/wf-badge.styles.ts","../src/components/wf-badge.ts","../src/components/wizard-form.ts","../src/components/wf-step.styles.ts","../src/components/wf-step.ts","../src/components/wf-layout.styles.ts","../src/components/wf-layout.ts","../src/components/wf-options.styles.ts","../src/components/wf-other.styles.ts","../src/components/wf-other.ts","../src/components/wf-options.ts","../src/components/wf-option.styles.ts","../src/components/wf-option.ts","../src/components/base/form-input-base.styles.ts","../src/components/base/form-input-base.ts","../src/controllers/ValidationController.ts","../src/components/wf-email.ts","../src/components/wf-input.ts","../src/components/wf-number.ts","../src/components/wf-textarea.ts","../src/init.ts","../src/components/wf-progress.styles.ts","../src/components/wf-progress.ts","../src/components/base/navigation-button-base.ts","../src/components/wf-next-btn.styles.ts","../src/components/wf-next-btn.ts","../src/components/wf-back-btn.styles.ts","../src/components/wf-back-btn.ts"],"sourcesContent":["/**\n * HubSpot Adapter - Submit form data to HubSpot Forms API\n *\n * This adapter formats the payload for HubSpot's Forms API v3.\n * The consumer website loads the HubSpot tracking script separately.\n *\n * @example\n * const adapter = createHubSpotAdapter({\n * portalId: '12345678',\n * formId: 'abc-123-def',\n * fieldMapping: { fullName: 'firstname' }\n * });\n * await adapter.submit(formData, context);\n */\n\nimport type {\n FormData,\n SubmissionContext,\n SubmissionResult,\n SubmissionAdapter,\n HubSpotConfig,\n HubSpotSubmissionPayload,\n HubSpotField,\n} from './types.js';\n\n/**\n * Get HubSpot tracking cookie (hutk)\n */\nexport function getHubSpotCookie(): string | undefined {\n if (typeof document === 'undefined') {return undefined;}\n\n const match = document.cookie.match(/hubspotutk=([^;]+)/);\n return match ? match[1] : undefined;\n}\n\n/**\n * Create a HubSpot submission adapter\n */\nexport function createHubSpotAdapter(config: HubSpotConfig): SubmissionAdapter {\n const { portalId, formId, fieldMapping = {}, mock = false } = config;\n\n return {\n name: 'hubspot',\n\n mapFields(data: FormData): FormData {\n const mapped: FormData = {};\n for (const [key, value] of Object.entries(data)) {\n const mappedKey = fieldMapping[key] || key;\n mapped[mappedKey] = value;\n }\n return mapped;\n },\n\n async submit(data: FormData, context: SubmissionContext): Promise<SubmissionResult> {\n // Mock mode for testing\n if (mock) {\n await new Promise((resolve) => setTimeout(resolve, 500));\n return { success: true, data: { mock: true, formData: data } };\n }\n\n const endpoint = `https://api.hsforms.com/submissions/v3/integration/submit/${portalId}/${formId}`;\n\n // Map fields to HubSpot format\n const mappedData = this.mapFields(data);\n const fields: HubSpotField[] = Object.entries(mappedData).map(([name, value]) => ({\n name,\n value: Array.isArray(value) ? value.join(';') : String(value ?? ''),\n }));\n\n const payload: HubSpotSubmissionPayload = {\n fields,\n context: {\n pageUri: context.pageUrl,\n pageName: context.pageTitle,\n hutk: getHubSpotCookie(),\n },\n };\n\n try {\n const response = await fetch(endpoint, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(payload),\n });\n\n if (!response.ok) {\n const errorData = await response.json().catch(() => ({}));\n const errorMessage =\n errorData.message || `HubSpot submission failed: ${response.status}`;\n return { success: false, error: errorMessage };\n }\n\n const responseData = await response.json();\n return { success: true, data: responseData };\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Network error';\n return { success: false, error: errorMessage };\n }\n },\n };\n}\n\nexport type { HubSpotConfig };\n","/**\n * Webhook Adapter - Submit form data to any webhook endpoint\n *\n * A generic adapter for sending form data to any HTTP endpoint.\n *\n * @example\n * const adapter = createWebhookAdapter({\n * url: 'https://api.example.com/forms',\n * headers: { 'Authorization': 'Bearer token' }\n * });\n * await adapter.submit(formData, context);\n */\n\nimport type {\n FormData,\n SubmissionContext,\n SubmissionResult,\n SubmissionAdapter,\n WebhookConfig,\n} from './types.js';\n\n/**\n * Create a webhook submission adapter\n */\nexport function createWebhookAdapter(config: WebhookConfig): SubmissionAdapter {\n const { url, method = 'POST', headers = {}, fieldMapping = {}, mock = false } = config;\n\n return {\n name: 'webhook',\n\n mapFields(data: FormData): FormData {\n const mapped: FormData = {};\n for (const [key, value] of Object.entries(data)) {\n const mappedKey = fieldMapping[key] || key;\n mapped[mappedKey] = value;\n }\n return mapped;\n },\n\n async submit(data: FormData, context: SubmissionContext): Promise<SubmissionResult> {\n // Mock mode for testing\n if (mock) {\n await new Promise((resolve) => setTimeout(resolve, 500));\n return { success: true, data: { mock: true, formData: data } };\n }\n\n if (!url) {\n return { success: false, error: 'Webhook URL is required' };\n }\n\n const mappedData = this.mapFields(data);\n\n const payload = {\n formData: mappedData,\n context: {\n pageUrl: context.pageUrl,\n pageTitle: context.pageTitle,\n referrer: context.referrer,\n submittedAt: context.timestamp,\n },\n };\n\n try {\n const response = await fetch(url, {\n method,\n headers: {\n 'Content-Type': 'application/json',\n ...headers,\n },\n body: JSON.stringify(payload),\n });\n\n if (!response.ok) {\n const errorText = await response.text().catch(() => '');\n return {\n success: false,\n error: `Webhook failed: ${response.status} ${errorText}`.trim(),\n };\n }\n\n // Try to parse JSON response, fall back to success with no data\n let responseData: unknown;\n try {\n responseData = await response.json();\n } catch {\n responseData = { status: response.status };\n }\n\n return { success: true, data: responseData };\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Network error';\n return { success: false, error: errorMessage };\n }\n },\n };\n}\n\nexport type { WebhookConfig };\n","/**\n * RevenueHero Adapter - Trigger RevenueHero calendar scheduling\n *\n * This adapter triggers the RevenueHero scheduler after form submission.\n * The consumer website loads the RevenueHero SDK separately.\n *\n * @example\n * const adapter = createRevenueHeroAdapter({\n * routerId: 'your-router-id'\n * });\n * await adapter.submit(formData, context);\n */\n\nimport type {\n FormData,\n SubmissionContext,\n SubmissionResult,\n SubmissionAdapter,\n RevenueHeroConfig,\n} from './types.js';\n\n/**\n * Check if RevenueHero SDK is loaded\n */\nexport function isRevenueHeroLoaded(): boolean {\n return typeof window !== 'undefined' && typeof window.RevenueHero !== 'undefined';\n}\n\n/**\n * Create a RevenueHero submission adapter\n *\n * Note: This adapter triggers the RevenueHero scheduler but doesn't\n * submit data to a backend. Use it in combination with another adapter\n * (like HubSpot or webhook) for data persistence.\n */\nexport function createRevenueHeroAdapter(config: RevenueHeroConfig): SubmissionAdapter {\n const { routerId, fieldMapping = {}, mock = false } = config;\n\n return {\n name: 'revenuehero',\n\n mapFields(data: FormData): FormData {\n const mapped: FormData = {};\n for (const [key, value] of Object.entries(data)) {\n const mappedKey = fieldMapping[key] || key;\n mapped[mappedKey] = value;\n }\n return mapped;\n },\n\n async submit(data: FormData, _context: SubmissionContext): Promise<SubmissionResult> {\n // Mock mode for testing\n if (mock) {\n await new Promise((resolve) => setTimeout(resolve, 500));\n return { success: true, data: { mock: true, scheduled: true } };\n }\n\n if (!routerId) {\n return { success: false, error: 'RevenueHero router ID is required' };\n }\n\n // Check if SDK is loaded\n if (!isRevenueHeroLoaded()) {\n console.warn(\n '[RevenueHeroAdapter] RevenueHero SDK not loaded. ' +\n 'Load the SDK in your page: <script src=\"https://app.revenuehero.io/js/widget.js\"></script>'\n );\n return {\n success: false,\n error: 'RevenueHero SDK not loaded. Please load the SDK in your page.',\n };\n }\n\n const mappedData = this.mapFields(data);\n\n // Extract email (required for RevenueHero)\n const email = String(mappedData.email || mappedData.workEmail || '');\n if (!email) {\n return { success: false, error: 'Email is required for RevenueHero scheduling' };\n }\n\n try {\n // Trigger RevenueHero scheduler\n window.RevenueHero!.schedule({\n routerId,\n email,\n ...mappedData,\n });\n\n return {\n success: true,\n data: { scheduled: true, email },\n };\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'RevenueHero error';\n return { success: false, error: errorMessage };\n }\n },\n };\n}\n\nexport type { RevenueHeroConfig };\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1],t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,css,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null}}requestUpdate(t,s,i,e=!1,h){if(void 0!==t){const r=this.constructor;if(!1===e&&(h=this[t]),i??=r.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:\"open\"},y[d(\"elementProperties\")]=new Map,y[d(\"finalized\")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push(\"2.1.2\");export{y as ReactiveElement,s as adoptStyles,u as defaultConverter,t as getCompatibleStyle,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t=>t,s=t.trustedTypes,e=s?s.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,h=\"$lit$\",o=`lit$${Math.random().toFixed(9).slice(2)}$`,n=\"?\"+o,r=`<${n}>`,l=document,c=()=>l.createComment(\"\"),a=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,u=Array.isArray,d=t=>u(t)||\"function\"==typeof t?.[Symbol.iterator],f=\"[ \\t\\n\\f\\r]\",v=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${f}(?:([^\\\\s\"'>=/]+)(${f}*=${f}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),g=/'/g,$=/\"/g,y=/^(?:script|style|textarea|title)$/i,x=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),b=x(1),w=x(2),T=x(3),E=Symbol.for(\"lit-noChange\"),A=Symbol.for(\"lit-nothing\"),C=new WeakMap,P=l.createTreeWalker(l,129);function V(t,i){if(!u(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==e?e.createHTML(i):i}const N=(t,i)=>{const s=t.length-1,e=[];let n,l=2===i?\"<svg>\":3===i?\"<math>\":\"\",c=v;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,f=0;for(;f<s.length&&(c.lastIndex=f,u=c.exec(s),null!==u);)f=c.lastIndex,c===v?\"!--\"===u[1]?c=_:void 0!==u[1]?c=m:void 0!==u[2]?(y.test(u[2])&&(n=RegExp(\"</\"+u[2],\"g\")),c=p):void 0!==u[3]&&(c=p):c===p?\">\"===u[0]?(c=n??v,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?p:'\"'===u[3]?$:g):c===$||c===g?c=p:c===_||c===m?c=v:(c=p,n=void 0);const x=c===p&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===v?s+r:d>=0?(e.push(a),s.slice(0,d)+h+s.slice(d)+o+x):s+o+(-2===d?i:x)}return[V(t,l+(t[s]||\"<?>\")+(2===i?\"</svg>\":3===i?\"</math>\":\"\")),e]};class S{constructor({strings:t,_$litType$:i},e){let r;this.parts=[];let l=0,a=0;const u=t.length-1,d=this.parts,[f,v]=N(t,i);if(this.el=S.createElement(f,e),P.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=P.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(h)){const i=v[a++],s=r.getAttribute(t).split(o),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:l,name:e[2],strings:s,ctor:\".\"===e[1]?I:\"?\"===e[1]?L:\"@\"===e[1]?z:H}),r.removeAttribute(t)}else t.startsWith(o)&&(d.push({type:6,index:l}),r.removeAttribute(t));if(y.test(r.tagName)){const t=r.textContent.split(o),i=t.length-1;if(i>0){r.textContent=s?s.emptyScript:\"\";for(let s=0;s<i;s++)r.append(t[s],c()),P.nextNode(),d.push({type:2,index:++l});r.append(t[i],c())}}}else if(8===r.nodeType)if(r.data===n)d.push({type:2,index:l});else{let t=-1;for(;-1!==(t=r.data.indexOf(o,t+1));)d.push({type:7,index:l}),t+=o.length-1}l++}}static createElement(t,i){const s=l.createElement(\"template\");return s.innerHTML=t,s}}function M(t,i,s=t,e){if(i===E)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=a(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=M(t,h._$AS(t,i.values),h,e)),i}class R{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??l).importNode(i,!0);P.currentNode=e;let h=P.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let i;2===r.type?i=new k(h,h.nextSibling,this,t):1===r.type?i=new r.ctor(h,r.name,r.strings,this,t):6===r.type&&(i=new Z(h,this,t)),this._$AV.push(i),r=s[++n]}o!==r?.index&&(h=P.nextNode(),o++)}return P.currentNode=l,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class k{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=M(this,t,i),a(t)?t===A||null==t||\"\"===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==E&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):d(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==A&&a(this._$AH)?this._$AA.nextSibling.data=t:this.T(l.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:s}=t,e=\"number\"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=S.createElement(V(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new R(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t}}_$AC(t){let i=C.get(t.strings);return void 0===i&&C.set(t.strings,i=new S(t)),i}k(t){u(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new k(this.O(c()),this.O(c()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t!==this._$AB;){const s=i(t).nextSibling;i(t).remove(),t=s}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=M(this,t,i,0),o=!a(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M(this,e[s+n],i,n),r===E&&(r=this._$AH[n]),o||=!a(r)||r!==this._$AH[n],r===A?t=A:t!==A&&(t+=(r??\"\")+h[n+1]),this._$AH[n]=r}o&&!e&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??\"\")}}class I extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}}class L extends H{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A)}}class z extends H{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=M(this,t,i,0)??A)===E)return;const s=this._$AH,e=t===A&&s!==A||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==A&&(s===A||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){\"function\"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const j={M:h,P:o,A:n,C:1,L:N,R,D:d,V:M,I:k,H,N:L,U:z,B:I,F:Z},B=t.litHtmlPolyfillSupport;B?.(S,k),(t.litHtmlVersions??=[]).push(\"3.3.2\");const D=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new k(i.insertBefore(c(),t),t,void 0,s??{})}return h._$AI(t),h};export{j as _$LH,b as html,T as mathml,E as noChange,A as nothing,D as render,w as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as r}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s=globalThis;class i extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return r}}i._$litElement$=!0,i[\"finalized\"]=!0,s.litElementHydrateSupport?.({LitElement:i});const o=s.litElementPolyfillSupport;o?.({LitElement:i});const n={_$AK:(t,e,r)=>{t._$AK(e,r)},_$AL:t=>t._$AL};(s.litElementVersions??=[]).push(\"4.2.2\");export{i as LitElement,n as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=t=>(e,o)=>{void 0!==o?o.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)};export{t as customElement};\n//# sourceMappingURL=custom-element.js.map\n","import{notEqual as t,defaultConverter as e}from\"../reactive-element.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o={attribute:!0,type:String,converter:e,reflect:!1,hasChanged:t},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),\"setter\"===n&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),\"accessor\"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t,!0,r)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if(\"setter\"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t,!0,r)}}throw Error(\"Unsupported decorator location: \"+n)};function n(t){return(e,o)=>\"object\"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};\n//# sourceMappingURL=property.js.map\n","import{property as t}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function r(r){return t({...r,state:!0,attribute:!1})}export{r as state};\n//# sourceMappingURL=state.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst e=(e,t,c)=>(c.configurable=!0,c.enumerable=!0,Reflect.decorate&&\"object\"!=typeof t&&Object.defineProperty(e,t,c),c);export{e as desc};\n//# sourceMappingURL=base.js.map\n","import{desc as t}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function e(e,r){return(n,s,i)=>{const o=t=>t.renderRoot?.querySelector(e)??null;if(r){const{get:e,set:r}=\"object\"==typeof s?n:i??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return t(n,s,{get(){let t=e.call(this);return void 0===t&&(t=o(this),(null!==t||this.hasUpdated)&&r.call(this,t)),t}})}return t(n,s,{get(){return o(this)}})}}export{e as query};\n//# sourceMappingURL=query.js.map\n","/**\n * Shared styles for Shadow DOM components\n *\n * Contains:\n * - CSS custom properties (design tokens)\n * - Shared animations (@keyframes)\n * - Common utility styles\n *\n * Import and spread into component's static styles array:\n * static styles = [sharedStyles, css`...`];\n */\n\nimport { css } from 'lit';\n\n/**\n * Design tokens - CSS custom properties\n * These are defined on :host of wizard-form and pierce Shadow DOM boundaries\n */\nexport const designTokens = css`\n /* Colors */\n --wf-color-primary: #8040f0;\n --wf-color-primary-border: #602cbb;\n --wf-color-primary-light: rgba(128, 64, 240, 0.08);\n --wf-color-surface: #f3f3f5;\n --wf-color-surface-hover: #e9e9eb;\n --wf-color-border: #d4d4d4;\n --wf-color-text: #0a0a0a;\n --wf-color-text-secondary: #404040;\n --wf-color-text-muted: #646464;\n --wf-color-error: #dc3545;\n --wf-color-error-light: rgba(220, 53, 69, 0.1);\n --wf-color-badge-bg: #fcfcfc;\n --wf-color-badge-border: #d4d4d4;\n --wf-color-badge-text: #5f5f5f;\n --wf-color-progress-active: rgba(136, 66, 240, 0.6);\n --wf-color-progress-inactive: rgba(255, 255, 255, 0.6);\n\n /* Focus ring */\n --wf-focus-ring-width: 3px;\n --wf-focus-ring-primary: rgba(128, 64, 240, 0.2);\n --wf-focus-ring-error: rgba(220, 53, 69, 0.2);\n\n /* Spacing scale */\n --wf-spacing-05: 2px;\n --wf-spacing-1: 4px;\n --wf-spacing-2: 8px;\n --wf-spacing-3: 12px;\n --wf-spacing-4: 16px;\n --wf-spacing-5: 20px;\n --wf-spacing-6: 24px;\n --wf-spacing-8: 32px;\n\n /* Border radius */\n --wf-radius-sm: 4px;\n --wf-radius-md: 8px;\n --wf-radius-lg: 8px;\n --wf-radius-full: 99px;\n\n /* Typography */\n --wf-font-size-xs: 0.75rem;\n --wf-font-size-sm: 0.875rem;\n --wf-font-size-base: 1rem;\n --wf-font-size-lg: 1.25rem;\n --wf-font-size-xl: 1.5rem;\n --wf-font-size-2xl: 2rem;\n --wf-font-size-3xl: 2.5rem;\n --wf-font-family-mono: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;\n --wf-font-weight-input: 400;\n --wf-font-weight-label: 500;\n --wf-font-weight-heading: 600;\n --wf-font-weight-button: 400;\n\n /* Input dimensions */\n --wf-input-min-height: 56px;\n --wf-textarea-min-height: 100px;\n\n /* Component dimensions */\n --wf-btn-min-height: 48px;\n --wf-badge-size: 24px;\n --wf-spinner-size: 20px;\n --wf-progress-height: 4px;\n\n /* Frosted glass effect (iOS-style) */\n --wf-glass-bg: rgba(255, 255, 255, 0.7);\n --wf-glass-bg-hover: rgba(255, 255, 255, 0.85);\n --wf-glass-border: rgba(0, 0, 0, 0.1);\n --wf-glass-blur: 20px;\n --wf-glass-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);\n`;\n\n/**\n * Design tokens wrapped in :host for standalone components\n * Use this in components that may be rendered outside wizard-form\n */\nexport const hostTokens = css`\n :host {\n ${designTokens}\n }\n`;\n\n/**\n * Dark theme token overrides\n */\nexport const darkThemeTokens = css`\n --wf-color-surface: #2d2d2d;\n --wf-color-surface-hover: #3d3d3d;\n --wf-color-border: #4d4d4d;\n --wf-color-text: #f8f9fa;\n --wf-color-text-secondary: #d0d0d0;\n --wf-color-text-muted: #adb5bd;\n --wf-color-badge-bg: #3d3d3d;\n --wf-color-badge-border: #4d4d4d;\n --wf-color-badge-text: #adb5bd;\n --wf-color-progress-active: rgba(200, 200, 200, 0.6);\n --wf-color-progress-inactive: rgba(100, 100, 100, 0.6);\n\n /* Dark theme frosted glass */\n --wf-glass-bg: rgba(45, 45, 45, 0.7);\n --wf-glass-bg-hover: rgba(60, 60, 60, 0.8);\n --wf-glass-border: rgba(255, 255, 255, 0.1);\n`;\n\n/**\n * Shared animations used across components\n */\nexport const sharedAnimations = css`\n @keyframes wf-spin {\n to {\n transform: rotate(360deg);\n }\n }\n\n @keyframes wf-blink {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.5;\n }\n }\n\n @keyframes wf-stepFadeIn {\n from {\n opacity: 0;\n transform: translateY(10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n\n @keyframes wf-stepFadeOut {\n from {\n opacity: 1;\n transform: translateY(0);\n }\n to {\n opacity: 0;\n transform: translateY(-10px);\n }\n }\n\n @keyframes wf-stepSlideInRight {\n from {\n opacity: 0;\n transform: translateX(30px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n }\n\n @keyframes wf-stepSlideInLeft {\n from {\n opacity: 0;\n transform: translateX(-30px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n }\n`;\n\n/**\n * Common button base styles\n */\nexport const buttonBaseStyles = css`\n .wf-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--wf-spacing-2);\n padding: var(--wf-spacing-3) var(--wf-spacing-4);\n min-height: var(--wf-btn-min-height);\n font-size: var(--wf-font-size-base);\n font-weight: var(--wf-font-weight-button);\n font-family: inherit;\n border-radius: var(--wf-radius-md);\n cursor: pointer;\n transition: all 150ms ease;\n border: 1px solid transparent;\n outline: none;\n box-sizing: border-box;\n }\n\n .wf-btn:focus-visible {\n box-shadow: 0 0 0 var(--wf-focus-ring-width) var(--wf-focus-ring-primary);\n }\n\n .wf-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n`;\n\n/**\n * Glass morphism styles (frosted glass effect)\n */\nexport const glassStyles = css`\n .wf-glass {\n background: var(--wf-glass-bg);\n backdrop-filter: blur(var(--wf-glass-blur));\n -webkit-backdrop-filter: blur(var(--wf-glass-blur));\n border: 1px solid var(--wf-glass-border);\n box-shadow: var(--wf-glass-shadow);\n }\n\n .wf-glass:hover {\n background: var(--wf-glass-bg-hover);\n }\n`;\n\n/* Note: Input base styles (.wf-field-container, .wf-label, .wf-input, .wf-error-message, etc.)\n are now in Shadow DOM - see src/components/base/form-input-base.styles.ts */\n\n/**\n * Default shared styles to include in all components\n * Contains animations and resets\n */\nexport const sharedStyles = css`\n ${sharedAnimations}\n\n * {\n box-sizing: border-box;\n }\n`;\n","/**\n * Wizard-Form styles for Shadow DOM\n *\n * Defines all CSS custom properties (design tokens) on :host\n * These properties pierce Shadow DOM and are available to all child components.\n */\n\nimport { css } from 'lit';\n\nimport { sharedAnimations } from '../styles/shared.styles.js';\n\nexport const wizardFormStyles = [\n sharedAnimations,\n css`\n /* ----------------------------------------\n :host - Design tokens & base styles\n ---------------------------------------- */\n :host {\n display: block;\n\n /* Color tokens */\n --wf-color-primary: #8040f0;\n --wf-color-primary-border: #602cbb;\n --wf-color-primary-light: rgba(128, 64, 240, 0.08);\n --wf-color-surface: #f3f3f5;\n --wf-color-surface-hover: #e9e9eb;\n --wf-color-border: #d4d4d4;\n --wf-color-text: #0a0a0a;\n --wf-color-text-secondary: #404040;\n --wf-color-text-muted: #646464;\n --wf-color-error: #dc3545;\n --wf-color-error-light: rgba(220, 53, 69, 0.1);\n --wf-color-badge-bg: #fcfcfc;\n --wf-color-badge-border: #d4d4d4;\n --wf-color-badge-text: #5f5f5f;\n --wf-color-progress-active: rgba(0, 0, 0, 0.1);\n --wf-color-progress-inactive: rgba(0, 0, 0, 0.05);\n\n /* Focus ring */\n --wf-focus-ring-width: 3px;\n --wf-focus-ring-primary: rgba(128, 64, 240, 0.2);\n --wf-focus-ring-error: rgba(220, 53, 69, 0.2);\n\n /* Spacing tokens */\n --wf-spacing-05: 2px;\n --wf-spacing-1: 4px;\n --wf-spacing-2: 8px;\n --wf-spacing-3: 12px;\n --wf-spacing-4: 16px;\n --wf-spacing-5: 20px;\n --wf-spacing-6: 24px;\n --wf-spacing-8: 32px;\n\n /* Border radius tokens */\n --wf-radius-sm: 4px;\n --wf-radius-md: 8px;\n --wf-radius-lg: 8px;\n --wf-radius-full: 99px;\n\n /* Typography tokens */\n --wf-font-size-xs: 0.75rem;\n --wf-font-size-sm: 0.875rem;\n --wf-font-size-base: 1rem;\n --wf-font-size-lg: 1.25rem;\n --wf-font-size-xl: 1.5rem;\n --wf-font-size-2xl: 2rem;\n --wf-font-size-3xl: 2.5rem;\n --wf-font-family-mono: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;\n --wf-font-weight-input: 400;\n --wf-font-weight-label: 500;\n --wf-font-weight-heading: 600;\n --wf-font-weight-button: 400;\n\n /* Input tokens */\n --wf-input-min-height: 56px;\n --wf-textarea-min-height: 100px;\n\n /* Component dimensions */\n --wf-btn-min-height: 48px;\n --wf-badge-size: 24px;\n --wf-spinner-size: 20px;\n --wf-progress-height: 4px;\n\n /* Frosted glass effect (iOS-style) */\n --wf-glass-bg: rgba(255, 255, 255, 0.7);\n --wf-glass-bg-hover: rgba(255, 255, 255, 0.85);\n --wf-glass-border: rgba(0, 0, 0, 0.1);\n --wf-glass-blur: 20px;\n --wf-glass-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);\n }\n\n :host([hidden]) {\n display: none;\n }\n\n /* Dark theme */\n :host([theme='dark']) {\n --wf-color-surface: #2d2d2d;\n --wf-color-surface-hover: #3d3d3d;\n --wf-color-border: #4d4d4d;\n --wf-color-text: #f8f9fa;\n --wf-color-text-secondary: #d0d0d0;\n --wf-color-text-muted: #adb5bd;\n --wf-color-badge-bg: #3d3d3d;\n --wf-color-badge-border: #4d4d4d;\n --wf-color-badge-text: #adb5bd;\n --wf-color-progress-active: rgba(200, 200, 200, 0.6);\n --wf-color-progress-inactive: rgba(100, 100, 100, 0.6);\n\n /* Dark theme frosted glass */\n --wf-glass-bg: rgba(45, 45, 45, 0.7);\n --wf-glass-bg-hover: rgba(60, 60, 60, 0.8);\n --wf-glass-border: rgba(255, 255, 255, 0.1);\n }\n\n /* Auto theme (respects system preference) */\n @media (prefers-color-scheme: dark) {\n :host([theme='auto']) {\n --wf-color-surface: #2d2d2d;\n --wf-color-surface-hover: #3d3d3d;\n --wf-color-border: #4d4d4d;\n --wf-color-text: #f8f9fa;\n --wf-color-text-secondary: #d0d0d0;\n --wf-color-text-muted: #adb5bd;\n --wf-color-badge-bg: #3d3d3d;\n --wf-color-badge-border: #4d4d4d;\n --wf-color-badge-text: #adb5bd;\n --wf-color-progress-active: rgba(200, 200, 200, 0.6);\n --wf-color-progress-inactive: rgba(100, 100, 100, 0.6);\n\n /* Dark theme frosted glass */\n --wf-glass-bg: rgba(45, 45, 45, 0.7);\n --wf-glass-bg-hover: rgba(60, 60, 60, 0.8);\n --wf-glass-border: rgba(255, 255, 255, 0.1);\n }\n }\n\n /* ----------------------------------------\n Container\n ---------------------------------------- */\n .wf-container {\n margin: 0 auto;\n }\n\n /* ----------------------------------------\n Success screen\n ---------------------------------------- */\n .wf-success-screen {\n text-align: center;\n padding: var(--wf-spacing-6);\n }\n\n /* ----------------------------------------\n Error message\n ---------------------------------------- */\n .wf-form-error {\n padding: var(--wf-spacing-4);\n margin-bottom: var(--wf-spacing-4);\n background-color: var(--wf-color-error-light);\n border: 1px solid var(--wf-color-error);\n border-radius: var(--wf-radius-md);\n color: var(--wf-color-error);\n font-size: var(--wf-font-size-base);\n }\n\n /* ----------------------------------------\n Slot styles\n ---------------------------------------- */\n ::slotted(wf-step) {\n display: none;\n width: 100%;\n }\n\n ::slotted(wf-step[active]) {\n display: block;\n animation: wf-stepFadeIn 0.3s ease forwards;\n }\n\n ::slotted(wf-step[direction='forward'][active]) {\n animation: wf-stepSlideInRight 0.3s ease forwards;\n }\n\n ::slotted(wf-step[direction='backward'][active]) {\n animation: wf-stepSlideInLeft 0.3s ease forwards;\n }\n\n ::slotted(wf-step[leaving]) {\n display: block;\n animation: wf-stepFadeOut 0.2s ease forwards;\n }\n\n /* Success slot hidden by default, shown when submitted */\n ::slotted([slot='success']) {\n display: none;\n }\n\n :host([submitted]) ::slotted([slot='success']) {\n display: block;\n }\n\n :host([submitted]) ::slotted(wf-step) {\n display: none !important;\n }\n`,\n];\n","/**\n * FormStateController - Centralized state management for wizard forms\n *\n * Uses Lit's ReactiveController pattern for automatic re-rendering\n * when state changes.\n */\n\nimport type { ReactiveController, ReactiveControllerHost } from 'lit';\n\nimport type { FormState, FieldValidation, ValidationResult, StepConfig } from '../types.js';\n\ntype StateSubscriber = (state: FormState) => void;\n\nexport class FormStateController implements ReactiveController {\n host: ReactiveControllerHost;\n\n // Internal state\n private _formData: Record<string, unknown> = {};\n private _validation: Record<string, FieldValidation> = {};\n private _currentStep = 1;\n private _totalSteps = 0;\n private _submitting = false;\n private _submitted = false;\n private _error?: string;\n private _stepConfigs: Map<number, StepConfig> = new Map();\n private _subscribers: Set<StateSubscriber> = new Set();\n\n constructor(host: ReactiveControllerHost) {\n this.host = host;\n host.addController(this);\n }\n\n // ============================================\n // Lifecycle\n // ============================================\n\n hostConnected(): void {\n // Controller connected to host\n }\n\n hostDisconnected(): void {\n // Clean up subscriptions\n this._subscribers.clear();\n }\n\n // ============================================\n // State Getters\n // ============================================\n\n get formData(): Record<string, unknown> {\n return { ...this._formData };\n }\n\n get validation(): Record<string, FieldValidation> {\n return { ...this._validation };\n }\n\n get currentStep(): number {\n return this._currentStep;\n }\n\n get totalSteps(): number {\n return this._totalSteps;\n }\n\n get submitting(): boolean {\n return this._submitting;\n }\n\n get submitted(): boolean {\n return this._submitted;\n }\n\n get error(): string | undefined {\n return this._error;\n }\n\n get state(): FormState {\n return {\n formData: this.formData,\n validation: this.validation,\n currentStep: this._currentStep,\n totalSteps: this._totalSteps,\n submitting: this._submitting,\n submitted: this._submitted,\n error: this._error,\n };\n }\n\n // ============================================\n // State Mutations\n // ============================================\n\n setValue(name: string, value: unknown): void {\n this._formData[name] = value;\n\n // Mark field as dirty\n if (this._validation[name]) {\n this._validation[name] = {\n ...this._validation[name],\n value,\n dirty: true,\n };\n } else {\n this._validation[name] = {\n name,\n value,\n result: { valid: true },\n touched: false,\n dirty: true,\n };\n }\n\n this._notifyChange();\n }\n\n getValue(name: string): unknown {\n return this._formData[name];\n }\n\n setValidation(name: string, result: ValidationResult): void {\n const existing = this._validation[name];\n this._validation[name] = {\n name,\n value: existing?.value ?? this._formData[name],\n result,\n touched: existing?.touched ?? false,\n dirty: existing?.dirty ?? false,\n };\n this._notifyChange();\n }\n\n markTouched(name: string): void {\n if (this._validation[name]) {\n this._validation[name] = {\n ...this._validation[name],\n touched: true,\n };\n } else {\n this._validation[name] = {\n name,\n value: this._formData[name],\n result: { valid: true },\n touched: true,\n dirty: false,\n };\n }\n this._notifyChange();\n }\n\n // ============================================\n // Step Management\n // ============================================\n\n setTotalSteps(total: number): void {\n this._totalSteps = total;\n this._notifyChange();\n }\n\n setStepConfig(step: number, config: StepConfig): void {\n this._stepConfigs.set(step, config);\n }\n\n getStepConfig(step: number): StepConfig | undefined {\n return this._stepConfigs.get(step);\n }\n\n getStepFields(step: number): string[] {\n return this._stepConfigs.get(step)?.fields ?? [];\n }\n\n goToStep(step: number): boolean {\n if (step < 1 || step > this._totalSteps) {\n return false;\n }\n\n // Check for skip conditions\n const config = this._stepConfigs.get(step);\n if (config?.skipIf?.(this._formData)) {\n // Skip this step, try next/previous\n if (step > this._currentStep) {\n return this.goToStep(step + 1);\n } else {\n return this.goToStep(step - 1);\n }\n }\n\n this._currentStep = step;\n this._notifyChange();\n return true;\n }\n\n nextStep(): boolean {\n return this.goToStep(this._currentStep + 1);\n }\n\n previousStep(): boolean {\n return this.goToStep(this._currentStep - 1);\n }\n\n isFirstStep(): boolean {\n return this._currentStep === 1;\n }\n\n isLastStep(): boolean {\n return this._currentStep === this._totalSteps;\n }\n\n // ============================================\n // Validation Helpers\n // ============================================\n\n isStepValid(step: number): boolean {\n const fields = this.getStepFields(step);\n return fields.every((name) => {\n const validation = this._validation[name];\n return !validation || validation.result.valid;\n });\n }\n\n isCurrentStepValid(): boolean {\n return this.isStepValid(this._currentStep);\n }\n\n getFieldError(name: string): string | undefined {\n const validation = this._validation[name];\n if (validation?.touched && !validation.result.valid) {\n return validation.result.error;\n }\n return undefined;\n }\n\n hasFieldError(name: string): boolean {\n return this.getFieldError(name) !== undefined;\n }\n\n // ============================================\n // Submission State\n // ============================================\n\n setSubmitting(submitting: boolean): void {\n this._submitting = submitting;\n this._notifyChange();\n }\n\n setSubmitted(submitted: boolean): void {\n this._submitted = submitted;\n this._notifyChange();\n }\n\n setError(error: string | undefined): void {\n this._error = error;\n this._notifyChange();\n }\n\n // ============================================\n // Reset\n // ============================================\n\n reset(): void {\n this._formData = {};\n this._validation = {};\n this._currentStep = 1;\n this._submitting = false;\n this._submitted = false;\n this._error = undefined;\n this._notifyChange();\n }\n\n // ============================================\n // Subscriptions\n // ============================================\n\n subscribe(callback: StateSubscriber): () => void {\n this._subscribers.add(callback);\n return () => {\n this._subscribers.delete(callback);\n };\n }\n\n private _notifyChange(): void {\n // Request host update\n this.host.requestUpdate();\n\n // Notify subscribers\n const state = this.state;\n this._subscribers.forEach((callback) => {\n try {\n callback(state);\n } catch (error) {\n console.error('[FormStateController] Subscriber error:', error);\n }\n });\n }\n}\n","/**\n * KeyboardController - Global keyboard shortcut management\n *\n * Handles Enter, Escape, and other keyboard navigation for wizard forms.\n */\n\nimport type { ReactiveController, ReactiveControllerHost } from 'lit';\n\nexport interface KeyboardConfig {\n onEnter?: () => void;\n onEscape?: () => void;\n onArrowUp?: () => void;\n onArrowDown?: () => void;\n onArrowLeft?: () => void;\n onArrowRight?: () => void;\n /** Whether to prevent Enter on textareas (default: true) */\n blockEnterOnTextarea?: boolean;\n}\n\nexport class KeyboardController implements ReactiveController {\n host: ReactiveControllerHost & HTMLElement;\n private _config: KeyboardConfig;\n private _enabled = true;\n private _boundHandler: (e: KeyboardEvent) => void;\n\n constructor(host: ReactiveControllerHost & HTMLElement, config: KeyboardConfig = {}) {\n this.host = host;\n this._config = {\n blockEnterOnTextarea: true,\n ...config,\n };\n this._boundHandler = this._handleKeydown.bind(this);\n host.addController(this);\n }\n\n hostConnected(): void {\n // Listen on the host element\n this.host.addEventListener('keydown', this._boundHandler);\n // Also listen on document for global shortcuts\n document.addEventListener('keydown', this._boundHandler);\n }\n\n hostDisconnected(): void {\n this.host.removeEventListener('keydown', this._boundHandler);\n document.removeEventListener('keydown', this._boundHandler);\n }\n\n private _handleKeydown(e: KeyboardEvent): void {\n if (!this._enabled) {return;}\n\n // Get active element, accounting for shadow DOM\n const activeElement = this._getActiveElement();\n const isTextarea = activeElement?.tagName === 'TEXTAREA';\n const isInput = activeElement?.tagName === 'INPUT';\n const isContentEditable = activeElement?.getAttribute('contenteditable') === 'true';\n const isTextInput = isTextarea || isInput || isContentEditable;\n\n switch (e.key) {\n case 'Enter':\n // Block Enter on textareas if configured\n if (isTextarea && this._config.blockEnterOnTextarea) {\n return;\n }\n // Allow Enter on inputs and other elements\n if (this._config.onEnter) {\n e.preventDefault();\n this._config.onEnter();\n }\n break;\n\n case 'Escape':\n if (this._config.onEscape) {\n e.preventDefault();\n this._config.onEscape();\n }\n break;\n\n case 'ArrowUp':\n if (!isTextInput && this._config.onArrowUp) {\n e.preventDefault();\n this._config.onArrowUp();\n }\n break;\n\n case 'ArrowDown':\n if (!isTextInput && this._config.onArrowDown) {\n e.preventDefault();\n this._config.onArrowDown();\n }\n break;\n\n case 'ArrowLeft':\n if (!isTextInput && this._config.onArrowLeft) {\n e.preventDefault();\n this._config.onArrowLeft();\n }\n break;\n\n case 'ArrowRight':\n if (!isTextInput && this._config.onArrowRight) {\n e.preventDefault();\n this._config.onArrowRight();\n }\n break;\n }\n }\n\n /**\n * Get the actual active element, traversing shadow DOMs\n */\n private _getActiveElement(): Element | null {\n let active = document.activeElement;\n while (active?.shadowRoot?.activeElement) {\n active = active.shadowRoot.activeElement;\n }\n return active;\n }\n\n /**\n * Update keyboard config\n */\n updateConfig(config: Partial<KeyboardConfig>): void {\n this._config = { ...this._config, ...config };\n }\n\n /**\n * Enable keyboard shortcuts\n */\n enable(): void {\n this._enabled = true;\n }\n\n /**\n * Disable keyboard shortcuts\n */\n disable(): void {\n this._enabled = false;\n }\n\n /**\n * Check if keyboard shortcuts are enabled\n */\n get enabled(): boolean {\n return this._enabled;\n }\n}\n","/**\n * Styles for wf-badge component (Shadow DOM)\n */\n\nimport { css } from 'lit';\n\nexport const wfBadgeStyles = css`\n :host {\n display: inline-flex;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .wf-badge {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n min-width: var(--wf-badge-size);\n height: var(--wf-badge-size);\n padding: var(--wf-spacing-1) var(--wf-spacing-2);\n font-size: var(--wf-font-size-xs);\n font-weight: var(--wf-font-weight-label);\n font-family: var(--wf-font-family-mono);\n text-transform: uppercase;\n flex-shrink: 0;\n line-height: 1;\n }\n\n .wf-badge--default {\n background-color: var(--wf-color-badge-bg);\n border: 1px solid var(--wf-color-badge-border);\n border-radius: var(--wf-radius-sm);\n color: var(--wf-color-badge-text);\n }\n\n .wf-badge--selected {\n background-color: var(--wf-color-primary);\n border: 1px solid var(--wf-color-primary);\n border-radius: var(--wf-radius-sm);\n color: white;\n }\n\n .wf-badge--button {\n background-color: transparent;\n border: none;\n border-radius: var(--wf-radius-sm);\n color: rgba(255, 255, 255, 0.65);\n }\n\n .wf-badge--button-secondary {\n background-color: transparent;\n border: none;\n border-radius: var(--wf-radius-sm);\n color: var(--wf-color-text-muted);\n }\n`;\n","/**\n * WF-Badge - Keyboard shortcut badge component for wizard forms\n *\n * A reusable badge component with multiple variants for displaying keyboard shortcuts.\n *\n * @example\n * <wf-badge shortcut=\"A\"></wf-badge>\n * <wf-badge shortcut=\"Enter\" variant=\"selected\"></wf-badge>\n * <wf-badge shortcut=\"↵\" variant=\"button\"></wf-badge>\n */\n\nimport { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { wfBadgeStyles } from './wf-badge.styles.js';\n\nexport type BadgeVariant = 'default' | 'selected' | 'button' | 'button-secondary';\n\n@customElement('wf-badge')\nexport class WfBadge extends LitElement {\n static styles = wfBadgeStyles;\n\n /**\n * The text to display in the badge (e.g., 'A', 'Enter', '↵')\n */\n @property({ type: String })\n shortcut = '';\n\n /**\n * Visual variant of the badge\n */\n @property({ type: String })\n variant: BadgeVariant = 'default';\n\n render() {\n return html`\n <span\n class=\"wf-badge wf-badge--${this.variant}\"\n aria-hidden=\"true\"\n data-testid=\"wf-badge\"\n >\n ${this.shortcut}\n </span>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-badge': WfBadge;\n }\n}\n","/**\n * Wizard-Form - Main orchestrator component\n *\n * Manages multi-step form flow, validation, and submission.\n *\n * @example\n * <wizard-form hubspot-portal=\"12345\" hubspot-form=\"abc-123\">\n * <wf-step data-step=\"1\">...</wf-step>\n * <wf-step data-step=\"2\">...</wf-step>\n * <wf-success>Thank you!</wf-success>\n * </wizard-form>\n */\n\nimport { LitElement, html, nothing, css } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\n\nimport { wizardFormStyles } from './wizard-form.styles.js';\nimport { FormStateController } from '../controllers/FormStateController.js';\nimport { KeyboardController } from '../controllers/KeyboardController.js';\nimport type { WfStep } from './wf-step.js';\nimport type { Theme, HubSpotSubmissionData } from '../types.js';\n// Import wf-badge for button shortcuts\nimport './wf-badge.js';\n\n// Event detail types\nexport interface StepChangeDetail {\n from: number;\n to: number;\n direction: 'forward' | 'backward';\n submitted?: boolean;\n adapter?: 'hubspot';\n}\n\nexport interface FieldChangeDetail {\n name: string;\n value: unknown;\n formData: Record<string, unknown>;\n}\n\nexport interface SubmitDetail {\n formData: Record<string, unknown>;\n}\n\nexport interface SuccessDetail {\n formData: Record<string, unknown>;\n response?: unknown;\n}\n\nexport interface ErrorDetail {\n error: string;\n formData?: Record<string, unknown>;\n}\n\n@customElement('wizard-form')\nexport class WizardForm extends LitElement {\n static styles = wizardFormStyles;\n\n // ============================================\n // Properties\n // ============================================\n\n /**\n * HubSpot portal ID\n */\n @property({ type: String, attribute: 'hubspot-portal' })\n hubspotPortal = '';\n\n /**\n * HubSpot form ID\n */\n @property({ type: String, attribute: 'hubspot-form' })\n hubspotForm = '';\n\n /**\n * Color theme\n */\n @property({ type: String, reflect: true })\n theme: Theme = 'light';\n\n /**\n * Mock submission mode (for testing)\n */\n @property({ type: Boolean })\n mock = false;\n\n /**\n * Show progress bar\n */\n @property({ type: Boolean, attribute: 'show-progress' })\n showProgress = false;\n\n /**\n * Auto-advance after single-select option\n */\n @property({ type: Boolean, attribute: 'auto-advance' })\n autoAdvance = true;\n\n /**\n * Hide the back button in navigation\n */\n @property({ type: Boolean, attribute: 'hide-back' })\n hideBack = true;\n\n /**\n * Transform form data before submission.\n * Applied before HubSpot submission and passed to wf:success event.\n */\n @property({ attribute: false })\n serialize?: (data: Record<string, unknown>) => Record<string, unknown>;\n\n /**\n * Submit partial form data to HubSpot after each step change.\n * When enabled, form data is submitted after each step navigation (blocking).\n * Only fields from completed steps are included in partial submissions.\n */\n @property({ type: Boolean, attribute: 'submit-on-step' })\n submitOnStep = false;\n\n // ============================================\n // State\n // ============================================\n\n @state()\n private _steps: WfStep[] = [];\n\n @state()\n private _currentStep = 1;\n\n @state()\n private _totalSteps = 0;\n\n @state()\n private _formData: Record<string, unknown> = {};\n\n @state()\n private _submitting = false;\n\n /**\n * Whether form has been successfully submitted\n * Reflected to attribute for CSS styling of slotted elements\n */\n @property({ type: Boolean, reflect: true })\n submitted = false;\n\n @state()\n private _error = '';\n\n /**\n * Tracks if user is typing in \"Others\" input (for dynamic Continue button visibility)\n */\n @state()\n private _otherInputActive = false;\n\n /**\n * Tracks if partial submission is in progress (prevents duplicate submissions)\n */\n private _partialSubmitting = false;\n\n // ============================================\n // Controllers\n // ============================================\n\n private _stateController = new FormStateController(this);\n\n constructor() {\n super();\n\n // Initialize keyboard controller (attaches to host automatically)\n new KeyboardController(this, {\n onEnter: () => this._handleEnter(),\n onEscape: () => this._handleEscape(),\n });\n }\n\n // ============================================\n // Lifecycle\n // ============================================\n\n connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener('wf-change', this._handleFieldChange as EventListener);\n this.addEventListener('wf-option-select', this._handleOptionSelect as EventListener);\n // Listen for composable navigation events\n this.addEventListener('wf:nav-next', this._handleNavNext);\n this.addEventListener('wf:nav-back', this._handleNavBack);\n this.addEventListener('wf:nav-state-request', this._handleNavStateRequest);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener('wf-change', this._handleFieldChange as EventListener);\n this.removeEventListener('wf-option-select', this._handleOptionSelect as EventListener);\n this.removeEventListener('wf:nav-next', this._handleNavNext);\n this.removeEventListener('wf:nav-back', this._handleNavBack);\n this.removeEventListener('wf:nav-state-request', this._handleNavStateRequest);\n }\n\n firstUpdated(): void {\n this._discoverSteps();\n this._showCurrentStep();\n\n // Broadcast initial nav state for composable buttons\n this._broadcastNavState();\n }\n\n // ============================================\n // Rendering\n // ============================================\n\n render() {\n // When submitted, hide steps (via CSS) and show success slot\n if (this.submitted) {\n // Deactivate all steps\n this._steps.forEach(step => {\n step.active = false;\n });\n\n return html`\n <div class=\"wf-container\" data-testid=\"wf-container\">\n <slot name=\"success\">\n <div class=\"wf-success-screen\">\n <h2>Thank you!</h2>\n <p>Your submission has been received.</p>\n </div>\n </slot>\n </div>\n `;\n }\n\n return html`\n <div class=\"wf-container\" data-testid=\"wf-container\">\n ${this._error\n ? html`<div class=\"wf-form-error\" role=\"alert\" data-testid=\"wf-form-error\">${this._error}</div>`\n : nothing}\n\n <slot @slotchange=\"${this._handleSlotChange}\"></slot>\n </div>\n `;\n }\n\n /**\n * Handle slot changes to re-discover steps when DOM changes\n */\n private _handleSlotChange(): void {\n this._discoverSteps();\n }\n\n private _renderProgress() {\n const segments = [];\n for (let i = 1; i <= this._totalSteps; i++) {\n const completed = i < this._currentStep;\n const active = i === this._currentStep;\n segments.push(html`\n <div\n class=\"wf-progress-segment ${completed ? 'completed' : ''} ${active ? 'active' : ''}\"\n ></div>\n `);\n }\n return html`<div class=\"wf-progress\">${segments}</div>`;\n }\n\n /**\n * Centralized navigation is no longer rendered.\n * All navigation is now fully composable via <wf-next-btn> and <wf-back-btn>.\n * Keyboard shortcuts (Enter/Esc) still work regardless of button presence.\n */\n private _renderNavigation() {\n // Navigation is fully composable - nothing to render centrally\n return nothing;\n }\n\n // ============================================\n // Step Discovery\n // ============================================\n\n private _discoverSteps(): void {\n // Shadow DOM: Get slotted wf-step elements\n const slot = this.shadowRoot?.querySelector('slot:not([name])') as HTMLSlotElement | null;\n if (slot) {\n const assignedElements = slot.assignedElements({ flatten: true });\n this._steps = assignedElements.filter(\n (el): el is WfStep => el.tagName.toLowerCase() === 'wf-step'\n );\n } else {\n // Fallback: query light DOM (for initial render before slot is ready)\n this._steps = Array.from(this.querySelectorAll(':scope > wf-step')) as WfStep[];\n }\n\n // Auto-assign step numbers based on DOM order (1-indexed)\n // This makes data-step attribute optional\n this._steps.forEach((step, index) => {\n step.step = index + 1;\n });\n\n this._totalSteps = this._steps.length;\n this._stateController.setTotalSteps(this._totalSteps);\n\n // Dispatch event on document so wf-progress can always catch it\n // (even if wf-progress is positioned before wizard-form in DOM)\n document.dispatchEvent(\n new CustomEvent('wf:steps-discovered', {\n detail: {\n wizard: this,\n wizardId: this.id,\n totalSteps: this._totalSteps,\n currentStep: this._currentStep,\n },\n })\n );\n }\n\n private _showCurrentStep(): void {\n this._steps.forEach((step, index) => {\n const stepNumber = index + 1;\n if (stepNumber === this._currentStep) {\n step.show('forward');\n } else {\n step.active = false;\n }\n });\n }\n\n /**\n * Get step element by step number (1-indexed)\n */\n private _getStepByNumber(stepNumber: number): WfStep | undefined {\n const index = stepNumber - 1;\n return this._steps[index];\n }\n\n // ============================================\n // Navigation\n // ============================================\n\n /**\n * Check if the current step requires manual navigation (Continue button).\n * Returns true if step contains typing inputs or multi-select options.\n * Returns false if step only has single-select options (auto-advance handles it).\n */\n private _stepRequiresManualNav(): boolean {\n // If auto-advance is disabled, always show nav\n if (!this.autoAdvance) {\n return true;\n }\n\n const currentStep = this._getStepByNumber(this._currentStep);\n if (!currentStep) {\n return true;\n }\n\n // Check for typing controls\n const typingControls = ['wf-input', 'wf-email', 'wf-textarea', 'wf-number'];\n for (const selector of typingControls) {\n if (currentStep.querySelector(selector)) {\n return true;\n }\n }\n\n // Check for multi-select options\n const multiSelectOptions = currentStep.querySelector('wf-options[multi]');\n if (multiSelectOptions) {\n return true;\n }\n\n // For \"allow-other\" options: only show nav if user is typing in \"Other\" input\n // Otherwise, auto-advance will handle regular option selection\n const allowOtherOptions = currentStep.querySelector('wf-options[allow-other]');\n if (allowOtherOptions && this._otherInputActive) {\n return true;\n }\n\n // Step only has single-select options (or allow-other without text) - auto-advance handles it\n return false;\n }\n\n /**\n * Check if the current step has composable navigation buttons at the step level.\n * Excludes buttons inside wf-other (those are for inline \"Others\" input only).\n * When present, auto-advance is disabled for the step.\n */\n private _stepHasComposableNav(): boolean {\n const currentStep = this._getStepByNumber(this._currentStep);\n if (!currentStep) {return false;}\n // Find nav buttons that are NOT inside wf-other\n const navButtons = currentStep.querySelectorAll('wf-next-btn, wf-back-btn');\n for (const btn of navButtons) {\n // Check if this button is inside a wf-other element\n if (!btn.closest('wf-other')) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Broadcast navigation state to composable buttons.\n * Called on step changes and submit state changes.\n */\n private _broadcastNavState(): void {\n this.dispatchEvent(\n new CustomEvent('wf:nav-state', {\n detail: {\n currentStep: this._currentStep,\n totalSteps: this._totalSteps,\n isFirstStep: this._currentStep === 1,\n isLastStep: this._currentStep === this._totalSteps,\n isSubmitting: this._submitting,\n },\n bubbles: false,\n })\n );\n }\n\n private async _goNext(): Promise<void> {\n if (this._submitting) {return;}\n\n // Validate current step\n const currentStep = this._getStepByNumber(this._currentStep);\n if (currentStep) {\n const isValid = await currentStep.validate();\n if (!isValid) {\n return;\n }\n }\n\n if (this._currentStep >= this._totalSteps) {\n // Submit form\n await this._submit();\n } else {\n // Go to next step\n this._navigateToStep(this._currentStep + 1, 'forward');\n }\n }\n\n private _goBack(): void {\n if (this._submitting) {return;}\n if (this._currentStep <= 1) {return;}\n\n this._navigateToStep(this._currentStep - 1, 'backward');\n }\n\n private async _navigateToStep(\n targetStep: number,\n direction: 'forward' | 'backward'\n ): Promise<void> {\n if (targetStep < 1 || targetStep > this._totalSteps) {return;}\n\n const targetStepEl = this._getStepByNumber(targetStep);\n if (!targetStepEl) {return;}\n\n // Check skip condition\n if (targetStepEl.shouldSkip(this._formData)) {\n const nextTarget = direction === 'forward' ? targetStep + 1 : targetStep - 1;\n if (nextTarget >= 1 && nextTarget <= this._totalSteps) {\n return this._navigateToStep(nextTarget, direction);\n }\n return;\n }\n\n const previousStep = this._currentStep;\n\n // Partial submission (blocking) - submit before navigation\n let submitted = false;\n let adapter: 'hubspot' | undefined;\n\n // Only do partial submission if:\n // 1. submitOnStep is enabled\n // 2. HubSpot config exists\n // 3. Going forward (not backward)\n // 4. Not already submitting a partial\n if (\n this.submitOnStep &&\n this.hubspotPortal &&\n this.hubspotForm &&\n direction === 'forward' &&\n !this._partialSubmitting\n ) {\n try {\n this._partialSubmitting = true;\n await this._submitPartialToHubSpot();\n submitted = true;\n adapter = 'hubspot';\n } catch (error) {\n // Block navigation on failure\n console.error('[wizard-form] Partial submission failed:', error);\n this.dispatchEvent(\n new CustomEvent<ErrorDetail>('wf:error', {\n detail: {\n error: error instanceof Error ? error.message : 'Partial submission failed',\n formData: this._getFieldsUpToStep(this._currentStep),\n },\n bubbles: true,\n composed: true,\n })\n );\n return; // Don't proceed to next step\n } finally {\n this._partialSubmitting = false;\n }\n }\n\n // Hide current step\n const currentStepEl = this._getStepByNumber(this._currentStep);\n if (currentStepEl) {\n await currentStepEl.hide();\n }\n\n // Update current step\n this._currentStep = targetStep;\n this._stateController.goToStep(targetStep);\n\n // Reset \"Other\" input state for new step\n this._otherInputActive = false;\n\n // Broadcast nav state for composable buttons\n this._broadcastNavState();\n\n // Show new step\n targetStepEl.show(direction);\n\n // Dispatch step change event with submission metadata\n this.dispatchEvent(\n new CustomEvent<StepChangeDetail>('wf:step-change', {\n detail: {\n from: previousStep,\n to: targetStep,\n direction,\n submitted,\n adapter,\n },\n bubbles: true,\n composed: true,\n })\n );\n }\n\n // ============================================\n // Event Handlers\n // ============================================\n\n private _handleFieldChange = (e: CustomEvent): void => {\n const { name, value, extraFields } = e.detail;\n this._formData[name] = value;\n this._stateController.setValue(name, value);\n\n // Handle dual-field submission (e.g., \"Others\" with custom text from wf-options)\n if (extraFields) {\n Object.entries(extraFields).forEach(([fieldName, fieldValue]) => {\n this._formData[fieldName] = fieldValue;\n this._stateController.setValue(fieldName, fieldValue as string);\n });\n\n // Track if \"Other\" input has text (for dynamic Continue button visibility)\n const hasOtherText = Object.values(extraFields).some(v => v && String(v).trim());\n this._otherInputActive = hasOtherText;\n } else {\n // If no extraFields, user selected a regular option - reset Other state\n this._otherInputActive = false;\n }\n\n // Clear form error on field change\n this._error = '';\n\n this.dispatchEvent(\n new CustomEvent<FieldChangeDetail>('wf:field-change', {\n detail: {\n name,\n value,\n formData: { ...this._formData },\n },\n bubbles: true,\n composed: true,\n })\n );\n };\n\n private _handleOptionSelect = (e: CustomEvent): void => {\n // Skip auto-advance if step has composable navigation buttons\n if (this._stepHasComposableNav()) {\n return;\n }\n\n // Check if this is a single-select option and auto-advance is enabled\n if (this.autoAdvance) {\n const target = e.target as Element;\n const optionsParent = target.closest('wf-options');\n if (optionsParent && !optionsParent.hasAttribute('multi')) {\n // Delay to show selection animation\n setTimeout(() => {\n this._goNext();\n }, 300);\n }\n }\n };\n\n private async _handleEnter(): Promise<void> {\n await this._goNext();\n }\n\n private _handleEscape(): void {\n this._goBack();\n }\n\n /**\n * Handle composable wf-next-btn click\n */\n private _handleNavNext = async (e: Event): Promise<void> => {\n e.stopPropagation();\n await this._goNext();\n };\n\n /**\n * Handle composable wf-back-btn click\n */\n private _handleNavBack = (e: Event): void => {\n e.stopPropagation();\n this._goBack();\n };\n\n /**\n * Handle request for navigation state (from composable buttons on connect)\n */\n private _handleNavStateRequest = (): void => {\n this._broadcastNavState();\n };\n\n // ============================================\n // Submission\n // ============================================\n\n private async _submit(): Promise<void> {\n if (this._submitting) {return;}\n\n const rawData: Record<string, unknown> = { ...this._formData };\n\n // Dispatch submit event with RAW data (cancelable)\n // This allows init() or user code to apply their own transformations\n const submitEvent = new CustomEvent<SubmitDetail>('wf:submit', {\n detail: { formData: rawData },\n bubbles: true,\n composed: true,\n cancelable: true,\n });\n\n this.dispatchEvent(submitEvent);\n\n if (submitEvent.defaultPrevented) {\n return;\n }\n\n this._submitting = true;\n this._error = '';\n\n // Broadcast nav state to update composable button loading state\n this._broadcastNavState();\n\n // Apply serialize transform if provided (for built-in HubSpot submission)\n let submitData = rawData;\n if (this.serialize) {\n submitData = this.serialize(rawData);\n }\n\n try {\n let response: unknown;\n\n if (this.mock) {\n // Mock submission for testing\n await new Promise((resolve) => setTimeout(resolve, 1000));\n response = { success: true };\n } else if (this.hubspotPortal && this.hubspotForm) {\n // Submit to HubSpot with serialized data\n response = await this._submitToHubSpot(submitData);\n } else {\n // No submission target configured\n console.warn('[WizardForm] No submission target configured. Use hubspot-portal/hubspot-form or mock.');\n response = { success: true };\n }\n\n this.submitted = true;\n\n // wf:success receives serialized data (same as what went to HubSpot)\n this.dispatchEvent(\n new CustomEvent<SuccessDetail>('wf:success', {\n detail: {\n formData: submitData,\n response,\n },\n bubbles: true,\n composed: true,\n })\n );\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Submission failed';\n this._error = errorMessage;\n\n this.dispatchEvent(\n new CustomEvent<ErrorDetail>('wf:error', {\n detail: {\n error: errorMessage,\n formData: submitData,\n },\n bubbles: true,\n composed: true,\n })\n );\n } finally {\n this._submitting = false;\n // Broadcast nav state to update composable button loading state\n this._broadcastNavState();\n }\n }\n\n private async _submitToHubSpot(formData: Record<string, unknown>): Promise<unknown> {\n const endpoint = `https://api.hsforms.com/submissions/v3/integration/submit/${this.hubspotPortal}/${this.hubspotForm}`;\n\n // Convert form data to HubSpot format\n const fields = Object.entries(formData).map(([name, value]) => ({\n name,\n value: Array.isArray(value) ? value.join(';') : String(value ?? ''),\n }));\n\n const data: HubSpotSubmissionData = {\n fields,\n context: {\n pageUri: window.location.href,\n pageName: document.title,\n },\n };\n\n const response = await fetch(endpoint, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(data),\n });\n\n if (!response.ok) {\n const errorData = await response.json().catch(() => ({}));\n throw new Error(errorData.message || `HubSpot submission failed: ${response.status}`);\n }\n\n return response.json();\n }\n\n // ============================================\n // Partial Submission\n // ============================================\n\n /**\n * Get form fields from steps up to and including the specified step number.\n * Used for partial submission to only include completed step data.\n */\n private _getFieldsUpToStep(stepNumber: number): Record<string, unknown> {\n const result: Record<string, unknown> = {};\n\n // Get all steps up to and including the specified step\n for (let i = 0; i < stepNumber && i < this._steps.length; i++) {\n const step = this._steps[i];\n // Find all field components in this step\n const fields = step.querySelectorAll('[name]') as NodeListOf<HTMLElement & { name: string }>;\n fields.forEach((field) => {\n if (field.name && this._formData[field.name] !== undefined) {\n result[field.name] = this._formData[field.name];\n }\n });\n }\n\n return result;\n }\n\n /**\n * Submit partial form data to HubSpot.\n * Only includes fields from steps up to and including the current step.\n * Filters out empty/blank values to avoid submitting unfilled fields.\n */\n private async _submitPartialToHubSpot(): Promise<void> {\n // Only include fields from steps up to and including the current step\n const partialData = this._getFieldsUpToStep(this._currentStep);\n\n // Apply serialize transform if provided\n let submitData = { ...partialData };\n if (this.serialize) {\n submitData = this.serialize(submitData);\n }\n\n // Filter out empty/blank values from partial submission\n const filteredData = Object.fromEntries(\n Object.entries(submitData).filter(([, value]) => {\n // Keep the value if it's not null, undefined, or empty string\n if (value === null || value === undefined || value === '') {\n return false;\n }\n // For arrays, keep if not empty\n if (Array.isArray(value) && value.length === 0) {\n return false;\n }\n return true;\n })\n );\n\n await this._submitToHubSpot(filteredData);\n }\n\n // ============================================\n // Public API\n // ============================================\n\n /**\n * Get current form data\n */\n get formData(): Record<string, unknown> {\n return { ...this._formData };\n }\n\n /**\n * Get current step number\n */\n get currentStep(): number {\n return this._currentStep;\n }\n\n /**\n * Get total number of steps\n */\n get totalSteps(): number {\n return this._totalSteps;\n }\n\n /**\n * Check if form is submitting\n */\n get isSubmitting(): boolean {\n return this._submitting;\n }\n\n /**\n * Check if form was submitted\n */\n get isSubmitted(): boolean {\n return this.submitted;\n }\n\n /**\n * Go to a specific step\n */\n goToStep(step: number): void {\n const direction = step > this._currentStep ? 'forward' : 'backward';\n this._navigateToStep(step, direction);\n }\n\n /**\n * Go to next step\n */\n next(): Promise<void> {\n return this._goNext();\n }\n\n /**\n * Go to previous step\n */\n back(): void {\n this._goBack();\n }\n\n /**\n * Submit the form\n */\n submit(): Promise<void> {\n return this._submit();\n }\n\n /**\n * Reset the form\n */\n reset(): void {\n this._formData = {};\n this._currentStep = 1;\n this._submitting = false;\n this.submitted = false;\n this._error = '';\n this._stateController.reset();\n this._showCurrentStep();\n\n // Reset all field components\n this._steps.forEach((step) => {\n const fields = step.querySelectorAll('wf-options, wf-field, wf-email');\n fields.forEach((field) => {\n if ('reset' in field && typeof (field as { reset: () => void }).reset === 'function') {\n (field as { reset: () => void }).reset();\n }\n });\n });\n }\n\n /**\n * Set form data\n */\n setFormData(data: Record<string, unknown>): void {\n this._formData = { ...this._formData, ...data };\n Object.entries(data).forEach(([name, value]) => {\n this._stateController.setValue(name, value);\n });\n }\n}\n\n// Success screen component\n@customElement('wf-success')\nexport class WfSuccess extends LitElement {\n static styles = css`\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none;\n }\n `;\n\n render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wizard-form': WizardForm;\n 'wf-success': WfSuccess;\n }\n}\n","/**\n * WF-Step styles for Shadow DOM\n */\n\nimport { css } from 'lit';\n\nimport { sharedAnimations } from '../styles/shared.styles.js';\n\nexport const wfStepStyles = [\n sharedAnimations,\n css`\n :host {\n display: none;\n width: 100%;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n :host([active]) {\n display: block;\n animation: wf-stepFadeIn 0.3s ease forwards;\n }\n\n :host([direction='forward'][active]) {\n animation: wf-stepSlideInRight 0.3s ease forwards;\n }\n\n :host([direction='backward'][active]) {\n animation: wf-stepSlideInLeft 0.3s ease forwards;\n }\n\n :host([leaving]) {\n display: block;\n animation: wf-stepFadeOut 0.2s ease forwards;\n }\n\n .wf-step-content {\n display: flex;\n flex-direction: column;\n gap: var(--wf-spacing-4);\n }\n\n /* Slotted heading styles */\n ::slotted(h1),\n ::slotted(h2),\n ::slotted(h3) {\n margin: 0;\n font-weight: var(--wf-font-weight-heading);\n color: var(--wf-color-text);\n }\n\n ::slotted(h2) {\n font-size: var(--wf-font-size-3xl);\n }\n\n ::slotted(p) {\n margin: 0;\n color: var(--wf-color-text-muted);\n font-size: var(--wf-font-size-xl);\n }\n`,\n];\n","/**\n * WF-Step - Step container component for wizard forms\n *\n * Wraps step content and handles visibility/transitions.\n *\n * @example\n * <wf-step data-step=\"1\">\n * <h2>What's your role?</h2>\n * <wf-options name=\"role\" required>\n * <wf-option value=\"developer\">Developer</wf-option>\n * </wf-options>\n * </wf-step>\n */\n\nimport { LitElement, html, PropertyValues } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\n\nimport { wfStepStyles } from './wf-step.styles.js';\n\n@customElement('wf-step')\nexport class WfStep extends LitElement {\n static styles = wfStepStyles;\n\n /**\n * Step number (1-indexed)\n */\n @property({ type: Number, attribute: 'data-step' })\n step = 0;\n\n /**\n * Whether this step is currently active\n */\n @property({ type: Boolean, reflect: true })\n active = false;\n\n /**\n * Animation direction (forward/backward)\n */\n @property({ type: String, reflect: true })\n direction: 'forward' | 'backward' = 'forward';\n\n /**\n * Whether this step is leaving (for exit animation)\n */\n @property({ type: Boolean, reflect: true })\n leaving = false;\n\n /**\n * Skip condition expression (evaluated against form data)\n */\n @property({ type: String, attribute: 'data-skip-if' })\n skipIf = '';\n\n /**\n * List of field names in this step (auto-discovered)\n */\n @state()\n private _fields: string[] = [];\n\n render() {\n return html`\n <div class=\"wf-step-content\" data-testid=\"wf-step-content\">\n <slot></slot>\n </div>\n `;\n }\n\n firstUpdated(): void {\n this._discoverFields();\n }\n\n protected updated(changedProperties: PropertyValues): void {\n if (changedProperties.has('active')) {\n if (this.active) {\n this.leaving = false;\n this._focusFirstField();\n }\n }\n }\n\n /**\n * Discover field elements within this step\n */\n private _discoverFields(): void {\n // Light DOM: Query all field elements within this step\n const fieldElements = ['wf-options', 'wf-field', 'wf-email', 'wf-input', 'wf-textarea', 'wf-number'];\n const fields: string[] = [];\n\n const findFields = (el: Element): void => {\n if (fieldElements.includes(el.tagName.toLowerCase())) {\n const name = el.getAttribute('name');\n if (name) {\n fields.push(name);\n }\n }\n // Recurse into children\n Array.from(el.children).forEach(findFields);\n };\n\n Array.from(this.children).forEach(findFields);\n this._fields = fields;\n }\n\n /**\n * Focus the first focusable field in this step\n */\n private _focusFirstField(): void {\n // Delay to allow DOM updates\n requestAnimationFrame(() => {\n // Light DOM: Find first focusable element among children\n for (const el of this.children) {\n const focusable = this._findFocusable(el);\n if (focusable) {\n focusable.focus();\n return;\n }\n }\n });\n }\n\n private _findFocusable(el: Element): HTMLElement | null {\n // Check if element itself is focusable\n if (el instanceof HTMLElement && typeof el.focus === 'function') {\n // Skip wf-options - don't auto-focus as the focus style looks like selection\n const fieldElements = ['wf-field', 'wf-email', 'wf-input', 'wf-textarea'];\n if (fieldElements.includes(el.tagName.toLowerCase())) {\n return el;\n }\n }\n\n // Recurse into children\n for (const child of el.children) {\n const found = this._findFocusable(child);\n if (found) {return found;}\n }\n\n return null;\n }\n\n // ============================================\n // Public API\n // ============================================\n\n /**\n * Get field names in this step\n */\n get fields(): string[] {\n return [...this._fields];\n }\n\n /**\n * Check if step should be skipped based on form data\n */\n shouldSkip(formData: Record<string, unknown>): boolean {\n if (!this.skipIf) {return false;}\n\n try {\n // Simple expression evaluation\n // Supports: \"fieldName === 'value'\" or \"!fieldName\"\n const expression = this.skipIf.trim();\n\n // Handle negation\n if (expression.startsWith('!')) {\n const fieldName = expression.slice(1);\n return !formData[fieldName];\n }\n\n // Handle equality check\n if (expression.includes('===')) {\n const [left, right] = expression.split('===').map((s) => s.trim());\n const fieldValue = formData[left];\n const compareValue = right.replace(/['\"]/g, ''); // Remove quotes\n return fieldValue === compareValue;\n }\n\n // Handle inequality check\n if (expression.includes('!==')) {\n const [left, right] = expression.split('!==').map((s) => s.trim());\n const fieldValue = formData[left];\n const compareValue = right.replace(/['\"]/g, '');\n return fieldValue !== compareValue;\n }\n\n // Simple truthy check\n return Boolean(formData[expression]);\n } catch (error) {\n console.error('[WfStep] Error evaluating skip condition:', error);\n return false;\n }\n }\n\n /**\n * Show this step with animation\n */\n show(direction: 'forward' | 'backward' = 'forward'): void {\n this.direction = direction;\n this.leaving = false;\n this.active = true;\n }\n\n /**\n * Hide this step with animation\n */\n hide(): Promise<void> {\n return new Promise((resolve) => {\n this.leaving = true;\n\n const handleAnimationEnd = (): void => {\n this.active = false;\n this.leaving = false;\n this.removeEventListener('animationend', handleAnimationEnd);\n resolve();\n };\n\n this.addEventListener('animationend', handleAnimationEnd);\n\n // Fallback timeout\n setTimeout(() => {\n this.active = false;\n this.leaving = false;\n this.removeEventListener('animationend', handleAnimationEnd);\n resolve();\n }, 300);\n });\n }\n\n /**\n * Validate all fields in this step\n * Returns true if all fields are valid\n * Scrolls to and focuses the first invalid field if validation fails\n */\n async validate(): Promise<boolean> {\n // Light DOM: Validate all child elements\n const invalidElements: Element[] = [];\n let allValid = true;\n\n const validateElement = async (el: Element): Promise<void> => {\n // Check for validate method on field elements\n if ('validate' in el && typeof (el as { validate: () => boolean | Promise<boolean> }).validate === 'function') {\n const isValid = await (el as { validate: () => boolean | Promise<boolean> }).validate();\n if (!isValid) {\n // Track invalid elements\n invalidElements.push(el);\n allValid = false;\n }\n }\n\n // Recurse into children\n for (const child of el.children) {\n await validateElement(child);\n }\n };\n\n for (const el of this.children) {\n await validateElement(el);\n }\n\n // Scroll to and focus first invalid field\n if (invalidElements.length > 0) {\n const firstInvalid = invalidElements[0];\n\n // Smooth scroll to the element\n firstInvalid.scrollIntoView({\n behavior: 'smooth',\n block: 'center'\n });\n\n // Focus the element after a brief delay for scroll to complete\n setTimeout(() => {\n if ('focus' in firstInvalid && typeof (firstInvalid as HTMLElement).focus === 'function') {\n (firstInvalid as HTMLElement).focus();\n }\n }, 100);\n }\n\n return allValid;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-step': WfStep;\n }\n}\n","/**\n * WF-Layout styles for Shadow DOM\n */\n\nimport { css } from 'lit';\n\nexport const wfLayoutStyles = css`\n :host {\n display: block;\n box-sizing: border-box;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n /* Width classes */\n :host(.wf-layout--width-full) {\n width: 100%;\n }\n\n :host(.wf-layout--width-auto) {\n width: auto;\n }\n\n :host(.wf-layout--width-fit) {\n width: fit-content;\n }\n`;\n","/**\n * WF-Layout - Figma-style auto-layout container for wizard forms\n *\n * A flexible layout component supporting both flexbox and CSS grid modes\n * with independent horizontal/vertical gutters and padding.\n *\n * @example\n * <!-- Flex mode (default) -->\n * <wf-layout direction=\"column\" gap=\"md\">\n * <wf-input name=\"name\" label=\"Name\"></wf-input>\n * <wf-email name=\"email\" label=\"Email\"></wf-email>\n * </wf-layout>\n *\n * <!-- Grid mode with responsive columns -->\n * <wf-layout mode=\"grid\" columns=\"2\" gap-x=\"lg\" gap-y=\"md\">\n * <wf-option value=\"a\">A</wf-option>\n * <wf-option value=\"b\">B</wf-option>\n * </wf-layout>\n */\n\nimport { LitElement, html, type CSSResultGroup } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\n\nimport { wfLayoutStyles } from './wf-layout.styles.js';\n\nexport type LayoutMode = 'flex' | 'grid';\nexport type FlexDirection = 'row' | 'column';\nexport type AlignItems = 'start' | 'center' | 'end' | 'stretch';\nexport type JustifyContent = 'start' | 'center' | 'end' | 'space-between' | 'space-around';\nexport type WidthBehavior = 'full' | 'auto' | 'fit';\nexport type SpacingPreset = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n// Spacing scale in pixels\nconst SPACING_SCALE: Record<SpacingPreset, number> = {\n none: 0,\n xs: 4,\n sm: 8,\n md: 16,\n lg: 24,\n xl: 32,\n};\n\n@customElement('wf-layout')\nexport class WfLayout extends LitElement {\n static styles: CSSResultGroup = wfLayoutStyles;\n\n /**\n * Layout mode: 'flex' for flexbox, 'grid' for CSS grid\n */\n @property({ type: String })\n mode: LayoutMode = 'flex';\n\n /**\n * Flex direction (flex mode only)\n */\n @property({ type: String })\n direction: FlexDirection = 'column';\n\n /**\n * Uniform gap (sets both gap-x and gap-y)\n */\n @property({ type: String })\n gap: SpacingPreset | string = 'none';\n\n /**\n * Horizontal gutter (column-gap)\n */\n @property({ type: String, attribute: 'gap-x' })\n gapX: SpacingPreset | string = '';\n\n /**\n * Vertical gutter (row-gap)\n */\n @property({ type: String, attribute: 'gap-y' })\n gapY: SpacingPreset | string = '';\n\n /**\n * Cross-axis alignment\n */\n @property({ type: String })\n align: AlignItems = 'stretch';\n\n /**\n * Main-axis justification\n */\n @property({ type: String })\n justify: JustifyContent = 'start';\n\n /**\n * Uniform padding (all sides)\n */\n @property({ type: String })\n padding: SpacingPreset | string = 'none';\n\n /**\n * Horizontal padding (left/right)\n */\n @property({ type: String, attribute: 'padding-x' })\n paddingX: SpacingPreset | string = '';\n\n /**\n * Vertical padding (top/bottom)\n */\n @property({ type: String, attribute: 'padding-y' })\n paddingY: SpacingPreset | string = '';\n\n /**\n * Enable flex-wrap (flex mode only)\n */\n @property({ type: Boolean })\n wrap = false;\n\n /**\n * Width behavior\n */\n @property({ type: String })\n width: WidthBehavior = 'full';\n\n /**\n * Number of columns or 'auto' for responsive (grid mode only)\n */\n @property({ type: String })\n columns: string = 'auto';\n\n /**\n * Minimum item width for auto-fit grid\n */\n @property({ type: String, attribute: 'min-item-width' })\n minItemWidth = '200px';\n\n /**\n * Reference to the slot element\n */\n @query('slot')\n private _slot!: HTMLSlotElement;\n\n /**\n * Convert spacing value to pixels\n */\n private _resolveSpacing(value: SpacingPreset | string): string {\n if (!value || value === 'none') {\n return '0';\n }\n\n // Check if it's a preset\n if (value in SPACING_SCALE) {\n return `${SPACING_SCALE[value as SpacingPreset]}px`;\n }\n\n // Check if it's a number (treat as pixels)\n const num = parseFloat(value);\n if (!isNaN(num)) {\n return `${num}px`;\n }\n\n // Return as-is (could be a CSS value like '1rem')\n return value;\n }\n\n /**\n * Get computed gap-x value\n */\n private _getGapX(): string {\n return this._resolveSpacing(this.gapX || this.gap);\n }\n\n /**\n * Get computed gap-y value\n */\n private _getGapY(): string {\n return this._resolveSpacing(this.gapY || this.gap);\n }\n\n /**\n * Get computed padding values\n */\n private _getPadding(): string {\n const uniformPadding = this._resolveSpacing(this.padding);\n const px = this.paddingX ? this._resolveSpacing(this.paddingX) : uniformPadding;\n const py = this.paddingY ? this._resolveSpacing(this.paddingY) : uniformPadding;\n return `${py} ${px}`;\n }\n\n /**\n * Build inline styles based on properties\n */\n private _buildStyles(): string {\n const styles: string[] = [];\n\n if (this.mode === 'grid') {\n styles.push('display: grid');\n\n // Grid columns\n const cols = parseInt(this.columns, 10);\n if (!isNaN(cols) && cols > 0) {\n styles.push(`grid-template-columns: repeat(${cols}, 1fr)`);\n } else {\n // Auto-fit responsive grid\n styles.push(\n `grid-template-columns: repeat(auto-fit, minmax(${this.minItemWidth}, 1fr))`\n );\n }\n\n // Grid alignment\n if (this.align !== 'stretch') {\n styles.push(`align-items: ${this.align}`);\n }\n if (this.justify !== 'start') {\n styles.push(`justify-content: ${this.justify}`);\n }\n } else {\n // Flex mode\n styles.push('display: flex');\n styles.push(`flex-direction: ${this.direction}`);\n\n if (this.wrap) {\n styles.push('flex-wrap: wrap');\n }\n\n // Flex alignment\n if (this.align !== 'stretch') {\n styles.push(`align-items: ${this.align}`);\n }\n if (this.justify !== 'start') {\n styles.push(`justify-content: ${this.justify}`);\n }\n }\n\n // Gap (works for both flex and grid)\n const gapX = this._getGapX();\n const gapY = this._getGapY();\n if (gapX !== '0' || gapY !== '0') {\n styles.push(`column-gap: ${gapX}`);\n styles.push(`row-gap: ${gapY}`);\n }\n\n // Padding\n const padding = this._getPadding();\n if (padding !== '0 0') {\n styles.push(`padding: ${padding}`);\n }\n\n return styles.join('; ');\n }\n\n /**\n * Apply data-* attributes from children as inline styles\n * Supports: data-span, data-row-span, data-grow, data-shrink, data-align, data-order\n */\n private _applyChildStyles(): void {\n if (!this._slot) {return;}\n\n const children = this._slot.assignedElements({ flatten: true });\n\n for (const child of children) {\n const el = child as HTMLElement;\n const styles: string[] = [];\n\n // Grid column span\n const span = el.getAttribute('data-span');\n if (span) {\n styles.push(`grid-column: span ${span}`);\n }\n\n // Grid row span\n const rowSpan = el.getAttribute('data-row-span');\n if (rowSpan) {\n styles.push(`grid-row: span ${rowSpan}`);\n }\n\n // Flex grow\n if (el.hasAttribute('data-grow')) {\n styles.push('flex-grow: 1');\n }\n\n // Flex shrink (opt out)\n if (el.hasAttribute('data-shrink')) {\n styles.push('flex-shrink: 0');\n }\n\n // Alignment override\n const align = el.getAttribute('data-align');\n if (align) {\n styles.push(`align-self: ${align}`);\n }\n\n // Order\n const order = el.getAttribute('data-order');\n if (order) {\n styles.push(`order: ${order}`);\n }\n\n // Apply styles if any data attributes were found\n if (styles.length > 0) {\n // Preserve existing inline styles\n const existingStyles = el.style.cssText;\n const newStyles = styles.join('; ');\n el.style.cssText = existingStyles ? `${existingStyles}; ${newStyles}` : newStyles;\n }\n }\n }\n\n /**\n * Handle slot changes to apply child styles\n */\n private _handleLayoutSlotChange(): void {\n this._applyChildStyles();\n }\n\n /**\n * Apply styles to host element when properties change\n */\n updated(changedProperties: Map<string, unknown>) {\n super.updated(changedProperties);\n\n // Apply layout styles to host element\n this.style.cssText = this._buildStyles();\n\n // Update width class on host\n this.classList.remove('wf-layout--width-full', 'wf-layout--width-auto', 'wf-layout--width-fit');\n this.classList.add(`wf-layout--width-${this.width}`);\n\n // Apply data-* attribute styles to children\n this._applyChildStyles();\n }\n\n render() {\n // Slotted content flows directly into the host with applied layout styles\n return html`<slot @slotchange=\"${this._handleLayoutSlotChange}\"></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-layout': WfLayout;\n }\n}\n","/**\n * Styles for wf-options component (Shadow DOM)\n *\n * Co-located with the component for better maintainability.\n */\n\nimport { css } from 'lit';\n\nexport const wfOptionsStyles = css`\n :host {\n display: grid;\n box-sizing: border-box;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n /* Width classes inherited from WfLayout */\n :host(.wf-layout--width-full) {\n width: 100%;\n }\n\n :host(.wf-layout--width-auto) {\n width: auto;\n }\n\n :host(.wf-layout--width-fit) {\n width: fit-content;\n }\n\n /* Error wrapper for animated expand/collapse */\n .wf-error-wrapper {\n grid-column: 1 / -1;\n order: 1000;\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 200ms ease-out;\n }\n\n .wf-error-wrapper.wf-has-error {\n grid-template-rows: 1fr;\n }\n\n .wf-error-message {\n overflow: hidden;\n min-height: 0;\n font-size: var(--wf-font-size-sm);\n color: var(--wf-color-error);\n opacity: 0;\n transform: translateY(-4px);\n transition: opacity 200ms ease-out, transform 200ms ease-out;\n }\n\n .wf-has-error .wf-error-message {\n margin-top: var(--wf-spacing-2);\n opacity: 1;\n transform: translateY(0);\n }\n\n /* Slotted wf-other spans full width and appears after options */\n ::slotted(wf-other) {\n grid-column: 1 / -1;\n order: 999;\n }\n`;\n","/**\n * Styles for wf-other component (Shadow DOM)\n *\n * Co-located with the component for better maintainability.\n */\n\nimport { css } from 'lit';\n\nexport const wfOtherStyles = css`\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .wf-other-container {\n margin-top: var(--wf-spacing-4);\n }\n\n .wf-other-label {\n display: block;\n margin-bottom: var(--wf-spacing-2);\n font-size: var(--wf-font-size-sm);\n font-weight: var(--wf-font-weight-label);\n color: var(--wf-color-text);\n }\n\n .wf-other-label span {\n font-weight: var(--wf-font-weight-input);\n color: var(--wf-color-text-muted);\n }\n\n .wf-other-input-wrapper {\n display: flex;\n align-items: center;\n gap: var(--wf-spacing-3);\n height: var(--wf-input-min-height);\n background: var(--wf-glass-bg);\n backdrop-filter: blur(var(--wf-glass-blur));\n -webkit-backdrop-filter: blur(var(--wf-glass-blur));\n border: 1px solid var(--wf-glass-border);\n border-radius: var(--wf-radius-md);\n box-shadow: var(--wf-glass-shadow);\n padding-left: var(--wf-spacing-3);\n padding-right: var(--wf-spacing-2);\n transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;\n }\n\n .wf-other-input-wrapper:focus-within {\n border-color: var(--wf-color-primary);\n box-shadow: 0 0 0 var(--wf-focus-ring-width) var(--wf-focus-ring-primary);\n }\n\n .wf-other-input {\n flex: 1;\n min-height: calc(var(--wf-input-min-height) - 2px);\n padding: var(--wf-spacing-3);\n padding-left: 0;\n font-size: var(--wf-font-size-base);\n font-weight: var(--wf-font-weight-input);\n color: var(--wf-color-text);\n background: transparent;\n border: none;\n outline: none;\n box-sizing: border-box;\n }\n\n .wf-other-input::placeholder {\n color: var(--wf-color-text-muted);\n font-weight: var(--wf-font-weight-input);\n }\n\n .wf-other-actions {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex-shrink: 0;\n opacity: 0;\n visibility: hidden;\n transition: opacity 200ms ease, visibility 200ms ease;\n }\n\n /* Show button when input has value */\n .wf-other-input-wrapper.has-value .wf-other-actions {\n opacity: 1;\n visibility: visible;\n }\n\n /* Button inside input box should not stretch */\n .wf-other-actions ::slotted(*) {\n width: auto;\n }\n`;\n","/**\n * WF-Other - Composable \"Others\" input for wf-options\n *\n * Placed INSIDE <wf-options> as a composable child.\n * Contains a text input and a slot for inline buttons.\n * Dispatches 'wf-other-change' event for wf-options to handle.\n *\n * @example\n * <wf-options name=\"industry\" other-name=\"industry_other\">\n * <wf-option value=\"tech\">Technology</wf-option>\n * <wf-option value=\"finance\">Finance</wf-option>\n *\n * <wf-other label=\"Others, please specify:\">\n * <wf-next-btn inline label=\"Next →\"></wf-next-btn>\n * </wf-other>\n * </wf-options>\n */\n\nimport { LitElement, html, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\n\n// Import wf-badge for shortcut display\nimport './wf-badge.js';\n// Import wf-layout for grid composition\nimport './wf-layout.js';\n\n// Co-located styles (Shadow DOM)\nimport { wfOtherStyles } from './wf-other.styles.js';\n\nexport interface OtherChangeDetail {\n value: string;\n name?: string;\n}\n\n@customElement('wf-other')\nexport class WfOther extends LitElement {\n static styles = wfOtherStyles;\n\n // ============================================\n // Properties\n // ============================================\n\n /**\n * Label text (default: \"Others, please specify:\")\n */\n @property({ type: String })\n label = 'Others, please specify:';\n\n /**\n * Optional hint text shown after the label\n */\n @property({ type: String, attribute: 'label-hint' })\n labelHint?: string;\n\n /**\n * Input placeholder\n */\n @property({ type: String })\n placeholder = '';\n\n /**\n * Field name for \"other\" value (optional, wf-options can auto-derive)\n */\n @property({ type: String })\n name?: string;\n\n /**\n * Value to use for the parent field when this \"Other\" input is active.\n * Defaults to \"Others\" if not specified.\n * @example <wf-other parent-value=\"Other\" label=\"Other:\"></wf-other>\n */\n @property({ type: String, attribute: 'parent-value' })\n parentValue = 'Others';\n\n /**\n * Make input required when visible\n */\n @property({ type: Boolean })\n required = false;\n\n /**\n * Disabled state\n */\n @property({ type: Boolean })\n disabled = false;\n\n /**\n * Keyboard shortcut (set by parent wf-options)\n */\n @property({ type: String })\n shortcut = '';\n\n // ============================================\n // Internal State\n // ============================================\n\n @state()\n private _value = '';\n\n // ============================================\n // Public API\n // ============================================\n\n /**\n * Get current value\n */\n get value(): string {\n return this._value;\n }\n\n /**\n * Set value\n */\n set value(val: string) {\n this._value = val;\n }\n\n /**\n * Clear the input value\n */\n clear(): void {\n this._value = '';\n this._notifyChange();\n }\n\n /**\n * Focus the input\n */\n focusInput(): void {\n const input = this.shadowRoot?.querySelector<HTMLInputElement>('.wf-other-input');\n input?.focus();\n }\n\n // ============================================\n // Event Handlers\n // ============================================\n\n private _handleInput = (e: Event): void => {\n const input = e.target as HTMLInputElement;\n this._value = input.value;\n this._notifyChange();\n };\n\n private _notifyChange(): void {\n this.dispatchEvent(\n new CustomEvent<OtherChangeDetail>('wf-other-change', {\n detail: {\n value: this._value,\n name: this.name,\n },\n bubbles: true,\n composed: true,\n })\n );\n }\n\n // ============================================\n // Render\n // ============================================\n\n override render() {\n const hasValue = this._value.trim().length > 0;\n\n return html`\n <div class=\"wf-other-container\" data-testid=\"wf-other\">\n <label class=\"wf-other-label\">\n ${this.label}\n ${this.labelHint ? html`<span>${this.labelHint}</span>` : nothing}\n </label>\n <div class=\"wf-other-input-wrapper ${hasValue ? 'has-value' : ''}\">\n ${this.shortcut ? html`<wf-badge shortcut=\"${this.shortcut}\"></wf-badge>` : nothing}\n <input\n type=\"text\"\n class=\"wf-other-input\"\n placeholder=\"${this.placeholder}\"\n .value=\"${this._value}\"\n ?disabled=\"${this.disabled}\"\n ?required=\"${this.required}\"\n @input=\"${this._handleInput}\"\n data-testid=\"wf-other-input\"\n />\n <!-- Slot for action buttons (like wf-next-btn) inside input -->\n <div class=\"wf-other-actions\">\n <slot></slot>\n </div>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-other': WfOther;\n }\n}\n","/**\n * WF-Options - Option group component for wizard forms\n *\n * Manages a group of wf-option elements with single/multi-select support.\n * Auto-assigns keyboard shortcuts to child options.\n *\n * @example\n * <!-- Single select (default) -->\n * <wf-options name=\"role\" required>\n * <wf-option value=\"developer\">Developer</wf-option>\n * <wf-option value=\"designer\">Designer</wf-option>\n * </wf-options>\n *\n * <!-- Multi-select with constraints -->\n * <wf-options name=\"interests\" multi required min=\"1\" max=\"3\">\n * <wf-option value=\"ai\">AI</wf-option>\n * <wf-option value=\"web\">Web</wf-option>\n * <wf-option value=\"mobile\">Mobile</wf-option>\n * </wf-options>\n */\n\nimport { html, type CSSResultGroup } from 'lit';\nimport { customElement, property, state, query } from 'lit/decorators.js';\n\nimport type { WfOption, OptionSelectDetail } from './wf-option.js';\nimport type { WfOther, OtherChangeDetail } from './wf-other.js';\nimport { WfLayout, LayoutMode } from './wf-layout.js';\nimport { wfOptionsStyles } from './wf-options.styles.js';\nimport './wf-badge.js';\nimport './wf-other.js';\n\n// Event detail types\nexport interface OptionsChangeDetail {\n name: string;\n value: string | string[];\n selected: string[];\n /** Extra fields for dual-field submission (e.g., \"Other\" with custom text) */\n extraFields?: Record<string, unknown>;\n}\n\n@customElement('wf-options')\nexport class WfOptions extends WfLayout {\n // Override styles to add wf-options specific styles\n static override styles: CSSResultGroup = [WfLayout.styles, wfOptionsStyles];\n\n /**\n * Slot reference for discovering options\n */\n @query('slot:not([name])')\n private _defaultSlot!: HTMLSlotElement;\n\n /**\n * Override layout mode to grid by default\n */\n @property({ type: String })\n override mode: LayoutMode = 'grid';\n\n /**\n * Override gap to 16px (md) by default for options grid\n */\n @property({ type: String })\n override gap = 'md';\n\n /**\n * Field name for form data\n */\n @property({ type: String })\n name = '';\n\n /**\n * Enable multi-select mode\n */\n @property({ type: Boolean })\n multi = false;\n\n /**\n * Whether selection is required\n */\n @property({ type: Boolean })\n required = false;\n\n /**\n * Minimum selections required (multi-select only)\n */\n @property({ type: Number })\n min = 0;\n\n /**\n * Maximum selections allowed (multi-select only, 0 = unlimited)\n */\n @property({ type: Number })\n max = 0;\n\n /**\n * Number of grid columns (2 by default)\n * Override type to match WfLayout's string type\n */\n @property({ type: String, reflect: true })\n override columns = '2';\n\n /**\n * Currently selected values\n */\n @state()\n private _selected: Set<string> = new Set();\n\n /**\n * Value of the \"Other\" text input\n */\n @state()\n private _otherValue = '';\n\n /**\n * Validation error message\n */\n @state()\n private _errorMessage = '';\n\n /**\n * Whether validation has been activated (after first Next press)\n */\n private _validationActivated = false;\n\n /**\n * Child option elements\n */\n private _options: WfOption[] = [];\n\n /**\n * Keyboard shortcut map (key -> option)\n */\n private _shortcutMap: Map<string, WfOption> = new Map();\n\n /**\n * Reference to composable wf-other child (if present)\n */\n private _composableOther: WfOther | null = null;\n\n connectedCallback(): void {\n super.connectedCallback();\n // Ensure clean state on mount\n this._errorMessage = '';\n this._validationActivated = false;\n // Listen for option selection events\n this.addEventListener('wf-option-select', this._handleOptionSelect as EventListener);\n // Listen for composable wf-other-change events\n this.addEventListener('wf-other-change', this._handleComposableOtherChange as EventListener);\n // Listen for keyboard events at document level so shortcuts work globally\n document.addEventListener('keydown', this._handleKeydown);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener('wf-option-select', this._handleOptionSelect as EventListener);\n this.removeEventListener('wf-other-change', this._handleComposableOtherChange as EventListener);\n document.removeEventListener('keydown', this._handleKeydown);\n }\n\n firstUpdated(changedProperties: Map<string, unknown>): void {\n // Call parent to ensure layout styles are applied\n super.firstUpdated(changedProperties);\n\n // Detect composable wf-other child from slotted elements\n const slottedElements = this._defaultSlot?.assignedElements({ flatten: true }) || [];\n const foundOther = slottedElements.find(\n (el) => el.tagName.toLowerCase() === 'wf-other'\n );\n this._composableOther = foundOther ? (foundOther as WfOther) : null;\n\n this._discoverOptions();\n\n // Force re-render to ensure _otherShortcut badge appears\n this.requestUpdate();\n }\n\n /**\n * Check if this component has a composable wf-other child\n */\n private _hasComposableOther(): boolean {\n return this._composableOther !== null;\n }\n\n updated(changedProperties: Map<string, unknown>): void {\n // Call parent to apply layout styles\n super.updated(changedProperties);\n\n if (changedProperties.has('multi') || changedProperties.has('max')) {\n // Just update option states, don't validate (lazy validation)\n this._updateOptionStates();\n }\n }\n\n render() {\n // Apply layout styles to host element (inherited from WfLayout)\n super.updated(new Map());\n\n // Set ARIA attributes on host\n this.setAttribute('role', 'listbox');\n this.setAttribute('aria-multiselectable', String(this.multi));\n this.setAttribute('aria-required', String(this.required));\n\n // Shadow DOM: slot for wf-option children\n return html`\n <slot @slotchange=\"${this._handleSlotChange}\"></slot>\n <div class=\"wf-error-wrapper ${this._errorMessage ? 'wf-has-error' : ''}\">\n <span class=\"wf-error-message\" role=\"alert\" aria-live=\"polite\" data-testid=\"wf-error\">\n ${this._errorMessage || ''}\n </span>\n </div>\n `;\n }\n\n /**\n * Handle slot content changes to rediscover options\n */\n private _handleSlotChange(): void {\n // Update composable wf-other reference\n const slottedElements = this._defaultSlot?.assignedElements({ flatten: true }) || [];\n const foundOther = slottedElements.find(\n (el) => el.tagName.toLowerCase() === 'wf-other'\n );\n this._composableOther = foundOther ? (foundOther as WfOther) : null;\n\n // Rediscover options\n this._discoverOptions();\n }\n\n /**\n * Handle change events from composable wf-other child\n */\n private _handleComposableOtherChange = (e: CustomEvent<OtherChangeDetail>): void => {\n e.stopPropagation();\n this._otherValue = e.detail.value;\n\n // When typing in \"Others\", deselect any selected options (mutually exclusive)\n if (this._otherValue.trim() && this._selected.size > 0) {\n this._selected.clear();\n this._updateOptionStates();\n }\n\n this._dispatchChange();\n };\n\n private _discoverOptions(): void {\n // Shadow DOM: Get wf-option children from slot's assigned elements\n const slottedElements = this._defaultSlot?.assignedElements({ flatten: true }) || [];\n this._options = slottedElements.filter(\n (el) => el.tagName.toLowerCase() === 'wf-option'\n ) as WfOption[];\n\n // Assign keyboard shortcuts (A, B, C, etc.)\n this._shortcutMap.clear();\n this._options.forEach((option, index) => {\n if (index < 26) {\n const shortcut = String.fromCharCode(65 + index); // A, B, C...\n option.shortcut = shortcut;\n this._shortcutMap.set(shortcut, option);\n }\n\n // Restore selected state if value is in _selected\n option.setSelected(this._selected.has(option.value));\n });\n\n // Assign shortcut to composable wf-other child\n if (this._composableOther && this._options.length < 26) {\n const otherShortcut = String.fromCharCode(65 + this._options.length);\n this._composableOther.shortcut = otherShortcut;\n }\n }\n\n private _handleOptionSelect = (e: CustomEvent<OptionSelectDetail>): void => {\n // Skip if this is a forwarded event (already processed, just bubbling to wizard-form)\n if ((e.detail as OptionSelectDetail & { forwarded?: boolean }).forwarded) {\n return;\n }\n\n e.stopPropagation();\n const { value } = e.detail;\n this._selectValue(value);\n\n // Re-dispatch for wizard-form auto-advance (single-select only)\n if (!this.multi) {\n this.dispatchEvent(\n new CustomEvent('wf-option-select', {\n detail: { ...e.detail, forwarded: true },\n bubbles: true,\n composed: true,\n })\n );\n }\n };\n\n private _selectValue(value: string): void {\n if (this.multi) {\n this._handleMultiSelect(value);\n } else {\n this._handleSingleSelect(value);\n }\n\n // When selecting an option, clear the \"Others\" text (mutually exclusive)\n if (this._otherValue) {\n this._otherValue = '';\n // Also clear composable wf-other if present\n if (this._composableOther) {\n this._composableOther.clear();\n }\n }\n\n this._updateOptionStates();\n this._validateSelection();\n this._dispatchChange();\n }\n\n private _handleSingleSelect(value: string): void {\n // Clear previous selection and select new\n this._selected.clear();\n this._selected.add(value);\n }\n\n private _handleMultiSelect(value: string): void {\n if (this._selected.has(value)) {\n // Deselect\n this._selected.delete(value);\n } else {\n // Check max constraint\n if (this.max > 0 && this._selected.size >= this.max) {\n // At max capacity, don't add more\n return;\n }\n this._selected.add(value);\n }\n }\n\n private _updateOptionStates(): void {\n this._options.forEach((option) => {\n option.setSelected(this._selected.has(option.value));\n });\n }\n\n /**\n * Silent validation check (no side effects)\n */\n private _checkValidation(): boolean {\n // Check for \"Others\" text from composable wf-other\n const hasOtherValue = this._hasComposableOther() && this._otherValue.trim();\n const hasSelection = this._selected.size > 0 || hasOtherValue;\n\n if (this.required && !hasSelection) {\n return false;\n }\n\n if (this.multi) {\n if (this.min > 0 && this._selected.size < this.min && !hasOtherValue) {\n return false;\n }\n\n if (this.max > 0 && this._selected.size > this.max) {\n return false;\n }\n }\n\n return true;\n }\n\n /**\n * Validate and show error messages (only when activated)\n */\n private _validateSelection(): boolean {\n // Only show error messages if validation has been activated\n if (!this._validationActivated) {\n // Clear any stale error message\n this._errorMessage = '';\n return this._checkValidation();\n }\n\n this._errorMessage = '';\n\n // Check for \"Others\" text from composable wf-other\n const hasOtherValue = this._hasComposableOther() && this._otherValue.trim();\n const hasSelection = this._selected.size > 0 || hasOtherValue;\n\n if (this.required && !hasSelection) {\n this._errorMessage = this._hasComposableOther()\n ? 'Please select an option or specify in the text field'\n : 'Please select an option';\n return false;\n }\n\n if (this.multi) {\n if (this.min > 0 && this._selected.size < this.min && !hasOtherValue) {\n this._errorMessage = `Please select at least ${this.min} option${this.min > 1 ? 's' : ''}`;\n return false;\n }\n\n if (this.max > 0 && this._selected.size > this.max) {\n this._errorMessage = `Please select at most ${this.max} option${this.max > 1 ? 's' : ''}`;\n return false;\n }\n }\n\n return true;\n }\n\n private _dispatchChange(): void {\n const selectedArray = Array.from(this._selected);\n\n const detail: OptionsChangeDetail = {\n name: this.name,\n value: this.value,\n selected: selectedArray,\n };\n\n // Add extraFields for composable wf-other\n if (this._hasComposableOther() && this._otherValue.trim() && this._selected.size === 0) {\n const otherName = this._composableOther?.name || `${this.name}_other`;\n detail.extraFields = {\n [otherName]: this._otherValue,\n };\n // Use wf-other's parentValue attribute for parent field (defaults to \"Others\")\n detail.value = this._composableOther?.parentValue || 'Others';\n }\n\n this.dispatchEvent(\n new CustomEvent('wf-change', {\n detail,\n bubbles: true,\n composed: true,\n })\n );\n }\n\n private _handleKeydown = (e: KeyboardEvent): void => {\n // Only handle shortcuts if this component is in the active step\n const parentStep = this.closest('wf-step');\n if (!parentStep || !parentStep.hasAttribute('active')) {\n return;\n }\n\n // Don't handle A-Z shortcuts if user is typing in an input field\n // Use composedPath to get actual target (works with Shadow DOM)\n const path = e.composedPath();\n const actualTarget = path[0] as HTMLElement;\n if (actualTarget?.tagName === 'INPUT' || actualTarget?.tagName === 'TEXTAREA') {\n return;\n }\n\n // Handle A-Z keys for shortcuts\n const key = e.key.toUpperCase();\n if (key.length === 1 && key >= 'A' && key <= 'Z') {\n // Check if this is the composable wf-other shortcut\n if (this._composableOther && key === this._composableOther.shortcut) {\n e.preventDefault();\n this._composableOther.focusInput();\n return;\n }\n\n const option = this._shortcutMap.get(key);\n if (option && !option.disabled) {\n e.preventDefault();\n option.triggerSelect();\n }\n }\n };\n\n // ============================================\n // Public API\n // ============================================\n\n /**\n * Get current value (string for single, array for multi)\n * If wf-other child is present and has text, returns the custom text\n */\n get value(): string | string[] {\n // If \"Others\" text has value and no options selected, return the custom text\n if (this._hasComposableOther() && this._otherValue.trim() && this._selected.size === 0) {\n return this.multi ? [this._otherValue] : this._otherValue;\n }\n\n const selectedArray = Array.from(this._selected);\n\n if (this.multi) {\n return selectedArray;\n }\n\n // For single-select\n return selectedArray[0] ?? '';\n }\n\n /**\n * Set value programmatically\n */\n set value(val: string | string[]) {\n this._selected.clear();\n\n if (Array.isArray(val)) {\n val.forEach((v) => this._selected.add(v));\n } else if (val) {\n this._selected.add(val);\n }\n\n this._updateOptionStates();\n this._validateSelection();\n }\n\n /**\n * Get selected values as array\n */\n getSelected(): string[] {\n return Array.from(this._selected);\n }\n\n /**\n * Check if option is selected\n */\n isSelected(value: string): boolean {\n return this._selected.has(value);\n }\n\n /**\n * Select an option by value\n */\n select(value: string): void {\n this._selectValue(value);\n }\n\n /**\n * Deselect an option by value\n */\n deselect(value: string): void {\n if (this._selected.has(value)) {\n this._selected.delete(value);\n this._updateOptionStates();\n this._validateSelection();\n this._dispatchChange();\n }\n }\n\n /**\n * Clear all selections\n */\n clear(): void {\n this._selected.clear();\n this._updateOptionStates();\n this._validateSelection();\n this._dispatchChange();\n }\n\n /**\n * Validate current selection\n */\n validate(): boolean {\n // Activate validation mode (enables showing error messages)\n this._validationActivated = true;\n return this._validateSelection();\n }\n\n /**\n * Check if selection is valid (no side effects)\n */\n get isValid(): boolean {\n return this._checkValidation();\n }\n\n /**\n * Show error message\n */\n showError(message: string): void {\n this._errorMessage = message;\n }\n\n /**\n * Clear error message\n */\n clearError(): void {\n this._errorMessage = '';\n }\n\n /**\n * Focus first option\n */\n focus(): void {\n this._options[0]?.focus();\n }\n\n /**\n * Reset to initial state\n */\n reset(): void {\n this._selected.clear();\n this._otherValue = '';\n this._errorMessage = '';\n this._validationActivated = false;\n\n // Clear composable wf-other if present\n if (this._composableOther) {\n this._composableOther.clear();\n }\n\n // Restore any pre-selected options from attributes\n this._options.forEach((option) => {\n if (option.hasAttribute('selected')) {\n this._selected.add(option.value);\n }\n option.setSelected(this._selected.has(option.value));\n });\n\n this._dispatchChange();\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-options': WfOptions;\n }\n}\n","/**\n * WF-Option styles for Shadow DOM\n */\n\nimport { css } from 'lit';\n\nexport const wfOptionStyles = css`\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .wf-option-card {\n display: flex;\n align-items: center;\n gap: var(--wf-spacing-3);\n width: 100%;\n min-height: var(--wf-input-min-height);\n padding: var(--wf-spacing-3);\n background: var(--wf-glass-bg);\n backdrop-filter: blur(var(--wf-glass-blur));\n -webkit-backdrop-filter: blur(var(--wf-glass-blur));\n border: 1px solid var(--wf-glass-border);\n border-radius: var(--wf-radius-md);\n box-shadow: var(--wf-glass-shadow);\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n font-size: var(--wf-font-size-base);\n font-weight: var(--wf-font-weight-input);\n color: var(--wf-color-text);\n transition: border-color 150ms ease, background 150ms ease, transform 100ms ease;\n outline: none;\n box-sizing: border-box;\n }\n\n .wf-option-card:hover:not(:disabled) {\n border-color: var(--wf-color-primary);\n background: var(--wf-glass-bg-hover);\n }\n\n .wf-option-card:focus-visible {\n border-color: var(--wf-color-primary);\n box-shadow: 0 0 0 var(--wf-focus-ring-width) var(--wf-focus-ring-primary);\n }\n\n .wf-option-card[aria-selected='true'] {\n border-color: var(--wf-color-primary);\n background-color: var(--wf-color-primary-light);\n }\n\n .wf-option-card:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .wf-option-card:active:not(:disabled) {\n transform: scale(0.98);\n }\n\n .wf-option-card.selecting {\n animation: wf-blink 0.3s ease;\n }\n\n @keyframes wf-blink {\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.5;\n }\n }\n\n .wf-option-content {\n flex: 1;\n min-width: 0;\n }\n\n /* Slotted content styling */\n ::slotted(strong),\n ::slotted(h3),\n ::slotted(h4) {\n display: block;\n font-weight: var(--wf-font-weight-heading);\n margin: 0;\n }\n\n ::slotted(span),\n ::slotted(p) {\n display: block;\n font-size: var(--wf-font-size-sm);\n color: var(--wf-color-text-muted);\n margin: var(--wf-spacing-1) 0 0 0;\n }\n`;\n","/**\n * WF-Option - Individual option component for wizard forms\n *\n * A selectable option card with slot content and auto-injected shortcut badge.\n *\n * @example\n * <wf-option value=\"developer\">\n * <strong>Developer</strong>\n * <span>I write code</span>\n * </wf-option>\n */\n\nimport { LitElement, html, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\n\nimport { wfOptionStyles } from './wf-option.styles.js';\n\n// Import wf-badge for shortcut display\nimport './wf-badge.js';\n\n// Event detail types\nexport interface OptionSelectDetail {\n value: string;\n selected: boolean;\n}\n\n@customElement('wf-option')\nexport class WfOption extends LitElement {\n static styles = wfOptionStyles;\n\n /**\n * The value associated with this option (required)\n */\n @property({ type: String })\n value = '';\n\n /**\n * Whether this option is selected\n */\n @property({ type: Boolean, reflect: true })\n selected = false;\n\n /**\n * Whether this option is disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * The keyboard shortcut key for this option (auto-assigned by parent)\n */\n @property({ type: String })\n shortcut = '';\n\n /**\n * Internal state for selection animation\n */\n @state()\n private _selecting = false;\n\n render() {\n return html`\n <button\n class=\"wf-option-card ${this._selecting ? 'selecting' : ''}\"\n role=\"option\"\n aria-selected=\"${this.selected}\"\n ?disabled=\"${this.disabled}\"\n data-testid=\"wf-option-btn\"\n @click=\"${this._handleClick}\"\n >\n ${this.shortcut\n ? html`<wf-badge\n shortcut=\"${this.shortcut}\"\n variant=\"${this.selected ? 'selected' : 'default'}\"\n ></wf-badge>`\n : nothing}\n <div class=\"wf-option-content\">\n <slot></slot>\n </div>\n </button>\n `;\n }\n\n private _handleClick(e: Event): void {\n if (this.disabled) {\n e.preventDefault();\n return;\n }\n\n this._triggerSelect();\n }\n\n /**\n * Programmatically trigger selection (used by keyboard shortcuts)\n */\n triggerSelect(): void {\n if (!this.disabled) {\n this._triggerSelect();\n }\n }\n\n private _triggerSelect(): void {\n // Start selection animation\n this._selecting = true;\n\n // Dispatch selection event\n const detail: OptionSelectDetail = {\n value: this.value,\n selected: !this.selected, // Toggle for multi-select, parent handles logic\n };\n\n this.dispatchEvent(\n new CustomEvent('wf-option-select', {\n detail,\n bubbles: true,\n composed: true,\n })\n );\n\n // Clear animation after it completes\n setTimeout(() => {\n this._selecting = false;\n }, 300);\n }\n\n /**\n * Focus the option button\n */\n focus(): void {\n const button = this.shadowRoot?.querySelector('button');\n button?.focus();\n }\n\n /**\n * Set selected state programmatically\n */\n setSelected(selected: boolean): void {\n this.selected = selected;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-option': WfOption;\n }\n}\n","/**\n * Shared styles for all form input components (FormInputBase children)\n *\n * Used by: wf-input, wf-email, wf-textarea, wf-field, wf-number\n */\n\nimport { css } from 'lit';\n\nexport const formInputBaseStyles = css`\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .wf-field-container {\n display: flex;\n flex-direction: column;\n }\n\n .wf-label {\n font-size: var(--wf-font-size-sm);\n font-weight: var(--wf-font-weight-label);\n color: var(--wf-color-text);\n margin-bottom: var(--wf-spacing-2);\n }\n\n .wf-label-required::after {\n content: ' *';\n color: var(--wf-color-error);\n }\n\n /* Error wrapper for animated expand/collapse */\n .wf-error-wrapper {\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 200ms ease-out;\n }\n\n .wf-error-wrapper.wf-has-error {\n grid-template-rows: 1fr;\n }\n\n .wf-error-message {\n overflow: hidden;\n min-height: 0;\n font-size: var(--wf-font-size-sm);\n color: var(--wf-color-error);\n opacity: 0;\n transform: translateY(-4px);\n transition: opacity 200ms ease-out, transform 200ms ease-out;\n }\n\n .wf-has-error .wf-error-message {\n margin-top: var(--wf-spacing-2);\n opacity: 1;\n transform: translateY(0);\n }\n\n .wf-hint {\n font-size: var(--wf-font-size-sm);\n color: var(--wf-color-text-muted);\n margin-top: var(--wf-spacing-2);\n }\n\n .wf-input {\n width: 100%;\n min-height: var(--wf-input-min-height);\n padding: var(--wf-spacing-4);\n font-size: var(--wf-font-size-base);\n font-weight: var(--wf-font-weight-input);\n font-family: inherit;\n background: var(--wf-glass-bg);\n backdrop-filter: blur(var(--wf-glass-blur));\n -webkit-backdrop-filter: blur(var(--wf-glass-blur));\n border: 1px solid var(--wf-glass-border);\n border-radius: var(--wf-radius-md);\n box-shadow: var(--wf-glass-shadow);\n color: var(--wf-color-text);\n transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;\n outline: none;\n box-sizing: border-box;\n }\n\n .wf-input::placeholder {\n color: var(--wf-color-text-muted);\n font-weight: var(--wf-font-weight-input);\n }\n\n .wf-input:focus {\n border-color: var(--wf-color-primary);\n box-shadow: 0 0 0 var(--wf-focus-ring-width) var(--wf-focus-ring-primary);\n }\n\n .wf-input:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .wf-input.wf-input-error {\n border-color: var(--wf-color-error);\n }\n\n .wf-input.wf-input-error:focus {\n box-shadow: 0 0 0 var(--wf-focus-ring-width) var(--wf-focus-ring-error);\n }\n\n /* Textarea-specific styles */\n .wf-textarea {\n width: 100%;\n padding: var(--wf-spacing-4);\n font-size: var(--wf-font-size-base);\n font-family: inherit;\n background: var(--wf-glass-bg);\n backdrop-filter: blur(var(--wf-glass-blur));\n -webkit-backdrop-filter: blur(var(--wf-glass-blur));\n border: 1px solid var(--wf-glass-border);\n border-radius: var(--wf-radius-lg);\n box-shadow: var(--wf-glass-shadow);\n color: var(--wf-color-text);\n transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;\n outline: none;\n box-sizing: border-box;\n resize: vertical;\n min-height: var(--wf-textarea-min-height);\n }\n\n .wf-textarea::placeholder {\n color: var(--wf-color-text-muted);\n }\n\n .wf-textarea:focus {\n border-color: var(--wf-color-primary);\n box-shadow: 0 0 0 var(--wf-focus-ring-width) var(--wf-focus-ring-primary);\n }\n\n .wf-textarea:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .wf-textarea.wf-textarea-error {\n border-color: var(--wf-color-error);\n }\n\n .wf-textarea.wf-textarea-error:focus {\n box-shadow: 0 0 0 var(--wf-focus-ring-width) var(--wf-focus-ring-error);\n }\n\n .wf-char-count {\n font-size: var(--wf-font-size-sm);\n color: var(--wf-color-text-muted);\n text-align: right;\n }\n\n .wf-char-count.wf-char-limit {\n color: var(--wf-color-error);\n }\n\n /* wf-field slotted input styles */\n .wf-input-wrapper {\n position: relative;\n }\n\n /* Number input - hide spinners */\n .wf-input::-webkit-outer-spin-button,\n .wf-input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n .wf-input[type='number'] {\n -moz-appearance: textfield;\n }\n`;\n","/**\n * FormInputBase - Abstract base class for form input components\n *\n * Provides shared validation, event handling, and state management for:\n * - wf-input\n * - wf-email\n * - wf-textarea\n * - wf-field\n *\n * Subclasses must implement:\n * - _setupValidators(): Configure validators based on component properties\n * - _getValidationTriggerProperties(): Return property names that trigger validator rebuild\n * - render(): Render the component-specific template\n *\n * Subclasses may override:\n * - _getDebounceMs(): Return debounce delay for input validation (default: 600ms)\n * - _getFocusableElement(): Return the focusable element (default: 'input')\n */\n\nimport { LitElement, CSSResultGroup, html, nothing, TemplateResult } from 'lit';\nimport { property, state } from 'lit/decorators.js';\n\nimport { formInputBaseStyles } from './form-input-base.styles.js';\nimport type { Validator } from '../../types.js';\n\n/**\n * Default debounce delay for input validation (in milliseconds)\n */\nconst DEFAULT_DEBOUNCE_MS = 600;\n\n/**\n * Abstract base class for form input components\n */\nexport abstract class FormInputBase extends LitElement {\n /**\n * Base styles for all form input components\n * Subclasses can extend by providing their own static styles array\n */\n static styles: CSSResultGroup = formInputBaseStyles;\n\n // ============================================\n // Common Properties\n // ============================================\n\n /**\n * Field name for form data\n */\n @property({ type: String })\n name = '';\n\n /**\n * Label text\n */\n @property({ type: String })\n label = '';\n\n /**\n * Whether field is required\n */\n @property({ type: Boolean })\n required = false;\n\n /**\n * Hint text displayed below the input\n */\n @property({ type: String })\n hint = '';\n\n // ============================================\n // Internal State\n // ============================================\n\n /**\n * Validation error message (displayed to user)\n */\n @state()\n protected _errorMessage = '';\n\n /**\n * Current field value\n */\n @state()\n protected _value = '';\n\n /**\n * Whether validation has been activated (after first validation attempt)\n * When true, input changes trigger debounced validation\n */\n protected _validationActivated = false;\n\n /**\n * Debounce timer for input validation\n */\n protected _debounceTimer: ReturnType<typeof setTimeout> | null = null;\n\n /**\n * Array of validators for this field\n */\n protected _validators: Validator[] = [];\n\n // ============================================\n // Lifecycle Methods\n // ============================================\n\n connectedCallback(): void {\n super.connectedCallback();\n this._setupValidators();\n }\n\n updated(changedProperties: Map<string, unknown>): void {\n const triggerProps = this._getValidationTriggerProperties();\n const shouldRebuild = triggerProps.some((prop) => changedProperties.has(prop));\n if (shouldRebuild) {\n this._setupValidators();\n }\n }\n\n // ============================================\n // Abstract Methods (must be implemented by subclasses)\n // ============================================\n\n /**\n * Setup validators based on component properties.\n * Called on connectedCallback and when validation-triggering properties change.\n */\n protected abstract _setupValidators(): void;\n\n /**\n * Return property names that should trigger validator rebuild when changed.\n * At minimum, should include 'required'.\n */\n protected abstract _getValidationTriggerProperties(): string[];\n\n // ============================================\n // Overridable Methods\n // ============================================\n\n /**\n * Return the debounce delay for input validation (in milliseconds).\n * Override in subclasses that need different debounce timing.\n */\n protected _getDebounceMs(): number {\n return DEFAULT_DEBOUNCE_MS;\n }\n\n /**\n * Return the CSS selector for the focusable element.\n * Override in subclasses with different focusable elements (e.g., 'textarea').\n */\n protected _getFocusableSelector(): string {\n return 'input';\n }\n\n // ============================================\n // Shared Render Helpers\n // ============================================\n\n /**\n * Render the label element\n */\n protected _renderLabel(): TemplateResult | typeof nothing {\n if (!this.label) {return nothing;}\n return html`<label\n class=\"wf-label ${this.required ? 'wf-label-required' : ''}\"\n for=\"${this.name}\"\n data-testid=\"wf-label\"\n >${this.label}</label>`;\n }\n\n /**\n * Render the hint text (only shown when no error)\n */\n protected _renderHint(): TemplateResult | typeof nothing {\n if (!this.hint || this._errorMessage) {return nothing;}\n return html`<span class=\"wf-hint\">${this.hint}</span>`;\n }\n\n /**\n * Render the error message container with animation support\n */\n protected _renderError(): TemplateResult {\n return html`<div class=\"wf-error-wrapper ${this._errorMessage ? 'wf-has-error' : ''}\">\n <span class=\"wf-error-message\" role=\"alert\" aria-live=\"polite\" data-testid=\"wf-error\">\n ${this._errorMessage || ''}\n </span>\n </div>`;\n }\n\n // ============================================\n // Event Handlers\n // ============================================\n\n /**\n * Handle input events with debounced validation\n */\n protected _handleInput = (e: Event): void => {\n const target = e.target as HTMLInputElement | HTMLTextAreaElement;\n this._value = target.value;\n\n // Debounced validation after activation\n if (this._validationActivated) {\n if (this._debounceTimer) {\n clearTimeout(this._debounceTimer);\n }\n this._debounceTimer = setTimeout(() => {\n this.validate();\n }, this._getDebounceMs());\n }\n\n // Dispatch change event\n this.dispatchEvent(\n new CustomEvent('wf-change', {\n detail: {\n name: this.name,\n value: this._value,\n },\n bubbles: true,\n composed: true,\n })\n );\n };\n\n /**\n * Handle blur events\n */\n protected _handleBlur = (): void => {\n this.dispatchEvent(\n new CustomEvent('wf-blur', {\n detail: { name: this.name, value: this._value },\n bubbles: true,\n composed: true,\n })\n );\n };\n\n /**\n * Handle focus events\n */\n protected _handleFocus = (): void => {\n this.dispatchEvent(\n new CustomEvent('wf-focus', {\n detail: { name: this.name },\n bubbles: true,\n composed: true,\n })\n );\n };\n\n // ============================================\n // Public API\n // ============================================\n\n /**\n * Get current value\n */\n get value(): string {\n return this._value;\n }\n\n /**\n * Set value programmatically\n */\n set value(val: string) {\n this._value = val;\n }\n\n /**\n * Add a custom validator\n */\n addValidator(validator: Validator): void {\n this._validators.push(validator);\n }\n\n /**\n * Validate the field asynchronously\n * @returns Promise resolving to true if valid, false otherwise\n */\n async validate(): Promise<boolean> {\n // Activate validation mode (enables debounced input validation)\n this._validationActivated = true;\n\n // Use getter to allow subclasses to customize value retrieval\n const currentValue = this.value;\n\n for (const validator of this._validators) {\n try {\n const result = await validator.validate(currentValue);\n if (!result.valid) {\n this._errorMessage = result.error ?? validator.message ?? 'Validation failed';\n return false;\n }\n } catch (error) {\n console.error(`[${this.tagName}] Validator error:`, error);\n this._errorMessage = 'Validation error occurred';\n return false;\n }\n }\n\n this._errorMessage = '';\n return true;\n }\n\n /**\n * Check if field is valid synchronously (doesn't update UI)\n */\n get isValid(): boolean {\n // Use getter to allow subclasses to customize value retrieval\n const currentValue = this.value;\n\n for (const validator of this._validators) {\n const result = validator.validate(currentValue);\n if (result instanceof Promise) {\n console.warn(`[${this.tagName}] Async validator called synchronously`);\n continue;\n }\n if (!result.valid) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Show an error message manually\n */\n showError(message: string): void {\n this._errorMessage = message;\n }\n\n /**\n * Clear the error message\n */\n clearError(): void {\n this._errorMessage = '';\n }\n\n /**\n * Focus the input element\n */\n focus(): void {\n const element = this.shadowRoot?.querySelector(this._getFocusableSelector());\n (element as HTMLElement | null)?.focus();\n }\n\n /**\n * Reset field to initial state\n */\n reset(): void {\n this._value = '';\n this._errorMessage = '';\n this._validationActivated = false;\n if (this._debounceTimer) {\n clearTimeout(this._debounceTimer);\n this._debounceTimer = null;\n }\n }\n}\n","/**\n * ValidationController - Validation management for wizard forms\n *\n * Provides built-in validators and custom validator support.\n */\n\nimport type { ReactiveController, ReactiveControllerHost } from 'lit';\n\nimport type { Validator, ValidatorFn, ValidationResult } from '../types.js';\n\n// Default blocked email domains for work email validation\nconst DEFAULT_BLOCKED_DOMAINS = [\n 'gmail.com',\n 'yahoo.com',\n 'hotmail.com',\n 'outlook.com',\n 'aol.com',\n 'icloud.com',\n 'mail.com',\n 'protonmail.com',\n 'zoho.com',\n 'yandex.com',\n 'live.com',\n 'msn.com',\n 'me.com',\n 'inbox.com',\n 'gmx.com',\n];\n\nexport class ValidationController implements ReactiveController {\n host: ReactiveControllerHost;\n\n private _validators: Map<string, Validator[]> = new Map();\n\n constructor(host: ReactiveControllerHost) {\n this.host = host;\n host.addController(this);\n }\n\n // ============================================\n // Lifecycle\n // ============================================\n\n hostConnected(): void {\n // Controller connected\n }\n\n hostDisconnected(): void {\n // Clean up\n this._validators.clear();\n }\n\n // ============================================\n // Validator Management\n // ============================================\n\n addValidator(name: string, validator: Validator): void {\n const existing = this._validators.get(name) ?? [];\n this._validators.set(name, [...existing, validator]);\n }\n\n addValidators(name: string, validators: Validator[]): void {\n validators.forEach((v) => this.addValidator(name, v));\n }\n\n removeValidator(name: string, validatorName: string): void {\n const existing = this._validators.get(name) ?? [];\n this._validators.set(\n name,\n existing.filter((v) => v.name !== validatorName)\n );\n }\n\n clearValidators(name: string): void {\n this._validators.delete(name);\n }\n\n getValidators(name: string): Validator[] {\n return this._validators.get(name) ?? [];\n }\n\n // ============================================\n // Validation Execution\n // ============================================\n\n async validate(name: string, value: unknown): Promise<ValidationResult> {\n const validators = this.getValidators(name);\n\n for (const validator of validators) {\n try {\n const result = await validator.validate(value);\n if (!result.valid) {\n return {\n valid: false,\n error: result.error ?? validator.message ?? 'Validation failed',\n };\n }\n } catch (error) {\n console.error(`[ValidationController] Validator \"${validator.name}\" threw:`, error);\n return {\n valid: false,\n error: 'Validation error occurred',\n };\n }\n }\n\n return { valid: true };\n }\n\n validateSync(name: string, value: unknown): ValidationResult {\n const validators = this.getValidators(name);\n\n for (const validator of validators) {\n const result = validator.validate(value);\n\n // If it's a promise, we can't handle it synchronously\n if (result instanceof Promise) {\n console.warn(`[ValidationController] Async validator \"${validator.name}\" called synchronously`);\n continue;\n }\n\n if (!result.valid) {\n return {\n valid: false,\n error: result.error ?? validator.message ?? 'Validation failed',\n };\n }\n }\n\n return { valid: true };\n }\n\n // ============================================\n // Built-in Validators (Static Factory Methods)\n // ============================================\n\n static required(message = 'This field is required'): Validator {\n return {\n name: 'required',\n message,\n validate: (value: unknown): ValidationResult => {\n if (value === null || value === undefined) {\n return { valid: false, error: message };\n }\n if (typeof value === 'string' && value.trim() === '') {\n return { valid: false, error: message };\n }\n if (Array.isArray(value) && value.length === 0) {\n return { valid: false, error: message };\n }\n return { valid: true };\n },\n };\n }\n\n static email(message = 'Please enter a valid email address'): Validator {\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n\n return {\n name: 'email',\n message,\n validate: (value: unknown): ValidationResult => {\n if (typeof value !== 'string' || value.trim() === '') {\n return { valid: true }; // Let required validator handle empty\n }\n if (!emailRegex.test(value)) {\n return { valid: false, error: message };\n }\n return { valid: true };\n },\n };\n }\n\n static workEmail(\n blockedDomains: string[] = DEFAULT_BLOCKED_DOMAINS,\n message = 'Please use your work email address'\n ): Validator {\n return {\n name: 'workEmail',\n message,\n validate: (value: unknown): ValidationResult => {\n if (typeof value !== 'string' || value.trim() === '') {\n return { valid: true }; // Let required validator handle empty\n }\n\n const domain = value.split('@')[1]?.toLowerCase();\n if (domain && blockedDomains.includes(domain)) {\n return { valid: false, error: message };\n }\n return { valid: true };\n },\n };\n }\n\n static pattern(regex: RegExp, message = 'Invalid format'): Validator {\n return {\n name: 'pattern',\n message,\n validate: (value: unknown): ValidationResult => {\n if (typeof value !== 'string' || value.trim() === '') {\n return { valid: true }; // Let required validator handle empty\n }\n if (!regex.test(value)) {\n return { valid: false, error: message };\n }\n return { valid: true };\n },\n };\n }\n\n static minLength(min: number, message?: string): Validator {\n const errorMessage = message ?? `Minimum ${min} characters required`;\n\n return {\n name: 'minLength',\n message: errorMessage,\n validate: (value: unknown): ValidationResult => {\n if (typeof value !== 'string') {\n return { valid: true };\n }\n if (value.length < min) {\n return { valid: false, error: errorMessage };\n }\n return { valid: true };\n },\n };\n }\n\n static maxLength(max: number, message?: string): Validator {\n const errorMessage = message ?? `Maximum ${max} characters allowed`;\n\n return {\n name: 'maxLength',\n message: errorMessage,\n validate: (value: unknown): ValidationResult => {\n if (typeof value !== 'string') {\n return { valid: true };\n }\n if (value.length > max) {\n return { valid: false, error: errorMessage };\n }\n return { valid: true };\n },\n };\n }\n\n static minSelections(min: number, message?: string): Validator {\n const errorMessage = message ?? `Select at least ${min} option${min > 1 ? 's' : ''}`;\n\n return {\n name: 'minSelections',\n message: errorMessage,\n validate: (value: unknown): ValidationResult => {\n if (!Array.isArray(value)) {\n return { valid: true };\n }\n if (value.length < min) {\n return { valid: false, error: errorMessage };\n }\n return { valid: true };\n },\n };\n }\n\n static maxSelections(max: number, message?: string): Validator {\n const errorMessage = message ?? `Select at most ${max} option${max > 1 ? 's' : ''}`;\n\n return {\n name: 'maxSelections',\n message: errorMessage,\n validate: (value: unknown): ValidationResult => {\n if (!Array.isArray(value)) {\n return { valid: true };\n }\n if (value.length > max) {\n return { valid: false, error: errorMessage };\n }\n return { valid: true };\n },\n };\n }\n\n static custom(name: string, validateFn: ValidatorFn, message?: string): Validator {\n return {\n name,\n message,\n validate: validateFn,\n };\n }\n}\n\n// Export default blocked domains for external use\nexport { DEFAULT_BLOCKED_DOMAINS };\n","/**\n * WF-Email - Email input component for wizard forms\n *\n * A convenience component for email inputs with optional work email validation.\n *\n * @example\n * <wf-email name=\"email\" label=\"Email Address\" work-email required />\n */\n\nimport { html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { FormInputBase } from './base/form-input-base.js';\nimport { ValidationController, DEFAULT_BLOCKED_DOMAINS } from '../controllers/ValidationController.js';\n\n@customElement('wf-email')\nexport class WfEmail extends FormInputBase {\n\n // ============================================\n // Email-specific Properties\n // ============================================\n\n /**\n * Placeholder text\n */\n @property({ type: String })\n placeholder = 'you@company.com';\n\n /**\n * Whether to validate as work email (block personal domains)\n */\n @property({ type: Boolean, attribute: 'work-email' })\n workEmail = false;\n\n /**\n * Custom blocked domains (comma-separated or array)\n */\n @property({ type: String, attribute: 'blocked-domains' })\n blockedDomains = '';\n\n /**\n * Work email validation message\n */\n @property({ type: String, attribute: 'work-email-message' })\n workEmailMessage = 'Please use your work email address';\n\n /**\n * Whether field is disabled\n */\n @property({ type: Boolean })\n disabled = false;\n\n // ============================================\n // Abstract Method Implementations\n // ============================================\n\n protected _getValidationTriggerProperties(): string[] {\n return ['required', 'workEmail', 'blockedDomains'];\n }\n\n /**\n * Email uses faster debounce (300ms) for responsive validation\n */\n protected override _getDebounceMs(): number {\n return 300;\n }\n\n protected _setupValidators(): void {\n this._validators = [];\n\n // Required validator\n if (this.required) {\n this._validators.push(ValidationController.required());\n }\n\n // Email format validator (always applied)\n this._validators.push(ValidationController.email());\n\n // Work email validator\n if (this.workEmail) {\n let domains = DEFAULT_BLOCKED_DOMAINS;\n\n if (this.blockedDomains) {\n domains = this.blockedDomains.split(',').map((d) => d.trim().toLowerCase());\n }\n\n this._validators.push(\n ValidationController.workEmail(domains, this.workEmailMessage)\n );\n }\n }\n\n // ============================================\n // Render\n // ============================================\n\n render() {\n return html`\n <div class=\"wf-field-container\">\n ${this._renderLabel()}\n <input\n type=\"email\"\n class=\"wf-input ${this._errorMessage ? 'wf-input-error' : ''}\"\n id=\"${this.name}\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder}\"\n .value=\"${this._value}\"\n ?disabled=\"${this.disabled}\"\n ?required=\"${this.required}\"\n data-testid=\"wf-input\"\n @input=\"${this._handleInput}\"\n @blur=\"${this._handleBlur}\"\n @focus=\"${this._handleFocus}\"\n />\n ${this._renderHint()}\n ${this._renderError()}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-email': WfEmail;\n }\n}\n","/**\n * WF-Input - Base text input component for wizard forms\n *\n * A standalone text input with validation, styling, and form integration.\n *\n * @example\n * <wf-input name=\"fullName\" label=\"Full Name\" required placeholder=\"John Doe\" />\n */\n\nimport { html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { FormInputBase } from './base/form-input-base.js';\nimport { ValidationController } from '../controllers/ValidationController.js';\n\n@customElement('wf-input')\nexport class WfInput extends FormInputBase {\n\n // ============================================\n // Input-specific Properties\n // ============================================\n\n /**\n * Placeholder text\n */\n @property({ type: String })\n placeholder = '';\n\n /**\n * Input type (text, tel, url, etc.)\n */\n @property({ type: String })\n type: 'text' | 'tel' | 'url' | 'search' = 'text';\n\n /**\n * Minimum length\n */\n @property({ type: Number })\n minlength?: number;\n\n /**\n * Maximum length\n */\n @property({ type: Number })\n maxlength?: number;\n\n /**\n * Pattern regex string\n */\n @property({ type: String })\n pattern?: string;\n\n /**\n * Pattern validation message\n */\n @property({ type: String, attribute: 'pattern-message' })\n patternMessage = 'Invalid format';\n\n /**\n * Whether field is disabled\n */\n @property({ type: Boolean })\n disabled = false;\n\n /**\n * Autocomplete attribute\n */\n @property({ type: String })\n autocomplete = '';\n\n // ============================================\n // Abstract Method Implementations\n // ============================================\n\n protected _getValidationTriggerProperties(): string[] {\n return ['required', 'minlength', 'maxlength', 'pattern'];\n }\n\n protected _setupValidators(): void {\n this._validators = [];\n\n if (this.required) {\n this._validators.push(ValidationController.required());\n }\n\n if (this.minlength !== undefined) {\n this._validators.push(ValidationController.minLength(this.minlength));\n }\n\n if (this.maxlength !== undefined) {\n this._validators.push(ValidationController.maxLength(this.maxlength));\n }\n\n if (this.pattern) {\n this._validators.push(\n ValidationController.pattern(new RegExp(this.pattern), this.patternMessage)\n );\n }\n }\n\n // ============================================\n // Render\n // ============================================\n\n render() {\n return html`\n <div class=\"wf-field-container\">\n ${this._renderLabel()}\n <input\n type=\"${this.type}\"\n class=\"wf-input ${this._errorMessage ? 'wf-input-error' : ''}\"\n id=\"${this.name}\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder}\"\n .value=\"${this._value}\"\n ?disabled=\"${this.disabled}\"\n ?required=\"${this.required}\"\n autocomplete=\"${this.autocomplete || 'off'}\"\n data-testid=\"wf-input\"\n @input=\"${this._handleInput}\"\n @blur=\"${this._handleBlur}\"\n @focus=\"${this._handleFocus}\"\n />\n ${this._renderHint()}\n ${this._renderError()}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-input': WfInput;\n }\n}\n","/**\n * WF-Number - Number input component for wizard forms\n *\n * A specialized input for numeric values with min/max/step support.\n *\n * @example\n * <wf-number name=\"employees\" label=\"Number of Employees\" min=\"1\" max=\"10000\" />\n */\n\nimport { html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { WfInput } from './wf-input.js';\nimport { ValidationController } from '../controllers/ValidationController.js';\n\n@customElement('wf-number')\nexport class WfNumber extends WfInput {\n\n /**\n * Minimum value\n */\n @property({ type: Number })\n min?: number;\n\n /**\n * Maximum value\n */\n @property({ type: Number })\n max?: number;\n\n /**\n * Step increment\n */\n @property({ type: Number })\n step = 1;\n\n protected _setupValidators(): void {\n this._validators = [];\n\n if (this.required) {\n this._validators.push(ValidationController.required());\n }\n\n // Number range validator\n if (this.min !== undefined || this.max !== undefined) {\n this._validators.push(\n ValidationController.custom(\n 'range',\n (value: unknown) => {\n if (value === '' || value === null || value === undefined) {\n return { valid: true }; // Let required handle empty\n }\n\n const num = Number(value);\n if (isNaN(num)) {\n return { valid: false, error: 'Please enter a valid number' };\n }\n\n if (this.min !== undefined && num < this.min) {\n return { valid: false, error: `Value must be at least ${this.min}` };\n }\n\n if (this.max !== undefined && num > this.max) {\n return { valid: false, error: `Value must be at most ${this.max}` };\n }\n\n return { valid: true };\n },\n 'Value out of range'\n )\n );\n }\n }\n\n render() {\n return html`\n <div class=\"wf-field-container\">\n ${this._renderLabel()}\n <input\n type=\"number\"\n class=\"wf-input ${this._errorMessage ? 'wf-input-error' : ''}\"\n id=\"${this.name}\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder}\"\n .value=\"${this._value}\"\n ?disabled=\"${this.disabled}\"\n ?required=\"${this.required}\"\n min=\"${this.min ?? ''}\"\n max=\"${this.max ?? ''}\"\n step=\"${this.step}\"\n autocomplete=\"${this.autocomplete || 'off'}\"\n data-testid=\"wf-input\"\n @input=\"${this._handleInput}\"\n @blur=\"${this._handleBlur}\"\n @focus=\"${this._handleFocus}\"\n />\n ${this._renderHint()}\n ${this._renderError()}\n </div>\n `;\n }\n\n /**\n * Get current value as number\n */\n get valueAsNumber(): number {\n return Number(this._value) || 0;\n }\n\n /**\n * Set value as number\n */\n set valueAsNumber(val: number) {\n this._value = String(val);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-number': WfNumber;\n }\n}\n","/**\n * WF-Textarea - Multiline text input component for wizard forms\n *\n * A textarea with validation, styling, and form integration.\n * Enter key inserts newline (does NOT submit the form).\n *\n * @example\n * <wf-textarea name=\"message\" label=\"Message\" rows=\"4\" required />\n */\n\nimport { html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { FormInputBase } from './base/form-input-base.js';\nimport { ValidationController } from '../controllers/ValidationController.js';\n\n@customElement('wf-textarea')\nexport class WfTextarea extends FormInputBase {\n\n // ============================================\n // Textarea-specific Properties\n // ============================================\n\n /**\n * Placeholder text\n */\n @property({ type: String })\n placeholder = '';\n\n /**\n * Number of visible rows\n */\n @property({ type: Number })\n rows = 4;\n\n /**\n * Minimum length\n */\n @property({ type: Number })\n minlength?: number;\n\n /**\n * Maximum length\n */\n @property({ type: Number })\n maxlength?: number;\n\n /**\n * Whether field is disabled\n */\n @property({ type: Boolean })\n disabled = false;\n\n /**\n * Show character count\n */\n @property({ type: Boolean, attribute: 'show-count' })\n showCount = false;\n\n // ============================================\n // Abstract Method Implementations\n // ============================================\n\n protected _getValidationTriggerProperties(): string[] {\n return ['required', 'minlength', 'maxlength'];\n }\n\n protected override _getFocusableSelector(): string {\n return 'textarea';\n }\n\n protected _setupValidators(): void {\n this._validators = [];\n\n if (this.required) {\n this._validators.push(ValidationController.required());\n }\n\n if (this.minlength !== undefined) {\n this._validators.push(ValidationController.minLength(this.minlength));\n }\n\n if (this.maxlength !== undefined) {\n this._validators.push(ValidationController.maxLength(this.maxlength));\n }\n }\n\n // ============================================\n // Textarea-specific Event Handlers\n // ============================================\n\n private _handleKeydown = (e: KeyboardEvent): void => {\n // Allow Enter to insert newline (don't trigger form navigation)\n if (e.key === 'Enter') {\n e.stopPropagation();\n }\n };\n\n // ============================================\n // Render\n // ============================================\n\n render() {\n const charCount = this._value.length;\n const isAtLimit = this.maxlength !== undefined && charCount >= this.maxlength;\n\n return html`\n <div class=\"wf-field-container\">\n ${this._renderLabel()}\n <textarea\n class=\"wf-textarea ${this._errorMessage ? 'wf-textarea-error' : ''}\"\n id=\"${this.name}\"\n name=\"${this.name}\"\n placeholder=\"${this.placeholder}\"\n rows=\"${this.rows}\"\n .value=\"${this._value}\"\n ?disabled=\"${this.disabled}\"\n ?required=\"${this.required}\"\n maxlength=\"${this.maxlength ?? ''}\"\n data-testid=\"wf-textarea\"\n @input=\"${this._handleInput}\"\n @blur=\"${this._handleBlur}\"\n @focus=\"${this._handleFocus}\"\n @keydown=\"${this._handleKeydown}\"\n ></textarea>\n ${this.showCount && this.maxlength\n ? html`<span class=\"wf-char-count ${isAtLimit ? 'wf-char-limit' : ''}\" data-testid=\"wf-counter\">\n ${charCount}/${this.maxlength}\n </span>`\n : ''}\n ${this._renderHint()}\n ${this._renderError()}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-textarea': WfTextarea;\n }\n}\n","/**\n * WizardForm.init() - Imperative API for wizard forms\n *\n * Provides a simple way to initialize wizard forms from a script tag.\n *\n * @example\n * <script src=\"wizard-form.min.js\"></script>\n * <script>\n * WizardForm.init({\n * container: '#signup-form',\n * adapter: 'hubspot',\n * hubspot: { portalId: '123', formId: 'abc' },\n * onSubmit: (data) => console.log(data),\n * onSuccess: () => console.log('Success!'),\n * onError: (err) => console.error(err)\n * });\n * </script>\n */\n\nimport type { WizardForm } from './components/wizard-form.js';\nimport type { SubmissionAdapter, SubmissionContext } from './adapters/types.js';\nimport { createHubSpotAdapter } from './adapters/hubspot.js';\nimport { createWebhookAdapter } from './adapters/webhook.js';\nimport { createRevenueHeroAdapter } from './adapters/revenuehero.js';\n\n// Ensure components are registered\nimport './components/wizard-form.js';\nimport './components/wf-step.js';\nimport './components/wf-options.js';\nimport './components/wf-option.js';\nimport './components/wf-email.js';\nimport './components/wf-input.js';\nimport './components/wf-number.js';\nimport './components/wf-textarea.js';\n\nexport type FormData = Record<string, unknown>;\n\nexport interface WizardFormConfig {\n /**\n * Container element or selector\n */\n container: string | HTMLElement;\n\n /**\n * Adapter type or custom adapter\n */\n adapter?: 'hubspot' | 'webhook' | 'revenuehero' | 'json' | SubmissionAdapter;\n\n /**\n * HubSpot configuration\n */\n hubspot?: {\n portalId: string;\n formId: string;\n fieldMapping?: Record<string, string>;\n };\n\n /**\n * Webhook configuration\n */\n webhook?: {\n url: string;\n method?: 'POST' | 'PUT';\n headers?: Record<string, string>;\n fieldMapping?: Record<string, string>;\n };\n\n /**\n * RevenueHero configuration\n */\n revenuehero?: {\n routerId: string;\n fieldMapping?: Record<string, string>;\n };\n\n /**\n * Color theme\n */\n theme?: 'light' | 'dark' | 'auto';\n\n /**\n * Show progress bar\n */\n showProgress?: boolean;\n\n /**\n * Auto-advance after single-select option\n */\n autoAdvance?: boolean;\n\n /**\n * Mock mode (for testing)\n */\n mock?: boolean;\n\n /**\n * Callback before submission (can cancel)\n */\n onSubmit?: (data: FormData) => boolean | void;\n\n /**\n * Callback on successful submission\n */\n onSuccess?: (data: FormData, response?: unknown) => void;\n\n /**\n * Callback on submission error\n */\n onError?: (error: string, data?: FormData) => void;\n\n /**\n * Callback on step change\n */\n onStepChange?: (from: number, to: number, direction: 'forward' | 'backward') => void;\n\n /**\n * Callback on field value change\n */\n onFieldChange?: (name: string, value: unknown, formData: FormData) => void;\n\n /**\n * Transform form data before submission to adapter.\n * Called after validation, before adapter.submit().\n */\n serialize?: (data: FormData) => FormData;\n}\n\nexport interface WizardFormInstance {\n /**\n * The wizard-form element\n */\n element: WizardForm;\n\n /**\n * Current form data\n */\n readonly formData: FormData;\n\n /**\n * Current step number\n */\n readonly currentStep: number;\n\n /**\n * Total number of steps\n */\n readonly totalSteps: number;\n\n /**\n * Go to next step\n */\n next(): Promise<void>;\n\n /**\n * Go to previous step\n */\n back(): void;\n\n /**\n * Go to a specific step\n */\n goToStep(step: number): void;\n\n /**\n * Submit the form\n */\n submit(): Promise<void>;\n\n /**\n * Reset the form\n */\n reset(): void;\n\n /**\n * Set form data\n */\n setFormData(data: FormData): void;\n\n /**\n * Destroy the instance (remove event listeners)\n */\n destroy(): void;\n\n /**\n * Serialize function (if configured)\n */\n serialize?: (data: FormData) => FormData;\n}\n\n/**\n * Initialize a wizard form with the given configuration\n *\n * @deprecated Use event-based API instead. Listen to wf:submit, wf:success, wf:error events\n * directly on the wizard-form element. See https://github.com/atomicwork/aw-wizard-forms\n */\nexport function init(config: WizardFormConfig): WizardFormInstance {\n console.warn(\n '[WizardForm] init() is deprecated. Use the event-based API instead:\\n' +\n ' form.addEventListener(\"wf:submit\", (e) => { ... });\\n' +\n ' form.addEventListener(\"wf:success\", (e) => { ... });\\n' +\n 'See https://github.com/atomicwork/aw-wizard-forms for migration guide.'\n );\n\n // Get container element\n const container =\n typeof config.container === 'string'\n ? document.querySelector<HTMLElement>(config.container)\n : config.container;\n\n if (!container) {\n throw new Error(`[WizardForm] Container not found: ${config.container}`);\n }\n\n // Find or create wizard-form element\n let wizardForm = container.querySelector<WizardForm>('wizard-form');\n if (!wizardForm) {\n wizardForm = container as unknown as WizardForm;\n if (wizardForm.tagName.toLowerCase() !== 'wizard-form') {\n throw new Error(\n '[WizardForm] Container must be a <wizard-form> element or contain one'\n );\n }\n }\n\n // Apply configuration attributes\n if (config.theme) {\n wizardForm.setAttribute('theme', config.theme);\n }\n if (config.showProgress !== undefined) {\n wizardForm.showProgress = config.showProgress;\n }\n if (config.autoAdvance !== undefined) {\n wizardForm.autoAdvance = config.autoAdvance;\n }\n if (config.mock) {\n wizardForm.mock = config.mock;\n }\n\n // Create adapter\n let adapter: SubmissionAdapter | null = null;\n\n if (typeof config.adapter === 'object') {\n // Custom adapter\n adapter = config.adapter;\n } else {\n const adapterType = config.adapter || 'json';\n\n switch (adapterType) {\n case 'hubspot':\n if (!config.hubspot?.portalId || !config.hubspot?.formId) {\n throw new Error('[WizardForm] HubSpot config requires portalId and formId');\n }\n adapter = createHubSpotAdapter({\n portalId: config.hubspot.portalId,\n formId: config.hubspot.formId,\n fieldMapping: config.hubspot.fieldMapping,\n mock: config.mock,\n });\n // Also set attributes for built-in HubSpot support\n wizardForm.setAttribute('hubspot-portal', config.hubspot.portalId);\n wizardForm.setAttribute('hubspot-form', config.hubspot.formId);\n break;\n\n case 'webhook':\n if (!config.webhook?.url) {\n throw new Error('[WizardForm] Webhook config requires url');\n }\n adapter = createWebhookAdapter({\n url: config.webhook.url,\n method: config.webhook.method,\n headers: config.webhook.headers,\n fieldMapping: config.webhook.fieldMapping,\n mock: config.mock,\n });\n break;\n\n case 'revenuehero':\n if (!config.revenuehero?.routerId) {\n throw new Error('[WizardForm] RevenueHero config requires routerId');\n }\n adapter = createRevenueHeroAdapter({\n routerId: config.revenuehero.routerId,\n fieldMapping: config.revenuehero.fieldMapping,\n mock: config.mock,\n });\n break;\n\n case 'json':\n // No adapter - just emit events\n adapter = null;\n break;\n }\n }\n\n // Event handlers\n const handleSubmit = (e: CustomEvent) => {\n const rawFormData = e.detail.formData;\n\n // Apply serialize transform if provided\n let submitData = { ...rawFormData };\n if (config.serialize) {\n submitData = config.serialize(submitData);\n }\n\n // Auto-expose test refs when mock mode is enabled\n if (config.mock) {\n (window as unknown as Record<string, unknown>).__wizardFormData = submitData;\n (window as unknown as Record<string, unknown>).__wizardFormRawData = rawFormData;\n (window as unknown as Record<string, unknown>).__wizardFormInstance = instance;\n }\n\n // Call user's onSubmit callback\n if (config.onSubmit) {\n const result = config.onSubmit(submitData);\n if (result === false) {\n e.preventDefault();\n return;\n }\n }\n\n // Submit via adapter if configured\n if (adapter) {\n e.preventDefault();\n\n const context: SubmissionContext = {\n pageUrl: window.location.href,\n pageTitle: document.title,\n referrer: document.referrer,\n timestamp: new Date().toISOString(),\n };\n\n adapter.submit(submitData, context).then((result) => {\n // Auto-expose response in mock mode\n if (config.mock) {\n (window as unknown as Record<string, unknown>).__wizardFormResponse = result;\n }\n\n if (result.success) {\n // Manually show success screen\n (wizardForm as unknown as { _submitted: boolean })._submitted = true;\n wizardForm!.requestUpdate();\n\n // Dispatch wf:success event (triggers handleSuccess listener + progress bar hide)\n wizardForm!.dispatchEvent(\n new CustomEvent('wf:success', {\n detail: { formData: rawFormData, response: result.data },\n bubbles: true,\n composed: true,\n })\n );\n // Note: onSuccess callback is triggered by handleSuccess listener\n } else {\n // Auto-expose error in mock mode\n if (config.mock) {\n (window as unknown as Record<string, unknown>).__wizardFormError = result.error;\n }\n\n if (config.onError) {\n // Pass raw form data (not serialized) for user callbacks\n config.onError(result.error || 'Submission failed', rawFormData);\n }\n }\n });\n }\n };\n\n const handleSuccess = (e: CustomEvent) => {\n // Auto-expose response in mock mode (for built-in HubSpot handler)\n if (config.mock) {\n (window as unknown as Record<string, unknown>).__wizardFormResponse = {\n success: true,\n data: e.detail.response,\n };\n }\n\n if (config.onSuccess) {\n config.onSuccess(e.detail.formData, e.detail.response);\n }\n };\n\n const handleError = (e: CustomEvent) => {\n // Auto-expose error in mock mode\n if (config.mock) {\n (window as unknown as Record<string, unknown>).__wizardFormError = e.detail.error;\n }\n\n if (config.onError) {\n config.onError(e.detail.error, e.detail.formData);\n }\n };\n\n const handleStepChange = (e: CustomEvent) => {\n if (config.onStepChange) {\n config.onStepChange(e.detail.from, e.detail.to, e.detail.direction);\n }\n };\n\n const handleFieldChange = (e: CustomEvent) => {\n if (config.onFieldChange) {\n config.onFieldChange(e.detail.name, e.detail.value, e.detail.formData);\n }\n };\n\n // Attach event listeners\n wizardForm.addEventListener('wf:submit', handleSubmit as EventListener);\n wizardForm.addEventListener('wf:success', handleSuccess as EventListener);\n wizardForm.addEventListener('wf:error', handleError as EventListener);\n wizardForm.addEventListener('wf:step-change', handleStepChange as EventListener);\n wizardForm.addEventListener('wf:field-change', handleFieldChange as EventListener);\n\n // Create instance\n const instance: WizardFormInstance = {\n element: wizardForm,\n\n get formData() {\n return wizardForm!.formData;\n },\n\n get currentStep() {\n return wizardForm!.currentStep;\n },\n\n get totalSteps() {\n return wizardForm!.totalSteps;\n },\n\n next() {\n return wizardForm!.next();\n },\n\n back() {\n wizardForm!.back();\n },\n\n goToStep(step: number) {\n wizardForm!.goToStep(step);\n },\n\n submit() {\n return wizardForm!.submit();\n },\n\n reset() {\n wizardForm!.reset();\n },\n\n setFormData(data: FormData) {\n wizardForm!.setFormData(data);\n },\n\n destroy() {\n wizardForm!.removeEventListener('wf:submit', handleSubmit as EventListener);\n wizardForm!.removeEventListener('wf:success', handleSuccess as EventListener);\n wizardForm!.removeEventListener('wf:error', handleError as EventListener);\n wizardForm!.removeEventListener('wf:step-change', handleStepChange as EventListener);\n wizardForm!.removeEventListener('wf:field-change', handleFieldChange as EventListener);\n },\n\n // Expose serialize function if configured\n serialize: config.serialize,\n };\n\n return instance;\n}\n\nexport default { init };\n","/**\n * Styles for wf-progress component (Shadow DOM)\n */\n\nimport { css } from 'lit';\n\nimport { hostTokens } from '../styles/shared.styles.js';\n\nexport const wfProgressStyles = [\n hostTokens,\n css`\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .wf-progress {\n display: flex;\n gap: 16px;\n align-items: center;\n justify-content: center;\n }\n\n .wf-progress-segment {\n width: 32px;\n height: 8px;\n background-color: var(--wf-color-progress-inactive);\n\n border-radius: 100vw;\n transition: background-color 300ms ease;\n }\n\n .wf-progress-segment.completed,\n .wf-progress-segment.active {\n background-color: var(--wf-color-progress-active);\n }\n `,\n];\n","/**\n * WF-Progress - Composable progress bar component for wizard forms\n *\n * A standalone progress indicator that can be placed inside or outside the wizard.\n * Connects to wizard-form via `for` attribute or auto-discovers parent wizard.\n *\n * @example\n * <!-- Inside wizard (auto-connects) -->\n * <wizard-form id=\"my-form\">\n * <wf-progress></wf-progress>\n * <wf-step>...</wf-step>\n * </wizard-form>\n *\n * @example\n * <!-- Outside wizard (uses for attribute) -->\n * <wf-progress for=\"my-form\"></wf-progress>\n * <wizard-form id=\"my-form\">...</wizard-form>\n */\n\nimport { LitElement, html } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\n\nimport { wfProgressStyles } from './wf-progress.styles.js';\nimport type { WizardForm, StepChangeDetail } from './wizard-form.js';\n\n@customElement('wf-progress')\nexport class WfProgress extends LitElement {\n static styles = wfProgressStyles;\n\n /**\n * ID of the wizard-form to connect to.\n * If not specified, auto-connects to parent wizard-form.\n */\n @property({ type: String })\n for = '';\n\n @state()\n private _currentStep = 1;\n\n @state()\n private _totalSteps = 1;\n\n @state()\n private _isComplete = false;\n\n private _wizard: WizardForm | null = null;\n private _boundHandleStepChange = this._handleStepChange.bind(this);\n private _boundHandleSuccess = this._handleSuccess.bind(this);\n\n private _boundHandleStepsDiscovered = this._handleStepsDiscovered.bind(this);\n\n connectedCallback(): void {\n super.connectedCallback();\n\n // Listen for steps-discovered event IMMEDIATELY on document (bubbles up)\n // This catches the event even if wizard-form fires it before we connect to it\n document.addEventListener('wf:steps-discovered', this._boundHandleStepsDiscovered as EventListener);\n\n // Defer wizard connection to allow DOM to settle\n requestAnimationFrame(() => {\n this._connectToWizard();\n });\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n document.removeEventListener('wf:steps-discovered', this._boundHandleStepsDiscovered as EventListener);\n this._disconnectFromWizard();\n }\n\n private _connectToWizard(): void {\n // Find wizard by ID or by closest parent\n if (this.for) {\n this._wizard = document.getElementById(this.for) as WizardForm | null;\n } else {\n this._wizard = this.closest('wizard-form') as WizardForm | null;\n }\n\n if (this._wizard) {\n // Get initial state\n this._currentStep = this._wizard.currentStep || 1;\n this._totalSteps = this._wizard.totalSteps || 1;\n this._isComplete = this._wizard.isSubmitted || false;\n\n // Listen for step changes\n this._wizard.addEventListener('wf:step-change', this._boundHandleStepChange as EventListener);\n\n // Listen for success (form complete)\n this._wizard.addEventListener('wf:success', this._boundHandleSuccess as EventListener);\n\n // Note: wf:steps-discovered is listened on document in connectedCallback\n }\n }\n\n private _disconnectFromWizard(): void {\n if (this._wizard) {\n this._wizard.removeEventListener('wf:step-change', this._boundHandleStepChange as EventListener);\n this._wizard.removeEventListener('wf:success', this._boundHandleSuccess as EventListener);\n this._wizard = null;\n }\n }\n\n private _handleStepChange(e: CustomEvent<StepChangeDetail>): void {\n this._currentStep = e.detail.to;\n // Re-read total steps in case it changed\n if (this._wizard) {\n this._totalSteps = this._wizard.totalSteps;\n }\n }\n\n private _handleStepsDiscovered(e: CustomEvent): void {\n const { wizard, wizardId, totalSteps, currentStep } = e.detail;\n\n // Check if this event is from our target wizard\n if (this.for) {\n // We have a specific target - check if event is from that wizard\n if (wizardId !== this.for) {\n return;\n }\n } else {\n // No specific target - check if event is from a parent wizard\n const parentWizard = this.closest('wizard-form');\n if (!parentWizard || parentWizard !== wizard) {\n return;\n }\n }\n\n // Connect to wizard if not already connected\n if (!this._wizard && wizard) {\n this._wizard = wizard;\n wizard.addEventListener('wf:step-change', this._boundHandleStepChange as EventListener);\n wizard.addEventListener('wf:success', this._boundHandleSuccess as EventListener);\n }\n\n // Update state from event detail\n this._totalSteps = totalSteps;\n this._currentStep = currentStep;\n }\n\n private _handleSuccess(): void {\n this._isComplete = true;\n }\n\n render() {\n // Hide progress when form is complete\n if (this._isComplete) {\n return null;\n }\n\n const segments = [];\n for (let i = 1; i <= this._totalSteps; i++) {\n const completed = i < this._currentStep;\n const active = i === this._currentStep;\n segments.push(html`\n <div\n class=\"wf-progress-segment ${completed ? 'completed' : ''} ${active ? 'active' : ''}\"\n data-testid=\"wf-progress-segment\"\n data-step=\"${i}\"\n data-completed=\"${completed}\"\n data-active=\"${active}\"\n role=\"progressbar\"\n aria-valuenow=\"${this._currentStep}\"\n aria-valuemin=\"1\"\n aria-valuemax=\"${this._totalSteps}\"\n ></div>\n `);\n }\n return html`<div class=\"wf-progress\" data-testid=\"wf-progress-bar\" role=\"group\" aria-label=\"Form progress\">${segments}</div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-progress': WfProgress;\n }\n}\n","/**\n * NavigationButtonBase - Shared base class for wf-back-btn and wf-next-btn\n *\n * Provides common functionality:\n * - Nav state event handling\n * - Wizard form discovery\n * - State request lifecycle\n */\n\nimport { LitElement } from 'lit';\nimport { state } from 'lit/decorators.js';\n\nexport interface NavStateDetail {\n currentStep: number;\n totalSteps: number;\n isFirstStep: boolean;\n isLastStep: boolean;\n isSubmitting: boolean;\n}\n\nexport abstract class NavigationButtonBase extends LitElement {\n // ============================================\n // Shared State\n // ============================================\n\n @state()\n protected _isFirstStep = true;\n\n @state()\n protected _isLastStep = false;\n\n @state()\n protected _isSubmitting = false;\n\n // ============================================\n // Lifecycle\n // ============================================\n\n override connectedCallback(): void {\n super.connectedCallback();\n this._findWizardForm()?.addEventListener('wf:nav-state', this._handleNavState as EventListener);\n this._requestNavState();\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this._findWizardForm()?.removeEventListener('wf:nav-state', this._handleNavState as EventListener);\n }\n\n // ============================================\n // Event Handlers\n // ============================================\n\n protected _handleNavState = (e: CustomEvent<NavStateDetail>): void => {\n this._isFirstStep = e.detail.isFirstStep;\n this._isLastStep = e.detail.isLastStep;\n this._isSubmitting = e.detail.isSubmitting;\n };\n\n // ============================================\n // Helpers\n // ============================================\n\n protected _findWizardForm(): HTMLElement | null {\n return this.closest('wizard-form');\n }\n\n protected _requestNavState(): void {\n this.dispatchEvent(\n new CustomEvent('wf:nav-state-request', {\n bubbles: true,\n composed: true,\n })\n );\n }\n\n /**\n * Get the event name to dispatch on click\n */\n protected abstract _getEventName(): string;\n\n /**\n * Dispatch the navigation event\n */\n protected _dispatchNavEvent(): void {\n this.dispatchEvent(\n new CustomEvent(this._getEventName(), {\n bubbles: true,\n composed: true,\n })\n );\n }\n}\n","/**\n * Styles for wf-next-btn component (Shadow DOM)\n */\n\nimport { css } from 'lit';\n\nimport { sharedAnimations, buttonBaseStyles } from '../styles/shared.styles.js';\n\nexport const wfNextBtnStyles = [\n sharedAnimations,\n buttonBaseStyles,\n css`\n :host {\n display: block;\n width: 100%;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .wf-btn-next {\n width: 100%;\n flex: 1;\n background-color: var(--wf-color-primary);\n border: 1px solid var(--wf-color-primary-border);\n color: white;\n position: relative;\n }\n\n .wf-btn-next:hover:not(:disabled) {\n filter: brightness(1.1);\n }\n\n .wf-btn-shortcut {\n display: inline-flex;\n align-items: center;\n gap: var(--wf-spacing-05);\n }\n\n .wf-loading {\n display: inline-block;\n width: var(--wf-spinner-size);\n height: var(--wf-spinner-size);\n border: 2px solid rgba(0, 0, 0, 0.1);\n border-radius: 50%;\n border-top-color: white;\n animation: wf-spin 0.8s linear infinite;\n }\n\n /* Inline button styles (for use inside wf-other) */\n :host([inline]) {\n display: inline-block;\n width: auto;\n }\n\n :host([inline]) .wf-btn {\n min-height: 16px;\n width: auto;\n padding-top: 8px;\n padding-bottom: 8px;\n padding-left: 12px;\n padding-right: 8px;\n }\n `,\n];\n","/**\n * WF-Next-Btn - Composable Continue/Submit button for wizard forms\n *\n * Auto-detects the last step and becomes \"Submit\" button.\n * Dispatches 'wf:nav-next' event that bubbles to wizard-form.\n *\n * @example\n * <wf-step data-step=\"1\">\n * <wf-input name=\"fullName\" required></wf-input>\n * <wf-next-btn></wf-next-btn>\n * </wf-step>\n *\n * @example\n * <wf-other label=\"Others, please specify:\">\n * <wf-next-btn inline label=\"Next →\"></wf-next-btn>\n * </wf-other>\n */\n\nimport { html, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { NavigationButtonBase } from './base/navigation-button-base.js';\nimport { wfNextBtnStyles } from './wf-next-btn.styles.js';\nimport './wf-badge.js';\n\n// Re-export NavStateDetail for backward compatibility\nexport type { NavStateDetail } from './base/navigation-button-base.js';\n\n@customElement('wf-next-btn')\nexport class WfNextBtn extends NavigationButtonBase {\n static styles = wfNextBtnStyles;\n\n // ============================================\n // Properties\n // ============================================\n\n /**\n * Custom label (overrides auto \"Continue\"/\"Submit\")\n */\n @property({ type: String })\n label?: string;\n\n /**\n * Force action type (auto-detected by default)\n */\n @property({ type: String })\n action?: 'next' | 'submit';\n\n /**\n * Show \"Enter ↵\" badge (default: true)\n */\n @property({ type: Boolean, attribute: 'show-shortcut' })\n showShortcut = true;\n\n /**\n * Inline styling for placement next to inputs\n */\n @property({ type: Boolean })\n inline = false;\n\n /**\n * Disabled state\n */\n @property({ type: Boolean })\n disabled = false;\n\n // ============================================\n // Abstract Implementation\n // ============================================\n\n protected _getEventName(): string {\n return 'wf:nav-next';\n }\n\n // ============================================\n // Event Handlers\n // ============================================\n\n private _handleClick = (): void => {\n if (this.disabled || this._isSubmitting) {\n return;\n }\n this._dispatchNavEvent();\n };\n\n // ============================================\n // Helpers\n // ============================================\n\n private _getButtonLabel(): string {\n if (this.label) {\n return this.label;\n }\n // Inline buttons (in wf-other) always show \"Continue\", not \"Submit\"\n const isSubmit = !this.inline && (this.action === 'submit' || (this.action !== 'next' && this._isLastStep));\n return isSubmit ? 'Submit' : 'Continue';\n }\n\n private _isSubmitAction(): boolean {\n // Inline buttons (in wf-other) always act as \"next\", not \"submit\"\n return !this.inline && (this.action === 'submit' || (this.action !== 'next' && this._isLastStep));\n }\n\n // ============================================\n // Render\n // ============================================\n\n override render() {\n const buttonLabel = this._getButtonLabel();\n const isDisabled = this.disabled || this._isSubmitting;\n\n return html`\n <button\n type=\"button\"\n class=\"wf-btn wf-btn-next\"\n ?disabled=\"${isDisabled}\"\n @click=\"${this._handleClick}\"\n data-testid=\"wf-next-btn\"\n >\n ${this._isSubmitting\n ? html`<span class=\"wf-loading\"></span>`\n : html`\n ${buttonLabel}\n ${this.showShortcut\n ? html`\n <span class=\"wf-btn-shortcut ${this.inline ? 'wf-btn-shortcut-inline' : ''}\">\n <wf-badge variant=\"button\" shortcut=\"Enter ↵\"></wf-badge>\n </span>\n `\n : nothing}\n `}\n </button>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-next-btn': WfNextBtn;\n }\n}\n","/**\n * Styles for wf-back-btn component (Shadow DOM)\n */\n\nimport { css } from 'lit';\n\nimport { buttonBaseStyles } from '../styles/shared.styles.js';\n\nexport const wfBackBtnStyles = [\n buttonBaseStyles,\n css`\n :host {\n display: inline-block;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .wf-btn-back {\n background: var(--wf-glass-bg);\n backdrop-filter: blur(var(--wf-glass-blur));\n -webkit-backdrop-filter: blur(var(--wf-glass-blur));\n border: 1px solid var(--wf-glass-border);\n box-shadow: var(--wf-glass-shadow);\n color: var(--wf-color-text);\n }\n\n .wf-btn-back:hover:not(:disabled) {\n background: var(--wf-glass-bg-hover);\n }\n\n .wf-btn-shortcut {\n display: inline-flex;\n align-items: center;\n gap: var(--wf-spacing-05);\n }\n `,\n];\n","/**\n * WF-Back-Btn - Composable Back button for wizard forms\n *\n * Dispatches 'wf:nav-back' event that bubbles to wizard-form.\n * Hidden on the first step by default.\n *\n * @example\n * <wf-step data-step=\"2\">\n * <wf-layout direction=\"row\" justify=\"between\">\n * <wf-back-btn></wf-back-btn>\n * <wf-next-btn></wf-next-btn>\n * </wf-layout>\n * </wf-step>\n */\n\nimport { html, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { NavigationButtonBase } from './base/navigation-button-base.js';\nimport { wfBackBtnStyles } from './wf-back-btn.styles.js';\nimport './wf-badge.js';\n\n@customElement('wf-back-btn')\nexport class WfBackBtn extends NavigationButtonBase {\n static styles = wfBackBtnStyles;\n\n // ============================================\n // Properties\n // ============================================\n\n /**\n * Custom label (default: \"Back\")\n */\n @property({ type: String })\n label = 'Back';\n\n /**\n * Show \"Esc\" badge (default: true)\n */\n @property({ type: Boolean, attribute: 'show-shortcut' })\n showShortcut = true;\n\n /**\n * Disabled state\n */\n @property({ type: Boolean })\n disabled = false;\n\n /**\n * Hide on first step (default: true)\n */\n @property({ type: Boolean, attribute: 'hide-on-first' })\n hideOnFirst = true;\n\n // ============================================\n // Abstract Implementation\n // ============================================\n\n protected _getEventName(): string {\n return 'wf:nav-back';\n }\n\n // ============================================\n // Event Handlers\n // ============================================\n\n private _handleClick = (): void => {\n if (this.disabled) {return;}\n this._dispatchNavEvent();\n };\n\n // ============================================\n // Render\n // ============================================\n\n override render() {\n if (this.hideOnFirst && this._isFirstStep) {\n return nothing;\n }\n\n return html`\n <button\n type=\"button\"\n class=\"wf-btn wf-btn-back\"\n ?disabled=\"${this.disabled}\"\n @click=\"${this._handleClick}\"\n data-testid=\"wf-back-btn\"\n >\n ${this.showShortcut\n ? html`\n <span class=\"wf-btn-shortcut\">\n <wf-badge variant=\"button-secondary\">Esc</wf-badge>\n </span>\n `\n : nothing}\n ${this.label}\n </button>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'wf-back-btn': WfBackBtn;\n }\n}\n"],"names":["t","e","s","o","r","n","i","S","c","h","a","l","p","d","u","f","b","y","x","v","css","LitElement","html","__decorateClass","property","customElement","nothing","state","query"],"mappings":"AA4BO,SAAS,mBAAuC;AACrD,MAAI,OAAO,aAAa,aAAa;AAAC,WAAO;AAAA,EAAU;AAEvD,QAAM,QAAQ,SAAS,OAAO,MAAM,oBAAoB;AACxD,SAAO,QAAQ,MAAM,CAAC,IAAI;AAC5B;AAKO,SAAS,qBAAqB,QAA0C;AAC7E,QAAM,EAAE,UAAU,QAAQ,eAAe,CAAA,GAAI,OAAO,UAAU;AAE9D,SAAO;AAAA,IACL,MAAM;AAAA,IAEN,UAAU,MAA0B;AAClC,YAAM,SAAmB,CAAA;AACzB,iBAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,IAAI,GAAG;AAC/C,cAAM,YAAY,aAAa,GAAG,KAAK;AACvC,eAAO,SAAS,IAAI;AAAA,MACtB;AACA,aAAO;AAAA,IACT;AAAA,IAEA,MAAM,OAAO,MAAgB,SAAuD;AAElF,UAAI,MAAM;AACR,cAAM,IAAI,QAAQ,CAAC,YAAY,WAAW,SAAS,GAAG,CAAC;AACvD,eAAO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