@xapp/form-widget 1.117.0 → 1.119.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- "use strict";var e=require("react/jsx-runtime"),n=require("react"),t=function(){return t=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var a in n=arguments[t])Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a]);return e},t.apply(this,arguments)};function r(e,n,t,r){return new(t||(t=Promise))(function(a,o){function i(e){try{d(r.next(e))}catch(e){o(e)}}function s(e){try{d(r.throw(e))}catch(e){o(e)}}function d(e){var n;e.done?a(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(i,s)}d((r=r.apply(e,n||[])).next())})}function a(e,n){var t,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(d){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(o=0)),o;)try{if(t=1,r&&(a=2&s[0]?r.return:s[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,s[1])).done)return a;switch(r=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){o.label=s[1];break}if(6===s[0]&&o.label<a[1]){o.label=a[1],a=s;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(s);break}a[2]&&o.ops.pop(),o.trys.pop();continue}s=n.call(e,o)}catch(e){s=[6,e],r=0}finally{t=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,d])}}}function o(e,n,t){if(t||2===arguments.length)for(var r,a=0,o=n.length;a<o;a++)!r&&a in n||(r||(r=Array.prototype.slice.call(n,0,a)),r[a]=n[a]);return e.concat(r||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var s=e,d=n;function l(e,n,t,r){return new(t||(t=Promise))(function(n,a){function o(e){try{s(r.next(e))}catch(e){a(e)}}function i(e){try{s(r.throw(e))}catch(e){a(e)}}function s(e){var r;e.done?n(e.value):(r=e.value,r instanceof t?r:new t(function(e){e(r)})).then(o,i)}s((r=r.apply(e,[])).next())})}function p(e,n){var t,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(d){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(o=0)),o;)try{if(t=1,r&&(a=2&s[0]?r.return:s[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,s[1])).done)return a;switch(r=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){o.label=s[1];break}if(6===s[0]&&o.label<a[1]){o.label=a[1],a=s;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(s);break}a[2]&&o.ops.pop(),o.trys.pop();continue}s=n.call(e,o)}catch(e){s=[6,e],r=0}finally{t=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,d])}}}function c(e,n,t){for(var r,a=0,o=n.length;a<o;a++)!r&&a in n||(r||(r=Array.prototype.slice.call(n,0,a)),r[a]=n[a]);return e.concat(r||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;["FAQ","INTENT","HISTORICAL"].reduce(function(e,n,t){return e[n]=t,e},{});var u=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"],m=["gclid","gbraid","wbraid","msclkid","fbclid"],f=c(c([],u),m);function _(e){var n=((null==e?void 0:e.content)||[]).filter(function(e){return"text"===e.type&&"string"==typeof e.text}).map(function(e){return e.text}).join("\n");if(null==e?void 0:e.isError)return{ok:!1,message:n};try{return JSON.parse(n)}catch(e){return{text:n}}}!function(){function e(e,n){this.mcpUrl=e,this.nextId=1,this.fetchImpl=n||("function"==typeof fetch?fetch:void 0)}e.prototype.callTool=function(e,n){return l(this,0,void 0,function(){var t,r;return p(this,function(a){switch(a.label){case 0:if("function"!=typeof this.fetchImpl)throw new Error("fetch is not available");return[4,this.fetchImpl(this.mcpUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:this.nextId++,method:"tools/call",params:{name:e,arguments:n}})})];case 1:if(!(t=a.sent()).ok)throw new Error("MCP endpoint answered ".concat(t.status));return[4,t.json()];case 2:if((r=a.sent()).error)throw new Error(r.error.message||"MCP error ".concat(r.error.code));return[2,_(r.result)]}})})}}(),c(c([],f),["st_source","srsltid","ref","source"]);var h=/^[a-z][a-z-]{0,31}$/;var x="data-xapp-scroll-lock",g="data-xapp-scroll-lock-restore",v=["position","top","left","right","width","overflow"];function b(e){var n=Number(e.getAttribute(x));return Number.isFinite(n)&&n>0?n:0}function y(){if("undefined"==typeof document||"undefined"==typeof window)return function(){};var e=document.body;if(0===b(e)){var n=function(e){var n=v.reduce(function(n,t){return n[t]=e.style.getPropertyValue(t),n},{});return{scrollY:window.scrollY||window.pageYOffset||0,inlineStyles:n}}(e);e.setAttribute(g,JSON.stringify(n)),e.style.position="fixed",e.style.top="-".concat(n.scrollY,"px"),e.style.left="0",e.style.right="0",e.style.width="100%",e.style.overflow="hidden"}e.setAttribute(x,String(b(e)+1));var t=!1;return function(){if(!t){t=!0;var n=b(e)-1;if(n>0)e.setAttribute(x,String(n));else if(!(n<0)){e.removeAttribute(x);var r=function(e){var n=e.getAttribute(g);e.removeAttribute(g);try{var t=JSON.parse(n||"");if(t&&"number"==typeof t.scrollY&&t.inlineStyles)return t}catch(e){}return{scrollY:0,inlineStyles:{}}}(e),a=r.scrollY,o=r.inlineStyles;v.forEach(function(n){o[n]?e.style.setProperty(n,o[n]):e.style.removeProperty(n)}),e.style.length||e.removeAttribute("style"),window.scrollTo(0,a)}}}}var w="--xapp-viewport-height",F="--xapp-viewport-offset-top",k="--xapp-keyboard-inset",S="data-xapp-viewport-subscribers";function T(e){var n=Number(e.getAttribute(S));return Number.isFinite(n)&&n>0?n:0}function C(e){var n="undefined"==typeof window?void 0:window.visualViewport;if(n){var t=n.height,r=n.offsetTop;if(t>0){var a=window.innerHeight||t,o=Math.max(0,a-t),i=o>=120?o:0;e.style.setProperty(w,"".concat(Math.round(t),"px")),e.style.setProperty(F,"".concat(Math.round(r),"px")),e.style.setProperty(k,"".concat(Math.round(i),"px"))}}}function D(){if("undefined"==typeof document)return function(){};var e=document.documentElement;e.setAttribute(S,String(T(e)+1)),C(e);var n,t="undefined"==typeof window?void 0:window.visualViewport,r=function(){void 0===n&&(n=window.requestAnimationFrame(function(){n=void 0,C(e)}))};null==t||t.addEventListener("resize",r),null==t||t.addEventListener("scroll",r);var a=!1;return function(){if(!a){a=!0,null==t||t.removeEventListener("resize",r),null==t||t.removeEventListener("scroll",r),void 0!==n&&(window.cancelAnimationFrame(n),n=void 0);var o=T(e)-1;o>0?e.setAttribute(S,String(o)):(e.removeAttribute(S),function(e){e.style.removeProperty(w),e.style.removeProperty(F),e.style.removeProperty(k)}(e))}}}function R(){var e=getComputedStyle(document.documentElement).getPropertyValue(k),n=parseFloat(e);return Number.isFinite(n)?n:0}function N(e){e&&"scrollIntoView"in e&&e.scrollIntoView({block:"nearest",behavior:"smooth"})}function I(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-65xx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var t=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===n?t:3&t|8).toString(16)})}var A="__xapp_visitor_id",M="__xapp_visit",j=/^[A-Za-z0-9_-]{8,64}$/;function E(){try{var e=window;return e.__xappVisitIdentity=e.__xappVisitIdentity||{}}catch(e){return{}}}function z(e){try{return localStorage.getItem(e)||void 0}catch(e){return}}function O(e,n){try{return localStorage.setItem(e,n),!0}catch(e){return!1}}function P(e){return e&&j.test(e)?e:void 0}function L(){var e=P(z(A));if(e)return e;var n=E(),t=n.visitorId||P(z("__xapp_form_user_id"))||I();return O(A,t)||(n.visitorId=t),t}var H=function(e){var n=e.icon;return s.jsx("div",{tabIndex:e.tabIndex?Number(e.tabIndex):0,className:"xapp-search-icon-button ".concat(e.className||""),onClick:e.onClick,children:s.jsx("div",{className:"xapp-search-icon-button__content",children:s.jsx(n,{})})})},U=function(e){return s.jsx("div",{className:"xappw-message-bubble",children:e.children})},B=function(e){return s.jsx("div",{className:"xappw-suggestions-group-heading",children:e.label})},W=function(e){return function(){try{return"1"===sessionStorage.getItem("xa_test")}catch(e){return!1}}()&&(e.xaTest=!0,delete e.rwg_token),e},q=function(){try{var e=window.__xappInternal;return"string"==typeof e&&h.test(e)?e:void 0}catch(e){return}},$=function(e){void 0===e&&(e=!0),d.useEffect(function(){if(e)return y()},[e])},Y=function(e){void 0===e&&(e=!0),d.useEffect(function(){if(e&&"undefined"!=typeof document){var n=R(),t=function(e){R()>0&&N(e.target)},r=function(){window.requestAnimationFrame(function(){var e=R(),t=n<=0&&e>0;n=e,t&&N(document.activeElement)})},a="undefined"==typeof window?void 0:window.visualViewport;return document.addEventListener("focusin",t),null==a||a.addEventListener("resize",r),null==a||a.addEventListener("scroll",r),function(){document.removeEventListener("focusin",t),null==a||a.removeEventListener("resize",r),null==a||a.removeEventListener("scroll",r)}}},[e])},G=function(e){void 0===e&&(e=!0),d.useEffect(function(){if(e)return D()},[e])},V=I,X=function(e){void 0===e&&(e=Date.now());var n=E(),t=function(e){if(e)try{var n=JSON.parse(e);return n&&P(n.id)&&"number"==typeof n.at?n:void 0}catch(e){return}}(z(M))||n.visit,r={id:t&&t.at<=e&&e-t.at<=18e5&&t?t.id:I(),at:e};return O(M,JSON.stringify(r))||(n.visit=r),{visitorId:L(),visitId:r.id}},J=L,K={extractUtmParameters:!0,extractClickIds:!0,customParameterPrefix:"track_",persistToLocalStorage:!0,persistenceDays:30,preferUrlParameters:!0},Z=u,Q=m;function ee(e){return void 0===e?"xa_tracking_":"".concat("xa_tracking","@").concat(encodeURIComponent(e),":")}function ne(e){return e.length<=255&&!/[<>"'\x00-\x1f]/.test(e)}function te(e){var n={},t=ee(e);return o(o([],Z,!0),Q,!0).forEach(function(e){var r=localStorage.getItem("".concat(t).concat(e));if(r)try{var a=JSON.parse(r);a.expires>Date.now()&&(n[e]=a.value)}catch(n){localStorage.removeItem("".concat(t).concat(e))}}),function(){for(var e=[],n=0;n<localStorage.length;n++){var t=localStorage.key(n);t&&e.push(t)}return e}().forEach(function(e){if(e.startsWith("".concat(t,"track_")))try{var r=JSON.parse(localStorage.getItem(e)||"{}");if(r.expires>Date.now()){var a=e.slice(t.length);n[a]=r.value}}catch(n){localStorage.removeItem(e)}}),n}function re(e,n){void 0===e&&(e=window.location.href),void 0===n&&(n={});var r=t(t({},K),n),a=function(e,n){void 0===e&&(e=window.location.href),void 0===n&&(n={});var r,a=t(t({},K),n);try{r=new URL(e)}catch(n){return console.warn("Invalid URL provided to tracking parameter extraction:",e),{}}var o=r.searchParams,i={};return a.extractUtmParameters&&Z.forEach(function(e){var n=o.get(e);n&&ne(n)&&(i[e]=n)}),a.extractClickIds&&Q.forEach(function(e){var n=o.get(e);n&&ne(n)&&(i[e]=n)}),a.customParameterPrefix&&o.forEach(function(e,n){n.startsWith(a.customParameterPrefix)&&ne(e)&&(i[n]=e)}),i}(e,n),o=te(n.scope),i=r.preferUrlParameters?t(t({},o),a):t(t({},a),o);return Object.keys(a).length>0&&function(e,n){void 0===n&&(n={});var r=t(t({},K),n);if(r.persistToLocalStorage){var a=Date.now()+24*r.persistenceDays*60*60*1e3,o=ee(n.scope);Object.entries(e).forEach(function(e){var n=e[0],t=e[1];if(t){var r={value:t,expires:a,stored:Date.now()};localStorage.setItem("".concat(o).concat(n),JSON.stringify(r))}})}}(a,n),i}function ae(){return(new Date).toISOString()+" ::"}function oe(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];"debug"===window.xaLogLevel&&console.log.apply(console,o([ae()],e,!1))}function ie(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];console.error.apply(console,o([ae()],e,!1))}function se(e){return!!e&&"CAROUSEL"===e.type}function de(e){return!!e&&"LIST"===e.type}function le(e){return!!e&&"FORM"===e.type}function pe(e,n){var r=n.type;switch(r){case"set-query":return t(t({},e),{query:n.query||""});case"set-response":return t(t({},e),{responseQuery:n.query,responseIntentId:n.intentId});case"set-context":return t(t({},e),{context:n.context});case"new-search":return t(t({},e),{query:""});case"set-modal-state":return t(t({},e),{active:n.active,minimized:n.minimized,sendRequest:n.sendRequest});case"open-modal-state":return e.active?e:t(t({},e),{active:!0,minimized:!1,sendRequest:!0});default:!function(e){throw new Error("Unknown kind "+e)}(r)}}var ce={query:"",active:!1,minimized:!1,sendRequest:!0},ue=[ce,function(){}],me=n.createContext(ue),fe=function(t){var r=n.useReducer(pe,t.initialState||ce);return e.jsx(me.Provider,{value:r,children:t.children})};function _e(){return n.useContext(me)}function he(){return _e()[0]}function xe(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===t&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}var ge="ModalDialog-module_xapp_search_modal__WpGiJ",ve="ModalDialog-module_xapp_search_modal__backdrop__rryOU",be="ModalDialog-module_xapp_search_modal__body__qK17C",ye="ModalDialog-module_xapp_search_modal_embedded__Ye0Dg";xe("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.ModalDialog-module_xapp_search_modal__WpGiJ {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 48px;\n z-index: 15000;\n}\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .ModalDialog-module_xapp_search_modal__WpGiJ {\n padding: env(safe-area-inset-top) env(safe-area-inset-right) max(env(safe-area-inset-bottom), var(--xapp-keyboard-inset, 0px)) env(safe-area-inset-left);\n }\n}\n@media (max-height: 640px) and (min-width: 641px) and (pointer: fine) {\n .ModalDialog-module_xapp_search_modal__WpGiJ {\n padding-bottom: 24px;\n }\n}\n.ModalDialog-module_xapp_search_modal__backdrop__rryOU {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: -1;\n background: rgba(0, 0, 0, 0.4);\n}\n.ModalDialog-module_xapp_search_modal__body__qK17C {\n box-sizing: border-box;\n max-width: 100%;\n max-height: 100%;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n}\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .ModalDialog-module_xapp_search_modal__body__qK17C {\n width: 100%;\n height: 100%;\n }\n}\n\n.ModalDialog-module_xapp_search_modal_embedded__Ye0Dg {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n overflow: hidden;\n}");var we=function(n){var t=n.embedded;return $(!t),G(!t),Y(),t?e.jsx("div",{className:ye,children:n.children}):e.jsxs("div",{className:ge,children:[!n.disableBackdrop&&e.jsx("div",{"data-testid":"xapp-modal-backdrop",className:ve,onClick:n.onClose}),e.jsx("div",{className:be,children:n.children})]})},Fe="__xappDroppedAfterFinal";var ke=new Map,Se=new Set(["LAUNCH_REQUEST","INTENT_REQUEST"]),Te=function(){function e(e){this.sessionSent=!1,this.prefetchSemaphore=Promise.resolve(),this.config=e,this.responseCache={}}return Object.defineProperty(e.prototype,"trackingScope",{get:function(){return e=this.config.key,n=this.config.intentId,"".concat(null!=e?e:"","|").concat(null!=n?n:"");var e,n},enumerable:!1,configurable:!0}),e.prototype.getCachedTrackingParameters=function(){var e=Date.now();if(this.cachedTrackingParams&&e-this.cachedTrackingParams.ts<3e5)return this.cachedTrackingParams.value;var n=te(this.trackingScope);return this.cachedTrackingParams={ts:e,value:n},n},e.getApi=function(n){var t=function(e){var n;return"".concat(e.url," ").concat(e.key," ").concat(null!==(n=e.intentId)&&void 0!==n?n:""," ").concat(e.demoMode?"demo":"live")}(n),r=ke.get(t);if(r)return r;var a=new e(n);return ke.set(t,a),n.prefetchQuery&&a.prefetch(n.prefetchQuery),a},e.prototype.launchRequest=function(e){return this.send({type:"LAUNCH_REQUEST",rawQuery:e,intentId:"LaunchRequest",platform:"stentor-platform",channel:"form-widget"})},e.prototype.intentRequest=function(e){var n=(null==e?void 0:e.intentId)?void 0:e.query,t=(null==e?void 0:e.intentId)?e.intentId:"NLU_RESULT_PLACEHOLDER";return this.send({type:"INTENT_REQUEST",rawQuery:n,intentId:t,platform:"stentor-platform",channel:"form-widget"})},e.prototype.channelActionRequest=function(e,n){var r,a=this,o=!!e.final;if(this.session){if(this.session.hadFinal)return oe("Had final submit. Not sending action request: ".concat(n)),Promise.resolve(((r={})[Fe]=!0,r));this.session.hadFinal=o}return this.send(t(t({type:"CHANNEL_ACTION_REQUEST",action:n,platform:"stentor-platform",channel:"form-widget"},this.config.intentId?{overrideKey:this.config.intentId}:{}),{attributes:{data:e}})).catch(function(e){throw a.session&&o&&(a.session.hadFinal=!1),e})},e.prototype.trackEvent=function(e,n){return r(this,void 0,void 0,function(){var t,r,o,i,s,d,l;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),t=this.config.key,this.config.demoMode?(oe("[demoMode] suppressed tracking event",e),[2,void 0]):t?(r=this.getTrackingUrl(),o={key:t,events:[n]},i={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o),mode:"cors"},[4,fetch(r,i)]):(ie("[EventTracking] No widget key configured, skipping event tracking"),[2,void 0]);case 1:return(s=a.sent()).ok?[4,s.json()]:(ie("Event tracking failed: ".concat(s.status," ").concat(s.statusText)),[2,void 0]);case 2:return d=a.sent(),oe("Event tracking succeeded: ".concat(e,", processed: ").concat(d.processed)),[2,d];case 3:return l=a.sent(),ie("Event tracking error: ".concat(l)),[2,void 0];case 4:return[2]}})})},e.prototype.trackEventBeacon=function(e,n){var r=this.config.key;if(this.config.demoMode)return oe("[demoMode] suppressed tracking beacon",e.eventType),!1;if(!r)return ie("[EventTracking] No widget key configured, skipping event beacon"),!1;try{var a=this.getTrackingUrl(),o=t(t({key:r},n?{widgetType:n}:{}),{events:[e]});return fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o),keepalive:!0}).catch(function(){}),!0}catch(e){return ie("Event beacon error: ".concat(e)),!1}},e.prototype.getTrackingUrl=function(){var e=this.config.url;try{var n=new URL(e);return"".concat(n.origin,"/cms/widget/events")}catch(n){ie("[EventTracking] Failed to parse URL: ".concat(e));var t=e.match(/^(https?:\/\/[^/]+)/);return"".concat(t?t[1]:e.replace(/\/$/,""),"/cms/widget/events")}},e.prototype.resetSession=function(){this.session=void 0,this.sessionSent=!1},e.prototype.visitSession=function(){this.session||(this.session={sessionId:"stentor-form-session-".concat(V()),userId:J(),hadFinal:!1});var e=this.session;return{sessionId:e.sessionId,userId:e.userId}},e.prototype.getCachedResponse=function(e){if(e){var n=(new Date).getTime(),t=this.responseCache[e];if(t){if(n-t.ts<9e5)return oe('Returning cached response for "'.concat(e,'"')),t.value;oe('Deleting expired cached response for "'.concat(e,'"')),delete this.responseCache[e]}}},e.prototype.send=function(e){return r(this,void 0,void 0,function(){var n,r,o,i,s,d,l,p,c,u,m,f,_,h,x,g,v,b,y,w,F,k,S;return a(this,function(a){switch(a.label){case 0:return[4,this.prefetchSemaphore];case 1:if(a.sent(),this.config.demoMode&&!Se.has(e.type))return oe("[demoMode] suppressed request",e.type),[2,{}];if(n=this.getCachedResponse(e.rawQuery))return[2,Promise.resolve(n)];r=this.config,o=r.url,i=r.key,s=!this.sessionSent,d=this.visitSession(),l=d.sessionId,p=d.userId,this.sessionSent=!0,c={};try{(null==(u=new URL(window.location.href))?void 0:u.host.toLowerCase().startsWith("localhost"))?c.isLocal=!0:c.currentUrl=window.location.href}catch(e){}(m=localStorage.getItem("xa_rwg_token"))&&(c.rwg_token=m),(f=localStorage.getItem("xa_merchant_id"))&&(c.merchant_id=f),(_=localStorage.getItem("xa_environment"))&&(c.environment=_),(h=localStorage.getItem("xa_enablePreferredTime"))&&(c.enablePreferredTime=h),(x=localStorage.getItem("xa_service"))&&(c.service=x),(g=localStorage.getItem("xa_origin"))&&(c.origin=g);try{v=new URLSearchParams(window.location.search),(b=v.get("placeId"))&&(c.placeId=b)}catch(e){}return y=this.getCachedTrackingParameters(),Object.assign(c,y),W(c),c.currentTime=(new Date).toISOString(),w=t(t({},e),{sessionId:l,userId:p,isNewSession:s,attributes:t(t({},e.attributes),c)}),F=JSON.stringify(w),k={method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(i)},body:F,mode:"cors"},[4,fetch(o,k)];case 2:return(S=a.sent()).ok?[3,5]:(ie("Stentor call failed: ".concat(S.statusText)),[4,(T=1e3,new Promise(function(e){setTimeout(e,T)}))]);case 3:return a.sent(),[4,fetch(o,k)];case 4:if(!(S=a.sent()).ok)throw ie("Stentor call failed again: ".concat(S.statusText)),new Error("Status ".concat(S.status,", Text: ").concat(S.statusText));a.label=5;case 5:return[2,S.json()]}var T})})},e.prototype.prefetch=function(e){return r(this,void 0,void 0,function(){var n,o,i,s,d,l,p,c,u,m,f,_,h,x,g=this;return a(this,function(v){return this.config.demoMode||this.getCachedResponse(e)||(this.prefetchSemaphore=new Promise(function(e){n=e}),o=this.config,i=o.url,s=o.key,d=!this.sessionSent,l=this.visitSession(),p=l.sessionId,c=l.userId,this.sessionSent=!0,u={type:"INTENT_REQUEST",rawQuery:e,intentId:"NLU_RESULT_PLACEHOLDER",platform:"stentor-platform",channel:"form-widget"},m={currentTime:(new Date).toISOString()},f=t(t({},u),{sessionId:p,userId:c,isNewSession:d,attributes:m}),_=JSON.stringify(f),h={method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(s)},body:_,mode:"cors"},x=(new Date).getTime(),fetch(i,h).then(function(n){return r(g,void 0,void 0,function(){var t,r,o,i;return a(this,function(a){switch(a.label){case 0:return n.ok?(t=(new Date).getTime(),r=this.responseCache,o=e,i={ts:t},[4,n.json()]):(ie("Stentor prefetch failed: ".concat(n.statusText)),[2]);case 1:return r[o]=(i.value=a.sent(),i),oe("Stentor prefetch took: ".concat(t-x," ms")),[2]}})})}).finally(function(){n()})),[2]})})},e}();function Ce(e){return"string"==typeof e?e:e.title}var De=n.createContext({api:{key:"",url:""},suggestionsUrl:"",isVoiceEnabled:!1,autoGreeting:"schedule"});function Re(){var e,t=n.useState(0),r=t[0],a=t[1],o=(e=n.useRef(!1),n.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),n.useCallback(function(){return e.current},[])),i=n.useCallback(function(e){return function(e,n){return n(1),e().finally(function(){n(-1)})}(e,function(e){o()&&a(function(n){return n+e})})},[o]);return n.useMemo(function(){return{loading:!!r,run:i}},[r,i])}var Ne="xxTrustedFormCertUrl",Ie="xxTrustedFormPingUrl";function Ae(e){return n.useEffect(function(){if(e)if(function(e){try{return"https://api.trustedform.com"===new URL(e).origin}catch(e){return!1}}(e)){if(!document.querySelector('script[src="'.concat(e,'"]'))){var n=document.createElement("script");n.async=!0,n.src=e,n.onerror=function(){ie("[TrustedForm] Failed to load script")},document.head.appendChild(n)}}else ie("[TrustedForm] Rejected script URL from unexpected origin")},[e]),n.useCallback(function(){if(e){var n={},t=document.querySelector('input[name="'.concat(Ne,'"], input[id="').concat(Ne,'"]')),r=document.querySelector('input[name="'.concat(Ie,'"], input[id="').concat(Ie,'"]'));if((null==t?void 0:t.value)&&(n[Ne]=t.value),(null==r?void 0:r.value)&&(n[Ie]=r.value),0!==Object.keys(n).length)return n;ie("[TrustedForm] No certificate data found in DOM")}},[e])}function Me(e){if("undefined"!=typeof document&&document.cookie){var n=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),t=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));if(t)try{return decodeURIComponent(t[1])}catch(e){return t[1]}}}var je=function(){return e.jsx("svg",{viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M10 14L3 7.5L10 1",stroke:"currentColor",fill:"none",strokeLinecap:"square"})})},Ee=function(){return e.jsx("svg",{viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M5 14L12 7.5L5 1",stroke:"currentColor",fill:"none",strokeLinecap:"square"})})},ze=function(){return e.jsxs("svg",{viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"spinner-secondHalf",children:[e.jsx("stop",{offset:"0%",stopOpacity:"0",stopColor:"currentColor"}),e.jsx("stop",{offset:"100%",stopOpacity:"0.5",stopColor:"currentColor"})]}),e.jsxs("linearGradient",{id:"spinner-firstHalf",children:[e.jsx("stop",{offset:"0%",stopOpacity:"1",stopColor:"currentColor"}),e.jsx("stop",{offset:"100%",stopOpacity:"0.5",stopColor:"currentColor"})]})]}),e.jsxs("g",{strokeWidth:16,children:[e.jsx("path",{stroke:"url(#spinner-secondHalf)",d:"M".concat(8," 100 A").concat(92," ").concat(92," 0 0 1 ").concat(192," 100")}),e.jsx("path",{stroke:"url(#spinner-firstHalf)",d:"M".concat(192," 100 A").concat(92," ").concat(92," 0 0 1 ").concat(8," 100")}),e.jsx("path",{stroke:"currentColor",strokeLinecap:"round",d:"M".concat(8," 100 A").concat(92," ").concat(92," 0 0 1 ").concat(8," ").concat(96)})]}),e.jsx("animateTransform",{from:"0 0 0",to:"360 0 0",attributeName:"transform",type:"rotate",repeatCount:"indefinite",dur:"1300ms"})]})},Oe=function(n){return function(t){var r=t.className;return e.jsx("svg",{className:r,viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false",children:e.jsx("path",{d:n})})}},Pe=Oe("M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"),Le=Oe("M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"),He=Oe("M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"),Ue=Oe("M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"),Be=Oe("M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"),We=Oe("M7 10l5 5 5-5z"),qe=Oe("M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"),$e=Oe("M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"),Ye="SearchResponseBubble-module_xapp_search_response_bubble__UtmuK";xe(".SearchResponseBubble-module_xapp_search_response_bubble__UtmuK {\n --xapp-bubble-background: #fff;\n}");var Ge=function(n){return e.jsx("div",{className:Ye,children:e.jsx(U,{children:n.children})})};function Ve(e,n){for(var t=-1,r=0,a=n;r<a.length;r++){var o=a[r],i=e.indexOf(o);i>=0&&(t<0||t>=0&&i<t)&&(t=i)}return t}var Xe=[":","/"],Je=["/"],Ke=["?","#"],Ze=["#"],Qe=[function(e){var n=e.indexOf("://");return n<0?n:n+3},function(e){return Ve(e,Xe)},function(e){return":"!==e.charAt(0)?-1:Ve(e,Je)},function(e){var n=Ve(e,Ke);return n>=0?n:e.length},function(e){return Ve(e,Ze)}];var en="/...";function nn(e,n){if(!e)return e;if(e.length<n)return e;var t=function(e){for(var n=[],t=e,r=0,a=Qe;r<a.length;r++){var o=a[r],i=Math.max(0,o(t,e)),s=t.substring(0,i);n.push(s),t=t.substring(i)}return t&&n.push(t),n}(e);function r(){return t.join("")}function a(){return r().length>n}function o(e){a()&&(t[e]="")}if(":80"===t[2]&&"http://"===t[0]&&o(2),":443"===t[2]&&"https://"===t[0]&&o(2),o(5),o(4),o(2),o(0),a()){var i=t[3],s=r().length-i.length,d=n-s;if(d<0)t[3]="";else if(d<i.length){var l=i.length-d+4;t[3]=en+i.substring(l)}}return r()}var tn="Card-module_xapp_search_card__9iVCv",rn="Card-module_xapp_search_card__featured__CX-L0",an="Card-module_xapp_search_card__featured_box__1fV9y",on="Card-module_xapp_search_card__img__KJ1s3",sn="Card-module_xapp_search_card__content__dathl",dn="Card-module_xapp_search_card__link__DNSSb",ln="Card-module_xapp_search_card__title__ddR3K",pn="Card-module_xapp_search_card__description__MruSU";xe('/**\n * The phone breakpoint.\n *\n * Width alone cannot express "phone". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step\'s action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field\'s helper / error line. The metrics are MUI\'s FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.Card-module_xapp_search_card__9iVCv {\n border: solid 0 var(--xapp-form-widget-border-color, #d3d3df);\n border-radius: 12px;\n margin-top: 0;\n margin-right: 0;\n margin-bottom: 20px;\n margin-left: 0;\n padding-top: 0;\n padding-right: 0;\n padding-bottom: 0;\n padding-left: 0;\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-items: stretch;\n overflow: hidden;\n border-radius: var(--xapp-form-widget-border-radius-lg, 16px);\n box-shadow: var(--xapp-form-widget-box-shadow-subtle, 0 2px 8px rgba(0, 0, 0, 0.08));\n transition: box-shadow 200ms ease-in-out, transform 200ms ease-in-out;\n background-color: #fff;\n}\n.Card-module_xapp_search_card__9iVCv:hover {\n box-shadow: var(--xapp-form-widget-box-shadow, 0 4px 24px rgba(0, 0, 0, 0.12));\n}\n.Card-module_xapp_search_card__featured__CX-L0 {\n flex: 1 1 240px;\n margin: 12px;\n width: 100%;\n min-width: 240px;\n overflow: hidden;\n}\n.Card-module_xapp_search_card__featured_box__1fV9y {\n position: relative;\n padding-bottom: math-div(100%, math-div(16, 9));\n box-sizing: border-box;\n overflow: hidden;\n}\n.Card-module_xapp_search_card__img__KJ1s3 {\n position: relative;\n width: 100%;\n height: 100%;\n object-fit: cover;\n overflow: hidden;\n}\n.Card-module_xapp_search_card__content__dathl {\n flex: 4 1 200px;\n min-width: 200px;\n margin: 12px;\n display: flex;\n flex-direction: column;\n}\n.Card-module_xapp_search_card__extra__R-h6g {\n margin-top: auto;\n margin-left: auto;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-items: stretch;\n max-width: 100%;\n}\n.Card-module_xapp_search_card__extra__R-h6g:before {\n content: "";\n min-width: 360px;\n}\n.Card-module_xapp_search_card__link__DNSSb {\n display: block;\n flex: 0 0 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n line-height: 1.5em;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n font-weight: normal;\n font-size: 16px;\n font-style: normal;\n color: #006621;\n margin-top: 0;\n margin-right: 0;\n margin-bottom: 0;\n margin-left: 0;\n padding-top: 0;\n padding-right: 0;\n padding-bottom: 0;\n padding-left: 0;\n}\n.Card-module_xapp_search_card__btn__DHrQp {\n flex: 1 1 auto;\n margin-top: 12px;\n}\n.Card-module_xapp_search_card__title__ddR3K {\n overflow: hidden;\n text-decoration: none;\n text-overflow: ellipsis;\n white-space: nowrap;\n line-height: 1.25em;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n font-weight: normal;\n font-size: 20px;\n font-style: normal;\n color: #1a0dab;\n margin-top: 0;\n margin-right: 0;\n margin-bottom: 0;\n margin-left: 0;\n padding-top: 0;\n padding-right: 0;\n padding-bottom: 0;\n padding-left: 0;\n}\n.Card-module_xapp_search_card__title__ddR3K:hover {\n text-decoration: underline;\n}\n.Card-module_xapp_search_card__description__MruSU {\n line-height: 1.25em;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n font-weight: normal;\n font-size: 16px;\n font-style: normal;\n color: #666;\n margin-top: 6px;\n margin-right: 0;\n margin-bottom: 0;\n margin-left: 0;\n padding-top: 0;\n padding-right: 0;\n padding-bottom: 0;\n padding-left: 0;\n overflow: hidden;\n max-height: 6.25em;\n position: relative;\n}\n.Card-module_xapp_search_card__description__MruSU:after {\n background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 12.5%, white 100%);\n content: "";\n height: 1.25em;\n position: absolute;\n top: 5em;\n left: 0;\n right: 0;\n pointer-events: none;\n}');var cn=function(n){var t,r,a,o=n.item,i=null===(t=o.image)||void 0===t?void 0:t.url;return e.jsxs("div",{className:"".concat(tn," ").concat(n.className||""),children:[!!i&&e.jsx("div",{className:rn,children:e.jsx("div",{className:an,children:e.jsx("img",{src:null===(r=o.image)||void 0===r?void 0:r.url,className:on,alt:null===(a=o.image)||void 0===a?void 0:a.accessibilityText})})}),e.jsxs("div",{className:sn,children:[!!o.url&&e.jsx("a",{href:o.url,className:ln,children:o.title}),!!o.url&&e.jsx("div",{className:dn,children:nn(o.url,40)}),e.jsx("div",{className:pn,children:o.description})]})]})},un="Carousel-module_xapp_search_carousel__NZTGa",mn="Carousel-module_xapp_search_carousel__prev__BdNo-",fn="Carousel-module_xapp_search_carousel__next__udR98",_n="Carousel-module_xapp_search_carousel__items__gRPzO",hn="Carousel-module_xapp_search_carousel__content__EoqyB";xe(".Carousel-module_xapp_search_carousel__NZTGa {\n display: flex;\n flex-flow: row nowrap;\n}\n.Carousel-module_xapp_search_carousel__prev__BdNo-, .Carousel-module_xapp_search_carousel__next__udR98 {\n flex: 0 0 32px;\n height: 32px;\n cursor: pointer;\n box-sizing: border-box;\n padding: 4px;\n align-self: center;\n}\n.Carousel-module_xapp_search_carousel__items__gRPzO {\n display: flex;\n position: relative;\n height: auto;\n align-items: stretch;\n scroll-behavior: smooth;\n -ms-overflow-style: none;\n -moz-overflow-style: none;\n -webkit-overflow-scrolling: touch;\n overflow-x: hidden;\n overflow-y: hidden;\n /* smartphones, touchscreens */\n}\n@media (hover: none) and (pointer: coarse) {\n .Carousel-module_xapp_search_carousel__items__gRPzO {\n overflow-x: auto;\n }\n}\n.Carousel-module_xapp_search_carousel__content__EoqyB {\n flex-grow: 1;\n}");var xn="CarouselItem-module_xapp_search_carousel_item__xNpwo";xe("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.CarouselItem-module_xapp_search_carousel_item__xNpwo {\n display: inline-flex;\n flex-direction: column;\n padding-right: 12px;\n flex-shrink: 0;\n width: 275px;\n}\n.CarouselItem-module_xapp_search_carousel_item__xNpwo:last-child {\n padding-right: 0;\n}\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .CarouselItem-module_xapp_search_carousel_item__xNpwo {\n min-width: 100%;\n max-width: 100%;\n }\n}");var gn=function(n){return e.jsx("div",{className:"".concat(xn," ").concat(n.className||""),children:n.children})},vn=function(t){var r=t.list,a=n.useRef(null),o=n.useCallback(function(e){var n=a.current;if(n)for(var t=n.getElementsByClassName("xapp_search_carousel-item"),r=n.getBoundingClientRect(),o=t.length,i=0;i<o;i++){var s=t.item(i);if(s){var d=s.getBoundingClientRect(),l=e({position:d.left-r.left,size:d.width});if(void 0!==l)return void(n.scrollLeft+=l)}}},[]),i=n.useCallback(function(){var e;o(function(n){if(n.position>-10)return e;e=n.position})},[o]),s=n.useCallback(function(){o(function(e){if(e.position>10)return e.position})},[o]);return e.jsxs("div",{className:un,children:[e.jsx(H,{icon:je,className:mn,onClick:i}),e.jsx("div",{ref:a,className:_n,children:r.items.map(function(n,t){return e.jsx(gn,{children:e.jsx(cn,{item:n,className:hn})},t)})}),e.jsx(H,{icon:Ee,className:fn,onClick:s})]})},bn=function(n){var t=n.carousel;return e.jsx("div",{children:e.jsx(vn,{list:t})})},yn="Cards-module_xapp_search_cards__aeR3S";xe(".Cards-module_xapp_search_cards__aeR3S {\n display: flex;\n flex-direction: column;\n}");var wn=function(n){var t=n.list;return e.jsx("div",{className:yn,children:t.items.map(function(n,t){return e.jsx(cn,{item:n},t)})})},Fn=function(n){var t=n.list,r=null==t?void 0:t.title;return e.jsxs("div",{children:[r?e.jsx(B,{label:r}):e.jsx(e.Fragment,{}),e.jsx(wn,{list:t})]})},kn=function(e,n,t){void 0===n&&(n="this"),void 0===t&&(t=[]);var r=t.map(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}).join("|"),a=new RegExp("\\b(?<!')(?!(?:if|else|length|for|while|includes|function|var|let|const|return|switch|case|do|true|false|null|undefined|typeof|new|this|void|delete|in|instanceof|export|import".concat(r?"|".concat(r):"",")\\b)([a-zA-Z_$][a-zA-Z0-9_$]*)\\b"),"g");return e.replace(a,"".concat(n,".$1"))},Sn=/#{([\s\S]+?)}/g;function Tn(e,n){var t=n;try{var r=JSON.stringify(e).replace(Sn,function(e,n){var r=n.trim();if(!(r in t))throw new Error('Missing template key "'.concat(r,'"'));var a=t[r];return null==a?"":String(a)}).replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t");return JSON.parse(r)}catch(e){}return e}var Cn={exports:{}};Cn.exports=function(){var e=1e3,n=6e4,t=36e5,r="millisecond",a="second",o="minute",i="hour",s="day",d="week",l="month",p="quarter",c="year",u="date",m="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var n=["th","st","nd","rd"],t=e%100;return"["+e+(n[(t-20)%10]||n[t]||n[0])+"]"}},x=function(e,n,t){var r=String(e);return!r||r.length>=n?e:""+Array(n+1-r.length).join(t)+e},g={s:x,z:function(e){var n=-e.utcOffset(),t=Math.abs(n),r=Math.floor(t/60),a=t%60;return(n<=0?"+":"-")+x(r,2,"0")+":"+x(a,2,"0")},m:function e(n,t){if(n.date()<t.date())return-e(t,n);var r=12*(t.year()-n.year())+(t.month()-n.month()),a=n.clone().add(r,l),o=t-a<0,i=n.clone().add(r+(o?-1:1),l);return+(-(r+(t-a)/(o?a-i:i-a))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:c,w:d,d:s,D:u,h:i,m:o,s:a,ms:r,Q:p}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},v="en",b={};b[v]=h;var y="$isDayjsObject",w=function(e){return e instanceof T||!(!e||!e[y])},F=function e(n,t,r){var a;if(!n)return v;if("string"==typeof n){var o=n.toLowerCase();b[o]&&(a=o),t&&(b[o]=t,a=o);var i=n.split("-");if(!a&&i.length>1)return e(i[0])}else{var s=n.name;b[s]=n,a=s}return!r&&a&&(v=a),a||!r&&v},k=function(e,n){if(w(e))return e.clone();var t="object"==typeof n?n:{};return t.date=e,t.args=arguments,new T(t)},S=g;S.l=F,S.i=w,S.w=function(e,n){return k(e,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var T=function(){function h(e){this.$L=F(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[y]=!0}var x=h.prototype;return x.parse=function(e){this.$d=function(e){var n=e.date,t=e.utc;if(null===n)return new Date(NaN);if(S.u(n))return new Date;if(n instanceof Date)return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var r=n.match(f);if(r){var a=r[2]-1||0,o=(r[7]||"0").substring(0,3);return t?new Date(Date.UTC(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(n)}(e),this.init()},x.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},x.$utils=function(){return S},x.isValid=function(){return!(this.$d.toString()===m)},x.isSame=function(e,n){var t=k(e);return this.startOf(n)<=t&&t<=this.endOf(n)},x.isAfter=function(e,n){return k(e)<this.startOf(n)},x.isBefore=function(e,n){return this.endOf(n)<k(e)},x.$g=function(e,n,t){return S.u(e)?this[n]:this.set(t,e)},x.unix=function(){return Math.floor(this.valueOf()/1e3)},x.valueOf=function(){return this.$d.getTime()},x.startOf=function(e,n){var t=this,r=!!S.u(n)||n,p=S.p(e),m=function(e,n){var a=S.w(t.$u?Date.UTC(t.$y,n,e):new Date(t.$y,n,e),t);return r?a:a.endOf(s)},f=function(e,n){return S.w(t.toDate()[e].apply(t.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(n)),t)},_=this.$W,h=this.$M,x=this.$D,g="set"+(this.$u?"UTC":"");switch(p){case c:return r?m(1,0):m(31,11);case l:return r?m(1,h):m(0,h+1);case d:var v=this.$locale().weekStart||0,b=(_<v?_+7:_)-v;return m(r?x-b:x+(6-b),h);case s:case u:return f(g+"Hours",0);case i:return f(g+"Minutes",1);case o:return f(g+"Seconds",2);case a:return f(g+"Milliseconds",3);default:return this.clone()}},x.endOf=function(e){return this.startOf(e,!1)},x.$set=function(e,n){var t,d=S.p(e),p="set"+(this.$u?"UTC":""),m=(t={},t[s]=p+"Date",t[u]=p+"Date",t[l]=p+"Month",t[c]=p+"FullYear",t[i]=p+"Hours",t[o]=p+"Minutes",t[a]=p+"Seconds",t[r]=p+"Milliseconds",t)[d],f=d===s?this.$D+(n-this.$W):n;if(d===l||d===c){var _=this.clone().set(u,1);_.$d[m](f),_.init(),this.$d=_.set(u,Math.min(this.$D,_.daysInMonth())).$d}else m&&this.$d[m](f);return this.init(),this},x.set=function(e,n){return this.clone().$set(e,n)},x.get=function(e){return this[S.p(e)]()},x.add=function(r,p){var u,m=this;r=Number(r);var f=S.p(p),_=function(e){var n=k(m);return S.w(n.date(n.date()+Math.round(e*r)),m)};if(f===l)return this.set(l,this.$M+r);if(f===c)return this.set(c,this.$y+r);if(f===s)return _(1);if(f===d)return _(7);var h=(u={},u[o]=n,u[i]=t,u[a]=e,u)[f]||1,x=this.$d.getTime()+r*h;return S.w(x,this)},x.subtract=function(e,n){return this.add(-1*e,n)},x.format=function(e){var n=this,t=this.$locale();if(!this.isValid())return t.invalidDate||m;var r=e||"YYYY-MM-DDTHH:mm:ssZ",a=S.z(this),o=this.$H,i=this.$m,s=this.$M,d=t.weekdays,l=t.months,p=t.meridiem,c=function(e,t,a,o){return e&&(e[t]||e(n,r))||a[t].slice(0,o)},u=function(e){return S.s(o%12||12,e,"0")},f=p||function(e,n,t){var r=e<12?"AM":"PM";return t?r.toLowerCase():r};return r.replace(_,function(e,r){return r||function(e){switch(e){case"YY":return String(n.$y).slice(-2);case"YYYY":return S.s(n.$y,4,"0");case"M":return s+1;case"MM":return S.s(s+1,2,"0");case"MMM":return c(t.monthsShort,s,l,3);case"MMMM":return c(l,s);case"D":return n.$D;case"DD":return S.s(n.$D,2,"0");case"d":return String(n.$W);case"dd":return c(t.weekdaysMin,n.$W,d,2);case"ddd":return c(t.weekdaysShort,n.$W,d,3);case"dddd":return d[n.$W];case"H":return String(o);case"HH":return S.s(o,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return f(o,i,!0);case"A":return f(o,i,!1);case"m":return String(i);case"mm":return S.s(i,2,"0");case"s":return String(n.$s);case"ss":return S.s(n.$s,2,"0");case"SSS":return S.s(n.$ms,3,"0");case"Z":return a}return null}(e)||a.replace(":","")})},x.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},x.diff=function(r,u,m){var f,_=this,h=S.p(u),x=k(r),g=(x.utcOffset()-this.utcOffset())*n,v=this-x,b=function(){return S.m(_,x)};switch(h){case c:f=b()/12;break;case l:f=b();break;case p:f=b()/3;break;case d:f=(v-g)/6048e5;break;case s:f=(v-g)/864e5;break;case i:f=v/t;break;case o:f=v/n;break;case a:f=v/e;break;default:f=v}return m?f:S.a(f)},x.daysInMonth=function(){return this.endOf(l).$D},x.$locale=function(){return b[this.$L]},x.locale=function(e,n){if(!e)return this.$L;var t=this.clone(),r=F(e,n,!0);return r&&(t.$L=r),t},x.clone=function(){return S.w(this.$d,this)},x.toDate=function(){return new Date(this.valueOf())},x.toJSON=function(){return this.isValid()?this.toISOString():null},x.toISOString=function(){return this.$d.toISOString()},x.toString=function(){return this.$d.toUTCString()},h}(),C=T.prototype;return k.prototype=C,[["$ms",r],["$s",a],["$m",o],["$H",i],["$W",s],["$M",l],["$y",c],["$D",u]].forEach(function(e){C[e[1]]=function(n){return this.$g(n,e[0],e[1])}}),k.extend=function(e,n){return e.$i||(e(n,T,k),e.$i=!0),k},k.locale=F,k.isDayjs=w,k.unix=function(e){return k(1e3*e)},k.en=b[v],k.Ls=b,k.p={},k}();var Dn,Rn,Nn=i(Cn.exports),In={exports:{}},An=i(In.exports=(Dn={year:0,month:1,day:2,hour:3,minute:4,second:5},Rn={},function(e,n,t){var r,a=function(e,n,t){void 0===t&&(t={});var r=new Date(e),a=function(e,n){void 0===n&&(n={});var t=n.timeZoneName||"short",r=e+"|"+t,a=Rn[r];return a||(a=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:t}),Rn[r]=a),a}(n,t);return a.formatToParts(r)},o=function(e,n){for(var r=a(e,n),o=[],i=0;i<r.length;i+=1){var s=r[i],d=s.type,l=s.value,p=Dn[d];p>=0&&(o[p]=parseInt(l,10))}var c=o[3],u=24===c?0:c,m=o[0]+"-"+o[1]+"-"+o[2]+" "+u+":"+o[4]+":"+o[5]+":000",f=+e;return(t.utc(m).valueOf()-(f-=f%1e3))/6e4},i=n.prototype;i.tz=function(e,n){if(void 0===e&&(e=r),!this.isValid())return this;var a,i=this.utcOffset(),s=this.toDate(),d=s.toLocaleString("en-US",{timeZone:e}),l=o(+s,e);if(Number(l)){if(a=t(d,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(l,!0),n){var p=a.utcOffset();a=a.add(i-p,"minute")}}else a=this.utcOffset(0,n);return a.$x.$timezone=e,a},i.offsetName=function(e){var n=this.$x.$timezone||t.tz.guess(),r=a(this.valueOf(),n,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return r&&r.value};var s=i.startOf;i.startOf=function(e,n){if(!this.$x||!this.$x.$timezone)return s.call(this,e,n);var r=t(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return s.call(r,e,n).tz(this.$x.$timezone,!0)},t.tz=function(e,n,a){var i=a&&n,s=a||n||r,d=o(+t(),s);if("string"!=typeof e)return t(e).tz(s);var l=t.utc(e,i).valueOf();if(Number.isNaN(l)){var p=t(NaN);return p.$x.$timezone=s,p}var c=function(e,n,t){var r=e-60*n*1e3,a=o(r,t);if(n===a)return[r,n];var i=o(r-=60*(a-n)*1e3,t);return a===i?[r,a]:[e-60*Math.min(a,i)*1e3,Math.max(a,i)]}(l,d,s),u=c[0],m=c[1],f=t(u).utcOffset(m);return f.$x.$timezone=s,f},t.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},t.tz.setDefault=function(e){r=e}})),Mn={exports:{}};Mn.exports=function(){var e="minute",n=/[+-]\d\d(?::?\d\d)?/g,t=/([+-]|\d\d)/g;return function(r,a,o){var i=a.prototype;o.utc=function(e){return new a({date:e,utc:!0,args:arguments})},i.utc=function(n){var t=o(this.toDate(),{locale:this.$L,utc:!0});return n?t.add(this.utcOffset(),e):t},i.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var s=i.parse;i.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var d=i.init;i.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else d.call(this)};var l=i.utcOffset;i.utcOffset=function(r,a){var o=this.$utils().u;if(o(r))return this.$u?0:o(this.$offset)?l.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(n);if(!r)return null;var a=(""+r[0]).match(t)||["-",0,0],o=a[0],i=60*+a[1]+ +a[2];return 0===i?0:"+"===o?i:-i}(r),null===r))return this;var i=Math.abs(r)<=16?60*r:r;if(0===i)return this.utc(a);var s=this.clone();if(a)return s.$offset=i,s.$u=!1,s;var d=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(s=this.local().add(i+d,e)).$offset=i,s.$x.$localOffset=d,s};var p=i.format;i.format=function(e){var n=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return p.call(this,n)},i.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var c=i.toDate;i.toDate=function(e){return"s"===e&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():c.call(this)};var u=i.diff;i.diff=function(e,n,t){if(e&&this.$u===e.$u)return u.call(this,e,n,t);var r=this.local(),a=o(e).local();return u.call(r,a,n,t)}}}();var jn=i(Mn.exports);Nn.extend(jn),Nn.extend(An);var En="preferred_date",zn="datetime",On="preferred_time_zone",Pn=/^[+-]?\d/,Ln=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],Hn=/^(\d{1,2}):(\d{2})/;function Un(e){var n=Hn.exec(e||"");if(!n)return-1;var t=Number(n[1]),r=Number(n[2]);return t>23||r>59?-1:60*t+r}function Bn(e){return e<10?"0".concat(e):"".concat(e)}function Wn(e){var n=(e%1440+1440)%1440;return"".concat(Bn(Math.floor(n/60)),":").concat(Bn(n%60))}function qn(e){return"".concat(e.getFullYear(),"-").concat(Bn(e.getMonth()+1),"-").concat(Bn(e.getDate()))}var $n=["longGeneric","long"];function Yn(e){if(!e)return"";for(var n=0,t=$n;n<t.length;n++){var r=t[n];try{var a=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:r}).formatToParts(new Date).find(function(e){return"timeZoneName"===e.type});if(a&&a.value)return a.value}catch(e){}}return e}function Gn(e,n,t){var r=Un(n),a=r<0?n:Wn(r),o="".concat(e,"T").concat(a);try{return Nn.tz(o,t).format()}catch(e){return Nn(o).format()}}function Vn(e){var n=null==e?void 0:e.timezone;if(n&&"string"==typeof n&&!Pn.test(n)){try{if(!Nn.tz("2026-01-01T00:00",n).isValid())return}catch(e){return}return n}}function Xn(e){var n=Un(e);if(n<0)return e;var t=Math.floor(n/60);return"".concat(t%12==0?12:t%12,":").concat(Bn(n%60)," ").concat(t<12?"AM":"PM")}function Jn(e){if(!e)return"";if(e.label)return e.label;var n=Xn(e.start);return e.end?"".concat(n," - ").concat(Xn(e.end)):n}function Kn(e){var n=null==e?void 0:e.horizonDays;return"number"==typeof n&&n>=0?n:60}function Zn(e){return!!e&&"object"==typeof e&&"string"==typeof e.start}function Qn(e,n,t,r){var a=n.leadTimeMinutes,o=a&&a>0?a:0,i=r.getTime()+6e4*o;return e.filter(function(e){return function(e,n,t){var r="".concat(e,"T").concat(n);try{return Nn.tz(r,t).valueOf()}catch(e){return Nn(r).valueOf()}}(t,e.start,n.timezone)>=i})}function et(e,n,t,r){if(void 0===t&&(t=new Date),!e||!n||isNaN(n.getTime()))return[];var a=qn(n);if(r)return Qn(o([],r[a]||[],!0),e,a,t);var i=function(e,n){return(e.exceptions||[]).find(function(e){return e.date===n})}(e,a);if(Array.isArray(e.offerings))return!i||i.spans&&0!==i.spans.length?Qn(e.offerings,e,a,t):[];for(var s=function(e){var n=new Date("".concat(e,"T00:00:00Z"));return isNaN(n.getTime())?void 0:Ln[n.getUTCDay()]}(a),d=i?i.spans||[]:s&&(e.days||{})[s]||[],l=e.slotMinutes&&e.slotMinutes>0?e.slotMinutes:30,p=e.durationMinutes&&e.durationMinutes>0?e.durationMinutes:void 0,c=[],u=0,m=d;u<m.length;u++){var f=m[u],_=Un(null==f?void 0:f.start),h=Un(null==f?void 0:f.end);if(!(_<0||h<0))for(var x=_;x<h&&!(p&&x+p>h);x+=l){var g={start:Wn(x)};p&&(g.end=Wn(x+p)),c.push(g)}}return Qn(c,e,a,t)}function nt(e,n,t,r){if(void 0===t&&(t=new Date),!e||!n||isNaN(n.getTime()))return!1;var a,o,i=qn(n),s=Kn(e),d=rt(e.timezone,t),l=(a=d,o=i,Math.round((Date.parse("".concat(o,"T00:00:00Z"))-Date.parse("".concat(a,"T00:00:00Z")))/864e5));return!(l<0||l>s)&&et(e,n,t,r).length>0}function tt(e,n,t,r){if(void 0===n&&(n=new Date),void 0===t&&(t=function(){return!1}),e)for(var a=rt(e.timezone,n),o=0;o<=Kn(e);o++){var i=Nn("".concat(a,"T00:00:00")).add(o,"day").toDate();if(nt(e,i,n,r)&&!t(i))return i}}function rt(e,n){try{return Nn(n).tz(e).format("YYYY-MM-DD")}catch(e){return qn(n)}}var at=["step-nomatch","step-nomatchaggregator","step-no-match-financing","step-payPerCallNoneAvailable"];function ot(e){var n=e.querySelectorAll('[id^="step-"]');if(0===n.length)return"empty";for(var t=!1,r=0;r<n.length;r++){var a=n[r].id;if(-1!==at.indexOf(a))return"no_coverage";if("step-loading"!==a)return"rendered";t=!0}return t?"loading":"empty"}var it="data-xapp-external-widget-origin";function st(e,r){void 0===r&&(r={});var a=r.onRendered,o=r.onNoRender,i=r.onError,s=r.onFallback,d=n.useState("pending"),l=d[0],p=d[1],c=n.useState(0),u=c[0],m=c[1],f=n.useRef(!1),_=n.useRef(!1),h=n.useRef(0),x=n.useRef(!1),g=n.useRef(r);return g.current=r,n.useEffect(function(){var n;if(e){var r=function(e){if(!e)return"unknown";try{return new URL(e).hostname}catch(e){return"unknown"}}(e.scriptSrc),d=t({},e.config);if(e.successCallbackKey){var l=e.successCallbackKey;d[l]=function(e){var n,t;if(_.current)return h.current+=1,ie("[ExternalWidget] Suppressed repeat ".concat(l," fire ")+"#".concat(h.current," from ").concat(r),e),void m(h.current);_.current=!0,null===(t=(n=g.current).onScheduled)||void 0===t||t.call(n,r,e)}}if(window[e.configGlobal]=d,!f.current){f.current=!0;var c=function(n,t){x.current||(x.current=!0,p(n),null==t||t(),"rendered"!==n&&e.fallbackStep&&(null==s||s(e.fallbackStep)))};if(!function(e){try{return"https:"===new URL(e).protocol}catch(e){return!1}}(e.scriptSrc))return ie("[ExternalWidget] Rejected script URL from unexpected origin: ".concat(e.scriptSrc)),void c("error",function(){return null==i?void 0:i(r)});var u,v,b,y=document.getElementById(e.anchorId),w=null!==(n=e.renderTimeoutMs)&&void 0!==n?n:8e3,F=0,k=function(){return c("no_render",function(){return null==o?void 0:o(r)})},S=function(e){if(!e)return!1;var n=ot(e);return"rendered"===n?(c("rendered",function(){return null==a?void 0:a(r)}),!0):"no_coverage"===n&&(k(),!0)},T=function(){if(!x.current){var n=document.getElementById(e.anchorId);if(!S(n))return n&&"loading"===ot(n)&&F<3?(F+=1,void(u=setTimeout(T,w))):void k()}};S(y)||(y&&(v=new MutationObserver(function(){S(document.getElementById(e.anchorId))})).observe(y,{childList:!0,subtree:!0}),u=setTimeout(T,w));try{b=new URL(e.scriptSrc).origin}catch(n){b=e.scriptSrc}if(!document.querySelector("script[".concat(it,'="').concat(b,'"]'))){var C=document.createElement("script");C.src=e.cacheBust?"".concat(e.scriptSrc).concat(e.scriptSrc.includes("?")?"&":"?","v=").concat(Date.now()):e.scriptSrc,C.setAttribute(it,b),C.onerror=function(){ie("[ExternalWidget] Failed to load script: ".concat(e.scriptSrc)),c("error",function(){return null==i?void 0:i(r)})},document.body.appendChild(C)}return function(){u&&clearTimeout(u),null==v||v.disconnect()}}}},[e]),{outcome:l,suppressedScheduledCount:u}}var dt={xapp_select_option:"FormFieldSelect-module_xapp_select_option__m-RaK",xapp_select_label:"FormFieldSelect-module_xapp_select_label__U70Ur",xapp_checkbox_select:"FormFieldSelect-module_xapp_checkbox_select__QccWu",xapp_select_input:"FormFieldSelect-module_xapp_select_input__UcGaw",xapp_select_icon:"FormFieldSelect-module_xapp_select_icon__BgEGq",xapp_select_helper:"FormFieldSelect-module_xapp_select_helper__T4Eyt",xapp_select_container:"FormFieldSelect-module_xapp_select_container__HWy4J",xapp_select_title_container:"FormFieldSelect-module_xapp_select_title_container__tnfQy"};xe("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.FormFieldSelect-module_xapp_select_option__m-RaK {\n display: inline-flex;\n align-items: center;\n vertical-align: middle;\n margin: 0 16px 0 -10px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n}\n\n.FormFieldSelect-module_xapp_select_label__U70Ur {\n font-family: var(--xapp-form-widget-checkbox-font-family, var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif));\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.5;\n letter-spacing: 0.00938em;\n}\n\n.FormFieldSelect-module_xapp_checkbox_select__QccWu {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n box-sizing: border-box;\n flex-shrink: 0;\n margin: 6px 0 !important;\n font-size: var(--xapp-form-widget-checkbox-font-size, 14px) !important;\n font-family: var(--xapp-form-widget-checkbox-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif)) !important;\n color: var(--xapp-form-widget-checkbox-color, #000000) !important;\n padding: 8px 10px !important;\n height: 32px !important;\n}\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormFieldSelect-module_xapp_checkbox_select__QccWu {\n height: 44px !important;\n }\n}\n\n.FormFieldSelect-module_xapp_select_input__UcGaw {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n margin: 0 !important;\n padding: 0 !important;\n opacity: 0;\n z-index: 1;\n cursor: inherit;\n -webkit-appearance: none;\n appearance: none;\n}\n\n.FormFieldSelect-module_xapp_select_icon__BgEGq {\n font-size: 24px;\n flex-shrink: 0;\n border-radius: 2px;\n}\n\n.FormFieldSelect-module_xapp_select_input__UcGaw:focus-visible + .FormFieldSelect-module_xapp_select_icon__BgEGq {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n\n.FormFieldSelect-module_xapp_select_helper__T4Eyt {\n margin: 3px 14px 0 !important;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif);\n font-size: 0.75rem !important;\n font-weight: 400;\n line-height: 1.66 !important;\n letter-spacing: 0.03333em;\n text-align: left;\n color: #d32f2f !important;\n}\n\n.FormFieldSelect-module_xapp_select_container__HWy4J {\n display: flex;\n flex-wrap: wrap; /* Allows items to wrap onto a new row */\n justify-content: center; /* Centers items horizontally */\n}\n\n.FormFieldSelect-module_xapp_select_title_container__tnfQy {\n text-align: center; /* Keeps the title over the centered options */\n}\n.FormFieldSelect-module_xapp_select_title_container__tnfQy p {\n font-family: var(--xapp-form-widget-checkbox-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n color: var(--xapp-form-widget-checkbox-color, #000000);\n}\n.FormFieldSelect-module_xapp_select_title_container__empty__zC4gk p {\n margin: 0;\n}");var lt=function(r){var a=r.field,i=r.onFieldChange,s=r.errorMessage,d=n.useState([]),l=d[0],p=d[1],c=n.useState(""),u=c[0],m=c[1],f=function(e){var n=e.target,t=n.name,r=n.checked;p(function(e){return r?o(o([],e,!0),[t],!1):e.filter(function(e){return e!==t})})},_=function(e){m(e.target.value)},h="xapp-select-".concat(n.useId()),x="".concat(h,"-title"),g="".concat(h,"-helper-text"),v=!!s;return n.useEffect(function(){a.radio?i(a.name,u?[u]:[]):i(a.name,l)},[l,u,a.name,a.radio,i]),e.jsxs("div",{style:t({},a.style),children:[e.jsx("div",{className:"".concat(dt.xapp_select_title_container).concat(a.title?"":"__empty"),children:e.jsx("p",{id:x,children:a.title})}),e.jsx("div",{className:dt.xapp_select_container,role:a.radio?"radiogroup":"group","aria-invalid":a.radio&&v||void 0,"aria-labelledby":a.title?x:void 0,"aria-describedby":v?g:void 0,children:a.items.map(function(n){var t=a.radio?u===n.id:l.includes(n.id),r=a.radio?t?Ue:Be:t?Le:He;return e.jsxs("label",{className:dt.xapp_select_option,children:[e.jsxs("span",{className:"".concat(dt.xapp_checkbox_select," ").concat(t?dt.xapp_checkbox_select_checked:""),children:[a.radio?e.jsx("input",{type:"radio",className:dt.xapp_select_input,name:a.name,value:n.id,checked:t,onChange:_}):e.jsx("input",{type:"checkbox",className:dt.xapp_select_input,name:n.id,checked:t,onChange:f,"aria-invalid":v||void 0}),e.jsx(r,{className:dt.xapp_select_icon})]}),e.jsx("span",{className:dt.xapp_select_label,children:n.label})]},n.id)})}),s&&e.jsx("p",{id:g,className:dt.xapp_select_helper,children:s})]})},pt={xapp_form_card:"FormFieldCard-module_xapp_form_card__AcVAf",xapp_form_card_body:"FormFieldCard-module_xapp_form_card_body__vuEht",xapp_form_card_header:"FormFieldCard-module_xapp_form_card_header__SS1vk",xapp_form_card_header_title:"FormFieldCard-module_xapp_form_card_header_title__xZzN5",xapp_form_card_header_subheader:"FormFieldCard-module_xapp_form_card_header_subheader__zOL4x",xapp_form_card_media:"FormFieldCard-module_xapp_form_card_media__o6A6S",xapp_form_card_content:"FormFieldCard-module_xapp_form_card_content__xk0qq",xapp_form_card_text:"FormFieldCard-module_xapp_form_card_text__L-a2X",xapp_form_card_text_h1:"FormFieldCard-module_xapp_form_card_text_h1__YgA4Z",xapp_form_card_text_h2:"FormFieldCard-module_xapp_form_card_text_h2__Tx0rO",xapp_form_card_text_h3:"FormFieldCard-module_xapp_form_card_text_h3__Js1Op",xapp_form_card_text_h4:"FormFieldCard-module_xapp_form_card_text_h4__9yry6",xapp_form_card_text_h5:"FormFieldCard-module_xapp_form_card_text_h5__toyJR",xapp_form_card_text_h6:"FormFieldCard-module_xapp_form_card_text_h6__0-eii",xapp_form_card_text_subtitle1:"FormFieldCard-module_xapp_form_card_text_subtitle1__NANlV",xapp_form_card_text_subtitle2:"FormFieldCard-module_xapp_form_card_text_subtitle2__MYx4s",xapp_form_card_text_body1:"FormFieldCard-module_xapp_form_card_text_body1__mLBa1",xapp_form_card_text_body2:"FormFieldCard-module_xapp_form_card_text_body2__LVGQo",xapp_form_card_text_inherit:"FormFieldCard-module_xapp_form_card_text_inherit__v3d-Y",xapp_form_card_text_button:"FormFieldCard-module_xapp_form_card_text_button__2t1tt",xapp_form_card_text_caption:"FormFieldCard-module_xapp_form_card_text_caption__GcGFA",xapp_form_card_text_overline:"FormFieldCard-module_xapp_form_card_text_overline__ial1O"};xe(".FormFieldCard-module_xapp_form_card__AcVAf img {\n width: 50% !important;\n}\n\n.FormFieldCard-module_xapp_form_card_body__vuEht {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n border-radius: 4px;\n background-color: transparent;\n font-family: var(--xapp-form-widget-card-font-family, var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif));\n}\n\n.FormFieldCard-module_xapp_form_card_header__SS1vk {\n display: flex;\n flex-direction: column;\n padding: 16px;\n font-family: inherit;\n}\n\n.FormFieldCard-module_xapp_form_card_header_title__xZzN5 {\n display: block;\n font-size: 1.5rem;\n font-weight: 400;\n line-height: 1.334;\n color: var(--xapp-form-widget-card-color, rgba(0, 0, 0, 0.87));\n}\n\n.FormFieldCard-module_xapp_form_card_header_subheader__zOL4x {\n display: block;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.5;\n color: rgba(0, 0, 0, 0.6);\n}\n\n.FormFieldCard-module_xapp_form_card_media__o6A6S {\n display: block;\n object-fit: cover;\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n}\n\n.FormFieldCard-module_xapp_form_card_content__xk0qq {\n padding: 4px;\n}\n\n.FormFieldCard-module_xapp_form_card_text__L-a2X {\n margin: 0;\n font-family: inherit;\n}\n\n.FormFieldCard-module_xapp_form_card_text_h1__YgA4Z {\n font-size: 6rem;\n font-weight: 300;\n line-height: 1.167;\n letter-spacing: -0.01562em;\n}\n\n.FormFieldCard-module_xapp_form_card_text_h2__Tx0rO {\n font-size: 3.75rem;\n font-weight: 300;\n line-height: 1.2;\n letter-spacing: -0.00833em;\n}\n\n.FormFieldCard-module_xapp_form_card_text_h3__Js1Op {\n font-size: 3rem;\n font-weight: 400;\n line-height: 1.167;\n letter-spacing: 0;\n}\n\n.FormFieldCard-module_xapp_form_card_text_h4__9yry6 {\n font-size: 2.125rem;\n font-weight: 400;\n line-height: 1.235;\n letter-spacing: 0.00735em;\n}\n\n.FormFieldCard-module_xapp_form_card_text_h5__toyJR {\n font-size: 1.5rem;\n font-weight: 400;\n line-height: 1.334;\n letter-spacing: 0;\n}\n\n.FormFieldCard-module_xapp_form_card_text_h6__0-eii {\n font-size: 1.25rem;\n font-weight: 500;\n line-height: 1.6;\n letter-spacing: 0.0075em;\n}\n\n.FormFieldCard-module_xapp_form_card_text_subtitle1__NANlV {\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.75;\n letter-spacing: 0.00938em;\n}\n\n.FormFieldCard-module_xapp_form_card_text_subtitle2__MYx4s {\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1.57;\n letter-spacing: 0.00714em;\n}\n\n.FormFieldCard-module_xapp_form_card_text_body1__mLBa1 {\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.5;\n letter-spacing: 0.00938em;\n}\n\n.FormFieldCard-module_xapp_form_card_text_body2__LVGQo {\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 1.43;\n letter-spacing: 0.01071em;\n}\n\n.FormFieldCard-module_xapp_form_card_text_inherit__v3d-Y {\n font: inherit;\n letter-spacing: inherit;\n}\n\n.FormFieldCard-module_xapp_form_card_text_button__2t1tt {\n display: block;\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1.75;\n letter-spacing: 0.02857em;\n text-transform: uppercase;\n}\n\n.FormFieldCard-module_xapp_form_card_text_caption__GcGFA {\n display: block;\n font-size: 0.75rem;\n font-weight: 400;\n line-height: 1.66;\n letter-spacing: 0.03333em;\n}\n\n.FormFieldCard-module_xapp_form_card_text_overline__ial1O {\n display: block;\n font-size: 0.75rem;\n font-weight: 400;\n line-height: 2.66;\n letter-spacing: 0.08333em;\n text-transform: uppercase;\n}");var ct={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p",button:"span",caption:"span",overline:"span"},ut={primary:"#1976d2",secondary:"#9c27b0",error:"#d32f2f",warning:"#ed6c02",info:"#0288d1",success:"#2e7d32",textPrimary:"rgba(0, 0, 0, 0.87)",textSecondary:"rgba(0, 0, 0, 0.6)",textDisabled:"rgba(0, 0, 0, 0.38)","text.primary":"rgba(0, 0, 0, 0.87)","text.secondary":"rgba(0, 0, 0, 0.6)","text.disabled":"rgba(0, 0, 0, 0.38)"};var mt=function(n){var r,a=n.field,o=a.variant&&ct[a.variant]?a.variant:"body2",i=ct[o];return e.jsx("div",{className:pt.xapp_form_card,children:e.jsxs("div",{className:pt.xapp_form_card_body,children:[a.header&&e.jsxs("div",{className:pt.xapp_form_card_header,children:[e.jsx("span",{className:pt.xapp_form_card_header_title,children:a.header.title}),a.header.subheader&&e.jsx("span",{className:pt.xapp_form_card_header_subheader,children:a.header.subheader})]}),a.media&&e.jsx("img",{className:pt.xapp_form_card_media,src:a.media.imageUrl,alt:a.media.alt,height:a.media.height,width:a.media.width}),a.text&&e.jsx("div",{className:pt.xapp_form_card_content,children:e.jsx(i,{className:"".concat(pt.xapp_form_card_text," ").concat(pt["xapp_form_card_text_".concat(o)]||""),"data-variant":o,style:t({whiteSpace:"pre-line",textAlign:a.align||"center",color:(r=a.color||"textSecondary",ut[r]||r)},a.style),children:a.text})})]})})},ft="FormFieldChips-module_xapp_checkbox_chip__8DRkb",_t="FormFieldChips-module_xapp_chip_label__Yua52",ht="FormFieldChips-module_xapp_chip_link__yhO-O",xt="FormFieldChips-module_xapp_chip_icon__Awxmc",gt="FormFieldChips-module_xapp_chips_helper__2gCIL",vt="FormFieldChips-module_xapp_chip_clicked__S8xmo",bt="FormFieldChips-module_xapp_chips_container__ZITF5",yt="FormFieldChips-module_xapp_chip_wrapper__AGfKl",wt="FormFieldChips-module_xapp_chips_title_container__VGw77";function Ft(e){return!!e&&!e.url}xe("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.FormFieldChips-module_xapp_checkbox_chip__8DRkb {\n display: inline-flex !important;\n align-items: center;\n justify-content: center;\n position: relative;\n box-sizing: border-box !important;\n max-width: 100%;\n vertical-align: middle;\n white-space: nowrap;\n border: 0 !important;\n outline: 0;\n line-height: 1.5 !important;\n text-transform: none !important;\n text-decoration: none !important;\n letter-spacing: normal;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n margin: 6px !important;\n font-size: var(--xapp-form-widget-chips-font-size, 0.875em) !important;\n font-family: var(--xapp-form-widget-chips-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif)) !important;\n padding: 8px 16px !important;\n height: 32px !important;\n border-radius: var(--xapp-form-widget-border-radius-lg, 16px) !important;\n min-width: 130px !important;\n background-color: var(--xapp-form-widget-chips-background-color, #c4dced) !important;\n color: var(--xapp-form-widget-chips-color, #000000) !important;\n cursor: pointer;\n transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out, transform 150ms ease-in-out !important;\n}\n.FormFieldChips-module_xapp_checkbox_chip__8DRkb:hover {\n box-shadow: var(--xapp-form-widget-box-shadow-subtle, 0 2px 8px rgba(0, 0, 0, 0.08)) !important;\n transform: translateY(-1px);\n}\n.FormFieldChips-module_xapp_checkbox_chip__8DRkb:active {\n transform: scale(0.98) !important;\n}\n.FormFieldChips-module_xapp_checkbox_chip__8DRkb:focus {\n outline: none;\n}\n.FormFieldChips-module_xapp_checkbox_chip__8DRkb:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormFieldChips-module_xapp_checkbox_chip__8DRkb {\n min-width: 100px !important;\n font-size: 16px !important;\n height: 44px !important;\n }\n}\n\n.FormFieldChips-module_xapp_chip_label__Yua52 {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n padding-left: 4px;\n padding-right: 4px;\n font-family: var(--xapp-form-widget-chips-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif)) !important;\n}\n\n.FormFieldChips-module_xapp_chip_link__yhO-O .FormFieldChips-module_xapp_chip_label__Yua52 {\n text-decoration: underline;\n}\n\n.FormFieldChips-module_xapp_chip_icon__Awxmc {\n flex-shrink: 0;\n font-size: 1.5rem;\n margin-left: 5px;\n margin-right: -6px;\n}\n\n.FormFieldChips-module_xapp_chips_helper__2gCIL {\n margin: 3px 14px 0 !important;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif);\n font-size: 0.75rem !important;\n font-weight: 400;\n line-height: 1.66 !important;\n letter-spacing: 0.03333em;\n text-align: left;\n color: #d32f2f !important;\n}\n\n.FormFieldChips-module_xapp_chip_clicked__S8xmo {\n background-color: var(--xapp-form-widget-chips-background-color-selected, var(--xapp-form-widget-chips-background-color-dark, #6e7ae1)) !important;\n color: var(--xapp-form-widget-chips-color-selected, #ffffff) !important;\n box-shadow: 0 2px 8px rgba(110, 122, 225, 0.3) !important;\n}\n\n.FormFieldChips-module_xapp_chips_container__ZITF5 {\n display: flex;\n width: 100%;\n flex-wrap: wrap;\n justify-content: center;\n}\n\n.FormFieldChips-module_xapp_chip_wrapper__AGfKl {\n flex: 0 0 calc(33.33% - 10px);\n margin: 0 2px;\n text-align: center;\n}\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormFieldChips-module_xapp_chip_wrapper__AGfKl {\n margin: 0 2px;\n }\n}\n\n.FormFieldChips-module_xapp_chips_title_container__VGw77 {\n margin: inherit;\n}\n.FormFieldChips-module_xapp_chips_title_container__VGw77 p {\n font-family: var(--xapp-form-widget-chips-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n font-size: 1.25em;\n font-weight: 600;\n line-height: 1.3;\n}\n.FormFieldChips-module_xapp_chips_title_container__empty__5seHa p {\n margin: 10px 0;\n}");var kt=function(r){var a=r.field,i=r.onFieldChange,s=r.errorMessage,d=r.value||r.field.items.filter(Ft).filter(function(e){return e.selected}).map(function(e){return e.id}),l=n.useState(d),p=l[0],c=l[1],u="xapp-chips-".concat(n.useId()),m="".concat(u,"-title"),f="".concat(u,"-helper-text");return n.useEffect(function(){"function"==typeof i&&i(a.name,p)},[p,a.name,i]),e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignContent:"center",alignItems:"center"},children:[e.jsx("div",{className:"".concat(wt).concat(a.title?"":"__empty"),style:t({},a.style),children:e.jsx("p",{id:m,children:a.title})}),e.jsx("div",{className:bt,role:"group","aria-labelledby":a.title?m:void 0,"aria-describedby":s?f:void 0,children:a.items.map(function(n,t){var r=p.includes(n.id),i="".concat(ft," ").concat(r?vt:""),s=e.jsxs(e.Fragment,{children:[r&&e.jsx(Pe,{className:xt}),e.jsx("span",{className:_t,children:n.label})]});return Ft(n)?e.jsx("div",{className:yt,children:e.jsx("button",{type:"button","aria-pressed":r,onClick:function(){return function(e){var n=p.includes(e);a.radio?c(function(t){return n?[]:[e]}):c(function(t){return n?t.filter(function(n){return n!==e}):o(o([],t,!0),[e],!1)})}(n.id)},className:i,children:s})},t):function(e){return!!e.url}(n)?e.jsx("div",{className:yt,children:e.jsx("a",{href:n.url,className:"".concat(i," ").concat(ht),children:s})},t):e.jsx(e.Fragment,{})})}),s&&e.jsx("p",{id:f,className:gt,children:s})]})},St={PHONE:{type:"tel",inputMode:"tel",autoComplete:"tel"},EMAIL:{type:"email",inputMode:"email",autoComplete:"email"},ZIP_CODE:{type:"text",inputMode:"numeric",autoComplete:"postal-code"},ADDRESS:{type:"text",inputMode:"text",autoComplete:"street-address"}},Tt={type:"text",inputMode:"text"},Ct={name:"name",fullname:"name",yourname:"name",customername:"name",contactname:"name",firstname:"given-name",fname:"given-name",givenname:"given-name",lastname:"family-name",lname:"family-name",surname:"family-name",familyname:"family-name",email:"email",emailaddress:"email",phone:"tel",phonenumber:"tel",telephone:"tel",tel:"tel",mobile:"tel",mobilephone:"tel",cellphone:"tel",zip:"postal-code",zipcode:"postal-code",postalcode:"postal-code",postcode:"postal-code",address:"street-address",streetaddress:"street-address",street:"street-address",city:"address-level2",town:"address-level2",state:"address-level1",province:"address-level1",company:"organization",companyname:"organization",organization:"organization",business:"organization",businessname:"organization"};function Dt(e){var n=e.format,r=e.name,a=e.isLastField,o=n?St[n]:void 0,i=a?"done":"next";if(o)return t(t({},o),{enterKeyHint:i});var s=function(e){if(e)return Ct[e.toLowerCase().replace(/[^a-z0-9]/g,"")]}(r);return t(t({},Tt),s?{autoComplete:s,enterKeyHint:i}:{enterKeyHint:i})}var Rt={xapp_text_input_container__title:"FormFieldTextInput-module_xapp_text_input_container__title__zeqDT",xapp_text_input_container__field:"FormFieldTextInput-module_xapp_text_input_container__field__B5K33",xapp_text_input_counter:"FormFieldTextInput-module_xapp_text_input_counter__oSgo1","xapp_text_input_counter--limit":"FormFieldTextInput-module_xapp_text_input_counter--limit__59Lau",xapp_text_input_text:"FormFieldTextInput-module_xapp_text_input_text__3rHVn",xapp_text_input_root:"FormFieldTextInput-module_xapp_text_input_root__LhuLl",xapp_text_input_focused:"FormFieldTextInput-module_xapp_text_input_focused__TMVDB",xapp_text_input_error:"FormFieldTextInput-module_xapp_text_input_error__t0djn",xapp_text_input_control:"FormFieldTextInput-module_xapp_text_input_control__GO3Jw",xapp_text_input_label:"FormFieldTextInput-module_xapp_text_input_label__mNAse",xapp_text_input_asterisk:"FormFieldTextInput-module_xapp_text_input_asterisk__sODty",xapp_text_input_helper:"FormFieldTextInput-module_xapp_text_input_helper__scKZk"};xe('/**\n * The phone breakpoint.\n *\n * Width alone cannot express "phone". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step\'s action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field\'s helper / error line. The metrics are MUI\'s FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.FormFieldTextInput-module_xapp_text_input_container__title__zeqDT p {\n margin: 0;\n font-family: var(--xapp-form-widget-text-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n}\n.FormFieldTextInput-module_xapp_text_input_container__field__B5K33 {\n position: relative;\n}\n\n.FormFieldTextInput-module_xapp_text_input_counter__oSgo1 {\n position: absolute;\n right: 36px;\n bottom: 8px;\n font-size: 12px;\n color: #666;\n font-family: var(--xapp-form-widget-text-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n transition: color 200ms ease-in-out;\n}\n.FormFieldTextInput-module_xapp_text_input_counter--limit__59Lau {\n color: #d32f2f;\n font-weight: 500;\n}\n\n.FormFieldTextInput-module_xapp_text_input_text__3rHVn {\n display: inline-flex;\n flex-direction: column;\n position: relative;\n width: 100%;\n min-width: 0;\n margin: 16px 0 8px;\n padding: 0;\n border: 0;\n box-sizing: border-box;\n vertical-align: top;\n}\n\n.FormFieldTextInput-module_xapp_text_input_root__LhuLl {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n box-sizing: border-box;\n font-family: var(--xapp-form-widget-text-font-family, var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif));\n font-size: 1rem;\n line-height: 1.4375em;\n cursor: text;\n}\n.FormFieldTextInput-module_xapp_text_input_root__LhuLl::before, .FormFieldTextInput-module_xapp_text_input_root__LhuLl::after {\n display: var(--xapp-form-widget-text-underline-display, block) !important;\n content: "";\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n}\n.FormFieldTextInput-module_xapp_text_input_root__LhuLl::before {\n border-bottom: 1px solid rgba(0, 0, 0, 0.42);\n transition: border-bottom-color 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n}\n.FormFieldTextInput-module_xapp_text_input_root__LhuLl::after {\n border-bottom: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n transform: scaleX(0);\n transition: transform 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;\n}\n.FormFieldTextInput-module_xapp_text_input_root__LhuLl:hover::before {\n border-bottom-color: rgba(0, 0, 0, 0.87);\n}\n\n.FormFieldTextInput-module_xapp_text_input_focused__TMVDB::after {\n transform: scaleX(1);\n}\n\n.FormFieldTextInput-module_xapp_text_input_error__t0djn .FormFieldTextInput-module_xapp_text_input_root__LhuLl::before, .FormFieldTextInput-module_xapp_text_input_error__t0djn .FormFieldTextInput-module_xapp_text_input_root__LhuLl::after {\n border-bottom-color: #d32f2f;\n}\n.FormFieldTextInput-module_xapp_text_input_error__t0djn .FormFieldTextInput-module_xapp_text_input_root__LhuLl::after {\n transform: scaleX(1);\n}\n\n.FormFieldTextInput-module_xapp_text_input_control__GO3Jw {\n display: block;\n min-width: 0;\n padding: 21px 12px 4px 12px !important;\n border: var(--xapp-form-widget-text-border-width, 0) solid var(--xapp-form-widget-text-border-color, transparent) !important;\n background-color: var(--xapp-form-widget-text-background-color, rgba(0, 0, 0, 0.06)) !important;\n border-radius: var(--xapp-form-widget-border-radius-sm, 8px) var(--xapp-form-widget-border-radius-sm, 8px) var(--xapp-form-widget-text-bottom-radius, 0) var(--xapp-form-widget-text-bottom-radius, 0) !important;\n transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out !important;\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87)) !important;\n font-size: var(--xapp-form-widget-text-font-size, 1rem) !important;\n font-family: var(--xapp-form-widget-text-font-family, var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif)) !important;\n line-height: 1.4375em !important;\n letter-spacing: inherit;\n height: auto !important;\n min-height: 0 !important;\n width: 100% !important;\n max-width: 100% !important;\n box-sizing: border-box !important;\n margin: 0 !important;\n margin-bottom: 0 !important;\n border-width: var(--xapp-form-widget-text-border-width, 0) !important;\n border-style: solid !important;\n box-shadow: none;\n -webkit-appearance: none !important;\n appearance: none !important;\n}\n.FormFieldTextInput-module_xapp_text_input_control__GO3Jw::placeholder {\n color: currentColor;\n opacity: 0.42;\n transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n}\n.FormFieldTextInput-module_xapp_text_input_control__GO3Jw[data-shrink=false]::placeholder {\n opacity: 0 !important;\n}\n.FormFieldTextInput-module_xapp_text_input_control__GO3Jw:hover {\n background-color: var(--xapp-form-widget-text-background-color-dark, rgba(0, 0, 0, 0.09)) !important;\n border-color: var(--xapp-form-widget-text-border-color-focus, var(--xapp-form-widget-text-border-color, transparent)) !important;\n}\n.FormFieldTextInput-module_xapp_text_input_control__GO3Jw:focus {\n background-color: var(--xapp-form-widget-text-background-color-dark, rgba(0, 0, 0, 0.09)) !important;\n border-color: var(--xapp-form-widget-text-border-color-focus, var(--xapp-form-widget-text-border-color, transparent)) !important;\n outline: none !important;\n box-shadow: inset 0 0 0 2px var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54)) !important;\n}\n\ntextarea.FormFieldTextInput-module_xapp_text_input_control__GO3Jw {\n resize: none;\n overflow: auto;\n}\n\n.FormFieldTextInput-module_xapp_text_input_label__mNAse {\n position: absolute !important;\n left: 0;\n top: 0;\n z-index: 1;\n display: block;\n max-width: calc(100% - 24px);\n margin: 0 !important;\n padding: 0 !important;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n pointer-events: none;\n transform-origin: top left;\n transform: translate(12px, 13px) scale(1) !important;\n transition: color 200ms cubic-bezier(0, 0, 0.2, 1) 0ms, transform 200ms cubic-bezier(0, 0, 0.2, 1) 0ms !important;\n color: rgba(0, 0, 0, 0.6);\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif) !important;\n font-size: 1rem !important;\n font-weight: 400 !important;\n line-height: 1.4375em !important;\n letter-spacing: 0.00938em;\n}\n.FormFieldTextInput-module_xapp_text_input_label__mNAse[data-shrink=true] {\n max-width: calc(133% - 24px);\n transform: translate(12px, 4px) scale(0.75) !important;\n}\n.FormFieldTextInput-module_xapp_text_input_focused__TMVDB .FormFieldTextInput-module_xapp_text_input_label__mNAse {\n color: var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n}\n.FormFieldTextInput-module_xapp_text_input_error__t0djn .FormFieldTextInput-module_xapp_text_input_label__mNAse {\n color: #d32f2f;\n}\n\n.FormFieldTextInput-module_xapp_text_input_error__t0djn .FormFieldTextInput-module_xapp_text_input_asterisk__sODty {\n color: #d32f2f;\n}\n\n.FormFieldTextInput-module_xapp_text_input_helper__scKZk {\n margin: 3px 14px 0 !important;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif);\n font-size: 0.75rem !important;\n font-weight: 400;\n line-height: 1.66 !important;\n letter-spacing: 0.03333em;\n text-align: left;\n color: #d32f2f !important;\n}');var Nt=function(r){var a=r.field,o=r.onFieldChange,i=r.value,s=r.errorMessage,d=r.required,l=r.isLastField,p=n.useState(i||""),c=p[0],u=p[1],m=n.useState(!1),f=m[0],_=m[1],h="xapp-text-".concat(n.useId()),x="".concat(h,"-helper-text"),g=n.useRef(null);n.useEffect(function(){o(a.name,c)},[a.name,o,c]),n.useEffect(function(){u(i||"")},[i]);var v=!!a.multiline&&!a.rows;n.useLayoutEffect(function(){var e=g.current;if(v&&e){e.style.height="auto";var n=parseFloat(getComputedStyle(e).lineHeight)||0,t=a.rowsMax&&n?n*a.rowsMax:1/0,r=Math.min(e.scrollHeight,t);r>0&&(e.style.height="".concat(r,"px"))}},[v,a.rowsMax,c]);var b=a.maxLength,y=c.length,w=void 0!==b&&y>=b,F=void 0!==b&&y>=.8*b,k=Dt({format:a.format,name:a.name,isLastField:l}),S=k.type,T=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)n.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(t[r[a]]=e[r[a]])}return t}(k,["type"]),C=f||c.length>0||!a.label,D=t(t({},T),{id:h,name:a.name,className:Rt.xapp_text_input_control,placeholder:a.placeholder,value:c,onChange:function(e){var n=e.target.value;u(n)},onFocus:function(){return _(!0)},onBlur:function(){return _(!1)},required:d,maxLength:a.maxLength||void 0,"aria-invalid":!!s,"aria-describedby":s?x:void 0,"data-shrink":C?"true":"false"});return e.jsxs("div",{className:Rt.xapp_text_input_container,children:[a.title&&e.jsx("div",{className:Rt.xapp_text_input_container__title,children:e.jsx("p",{children:a.title})}),e.jsxs("div",{className:Rt.xapp_text_input_container__field,children:[e.jsxs("div",{className:"".concat(Rt.xapp_text_input_text," ").concat(s?Rt.xapp_text_input_error:""),style:a.style,children:[e.jsxs("div",{className:"".concat(Rt.xapp_text_input_root," ").concat(f?Rt.xapp_text_input_focused:""," ").concat(a.multiline?Rt.xapp_text_input_multiline:""),children:[a.label&&e.jsxs("label",{htmlFor:h,className:Rt.xapp_text_input_label,"data-shrink":C?"true":"false",children:[a.label,d&&e.jsx("span",{className:Rt.xapp_text_input_asterisk,"aria-hidden":"true",children:" *"})]}),a.multiline?e.jsx("textarea",t({},D,{ref:g,rows:a.rows||1})):e.jsx("input",t({},D,{type:S}))]}),s&&e.jsx("p",{id:x,className:Rt.xapp_text_input_helper,children:s})]}),F&&e.jsxs("div",{className:"".concat(Rt.xapp_text_input_counter," ").concat(w?Rt["xapp_text_input_counter--limit"]:""),children:[y,"/",b]})]})]})},It="FormFieldDropdown-module_xapp_dropdown_container__4oRlr",At="FormFieldDropdown-module_xapp_dropdown_control__Dbrih",Mt="FormFieldDropdown-module_xapp_dropdown_select__CH-Gc",jt="FormFieldDropdown-module_xapp_dropdown_arrow__hX1wc",Et="FormFieldDropdown-module_xapp_dropdown_outline__fxBhy",zt="FormFieldDropdown-module_xapp_dropdown_label__chOkA",Ot="FormFieldDropdown-module_xapp_dropdown_error__-pG-B",Pt="FormFieldDropdown-module_xapp_dropdown_helper__uYy73",Lt="FormFieldDropdown-module_xapp_dropdown_free_form__h8qhc",Ht="FormFieldDropdown-module_xapp_dropdown_free_form_input__Fc7Ow";xe("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.FormFieldDropdown-module_xapp_dropdown_container__4oRlr {\n margin-top: 20px;\n margin-bottom: 20px;\n}\n\n.FormFieldDropdown-module_xapp_dropdown_control__Dbrih {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n box-sizing: border-box;\n border-radius: 4px;\n background-color: var(--xapp-form-widget-dropdown-background-color, transparent);\n}\n\n.FormFieldDropdown-module_xapp_dropdown_select__CH-Gc {\n display: block;\n width: 100% !important;\n max-width: 100% !important;\n height: auto !important;\n min-height: 1.4375em;\n box-sizing: border-box !important;\n margin: 0 !important;\n padding: 8.5px 32px 8.5px 14px !important;\n border: 0 !important;\n border-radius: 4px;\n outline: 0;\n background: transparent none !important;\n box-shadow: none !important;\n -webkit-appearance: none !important;\n -moz-appearance: none !important;\n appearance: none !important;\n cursor: pointer;\n color: var(--xapp-form-widget-dropdown-color, rgba(0, 0, 0, 0.87)) !important;\n font-size: var(--xapp-form-widget-dropdown-font-size, 14px);\n font-family: var(--xapp-form-widget-dropdown-font-family, var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif));\n line-height: 1.4375em !important;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormFieldDropdown-module_xapp_dropdown_select__CH-Gc {\n font-size: var(--xapp-form-widget-dropdown-font-size-mobile, 16px);\n }\n}\n\n.FormFieldDropdown-module_xapp_dropdown_arrow__hX1wc {\n position: absolute;\n right: 7px;\n top: calc(50% - 0.5em);\n font-size: 24px;\n color: rgba(0, 0, 0, 0.54);\n pointer-events: none;\n}\n\n.FormFieldDropdown-module_xapp_dropdown_outline__fxBhy {\n position: absolute;\n inset: -5px 0 0;\n margin: 0 !important;\n padding: 0 8px !important;\n min-width: 0;\n border: 1px solid rgba(0, 0, 0, 0.23) !important;\n border-radius: inherit;\n text-align: left;\n overflow: hidden;\n pointer-events: none;\n}\n.FormFieldDropdown-module_xapp_dropdown_outline__fxBhy legend {\n float: unset;\n display: block;\n width: auto;\n max-width: 100%;\n height: 11px;\n margin: 0 !important;\n padding: 0 !important;\n border: 0 !important;\n font-size: 0.75em;\n visibility: hidden;\n white-space: nowrap;\n}\n.FormFieldDropdown-module_xapp_dropdown_outline__fxBhy legend > span {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n opacity: 0;\n}\n\n.FormFieldDropdown-module_xapp_dropdown_control__Dbrih:hover .FormFieldDropdown-module_xapp_dropdown_outline__fxBhy {\n border-color: rgba(0, 0, 0, 0.87) !important;\n}\n\n.FormFieldDropdown-module_xapp_dropdown_control__Dbrih:focus-within .FormFieldDropdown-module_xapp_dropdown_outline__fxBhy {\n border: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54)) !important;\n}\n\n.FormFieldDropdown-module_xapp_dropdown_label__chOkA {\n position: absolute !important;\n left: 0;\n top: 0;\n z-index: 1;\n max-width: calc(133% - 32px);\n margin: 0 !important;\n padding: 0 !important;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n pointer-events: none;\n transform-origin: top left;\n transform: translate(14px, -9px) scale(0.75) !important;\n color: rgba(0, 0, 0, 0.6);\n font-family: var(--xapp-form-widget-dropdown-font-family, var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif));\n font-size: 1rem !important;\n font-weight: 400;\n line-height: 1.4375em;\n letter-spacing: 0.00938em;\n}\n.FormFieldDropdown-module_xapp_dropdown_control__Dbrih:focus-within .FormFieldDropdown-module_xapp_dropdown_label__chOkA {\n color: var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n}\n\n.FormFieldDropdown-module_xapp_dropdown_error__-pG-B .FormFieldDropdown-module_xapp_dropdown_outline__fxBhy, .FormFieldDropdown-module_xapp_dropdown_error__-pG-B:hover .FormFieldDropdown-module_xapp_dropdown_outline__fxBhy, .FormFieldDropdown-module_xapp_dropdown_error__-pG-B:focus-within .FormFieldDropdown-module_xapp_dropdown_outline__fxBhy {\n border-color: #d32f2f !important;\n}\n.FormFieldDropdown-module_xapp_dropdown_error__-pG-B .FormFieldDropdown-module_xapp_dropdown_label__chOkA, .FormFieldDropdown-module_xapp_dropdown_error__-pG-B:focus-within .FormFieldDropdown-module_xapp_dropdown_label__chOkA {\n color: #d32f2f;\n}\n\n.FormFieldDropdown-module_xapp_dropdown_helper__uYy73 {\n margin: 3px 14px 0 !important;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif);\n font-size: 0.75rem !important;\n font-weight: 400;\n line-height: 1.66 !important;\n letter-spacing: 0.03333em;\n text-align: left;\n color: #d32f2f !important;\n}\n\n.FormFieldDropdown-module_xapp_dropdown_free_form__h8qhc {\n margin-top: 8px;\n}\n\n.FormFieldDropdown-module_xapp_dropdown_free_form_input__Fc7Ow {\n display: block;\n width: 100% !important;\n max-width: 100% !important;\n height: auto !important;\n box-sizing: border-box !important;\n margin: 0 !important;\n padding: 8.5px 14px !important;\n border: 1px solid rgba(0, 0, 0, 0.23) !important;\n border-radius: 4px !important;\n background: var(--xapp-form-widget-dropdown-background-color, transparent) !important;\n box-shadow: none !important;\n color: var(--xapp-form-widget-dropdown-color, rgba(0, 0, 0, 0.87)) !important;\n font-size: var(--xapp-form-widget-dropdown-font-size, 14px);\n font-family: var(--xapp-form-widget-dropdown-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n line-height: 1.4375em !important;\n -webkit-appearance: none;\n appearance: none;\n}\n.FormFieldDropdown-module_xapp_dropdown_free_form_input__Fc7Ow:hover {\n border-color: rgba(0, 0, 0, 0.87) !important;\n}\n.FormFieldDropdown-module_xapp_dropdown_free_form_input__Fc7Ow:focus {\n outline: 0;\n border: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54)) !important;\n padding: 7.5px 13px !important;\n}\n.FormFieldDropdown-module_xapp_dropdown_free_form_input__Fc7Ow.FormFieldDropdown-module_xapp_dropdown_error__-pG-B {\n border-color: #d32f2f !important;\n}\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormFieldDropdown-module_xapp_dropdown_free_form_input__Fc7Ow {\n font-size: var(--xapp-form-widget-dropdown-font-size-mobile, 16px);\n }\n}");var Ut=function(t){var r=t.field,a=t.onFieldChange,o=t.errorMessage,i=t.required,s=t.freeFormErrorMessage,d="".concat(r.name,"-helper-text"),l="".concat(r.name,"-free-form"),p="".concat(l,"-helper-text"),c=n.useState(function(){var e=r.items.find(function(e){return e.selected});return(null==e?void 0:e.id)||"none"}),u=c[0],m=c[1],f=n.useState(""),_=f[0],h=f[1],x=n.useState(function(){var e=r.items.find(function(e){return e.selected});return(null==e?void 0:e.freeFormInput)||!1}),g=x[0],v=x[1],b=n.useRef(a);n.useEffect(function(){"development"===process.env.NODE_ENV&&b.current!==a&&console.warn("FormFieldDropdown: onFieldChange prop is not memoized. This may cause performance issues. Please wrap it in useCallback in the parent component."),b.current=a},[a]);var y=n.useMemo(function(){if(g){var e=r.items.find(function(e){return e.id===u});return(null==e?void 0:e.freeFormFieldName)||"message"}return null},[g,u,r.items]);return n.useEffect(function(){"none"!==u&&a(r.name,u),g&&_&&y&&a(y,_)},[u,_,g,r.name,y,a]),e.jsxs("div",{className:It,children:[e.jsxs("div",{className:"".concat(At," ").concat(o?Ot:""),children:[e.jsxs("label",{htmlFor:r.name,className:zt,children:[r.title,i&&e.jsx("span",{"aria-hidden":"true",children:" *"})]}),e.jsxs("select",{className:Mt,name:r.name,id:r.name,value:u,onChange:function(e){var n=e.target.value,t=r.items.find(function(e){return e.id===u});m(n);var o=r.items.find(function(e){return e.id===n});if(o&&o.freeFormInput)v(!0);else if(v(!1),(null==t?void 0:t.freeFormInput)&&_){var i=(null==t?void 0:t.freeFormFieldName)||"message";h(""),a(i,"")}},required:i,"aria-invalid":!!o,"aria-describedby":o?d:void 0,children:[e.jsx("option",{value:"none",children:"Select an option"}),r.items.map(function(n){return e.jsx("option",{value:n.id,children:n.label},n.id)})]}),e.jsx(We,{className:jt}),e.jsx("fieldset",{"aria-hidden":"true",className:Et,children:e.jsx("legend",{children:e.jsxs("span",{children:[r.title,i&&" *"]})})})]}),o&&e.jsx("p",{id:d,className:Pt,children:o}),g&&e.jsxs("div",{className:Lt,children:[e.jsx("input",{type:"text",id:l,className:"".concat(Ht," ").concat(s?Ot:""),required:!0,placeholder:"Please specify","aria-label":"Please specify",value:_,onChange:function(e){h(e.target.value)},maxLength:r.maxLength||void 0,"aria-invalid":!!s,"aria-describedby":s?p:void 0}),s&&e.jsx("p",{id:p,className:Pt,children:s})]})]})},Bt="Calendar-module_xapp_calendar__g0vk4",Wt="Calendar-module_xapp_calendar_header__rpFZl",qt="Calendar-module_xapp_calendar_label__JueKy",$t="Calendar-module_xapp_calendar_nav__RRUAJ",Yt="Calendar-module_xapp_calendar_nav_button__NTU0D",Gt="Calendar-module_xapp_calendar_week__7Ouri",Vt="Calendar-module_xapp_calendar_weeks__EdB4Q",Xt="Calendar-module_xapp_calendar_skeleton__yL-4v",Jt="Calendar-module_xapp_calendar_weekday__NzfbO",Kt="Calendar-module_xapp_calendar_day__Lb9-E",Zt="Calendar-module_xapp_calendar_day_outside__4XT5w",Qt="Calendar-module_xapp_calendar_day_today__uclpX",er="Calendar-module_xapp_calendar_day_selected__qi4gk",nr="Calendar-module_xapp_calendar_filler__8Rf7z",tr="Calendar-module_xapp_calendar_skeleton_day__yJl4Q";xe("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n/* The month calendar that replaced @mui/x-date-pickers' DateCalendar (#1745).\n *\n * The metrics are MUI's own - a 320px calendar, 36px round days with a 2px gap, a 40px header -\n * so an unthemed calendar looks as it did. Box properties carry !important where a host page's\n * `button { ... }` rules would otherwise reach in: the widget is embedded on sites we do not\n * control, and MUI's emotion styles used to win those fights for us. */\n.Calendar-module_xapp_calendar__g0vk4 {\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: 320px;\n max-width: 100%;\n margin: 0 auto;\n color: var(--xapp-form-widget-date-color, rgba(0, 0, 0, 0.87));\n font-family: var(--xapp-form-widget-date-font-family, var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif));\n}\n\n.Calendar-module_xapp_calendar_header__rpFZl {\n display: flex;\n align-items: center;\n min-height: 40px;\n max-height: 40px;\n margin: 12px 0 4px;\n padding: 0 12px 0 24px;\n}\n\n.Calendar-module_xapp_calendar_label__JueKy {\n flex: 1 1 auto;\n margin-right: auto;\n font-family: inherit;\n font-size: 1rem;\n font-weight: 500;\n line-height: 1.75;\n letter-spacing: 0.00938em;\n}\n\n.Calendar-module_xapp_calendar_nav__RRUAJ {\n display: flex;\n}\n\n.Calendar-module_xapp_calendar_nav_button__NTU0D {\n appearance: none;\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 0 !important;\n min-height: 0 !important;\n padding: 0 !important;\n border: 0 !important;\n background-image: none !important;\n box-shadow: none !important;\n font-family: inherit;\n text-transform: none;\n cursor: pointer;\n width: 40px !important;\n height: 40px !important;\n border-radius: 50% !important;\n background-color: transparent !important;\n color: rgba(0, 0, 0, 0.54) !important;\n font-size: 1.5rem;\n}\n.Calendar-module_xapp_calendar_nav_button__NTU0D:hover:not(:disabled) {\n background-color: rgba(0, 0, 0, 0.04) !important;\n}\n.Calendar-module_xapp_calendar_nav_button__NTU0D:disabled {\n color: rgba(0, 0, 0, 0.26) !important;\n cursor: default;\n}\n.Calendar-module_xapp_calendar_nav_button__NTU0D:focus {\n outline: none;\n}\n.Calendar-module_xapp_calendar_nav_button__NTU0D:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n\n.Calendar-module_xapp_calendar_week__7Ouri {\n display: flex;\n justify-content: center;\n align-items: center;\n margin: 2px 0;\n}\n\n.Calendar-module_xapp_calendar_weeks__EdB4Q,\n.Calendar-module_xapp_calendar_skeleton__yL-4v {\n min-height: 240px;\n}\n\n.Calendar-module_xapp_calendar_weekday__NzfbO {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 40px;\n margin: 0 2px;\n color: rgba(0, 0, 0, 0.6);\n font-size: 0.75rem;\n font-weight: 400;\n line-height: 1.66;\n letter-spacing: 0.03333em;\n text-align: center;\n}\n\n.Calendar-module_xapp_calendar_day__Lb9-E {\n appearance: none;\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 0 !important;\n min-height: 0 !important;\n padding: 0 !important;\n border: 0 !important;\n background-image: none !important;\n box-shadow: none !important;\n font-family: inherit;\n text-transform: none;\n cursor: pointer;\n width: 36px !important;\n height: 36px !important;\n margin: 0 2px !important;\n border-radius: 50% !important;\n background-color: transparent !important;\n color: inherit !important;\n font-size: 0.75rem;\n font-weight: 400;\n line-height: 1.66;\n letter-spacing: 0.03333em;\n transition: background-color 200ms ease-in-out;\n}\n.Calendar-module_xapp_calendar_day__Lb9-E:hover:not(:disabled) {\n background-color: rgba(25, 118, 210, 0.04) !important;\n}\n.Calendar-module_xapp_calendar_day__Lb9-E:disabled {\n color: rgba(0, 0, 0, 0.38) !important;\n cursor: default;\n}\n.Calendar-module_xapp_calendar_day__Lb9-E:focus {\n outline: none;\n}\n.Calendar-module_xapp_calendar_day__Lb9-E:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n\n.Calendar-module_xapp_calendar_day_outside__4XT5w {\n color: rgba(0, 0, 0, 0.6) !important;\n}\n\n.Calendar-module_xapp_calendar_day_today__uclpX:not(.Calendar-module_xapp_calendar_day_selected__qi4gk) {\n border: 1px solid rgba(0, 0, 0, 0.6) !important;\n}\n\n.Calendar-module_xapp_calendar_day_selected__qi4gk {\n background-color: var(--xapp-form-widget-date-background-color-selected, #1976d2) !important;\n color: #ffffff !important;\n font-weight: 500;\n}\n.Calendar-module_xapp_calendar_day_selected__qi4gk:hover:not(:disabled) {\n background-color: var(--xapp-form-widget-date-background-color-selected, #1976d2) !important;\n}\n\n.Calendar-module_xapp_calendar_filler__8Rf7z {\n width: 36px;\n height: 36px;\n margin: 0 2px;\n}\n\n.Calendar-module_xapp_calendar_skeleton_day__yJl4Q {\n width: 36px;\n height: 36px;\n margin: 0 2px;\n border-radius: 50%;\n background-color: rgba(0, 0, 0, 0.11);\n animation: Calendar-module_xapp_calendar_pulse__LTQW7 2s ease-in-out 0.5s infinite;\n}\n\n@keyframes Calendar-module_xapp_calendar_pulse__LTQW7 {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.4;\n }\n 100% {\n opacity: 1;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .Calendar-module_xapp_calendar_skeleton_day__yJl4Q {\n animation: none;\n }\n}\n/* Phones: 44x44 days, weekday labels and month arrows (WCAG 2.5.8, Apple's HIG). Date selection\n * is the most expensive mis-tap in this funnel. Seven 44px columns only fit the 320px calendar\n * once the 2px side gaps go, so the gap goes rather than the cell. */\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .Calendar-module_xapp_calendar_day__Lb9-E {\n width: 44px !important;\n height: 44px !important;\n margin: 0 !important;\n font-size: 0.875rem;\n }\n .Calendar-module_xapp_calendar_weekday__NzfbO {\n width: 44px;\n height: 44px;\n margin: 0;\n }\n .Calendar-module_xapp_calendar_filler__8Rf7z,\n .Calendar-module_xapp_calendar_skeleton_day__yJl4Q {\n width: 44px;\n height: 44px;\n margin: 0;\n }\n .Calendar-module_xapp_calendar_nav_button__NTU0D {\n width: 44px !important;\n height: 44px !important;\n }\n .Calendar-module_xapp_calendar_weeks__EdB4Q,\n .Calendar-module_xapp_calendar_skeleton__yL-4v {\n min-height: 288px;\n }\n}");function rr(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.filter(function(e){return!!e}).join(" ")}var ar=function(t){var r=t.value,a=t.onChange,o=t.shouldDisableDate,i=t.minDate,s=t.maxDate,d=t.referenceDate,l=t.loading,p=t.showDaysOutsideCurrentMonth,c=t.fixedWeekNumber,u=t.getDayClassName,m=t.classes,f=void 0===m?{}:m,_=t.className,h=n.useMemo(function(){return(t.today||Nn()).startOf("day")},[t.today?t.today.format("YYYY-MM-DD"):void 0]),x=n.useId(),g=n.useRef(null),v=n.useRef(!1),b=n.useState(function(){return(r||d||h).startOf("month")}),y=b[0],w=b[1],F=n.useState(function(){return(r||h).startOf("day")}),k=F[0],S=F[1],T=r?r.format("YYYY-MM-DD"):void 0;n.useEffect(function(){r&&(S(r.startOf("day")),w(function(e){return r.isSame(e,"month")?e:r.startOf("month")}))},[T]);var C=n.useCallback(function(e){return!!i&&e.isBefore(i,"day")||!!s&&e.isAfter(s,"day")},[i,s]),D=n.useCallback(function(e){return C(e)||!!o&&o(e)},[C,o]),R=n.useCallback(function(e,n,t){for(var r=e.isBefore(n,"day")?n:e.isAfter(t,"day")?t:e,a=t.diff(n,"day"),o=0;o<=a;o++)for(var i=0,s=[r.add(-o,"day"),r.add(o,"day")];i<s.length;i++){var d=s[i];if(!d.isBefore(n,"day")&&!d.isAfter(t,"day")&&!D(d))return d}},[D]),N=n.useMemo(function(){return k.isSame(y,"month")&&!D(k)?k:R(k,y.startOf("month"),y.endOf("month").startOf("day"))},[k,y,D,R]);n.useEffect(function(){var e;if(v.current){v.current=!1;var n=String(k.valueOf()),t=null===(e=g.current)||void 0===e?void 0:e.querySelector('[data-timestamp="'.concat(n,'"]'));null==t||t.focus()}},[k,y]);var I=function(e,n){for(var t=e,r=0;r<366;r+=Math.abs(n)){if(t=t.add(n,"day"),C(t))return;if(!D(t))return t}},A=function(e,n){var t=e.add(n,"month");return R(t,t.startOf("month"),t.endOf("month").startOf("day"))},M=function(e,n){var t;switch(e.key){case"ArrowLeft":t=I(n,-1);break;case"ArrowRight":t=I(n,1);break;case"ArrowUp":t=I(n,-7);break;case"ArrowDown":t=I(n,7);break;case"Home":case"End":var r="Home"===e.key?n.startOf("week"):n.endOf("week").startOf("day");p||r.isSame(n,"month")||(r="Home"===e.key?n.startOf("month"):n.endOf("month").startOf("day")),t=function(e,n){for(var t=n.isBefore(e,"day")?-1:1,r=Math.abs(n.diff(e,"day")),a=0;a<=r;a++){var o=e.add(a*t,"day");if(!D(o))return o}}(r,n);break;case"PageUp":t=A(n,-1);break;case"PageDown":t=A(n,1);break;default:return}e.preventDefault(),t&&!t.isSame(n,"day")&&function(e){v.current=!0,S(e),e.isSame(y,"month")||w(e.startOf("month"))}(t)},j=!!i&&!y.isAfter(i,"month"),E=!!s&&!y.isBefore(s,"month"),z=n.useMemo(function(){return function(e,n){var t=e.startOf("month"),r=Math.ceil((t.day()+t.daysInMonth())/7),a=Math.max(r,n||0),o=t.startOf("week");return Array.from({length:a},function(e,n){return Array.from({length:7},function(e,t){return o.add(7*n+t,"day")})})}(y,c)},[y,c]),O=z[0];return e.jsxs("div",{className:rr(Bt,_),"data-xapp-calendar":"",children:[e.jsxs("div",{className:rr(Wt,f.header),children:[e.jsx("span",{"aria-live":"polite",className:qt,id:x,children:y.format("MMMM YYYY")}),e.jsxs("div",{className:$t,children:[e.jsx("button",{"aria-label":"Previous month",className:Yt,disabled:j,onClick:function(){return w(y.add(-1,"month"))},type:"button",children:e.jsx(qe,{})}),e.jsx("button",{"aria-label":"Next month",className:Yt,disabled:E,onClick:function(){return w(y.add(1,"month"))},type:"button",children:e.jsx($e,{})})]})]}),e.jsxs("div",{"aria-busy":!!l||void 0,"aria-labelledby":x,ref:g,role:"grid",children:[e.jsx("div",{className:Gt,role:"row",children:O.map(function(n){return e.jsx("span",{"aria-label":n.format("dddd"),className:rr(Jt,f.weekday),role:"columnheader",children:n.format("dd").charAt(0)},n.day())})}),l?e.jsx("div",{"aria-hidden":"true",className:Xt,children:z.map(function(n,t){return e.jsx("div",{className:Gt,children:n.map(function(n){return e.jsx("span",{className:tr},n.valueOf())})},t)})}):e.jsx("div",{className:rr(Vt,f.weeks),role:"rowgroup",children:z.map(function(n,t){return e.jsx("div",{className:Gt,role:"row",children:n.map(function(n){var t=!n.isSame(y,"month");if(t&&!p)return e.jsx("span",{className:nr,role:"gridcell"},n.valueOf());var o=D(n),i=!!r&&n.isSame(r,"day"),s=n.isSame(h,"day");return e.jsx("button",{"aria-current":s?"date":void 0,"aria-label":n.format("dddd, MMMM D, YYYY"),"aria-selected":i,className:rr(Kt,f.day,i&&er,i&&f.daySelected,s&&Qt,s&&f.dayToday,t&&Zt,u&&u(n,o)),"data-timestamp":n.valueOf(),disabled:o,onClick:function(){return function(e){S(e),e.isSame(y,"month")||w(e.startOf("month")),a(e)}(n)},onKeyDown:function(e){return M(e,n)},role:"gridcell",tabIndex:N&&n.isSame(N,"day")?0:-1,type:"button",children:n.date()},n.valueOf())})},t)})})]})]})};function or(e){if(e){var n=e.split(",").map(function(e){return e.trim()}).filter(function(e){return!!e});return n.length>0?n:void 0}}function ir(e,n){if(!n||0===n.length)return!1;var t=e.format("YYYY-MM-DD"),r=e.format("dddd");return n.some(function(e){return sr(t,e)||sr(r,e)})}function sr(e,n){var t=n.split("*").map(dr).join(".*");return new RegExp("^".concat(t,"$")).test(e)}function dr(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function lr(e,n){return Array.isArray(n.availableDays)&&n.availableDays.length>0?n.availableDays.map(function(e){return e.toLowerCase()}).includes(e.format("dddd").toLowerCase()):0!==e.day()&&6!==e.day()}var pr="FormFieldDate-module_xapp_date_picker_container__d8LYB",cr="FormFieldDate-module_xapp_date_picker__Rvtj1",ur="FormFieldDate-module_xapp_date_picker_header__-IdYL",mr="FormFieldDate-module_xapp_date_picker_weekday__G7-Zs",fr="FormFieldDate-module_xapp_date_picker_weeks__GeGSq",_r="FormFieldDate-module_xapp_date_picker_day__NFNvS",hr="FormFieldDate-module_xapp_date_picker_day_today__mxuN9",xr="FormFieldDate-module_xapp_date_picker_past__ECo-S",gr="FormFieldDate-module_xapp_date_picker_available__2Xtlu",vr="FormFieldDate-module_xapp_date_picker_day_selected__10ZGY",br="FormFieldDate-module_xapp_date_picker_loading__z6hMR",yr="FormFieldDate-module_xapp_date_picker_error__GFfVJ";xe("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.FormFieldDate-module_xapp_date_picker_container__d8LYB {\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n font-family: var(--xapp-form-widget-date-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n}\n\n/* The compact look this field has always shipped with, now on the shared Calendar (#1745).\n *\n * Until #1745 these rules targeted MUI's class names. The published bundle keeps CSS-module\n * names unchanged, so there they matched and drew 30px days tinted by availability; Storybook\n * hashes the names, so it never showed them. The Calendar's parts carry these classes directly\n * now, so both builds draw the production look.\n *\n * Each rule is scoped under `.xapp_date_picker` so it outranks the Calendar's own rule for the\n * same part whichever order the two stylesheets load in. */\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_header__-IdYL {\n margin-top: 10px;\n margin-bottom: 4px;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_weekday__G7-Zs {\n width: 30px;\n height: 32px;\n font-weight: 600;\n font-size: 0.75rem;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_weeks__GeGSq {\n min-height: 200px;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_day__NFNvS {\n width: 30px !important;\n height: 30px !important;\n font-weight: 600;\n font-size: 0.75rem;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_day__NFNvS:hover:not(:disabled) {\n background-color: #cfd8da !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_day__NFNvS:disabled {\n font-weight: 300;\n text-decoration: line-through;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_day_today__mxuN9 {\n font-weight: bold;\n color: #321aa3 !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_past__ECo-S {\n background-color: rgba(48, 49, 53, 0.2392156863) !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_available__2Xtlu {\n background-color: rgba(0, 255, 21, 0.1607843137) !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_day_selected__10ZGY {\n background-color: var(--xapp-form-widget-date-background-color-selected, #1976d2) !important;\n color: #fff !important;\n font-weight: 600;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_day_selected__10ZGY:hover:not(:disabled) {\n background-color: var(--xapp-form-widget-date-background-color-selected, #1976d2) !important;\n}\n\n.FormFieldDate-module_xapp_date_picker_loading__z6hMR {\n margin: 3px 14px 0 !important;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif);\n font-size: 0.75rem !important;\n font-weight: 400;\n line-height: 1.66 !important;\n letter-spacing: 0.03333em;\n text-align: left;\n color: #d32f2f !important;\n margin: 14px 0 -14px 98px !important;\n color: inherit !important;\n}\n\n.FormFieldDate-module_xapp_date_picker_error__GFfVJ {\n margin: 3px 14px 0 !important;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif);\n font-size: 0.75rem !important;\n font-weight: 400;\n line-height: 1.66 !important;\n letter-spacing: 0.03333em;\n text-align: left;\n color: #d32f2f !important;\n margin: 14px 0 -14px 14px !important;\n}\n\n/* Mobile: 44x44 tappable day cells.\n *\n * Date selection is the most expensive mis-tap in this funnel - the visitor either books the\n * wrong day or gives up - and the 30px cells above are under the 44x44 that Apple's HIG and\n * WCAG 2.5.8 ask for. Seven 44px columns fit the 320px calendar once the 2px side margins go,\n * hence dropping the gap rather than the cell. */\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_day__NFNvS {\n width: 44px !important;\n height: 44px !important;\n margin: 0 !important;\n font-size: 0.875rem;\n }\n .FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_weekday__G7-Zs {\n width: 44px;\n height: 44px;\n margin: 0;\n }\n .FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_weeks__GeGSq {\n min-height: 264px;\n }\n}");var wr={blockWeekends:!0,blockCurrentDay:!0,blockNextBusinessDays:2},Fr=function(t){var r=Nn().add(2,"month"),a=Nn(),o=t.field,i=t.onFieldChange,s=t.errorMessage,d=t.busyDays,l=t.loading,p=n.useState(),c=p[0],u=p[1];n.useEffect(function(){i(o.name,c)},[c,o.name,i]);var m=or(d),f=n.useCallback(function(e){if(!m)return function(e,n,t){if(n.blockWeekends&&(0===e.day()||6===e.day()))return!0;if(n.blockCurrentDay&&e.isSame(t,"day"))return!0;if(n.blockNextBusinessDays){for(var r=t,a=0,o=0;a<n.blockNextBusinessDays&&o<366;)o++,lr(r=r.add(1,"day"),n)&&a++;if(e.isBefore(r,"day"))return!0}return!!(n.currentDayAvailableUntil&&e.isSame(t,"day")&&t.format("HH:mm")>n.currentDayAvailableUntil)||!(!(Array.isArray(n.availableDays)&&n.availableDays.length>0)||n.availableDays.map(function(e){return e.toLowerCase()}).includes(e.format("dddd").toLowerCase()))}(e,Object.keys((null==o?void 0:o.defaultBusyDays)||{}).length>0?o.defaultBusyDays||{}:wr,a);try{return ir(e,m)}catch(e){console.error("shouldDisableDate: ".concat(e))}return!1},[a,m,o.defaultBusyDays]);return e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignContent:"center",alignItems:"center"},children:[e.jsx("div",{className:pr,children:e.jsx(ar,{className:cr,classes:{header:ur,weekday:mr,weeks:fr,day:_r,daySelected:vr,dayToday:hr},fixedWeekNumber:6,getDayClassName:function(e,n){var t=e.isBefore(a,"day"),o=e.isAfter(r,"day");return t||o?xr:n?void 0:gr},loading:l,maxDate:r,minDate:a,onChange:function(e){u(e)},shouldDisableDate:f,showDaysOutsideCurrentMonth:!0,today:a,value:c})}),l&&e.jsx("p",{className:br,children:"Getting latest availability..."}),!l&&s&&e.jsx("p",{className:yr,children:s})]})},kr=/^\d{4}-\d{2}-\d{2}/;function Sr(e){if(!e)return"";if("string"==typeof e&&kr.test(e))return e.slice(0,10);var n=e instanceof Date?e:new Date(e);return isNaN(n.getTime())?"":n.toISOString().slice(0,10)}var Tr=function(r){var a,o,i=r.field,s=r.onFieldChange,d=r.value,l=r.errorMessage,p=r.required,c=r.isLastField,u=Sr((null==d?void 0:d.from)||(null===(a=i.preselecteDates)||void 0===a?void 0:a.from)),m=Sr((null==d?void 0:d.to)||(null===(o=i.preselecteDates)||void 0===o?void 0:o.to)),f=n.useState({from:u,to:m}),_=f[0],h=f[1];n.useEffect(function(){h({from:u,to:m})},[u,m]);var x=function(e){h(e),s(i.name,e.from||e.to?e:void 0)},g="".concat(i.name,"-from"),v="".concat(i.name,"-to");return e.jsxs("div",{style:i.style,children:[i.title&&e.jsx("h2",{children:i.title}),e.jsx("label",{htmlFor:g,children:"From"}),e.jsx("input",{id:g,name:g,type:"date",value:_.from,onChange:function(e){x(t(t({},_),{from:e.target.value}))},max:_.to||void 0,required:p,enterKeyHint:"next"}),e.jsx("label",{htmlFor:v,children:"To"}),e.jsx("input",{id:v,name:v,type:"date",value:_.to,onChange:function(e){x(t(t({},_),{to:e.target.value}))},min:_.from||void 0,required:p,enterKeyHint:c?"done":"next"}),l&&e.jsx("p",{children:l})]})},Cr="FormFieldDateTime-module_xapp_datetime__rPNwE",Dr="FormFieldDateTime-module_xapp_datetime_title__VNHwW",Rr="FormFieldDateTime-module_xapp_datetime_body__ta9Ui",Nr="FormFieldDateTime-module_xapp_datetime_calendar__Ge5W6",Ir="FormFieldDateTime-module_xapp_datetime_times_column__UY7ho",Ar="FormFieldDateTime-module_xapp_datetime_timezone__ZE56Q",Mr="FormFieldDateTime-module_xapp_datetime_times__rhU-O",jr="FormFieldDateTime-module_xapp_datetime_group__CeL-E",Er="FormFieldDateTime-module_xapp_datetime_time__x5lxl",zr="FormFieldDateTime-module_xapp_datetime_time_selected__IRT84",Or="FormFieldDateTime-module_xapp_datetime_message__4rf-S",Pr="FormFieldDateTime-module_xapp_datetime_error__bTyZK";xe("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.FormFieldDateTime-module_xapp_datetime__rPNwE {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n font-family: var(--xapp-form-widget-date-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n}\n\n.FormFieldDateTime-module_xapp_datetime_title__VNHwW {\n margin: 0 0 8px;\n font-family: inherit;\n font-size: 1rem;\n text-align: center;\n}\n\n/* Calendar and column side by side on a wide enough viewport.\n *\n * `flex-wrap` rather than a fixed two-column grid: the pair has to be allowed to fall\n * onto two rows rather than force the step to scroll sideways, which is the failure the\n * mobile rule below would otherwise only fix at the breakpoint. */\n.FormFieldDateTime-module_xapp_datetime_body__ta9Ui {\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n align-items: flex-start;\n gap: 16px;\n width: 100%;\n}\n\n.FormFieldDateTime-module_xapp_datetime_calendar__Ge5W6 {\n flex: 0 0 auto;\n}\n\n/* The zone notice and the column travel together, so the sizing the column used to own\n * lives here now - the column itself keeps only the scrolling, which the notice must\n * stay outside of or it scrolls away from the times it describes. */\n.FormFieldDateTime-module_xapp_datetime_times_column__UY7ho {\n flex: 1 1 160px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 0;\n max-width: 240px;\n}\n\n.FormFieldDateTime-module_xapp_datetime_timezone__ZE56Q {\n margin: 0;\n padding: 0 4px;\n font-size: var(--xapp-form-widget-date-font-size, 14px);\n text-align: left;\n}\n\n/* A column of buttons rather than chips: a half-hour schedule produces 16 or more\n * offerings and chips wrap into an unreadable block past a handful. */\n.FormFieldDateTime-module_xapp_datetime_times__rhU-O {\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 0;\n max-height: 320px;\n overflow-y: auto;\n padding: 4px;\n}\n\n.FormFieldDateTime-module_xapp_datetime_group__CeL-E {\n position: sticky;\n top: 0;\n z-index: 1;\n margin: 4px 0 0;\n padding: 4px 0;\n background-color: #ffffff;\n font-family: inherit;\n font-size: var(--xapp-form-widget-date-font-size, 14px);\n font-weight: 600;\n text-align: left;\n}\n\n.FormFieldDateTime-module_xapp_datetime_time__x5lxl {\n flex: 0 0 auto;\n min-height: 44px;\n padding: 8px 12px;\n border: 1px solid var(--xapp-form-widget-chips-background-color, #c4dced);\n border-radius: var(--xapp-form-widget-border-radius-sm, 8px);\n background-color: transparent;\n /* Not $form-chips-color: that is the chips' FOREGROUND, authored to sit on the filled\n * chip background. This button is transparent, so a theme whose chips are dark with\n * white text - the common case - renders white on white and the times vanish. The\n * body text colour is the one that belongs on the form's own background. */\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87));\n font-family: var(--xapp-form-widget-chips-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n font-size: var(--xapp-form-widget-chips-font-size, 0.875em);\n font-weight: 600;\n cursor: pointer;\n transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out, transform 150ms ease-in-out;\n}\n.FormFieldDateTime-module_xapp_datetime_time__x5lxl:hover {\n background-color: var(--xapp-form-widget-chips-background-color, #c4dced);\n /* Background and foreground move together: whenever the chip background is\n * applied, the colour the theme paired with it applies too. */\n color: var(--xapp-form-widget-chips-color, #000000);\n box-shadow: var(--xapp-form-widget-box-shadow-subtle, 0 2px 8px rgba(0, 0, 0, 0.08));\n}\n.FormFieldDateTime-module_xapp_datetime_time__x5lxl:active {\n transform: scale(0.98);\n}\n.FormFieldDateTime-module_xapp_datetime_time__x5lxl:focus {\n outline: none;\n}\n.FormFieldDateTime-module_xapp_datetime_time__x5lxl:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormFieldDateTime-module_xapp_datetime_time__x5lxl {\n font-size: 16px;\n }\n}\n\n.FormFieldDateTime-module_xapp_datetime_time_selected__IRT84 {\n border-color: var(--xapp-form-widget-chips-background-color-selected, var(--xapp-form-widget-chips-background-color-dark, #6e7ae1));\n background-color: var(--xapp-form-widget-chips-background-color-selected, var(--xapp-form-widget-chips-background-color-dark, #6e7ae1));\n color: var(--xapp-form-widget-chips-color-selected, #ffffff);\n}\n.FormFieldDateTime-module_xapp_datetime_time_selected__IRT84:hover {\n background-color: var(--xapp-form-widget-chips-background-color-selected, var(--xapp-form-widget-chips-background-color-dark, #6e7ae1));\n}\n\n.FormFieldDateTime-module_xapp_datetime_message__4rf-S {\n margin: 8px 0;\n font-size: var(--xapp-form-widget-date-font-size, 14px);\n text-align: center;\n}\n\n.FormFieldDateTime-module_xapp_datetime_error__bTyZK {\n margin: 3px 14px 0 !important;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif);\n font-size: 0.75rem !important;\n font-weight: 400;\n line-height: 1.66 !important;\n letter-spacing: 0.03333em;\n text-align: left;\n color: #d32f2f !important;\n margin-top: 14px !important;\n}\n\n/* Stacked, with the column under the calendar and given room to scroll on its own. */\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormFieldDateTime-module_xapp_datetime_body__ta9Ui {\n flex-direction: column;\n align-items: center;\n }\n .FormFieldDateTime-module_xapp_datetime_times_column__UY7ho {\n width: 100%;\n max-width: 320px;\n }\n .FormFieldDateTime-module_xapp_datetime_times__rhU-O {\n max-height: 260px;\n }\n}");var Lr="Appointment times",Hr="Times shown in";function Ur(e){return"".concat(e.start,"|").concat(e.end||"")}var Br=function(t){var r=t.field,a=t.onFieldChange,o=t.errorMessage,i=t.value,s=t.required,d=t.busyDays,l=t.offeringsByDate,p=t.preselectFirstAvailable,c=r.schedule,u=n.useMemo(function(){return t.now||new Date},[t.now]),m=n.useState(function(){return(null==i?void 0:i.date)?Nn("".concat(i.date,"T00:00:00")):void 0}),f=m[0],_=m[1],h=n.useState(function(){return i?Ur(i):void 0}),x=h[0],g=h[1],v=n.useMemo(function(){return f?et(c,f.toDate(),u,l):[]},[c,f,u,l]),b=n.useMemo(function(){return v.find(function(e){return Ur(e)===x})},[v,x]),y=n.useMemo(function(){if(f&&b){var e,n,t=qn(f.toDate()),r={date:t,label:Jn(b),start:b.start,datetime:Gn(t,b.start,null==c?void 0:c.timezone)};return b.end&&(r.end=b.end),i&&(n=r,(e=i).date===n.date&&e.start===n.start&&e.end===n.end&&e.label===n.label&&e.datetime===n.datetime)?i:r}},[f,b,c,i]);n.useEffect(function(){a(r.name,y)},[y,r.name,a]);var w=n.useMemo(function(){return or(d)},[d]);n.useEffect(function(){f&&ir(f,w)&&(_(void 0),g(void 0))},[f,w]);var F=n.useMemo(function(){return p?tt(c,u,function(e){return ir(Nn(e),w)},l):void 0},[p,c,u,w,l]);n.useEffect(function(){F&&!f&&_(Nn(F))},[F,f]);var k,S=n.useCallback(function(e){return!nt(c,e.toDate(),u,l)||ir(e,w)},[c,u,w,l]),T=Kn(c),C=!!c,D=null==c?void 0:c.timezone,R=function(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}),!0}catch(e){return!1}}(D),N=n.useMemo(function(){if(!C)return"";var e=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch(e){return""}}();return function(e,n){var t=Yn(e);if(!t)return"";var r=n&&n!==e?Yn(n):"";return r&&r!==t?"".concat(Hr," ").concat(t,", not your time zone (").concat(r,")."):"".concat(Hr," ").concat(t,".")}(R?D:e,e)},[C,D,R]);return n.useEffect(function(){C&&!R&&console.warn('FormFieldDateTime: "'.concat(D,'" is not a usable timezone, so ')+"times are shown in the visitor's zone instead. Set the schedule's timezone to an IANA identifier such as \"America/New_York\".")},[C,D,R]),e.jsxs("div",{className:Cr,style:r.style,children:[!!r.title&&e.jsx("h2",{className:Dr,children:r.title}),e.jsxs("div",{className:Rr,children:[e.jsx("div",{className:Nr,children:e.jsx(ar,{maxDate:Nn(u).add(T,"day"),onChange:function(e){_(e),g(void 0)},referenceDate:Nn(u),shouldDisableDate:S,today:Nn(u),value:f||null})}),e.jsxs("div",{className:Ir,children:[!!N&&e.jsx("p",{className:Ar,children:N}),e.jsxs("div",{"aria-label":s?"".concat(Lr," (required)"):Lr,className:Mr,role:"group",children:[!f&&e.jsx("p",{className:Or,children:"Select a date to see the available times."}),!!f&&0===v.length&&e.jsx("p",{className:Or,children:"No times are available on this date."}),v.map(function(t,r){var a=Ur(t),o=t.group!==k?t.group:void 0;return k=t.group,e.jsxs(n.Fragment,{children:[!!o&&e.jsx("h3",{className:jr,children:o}),e.jsx("button",{"aria-pressed":a===x,className:"".concat(Er," ").concat(a===x?zr:""),onClick:function(){return g(a)},type:"button",children:Jn(t)})]},"".concat(a,"-").concat(r))})]})]})]}),!!o&&e.jsx("p",{className:Pr,children:o})]})},Wr={exports:{}};Wr.exports=(()=>{return e={705:e=>{e.exports=function(e,n){const t=[];return 0===n.length?t.push({text:e,highlight:!1}):n[0][0]>0&&t.push({text:e.slice(0,n[0][0]),highlight:!1}),n.forEach((r,a)=>{const o=r[0],i=r[1];t.push({text:e.slice(o,i),highlight:!0}),a===n.length-1?i<e.length&&t.push({text:e.slice(i,e.length),highlight:!1}):i<n[a+1][0]&&t.push({text:e.slice(i,n[a+1][0]),highlight:!1})}),t}}},n={},function t(r){var a=n[r];if(void 0!==a)return a.exports;var o=n[r]={exports:{}};return e[r](o,o.exports,t),o.exports}(705);var e,n})();var qr=i(Wr.exports);function $r(e){return null!=e.placePrediction}function Yr(e){var n,t=e.placePrediction;return{placeId:t.placeId,description:t.text.text,structured_formatting:{main_text:t.structuredFormat.mainText.text,secondary_text:(null===(n=t.structuredFormat.secondaryText)||void 0===n?void 0:n.text)||"",main_text_matched_substrings:(t.structuredFormat.mainText.matches||[]).map(function(e){var n,t,r;return{offset:null!==(n=e.startOffset)&&void 0!==n?n:0,length:(null!==(t=e.endOffset)&&void 0!==t?t:0)-(null!==(r=e.startOffset)&&void 0!==r?r:0)}})}}}var Gr=function(){function e(e){this.baseUrl=e.baseUrl||"https://api.xapp.ai",this.key=e.apiKey}return e.prototype.getPlacePredictions=function(e,n){var t,r={};if(e.params){if(e.params.components){var a=e.params.components.split("|").filter(function(e){return e.startsWith("country:")}).map(function(e){return e.replace("country:","").toLowerCase()});a.length>0&&(r.includedRegionCodes=a)}if(e.params.language&&(r.languageCode=e.params.language),e.params.location){var o=e.params.location.split(",").map(Number),i=o[0],s=o[1];isNaN(i)||isNaN(s)||(r.locationBias={circle:{center:{latitude:i,longitude:s},radius:Number(e.params.radius)||5e4}})}}r.input=e.input,(null===(t=e.componentRestrictions)||void 0===t?void 0:t.country)?r.includedRegionCodes=[e.componentRestrictions.country.toLowerCase()]:r.includedRegionCodes||(r.includedRegionCodes=["us"]);var d="".concat(this.baseUrl,"/places/autocomplete");this.key&&(d+="?key=".concat(encodeURIComponent(this.key))),fetch(d,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}).then(function(e){if(!e.ok)throw new Error("getPlacePredictions: HTTP error! Status: ".concat(e.status));return e.json()}).then(function(e){n((e.suggestions||[]).filter($r).map(Yr))}).catch(function(e){ie("getPlacePredictions: Fetch error:",e),n([])})},e.prototype.getPlaceDetails=function(e,n){var t="".concat(this.baseUrl,"/places/details/").concat(encodeURIComponent(e));this.key&&(t+="?key=".concat(encodeURIComponent(this.key))),fetch(t).then(function(e){if(!e.ok)throw new Error("getPlaceDetails: HTTP error! Status: ".concat(e.status));return e.json()}).then(function(e){n(e)}).catch(function(e){ie("getPlaceDetails: Fetch error:",e),n(void 0)})},e}(),Vr="FormFieldTextInputAddress-module_xapp_text_input_address__-FQjM",Xr="FormFieldTextInputAddress-module_xapp_address_anchor__HPntW",Jr="FormFieldTextInputAddress-module_xapp_address_root__2w9ks",Kr="FormFieldTextInputAddress-module_xapp_address_focused__DQ0B3",Zr="FormFieldTextInputAddress-module_xapp_address_error__inPHs",Qr="FormFieldTextInputAddress-module_xapp_address_control__4YDQD",ea="FormFieldTextInputAddress-module_xapp_address_label__lrzNq",na="FormFieldTextInputAddress-module_xapp_address_asterisk__hVgBb",ta="FormFieldTextInputAddress-module_xapp_address_helper__CU-Ne",ra="FormFieldTextInputAddress-module_xapp_address_popup__dw-zo",aa="FormFieldTextInputAddress-module_xapp_address_listbox__o7hkI",oa="FormFieldTextInputAddress-module_xapp_address_option__nGWID",ia="FormFieldTextInputAddress-module_xapp_address_option_active__KX0-4",sa="FormFieldTextInputAddress-module_xapp_address_option_icon__N4n4Y",da="FormFieldTextInputAddress-module_xapp_address_option_text__C2ulS",la="FormFieldTextInputAddress-module_xapp_address_secondary__YipJC",pa="FormFieldTextInputAddress-module_xapp_address_no_options__zSLTf",ca="FormFieldTextInputAddress-module_xapp_address_attribution__VGy3K";xe('/**\n * The phone breakpoint.\n *\n * Width alone cannot express "phone". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step\'s action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field\'s helper / error line. The metrics are MUI\'s FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.FormFieldTextInputAddress-module_xapp_text_input_address__-FQjM {\n display: inline-flex;\n flex-direction: column;\n position: relative;\n width: 100%;\n min-width: 0;\n margin: 16px 0 8px;\n padding: 0;\n border: 0;\n box-sizing: border-box;\n vertical-align: top;\n}\n\n.FormFieldTextInputAddress-module_xapp_address_anchor__HPntW {\n position: relative;\n width: 100%;\n}\n\n.FormFieldTextInputAddress-module_xapp_address_root__2w9ks {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n box-sizing: border-box;\n background-color: var(--xapp-form-widget-text-root-background, rgba(0, 0, 0, 0.06)) !important;\n border: var(--xapp-form-widget-text-root-border, 0) !important;\n border-radius: var(--xapp-form-widget-text-root-radius, 4px 4px 0 0) !important;\n font-family: var(--xapp-form-widget-text-font-family, var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif));\n font-size: 1rem;\n line-height: 1.4375em;\n cursor: text;\n}\n.FormFieldTextInputAddress-module_xapp_address_root__2w9ks:hover, .FormFieldTextInputAddress-module_xapp_address_root__2w9ks.FormFieldTextInputAddress-module_xapp_address_focused__DQ0B3 {\n border-color: var(--xapp-form-widget-text-border-color-focus, var(--xapp-form-widget-text-border-color, transparent)) !important;\n}\n.FormFieldTextInputAddress-module_xapp_address_root__2w9ks::before, .FormFieldTextInputAddress-module_xapp_address_root__2w9ks::after {\n display: var(--xapp-form-widget-text-underline-display, block) !important;\n content: "";\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n}\n.FormFieldTextInputAddress-module_xapp_address_root__2w9ks::before {\n border-bottom: 1px solid rgba(0, 0, 0, 0.42);\n transition: border-bottom-color 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n}\n.FormFieldTextInputAddress-module_xapp_address_root__2w9ks::after {\n border-bottom: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n transform: scaleX(0);\n transition: transform 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;\n}\n.FormFieldTextInputAddress-module_xapp_address_root__2w9ks:hover::before {\n border-bottom-color: rgba(0, 0, 0, 0.87);\n}\n\n.FormFieldTextInputAddress-module_xapp_address_focused__DQ0B3::after {\n transform: scaleX(1);\n}\n\n.FormFieldTextInputAddress-module_xapp_address_error__inPHs .FormFieldTextInputAddress-module_xapp_address_root__2w9ks::before, .FormFieldTextInputAddress-module_xapp_address_error__inPHs .FormFieldTextInputAddress-module_xapp_address_root__2w9ks::after {\n border-bottom-color: #d32f2f;\n}\n.FormFieldTextInputAddress-module_xapp_address_error__inPHs .FormFieldTextInputAddress-module_xapp_address_root__2w9ks::after {\n transform: scaleX(1);\n}\n\n.FormFieldTextInputAddress-module_xapp_address_control__4YDQD {\n display: block;\n min-width: 0;\n padding: 21px 12px 4px 12px !important;\n border: 0 !important;\n background-color: var(--xapp-form-widget-text-input-background, var(--xapp-form-widget-text-background-color, rgba(0, 0, 0, 0.06))) !important;\n border-radius: var(--xapp-form-widget-border-radius-sm, 8px) var(--xapp-form-widget-border-radius-sm, 8px) var(--xapp-form-widget-text-bottom-radius, 0) var(--xapp-form-widget-text-bottom-radius, 0) !important;\n transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out !important;\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87)) !important;\n font-size: var(--xapp-form-widget-text-font-size, 1rem) !important;\n font-family: var(--xapp-form-widget-text-font-family, var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif)) !important;\n line-height: 1.4375em !important;\n letter-spacing: inherit;\n height: auto !important;\n min-height: 0 !important;\n width: 100% !important;\n max-width: 100% !important;\n box-sizing: border-box !important;\n margin: 0 !important;\n margin-bottom: 0 !important;\n border-width: 0 !important;\n border-style: none !important;\n box-shadow: none;\n -webkit-appearance: none !important;\n appearance: none !important;\n}\n.FormFieldTextInputAddress-module_xapp_address_control__4YDQD::placeholder {\n color: currentColor;\n opacity: 0.42;\n transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n}\n.FormFieldTextInputAddress-module_xapp_address_control__4YDQD[data-shrink=false]::placeholder {\n opacity: 0 !important;\n}\n.FormFieldTextInputAddress-module_xapp_address_control__4YDQD:hover {\n background-color: var(--xapp-form-widget-text-background-color-dark, rgba(0, 0, 0, 0.09)) !important;\n}\n.FormFieldTextInputAddress-module_xapp_address_control__4YDQD:focus {\n background-color: var(--xapp-form-widget-text-background-color-dark, rgba(0, 0, 0, 0.09)) !important;\n outline: none !important;\n box-shadow: inset 0 0 0 2px var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54)) !important;\n}\n\n.FormFieldTextInputAddress-module_xapp_address_label__lrzNq {\n position: absolute !important;\n left: 0;\n top: 0;\n z-index: 1;\n display: block;\n max-width: calc(100% - 24px);\n margin: 0 !important;\n padding: 0 !important;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n pointer-events: none;\n transform-origin: top left;\n transform: translate(12px, 13px) scale(1) !important;\n transition: color 200ms cubic-bezier(0, 0, 0.2, 1) 0ms, transform 200ms cubic-bezier(0, 0, 0.2, 1) 0ms !important;\n color: rgba(0, 0, 0, 0.6);\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif) !important;\n font-size: 1rem !important;\n font-weight: 400 !important;\n line-height: 1.4375em !important;\n letter-spacing: 0.00938em;\n}\n.FormFieldTextInputAddress-module_xapp_address_label__lrzNq[data-shrink=true] {\n max-width: calc(133% - 24px);\n transform: translate(12px, 4px) scale(0.75) !important;\n}\n.FormFieldTextInputAddress-module_xapp_address_focused__DQ0B3 .FormFieldTextInputAddress-module_xapp_address_label__lrzNq {\n color: var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n}\n.FormFieldTextInputAddress-module_xapp_address_error__inPHs .FormFieldTextInputAddress-module_xapp_address_label__lrzNq {\n color: #d32f2f;\n}\n\n.FormFieldTextInputAddress-module_xapp_address_error__inPHs .FormFieldTextInputAddress-module_xapp_address_asterisk__hVgBb {\n color: #d32f2f;\n}\n\n.FormFieldTextInputAddress-module_xapp_address_helper__CU-Ne {\n margin: 3px 14px 0 !important;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif);\n font-size: 0.75rem !important;\n font-weight: 400;\n line-height: 1.66 !important;\n letter-spacing: 0.03333em;\n text-align: left;\n color: #d32f2f !important;\n}\n\n.FormFieldTextInputAddress-module_xapp_address_popup__dw-zo {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: 16000;\n margin: 2px 0 0;\n overflow: hidden;\n background-color: #fff;\n color: rgba(0, 0, 0, 0.87);\n border-radius: 4px;\n box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12);\n font-family: var(--xapp-form-widget-text-font-family, var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif));\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.5;\n letter-spacing: 0.00938em;\n text-align: left;\n}\n.FormFieldTextInputAddress-module_xapp_address_popup__dw-zo[hidden] {\n display: none;\n}\n\n.FormFieldTextInputAddress-module_xapp_address_listbox__o7hkI {\n list-style: none !important;\n margin: 0 !important;\n padding: 8px 0 !important;\n max-height: 40vh;\n overflow: auto;\n box-sizing: border-box;\n}\n.FormFieldTextInputAddress-module_xapp_address_listbox__o7hkI:empty {\n display: none;\n}\n\n.FormFieldTextInputAddress-module_xapp_address_option__nGWID {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n min-height: 48px;\n margin: 0 !important;\n padding: 6px 16px !important;\n box-sizing: border-box;\n cursor: pointer;\n user-select: none;\n outline: 0;\n -webkit-tap-highlight-color: transparent;\n}\n.FormFieldTextInputAddress-module_xapp_address_option__nGWID::before, .FormFieldTextInputAddress-module_xapp_address_option__nGWID::marker {\n content: none !important;\n}\n\n.FormFieldTextInputAddress-module_xapp_address_option_active__KX0-4 {\n background-color: rgba(0, 0, 0, 0.04);\n}\n\n.FormFieldTextInputAddress-module_xapp_address_option_icon__N4n4Y {\n flex: 0 0 auto;\n width: 1em;\n height: 1em;\n margin-right: 20px;\n font-size: 1.5rem;\n fill: rgba(0, 0, 0, 0.6);\n}\n\n.FormFieldTextInputAddress-module_xapp_address_option_text__C2ulS {\n display: block;\n min-width: 0;\n word-wrap: break-word;\n}\n\n.FormFieldTextInputAddress-module_xapp_address_secondary__YipJC {\n display: block;\n font-size: 0.875rem;\n line-height: 1.43;\n letter-spacing: 0.01071em;\n color: rgba(0, 0, 0, 0.6);\n}\n\n.FormFieldTextInputAddress-module_xapp_address_no_options__zSLTf {\n padding: 14px 16px;\n color: rgba(0, 0, 0, 0.6);\n}\n\n.FormFieldTextInputAddress-module_xapp_address_attribution__VGy3K {\n text-align: right;\n padding: 4px 12px 8px;\n}\n.FormFieldTextInputAddress-module_xapp_address_attribution__VGy3K img {\n display: inline-block;\n height: 14px;\n width: auto;\n}');var ua=function(){return e.jsx("svg",{className:sa,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:e.jsx("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7m0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5"})})},ma=function(r){var a,o=r.field,i=r.onFieldChange,s=r.errorMessage,d=r.required,l=r.googleMapsApiKey,p=r.mapsBaseUrl,c=r.requireSelection,u=!(null!==(a=o.requireSelection)&&void 0!==a?a:c),m=n.useState(null),f=m[0],_=m[1],h=n.useState(""),x=h[0],g=h[1],v=n.useState([]),b=v[0],y=v[1],w=n.useState(!1),F=w[0],k=w[1],S=n.useState(!1),T=S[0],C=S[1],D=n.useState(-1),R=D[0],N=D[1],I="xapp-address-".concat(n.useId()),A="".concat(I,"-listbox"),M="".concat(I,"-helper-text"),j=function(e){return"".concat(I,"-option-").concat(e)},E=n.useRef(null),z=n.useRef(""),O=function(e){z.current=e,g(e)};n.useEffect(function(){i(o.name,x)},[o.name,i,x]);var P=o.googleMapsApiKey||l,L=o.mapsBaseUrl||p,H=n.useMemo(function(){return new Gr({apiKey:P,baseUrl:L})},[P,L]),U=function(){if(!L)return!0;try{var e=new URL(L).hostname;return"xapp.ai"===e||e.endsWith(".xapp.ai")}catch(e){return!1}}(),B=n.useMemo(function(){return function(e,n){var t,r=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];clearTimeout(t),t=setTimeout(function(){return e.apply(void 0,r)},n)};return r.clear=function(){return clearTimeout(t)},r}(function(e,n){H.getPlacePredictions(e,n)},400)},[H]);n.useEffect(function(){return function(){return B.clear()}},[B]),n.useEffect(function(){var e=!0;if(""!==x){var n=o.mapsUrlQueryParams||void 0;return B({input:x,params:n},function(n){e&&y(n||[])}),function(){e=!1}}y([])},[x,B,o.mapsUrlQueryParams]);var W=n.useMemo(function(){return f?b.filter(function(e){return e.description!==f.description}):b},[b,f]),q=F&&(W.length>0||!u&&""!==x);n.useEffect(function(){N(-1)},[W]),n.useLayoutEffect(function(){var e=E.current,n=R>=0?null==e?void 0:e.children[R]:void 0;e&&n instanceof HTMLElement&&(n.offsetTop<e.scrollTop?e.scrollTop=n.offsetTop:n.offsetTop+n.offsetHeight>e.scrollTop+e.clientHeight&&(e.scrollTop=n.offsetTop+n.offsetHeight-e.clientHeight))},[R,q]);var $=function(){k(!1),N(-1)},Y=function(e){if($(),_(e),O(e.description),e.placeId){var n=e.placeId,r=e.description;H.getPlaceDetails(n,function(n){(null==n?void 0:n.formattedAddress)&&z.current===r&&(_(t(t({},e),{description:n.formattedAddress})),O(n.formattedAddress))})}},G=T||x.length>0||!o.label,V=q&&R>=0?j(R):void 0;return e.jsxs("div",{className:"".concat(Vr," ").concat(s?Zr:""),style:o.style,children:[e.jsxs("div",{className:Xr,children:[e.jsxs("div",{className:"".concat(Jr," ").concat(T?Kr:""),children:[o.label&&e.jsxs("label",{htmlFor:I,className:ea,"data-shrink":G?"true":"false",children:[o.label,d&&e.jsx("span",{className:na,"aria-hidden":"true",children:" *"})]}),e.jsx("input",{id:I,name:o.name,type:"text",className:Qr,role:"combobox","aria-autocomplete":"list","aria-expanded":q,"aria-controls":A,"aria-activedescendant":V,"aria-invalid":!!s,"aria-describedby":s?M:void 0,autoComplete:"off",autoCapitalize:"none",spellCheck:!1,placeholder:o.placeholder,required:d,maxLength:o.maxLength||void 0,value:x,onChange:function(e){var n=e.target.value;O(n),""===n?_(null):k(!0)},onKeyDown:function(e){switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),k(!0),n="ArrowDown"===e.key?1:-1,0!==(t=W.length)&&N(function(e){var r=e+n;return r>=t?-1:r<-1?t-1:r});break;case"Enter":q&&R>=0&&W[R]?(e.preventDefault(),Y(W[R])):$();break;case"Escape":q&&(e.preventDefault(),e.stopPropagation(),$())}var n,t},onFocus:function(){return C(!0)},onBlur:function(){if(C(!1),$(),!u){var e=(null==f?void 0:f.description)||"";x!==e&&O(e)}},onMouseDown:function(){q||""===x||k(!0)},"data-shrink":G?"true":"false"})]}),e.jsxs("div",{className:ra,hidden:!q,onMouseDown:function(e){return e.preventDefault()},children:[e.jsx("ul",{ref:E,id:A,role:"listbox","aria-label":"".concat(o.label||"Address"," suggestions"),className:aa,children:W.map(function(n,t){var r=n.structured_formatting.main_text_matched_substrings||[],a=qr(n.structured_formatting.main_text,r.map(function(e){return[e.offset,e.offset+e.length]}));return e.jsxs("li",{id:j(t),role:"option","aria-selected":t===R,className:"".concat(oa," ").concat(t===R?ia:""),onMouseMove:function(){return N(t)},onClick:function(){return Y(n)},children:[e.jsx(ua,{}),e.jsxs("span",{className:da,children:[a.map(function(n,t){return e.jsx("span",{style:{fontWeight:n.highlight?"bold":"normal"},children:n.text},t)}),e.jsx("span",{className:la,children:n.structured_formatting.secondary_text})]})]},n.placeId||n.description)})}),q&&0===W.length&&e.jsx("div",{className:pa,children:"No locations"}),U&&e.jsx("div",{className:ca,children:e.jsx("img",{src:"https://maps.gstatic.com/mapfiles/api-3/images/powered-by-google-on-white3.png",alt:"powered by Google"})})]})]}),s&&e.jsx("p",{id:M,className:ta,children:s})]})},fa=function(e){return"string"!=typeof e||0===e.trim().length},_a=function(e){var n=e.replace(/\D/g,"");if(10===n.length||11===n.length&&n.startsWith("1")){return/^(1)?[-. ]?\(?(\d{3})\)?[-. ]?(\d{3})[-. ]?(\d{4})$/.test(n)}return!1},ha=function(e){return null==e||("string"==typeof e?0===e.trim().length:Array.isArray(e)?0===e.length:("object"==typeof e&&e.constructor===Object||"object"==typeof e)&&0===Object.keys(e).length)},xa="FormStepDisplay-module_xapp_step_iframe_wrapper__BBFRw",ga="FormStepDisplay-module_xapp_step_full_bleed__rhGGK",va="FormStepDisplay-module_xapp_external_widget_container__ec4Hs",ba="FormStepDisplay-module_xapp_external_widget_anchor__NSXBg",ya="FormStepDisplay-module_xapp_external_widget_fallback__lkFJ-",wa="FormStepDisplay-module_xapp_external_widget_loading__aRtx6",Fa="FormStepDisplay-module_xapp_external_widget_spinner__ga0X7",ka="FormStepDisplay-module_xapp_submit_error__Zbqdj",Sa="FormStepDisplay-module_xapp_formfield__hRmVx",Ta="FormStepDisplay-module_active__fCsMz",Ca="FormStepDisplay-module_xapp_formfield_title__INjeF",Da="FormStepDisplay-module_xapp_formfield_subtitle__8VQC2",Ra="FormStepDisplay-module_xapp_form_actions__lXYdk",Na="FormStepDisplay-module_xapp_form_actions_final__0TUxT",Ia="FormStepDisplay-module_xapp_final_button_container__Gco-E",Aa="FormStepDisplay-module_xapp_form_nav_buttons__lI4BI",Ma="FormStepDisplay-module_xapp_dummy_button__Q-nE6",ja="FormStepDisplay-module_xapp_step_button__KeEND",Ea="FormStepDisplay-module_xapp_primary_button__d2wra",za="FormStepDisplay-module_xapp_secondary_button__LuMfN",Oa="FormStepDisplay-module_xapp_disabled_button__RjSfL",Pa="FormStepDisplay-module_xapp_back_button__mPqT0",La="FormStepDisplay-module_xapp_back_button_label__9kKIl",Ha="FormStepDisplay-module_xapp_back_button_icon__w7o4I";xe("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.FormStepDisplay-module_xapp_step_iframe_wrapper__BBFRw {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n overflow: scroll;\n position: relative;\n}\n\n.FormStepDisplay-module_xapp_step_full_bleed__rhGGK {\n margin-left: -8px;\n margin-right: -8px;\n}\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormStepDisplay-module_xapp_step_full_bleed__rhGGK {\n margin-left: calc(-1 * (8px + env(safe-area-inset-left, 0px)));\n margin-right: calc(-1 * (8px + env(safe-area-inset-right, 0px)));\n }\n}\n\n.FormStepDisplay-module_xapp_external_widget_container__ec4Hs {\n background-color: var(--xapp-form-widget-external-widget-background-color, transparent);\n padding: var(--xapp-form-widget-external-widget-padding, 0);\n min-height: var(--xapp-form-widget-external-widget-min-height, auto);\n box-sizing: border-box;\n}\n\n.FormStepDisplay-module_xapp_external_widget_anchor__NSXBg {\n margin: 0;\n padding: 0;\n}\n\n.FormStepDisplay-module_xapp_external_widget_fallback__lkFJ- {\n padding: 20px;\n text-align: center;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n}\n\n.FormStepDisplay-module_xapp_external_widget_loading__aRtx6 {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 14px;\n min-height: 240px;\n padding: 40px 20px;\n text-align: center;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87));\n}\n.FormStepDisplay-module_xapp_external_widget_loading__aRtx6 p {\n margin: 0;\n font-size: 0.95em;\n opacity: 0.7;\n}\n\n.FormStepDisplay-module_xapp_external_widget_spinner__ga0X7 {\n display: inline-block;\n width: 44px;\n height: 44px;\n color: var(--xapp-form-widget-primary-button-color, #ea6539);\n}\n.FormStepDisplay-module_xapp_external_widget_spinner__ga0X7 svg {\n width: 100%;\n height: 100%;\n}\n\n.FormStepDisplay-module_xapp_submit_error__Zbqdj {\n padding: 12px 20px;\n text-align: center;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n color: #b3261e;\n}\n\n.FormStepDisplay-module_xapp_formfield__hRmVx {\n display: none;\n font-family: inherit !important;\n}\n.FormStepDisplay-module_xapp_formfield__hRmVx.FormStepDisplay-module_active__fCsMz {\n display: block;\n}\n.FormStepDisplay-module_xapp_formfield_title__INjeF p {\n margin: 10px 0 20px 0;\n font-size: 1em;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n}\n.FormStepDisplay-module_xapp_formfield__hRmVx .MuiAutocomplete-clearIndicator,\n.FormStepDisplay-module_xapp_formfield__hRmVx .MuiAutocomplete-popupIndicator {\n color: rgba(0, 0, 0, 0.54) !important;\n background-color: transparent !important;\n transition: background-color 200ms ease-in-out !important;\n}\n.FormStepDisplay-module_xapp_formfield__hRmVx .MuiAutocomplete-clearIndicator:hover,\n.FormStepDisplay-module_xapp_formfield__hRmVx .MuiAutocomplete-popupIndicator:hover {\n background-image: unset !important;\n background-color: #cfd8da !important;\n}\n.FormStepDisplay-module_xapp_formfield__hRmVx .MuiAutocomplete-clearIndicator:focus,\n.FormStepDisplay-module_xapp_formfield__hRmVx .MuiAutocomplete-popupIndicator:focus {\n background-image: unset !important;\n}\n\n.FormStepDisplay-module_xapp_formfield_title__INjeF p {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n text-align: var(--xapp-form-widget-step-title-align, left);\n font-size: var(--xapp-form-widget-step-title-font-size, inherit);\n font-weight: var(--xapp-form-widget-step-title-font-weight, inherit);\n color: var(--xapp-form-widget-step-title-color, inherit);\n}\n\n.FormStepDisplay-module_xapp_formfield_subtitle__8VQC2 {\n font-size: 0.875em;\n opacity: 0.8;\n}\n\n.FormStepDisplay-module_xapp_form_actions__lXYdk {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.FormStepDisplay-module_xapp_form_actions_final__0TUxT {\n flex-direction: var(--xapp-form-widget-final-button-direction, column);\n gap: var(--xapp-form-widget-final-button-gap, 0);\n}\n.FormStepDisplay-module_xapp_form_actions_final__0TUxT .FormStepDisplay-module_xapp_final_button_container__Gco-E {\n padding: var(--xapp-form-widget-final-button-container-padding, 20px 20px 0 20px);\n}\n.FormStepDisplay-module_xapp_form_actions_final__0TUxT .FormStepDisplay-module_xapp_form_nav_buttons__lI4BI {\n padding: var(--xapp-form-widget-final-button-nav-padding, 20px);\n flex: var(--xapp-form-widget-final-button-nav-flex, 1 1 auto);\n align-self: var(--xapp-form-widget-final-button-nav-align, stretch);\n align-items: center;\n}\n\n.FormStepDisplay-module_xapp_final_button_container__Gco-E {\n display: flex;\n justify-content: center;\n padding: 20px 20px 0 20px;\n}\n.FormStepDisplay-module_xapp_final_button_container__Gco-E button {\n font-size: var(--xapp-form-widget-button-font-size, 1.2em) !important;\n padding: var(--xapp-form-widget-button-padding, 12px 32px) !important;\n min-width: 200px !important;\n border-radius: var(--xapp-form-widget-button-radius, var(--xapp-form-widget-border-radius-md, 12px)) !important;\n}\n\n.FormStepDisplay-module_xapp_form_nav_buttons__lI4BI {\n display: flex;\n justify-content: space-between;\n padding: 20px;\n align-self: stretch;\n}\n\n.FormStepDisplay-module_xapp_dummy_button__Q-nE6 {\n flex-grow: 1;\n}\n\n.FormStepDisplay-module_xapp_step_button__KeEND {\n display: inline-flex !important;\n align-items: center;\n justify-content: center;\n position: relative;\n box-sizing: border-box !important;\n min-width: 64px;\n margin: 0 !important;\n border: 0;\n outline: 0;\n vertical-align: middle;\n cursor: pointer;\n user-select: none;\n -webkit-appearance: none;\n appearance: none;\n -webkit-tap-highlight-color: transparent;\n color: #fff !important;\n line-height: 1.75 !important;\n letter-spacing: 0.02857em;\n text-transform: uppercase !important;\n text-decoration: none !important;\n text-shadow: none !important;\n}\n.FormStepDisplay-module_xapp_step_button__KeEND:disabled {\n color: rgba(0, 0, 0, 0.26) !important;\n pointer-events: none;\n}\n\n.FormStepDisplay-module_xapp_primary_button__d2wra {\n background-color: var(--xapp-form-widget-primary-button-color, #ea6539) !important;\n font-family: inherit !important;\n border-radius: var(--xapp-form-widget-button-radius, var(--xapp-form-widget-border-radius-md, 12px)) !important;\n font-size: var(--xapp-form-widget-button-font-size, 0.875rem) !important;\n font-weight: var(--xapp-form-widget-button-font-weight, 500) !important;\n padding: var(--xapp-form-widget-button-padding, 6px 16px) !important;\n min-height: 44px !important;\n box-shadow: var(--xapp-form-widget-button-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)) !important;\n transition: box-shadow 200ms ease-in-out, transform 150ms ease-in-out, opacity 200ms ease-in-out !important;\n}\n.FormStepDisplay-module_xapp_primary_button__d2wra:hover {\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;\n opacity: 0.9 !important;\n}\n.FormStepDisplay-module_xapp_primary_button__d2wra:active {\n transform: scale(0.98) !important;\n}\n.FormStepDisplay-module_xapp_primary_button__d2wra:focus {\n outline: none;\n}\n.FormStepDisplay-module_xapp_primary_button__d2wra:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n\n.FormStepDisplay-module_xapp_secondary_button__LuMfN {\n background-color: var(--xapp-form-widget-secondary-button-color, #d24cc7) !important;\n font-family: inherit !important;\n border-radius: var(--xapp-form-widget-button-radius, var(--xapp-form-widget-border-radius-md, 12px)) !important;\n font-size: var(--xapp-form-widget-button-font-size, 0.875rem) !important;\n font-weight: var(--xapp-form-widget-button-font-weight, 500) !important;\n padding: var(--xapp-form-widget-button-padding, 6px 16px) !important;\n min-height: 44px !important;\n box-shadow: var(--xapp-form-widget-button-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)) !important;\n transition: box-shadow 200ms ease-in-out, transform 150ms ease-in-out, opacity 200ms ease-in-out !important;\n}\n.FormStepDisplay-module_xapp_secondary_button__LuMfN:hover {\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;\n opacity: 0.9 !important;\n}\n.FormStepDisplay-module_xapp_secondary_button__LuMfN:active {\n transform: scale(0.98) !important;\n}\n.FormStepDisplay-module_xapp_secondary_button__LuMfN:focus {\n outline: none;\n}\n.FormStepDisplay-module_xapp_secondary_button__LuMfN:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n\n.FormStepDisplay-module_xapp_disabled_button__RjSfL {\n background-color: var(--xapp-form-widget-secondary-button-color, #d24cc7) !important;\n opacity: 0.5 !important;\n font-family: inherit !important;\n border-radius: var(--xapp-form-widget-button-radius, var(--xapp-form-widget-border-radius-md, 12px)) !important;\n font-size: var(--xapp-form-widget-button-font-size, 0.875rem) !important;\n font-weight: var(--xapp-form-widget-button-font-weight, 500) !important;\n padding: var(--xapp-form-widget-button-padding, 6px 16px) !important;\n min-height: 44px !important;\n box-shadow: none !important;\n cursor: not-allowed !important;\n}\n.FormStepDisplay-module_xapp_back_button__mPqT0 {\n background: var(--xapp-form-widget-back-button-background, var(--xapp-form-widget-primary-button-color, #ea6539)) !important;\n border: var(--xapp-form-widget-back-button-border, 0) !important;\n border-radius: var(--xapp-form-widget-back-button-radius, var(--xapp-form-widget-border-radius-md, 12px)) !important;\n padding: var(--xapp-form-widget-back-button-padding, 6px 16px) !important;\n min-width: var(--xapp-form-widget-back-button-size, 64px) !important;\n width: var(--xapp-form-widget-back-button-size, auto) !important;\n height: var(--xapp-form-widget-back-button-size, auto) !important;\n color: var(--xapp-form-widget-back-button-color, var(--xapp-form-widget-primary-button-text-color, #b7c5d1)) !important;\n font-size: var(--xapp-form-widget-back-button-font-size, 0.875rem) !important;\n font-weight: var(--xapp-form-widget-back-button-font-weight, 500) !important;\n box-shadow: var(--xapp-form-widget-back-button-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)) !important;\n}\n.FormStepDisplay-module_xapp_back_button__mPqT0:hover {\n color: var(--xapp-form-widget-back-button-color-hover, var(--xapp-form-widget-primary-button-text-color, #b7c5d1)) !important;\n border-color: var(--xapp-form-widget-back-button-color-hover, currentColor) !important;\n}\n\n.FormStepDisplay-module_xapp_back_button_label__9kKIl {\n display: var(--xapp-form-widget-back-button-label-display, inline);\n}\n\n.FormStepDisplay-module_xapp_back_button_icon__w7o4I {\n display: var(--xapp-form-widget-back-button-icon-display, none);\n align-items: center;\n justify-content: center;\n font-size: 20px;\n line-height: 1;\n -webkit-text-stroke: var(--xapp-form-widget-back-button-icon-stroke, 0);\n}");function Ua(e){return!!e&&void 0!==e.externalWidget}function Ba(e){return"value"in e&&void 0!==e.value}xe("/**\n * CostGuide / Contractor Appointments booking-embed style overrides.\n *\n * The partner renders its form into #airo-anchor in the light DOM with stable, semantic\n * class names (spike: chat-widget#1514). This is a plain (non-module) stylesheet on purpose\n * so the selectors below emit literally rather than being scoped -- they target the partner's\n * own markup, not ours.\n *\n * Two hard constraints from the spike:\n * 1. Their rules are scoped `#airo-anchor #step-<name> .<class>` (two ids + a class), so a\n * plain `#airo-anchor .btn-next` measurably loses. Overrides must carry `#airo-anchor`\n * specificity AND `!important` to win.\n * 2. Most of their text inherits the container font, but `input` is explicitly Arial, so the\n * font must be re-applied to inputs directly.\n *\n * Every value maps to a `--xapp-form-widget-*` theme variable (with a fallback matching\n * `styles/_variables.scss`), so a Studio-themed widget restyles the partner's form too --\n * nothing here is a hard-coded color, font, or radius.\n *\n * Partner selectors verified: 2026-08-04. Re-verify against their markup per chat-widget#1516.\n */\n/* Primary action buttons: btn-next / btn-orange */\n#airo-anchor .btn-next,\n#airo-anchor .btn-orange {\n background-color: var(--xapp-form-widget-primary-button-color, #ea6539) !important;\n color: var(--xapp-form-widget-primary-button-text-color, #b7c5d1) !important;\n border-radius: var(--xapp-form-widget-border-radius-md, 12px) !important;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n\n/* Secondary / back button: btn-back */\n#airo-anchor .btn-back {\n background-color: var(--xapp-form-widget-secondary-button-color, #d24cc7) !important;\n color: var(--xapp-form-widget-secondary-button-text-color, #b7c5d1) !important;\n border-radius: var(--xapp-form-widget-border-radius-md, 12px) !important;\n}\n\n/* Headings and body text: stepwrap / ms-title / ms-subtitle / page-title / label-item */\n#airo-anchor .stepwrap,\n#airo-anchor .ms-title,\n#airo-anchor .ms-subtitle,\n#airo-anchor .page-title,\n#airo-anchor .label-item {\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87)) !important;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n\n/* Inputs are explicitly Arial in their sheet, so the inherited container font never reaches\n them -- re-apply directly (spike finding). radio-item grouped for the same reason. */\n#airo-anchor input,\n#airo-anchor .radio-item {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n\n/* Focus rings consistent with ours rather than their default orange. */\n#airo-anchor input:focus,\n#airo-anchor .btn-next:focus,\n#airo-anchor .btn-back:focus {\n outline-color: var(--xapp-form-widget-focus-ring-color, #012b54) !important;\n}");var Wa=["preferred_time","preferred_date"];function qa(e){var n=[e.name,"".concat(e.name,"_start"),"".concat(e.name,"_end")];if("DATETIME"===e.type){var t=e;n.push(t.dateFieldName||En,t.dateTimeFieldName||zn,t.timeZoneFieldName||On)}return n}function $a(e){return!!e&&void 0!==e.mandatoryGroup}var Ya=function(o){var i=n.useRef({}),s=n.useRef(new Set),d=n.useRef(!1),l=n.useRef(o.formStep.fields),p=n.useRef({}),c=n.useState({}),u=c[0],m=c[1],f=n.useState({}),_=f[0],h=f[1],x=n.useState({}),g=x[0],v=x[1],b=n.useState(!1),y=b[0],w=b[1],F=he().context,k=function(e){var n=null==e?void 0:e.schedulingDisabled;return!0===n||"true"===n}(F),S=null==F?void 0:F.offeringsByDate,T=n.useMemo(function(){return function(e){var n=e;if("string"==typeof n)try{n=JSON.parse(n)}catch(e){return}if(n&&"object"==typeof n&&!Array.isArray(n)){var t={};return Object.entries(n).forEach(function(e){var n=e[0],r=e[1];t[n]=Array.isArray(r)?r.filter(Zn):[]}),t}}(S)},[S]),C=n.useCallback(function(e){return k&&!!e&&function(e){return"DATE"===e.type||"DATETIME"===e.type||"CHIPS"===e.type&&Wa.indexOf(e.name)>=0}(e)},[k]),D=o.formStep,R=o.onNextStep,N=o.onPrevStep,I=o.onData,A=o.onDataWithLabels,M=o.getData,j=o.getDataWithLabels,E=o.loading,z=o.currentStepIndex,O=o.totalSteps,P=o.onTrackNextStep,L=o.currentStepDataRef,H=o.isActive,U=o.externalWidgetConfigPending,B=o.onTrackHandoffRendered,W=o.onTrackHandoffNoRender,q=o.onTrackHandoffScheduled,$=o.onTrackHandoffError,Y=o.onExternalWidgetFallback,G=o.submitError,V=o.hideIntro,X=H&&!U&&Ua(D)?D.externalWidget:void 0,J=st(X,{onRendered:function(e){return null==B?void 0:B(D.name,e)},onNoRender:function(e){return null==W?void 0:W(D.name,e)},onScheduled:function(e,n){return null==q?void 0:q(D.name,e,n)},onError:function(e){return null==$?void 0:$(D.name,e)},onFallback:function(e){return null==Y?void 0:Y(e)}}).outcome,K=n.useState(!1),Z=K[0],Q=K[1];n.useLayoutEffect(function(){if(X){var e=X.anchorId,n=document.getElementById(e);if(n){if(!(n.childElementCount>0)){var t=new MutationObserver(function(){var n=document.getElementById(e);n&&n.childElementCount>0&&(Q(!0),t.disconnect())});return t.observe(n,{childList:!0,subtree:!0}),function(){return t.disconnect()}}Q(!0)}}else Q(!1)},[X]);var ee=n.useCallback(function(){var e={};Object.entries(p.current).forEach(function(n){var r=n[0],a=n[1];try{var o=t(t(t({},M()),i.current),{safeIncludes:function(e,n){return Array.isArray(e)?e.includes(n):"string"==typeof e&&e===n}});e[r]=a.call(o)}catch(n){"development"===process.env.NODE_ENV&&console.error('Condition evaluation failed for field "'.concat(r,'":'),n),e[r]=!1}}),function(e,n){var t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return!1;for(var a=0,o=t;a<o.length;a++){var i=o[a];if(e[i]!==n[i])return!1}return!0}(e,_)||h(e)},[_,M]);n.useEffect(function(){for(var e={},n=0,t=D.fields;n<t.length;n++){var r=t[n];if($a(r)&&!C(r)){var a=r.mandatoryGroup;a&&(e[a]||(e[a]=[]),e[a].push(r.name))}}m(e)},[D.fields,C]);l.current!==D.fields&&(l.current=D.fields,s.current.clear(),d.current=!1,i.current={});for(var ne=0,te=D.fields;ne<te.length;ne++){var re=te[ne];!Ba(re)||s.current.has(re.name)||Object.prototype.hasOwnProperty.call(i.current,re.name)||(i.current[re.name]=re.value,s.current.add(re.name))}var ae=function(e){for(var n=t({},e),r=0,a=D.fields;r<a.length;r++){var o=a[r];C(o)&&delete n[o.name]}return n};n.useEffect(function(){for(var e=0,n=D.fields;e<n.length;e++){var t=n[e];if("CHIPS"===t.type){var r=t.items.filter(function(e){return Ft(e)}).filter(function(e){return e.selected}).map(function(e){return e.id});r.length>0&&!Object.prototype.hasOwnProperty.call(i.current,t.name)&&(i.current[t.name]=r)}if(t.condition){var a=kn(t.condition);p.current[t.name]=new Function("return (".concat(a,");"))}}s.current.size>0&&!d.current&&(d.current=!0,I(ae(i.current))),ee()},[ee,D.fields]);var oe=n.useCallback(function(){var e={},n=!0,r={};D.fields.forEach(function(t){var a={valid:!0},o=i.current[t.name];if(!1===_[t.name]||C(t))e[t.name]=a;else{if(function(e){return!!e&&"DROPDOWN"===e.type}(t))if(!t.mandatory||null!=o&&"none"!==o){if(null!=o&&"none"!==o){var s=t.items.find(function(e){return e.id===o});if(s&&s.freeFormInput){var d=s.freeFormFieldName||"message",l=i.current[d];(!l||"string"==typeof l&&""===l.trim())&&(e[d]={valid:!1,message:"Please specify additional details"},a={valid:!1,message:""})}}}else a={valid:!1,message:t.mandatoryError||"Please select an option"};else if(function(e){return!!e&&"DATERANGE"===e.type}(t))t.mandatory&&!function(e){var n=e;return!!(null==n?void 0:n.from)&&!!(null==n?void 0:n.to)}(o)&&(a={valid:!1,message:t.mandatoryError||"Please select a date range"});else if(function(e){return!!e&&"DATETIME"===e.type}(t))t.mandatory&&!function(e){var n=e;return!!(null==n?void 0:n.date)&&!!(null==n?void 0:n.start)}(o)&&(a={valid:!1,message:t.mandatoryError||"Please select a date and a time"});else if(Object.prototype.hasOwnProperty.call(i.current,t.name))if(function(e){return!!e&&"TEXT"===e.type}(t))if(!0===t.mandatory&&fa(o))a={valid:!1,message:t.mandatoryError||"This field is mandatory"};else if("EMAIL"!==t.format||fa(o)){if("PHONE"!==t.format||fa(o)){if("ZIP_CODE"===t.format&&!fa(o)&&(a=function(e){if(fa(e))return{valid:!0};var n=/^\d{5}$/.test(e)||/^\d{5}-\d{4}$/.test(e)||/^[A-Za-z]\d[A-Za-z]\s?\d[A-Za-z]\d$/.test(e);return{valid:n,message:n?void 0:"Invalid zip code or postal code"}}(o),a.valid)){var p=function(e){if(fa(e))return e;var n=e.trim(),t=n.match(/^([A-Za-z]\d[A-Za-z])(\d[A-Za-z]\d)$/);return t?"".concat(t[1].toUpperCase()," ").concat(t[2].toUpperCase()):/^[A-Za-z]\d[A-Za-z]\s\d[A-Za-z]\d$/.test(n)?n.toUpperCase():e}(o);p!==o&&(r[t.name]=p)}}else if(a=function(e){if(fa(e))return{valid:!0};var n=_a(e);return{valid:n,message:n?void 0:"Invalid phone number"}}(o),a.valid){var c=function(e){if(fa(e)||!_a(e))return e;var n=e.replace(/\D/g,"");return 11===n.length&&n.startsWith("1")&&(n=n.slice(1)),n.replace(/(\d{3})(\d{3})(\d{4})/,"($1) $2-$3")}(o);c!==o&&(r[t.name]=c)}}else a={valid:u=/^[\w-.]+@([\w-]+\.)+[\w-]{2,4}$/.test(String(o).toLowerCase()),message:u?void 0:"Invalid email address"};else!function(e){return!!e&&"CHIPS"===e.type}(t)?function(e){return!!e&&"DATE"===e.type}(t)&&t.mandatory&&null==o?a={valid:!1,message:"Please select a day"}:function(e){return!!e&&"CHECK"===e.type}(t)&&t.mandatory&&!(null==o?void 0:o.length)&&(a={valid:!1,message:t.mandatoryError||"This field is mandatory"}):t.minRequired&&o.length<t.minRequired?a={valid:!1,message:"Please select at least ".concat(t.minRequired," option(s)")}:t.maxAllowed&&o.length>t.maxAllowed?a={valid:!1,message:"Please select no more than ".concat(t.maxAllowed," option(s)")}:t.mandatory&&1!==(null==o?void 0:o.length)&&(a={valid:!1,message:"Please select one option"});var u;n=n&&a.valid,e[t.name]=a}});for(var a=function(t){if(!t.some(function(e){return!ha(i.current[e])})){var r=D.fields.find(function(e){return e.name===t[0]}),a=g[t[0]],o=(null==a?void 0:a.message)||(null==r?void 0:r.mandatoryError)||"At least one of these fields is required";t.forEach(function(n){e[n]={valid:!1,message:o}}),n=!1}},o=0,s=Object.entries(u);o<s.length;o++){a(s[o][1])}return ha(r)||(i.current=t(t({},i.current),r)),function(e,n){var t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return!1;for(var a=0,o=t;a<o.length;a++){var i=o[a];if(!n.hasOwnProperty(i))return!1;var s=e[i],d=n[i];if(s.valid!==d.valid)return!1}return!0}(g,e)||v(e),n},[_,g,D.fields,u,C]),ie=function(){return r(void 0,void 0,void 0,function(){var e;return a(this,function(n){switch(n.label){case 0:if(!oe()||y)return[2];w(!0),n.label=1;case 1:return n.trys.push([1,,4,5]),se(i.current),P&&void 0!==z&&void 0!==O&&(e=z===O-1,P(D.name,z,ae(i.current),e)),R?[4,R("submit"===D.nextAction)]:[3,3];case 2:n.sent(),n.label=3;case 3:return[3,5];case 4:return w(!1),[7];case 5:return[2]}})})},se=function(e){for(var n=ae(e),r=M(),a=j(),o={},i={},s=0,d=D.fields;s<d.length;s++){var l=d[s];if(C(l))for(var p=0,c=qa(l);p<c.length;p++){var u=c[p];Object.prototype.hasOwnProperty.call(r,u)&&(o[u]=void 0),Object.prototype.hasOwnProperty.call(a,u)&&(i[u]=void 0)}}for(var m=t(t({},o),n),f={},_=function(e,n,t){if(n.length>0){var r=n.join(", ");m["".concat(e,"_start")]=r,f["".concat(e,"_start")]=r}if(t.length>0){var a=t.join(", ");m["".concat(e,"_end")]=a,f["".concat(e,"_end")]=a}},h=function(e){var t,r,a,o,i,s=n[e],d=D.fields.find(function(n){return n.name===e});if("CHIPS"===(null==d?void 0:d.type)&&void 0!==s){var l=[],p=[],c=[];s.forEach(function(e){var n=d.items.find(function(n){return n.id===e});if(n){l.push(n.label);var t=n;t.startTime&&p.push(t.startTime),t.endTime&&c.push(t.endTime)}}),f[e]=function(e){if(0===e.length)return"";if(1===e.length)return e[0];if(2===e.length)return e.join(" and ");var n=e.pop();return e.join(", ")+", and "+n}(l),_(e,p,c)}else if("DATETIME"===(null==d?void 0:d.type)&&void 0!==s){var u=d,h=s;m[e]=h.label,f[e]=h.label,_(e,h.start?[h.start]:[],h.end?[h.end]:[]);var x=u.dateFieldName||En;m[x]=h.date,f[x]=h.date;var g=u.dateTimeFieldName||zn;m[g]=h.datetime,f[g]=h.datetime;var v=Vn(u.schedule);if(v){var b=u.timeZoneFieldName||On;m[b]=v,f[b]=v}}else if("DROPDOWN"===(null==d?void 0:d.type)&&void 0!==s){var y=d.items.find(function(e){return e.id===s});y?y.label&&y.label.trim().length>0?f[e]=y.label:f[e]=s.replace(/_/g," ").split(" ").map(function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}).join(" "):f[e]=s}else"DATE"===(null==d?void 0:d.type)&&void 0!==s?f[e]=(t=new Date(s),r=t.getDate(),a=t.toLocaleString("default",{month:"long"}),o=t.getFullYear(),i=function(e){if(e>=11&&e<=13)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}(r),"".concat(a," ").concat(r).concat(i,", ").concat(o)):f[e]=s},x=0,g=Object.keys(n);x<g.length;x++){h(g[x])}I(m),A(t(t({},i),f))},de=function(){for(var e in g)if(!1!==_[e]&&!g[e].valid)return!0;return!1},le=n.useCallback(function(e,n){var r,a=!Object.prototype.hasOwnProperty.call(i.current,e);if(s.current.has(e)){if(!a&&i.current[e]===n)return void s.current.delete(e);if(!a&&i.current[e]!==n)return}(a||i.current[e]!==n)&&(Array.isArray(n)&&0===n.length&&(n=void 0),i.current=t(t({},i.current),((r={})[e]=n,r)),L&&(L.current=i.current),ee(),ha(g)||oe())},[ee,g,oe,L]),pe=n.useContext(De);ee();var ce,ue=!!D&&D.fullBleed;return e.jsxs("div",{className:ue?ga:void 0,children:[!V&&!!D&&(D.title||D.subtitle)&&e.jsxs("div",{className:Ca,children:[!!D.title&&e.jsx("p",{children:D.title}),!!D.subtitle&&e.jsx("p",{className:Da,children:D.subtitle})]}),!!D&&D.warnBeforeUnloadMessage&&e.jsxs("div",{style:{backgroundColor:"#fff3cd",color:"#856404",padding:"12px 16px",marginBottom:"16px",borderRadius:"4px",border:"1px solid #ffeaa7",display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx("span",{style:{fontSize:"20px"},children:"⚠️"}),e.jsx("span",{children:D.warnBeforeUnloadMessage})]}),(ce=D,!!ce&&void 0!==ce.iframe&&e.jsx("div",{className:xa,children:e.jsx("iframe",{src:D.iframe.src,title:D.title,width:D.iframe.width||"100%",height:D.iframe.height||"100%",frameBorder:"0",allowFullScreen:!0})})),Ua(D)&&e.jsxs("div",{className:va,children:[e.jsx("div",{id:D.externalWidget.anchorId,className:ba}),H&&"pending"===J&&!Z&&e.jsxs("div",{className:wa,role:"status","aria-live":"polite",children:[e.jsx("span",{className:Fa,children:e.jsx(ze,{})}),e.jsx("p",{children:"Finding available appointments…"})]}),("no_render"===J||"error"===J)&&!D.externalWidget.fallbackStep&&e.jsx("div",{className:ya,children:e.jsx("p",{children:"We're sorry, we couldn't load the booking form. Please try again later."})})]}),e.jsx("div",{children:function(){if(!D)return[];var n=D.fields||[],t=n.findIndex(function(e){return C(e)}),r=n.map(function(r,a){var s,d,l,p,c,u,m,f,h,x,v=a===n.length-1;if(C(r))return a===t?e.jsx("div",{className:"".concat(Sa," ").concat(Ta),children:e.jsx(mt,{field:{name:"scheduling_disabled",type:"CARD",text:"We'll contact you to schedule a time."},onFieldChange:le})},a):null;switch(r.type){case"TEXT":x="ADDRESS"===r.format?e.jsx(ma,{field:r,onFieldChange:le,value:i.current[r.name],errorMessage:null===(s=g[r.name])||void 0===s?void 0:s.message,required:r.mandatory,googleMapsApiKey:pe.googleMapsApiKey,mapsBaseUrl:pe.mapsBaseUrl},r.name):e.jsx(Nt,{field:r,onFieldChange:le,value:i.current[r.name],errorMessage:null===(d=g[r.name])||void 0===d?void 0:d.message,required:r.mandatory,isLastField:v},r.name);break;case"DROPDOWN":var b=r,y=i.current[b.name],w=void 0;if(y&&"none"!==y){var k=b.items.find(function(e){return e.id===y});if(k&&k.freeFormInput){var S=k.freeFormFieldName||"message";w=null===(l=g[S])||void 0===l?void 0:l.message}}x=e.jsx(Ut,{field:b,onFieldChange:le,errorMessage:null===(p=g[r.name])||void 0===p?void 0:p.message,required:r.mandatory,freeFormErrorMessage:w},r.name);break;case"CHECK":x=e.jsx(lt,{field:r,onFieldChange:le,errorMessage:null===(c=g[r.name])||void 0===c?void 0:c.message},r.name);break;case"CHIPS":x=e.jsx(kt,{field:r,onFieldChange:le,errorMessage:null===(u=g[r.name])||void 0===u?void 0:u.message,value:i.current[r.name]},r.name);break;case"DATE":var D=null==F?void 0:F.busyDays;x=e.jsx(Fr,{field:r,onFieldChange:le,errorMessage:null===(m=g[r.name])||void 0===m?void 0:m.message,busyDays:D,loading:E},r.name);break;case"DATETIME":x=e.jsx(Br,{field:r,onFieldChange:le,value:i.current[r.name],errorMessage:null===(f=g[r.name])||void 0===f?void 0:f.message,required:r.mandatory,busyDays:null==F?void 0:F.busyDays,offeringsByDate:T,preselectFirstAvailable:o.preselectFirstAvailableDate},r.name);break;case"DATERANGE":x=e.jsx(Tr,{field:r,onFieldChange:le,value:i.current[r.name],errorMessage:null===(h=g[r.name])||void 0===h?void 0:h.message,required:r.mandatory,isLastField:v},r.name);break;case"CARD":x=e.jsx(mt,{field:Tn(r,j()),onFieldChange:le},r.name);break;default:x=null}return e.jsx("div",{className:"".concat(Sa," ").concat(!1!==_[r.name]?Ta:""),children:x},a)});return r.filter(function(e){return null!==e})}()}),!!G&&e.jsx("div",{className:ka,role:"alert",children:e.jsx("p",{children:G})}),e.jsxs("div",t({className:"".concat(Ra," ").concat(D.final?Na:"")},D.final?{"data-xapp-final-actions":""}:{},{children:[!!R&&"omit"!==D.nextAction&&D.final&&e.jsx("div",{className:Ia,children:e.jsx("button",{type:"button",className:"".concat(ja," ").concat(de()||y?Oa:D.nextLabel?za:Ea),disabled:y,onClick:ie,children:y?"Loading...":D.nextLabel||"Next"})}),e.jsxs("div",{className:Aa,children:[void 0===N&&e.jsx("div",{className:Ma}),!!N&&"omit"!==D.previousAction&&e.jsxs("button",{type:"button",className:"".concat(ja," ").concat(Ea," ").concat(Pa),onClick:function(){se(i.current),N&&N()},"aria-label":D.previousLabel||"Previous",children:[e.jsx("span",{className:La,children:D.previousLabel||"Previous"}),e.jsx("span",{className:Ha,"aria-hidden":"true",children:"←"})]}),!!R&&"omit"!==D.nextAction&&!D.final&&e.jsx("button",{type:"button",className:"".concat(ja," ").concat(de()||y?Oa:D.nextLabel?za:Ea),disabled:y,onClick:ie,children:y?"Loading...":D.nextLabel||"Next"})]})]}))]})},Ga="FormFrame-module_xapp_form_frame_root__BLTha",Va="FormFrame-module_xapp_form_frame_intro__S4kWd",Xa="FormFrame-module_xapp_form_frame_title__GA8dy",Ja="FormFrame-module_xapp_form_frame_subtitle__WOeJI",Ka="FormFrame-module_xapp_form_frame_framed__9E311",Za="FormFrame-module_xapp_form_frame_plain__rBarK",Qa="FormFrame-module_xapp_form_frame_tab_row__osSVR",eo="FormFrame-module_xapp_form_frame_tab__0O2ga";xe(".FormFrame-module_xapp_form_frame_root__BLTha {\n display: block;\n}\n\n.FormFrame-module_xapp_form_frame_intro__S4kWd {\n background-color: #ffffff;\n padding: 28px 16px 18px;\n text-align: center;\n}\n\n.FormFrame-module_xapp_form_frame_title__GA8dy {\n margin: 0;\n font-family: Poppins, Arial, Verdana, sans-serif;\n font-size: 24px;\n font-weight: 700;\n line-height: 1.15;\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87));\n}\n\n.FormFrame-module_xapp_form_frame_subtitle__WOeJI {\n margin: 6px 0 0 0;\n font-family: Poppins, Arial, Verdana, sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 1.4;\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87));\n opacity: 0.75;\n}\n\n.FormFrame-module_xapp_form_frame_framed__9E311 {\n position: relative;\n border: 4px solid var(--xapp-form-widget-border-color, #d3d3df);\n border-radius: 0;\n background-color: var(--xapp-form-widget-background-color, #f3f8fb);\n margin-top: -2px;\n padding: 24px 22px 8px;\n}\n\n.FormFrame-module_xapp_form_frame_plain__rBarK {\n display: block;\n}\n\n.FormFrame-module_xapp_form_frame_tab_row__osSVR {\n background-color: #ffffff;\n text-align: center;\n}\n\n.FormFrame-module_xapp_form_frame_tab__0O2ga {\n display: inline-block;\n position: relative;\n z-index: 1;\n padding: 12px 30px;\n border-radius: 12px 12px 0 0;\n background-color: var(--xapp-form-widget-header-background-color, #012b54);\n color: var(--xapp-form-widget-header-text-color, #b7c5d1);\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n font-size: 14px;\n font-weight: 700;\n letter-spacing: 1px;\n white-space: nowrap;\n}");var no=function(n){var t=n.framing,r=n.framed,a=n.children,o=null==t?void 0:t.tabLabel,i=null==t?void 0:t.introTitle,s=null==t?void 0:t.introSubtitle,d=(null==t?void 0:t.introPlacement)||"above-tab",l=i||s?e.jsxs("div",{className:Va,"data-xapp-form-frame-intro":"",children:[!!i&&e.jsx("h2",{className:Xa,"data-xapp-form-frame-title":"",children:i}),!!s&&e.jsx("p",{className:Ja,"data-xapp-form-frame-subtitle":"",children:s})]}):null;return e.jsxs("div",{className:Ga,children:["above-tab"===d&&l,r&&!!o&&e.jsx("div",{className:Qa,children:e.jsx("span",{className:eo,"data-xapp-form-frame-tab":"",children:o})}),e.jsxs("div",{className:r?Ka:Za,"data-xapp-form-frame":r?"framed":"plain",children:["inline"===d&&l,a]})]})},to="SimpleNavigationHeader-module_xapp_navigation_header__YhCD1",ro="SimpleNavigationHeader-module_xapp_navigation_header_showcase__NhRLn",ao="SimpleNavigationHeader-module_xapp_navigation_header_container__V9y-e",oo="SimpleNavigationHeader-module_xapp_navigation_header_row__rmXFD",io="SimpleNavigationHeader-module_xapp_navigation_header_title__yVgEi",so="SimpleNavigationHeader-module_xapp_navigation_header_track__Ktw8x",lo="SimpleNavigationHeader-module_xapp_navigation_header_step__tTjar",po="SimpleNavigationHeader-module_xapp_navigation_header_dot__THRsN",co="SimpleNavigationHeader-module_xapp_navigation_header_label__tLrJ6";xe('/**\n * The phone breakpoint.\n *\n * Width alone cannot express "phone". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step\'s action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field\'s helper / error line. The metrics are MUI\'s FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.SimpleNavigationHeader-module_xapp_navigation_header__YhCD1 {\n background-color: inherit !important;\n}\n\n.SimpleNavigationHeader-module_xapp_navigation_header_showcase__NhRLn {\n background-color: inherit !important;\n padding: 0px !important;\n}\n\n.SimpleNavigationHeader-module_xapp_navigation_header_container__V9y-e {\n background-color: inherit !important;\n}\n\n.SimpleNavigationHeader-module_xapp_navigation_header_row__rmXFD {\n display: flex;\n justify-content: center;\n gap: 16px;\n padding: 16px;\n}\n\n.SimpleNavigationHeader-module_xapp_navigation_header_title__yVgEi {\n margin: 0;\n color: var(--xapp-form-widget-header-text-color, #b7c5d1);\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif);\n font-size: 2.125rem;\n font-weight: 400;\n line-height: 1.235;\n letter-spacing: 0.00735em;\n}\n\n.SimpleNavigationHeader-module_xapp_navigation_header_track__Ktw8x {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n min-height: 50px;\n}\n.SimpleNavigationHeader-module_xapp_navigation_header_track__Ktw8x::before {\n content: "";\n position: absolute;\n top: 50%;\n left: 0;\n right: 0;\n height: 3px;\n background-color: white;\n z-index: 1;\n}\n\n.SimpleNavigationHeader-module_xapp_navigation_header_step__tTjar {\n position: relative;\n top: 10px;\n z-index: 2;\n display: flex;\n flex-direction: column;\n align-items: center;\n min-width: 100px;\n}\n\n.SimpleNavigationHeader-module_xapp_navigation_header_dot__THRsN {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: 30px !important;\n min-width: auto;\n height: 30px !important;\n margin: 0;\n padding: 0 !important;\n border: 3px solid white !important;\n border-radius: 50% !important;\n box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);\n cursor: pointer;\n}\n.SimpleNavigationHeader-module_xapp_navigation_header_dot__THRsN:focus {\n outline: none;\n}\n.SimpleNavigationHeader-module_xapp_navigation_header_dot__THRsN:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n\n.SimpleNavigationHeader-module_xapp_navigation_header_label__tLrJ6 {\n margin: 8px;\n color: var(--xapp-form-widget-header-text-color, #b7c5d1);\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif);\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 1.43;\n letter-spacing: 0.01071em;\n}');var uo=function(n){var t=n.items,r=n.onHeaderClick,a=n.labelHeader,o=n.stepName,i=n.isShowCase;if(a){var s=t.find(function(e){return e.step===o}),d=null==s?void 0:s.label;return void 0===d?null:e.jsx("div",{className:"".concat(oo," ").concat(i?ro:ao),children:e.jsx("h4",{className:io,children:d})})}return e.jsx("div",{className:"".concat(oo," ").concat(to),children:e.jsx("div",{className:so,children:t.map(function(n,t){return e.jsxs("div",{className:lo,children:[e.jsx("button",{type:"button","aria-label":n.label,className:"".concat(to," ").concat(po),onClick:function(){r("".concat(n.step))}}),e.jsx("p",{className:co,children:n.label})]},t)})})})};
2
- /*! Copyright (c) 2025, XAPP AI */function mo(e,n){var t=e.slice(0,5);return!!n.find(function(e){if(e===t)return!0;if(e.includes("*")){var n=e.replace(/\*/g,"\\d")+"$";return new RegExp("^".concat(n)).test(t)}return!1})}function fo(e){if(e){var n=e.match(/\b\d{5}(?:-\d{4})?\b/g);if(n)for(var t=n.length-1;t>=0;t--){var r=n[t],a=e.indexOf(r),o=e.slice(0,a);if(/(,|\b[A-Z]{2})\s*$/.test(o.trim()))return r;if(a>15)return r}}}var _o="FormDisplay-module_xapp_formstep__OW1rY",ho="FormDisplay-module_active__5wTV3",xo="FormDisplay-module_xapp_header_container__Y-eFl",go="FormDisplay-module_xapp_header_container_showcase__MWJfr";xe(".FormDisplay-module_xapp_formstep__OW1rY {\n display: none;\n padding: 8px;\n}\n.FormDisplay-module_xapp_formstep__OW1rY.FormDisplay-module_active__5wTV3 {\n display: block;\n background-color: var(--xapp-form-widget-background-color, #f3f8fb) !important;\n}\n.FormDisplay-module_xapp_formstep__OW1rY.FormDisplay-module_title__-BtIw p {\n margin: 10px 0 0 0;\n}\n.FormDisplay-module_xapp_formstep__OW1rY {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n\n.FormDisplay-module_xapp_header_container__Y-eFl {\n background-color: var(--xapp-form-widget-header-background-color, #012b54) !important;\n position: absolute;\n top: 0px;\n right: 0px;\n left: 0px;\n z-index: 1000;\n min-height: 88px;\n padding-top: 16px;\n}\n.FormDisplay-module_xapp_header_container__Y-eFl .FormDisplay-module_empty_step_header__eHbBH {\n height: 42px;\n}\n.FormDisplay-module_xapp_header_container__Y-eFl {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.FormDisplay-module_xapp_header_container__Y-eFl .MuiTypography-root {\n color: var(--xapp-form-widget-header-text-color, #b7c5d1) !important;\n}\n\n.FormDisplay-module_xapp_header_container_showcase__MWJfr {\n border-top-left-radius: 12px;\n border-top-right-radius: 12px;\n background-color: var(--xapp-form-widget-header-background-color, #012b54) !important;\n padding-top: 10px;\n padding-bottom: 10px;\n margin-top: 10px;\n}\n.FormDisplay-module_xapp_header_container_showcase__MWJfr .FormDisplay-module_empty_step_header__eHbBH {\n height: 42px;\n}\n.FormDisplay-module_xapp_header_container_showcase__MWJfr {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.FormDisplay-module_xapp_header_container_showcase__MWJfr .MuiTypography-root {\n color: var(--xapp-form-widget-header-text-color, #b7c5d1) !important;\n}");var vo=function(o){var i,s=o.form,d=o.onActionResponse,l=o.isShowCase,p=o.loading,c=o.onTrackNextStep,u=o.onTrackPreviousStep,m=o.onTrackSubmit,f=o.onTrackSubmitFailure,_=o.currentStepDataRef,h=o.initialStep,x=o.preselectFirstAvailableDate,g=o.onTrackInitialStep,v=o.onFormNext,b=o.stepUpdate,y=o.onTrackHandoffRendered,w=o.onTrackHandoffNoRender,F=o.onTrackHandoffScheduled,k=o.onTrackHandoffError,S=n.useContext(De).framing,T=n.useState(0),C=T[0],D=T[1],R=n.useRef(!1),N=n.useState({}),I=N[0],A=N[1],M=n.useState(void 0),j=M[0],E=M[1],z=function(e){var n=e.step;n&&A(function(r){var a,o,i,s=r[n],d={fields:e.fields||[]};return(null===(o=e.externalWidget)||void 0===o?void 0:o.config)?(H.current[n]=!0,d.externalWidget={config:t(t({},null===(i=null==s?void 0:s.externalWidget)||void 0===i?void 0:i.config),e.externalWidget.config)}):(null==s?void 0:s.externalWidget)&&(d.externalWidget=s.externalWidget),t(t({},r),((a={})[n]=d,a))})};n.useEffect(function(){b&&z(b)},[b]);var O=n.useState(!1),P=O[0],L=O[1],H=n.useRef({}),U=n.useState(!1),B=U[0],W=U[1];n.useEffect(function(){var e;W(!1);var n=null===(e=s.steps)||void 0===e?void 0:e[C];if(n&&Ua(n)){var t=setTimeout(function(){W(!0),H.current[n.name]=!0,L(!1)},5e3);return function(){return clearTimeout(t)}}},[C]);var q=n.useRef({});n.useEffect(function(){if(Array.isArray(s.steps)&&s.steps.length>0)for(var e=function(e){if(e.condition){var n=kn(e.condition,"context",["isInServiceArea"]);q.current[e.name]=function(e){return new Function("context","isInServiceArea","return (".concat(n,");"))(e,mo)}}},n=0,t=s.steps;n<t.length;n++){e(t[n])}},[null==s?void 0:s.steps]),n.useEffect(function(){var e;(C<0||C>=(null===(e=null==s?void 0:s.steps)||void 0===e?void 0:e.length))&&D(0)},[null==s?void 0:s.steps,C]),n.useEffect(function(){if(!R.current&&"number"==typeof h){var e=null==s?void 0:s.steps;(null==e?void 0:e.length)&&(R.current=!0,h>0&&h<e.length&&(D(h),null==g||g(h)))}},[null==s?void 0:s.steps,h,g]);var $=n.useMemo(function(){var e,n,t=null===(e=s.steps)||void 0===e?void 0:e[C];return null!==(n=null==t?void 0:t.warnBeforeUnload)&&void 0!==n&&n},[C,s.steps]);n.useEffect(function(){if($){var e=function(e){return e.preventDefault(),e.returnValue="",""};return window.addEventListener("beforeunload",e),function(){window.removeEventListener("beforeunload",e)}}},[$]);var Y=n.useRef({}),G=n.useRef({}),V=n.useRef({}),X=n.useRef(!1);n.useEffect(function(){X.current=!1},[C]);var J=function(e){return r(void 0,void 0,void 0,function(){var n,r,o,i,d,l,p,c,u,m,f,_,h,x;return a(this,function(a){switch(a.label){case 0:for(n=-1,r=C+1;r<s.steps.length;r++){if(o=s.steps[r],i=q.current[o.name],d=Y.current.zip_code||Y.current.zip||fo(Y.current.address),l=t(t({},Y.current),{zip:d}),!i){n=r;break}if(i(l)){n=r;break}}if(p=s.steps[C],!(n>=0&&!e&&v&&(null==p?void 0:p.serverCallback)))return[3,4];A(function(e){var r=t({},e);return delete r[s.steps[n].name],r}),a.label=1;case 1:return a.trys.push([1,3,,4]),c=new Promise(function(e){return setTimeout(function(){return e(void 0)},3e3)}),u=v({result:V.current,form:s.name,step:s.steps[C].name,nextStep:s.steps[n].name}),[4,Promise.race([u,c])];case 2:if(m=a.sent(),null==(f=m)?void 0:f.displays)for(_=0,h=f.displays;_<h.length;_++)"FORM_STEP_UPDATE"===(x=h[_]).type&&z(x);return[3,4];case 3:return a.sent(),[3,4];case 4:return n>=0&&!!e&&Ua(s.steps[n])&&!H.current[s.steps[n].name]&&L(!0),n>=0&&D(n),e?[4,te(C)]:[3,6];case 5:a.sent(),a.label=6;case 6:return[2]}})})},K=function(){for(var e,n,r=C,a=(null===(n=null===(e=s.steps)||void 0===e?void 0:e[r])||void 0===n?void 0:n.name)||"unknown",o=C-1;o>=0;o--){var i=s.steps[o],d=q.current[i.name],l=Y.current.zip_code||Y.current.zip||fo(Y.current.address),p=t(t({},Y.current),{zip:l});if(!d){u&&u(a,r,i.name,o),D(o);break}if(d(p)){u&&u(a,r,i.name,o),D(o);break}}},Z=function(e){V.current=e,Y.current=t(t({},Y.current),e)},Q=function(){return Y.current},ee=function(e){G.current=t(t({},G.current),e)},ne=function(){return G.current},te=function(e){return r(void 0,void 0,void 0,function(){var n,t,r,o,i;return a(this,function(a){switch(a.label){case 0:if(X.current)return[2];if(X.current=!0,t=(n=null!=e?e:C)>=0&&n<s.steps.length?n:0,m&&m(s.steps[t].name,t,Y.current,s.steps.length),r={result:Y.current,form:s.name,step:s.steps[t].name,final:!!s.steps[t].final},"function"!=typeof d)return[2];E(void 0),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,d(r,"FORM_SUBMIT")];case 2:return a.sent(),[3,4];case 3:return o=a.sent(),X.current=!1,E(t),i=o instanceof Error?o.message:String(o),ie("FORM_SUBMIT failed on step ".concat(s.steps[t].name,": ").concat(i)),f&&f(s.steps[t].name,t,s.steps.length,i),[3,4];case 4:return[2]}})})},re=function(e){var n=s.steps.findIndex(function(n){return n.name===e});-1!==n?D(n):ie("External widget fallback: Cannot find step to jump to: ".concat(e))},ae=C;(C<0||C>=(null===(i=null==s?void 0:s.steps)||void 0===i?void 0:i.length))&&(ae=0);var oe=Ua(s.steps[ae]),se=!oe,de=oe,le=!!(null==S?void 0:S.tabLabel)&&!!s.labelHeader&&se||de;return e.jsxs("div",t({},le?{"data-xapp-header-suppressed":""}:{},de?{"data-xapp-bare-handoff":""}:{},{children:[s.header.length>0&&!le&&e.jsx("div",{className:l?go:xo,children:e.jsx(uo,{items:s.header,onHeaderClick:function(e){var n=s.steps.findIndex(function(n){return n.name===e});-1!==n?D(n):ie("Header click: Cannot find step to jump to: ".concat(e))},labelHeader:s.labelHeader,stepName:s.steps[ae].name,isShowCase:l})}),e.jsx("div",{children:s.steps.map(function(n,r){var a,o,i=I[n.name],d=n;if((null==i?void 0:i.fields)&&(d=t(t({},d),{fields:i.fields})),null===(a=null==i?void 0:i.externalWidget)||void 0===a?void 0:a.config){var l=n.externalWidget;l&&(d=t(t({},d),{externalWidget:t(t({},l),{config:t(t({},l.config),i.externalWidget.config)})}))}var u=s.steps[ae].name===n.name,m=!Ua(d),f=e.jsx(Ya,{formStep:d,preselectFirstAvailableDate:x,onData:Z,onDataWithLabels:ee,onNextStep:ae<s.steps.length?J:void 0,onPrevStep:ae>0?K:void 0,getData:Q,getDataWithLabels:ne,loading:p,currentStepIndex:r,totalSteps:s.steps.length,onTrackNextStep:c,currentStepDataRef:_,isActive:u,externalWidgetConfigPending:P&&Ua(n)&&!(null===(o=null==i?void 0:i.externalWidget)||void 0===o?void 0:o.config)&&!B,onTrackHandoffRendered:y,onTrackHandoffNoRender:w,onTrackHandoffScheduled:F,onTrackHandoffError:k,onExternalWidgetFallback:re,hideIntro:!!(null==S?void 0:S.introTitle)||!!(null==S?void 0:S.introSubtitle)||Ua(d),submitError:j===r?"We couldn't submit your information. Please check your connection and try again.":void 0});return e.jsx("div",{className:"".concat(_o," ").concat(u?ho:""),"data-xapp-form-step-active":u?"true":"false",children:S?e.jsx(no,{framing:S,framed:m,children:f}):f},r)})})]}))},bo=function(n){var t=n.display,r=n.onActionResponse,a=n.loading,o=n.onTrackNextStep,i=n.onTrackPreviousStep,s=n.onTrackSubmit,d=n.onTrackSubmitFailure,l=n.currentStepDataRef,p=n.initialStep,c=n.preselectFirstAvailableDate,u=n.onTrackInitialStep,m=n.onFormNext,f=n.stepUpdate,_=n.onTrackHandoffRendered,h=n.onTrackHandoffNoRender,x=n.onTrackHandoffScheduled,g=n.onTrackHandoffError;return e.jsxs("div",{className:"xapp-search-response-display",children:[le(t)&&e.jsx(vo,{form:t,loading:a,onActionResponse:r,onTrackNextStep:o,onTrackPreviousStep:i,onTrackSubmit:s,onTrackSubmitFailure:d,currentStepDataRef:l,initialStep:p,preselectFirstAvailableDate:c,onTrackInitialStep:u,onFormNext:m,stepUpdate:f,onTrackHandoffRendered:_,onTrackHandoffNoRender:h,onTrackHandoffScheduled:x,onTrackHandoffError:g}),de(t)&&e.jsx(Fn,{list:t}),se(t)&&e.jsx(bn,{carousel:t})]})},yo=function(n){var t=n.html;return e.jsx("div",{className:"xapp-search-response-html",dangerouslySetInnerHTML:{__html:t}})},wo=function(n){var t=n.text;return e.jsx("div",{className:"xapp-search-response-text",children:e.jsx("p",{children:t})})},Fo=function(t){var r=t.audio,a=t.onAudioChange,o=n.useRef(null);return n.useEffect(function(){var e=o.current,n=function(){oe("Audio finished playing"),a(!1)},t=function(){oe("Audio started playing"),a(!0)};return e&&(e.addEventListener("ended",n),e.addEventListener("play",t)),function(){e&&(e.removeEventListener("ended",n),e.removeEventListener("play",t))}},[r,a]),e.jsx("audio",{ref:o,autoPlay:!0,src:r})},ko="SearchResponseOutputSpeech-module_xapp_search_response_output_speech__DCf8F";xe("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.SearchResponseOutputSpeech-module_xapp_search_response_output_speech__DCf8F {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n font-weight: normal;\n font-size: 16px;\n font-style: normal;\n color: #000;\n}\n.SearchResponseOutputSpeech-module_xapp_search_response_output_speech__DCf8F p {\n margin: 0 0 1em 0;\n}\n.SearchResponseOutputSpeech-module_xapp_search_response_output_speech__DCf8F p:last-child {\n margin-bottom: 0;\n}");var So=function(t){var r,a=t.outputSpeech,o=t.onAudioChange,i="string"==typeof a?a:null==a?void 0:a.displayText,s="string"==typeof a||null==a?void 0:a.html,d="string"==typeof a||null==a?void 0:a.ssml;if(n.useContext(De).isVoiceEnabled){var l=d?function(e){for(var n,t=/<audio\s+src\s*=\s*"(.+?)"\s*\/?>/g,r=[];null!==(n=t.exec(e));)r.push(n[1]);return r}(d):[];r=l.length>0?l[0]:void 0}return e.jsxs("div",{className:ko,children:[!!s&&e.jsx(yo,{html:s}),!!i&&!s&&e.jsx(wo,{text:i}),!!r&&e.jsx(Fo,{audio:r,onAudioChange:o})]})},To={};Object.defineProperty(To,"__esModule",{value:!0});var Co=To.isLinkoutSuggestion=function(e){if(!e)return!1;return void 0!==e.url};var Do="Button-module_xapp_search_btn__cQf3T",Ro="Button-module_xapp_search_btn__expand__dUwot";xe("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.Button-module_xapp_search_btn__cQf3T {\n display: inline-block;\n border-radius: var(--xapp-form-widget-border-radius-md, 12px);\n border: solid 1px var(--xapp-form-widget-border-color, #d3d3df);\n background: white;\n padding: 4px 24px;\n color: black;\n text-decoration: none;\n box-sizing: border-box;\n text-align: center;\n line-height: normal;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n font-size: 16px;\n cursor: pointer;\n transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out, transform 150ms ease-in-out;\n}\n.Button-module_xapp_search_btn__cQf3T:hover {\n background-color: rgba(0, 0, 0, 0.04);\n box-shadow: var(--xapp-form-widget-box-shadow-subtle, 0 2px 8px rgba(0, 0, 0, 0.08));\n}\n.Button-module_xapp_search_btn__cQf3T:active {\n transform: scale(0.98);\n}\n.Button-module_xapp_search_btn__cQf3T:focus {\n outline: none;\n}\n.Button-module_xapp_search_btn__cQf3T:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n.Button-module_xapp_search_btn__expand__dUwot {\n width: 100%;\n}");var No=function(n){var t=n.className,r=n.expand,a=n.onClick;return e.jsx("button",{type:"button",className:"".concat(Do," ").concat(r?Ro:""," ").concat(t||""),onClick:a,children:n.children})},Io="SuggestedAction-module_xapp_search_suggested_action__gbLCz";xe("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.SuggestedAction-module_xapp_search_suggested_action__gbLCz {\n display: inline-block;\n border-radius: var(--xapp-form-widget-border-radius-md, 12px);\n border: solid 1px var(--xapp-form-widget-border-color, var(--xapp-form-accent-color, #d3d3df));\n background: white;\n padding: 4px 24px;\n color: black;\n text-decoration: none;\n box-sizing: border-box;\n text-align: center;\n line-height: normal;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n font-size: 16px;\n cursor: pointer;\n transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out, transform 150ms ease-in-out;\n}\n.SuggestedAction-module_xapp_search_suggested_action__gbLCz:hover {\n background-color: rgba(0, 0, 0, 0.04);\n box-shadow: var(--xapp-form-widget-box-shadow-subtle, 0 2px 8px rgba(0, 0, 0, 0.08));\n}\n.SuggestedAction-module_xapp_search_suggested_action__gbLCz:active {\n transform: scale(0.98);\n}\n.SuggestedAction-module_xapp_search_suggested_action__gbLCz:focus {\n outline: none;\n}\n.SuggestedAction-module_xapp_search_suggested_action__gbLCz:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}");var Ao=function(t){var r=t.action,a=t.className,o=t.onClick,i=n.useCallback(function(){o(r)},[r,o]);return Co(r)?e.jsx("span",{className:"".concat(Io," ").concat(a||""),children:e.jsx("a",{href:r.url,children:Ce(r)})}):e.jsxs(No,{className:"".concat(Io," ").concat(a||""),onClick:i,children:[" ",Ce(r)]})},Mo={xapp_search_suggested_actions__actions:"SuggestedActions-module_xapp_search_suggested_actions__actions__Apv0-",xapp_search_suggested_actions__item:"SuggestedActions-module_xapp_search_suggested_actions__item__Q7nQb"};xe(".SuggestedActions-module_xapp_search_suggested_actions__actions__Apv0- {\n margin-top: 8px;\n margin-bottom: 8px;\n}\n.SuggestedActions-module_xapp_search_suggested_actions__item__Q7nQb {\n margin-right: 16px;\n}");var jo=function(n){var t=n.actions,r=n.onActionClick;return e.jsx("div",{className:Mo.xapp_search_suggested_actions,children:e.jsx("div",{className:Mo.xapp_search_suggested_actions__actions,children:t.map(function(n,t){return e.jsx(Ao,{action:n,className:Mo.xapp_search_suggested_actions__item,onClick:r},t)})})})},Eo={xapp_search_response_part:"SearchResponsePart-module_xapp_search_response_part__sF6gs",noHeaderForm:"SearchResponsePart-module_noHeaderForm__HdlyL"};xe(".SearchResponsePart-module_xapp_search_response_part__sF6gs {\n margin-bottom: 12px;\n margin-top: 86px;\n border-radius: 8px;\n}\n.SearchResponsePart-module_xapp_search_response_part__sF6gs.SearchResponsePart-module_noHeaderForm__HdlyL {\n margin-top: 12px;\n}\n.SearchResponsePart-module_xapp_search_response_part__sF6gs:has([data-xapp-header-suppressed]) {\n margin-top: 12px;\n}");var zo=function(n){var t=n.extraClass,r=t?Eo[t]||t:"";return e.jsx("div",{className:"".concat(Eo.xapp_search_response_part," ").concat(r),children:n.children})},Oo="FormResponse-module_xapp_search_response__r2YN1";xe(".FormResponse-module_xapp_search_response__r2YN1 {\n padding: 0 10px;\n overflow: auto;\n}");var Po=function(n){var t=n.response,r=n.className,a=n.onActionClick,o=n.onActionResponse,i=n.onAudioChange,s=n.loading,d=n.onTrackNextStep,l=n.onTrackPreviousStep,p=n.onTrackSubmit,c=n.onTrackSubmitFailure,u=n.currentStepDataRef,m=n.initialStep,f=n.preselectFirstAvailableDate,_=n.onTrackInitialStep,h=n.onFormNext,x=n.stepUpdate,g=n.onTrackHandoffRendered,v=n.onTrackHandoffNoRender,b=n.onTrackHandoffScheduled,y=n.onTrackHandoffError,w=t.outputSpeech,F=t.displays,k="object"==typeof w?w.suggestions:void 0;return e.jsxs("div",{className:"".concat(Oo," ").concat(r||""),children:[!!w&&e.jsx(zo,{children:e.jsx(Ge,{children:e.jsx(So,{outputSpeech:w,onAudioChange:i})})}),!!(null==k?void 0:k.length)&&(null==k?void 0:k.length)>0&&e.jsx(jo,{actions:k,onActionClick:a}),!!(null==F?void 0:F.length)&&(null==F?void 0:F.length)>0&&F.map(function(n,t){var r=le(n)&&(!n.header||0===n.header.length);return e.jsx(zo,{extraClass:r?"noHeaderForm":"",children:e.jsx(bo,{display:n,onActionResponse:o,loading:s,onTrackNextStep:d,onTrackPreviousStep:l,onTrackSubmit:p,onTrackSubmitFailure:c,currentStepDataRef:u,initialStep:m,preselectFirstAvailableDate:f,onTrackInitialStep:_,onFormNext:h,stepUpdate:x,onTrackHandoffRendered:g,onTrackHandoffNoRender:v,onTrackHandoffScheduled:b,onTrackHandoffError:y})},t)})]})},Lo=["pointerdown","keydown","scroll","touchstart"],Ho=function(){function e(e,n,t){this.api=e,this.sessionId=n,this.formId=t}return e.forVisit=function(n,t){return new e(n,n.visitSession().sessionId,t)},e.prototype.trackFormOpen=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata({isOpen:!0}),this.watchForFirstInteraction(),t={eventType:"form_open",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),oe("[EventTracking] form_open event tracked: ".concat(e.formName)),[3,3];case 2:return r=a.sent(),ie("[EventTracking] Failed to track form_open event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackEngaged=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata(),t={eventType:"engaged",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),oe("[EventTracking] engaged event tracked: ".concat(e.formName," (").concat(e.trigger,")")),[3,3];case 2:return r=a.sent(),ie("[EventTracking] Failed to track engaged event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackNextStep=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata(),t={eventType:"next_step",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),oe("[EventTracking] next_step event tracked: ".concat(e.completedStepName)),[3,3];case 2:return r=a.sent(),ie("[EventTracking] Failed to track next_step event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackPreviousStep=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata(),t={eventType:"previous_step",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),oe("[EventTracking] previous_step event tracked: ".concat(e.fromStepName," -> ").concat(e.toStepName)),[3,3];case 2:return r=a.sent(),ie("[EventTracking] Failed to track previous_step event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackStepChange=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata(),t={eventType:"step_change",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),oe("[EventTracking] step_change event tracked: ".concat(e.fromStepName," -> ").concat(e.toStepName," (").concat(e.direction,")")),[3,3];case 2:return r=a.sent(),ie("[EventTracking] Failed to track step_change event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackSubmit=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata(),t={eventType:"submit",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),oe("[EventTracking] submit event tracked: ".concat(e.finalStepName)),[3,3];case 2:return r=a.sent(),ie("[EventTracking] Failed to track submit event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackSubmitFailure=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata(),t={eventType:"submit_failure",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),oe("[EventTracking] submit_failure event tracked: ".concat(e.finalStepName)),[3,3];case 2:return r=a.sent(),ie("[EventTracking] Failed to track submit_failure event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackClose=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata(),t={eventType:"close",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),oe("[EventTracking] close event tracked: ".concat(e.lastStepName)),[3,3];case 2:return r=a.sent(),ie("[EventTracking] Failed to track close event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackPartialData=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata(),t={eventType:"partial_data",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),oe("[EventTracking] partial_data event tracked: ".concat(e.lastStepName," (").concat(e.abandonmentReason,")")),[3,3];case 2:return r=a.sent(),ie("[EventTracking] Failed to track partial_data event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackHandoffRendered=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata(),t={eventType:"handoff_rendered",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),oe("[EventTracking] handoff_rendered event tracked: ".concat(e.stepName," (").concat(e.provider,")")),[3,3];case 2:return r=a.sent(),ie("[EventTracking] Failed to track handoff_rendered event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackHandoffNoRender=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata(),t={eventType:"handoff_no_render",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),oe("[EventTracking] handoff_no_render event tracked: ".concat(e.stepName," (").concat(e.provider,")")),[3,3];case 2:return r=a.sent(),ie("[EventTracking] Failed to track handoff_no_render event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackHandoffScheduled=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata(),t={eventType:"handoff_scheduled",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),oe("[EventTracking] handoff_scheduled event tracked: ".concat(e.stepName," (").concat(e.provider,")")),[3,3];case 2:return r=a.sent(),ie("[EventTracking] Failed to track handoff_scheduled event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackHandoffError=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata(),t={eventType:"handoff_error",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),oe("[EventTracking] handoff_error event tracked: ".concat(e.stepName," (").concat(e.provider,")")),[3,3];case 2:return r=a.sent(),ie("[EventTracking] Failed to track handoff_error event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackLoad=function(e){try{var n=this.buildMetadata();delete n.currentUrl;var r={eventType:"load",metadata:t(t({},n),e),data:{}};return this.api.trackEventBeacon(r,"form")}catch(e){return ie("[EventTracking] Failed to queue load event: ".concat(e)),!1}},e.prototype.trackPartialDataBeacon=function(e){try{var n={eventType:"partial_data",metadata:this.buildMetadata(),data:e};return this.api.trackEventBeacon(n)}catch(e){return ie("[EventTracking] Failed to queue partial_data beacon: ".concat(e)),!1}},e.prototype.buildMetadata=function(e){var n=(void 0===e?{}:e).isOpen,t=void 0!==n&&n,r=new Date,a=Date.now();t&&void 0===this.openedAt&&(this.openedAt=a);var o={timestamp:r.toISOString(),sessionId:this.sessionId||"unknown",formId:this.formId||"unknown",userAgent:navigator.userAgent},i=q();i&&(o.internal=i),void 0!==this.openedAt&&(o.msOnPage=String(Math.max(0,a-this.openedAt)),void 0!==this.firstInteractionAt&&(o.msToFirstInteraction=String(Math.max(0,this.firstInteractionAt-this.openedAt))));try{o.timezone=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){}try{o.language=navigator.language,o.screenWidth=String(window.screen.width),o.screenHeight=String(window.screen.height),o.viewportWidth=String(window.innerWidth),o.viewportHeight=String(window.innerHeight)}catch(e){}var s=X(),d=s.visitorId,l=s.visitId;o.userId=d,o.visitorId=d,o.visitId=l;try{var p=new URL(window.location.href);(null==p?void 0:p.host.toLowerCase().startsWith("localhost"))||(o.currentUrl=window.location.href)}catch(e){}try{var c=this.getTrackingParameters();Object.assign(o,c)}catch(e){}return o},e.prototype.dispose=function(){var e;null===(e=this.stopWatchingForInteraction)||void 0===e||e.call(this)},e.prototype.adoptVisitFrom=function(e){var n;e&&e!==this&&void 0!==e.openedAt&&(this.openedAt=e.openedAt,this.firstInteractionAt=e.firstInteractionAt,null===(n=e.stopWatchingForInteraction)||void 0===n||n.call(e),void 0===this.firstInteractionAt&&this.watchForFirstInteraction())},e.prototype.watchForFirstInteraction=function(){var e=this;if(!this.stopWatchingForInteraction&&void 0===this.firstInteractionAt&&"undefined"!=typeof document)try{var n=function(n){var t;n.isTrusted&&(void 0===e.firstInteractionAt&&(e.firstInteractionAt=Date.now()),null===(t=e.stopWatchingForInteraction)||void 0===t||t.call(e))};this.stopWatchingForInteraction=function(){for(var t=0,r=Lo;t<r.length;t++){var a=r[t];document.removeEventListener(a,n,!0)}e.stopWatchingForInteraction=void 0};for(var t=0,r=Lo;t<r.length;t++){var a=r[t];document.addEventListener(a,n,{capture:!0,passive:!0})}}catch(e){}},e.prototype.getTrackingParameters=function(){return te(this.api.trackingScope)},e.prototype.sendEvent=function(e){return r(this,void 0,void 0,function(){var n;return a(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.api.trackEvent(e.eventType,e)];case 1:return t.sent(),[3,3];case 2:return n=t.sent(),ie("[EventTracking] API call failed: ".concat(n)),[3,3];case 3:return[2]}})})},e}(),Uo="FormWidget-module_loading__aAJ-B",Bo="FormWidget-module_xapp_form_widget__V-G-H",Wo="FormWidget-module_xapp_form_widget__content__a9NXC",qo="FormWidget-module_xapp_form_widget__response__X8Hbz",$o="FormWidget-module_xapp_form_widget__spinner__FBxso",Yo="FormWidget-module_xapp_form_widget__close__0lp0O",Go="FormWidget-module_embedded__UB1Gi";xe("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.FormWidget-module_loading__aAJ-B {\n background-color: rgba(0, 0, 0, 0) !important;\n border: 0px !important;\n}\n\n.FormWidget-module_xapp_form_widget__V-G-H {\n display: flex;\n flex-direction: column;\n border: solid 1px var(--xapp-form-widget-border-color, #d3d3df);\n background: var(--xapp-form-widget-background-color, #f3f8fb);\n border-radius: var(--xapp-form-widget-border-radius-xl, 20px);\n overflow: hidden;\n max-width: 740px;\n max-height: 100%;\n box-shadow: var(--xapp-form-widget-box-shadow, 0 4px 24px rgba(0, 0, 0, 0.12));\n box-sizing: border-box;\n position: relative;\n}\n.FormWidget-module_xapp_form_widget__V-G-H:has([data-xapp-bare-handoff]) {\n border: 0;\n border-radius: 0;\n box-shadow: none;\n background: transparent;\n}\n.FormWidget-module_xapp_form_widget__V-G-H:has([data-xapp-bare-handoff]) .FormWidget-module_xapp_form_widget__content__a9NXC {\n border-top: 0;\n}\n.FormWidget-module_xapp_form_widget__content__a9NXC {\n display: flex;\n flex-direction: column;\n border-top: solid 1px var(--xapp-form-widget-border-color, #d3d3df);\n max-height: 100%;\n min-height: 128px;\n overflow: hidden;\n width: 100%;\n}\n.FormWidget-module_xapp_form_widget__response__X8Hbz {\n padding-top: 1em;\n}\n.FormWidget-module_xapp_form_widget__spinner__FBxso {\n width: 100px;\n height: 100px;\n margin: auto;\n padding: 20px;\n}\n.FormWidget-module_xapp_form_widget__close__0lp0O {\n position: absolute;\n top: 8px;\n right: 8px;\n width: 28px;\n height: 28px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #666;\n cursor: pointer;\n font-weight: bold;\n border: none;\n background: rgba(255, 255, 255, 0.9);\n z-index: 1000;\n transition: background-color 200ms ease-in-out, transform 150ms ease-in-out, box-shadow 200ms ease-in-out;\n box-shadow: var(--xapp-form-widget-box-shadow-subtle, 0 2px 8px rgba(0, 0, 0, 0.08));\n}\n.FormWidget-module_xapp_form_widget__close__0lp0O::before {\n content: \"\";\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 44px;\n height: 44px;\n}\n.FormWidget-module_xapp_form_widget__close__0lp0O:hover {\n background-color: rgb(255, 255, 255);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n transform: scale(1.05);\n}\n.FormWidget-module_xapp_form_widget__close__0lp0O:active {\n transform: scale(0.95);\n}\n.FormWidget-module_xapp_form_widget__close__0lp0O:focus {\n outline: none;\n}\n.FormWidget-module_xapp_form_widget__close__0lp0O:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n\n/* A width per breakpoint, capped at the container.\n *\n * These used to set `width` in pixels, derived from the VIEWPORT, which says\n * nothing about the container the widget was actually put in. Anywhere\n * narrower -- get.xapp.ai embeds the form in a ~548px frame -- it rendered at\n * 740px and spilled out, clipped and silent. #1687.\n *\n * #1690 answered that with `width: 100%` and a `max-width` cap, which broke the\n * floating popup instead: its body is a centred flex item that shrinks to fit,\n * so 100% of it is the form's own content width, and a step of stacked fields\n * rendered as a ~175-260px sliver in the middle of a desktop page.\n *\n * So the width is definite again and the container caps it: `max-width: 100%`\n * lets it shrink inside a narrower frame, and a shrink-to-fit parent sizes to\n * the definite width rather than to the content. Its own date/time layout is\n * flex-wrap: wrap, so it stacks unaided once two columns no longer fit.\n */\n@media (min-width: 1201px) {\n .FormWidget-module_xapp_form_widget__V-G-H {\n width: 740px;\n max-width: 100%;\n }\n}\n@media (min-width: 992px) and (max-width: 1200px) {\n .FormWidget-module_xapp_form_widget__V-G-H {\n width: 600px;\n max-width: 100%;\n }\n}\n@media (min-width: 641px) and (max-width: 991px) {\n .FormWidget-module_xapp_form_widget__V-G-H {\n width: 500px;\n max-width: 100%;\n }\n}\n/* Mobile */\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormWidget-module_xapp_form_widget__V-G-H {\n width: 100%;\n max-width: none;\n height: 100%;\n border-radius: 0;\n border: 0;\n }\n .FormWidget-module_xapp_form_widget__content__a9NXC {\n width: 100%;\n border-top: 0;\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n }\n}\n.FormWidget-module_embedded__UB1Gi {\n width: 100%;\n height: 100%;\n max-width: none;\n border: none;\n border-radius: 0;\n box-shadow: none;\n}");var Vo=[1e3,2e3];var Xo=function(n){var t=n.config;return e.jsx(De.Provider,{value:t,children:e.jsx(Jo,{docked:n.docked,embedded:n.embedded,initialStep:n.initialStep,preselectFirstAvailableDate:n.preselectFirstAvailableDate,openedByTrigger:n.openedByTrigger,preselectChipLabel:n.preselectChipLabel,onPreselectChipUsed:n.onPreselectChipUsed,onSubmit:n.onSubmit,response:n.response})})},Jo=function(o){var i,s=o.docked,d=o.embedded,l=o.initialStep,p=o.preselectFirstAvailableDate,c=o.openedByTrigger,u=o.preselectChipLabel,m=o.onPreselectChipUsed,f=o.onSubmit,_=_e(),h=_[0],x=_[1],g=Re(),v=g.loading,b=g.run,y=h.query,w=h.sendRequest,F=h.active,k=n.useState(o.response),S=k[0],T=k[1],C=n.useState(void 0),D=C[0],R=C[1],N=n.useState(!1),I=N[0],A=N[1],M=n.useState(0),j=M[0],E=M[1],z=n.useContext(De),O=Ae(z.api.demoMode||null===(i=z.trustedForm)||void 0===i?void 0:i.scriptUrl),P=n.useMemo(function(){return Te.getApi({key:z.api.key,url:z.api.url,intentId:z.intentId,demoMode:z.api.demoMode})},[z]),L=n.useRef(null),H=n.useRef({}),U=n.useRef({}),B=n.useRef(0),W=n.useRef(!1),q=n.useRef(!1),$=n.useRef(void 0),Y=n.useCallback(function(){var e=$.current;if(e)return e;var n=V();return $.current=n,n},[]),G=n.useRef(null),X=n.useRef("unknown"),J=n.useRef(!1),K=n.useRef(!1),Z=n.useRef(!1),Q=n.useCallback(function(e){var n,t,r;L.current&&!Z.current&&(Z.current=!0,L.current.trackEngaged({formName:X.current,trigger:e,firstStepName:null===(r=null===(t=null===(n=G.current)||void 0===n?void 0:n.steps)||void 0===t?void 0:t[0])||void 0===r?void 0:r.name}))},[]),ee=n.useCallback(function(){T(void 0),x({type:"new-search"}),x({type:"set-modal-state",active:!1,minimized:!0,sendRequest:!1})},[x]),ne=n.useCallback(function(){var e,n,r,a,o;if(L.current&&!W.current&&!J.current){var i=G.current;if(i){var s=(null===(e=i.steps)||void 0===e?void 0:e.length)||1,d=B.current,l=t(t({},H.current),U.current),p=Object.keys(l).length>0;L.current.trackClose({lastStepName:(null===(r=null===(n=i.steps)||void 0===n?void 0:n[d])||void 0===r?void 0:r.name)||"unknown",lastStepIndex:d,totalStepsCompleted:d,totalSteps:s,formData:p?l:void 0}),L.current.trackPartialData({lastStepName:(null===(o=null===(a=i.steps)||void 0===a?void 0:a[d])||void 0===o?void 0:o.name)||"unknown",lastStepIndex:d,totalStepsCompleted:d,totalSteps:s,partialData:p?l:void 0,abandonmentReason:"widget_close"}),J.current=!0}}T(void 0),x({type:"new-search"}),x({type:"set-modal-state",active:!1,minimized:!1,sendRequest:!1}),P.channelActionRequest({data:{result:{},step:"",form:""}},"FORM_CLOSE").then(function(e){oe("ACTION Request (FORM_CLOSE). Data: Response: ".concat(JSON.stringify(e))),E(0)})},[P,x]);n.useEffect(function(){return function(){var e;null===(e=L.current)||void 0===e||e.dispose()}},[]),n.useEffect(function(){var e=re(window.location.href,{persistToLocalStorage:!0,persistenceDays:30,preferUrlParameters:!0,scope:P.trackingScope});"development"===process.env.NODE_ENV&&Object.keys(e).length>0&&oe("[FormWidget] Captured tracking parameters:",e)},[P]),n.useEffect(function(){var e=function(){var e,n,r,a=t(t({},H.current),U.current);if(L.current&&!W.current&&!J.current){var o=G.current;if(o){var i=(null===(e=o.steps)||void 0===e?void 0:e.length)||1,s=B.current;L.current.trackPartialDataBeacon({lastStepName:(null===(r=null===(n=o.steps)||void 0===n?void 0:n[s])||void 0===r?void 0:r.name)||"unknown",lastStepIndex:s,partialData:a,totalStepsCompleted:s,totalSteps:i,completionPercentage:Math.round(s/i*100),abandonmentReason:"close_tab"}),J.current=!0}}};return window.addEventListener("beforeunload",e),function(){return window.removeEventListener("beforeunload",e)}},[]),n.useEffect(function(){var e=null,n=function(){var e,n,r,a=t(t({},H.current),U.current);if(L.current&&!W.current&&!J.current){var o=G.current;if(o){var i=(null===(e=o.steps)||void 0===e?void 0:e.length)||1,s=B.current;L.current.trackPartialDataBeacon({lastStepName:(null===(r=null===(n=o.steps)||void 0===n?void 0:n[s])||void 0===r?void 0:r.name)||"unknown",lastStepIndex:s,partialData:a,totalStepsCompleted:s,totalSteps:i,completionPercentage:Math.round(s/i*100),abandonmentReason:"timeout"}),J.current=!0}}},r=function(){if(document.hidden){var t=(r=new Date,(a=new Date(r)).setHours(24,0,0,0),a.getTime()-r.getTime());e=setTimeout(n,t)}else e&&(clearTimeout(e),e=null);var r,a};return document.addEventListener("visibilitychange",r),function(){document.removeEventListener("visibilitychange",r),e&&clearTimeout(e)}},[]);var te=n.useCallback(function(e,n){x({query:e.query,intentId:e.intentId,type:"set-query"}),b(function(){return P.intentRequest(e).then(function(t){var r,a,o,i;T(t),x({type:"set-response",response:t,query:e.query,intentId:e.intentId});var s=null===(r=null==t?void 0:t.displays)||void 0===r?void 0:r.find(function(e){var n=e;return"FORM"===(null==n?void 0:n.type)});if(s){G.current=s;var d=P.visitSession().sessionId,l=s.name||"unknown";X.current=l;var p=L.current;if(L.current=new Ho(P,d,l),L.current.adoptVisitFrom(p),!K.current){K.current=!0;var c=(null===(a=s.steps)||void 0===a?void 0:a.length)||1,u=null===(i=null===(o=s.steps)||void 0===o?void 0:o[0])||void 0===i?void 0:i.name;L.current.trackFormOpen({formName:l,totalSteps:c,firstStepName:u,lastStepIndex:0})}(null==n?void 0:n.engagementTrigger)&&Q(n.engagementTrigger)}})})},[P,x,b,Q]),ae=n.useCallback(function(e,n){var t=function(){return P.channelActionRequest(e,n).then(function(t){var r;if(oe("ACTION Request (".concat(n,"). Data: ").concat(JSON.stringify(e)," Response: ").concat(JSON.stringify(t))),function(e){return!!e&&!0===e[Fe]}(t)&&ie("ACTION Request (".concat(n,") was suppressed: this session already sent a final submit.")),(t.outputSpeech||t.displays)&&x({type:"set-response",response:t,query:""}),"FORM_SUBMIT"===n&&t.displays){var a=t.displays.find(function(e){return"FORM_STEP_UPDATE"===(null==e?void 0:e.type)});a&&R(a)}if((null===(r=t.context)||void 0===r?void 0:r.active)&&t.context.active.length>0){var o=t.context.active[0].parameters||{};x({type:"set-context",context:o})}e.autoClose?E(1):e.autoMinimize?E(2):E(0)})};return"FORM_SUBMIT"===n?b(function(){return function(e,n){return r(this,void 0,void 0,function(){var t,r,o;return a(this,function(a){switch(a.label){case 0:r=0,a.label=1;case 1:return r<=n.length?r>0?[4,(i=n[r-1],new Promise(function(e){setTimeout(e,i)}))]:[3,3]:[3,7];case 2:a.sent(),a.label=3;case 3:return a.trys.push([3,5,,6]),[4,e()];case 4:return[2,a.sent()];case 5:return o=a.sent(),t=o,ie("FORM_SUBMIT attempt ".concat(r+1," of ").concat(n.length+1," failed: ").concat(o)),[3,6];case 6:return r++,[3,1];case 7:throw t}var i})})}(t,Vo)}):b(t).catch(function(e){ie("ACTION Request (".concat(n,") failed: ").concat(e))})},[P,x,b]);n.useEffect(function(){if(s&&!q.current||w&&F&&(z.autoGreeting||z.intentId)){s&&(q.current=!0),P.resetSession();var e=s||c?void 0:"manual_open";te({query:z.autoGreeting,intentId:z.intentId},{engagementTrigger:e}),x({type:"set-modal-state",active:!0,minimized:!1,sendRequest:!1})}},[s,c,w,F,te,x,z.autoGreeting,P,z.intentId]),n.useEffect(function(){I||(1===j?(T(void 0),x({type:"new-search"}),x({type:"set-modal-state",active:!1,minimized:!1,sendRequest:!1}),E(0)):2===j&&(T(void 0),x({type:"new-search"}),x({type:"set-modal-state",active:!1,minimized:!0,sendRequest:!1}),E(0)))},[I,x,j]);var se=n.useCallback(function(e){var n=Ce(e);te({query:n},{engagementTrigger:"chip_click"})},[te]);n.useEffect(function(){if(u&&S){var e=S.outputSpeech,n="object"==typeof e&&null!==e?e.suggestions:void 0;if(n&&0!==n.length){var t=n.find(function(e){return Ce(e).toLowerCase()===u.toLowerCase()});t&&(oe("Auto-selecting chip: ".concat(Ce(t))),setTimeout(function(){se(t)},100)),m&&m()}}},[S,u,se,m]);var de=n.useCallback(function(e,n){if(n||(n=e.action),e.timezoneOffset=(new Date).getTimezoneOffset(),"FORM_SUBMIT"===n){var r=O();r&&e.result&&(e.result=t(t({},e.result),r)),e.extras=t(t(t({},e.extras),{eventId:Y()}),(a=Me("_fbp"),o=Me("_fbc"),t(t({},a?{fbp:a}:{}),o?{fbc:o}:{})))}var a,o;return ae(e,n)},[ae,O,Y]),le=n.useCallback(function(e){return P.channelActionRequest(e,"FORM_NEXT")},[P]),pe=function(e){A(e)},ce=n.useCallback(function(e){B.current=e},[]),ue=n.useCallback(function(e,n,r,a){var o,i,s;if(H.current=t(t({},H.current),r),U.current={},B.current=n+1,Q("step_transition"),L.current){var d=G.current,l=null===(i=null===(o=null==d?void 0:d.steps)||void 0===o?void 0:o[n+1])||void 0===i?void 0:i.name,p=(null===(s=null==d?void 0:d.steps)||void 0===s?void 0:s.length)||1;L.current.trackNextStep({completedStepName:e,completedStepIndex:n,nextStepName:l,stepData:r,isLastStep:a}),l&&L.current.trackStepChange({fromStepName:e,fromStepIndex:n,toStepName:l,toStepIndex:n+1,direction:"forward",lastStepIndex:n+1,totalSteps:p})}},[Q]),me=n.useCallback(function(e,n,t,r){var a,o;if(U.current={},B.current=r,L.current){var i=(null===(o=null===(a=G.current)||void 0===a?void 0:a.steps)||void 0===o?void 0:o.length)||1;L.current.trackPreviousStep({fromStepName:e,fromStepIndex:n,toStepName:t,toStepIndex:r,lastStepIndex:r,totalSteps:i}),L.current.trackStepChange({fromStepName:e,fromStepIndex:n,toStepName:t,toStepIndex:r,direction:"backward",lastStepIndex:r,totalSteps:i})}},[]),fe=n.useCallback(function(e,n,r,a){if(!W.current){W.current=!0;var o=O(),i=o?t(t({},r),o):r;if(H.current=i,L.current&&L.current.trackSubmit({finalStepName:e,finalStepIndex:n,completedData:i,totalSteps:a}),f&&!z.api.demoMode)try{f(Y())}catch(e){ie("[FormWidget] onSubmit callback threw:",e)}}},[O,f,Y,z.api.demoMode]),he=n.useCallback(function(e,n,t,r){var a;null===(a=L.current)||void 0===a||a.trackSubmitFailure({finalStepName:e,finalStepIndex:n,totalSteps:t,reason:r})},[]),xe=n.useCallback(function(e,n){var t;null===(t=L.current)||void 0===t||t.trackHandoffRendered({stepName:e,provider:n})},[]),ge=n.useCallback(function(e,n){var t;null===(t=L.current)||void 0===t||t.trackHandoffNoRender({stepName:e,provider:n})},[]),ve=n.useCallback(function(e,n,t){var r;null===(r=L.current)||void 0===r||r.trackHandoffScheduled({stepName:e,provider:n,payload:t})},[]),be=n.useCallback(function(e,n){var t;null===(t=L.current)||void 0===t||t.trackHandoffError({stepName:e,provider:n})},[]),ye=!!y||!!S;return s?e.jsx("div",{className:"".concat(Bo," ").concat(d?Go:""," ").concat(v?Uo:""),children:e.jsx("div",{className:"".concat(Wo," ").concat(v?Uo:""),children:S?e.jsx(Po,{response:S,className:qo,onActionClick:se,onActionResponse:de,onAudioChange:pe,loading:v,onTrackNextStep:ue,onTrackPreviousStep:me,onTrackSubmit:fe,onTrackSubmitFailure:he,currentStepDataRef:U,initialStep:l,preselectFirstAvailableDate:p,onTrackInitialStep:ce,onFormNext:le,stepUpdate:D,onTrackHandoffRendered:xe,onTrackHandoffNoRender:ge,onTrackHandoffScheduled:ve,onTrackHandoffError:be}):e.jsx("div",{className:$o,children:e.jsx(ze,{})})})}):e.jsxs("div",{className:"".concat(Bo," ").concat(d?Go:""," ").concat(v&&!S?Uo:""),children:[ye&&e.jsxs("div",{className:"".concat(Wo," ").concat(v&&!S?Uo:""),children:[!S&&v&&e.jsx("div",{className:$o,children:e.jsx(ze,{})}),S&&e.jsx(Po,{response:S,className:qo,onActionClick:se,onActionResponse:de,onAudioChange:pe,loading:v,onTrackNextStep:ue,onTrackPreviousStep:me,onTrackSubmit:fe,onTrackSubmitFailure:he,currentStepDataRef:U,initialStep:l,preselectFirstAvailableDate:p,onTrackInitialStep:ce,onFormNext:le,stepUpdate:D,onTrackHandoffRendered:xe,onTrackHandoffNoRender:ge,onTrackHandoffScheduled:ve,onTrackHandoffError:be})]}),S&&!!ee&&e.jsx("div",{className:Yo,onClick:ne,children:"✕"})]})},Ko=function(e){var t,r=e.theme;n.useEffect(function(){var e,n=null===(e=null==r?void 0:r.font)||void 0===e?void 0:e.link;return n&&function(e){try{var n=new URL(e);if("https:"!==n.protocol)return void console.warn("Only HTTPS font URLs are allowed:",e);["fonts.googleapis.com","fonts.gstatic.com","use.typekit.net","use.fontawesome.com","cdn.jsdelivr.net","unpkg.com","cdnjs.cloudflare.com"].includes(n.hostname)||console.warn("Font URL from untrusted domain:",n.hostname),"fonts.googleapis.com"!==n.hostname||n.searchParams.has("display")||(n.searchParams.set("display","swap"),e=n.toString())}catch(n){return void console.error("Invalid font URL:",e,n)}var t="xapp-form-widget-font",r=document.getElementById(t);r&&r.remove();var a=document.createElement("link");a.id=t,a.rel="stylesheet",a.href=e,a.crossOrigin="anonymous",document.head.appendChild(a)}(n),function(){if(n){var e=document.getElementById("xapp-form-widget-font");e&&e.getAttribute("href")===n&&e.remove()}}},[null===(t=null==r?void 0:r.font)||void 0===t?void 0:t.link]);var o=JSON.stringify(function(e){var n=[],t=function(e){var n=e||{};return ei("--xapp-form-widget-",ni(ti("background-color",null==n?void 0:n.backgroundColor),ti("header-background-color",null==n?void 0:n.headerBackgroundColor),ti("header-text-color",null==n?void 0:n.headerTextColor),ti("primary-button-color",null==n?void 0:n.primaryButtonColor),ti("primary-button-text-color",null==n?void 0:n.primaryButtonTextColor),ti("secondary-button-color",null==n?void 0:n.secondaryButtonColor),ti("secondary-button-text-color",null==n?void 0:n.secondaryButtonTextColor),ti("border-color",null==n?void 0:n.borderColor),ti("border-radius-md",null==n?void 0:n.borderRadius),ti("border-radius-xl",null==n?void 0:n.borderRadius),ei("font-",ni(function(e){return a(this,function(n){switch(n.label){case 0:return e?[4,["family",e.fontFamily]]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})}(null==n?void 0:n.font))),ei("text-",ni(function(e){return a(this,function(n){switch(n.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,15];case 1:return n.sent(),[4,["background-color-dark",ri(e.backgroundColor,3)]];case 2:return n.sent(),[4,["color",e.color]];case 3:return n.sent(),[4,["font-size",e.fontSize]];case 4:return n.sent(),[4,["font-family",e.fontFamily]];case 5:return n.sent(),[4,["border-color",e.borderColor]];case 6:return n.sent(),[4,["border-width",e.borderWidth]];case 7:return n.sent(),[4,["border-color-focus",e.borderColorFocus||e.borderColor]];case 8:return n.sent(),[4,["underline-display",e.borderWidth?"none":void 0]];case 9:return n.sent(),[4,["bottom-radius",e.borderWidth?"var(--xapp-form-widget-border-radius-sm, 8px)":void 0]];case 10:return n.sent(),e.borderWidth?[4,["root-background",e.backgroundColor]]:[3,15];case 11:return n.sent(),[4,["root-border","".concat(e.borderWidth," solid ").concat(e.borderColor||"transparent")]];case 12:return n.sent(),[4,["root-radius","var(--xapp-form-widget-border-radius-sm, 8px)"]];case 13:return n.sent(),[4,["input-background","transparent"]];case 14:n.sent(),n.label=15;case 15:return[2]}})}(null==n?void 0:n.text))),ei("back-button-",ni(function(e){var n,t,r;return a(this,function(a){switch(a.label){case 0:return n="icon"===(null==e?void 0:e.backButtonVariant),t=null==e?void 0:e.backButton,[4,["label-display",n?"none":"inline"]];case 1:return a.sent(),[4,["icon-display",n?"inline-flex":"none"]];case 2:return a.sent(),n?(r=null==t?void 0:t.color,[4,["background","transparent"]]):[3,12];case 3:return a.sent(),[4,["border","".concat((null==t?void 0:t.borderWidth)||"1px"," solid ").concat((null==t?void 0:t.borderColor)||r||"currentColor")]];case 4:return a.sent(),[4,["icon-stroke",null==t?void 0:t.iconStroke]];case 5:return a.sent(),[4,["radius","50%"]];case 6:return a.sent(),[4,["shadow","none"]];case 7:return a.sent(),[4,["size","44px"]];case 8:return a.sent(),[4,["padding","0"]];case 9:return a.sent(),[4,["color",r||"currentColor"]];case 10:return a.sent(),[4,["color-hover",(null==t?void 0:t.colorHover)||r||"currentColor"]];case 11:a.sent(),a.label=12;case 12:return[2]}})}(n))),ei("button-",ni(function(e){return a(this,function(n){switch(n.label){case 0:return e?[4,["font-size",e.fontSize]]:[3,6];case 1:return n.sent(),[4,["font-weight",e.fontWeight]];case 2:return n.sent(),[4,["padding",e.padding]];case 3:return n.sent(),[4,["radius",e.borderRadius]];case 4:return n.sent(),[4,["shadow",e.boxShadow]];case 5:n.sent(),n.label=6;case 6:return[2]}})}(null==n?void 0:n.button))),ei("step-title-",ni(function(e){return a(this,function(n){switch(n.label){case 0:return e?[4,["align",e.align]]:[3,5];case 1:return n.sent(),[4,["font-size",e.fontSize]];case 2:return n.sent(),[4,["font-weight",e.fontWeight]];case 3:return n.sent(),[4,["color",e.color]];case 4:n.sent(),n.label=5;case 5:return[2]}})}(null==n?void 0:n.stepTitle))),ei("final-button-",ni(function(e){return a(this,function(n){switch(n.label){case 0:return"inline"!==(null==e?void 0:e.finalButtonPlacement)?[3,7]:[4,["direction","row-reverse"]];case 1:return n.sent(),[4,["gap","24px"]];case 2:return n.sent(),[4,["nav-flex","0 0 auto"]];case 3:return n.sent(),[4,["nav-align","center"]];case 4:return n.sent(),[4,["container-padding","20px 0"]];case 5:return n.sent(),[4,["nav-padding","20px 0"]];case 6:n.sent(),n.label=7;case 7:return[2]}})}(n))),ei("dropdown-",ni(function(e){return a(this,function(n){switch(n.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,5];case 1:return n.sent(),[4,["color",e.color]];case 2:return n.sent(),[4,["font-size",e.fontSize]];case 3:return n.sent(),[4,["font-family",e.fontFamily]];case 4:n.sent(),n.label=5;case 5:return[2]}})}(null==n?void 0:n.dropdown))),ei("checkbox-",ni(function(e){return a(this,function(n){switch(n.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,5];case 1:return n.sent(),[4,["color",e.color]];case 2:return n.sent(),[4,["font-size",e.fontSize]];case 3:return n.sent(),[4,["font-family",e.fontFamily]];case 4:n.sent(),n.label=5;case 5:return[2]}})}(null==n?void 0:n.checkbox))),ei("chips-",ni(function(e){return a(this,function(n){switch(n.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,8];case 1:return n.sent(),[4,["background-color-selected",e.backgroundColorSelected]];case 2:return n.sent(),[4,["background-color-dark",ri(e.backgroundColor,20)]];case 3:return n.sent(),[4,["color",e.color]];case 4:return n.sent(),[4,["color-selected",e.colorSelected]];case 5:return n.sent(),[4,["font-size",e.fontSize]];case 6:return n.sent(),[4,["font-family",e.fontFamily]];case 7:n.sent(),n.label=8;case 8:return[2]}})}(null==n?void 0:n.chips))),ei("date-",ni(function(e){return a(this,function(n){switch(n.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,6];case 1:return n.sent(),[4,["background-color-selected",e.backgroundColorSelected]];case 2:return n.sent(),[4,["color",e.color]];case 3:return n.sent(),[4,["font-size",e.fontSize]];case 4:return n.sent(),[4,["font-family",e.fontFamily]];case 5:n.sent(),n.label=6;case 6:return[2]}})}(null==n?void 0:n.date))),ei("card-",ni(function(e){return a(this,function(n){switch(n.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,5];case 1:return n.sent(),[4,["color",e.color]];case 2:return n.sent(),[4,["font-size",e.fontSize]];case 3:return n.sent(),[4,["font-family",e.fontFamily]];case 4:n.sent(),n.label=5;case 5:return[2]}})}(null==n?void 0:n.card))),ei("side-button-",ni(function(e){return a(this,function(n){switch(n.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,8];case 1:return n.sent(),[4,["background-color-dark",ri(e.backgroundColor,10)]];case 2:return n.sent(),[4,["color",e.color]];case 3:return n.sent(),[4,["font-size",e.fontSize]];case 4:return n.sent(),[4,["font-family",e.fontFamily]];case 5:return n.sent(),[4,["top",e.top]];case 6:return n.sent(),[4,["min-length",e.minLength]];case 7:n.sent(),n.label=8;case 8:return[2]}})}(null==n?void 0:n.sideButton))),ei("external-widget-",ni(function(e){return a(this,function(n){switch(n.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,4];case 1:return n.sent(),[4,["padding",e.padding]];case 2:return n.sent(),[4,["min-height",e.minHeight]];case 3:n.sent(),n.label=4;case 4:return[2]}})}(null==n?void 0:n.externalWidget)))))}(e),r=t.next();for(;!1===r.done;){var o=r.value,i=o[0],s=o[1];null!=s&&""!==s&&n.push([i,s]),r=t.next()}return n}(r));return n.useLayoutEffect(function(){var e=JSON.parse(o);return function(e){for(var n,t=document.documentElement,r=0,a=e;r<a.length;r++){var o=a[r],i=o[0],s=o[1];t.style.setProperty(i,s),Qo.set(i,(null!==(n=Qo.get(i))&&void 0!==n?n:0)+1)}}(e),function(){return function(e){for(var n,t=document.documentElement,r=0,a=e;r<a.length;r++){var o=a[r][0],i=(null!==(n=Qo.get(o))&&void 0!==n?n:1)-1;i<=0?(Qo.delete(o),t.style.removeProperty(o)):Qo.set(o,i)}}(e)}},[o]),null};var Zo,Qo=new Map;function ei(e,n){var t;return a(this,function(r){switch(r.label){case 0:t=n.next(),r.label=1;case 1:return t.done?[3,3]:[4,["".concat(e).concat(t.value[0]),t.value[1]]];case 2:return r.sent(),t=n.next(),[3,1];case 3:return[2]}})}function ni(){var e,n,t,r,o,i=[];for(e=0;e<arguments.length;e++)i[e]=arguments[e];return a(this,function(e){switch(e.label){case 0:n=0,t=i,e.label=1;case 1:if(!(n<t.length))return[3,5];r=t[n],o=r.next(),e.label=2;case 2:return!1!==o.done?[3,4]:[4,o.value];case 3:return e.sent(),o=r.next(),[3,2];case 4:return n++,[3,1];case 5:return[2]}})}function ti(e,n){return a(this,function(t){switch(t.label){case 0:return[4,[e,n]];case 1:return t.sent(),[2]}})}function ri(e,n){var t,r,a,o,i,s,d,l,p,c;if(!e)return e;try{if(e.startsWith("#")){var u=e.match(/\w\w/g);u&&(r=(t=u.map(function(e){return parseInt(e,16)}))[0],a=t[1],o=t[2])}else if(e.startsWith("rgb")){var m=(p=/^rgba?\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)$/,c=/^rgb?\((\d+),\s*(\d+),\s*(\d+)\)$/,(l=(d=e).match(p))?{r:parseInt(l[1]),g:parseInt(l[2]),b:parseInt(l[3]),a:parseFloat(l[4])}:(l=d.match(c))?{r:parseInt(l[1]),g:parseInt(l[2]),b:parseInt(l[3])}:null);m&&(r=m.r,a=m.g,o=m.b,i=m.a)}if(void 0===r||void 0===a||void 0===o)return ie("Darken: Unsupported color format: ".concat(e)),e;if(void 0!==i){if(0===r&&0===a&&0===o)i+=n/100;else{var f=.3*r+.59*a+.11*o,_=f*(1-n/100)/f;r=Math.round(r*_),a=Math.round(a*_),o=Math.round(o*_)}s="rgba(".concat(r,", ").concat(a,", ").concat(o,", ").concat(i,")")}else r=Math.max(0,r-n),a=Math.max(0,a-n),o=Math.max(0,o-n),s="#".concat(r.toString(16).padStart(2,"0")).concat(a.toString(16).padStart(2,"0")).concat(o.toString(16).padStart(2,"0"))}catch(n){ie("Darken: Unsupported color format: ".concat(e," - Error: ").concat(n))}return s}!function(e){e.XAPP_FORM_BUTTON="xapp-form-button"}(Zo||(Zo={}));var ai="SideButton-module_xapp_form_sticky_button__YqORL",oi="SideButton-module_left__GT6z8",ii="SideButton-module_right__Hy2FU";xe("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.SideButton-module_xapp_form_sticky_button__YqORL {\n position: fixed;\n z-index: 10000;\n cursor: pointer;\n transform: translateY(-50%);\n text-align: center;\n writing-mode: vertical-rl;\n background-color: var(--xapp-form-widget-side-button-background-color, #d8412a);\n color: var(--xapp-form-widget-side-button-color, #ffffff);\n font-size: var(--xapp-form-widget-side-button-font-size, 1.5em);\n font-family: var(--xapp-form-widget-side-button-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n top: var(--xapp-form-widget-side-button-top, 50%);\n min-height: var(--xapp-form-widget-side-button-min-length, 200px);\n box-shadow: var(--xapp-form-widget-box-shadow, 0 4px 24px rgba(0, 0, 0, 0.12));\n transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out, transform 150ms ease-in-out;\n}\n.SideButton-module_xapp_form_sticky_button__YqORL:hover {\n background-color: var(--xapp-form-widget-side-button-background-color-dark, darkred);\n box-shadow: var(--xapp-form-widget-box-shadow-hover, 0 6px 32px rgba(0, 0, 0, 0.16));\n}\n.SideButton-module_xapp_form_sticky_button__YqORL:active {\n transform: translateY(-50%) scale(0.98);\n}\n.SideButton-module_xapp_form_sticky_button__YqORL:focus {\n outline: none;\n}\n.SideButton-module_xapp_form_sticky_button__YqORL:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n.SideButton-module_xapp_form_sticky_button__YqORL.SideButton-module_left__GT6z8 {\n left: 0;\n border-top-right-radius: 50%;\n border-bottom-right-radius: 50%;\n padding: 20px 20px 20px 10px;\n}\n.SideButton-module_xapp_form_sticky_button__YqORL.SideButton-module_right__Hy2FU {\n right: 0;\n border-top-right-radius: 50%;\n border-bottom-right-radius: 50%;\n padding: 20px 20px 20px 10px;\n transform: translateY(-50%) rotate(180deg);\n}\n.SideButton-module_xapp_form_sticky_button__YqORL.SideButton-module_right__Hy2FU:active {\n transform: translateY(-50%) rotate(180deg) scale(0.98);\n}");var si=function(n){var t=n.onClick,r=n.position,a=n.label,o=n.hidden,i="right"===(null==r?void 0:r.toLowerCase())?ii:oi;return e.jsx("div",{onClick:t,className:"".concat(ai," ").concat(i),"data-xapp-form-side-button":"true",style:o?{display:"none"}:void 0,"aria-hidden":o||void 0,children:e.jsx("span",{children:a||"Schedule Now"})})},di="xafw-auto-open-dismissed";function li(e){if(!("number"!=typeof e||e<0))return Math.min(e,3e5)}function pi(e){if("number"==typeof e)return Math.max(0,Math.min(e,100))}function ci(e){var t,r=e.config,a=e.isActive,o=e.onOpen,i=e.hasInteracted,s=n.useRef(new Set),d=n.useRef(!1),l=n.useRef(null),p=(null==r?void 0:r.sessionKey)||di,c=(null==r?void 0:r.mode)||"any",u=null==r?void 0:r.triggers,m=li(null==u?void 0:u.delay),f=pi(null==u?void 0:u.scrollPercent),_=null==u?void 0:u.exitIntent,h="number"!=typeof(t=null==u?void 0:u.exitIntentThreshold)||t<0?50:t,x=li(null==u?void 0:u.inactivity),g=null==r?void 0:r.patterns,v=null==r?void 0:r.minimumWidth,b=n.useMemo(function(){return JSON.stringify(null!=g?g:[])},[g]),y=n.useRef([]),w=n.useCallback(function(){var e=[];return void 0!==(null==u?void 0:u.delay)&&e.push("delay"),void 0!==(null==u?void 0:u.scrollPercent)&&e.push("scrollPercent"),(null==u?void 0:u.exitIntent)&&e.push("exitIntent"),void 0!==(null==u?void 0:u.inactivity)&&e.push("inactivity"),e},[null==u?void 0:u.delay,null==u?void 0:u.scrollPercent,null==u?void 0:u.exitIntent,null==u?void 0:u.inactivity]),F=n.useCallback(function(e){if(!d.current)if(s.current.add(e),"any"===c)d.current=!0,o();else if("all"===c){var n=y.current.every(function(e){return s.current.has(e)});n&&(d.current=!0,o())}},[c,o]);n.useEffect(function(){s.current=new Set,d.current=!1,y.current=w()},[w]),n.useEffect(function(){if((void 0!==m||void 0!==f||_||void 0!==x)&&!a&&!i&&!function(e){try{return"true"===sessionStorage.getItem(e)}catch(e){return!1}}(p)&&function(e){if(!e||0===e.length)return!0;var n=window.location.href;return e.some(function(e){return n.includes(e)})}(g)&&function(e){return"number"!=typeof e||window.innerWidth>=e}(v)){var e=[],n=[],t=function(e,t,r,a){e.addEventListener(t,r,a),n.push({target:e,event:t,handler:r,options:a})};if("number"==typeof m&&m>0){var r=setTimeout(function(){F("delay")},m);e.push(r)}if("number"==typeof f){var o=f,s=!1,d=function(){var e=window.scrollY||document.documentElement.scrollTop,n=document.documentElement.scrollHeight-window.innerHeight;n<=0||(e/n*100>=o&&F("scrollPercent"),s=!1)};t(window,"scroll",function(){s||(s=!0,"function"==typeof requestAnimationFrame?requestAnimationFrame(d):d())},{passive:!0}),d()}if(_&&!("ontouchstart"in window||navigator.maxTouchPoints>0)){var c=null!=h?h:50;t(document,"mouseout",function(e){e.clientY<=c&&F("exitIntent")})}if("number"==typeof x&&x>0){var u=function(){l.current&&clearTimeout(l.current),l.current=setTimeout(function(){F("inactivity")},x)};u();["mousemove","keydown","scroll","click","touchstart"].forEach(function(e){t(document,e,u,{passive:!0})})}return function(){e.forEach(function(e){return clearTimeout(e)}),l.current&&(clearTimeout(l.current),l.current=null),n.forEach(function(e){var n=e.target,t=e.event,r=e.handler,a=e.options;n.removeEventListener(t,r,a)})}}},[m,f,_,h,x,b,v,a,i,p,F])}
3
- /*! Copyright (c) 2026, XAPPmedia */var ui="data-xapp-form-page",mi="data-xapp-form-page-count";function fi(){var e=parseInt(document.body.getAttribute(mi)||"0",10);return Number.isNaN(e)?0:e}function _i(){if("undefined"==typeof document||!document.body)return function(){};document.body.setAttribute(mi,String(fi()+1)),document.body.setAttribute(ui,"true");var e=!1;return function(){if(!e){e=!0;var n=Math.max(0,fi()-1);0===n?(document.body.removeAttribute(ui),document.body.removeAttribute(mi)):document.body.setAttribute(mi,String(n))}}}function hi(e){var n=null!=e?e:"undefined"!=typeof document?document.getElementById("xapp-form-widget"):null;return!!n&&(n.classList.contains("embedded")||n.classList.contains("xapp-embedded"))}var xi,gi=function(e){e.target instanceof Element&&(xi={target:e.target,at:Date.now()})};var vi="Form-module_xapp_form__mMqzX";xe('@font-face {\n font-family: RobotoRegular;\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: local("Roboto"), local("Roboto-Regular"), url(https://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2) format("woff2");\n}\n.Form-module_xapp_form__mMqzX {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n}\n.Form-module_xapp_form__mMqzX .MuiTypography-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiButton-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiButtonBase-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX button {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiInputBase-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiInputBase-input {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiTextField-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiInputLabel-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiFormHelperText-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiFilledInput-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiFilledInput-input {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiChip-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiChip-label {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiAutocomplete-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiAutocomplete-input {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiFormControl-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiFormControlLabel-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX [class*="Mui"]:not([class*="Portal"]) {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}');var bi=function(r){var a,o,i,s,d=r.config,l=r.theme,p=_e()[1],c=he(),u=c.active,m=c.minimized,f=n.useState(),_=f[0],h=f[1],x=n.useState(!1),g=x[0],v=x[1],b=n.useState(!1),y=b[0],w=b[1],F=n.useState(hi)[0],k=!!(null===(a=d.autoOpen)||void 0===a?void 0:a.enabled)&&!function(e){var n=null==e?void 0:e.triggers;return void 0!==li(null==n?void 0:n.delay)||void 0!==pi(null==n?void 0:n.scrollPercent)||!!(null==n?void 0:n.exitIntent)||void 0!==li(null==n?void 0:n.inactivity)}(d.autoOpen),S=n.useCallback(function(e){(null==e?void 0:e.preselectChipLabel)&&h(e.preselectChipLabel),p({type:"open-modal-state"})},[p]),T=n.useCallback(function(){S()},[S]),C=n.useCallback(function(e){S(e)},[S]),D=n.useCallback(function(){return{active:u,minimized:m}},[u,m]),R=n.useMemo(function(){return Te.getApi({key:d.api.key,url:d.api.url,intentId:d.intentId,demoMode:d.api.demoMode})},[d]),N=n.useCallback(function(){var e;if(h(void 0),v(!0),y){try{var n=(null===(e=d.autoOpen)||void 0===e?void 0:e.sessionKey)||di;sessionStorage.setItem(n,"true")}catch(e){}w(!1)}p({type:"new-search"}),p({type:"set-modal-state",active:!1,minimized:!1,sendRequest:!1}),R.channelActionRequest({data:{result:{},step:"",form:""}},"FORM_CLOSE").then(function(e){oe("ACTION Request (FORM_CLOSE). Data: Response: ".concat(JSON.stringify(e)))})},[R,null===(o=d.autoOpen)||void 0===o?void 0:o.sessionKey,p,y]),I=n.useCallback(function(){w(!0),p({type:"set-modal-state",active:!0,minimized:!1,sendRequest:!0})},[p]);return ci({config:d.autoOpen,isActive:u,onOpen:I,hasInteracted:g}),n.useEffect(function(){var e=document.getElementsByClassName(Zo.XAPP_FORM_BUTTON);if(e.length)oe("Assigning ".concat(e.length," button(s) by class: ").concat(Zo.XAPP_FORM_BUTTON)),Array.from(e).forEach(function(e){e.onclick=T,e.onfocus=T});else{var n=document.getElementById(Zo.XAPP_FORM_BUTTON);n?(oe("Assigning one button by id: ".concat(Zo.XAPP_FORM_BUTTON,")}")),n.onclick=T,n.onfocus=T):oe("Cannot assign buttons by class or id: ".concat(Zo.XAPP_FORM_BUTTON,")}"))}window.xafwControl={openForm:C,formStatus:D}},[D,T,C]),n.useEffect(function(){var e=d.triggerSelector,n=function(){document.removeEventListener("click",gi,!0);var e=xi;if(xi=void 0,e&&!(Date.now()-e.at>1e4))return e.target}();if(e){try{document.querySelector(e)}catch(n){return void ie('Invalid triggerSelector "'.concat(e,'": ').concat(n))}(null==n?void 0:n.closest(e))&&(oe('Opening for a triggerSelector "'.concat(e,'" click made before the form loaded')),T());var t=function(n){var t=n.target instanceof Element?n.target.closest(e):null;t&&(t instanceof HTMLAnchorElement&&("#"===t.getAttribute("href")||""===t.getAttribute("href"))&&n.preventDefault(),T())};return document.addEventListener("click",t,!0),function(){document.removeEventListener("click",t,!0)}}},[d.triggerSelector,T]),s=r.button&&"object"==typeof r.button?e.jsx(r.button.type,t({},r.button.props,{onClick:T,onFocus:T})):e.jsx(e.Fragment,{}),e.jsxs("div",{className:vi,children:[e.jsx(Ko,{theme:l}),d.sideButtonLabel&&!k&&!F&&e.jsx(si,{onClick:T,label:d.sideButtonLabel,position:null===(i=null==l?void 0:l.sideButton)||void 0===i?void 0:i.position,hidden:d.hideSideButton}),s,(u||k)&&e.jsx(we,{disableBackdrop:k,embedded:F,onClose:N,children:e.jsx(Xo,{docked:k,embedded:F,openedByTrigger:y,config:d,preselectChipLabel:_,onPreselectChipUsed:function(){return h(void 0)}})})]})};function yi(){var e=null===document||void 0===document?void 0:document.getElementById("xapp-form-js");return function(e){if(!e)return{path:""};var n=e.lastIndexOf("/"),t="";n>=0&&(t=e.substr(0,n));var r=new URL(e),a=new URLSearchParams(r.search).get("key")||"";return{path:t,key:a}}(null==e?void 0:e.src)}var wi="none";function Fi(e){var n,t=e.standalone,r=e.stylePreset,a=e.partnerCode,o=e.getPresetStyle;if(t&&r!==wi){if(r)return r;if(a)return(null===(n=null==o?void 0:o(a))||void 0===n?void 0:n.enabled)?a:void 0}}function ki(e,n){return n?e?Ti(e,n):n:e}function Si(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function Ti(e,n){for(var r=t({},e),a=0,o=Object.entries(n);a<o.length;a++){var i=o[a],s=i[0],d=i[1];if(void 0!==d){var l=r[s];r[s]=Si(d)&&Si(l)?Ti(l,d):d}}return r}exports.COST_GUIDE_FORM_STYLE={enabled:!0,theme:{borderColor:"transparent",borderRadius:"8px",backgroundColor:"#ffffff",headerBackgroundColor:"#ffffff",headerTextColor:"#1c3f47",primaryButtonColor:"#fb9b26",primaryButtonTextColor:"#ffffff",secondaryButtonColor:"#fb9b26",secondaryButtonTextColor:"#ffffff",text:{color:"#1c3f47",backgroundColor:"#ffffff",borderColor:"#cfe3e7",borderWidth:"1px",borderColorFocus:"#92dae1"},chips:{backgroundColor:"#d6eef2",color:"#1c3f47",backgroundColorSelected:"#1aacbe",colorSelected:"#ffffff"},date:{backgroundColorSelected:"#1aacbe"},button:{fontSize:"20px",fontWeight:"700",padding:"17px 25px",borderRadius:"10px",boxShadow:"0 4px 5px 4px rgba(0, 0, 0, 0.15)"},finalButtonPlacement:"inline",stepTitle:{align:"center",fontSize:"24px",fontWeight:"700",color:"#174146"},backButtonVariant:"icon",backButton:{color:"#a0cdd3",borderColor:"#a0cdd3",colorHover:"#174146",borderWidth:"2px",iconStroke:"0.8px"},font:{fontFamily:"Poppins, Arial, Verdana, sans-serif",link:"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;700&display=swap"},standAlone:{backgroundColor:"rgb(243, 248, 251)"},externalWidget:{minHeight:"600px"}}},exports.DEFAULT_DATE_FIELD_NAME=En,exports.DEFAULT_DATE_TIME_FIELD_NAME=zn,exports.DEFAULT_HORIZON_DAYS=60,exports.DEFAULT_SLOT_MINUTES=30,exports.DEFAULT_TIME_ZONE_FIELD_NAME=On,exports.FORM_PAGE_ATTRIBUTE=ui,exports.FORM_PAGE_COUNT_ATTRIBUTE=mi,exports.Form=bi,exports.FormContainer=function(n){return e.jsx(fe,{children:e.jsx(bi,{config:n.config,theme:n.theme,button:n.button,buttonElementLookup:n.buttonElementLookup})})},exports.FormDisplay=vo,exports.FormFrame=no,exports.FormWidget=Xo,exports.LeftAngleIcon=je,exports.RightAngleIcon=Ee,exports.STYLE_PRESET_NONE=wi,exports.SearchIcon=function(){return e.jsx("svg",{fill:"#000000",height:"300px",width:"30px",version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 382.163 382.163",children:e.jsxs("g",{children:[e.jsx("path",{d:"M344.89,215.855c0-50.602-24.567-95.57-62.396-123.618l2.982-5.326l46.258,25.92c1.16,0.65,2.418,0.958,3.659,0.958\n\t\tc2.626,0,5.175-1.381,6.55-3.835c8.883-15.853,11.061-34.216,6.132-51.706c-4.243-15.059-13.327-27.91-25.887-36.864l5.722-10.22\n\t\tc2.023-3.614,0.733-8.185-2.881-10.208c-3.614-2.023-8.184-0.734-10.208,2.88l-5.72,10.216\n\t\tc-31.487-13.349-68.758-1.123-85.857,29.391c-0.972,1.735-1.215,3.786-0.676,5.7s1.817,3.536,3.553,4.509l46.268,25.925\n\t\tl-2.406,4.297c-23.084-13.853-50.078-21.83-78.903-21.83c-28.825,0-55.818,7.977-78.902,21.829l-2.408-4.296l46.269-25.926\n\t\tc3.614-2.025,4.902-6.595,2.877-10.209c-8.883-15.853-23.407-27.297-40.897-32.226c-15.061-4.244-30.765-3.205-44.96,2.833\n\t\tL67.342,3.838c-2.023-3.615-6.593-4.904-10.208-2.881c-3.614,2.023-4.904,6.594-2.881,10.208l5.721,10.22\n\t\tc-12.559,8.954-21.643,21.804-25.886,36.864c-4.929,17.49-2.751,35.854,6.132,51.706c1.375,2.454,3.924,3.835,6.55,3.835\n\t\tc1.241,0,2.5-0.309,3.659-0.958l46.257-25.919l2.984,5.324c-37.83,28.047-62.397,73.016-62.397,123.619\n\t\tc0,45.21,19.61,85.924,50.767,114.091l-9.427,43.114c-0.885,4.047,1.678,8.044,5.725,8.929c0.54,0.118,1.078,0.175,1.609,0.175\n\t\tc3.448,0,6.553-2.393,7.32-5.899l7.818-35.757c25.321,18.332,56.416,29.157,89.996,29.157c33.58,0,64.676-10.825,89.997-29.158\n\t\tl7.818,35.758c0.767,3.507,3.871,5.899,7.319,5.899c0.531,0,1.07-0.057,1.609-0.175c4.046-0.885,6.61-4.882,5.725-8.929\n\t\tl-9.427-43.115C325.281,301.778,344.89,261.065,344.89,215.855z M308.517,30.436c12.357,6.924,21.279,18.246,25.121,31.88\n\t\tc3.155,11.198,2.574,22.853-1.57,33.507l-91.609-51.331C256.211,23.856,285.228,17.387,308.517,30.436z M50.096,95.824\n\t\tc-4.145-10.654-4.726-22.31-1.57-33.507c3.842-13.634,12.763-24.956,25.121-31.88c8.179-4.583,17.064-6.758,25.833-6.758\n\t\tc16.201,0,32.005,7.425,42.225,20.814L50.096,95.824z M52.273,215.855c0-76.54,62.269-138.809,138.809-138.809\n\t\tS329.89,139.315,329.89,215.855s-62.27,138.809-138.809,138.809S52.273,292.394,52.273,215.855z"}),e.jsx("path",{d:"M191.081,107.685c-59.645,0-108.17,48.525-108.17,108.17c0,59.645,48.525,108.17,108.17,108.17\n\t\tc59.646,0,108.17-48.525,108.17-108.17C299.252,156.21,250.727,107.685,191.081,107.685z M191.081,309.025\n\t\tc-51.374,0-93.17-41.796-93.17-93.17c0-51.374,41.796-93.17,93.17-93.17c51.375,0,93.17,41.796,93.17,93.17\n\t\tC284.252,267.229,242.456,309.025,191.081,309.025z"}),e.jsx("path",{d:"M198.585,190.081v-36.262c0-4.142-3.358-7.5-7.5-7.5s-7.5,3.358-7.5,7.5v36.26c-8.784,2.559-15.718,9.492-18.279,18.276\n\t\th-16.941c-4.142,0-7.5,3.358-7.5,7.5s3.358,7.5,7.5,7.5h16.941c3.254,11.165,13.574,19.349,25.775,19.349\n\t\tc14.805,0,26.849-12.044,26.849-26.849C217.93,203.655,209.748,193.337,198.585,190.081z M191.081,227.704\n\t\tc-6.533,0-11.849-5.315-11.849-11.849s5.315-11.849,11.849-11.849c6.534,0,11.849,5.315,11.849,11.849\n\t\tS197.615,227.704,191.081,227.704z"})]})})},exports.SpinnerIcon=ze,exports.WidgetStylesheet=Ko,exports.firstSelectableDate=tt,exports.formatOfferingLabel=Jn,exports.generateOfferings=et,exports.horizonDaysOf=Kn,exports.isDateSelectable=nt,exports.markFormPage=_i,exports.mergeFormWidgetTheme=ki,exports.parseWidgetEnv=function(e){var n,t,r=(null===(n=e.connection)||void 0===n?void 0:n.accountKey)||yi().key||"";return[{api:{url:(null===(t=e.connection)||void 0===t?void 0:t.serverUrl)||"",key:r},suggestionsUrl:e.autocompleteSuggestionsUrl,autoGreeting:e.autoGreeting||"contact us",intentId:e.intentId,sideButtonLabel:e.sideButtonLabel,hideSideButton:e.hideSideButton,googleMapsApiKey:e.googleMapsApiKey,mapsBaseUrl:e.mapsBaseUrl,autoOpen:e.autoOpen,disabled:e.disabled,trustedForm:e.trustedForm,triggerSelector:e.triggerSelector},e.theme]},exports.resolveFormStyle=function(e){var n=e.customerTheme,t=e.getPresetStyle,r=Fi(e),a=r?null==t?void 0:t(r):void 0;return a?{preset:r,theme:ki(n,a.theme),framing:a.framing}:{theme:n}},exports.resolveStylePresetName=Fi,exports.timeZoneOf=Vn,exports.toCalendarDate=qn,exports.toOffsetIso=Gn,exports.useFormPageMarker=function(e){void 0===e&&(e=!0),n.useEffect(function(){if(e)return _i()},[e])};
1
+ "use strict";var e=require("react/jsx-runtime"),n=require("react"),t=function(){return t=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var a in n=arguments[t])Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a]);return e},t.apply(this,arguments)};function r(e,n,t,r){return new(t||(t=Promise))(function(a,o){function i(e){try{d(r.next(e))}catch(e){o(e)}}function s(e){try{d(r.throw(e))}catch(e){o(e)}}function d(e){var n;e.done?a(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(i,s)}d((r=r.apply(e,n||[])).next())})}function a(e,n){var t,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(d){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(o=0)),o;)try{if(t=1,r&&(a=2&s[0]?r.return:s[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,s[1])).done)return a;switch(r=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){o.label=s[1];break}if(6===s[0]&&o.label<a[1]){o.label=a[1],a=s;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(s);break}a[2]&&o.ops.pop(),o.trys.pop();continue}s=n.call(e,o)}catch(e){s=[6,e],r=0}finally{t=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,d])}}}function o(e,n,t){if(t||2===arguments.length)for(var r,a=0,o=n.length;a<o;a++)!r&&a in n||(r||(r=Array.prototype.slice.call(n,0,a)),r[a]=n[a]);return e.concat(r||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var s=e,d=n;function l(e,n,t,r){return new(t||(t=Promise))(function(n,a){function o(e){try{s(r.next(e))}catch(e){a(e)}}function i(e){try{s(r.throw(e))}catch(e){a(e)}}function s(e){var r;e.done?n(e.value):(r=e.value,r instanceof t?r:new t(function(e){e(r)})).then(o,i)}s((r=r.apply(e,[])).next())})}function p(e,n){var t,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(d){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(o=0)),o;)try{if(t=1,r&&(a=2&s[0]?r.return:s[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,s[1])).done)return a;switch(r=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){o.label=s[1];break}if(6===s[0]&&o.label<a[1]){o.label=a[1],a=s;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(s);break}a[2]&&o.ops.pop(),o.trys.pop();continue}s=n.call(e,o)}catch(e){s=[6,e],r=0}finally{t=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,d])}}}function c(e,n,t){for(var r,a=0,o=n.length;a<o;a++)!r&&a in n||(r||(r=Array.prototype.slice.call(n,0,a)),r[a]=n[a]);return e.concat(r||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;["FAQ","INTENT","HISTORICAL"].reduce(function(e,n,t){return e[n]=t,e},{});var u=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"],m=["gclid","gbraid","wbraid","msclkid","fbclid"],f=c(c([],u),m);function _(e){var n=((null==e?void 0:e.content)||[]).filter(function(e){return"text"===e.type&&"string"==typeof e.text}).map(function(e){return e.text}).join("\n");if(null==e?void 0:e.isError)return{ok:!1,message:n};try{return JSON.parse(n)}catch(e){return{text:n}}}!function(){function e(e,n){this.mcpUrl=e,this.nextId=1,this.fetchImpl=n||("function"==typeof fetch?fetch:void 0)}e.prototype.callTool=function(e,n){return l(this,0,void 0,function(){var t,r;return p(this,function(a){switch(a.label){case 0:if("function"!=typeof this.fetchImpl)throw new Error("fetch is not available");return[4,this.fetchImpl(this.mcpUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:this.nextId++,method:"tools/call",params:{name:e,arguments:n}})})];case 1:if(!(t=a.sent()).ok)throw new Error("MCP endpoint answered ".concat(t.status));return[4,t.json()];case 2:if((r=a.sent()).error)throw new Error(r.error.message||"MCP error ".concat(r.error.code));return[2,_(r.result)]}})})}}(),c(c([],f),["st_source","srsltid","ref","source"]);var h=/^[a-z][a-z-]{0,31}$/;var x="data-xapp-scroll-lock",g="data-xapp-scroll-lock-restore",v=["position","top","left","right","width","overflow"];function b(e){var n=Number(e.getAttribute(x));return Number.isFinite(n)&&n>0?n:0}function y(){if("undefined"==typeof document||"undefined"==typeof window)return function(){};var e=document.body;if(0===b(e)){var n=function(e){var n=v.reduce(function(n,t){return n[t]=e.style.getPropertyValue(t),n},{});return{scrollY:window.scrollY||window.pageYOffset||0,inlineStyles:n}}(e);e.setAttribute(g,JSON.stringify(n)),e.style.position="fixed",e.style.top="-".concat(n.scrollY,"px"),e.style.left="0",e.style.right="0",e.style.width="100%",e.style.overflow="hidden"}e.setAttribute(x,String(b(e)+1));var t=!1;return function(){if(!t){t=!0;var n=b(e)-1;if(n>0)e.setAttribute(x,String(n));else if(!(n<0)){e.removeAttribute(x);var r=function(e){var n=e.getAttribute(g);e.removeAttribute(g);try{var t=JSON.parse(n||"");if(t&&"number"==typeof t.scrollY&&t.inlineStyles)return t}catch(e){}return{scrollY:0,inlineStyles:{}}}(e),a=r.scrollY,o=r.inlineStyles;v.forEach(function(n){o[n]?e.style.setProperty(n,o[n]):e.style.removeProperty(n)}),e.style.length||e.removeAttribute("style"),window.scrollTo(0,a)}}}}var w="--xapp-viewport-height",F="--xapp-viewport-offset-top",k="--xapp-keyboard-inset",S="data-xapp-viewport-subscribers";function T(e){var n=Number(e.getAttribute(S));return Number.isFinite(n)&&n>0?n:0}function C(e){var n="undefined"==typeof window?void 0:window.visualViewport;if(n){var t=n.height,r=n.offsetTop;if(t>0){var a=window.innerHeight||t,o=Math.max(0,a-t),i=o>=120?o:0;e.style.setProperty(w,"".concat(Math.round(t),"px")),e.style.setProperty(F,"".concat(Math.round(r),"px")),e.style.setProperty(k,"".concat(Math.round(i),"px"))}}}function D(){if("undefined"==typeof document)return function(){};var e=document.documentElement;e.setAttribute(S,String(T(e)+1)),C(e);var n,t="undefined"==typeof window?void 0:window.visualViewport,r=function(){void 0===n&&(n=window.requestAnimationFrame(function(){n=void 0,C(e)}))};null==t||t.addEventListener("resize",r),null==t||t.addEventListener("scroll",r);var a=!1;return function(){if(!a){a=!0,null==t||t.removeEventListener("resize",r),null==t||t.removeEventListener("scroll",r),void 0!==n&&(window.cancelAnimationFrame(n),n=void 0);var o=T(e)-1;o>0?e.setAttribute(S,String(o)):(e.removeAttribute(S),function(e){e.style.removeProperty(w),e.style.removeProperty(F),e.style.removeProperty(k)}(e))}}}function R(){var e=getComputedStyle(document.documentElement).getPropertyValue(k),n=parseFloat(e);return Number.isFinite(n)?n:0}function N(e){e&&"scrollIntoView"in e&&e.scrollIntoView({block:"nearest",behavior:"smooth"})}function I(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-65xx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var t=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===n?t:3&t|8).toString(16)})}var A="__xapp_visitor_id",M="__xapp_visit",j=/^[A-Za-z0-9_-]{8,64}$/;function E(){try{var e=window;return e.__xappVisitIdentity=e.__xappVisitIdentity||{}}catch(e){return{}}}function z(e){try{return localStorage.getItem(e)||void 0}catch(e){return}}function O(e,n){try{return localStorage.setItem(e,n),!0}catch(e){return!1}}function P(e){return e&&j.test(e)?e:void 0}function L(){var e=P(z(A));if(e)return e;var n=E(),t=n.visitorId||P(z("__xapp_form_user_id"))||I();return O(A,t)||(n.visitorId=t),t}var H=function(e){var n=e.icon;return s.jsx("div",{tabIndex:e.tabIndex?Number(e.tabIndex):0,className:"xapp-search-icon-button ".concat(e.className||""),onClick:e.onClick,children:s.jsx("div",{className:"xapp-search-icon-button__content",children:s.jsx(n,{})})})},U=function(e){return s.jsx("div",{className:"xappw-message-bubble",children:e.children})},B=function(e){return s.jsx("div",{className:"xappw-suggestions-group-heading",children:e.label})},W=function(e){return function(){try{return"1"===sessionStorage.getItem("xa_test")}catch(e){return!1}}()&&(e.xaTest=!0,delete e.rwg_token),e},$=function(){try{var e=window.__xappInternal;return"string"==typeof e&&h.test(e)?e:void 0}catch(e){return}},q=function(e){if(e)try{var n=new URL(e);return n.origin+n.pathname}catch(e){return}},Y=function(e){void 0===e&&(e=!0),d.useEffect(function(){if(e)return y()},[e])},G=function(e){void 0===e&&(e=!0),d.useEffect(function(){if(e&&"undefined"!=typeof document){var n=R(),t=function(e){R()>0&&N(e.target)},r=function(){window.requestAnimationFrame(function(){var e=R(),t=n<=0&&e>0;n=e,t&&N(document.activeElement)})},a="undefined"==typeof window?void 0:window.visualViewport;return document.addEventListener("focusin",t),null==a||a.addEventListener("resize",r),null==a||a.addEventListener("scroll",r),function(){document.removeEventListener("focusin",t),null==a||a.removeEventListener("resize",r),null==a||a.removeEventListener("scroll",r)}}},[e])},V=function(e){void 0===e&&(e=!0),d.useEffect(function(){if(e)return D()},[e])},X=I,J=function(e){void 0===e&&(e=Date.now());var n=E(),t=function(e){if(e)try{var n=JSON.parse(e);return n&&P(n.id)&&"number"==typeof n.at?n:void 0}catch(e){return}}(z(M))||n.visit,r={id:t&&t.at<=e&&e-t.at<=18e5&&t?t.id:I(),at:e};return O(M,JSON.stringify(r))||(n.visit=r),{visitorId:L(),visitId:r.id}},K=L,Z={extractUtmParameters:!0,extractClickIds:!0,customParameterPrefix:"track_",persistToLocalStorage:!0,persistenceDays:30,preferUrlParameters:!0},Q=u,ee=m;function ne(e){return void 0===e?"xa_tracking_":"".concat("xa_tracking","@").concat(encodeURIComponent(e),":")}function te(e){return e.length<=255&&!/[<>"'\x00-\x1f]/.test(e)}function re(e){var n={},t=ne(e);return o(o([],Q,!0),ee,!0).forEach(function(e){var r=localStorage.getItem("".concat(t).concat(e));if(r)try{var a=JSON.parse(r);a.expires>Date.now()&&(n[e]=a.value)}catch(n){localStorage.removeItem("".concat(t).concat(e))}}),function(){for(var e=[],n=0;n<localStorage.length;n++){var t=localStorage.key(n);t&&e.push(t)}return e}().forEach(function(e){if(e.startsWith("".concat(t,"track_")))try{var r=JSON.parse(localStorage.getItem(e)||"{}");if(r.expires>Date.now()){var a=e.slice(t.length);n[a]=r.value}}catch(n){localStorage.removeItem(e)}}),n}function ae(e,n){void 0===e&&(e=window.location.href),void 0===n&&(n={});var r=t(t({},Z),n),a=function(e,n){void 0===e&&(e=window.location.href),void 0===n&&(n={});var r,a=t(t({},Z),n);try{r=new URL(e)}catch(n){return console.warn("Invalid URL provided to tracking parameter extraction:",e),{}}var o=r.searchParams,i={};return a.extractUtmParameters&&Q.forEach(function(e){var n=o.get(e);n&&te(n)&&(i[e]=n)}),a.extractClickIds&&ee.forEach(function(e){var n=o.get(e);n&&te(n)&&(i[e]=n)}),a.customParameterPrefix&&o.forEach(function(e,n){n.startsWith(a.customParameterPrefix)&&te(e)&&(i[n]=e)}),i}(e,n),o=re(n.scope),i=r.preferUrlParameters?t(t({},o),a):t(t({},a),o);return Object.keys(a).length>0&&function(e,n){void 0===n&&(n={});var r=t(t({},Z),n);if(r.persistToLocalStorage){var a=Date.now()+24*r.persistenceDays*60*60*1e3,o=ne(n.scope);Object.entries(e).forEach(function(e){var n=e[0],t=e[1];if(t){var r={value:t,expires:a,stored:Date.now()};localStorage.setItem("".concat(o).concat(n),JSON.stringify(r))}})}}(a,n),i}function oe(){return(new Date).toISOString()+" ::"}function ie(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];"debug"===window.xaLogLevel&&console.log.apply(console,o([oe()],e,!1))}function se(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];console.error.apply(console,o([oe()],e,!1))}function de(e){return!!e&&"CAROUSEL"===e.type}function le(e){return!!e&&"LIST"===e.type}function pe(e){return!!e&&"FORM"===e.type}function ce(e,n){var r=n.type;switch(r){case"set-query":return t(t({},e),{query:n.query||""});case"set-response":return t(t({},e),{responseQuery:n.query,responseIntentId:n.intentId});case"set-context":return t(t({},e),{context:n.context});case"new-search":return t(t({},e),{query:""});case"set-modal-state":return t(t({},e),{active:n.active,minimized:n.minimized,sendRequest:n.sendRequest});case"open-modal-state":return e.active?e:t(t({},e),{active:!0,minimized:!1,sendRequest:!0});default:!function(e){throw new Error("Unknown kind "+e)}(r)}}var ue={query:"",active:!1,minimized:!1,sendRequest:!0},me=[ue,function(){}],fe=n.createContext(me),_e=function(t){var r=n.useReducer(ce,t.initialState||ue);return e.jsx(fe.Provider,{value:r,children:t.children})};function he(){return n.useContext(fe)}function xe(){return he()[0]}function ge(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===t&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}var ve="ModalDialog-module_xapp_search_modal__WpGiJ",be="ModalDialog-module_xapp_search_modal__backdrop__rryOU",ye="ModalDialog-module_xapp_search_modal__body__qK17C",we="ModalDialog-module_xapp_search_modal_embedded__Ye0Dg";ge("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.ModalDialog-module_xapp_search_modal__WpGiJ {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 48px;\n z-index: 15000;\n}\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .ModalDialog-module_xapp_search_modal__WpGiJ {\n padding: env(safe-area-inset-top) env(safe-area-inset-right) max(env(safe-area-inset-bottom), var(--xapp-keyboard-inset, 0px)) env(safe-area-inset-left);\n }\n}\n@media (max-height: 640px) and (min-width: 641px) and (pointer: fine) {\n .ModalDialog-module_xapp_search_modal__WpGiJ {\n padding-bottom: 24px;\n }\n}\n.ModalDialog-module_xapp_search_modal__backdrop__rryOU {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: -1;\n background: rgba(0, 0, 0, 0.4);\n}\n.ModalDialog-module_xapp_search_modal__body__qK17C {\n box-sizing: border-box;\n max-width: 100%;\n max-height: 100%;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n}\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .ModalDialog-module_xapp_search_modal__body__qK17C {\n width: 100%;\n height: 100%;\n }\n}\n\n.ModalDialog-module_xapp_search_modal_embedded__Ye0Dg {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n overflow: hidden;\n}");var Fe=function(n){var t=n.embedded;return Y(!t),V(!t),G(),t?e.jsx("div",{className:we,children:n.children}):e.jsxs("div",{className:ve,children:[!n.disableBackdrop&&e.jsx("div",{"data-testid":"xapp-modal-backdrop",className:be,onClick:n.onClose}),e.jsx("div",{className:ye,children:n.children})]})},ke="__xappDroppedAfterFinal";var Se=new Map,Te=new Set(["LAUNCH_REQUEST","INTENT_REQUEST"]),Ce=function(){function e(e){this.sessionSent=!1,this.prefetchSemaphore=Promise.resolve(),this.config=e,this.responseCache={}}return Object.defineProperty(e.prototype,"trackingScope",{get:function(){return e=this.config.key,n=this.config.intentId,"".concat(null!=e?e:"","|").concat(null!=n?n:"");var e,n},enumerable:!1,configurable:!0}),e.prototype.getCachedTrackingParameters=function(){var e=Date.now();if(this.cachedTrackingParams&&e-this.cachedTrackingParams.ts<3e5)return this.cachedTrackingParams.value;var n=re(this.trackingScope);return this.cachedTrackingParams={ts:e,value:n},n},e.getApi=function(n){var t=function(e){var n;return"".concat(e.url," ").concat(e.key," ").concat(null!==(n=e.intentId)&&void 0!==n?n:""," ").concat(e.demoMode?"demo":"live")}(n),r=Se.get(t);if(r)return r;var a=new e(n);return Se.set(t,a),n.prefetchQuery&&a.prefetch(n.prefetchQuery),a},e.prototype.launchRequest=function(e){return this.send({type:"LAUNCH_REQUEST",rawQuery:e,intentId:"LaunchRequest",platform:"stentor-platform",channel:"form-widget"})},e.prototype.intentRequest=function(e){var n=(null==e?void 0:e.intentId)?void 0:e.query,t=(null==e?void 0:e.intentId)?e.intentId:"NLU_RESULT_PLACEHOLDER";return this.send({type:"INTENT_REQUEST",rawQuery:n,intentId:t,platform:"stentor-platform",channel:"form-widget"})},e.prototype.channelActionRequest=function(e,n){var r,a=this,o=!!e.final;if(this.session){if(this.session.hadFinal)return ie("Had final submit. Not sending action request: ".concat(n)),Promise.resolve(((r={})[ke]=!0,r));this.session.hadFinal=o}return this.send(t(t({type:"CHANNEL_ACTION_REQUEST",action:n,platform:"stentor-platform",channel:"form-widget"},this.config.intentId?{overrideKey:this.config.intentId}:{}),{attributes:{data:e}})).catch(function(e){throw a.session&&o&&(a.session.hadFinal=!1),e})},e.prototype.trackEvent=function(e,n){return r(this,void 0,void 0,function(){var t,r,o,i,s,d,l;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),t=this.config.key,this.config.demoMode?(ie("[demoMode] suppressed tracking event",e),[2,void 0]):t?(r=this.getTrackingUrl(),o={key:t,events:[n]},i={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o),mode:"cors"},[4,fetch(r,i)]):(se("[EventTracking] No widget key configured, skipping event tracking"),[2,void 0]);case 1:return(s=a.sent()).ok?[4,s.json()]:(se("Event tracking failed: ".concat(s.status," ").concat(s.statusText)),[2,void 0]);case 2:return d=a.sent(),ie("Event tracking succeeded: ".concat(e,", processed: ").concat(d.processed)),[2,d];case 3:return l=a.sent(),se("Event tracking error: ".concat(l)),[2,void 0];case 4:return[2]}})})},e.prototype.trackEventBeacon=function(e,n){var r=this.config.key;if(this.config.demoMode)return ie("[demoMode] suppressed tracking beacon",e.eventType),!1;if(!r)return se("[EventTracking] No widget key configured, skipping event beacon"),!1;try{var a=this.getTrackingUrl(),o=t(t({key:r},n?{widgetType:n}:{}),{events:[e]});return fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o),keepalive:!0}).catch(function(){}),!0}catch(e){return se("Event beacon error: ".concat(e)),!1}},e.prototype.getTrackingUrl=function(){var e=this.config.url;try{var n=new URL(e);return"".concat(n.origin,"/cms/widget/events")}catch(n){se("[EventTracking] Failed to parse URL: ".concat(e));var t=e.match(/^(https?:\/\/[^/]+)/);return"".concat(t?t[1]:e.replace(/\/$/,""),"/cms/widget/events")}},e.prototype.resetSession=function(){this.session=void 0,this.sessionSent=!1},e.prototype.visitSession=function(){this.session||(this.session={sessionId:"stentor-form-session-".concat(X()),userId:K(),hadFinal:!1});var e=this.session;return{sessionId:e.sessionId,userId:e.userId}},e.prototype.getCachedResponse=function(e){if(e){var n=(new Date).getTime(),t=this.responseCache[e];if(t){if(n-t.ts<9e5)return ie('Returning cached response for "'.concat(e,'"')),t.value;ie('Deleting expired cached response for "'.concat(e,'"')),delete this.responseCache[e]}}},e.prototype.send=function(e){return r(this,void 0,void 0,function(){var n,r,o,i,s,d,l,p,c,u,m,f,_,h,x,g,v,b,y,w,F,k,S,T;return a(this,function(a){switch(a.label){case 0:return[4,this.prefetchSemaphore];case 1:if(a.sent(),this.config.demoMode&&!Te.has(e.type))return ie("[demoMode] suppressed request",e.type),[2,{}];if(n=this.getCachedResponse(e.rawQuery))return[2,Promise.resolve(n)];r=this.config,o=r.url,i=r.key,s=!this.sessionSent,d=this.visitSession(),l=d.sessionId,p=d.userId,this.sessionSent=!0,c={};try{(null==(u=new URL(window.location.href))?void 0:u.host.toLowerCase().startsWith("localhost"))?c.isLocal=!0:c.currentUrl=window.location.href}catch(e){}(m=q(document.referrer))&&(c.referrer=m),(f=localStorage.getItem("xa_rwg_token"))&&(c.rwg_token=f),(_=localStorage.getItem("xa_merchant_id"))&&(c.merchant_id=_),(h=localStorage.getItem("xa_environment"))&&(c.environment=h),(x=localStorage.getItem("xa_enablePreferredTime"))&&(c.enablePreferredTime=x),(g=localStorage.getItem("xa_service"))&&(c.service=g),(v=localStorage.getItem("xa_origin"))&&(c.origin=v);try{b=new URLSearchParams(window.location.search),(y=b.get("placeId"))&&(c.placeId=y)}catch(e){}return w=this.getCachedTrackingParameters(),Object.assign(c,w),W(c),c.currentTime=(new Date).toISOString(),F=t(t({},e),{sessionId:l,userId:p,isNewSession:s,attributes:t(t({},e.attributes),c)}),k=JSON.stringify(F),S={method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(i)},body:k,mode:"cors"},[4,fetch(o,S)];case 2:return(T=a.sent()).ok?[3,5]:(se("Stentor call failed: ".concat(T.statusText)),[4,(C=1e3,new Promise(function(e){setTimeout(e,C)}))]);case 3:return a.sent(),[4,fetch(o,S)];case 4:if(!(T=a.sent()).ok)throw se("Stentor call failed again: ".concat(T.statusText)),new Error("Status ".concat(T.status,", Text: ").concat(T.statusText));a.label=5;case 5:return[2,T.json()]}var C})})},e.prototype.prefetch=function(e){return r(this,void 0,void 0,function(){var n,o,i,s,d,l,p,c,u,m,f,_,h,x,g=this;return a(this,function(v){return this.config.demoMode||this.getCachedResponse(e)||(this.prefetchSemaphore=new Promise(function(e){n=e}),o=this.config,i=o.url,s=o.key,d=!this.sessionSent,l=this.visitSession(),p=l.sessionId,c=l.userId,this.sessionSent=!0,u={type:"INTENT_REQUEST",rawQuery:e,intentId:"NLU_RESULT_PLACEHOLDER",platform:"stentor-platform",channel:"form-widget"},m={currentTime:(new Date).toISOString()},f=t(t({},u),{sessionId:p,userId:c,isNewSession:d,attributes:m}),_=JSON.stringify(f),h={method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(s)},body:_,mode:"cors"},x=(new Date).getTime(),fetch(i,h).then(function(n){return r(g,void 0,void 0,function(){var t,r,o,i;return a(this,function(a){switch(a.label){case 0:return n.ok?(t=(new Date).getTime(),r=this.responseCache,o=e,i={ts:t},[4,n.json()]):(se("Stentor prefetch failed: ".concat(n.statusText)),[2]);case 1:return r[o]=(i.value=a.sent(),i),ie("Stentor prefetch took: ".concat(t-x," ms")),[2]}})})}).finally(function(){n()})),[2]})})},e}();function De(e){return"string"==typeof e?e:e.title}var Re=n.createContext({api:{key:"",url:""},suggestionsUrl:"",isVoiceEnabled:!1,autoGreeting:"schedule"});function Ne(){var e,t=n.useState(0),r=t[0],a=t[1],o=(e=n.useRef(!1),n.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),n.useCallback(function(){return e.current},[])),i=n.useCallback(function(e){return function(e,n){return n(1),e().finally(function(){n(-1)})}(e,function(e){o()&&a(function(n){return n+e})})},[o]);return n.useMemo(function(){return{loading:!!r,run:i}},[r,i])}var Ie="xxTrustedFormCertUrl",Ae="xxTrustedFormPingUrl";function Me(e){return n.useEffect(function(){if(e)if(function(e){try{return"https://api.trustedform.com"===new URL(e).origin}catch(e){return!1}}(e)){if(!document.querySelector('script[src="'.concat(e,'"]'))){var n=document.createElement("script");n.async=!0,n.src=e,n.onerror=function(){se("[TrustedForm] Failed to load script")},document.head.appendChild(n)}}else se("[TrustedForm] Rejected script URL from unexpected origin")},[e]),n.useCallback(function(){if(e){var n={},t=document.querySelector('input[name="'.concat(Ie,'"], input[id="').concat(Ie,'"]')),r=document.querySelector('input[name="'.concat(Ae,'"], input[id="').concat(Ae,'"]'));if((null==t?void 0:t.value)&&(n[Ie]=t.value),(null==r?void 0:r.value)&&(n[Ae]=r.value),0!==Object.keys(n).length)return n;se("[TrustedForm] No certificate data found in DOM")}},[e])}function je(e){if("undefined"!=typeof document&&document.cookie){var n=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),t=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));if(t)try{return decodeURIComponent(t[1])}catch(e){return t[1]}}}var Ee="generate_lead";function ze(e){return"string"==typeof e&&/^G-[A-Z0-9]{4,}$/i.test(e.trim())}function Oe(){return"undefined"!=typeof navigator&&!0===navigator.globalPrivacyControl}function Pe(e,n,t){if(!ze(e)||Oe())return!1;var r=e.trim();if(!function(e){var n=window.google_tag_manager;return!!n&&Object.prototype.hasOwnProperty.call(n,e)}(r))return!1;var a=window,o={send_to:r,event_id:n,lead_source:t};try{if("function"==typeof a.gtag)return a.gtag("event",Ee,o),!0;if(Array.isArray(a.dataLayer))return function(){for(var e,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];null===(e=a.dataLayer)||void 0===e||e.push(arguments)}("event",Ee,o),!0}catch(e){}return!1}var Le=function(){return e.jsx("svg",{viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M10 14L3 7.5L10 1",stroke:"currentColor",fill:"none",strokeLinecap:"square"})})},He=function(){return e.jsx("svg",{viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M5 14L12 7.5L5 1",stroke:"currentColor",fill:"none",strokeLinecap:"square"})})},Ue=function(){return e.jsxs("svg",{viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"spinner-secondHalf",children:[e.jsx("stop",{offset:"0%",stopOpacity:"0",stopColor:"currentColor"}),e.jsx("stop",{offset:"100%",stopOpacity:"0.5",stopColor:"currentColor"})]}),e.jsxs("linearGradient",{id:"spinner-firstHalf",children:[e.jsx("stop",{offset:"0%",stopOpacity:"1",stopColor:"currentColor"}),e.jsx("stop",{offset:"100%",stopOpacity:"0.5",stopColor:"currentColor"})]})]}),e.jsxs("g",{strokeWidth:16,children:[e.jsx("path",{stroke:"url(#spinner-secondHalf)",d:"M".concat(8," 100 A").concat(92," ").concat(92," 0 0 1 ").concat(192," 100")}),e.jsx("path",{stroke:"url(#spinner-firstHalf)",d:"M".concat(192," 100 A").concat(92," ").concat(92," 0 0 1 ").concat(8," 100")}),e.jsx("path",{stroke:"currentColor",strokeLinecap:"round",d:"M".concat(8," 100 A").concat(92," ").concat(92," 0 0 1 ").concat(8," ").concat(96)})]}),e.jsx("animateTransform",{from:"0 0 0",to:"360 0 0",attributeName:"transform",type:"rotate",repeatCount:"indefinite",dur:"1300ms"})]})},Be=function(n){return function(t){var r=t.className;return e.jsx("svg",{className:r,viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false",children:e.jsx("path",{d:n})})}},We=Be("M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"),$e=Be("M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"),qe=Be("M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"),Ye=Be("M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"),Ge=Be("M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"),Ve=Be("M7 10l5 5 5-5z"),Xe=Be("M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"),Je=Be("M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"),Ke="SearchResponseBubble-module_xapp_search_response_bubble__UtmuK";ge(".SearchResponseBubble-module_xapp_search_response_bubble__UtmuK {\n --xapp-bubble-background: #fff;\n}");var Ze=function(n){return e.jsx("div",{className:Ke,children:e.jsx(U,{children:n.children})})};function Qe(e,n){for(var t=-1,r=0,a=n;r<a.length;r++){var o=a[r],i=e.indexOf(o);i>=0&&(t<0||t>=0&&i<t)&&(t=i)}return t}var en=[":","/"],nn=["/"],tn=["?","#"],rn=["#"],an=[function(e){var n=e.indexOf("://");return n<0?n:n+3},function(e){return Qe(e,en)},function(e){return":"!==e.charAt(0)?-1:Qe(e,nn)},function(e){var n=Qe(e,tn);return n>=0?n:e.length},function(e){return Qe(e,rn)}];var on="/...";function sn(e,n){if(!e)return e;if(e.length<n)return e;var t=function(e){for(var n=[],t=e,r=0,a=an;r<a.length;r++){var o=a[r],i=Math.max(0,o(t,e)),s=t.substring(0,i);n.push(s),t=t.substring(i)}return t&&n.push(t),n}(e);function r(){return t.join("")}function a(){return r().length>n}function o(e){a()&&(t[e]="")}if(":80"===t[2]&&"http://"===t[0]&&o(2),":443"===t[2]&&"https://"===t[0]&&o(2),o(5),o(4),o(2),o(0),a()){var i=t[3],s=r().length-i.length,d=n-s;if(d<0)t[3]="";else if(d<i.length){var l=i.length-d+4;t[3]=on+i.substring(l)}}return r()}var dn="Card-module_xapp_search_card__9iVCv",ln="Card-module_xapp_search_card__featured__CX-L0",pn="Card-module_xapp_search_card__featured_box__1fV9y",cn="Card-module_xapp_search_card__img__KJ1s3",un="Card-module_xapp_search_card__content__dathl",mn="Card-module_xapp_search_card__link__DNSSb",fn="Card-module_xapp_search_card__title__ddR3K",_n="Card-module_xapp_search_card__description__MruSU";ge('/**\n * The phone breakpoint.\n *\n * Width alone cannot express "phone". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step\'s action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field\'s helper / error line. The metrics are MUI\'s FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.Card-module_xapp_search_card__9iVCv {\n border: solid 0 var(--xapp-form-widget-border-color, #d3d3df);\n border-radius: 12px;\n margin-top: 0;\n margin-right: 0;\n margin-bottom: 20px;\n margin-left: 0;\n padding-top: 0;\n padding-right: 0;\n padding-bottom: 0;\n padding-left: 0;\n box-sizing: border-box;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-items: stretch;\n overflow: hidden;\n border-radius: var(--xapp-form-widget-border-radius-lg, 16px);\n box-shadow: var(--xapp-form-widget-box-shadow-subtle, 0 2px 8px rgba(0, 0, 0, 0.08));\n transition: box-shadow 200ms ease-in-out, transform 200ms ease-in-out;\n background-color: #fff;\n}\n.Card-module_xapp_search_card__9iVCv:hover {\n box-shadow: var(--xapp-form-widget-box-shadow, 0 4px 24px rgba(0, 0, 0, 0.12));\n}\n.Card-module_xapp_search_card__featured__CX-L0 {\n flex: 1 1 240px;\n margin: 12px;\n width: 100%;\n min-width: 240px;\n overflow: hidden;\n}\n.Card-module_xapp_search_card__featured_box__1fV9y {\n position: relative;\n padding-bottom: math-div(100%, math-div(16, 9));\n box-sizing: border-box;\n overflow: hidden;\n}\n.Card-module_xapp_search_card__img__KJ1s3 {\n position: relative;\n width: 100%;\n height: 100%;\n object-fit: cover;\n overflow: hidden;\n}\n.Card-module_xapp_search_card__content__dathl {\n flex: 4 1 200px;\n min-width: 200px;\n margin: 12px;\n display: flex;\n flex-direction: column;\n}\n.Card-module_xapp_search_card__extra__R-h6g {\n margin-top: auto;\n margin-left: auto;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-items: stretch;\n max-width: 100%;\n}\n.Card-module_xapp_search_card__extra__R-h6g:before {\n content: "";\n min-width: 360px;\n}\n.Card-module_xapp_search_card__link__DNSSb {\n display: block;\n flex: 0 0 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n line-height: 1.5em;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n font-weight: normal;\n font-size: 16px;\n font-style: normal;\n color: #006621;\n margin-top: 0;\n margin-right: 0;\n margin-bottom: 0;\n margin-left: 0;\n padding-top: 0;\n padding-right: 0;\n padding-bottom: 0;\n padding-left: 0;\n}\n.Card-module_xapp_search_card__btn__DHrQp {\n flex: 1 1 auto;\n margin-top: 12px;\n}\n.Card-module_xapp_search_card__title__ddR3K {\n overflow: hidden;\n text-decoration: none;\n text-overflow: ellipsis;\n white-space: nowrap;\n line-height: 1.25em;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n font-weight: normal;\n font-size: 20px;\n font-style: normal;\n color: #1a0dab;\n margin-top: 0;\n margin-right: 0;\n margin-bottom: 0;\n margin-left: 0;\n padding-top: 0;\n padding-right: 0;\n padding-bottom: 0;\n padding-left: 0;\n}\n.Card-module_xapp_search_card__title__ddR3K:hover {\n text-decoration: underline;\n}\n.Card-module_xapp_search_card__description__MruSU {\n line-height: 1.25em;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n font-weight: normal;\n font-size: 16px;\n font-style: normal;\n color: #666;\n margin-top: 6px;\n margin-right: 0;\n margin-bottom: 0;\n margin-left: 0;\n padding-top: 0;\n padding-right: 0;\n padding-bottom: 0;\n padding-left: 0;\n overflow: hidden;\n max-height: 6.25em;\n position: relative;\n}\n.Card-module_xapp_search_card__description__MruSU:after {\n background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 12.5%, white 100%);\n content: "";\n height: 1.25em;\n position: absolute;\n top: 5em;\n left: 0;\n right: 0;\n pointer-events: none;\n}');var hn=function(n){var t,r,a,o=n.item,i=null===(t=o.image)||void 0===t?void 0:t.url;return e.jsxs("div",{className:"".concat(dn," ").concat(n.className||""),children:[!!i&&e.jsx("div",{className:ln,children:e.jsx("div",{className:pn,children:e.jsx("img",{src:null===(r=o.image)||void 0===r?void 0:r.url,className:cn,alt:null===(a=o.image)||void 0===a?void 0:a.accessibilityText})})}),e.jsxs("div",{className:un,children:[!!o.url&&e.jsx("a",{href:o.url,className:fn,children:o.title}),!!o.url&&e.jsx("div",{className:mn,children:sn(o.url,40)}),e.jsx("div",{className:_n,children:o.description})]})]})},xn="Carousel-module_xapp_search_carousel__NZTGa",gn="Carousel-module_xapp_search_carousel__prev__BdNo-",vn="Carousel-module_xapp_search_carousel__next__udR98",bn="Carousel-module_xapp_search_carousel__items__gRPzO",yn="Carousel-module_xapp_search_carousel__content__EoqyB";ge(".Carousel-module_xapp_search_carousel__NZTGa {\n display: flex;\n flex-flow: row nowrap;\n}\n.Carousel-module_xapp_search_carousel__prev__BdNo-, .Carousel-module_xapp_search_carousel__next__udR98 {\n flex: 0 0 32px;\n height: 32px;\n cursor: pointer;\n box-sizing: border-box;\n padding: 4px;\n align-self: center;\n}\n.Carousel-module_xapp_search_carousel__items__gRPzO {\n display: flex;\n position: relative;\n height: auto;\n align-items: stretch;\n scroll-behavior: smooth;\n -ms-overflow-style: none;\n -moz-overflow-style: none;\n -webkit-overflow-scrolling: touch;\n overflow-x: hidden;\n overflow-y: hidden;\n /* smartphones, touchscreens */\n}\n@media (hover: none) and (pointer: coarse) {\n .Carousel-module_xapp_search_carousel__items__gRPzO {\n overflow-x: auto;\n }\n}\n.Carousel-module_xapp_search_carousel__content__EoqyB {\n flex-grow: 1;\n}");var wn="CarouselItem-module_xapp_search_carousel_item__xNpwo";ge("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.CarouselItem-module_xapp_search_carousel_item__xNpwo {\n display: inline-flex;\n flex-direction: column;\n padding-right: 12px;\n flex-shrink: 0;\n width: 275px;\n}\n.CarouselItem-module_xapp_search_carousel_item__xNpwo:last-child {\n padding-right: 0;\n}\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .CarouselItem-module_xapp_search_carousel_item__xNpwo {\n min-width: 100%;\n max-width: 100%;\n }\n}");var Fn=function(n){return e.jsx("div",{className:"".concat(wn," ").concat(n.className||""),children:n.children})},kn=function(t){var r=t.list,a=n.useRef(null),o=n.useCallback(function(e){var n=a.current;if(n)for(var t=n.getElementsByClassName("xapp_search_carousel-item"),r=n.getBoundingClientRect(),o=t.length,i=0;i<o;i++){var s=t.item(i);if(s){var d=s.getBoundingClientRect(),l=e({position:d.left-r.left,size:d.width});if(void 0!==l)return void(n.scrollLeft+=l)}}},[]),i=n.useCallback(function(){var e;o(function(n){if(n.position>-10)return e;e=n.position})},[o]),s=n.useCallback(function(){o(function(e){if(e.position>10)return e.position})},[o]);return e.jsxs("div",{className:xn,children:[e.jsx(H,{icon:Le,className:gn,onClick:i}),e.jsx("div",{ref:a,className:bn,children:r.items.map(function(n,t){return e.jsx(Fn,{children:e.jsx(hn,{item:n,className:yn})},t)})}),e.jsx(H,{icon:He,className:vn,onClick:s})]})},Sn=function(n){var t=n.carousel;return e.jsx("div",{children:e.jsx(kn,{list:t})})},Tn="Cards-module_xapp_search_cards__aeR3S";ge(".Cards-module_xapp_search_cards__aeR3S {\n display: flex;\n flex-direction: column;\n}");var Cn=function(n){var t=n.list;return e.jsx("div",{className:Tn,children:t.items.map(function(n,t){return e.jsx(hn,{item:n},t)})})},Dn=function(n){var t=n.list,r=null==t?void 0:t.title;return e.jsxs("div",{children:[r?e.jsx(B,{label:r}):e.jsx(e.Fragment,{}),e.jsx(Cn,{list:t})]})},Rn=function(e,n,t){void 0===n&&(n="this"),void 0===t&&(t=[]);var r=t.map(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}).join("|"),a=new RegExp("\\b(?<!')(?!(?:if|else|length|for|while|includes|function|var|let|const|return|switch|case|do|true|false|null|undefined|typeof|new|this|void|delete|in|instanceof|export|import".concat(r?"|".concat(r):"",")\\b)([a-zA-Z_$][a-zA-Z0-9_$]*)\\b"),"g");return e.replace(a,"".concat(n,".$1"))},Nn=/#{([\s\S]+?)}/g;function In(e,n){var t=n;try{var r=JSON.stringify(e).replace(Nn,function(e,n){var r=n.trim();if(!(r in t))throw new Error('Missing template key "'.concat(r,'"'));var a=t[r];return null==a?"":String(a)}).replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t");return JSON.parse(r)}catch(e){}return e}var An=/^\d{4}-\d{2}-\d{2}$/,Mn=/^(\d{1,2}):(\d{2})/;function jn(e){var n="string"==typeof e?Mn.exec(e.trim()):null;return n?"".concat(n[1].padStart(2,"0"),":").concat(n[2]):void 0}function En(e,n,t){var r=jn(n);return!!t&&!!r&&e===t.date&&r<t.blockedUntil}function zn(e){return e.filter(function(e){return!!jn(e.startTime)})}var On={exports:{}};On.exports=function(){var e=1e3,n=6e4,t=36e5,r="millisecond",a="second",o="minute",i="hour",s="day",d="week",l="month",p="quarter",c="year",u="date",m="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var n=["th","st","nd","rd"],t=e%100;return"["+e+(n[(t-20)%10]||n[t]||n[0])+"]"}},x=function(e,n,t){var r=String(e);return!r||r.length>=n?e:""+Array(n+1-r.length).join(t)+e},g={s:x,z:function(e){var n=-e.utcOffset(),t=Math.abs(n),r=Math.floor(t/60),a=t%60;return(n<=0?"+":"-")+x(r,2,"0")+":"+x(a,2,"0")},m:function e(n,t){if(n.date()<t.date())return-e(t,n);var r=12*(t.year()-n.year())+(t.month()-n.month()),a=n.clone().add(r,l),o=t-a<0,i=n.clone().add(r+(o?-1:1),l);return+(-(r+(t-a)/(o?a-i:i-a))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:c,w:d,d:s,D:u,h:i,m:o,s:a,ms:r,Q:p}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},v="en",b={};b[v]=h;var y="$isDayjsObject",w=function(e){return e instanceof T||!(!e||!e[y])},F=function e(n,t,r){var a;if(!n)return v;if("string"==typeof n){var o=n.toLowerCase();b[o]&&(a=o),t&&(b[o]=t,a=o);var i=n.split("-");if(!a&&i.length>1)return e(i[0])}else{var s=n.name;b[s]=n,a=s}return!r&&a&&(v=a),a||!r&&v},k=function(e,n){if(w(e))return e.clone();var t="object"==typeof n?n:{};return t.date=e,t.args=arguments,new T(t)},S=g;S.l=F,S.i=w,S.w=function(e,n){return k(e,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var T=function(){function h(e){this.$L=F(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[y]=!0}var x=h.prototype;return x.parse=function(e){this.$d=function(e){var n=e.date,t=e.utc;if(null===n)return new Date(NaN);if(S.u(n))return new Date;if(n instanceof Date)return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var r=n.match(f);if(r){var a=r[2]-1||0,o=(r[7]||"0").substring(0,3);return t?new Date(Date.UTC(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(n)}(e),this.init()},x.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},x.$utils=function(){return S},x.isValid=function(){return!(this.$d.toString()===m)},x.isSame=function(e,n){var t=k(e);return this.startOf(n)<=t&&t<=this.endOf(n)},x.isAfter=function(e,n){return k(e)<this.startOf(n)},x.isBefore=function(e,n){return this.endOf(n)<k(e)},x.$g=function(e,n,t){return S.u(e)?this[n]:this.set(t,e)},x.unix=function(){return Math.floor(this.valueOf()/1e3)},x.valueOf=function(){return this.$d.getTime()},x.startOf=function(e,n){var t=this,r=!!S.u(n)||n,p=S.p(e),m=function(e,n){var a=S.w(t.$u?Date.UTC(t.$y,n,e):new Date(t.$y,n,e),t);return r?a:a.endOf(s)},f=function(e,n){return S.w(t.toDate()[e].apply(t.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(n)),t)},_=this.$W,h=this.$M,x=this.$D,g="set"+(this.$u?"UTC":"");switch(p){case c:return r?m(1,0):m(31,11);case l:return r?m(1,h):m(0,h+1);case d:var v=this.$locale().weekStart||0,b=(_<v?_+7:_)-v;return m(r?x-b:x+(6-b),h);case s:case u:return f(g+"Hours",0);case i:return f(g+"Minutes",1);case o:return f(g+"Seconds",2);case a:return f(g+"Milliseconds",3);default:return this.clone()}},x.endOf=function(e){return this.startOf(e,!1)},x.$set=function(e,n){var t,d=S.p(e),p="set"+(this.$u?"UTC":""),m=(t={},t[s]=p+"Date",t[u]=p+"Date",t[l]=p+"Month",t[c]=p+"FullYear",t[i]=p+"Hours",t[o]=p+"Minutes",t[a]=p+"Seconds",t[r]=p+"Milliseconds",t)[d],f=d===s?this.$D+(n-this.$W):n;if(d===l||d===c){var _=this.clone().set(u,1);_.$d[m](f),_.init(),this.$d=_.set(u,Math.min(this.$D,_.daysInMonth())).$d}else m&&this.$d[m](f);return this.init(),this},x.set=function(e,n){return this.clone().$set(e,n)},x.get=function(e){return this[S.p(e)]()},x.add=function(r,p){var u,m=this;r=Number(r);var f=S.p(p),_=function(e){var n=k(m);return S.w(n.date(n.date()+Math.round(e*r)),m)};if(f===l)return this.set(l,this.$M+r);if(f===c)return this.set(c,this.$y+r);if(f===s)return _(1);if(f===d)return _(7);var h=(u={},u[o]=n,u[i]=t,u[a]=e,u)[f]||1,x=this.$d.getTime()+r*h;return S.w(x,this)},x.subtract=function(e,n){return this.add(-1*e,n)},x.format=function(e){var n=this,t=this.$locale();if(!this.isValid())return t.invalidDate||m;var r=e||"YYYY-MM-DDTHH:mm:ssZ",a=S.z(this),o=this.$H,i=this.$m,s=this.$M,d=t.weekdays,l=t.months,p=t.meridiem,c=function(e,t,a,o){return e&&(e[t]||e(n,r))||a[t].slice(0,o)},u=function(e){return S.s(o%12||12,e,"0")},f=p||function(e,n,t){var r=e<12?"AM":"PM";return t?r.toLowerCase():r};return r.replace(_,function(e,r){return r||function(e){switch(e){case"YY":return String(n.$y).slice(-2);case"YYYY":return S.s(n.$y,4,"0");case"M":return s+1;case"MM":return S.s(s+1,2,"0");case"MMM":return c(t.monthsShort,s,l,3);case"MMMM":return c(l,s);case"D":return n.$D;case"DD":return S.s(n.$D,2,"0");case"d":return String(n.$W);case"dd":return c(t.weekdaysMin,n.$W,d,2);case"ddd":return c(t.weekdaysShort,n.$W,d,3);case"dddd":return d[n.$W];case"H":return String(o);case"HH":return S.s(o,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return f(o,i,!0);case"A":return f(o,i,!1);case"m":return String(i);case"mm":return S.s(i,2,"0");case"s":return String(n.$s);case"ss":return S.s(n.$s,2,"0");case"SSS":return S.s(n.$ms,3,"0");case"Z":return a}return null}(e)||a.replace(":","")})},x.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},x.diff=function(r,u,m){var f,_=this,h=S.p(u),x=k(r),g=(x.utcOffset()-this.utcOffset())*n,v=this-x,b=function(){return S.m(_,x)};switch(h){case c:f=b()/12;break;case l:f=b();break;case p:f=b()/3;break;case d:f=(v-g)/6048e5;break;case s:f=(v-g)/864e5;break;case i:f=v/t;break;case o:f=v/n;break;case a:f=v/e;break;default:f=v}return m?f:S.a(f)},x.daysInMonth=function(){return this.endOf(l).$D},x.$locale=function(){return b[this.$L]},x.locale=function(e,n){if(!e)return this.$L;var t=this.clone(),r=F(e,n,!0);return r&&(t.$L=r),t},x.clone=function(){return S.w(this.$d,this)},x.toDate=function(){return new Date(this.valueOf())},x.toJSON=function(){return this.isValid()?this.toISOString():null},x.toISOString=function(){return this.$d.toISOString()},x.toString=function(){return this.$d.toUTCString()},h}(),C=T.prototype;return k.prototype=C,[["$ms",r],["$s",a],["$m",o],["$H",i],["$W",s],["$M",l],["$y",c],["$D",u]].forEach(function(e){C[e[1]]=function(n){return this.$g(n,e[0],e[1])}}),k.extend=function(e,n){return e.$i||(e(n,T,k),e.$i=!0),k},k.locale=F,k.isDayjs=w,k.unix=function(e){return k(1e3*e)},k.en=b[v],k.Ls=b,k.p={},k}();var Pn,Ln,Hn=i(On.exports),Un={exports:{}},Bn=i(Un.exports=(Pn={year:0,month:1,day:2,hour:3,minute:4,second:5},Ln={},function(e,n,t){var r,a=function(e,n,t){void 0===t&&(t={});var r=new Date(e),a=function(e,n){void 0===n&&(n={});var t=n.timeZoneName||"short",r=e+"|"+t,a=Ln[r];return a||(a=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:t}),Ln[r]=a),a}(n,t);return a.formatToParts(r)},o=function(e,n){for(var r=a(e,n),o=[],i=0;i<r.length;i+=1){var s=r[i],d=s.type,l=s.value,p=Pn[d];p>=0&&(o[p]=parseInt(l,10))}var c=o[3],u=24===c?0:c,m=o[0]+"-"+o[1]+"-"+o[2]+" "+u+":"+o[4]+":"+o[5]+":000",f=+e;return(t.utc(m).valueOf()-(f-=f%1e3))/6e4},i=n.prototype;i.tz=function(e,n){if(void 0===e&&(e=r),!this.isValid())return this;var a,i=this.utcOffset(),s=this.toDate(),d=s.toLocaleString("en-US",{timeZone:e}),l=o(+s,e);if(Number(l)){if(a=t(d,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(l,!0),n){var p=a.utcOffset();a=a.add(i-p,"minute")}}else a=this.utcOffset(0,n);return a.$x.$timezone=e,a},i.offsetName=function(e){var n=this.$x.$timezone||t.tz.guess(),r=a(this.valueOf(),n,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return r&&r.value};var s=i.startOf;i.startOf=function(e,n){if(!this.$x||!this.$x.$timezone)return s.call(this,e,n);var r=t(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return s.call(r,e,n).tz(this.$x.$timezone,!0)},t.tz=function(e,n,a){var i=a&&n,s=a||n||r,d=o(+t(),s);if("string"!=typeof e)return t(e).tz(s);var l=t.utc(e,i).valueOf();if(Number.isNaN(l)){var p=t(NaN);return p.$x.$timezone=s,p}var c=function(e,n,t){var r=e-60*n*1e3,a=o(r,t);if(n===a)return[r,n];var i=o(r-=60*(a-n)*1e3,t);return a===i?[r,a]:[e-60*Math.min(a,i)*1e3,Math.max(a,i)]}(l,d,s),u=c[0],m=c[1],f=t(u).utcOffset(m);return f.$x.$timezone=s,f},t.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},t.tz.setDefault=function(e){r=e}})),Wn={exports:{}};Wn.exports=function(){var e="minute",n=/[+-]\d\d(?::?\d\d)?/g,t=/([+-]|\d\d)/g;return function(r,a,o){var i=a.prototype;o.utc=function(e){return new a({date:e,utc:!0,args:arguments})},i.utc=function(n){var t=o(this.toDate(),{locale:this.$L,utc:!0});return n?t.add(this.utcOffset(),e):t},i.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var s=i.parse;i.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var d=i.init;i.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else d.call(this)};var l=i.utcOffset;i.utcOffset=function(r,a){var o=this.$utils().u;if(o(r))return this.$u?0:o(this.$offset)?l.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(n);if(!r)return null;var a=(""+r[0]).match(t)||["-",0,0],o=a[0],i=60*+a[1]+ +a[2];return 0===i?0:"+"===o?i:-i}(r),null===r))return this;var i=Math.abs(r)<=16?60*r:r;if(0===i)return this.utc(a);var s=this.clone();if(a)return s.$offset=i,s.$u=!1,s;var d=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(s=this.local().add(i+d,e)).$offset=i,s.$x.$localOffset=d,s};var p=i.format;i.format=function(e){var n=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return p.call(this,n)},i.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var c=i.toDate;i.toDate=function(e){return"s"===e&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():c.call(this)};var u=i.diff;i.diff=function(e,n,t){if(e&&this.$u===e.$u)return u.call(this,e,n,t);var r=this.local(),a=o(e).local();return u.call(r,a,n,t)}}}();var $n=i(Wn.exports);Hn.extend($n),Hn.extend(Bn);var qn="preferred_date",Yn="datetime",Gn="preferred_time_zone",Vn=/^[+-]?\d/,Xn=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],Jn=/^(\d{1,2}):(\d{2})/;function Kn(e){var n=Jn.exec(e||"");if(!n)return-1;var t=Number(n[1]),r=Number(n[2]);return t>23||r>59?-1:60*t+r}function Zn(e){return e<10?"0".concat(e):"".concat(e)}function Qn(e){var n=(e%1440+1440)%1440;return"".concat(Zn(Math.floor(n/60)),":").concat(Zn(n%60))}function et(e){return"".concat(e.getFullYear(),"-").concat(Zn(e.getMonth()+1),"-").concat(Zn(e.getDate()))}var nt=["longGeneric","long"];function tt(e){if(!e)return"";for(var n=0,t=nt;n<t.length;n++){var r=t[n];try{var a=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:r}).formatToParts(new Date).find(function(e){return"timeZoneName"===e.type});if(a&&a.value)return a.value}catch(e){}}return e}function rt(e,n,t){var r=Kn(n),a=r<0?n:Qn(r),o="".concat(e,"T").concat(a);try{return Hn.tz(o,t).format()}catch(e){return Hn(o).format()}}function at(e){var n=null==e?void 0:e.timezone;if(n&&"string"==typeof n&&!Vn.test(n)){try{if(!Hn.tz("2026-01-01T00:00",n).isValid())return}catch(e){return}return n}}function ot(e){var n=Kn(e);if(n<0)return e;var t=Math.floor(n/60);return"".concat(t%12==0?12:t%12,":").concat(Zn(n%60)," ").concat(t<12?"AM":"PM")}function it(e){if(!e)return"";if(e.label)return e.label;var n=ot(e.start);return e.end?"".concat(n," - ").concat(ot(e.end)):n}function st(e){var n=null==e?void 0:e.horizonDays;return"number"==typeof n&&n>=0?n:60}function dt(e){return!!e&&"object"==typeof e&&"string"==typeof e.start}function lt(e,n,t,r){var a=n.leadTimeMinutes,o=a&&a>0?a:0,i=r.getTime()+6e4*o;return e.filter(function(e){return function(e,n,t){var r="".concat(e,"T").concat(n);try{return Hn.tz(r,t).valueOf()}catch(e){return Hn(r).valueOf()}}(t,e.start,n.timezone)>=i})}function pt(e,n,t,r,a){if(void 0===t&&(t=new Date),!e||!n||isNaN(n.getTime()))return[];var i=et(n);return function(e,n,t,r){if(r)return lt(o([],r[n]||[],!0),e,n,t);var a=function(e,n){return(e.exceptions||[]).find(function(e){return e.date===n})}(e,n);if(Array.isArray(e.offerings))return!a||a.spans&&0!==a.spans.length?lt(e.offerings,e,n,t):[];for(var i=function(e){var n=new Date("".concat(e,"T00:00:00Z"));return isNaN(n.getTime())?void 0:Xn[n.getUTCDay()]}(n),s=a?a.spans||[]:i&&(e.days||{})[i]||[],d=e.slotMinutes&&e.slotMinutes>0?e.slotMinutes:30,l=e.durationMinutes&&e.durationMinutes>0?e.durationMinutes:void 0,p=[],c=0,u=s;c<u.length;c++){var m=u[c],f=Kn(null==m?void 0:m.start),_=Kn(null==m?void 0:m.end);if(!(f<0||_<0))for(var h=f;h<_&&!(l&&h+l>_);h+=d){var x={start:Qn(h)};l&&(x.end=Qn(h+l)),p.push(x)}}return lt(p,e,n,t)}(e,i,t,r).filter(function(e){return!En(i,e.start,a)})}function ct(e,n,t,r,a){if(void 0===t&&(t=new Date),!e||!n||isNaN(n.getTime()))return!1;var o,i,s=et(n),d=st(e),l=mt(e.timezone,t),p=(o=l,i=s,Math.round((Date.parse("".concat(i,"T00:00:00Z"))-Date.parse("".concat(o,"T00:00:00Z")))/864e5));return!(p<0||p>d)&&pt(e,n,t,r,a).length>0}function ut(e,n,t,r,a){if(void 0===n&&(n=new Date),void 0===t&&(t=function(){return!1}),e)for(var o=mt(e.timezone,n),i=0;i<=st(e);i++){var s=Hn("".concat(o,"T00:00:00")).add(i,"day").toDate();if(ct(e,s,n,r,a)&&!t(s))return s}}function mt(e,n){try{return Hn(n).tz(e).format("YYYY-MM-DD")}catch(e){return et(n)}}var ft=["step-nomatch","step-nomatchaggregator","step-no-match-financing","step-payPerCallNoneAvailable"];function _t(e){var n=e.querySelectorAll('[id^="step-"]');if(0===n.length)return"empty";for(var t=!1,r=0;r<n.length;r++){var a=n[r].id;if(-1!==ft.indexOf(a))return"no_coverage";if("step-loading"!==a)return"rendered";t=!0}return t?"loading":"empty"}var ht="data-xapp-external-widget-origin";function xt(e,r){void 0===r&&(r={});var a=r.onRendered,o=r.onNoRender,i=r.onError,s=r.onFallback,d=n.useState("pending"),l=d[0],p=d[1],c=n.useState(0),u=c[0],m=c[1],f=n.useRef(!1),_=n.useRef(!1),h=n.useRef(0),x=n.useRef(!1),g=n.useRef(r);return g.current=r,n.useEffect(function(){var n;if(e){var r=function(e){if(!e)return"unknown";try{return new URL(e).hostname}catch(e){return"unknown"}}(e.scriptSrc),d=t({},e.config);if(e.successCallbackKey){var l=e.successCallbackKey;d[l]=function(e){var n,t;if(_.current)return h.current+=1,se("[ExternalWidget] Suppressed repeat ".concat(l," fire ")+"#".concat(h.current," from ").concat(r),e),void m(h.current);_.current=!0,null===(t=(n=g.current).onScheduled)||void 0===t||t.call(n,r,e)}}if(window[e.configGlobal]=d,!f.current){f.current=!0;var c=function(n,t){x.current||(x.current=!0,p(n),null==t||t(),"rendered"!==n&&e.fallbackStep&&(null==s||s(e.fallbackStep)))};if(!function(e){try{return"https:"===new URL(e).protocol}catch(e){return!1}}(e.scriptSrc))return se("[ExternalWidget] Rejected script URL from unexpected origin: ".concat(e.scriptSrc)),void c("error",function(){return null==i?void 0:i(r)});var u,v,b,y=document.getElementById(e.anchorId),w=null!==(n=e.renderTimeoutMs)&&void 0!==n?n:8e3,F=0,k=function(){return c("no_render",function(){return null==o?void 0:o(r)})},S=function(e){if(!e)return!1;var n=_t(e);return"rendered"===n?(c("rendered",function(){return null==a?void 0:a(r)}),!0):"no_coverage"===n&&(k(),!0)},T=function(){if(!x.current){var n=document.getElementById(e.anchorId);if(!S(n))return n&&"loading"===_t(n)&&F<3?(F+=1,void(u=setTimeout(T,w))):void k()}};S(y)||(y&&(v=new MutationObserver(function(){S(document.getElementById(e.anchorId))})).observe(y,{childList:!0,subtree:!0}),u=setTimeout(T,w));try{b=new URL(e.scriptSrc).origin}catch(n){b=e.scriptSrc}if(!document.querySelector("script[".concat(ht,'="').concat(b,'"]'))){var C=document.createElement("script");C.src=e.cacheBust?"".concat(e.scriptSrc).concat(e.scriptSrc.includes("?")?"&":"?","v=").concat(Date.now()):e.scriptSrc,C.setAttribute(ht,b),C.onerror=function(){se("[ExternalWidget] Failed to load script: ".concat(e.scriptSrc)),c("error",function(){return null==i?void 0:i(r)})},document.body.appendChild(C)}return function(){u&&clearTimeout(u),null==v||v.disconnect()}}}},[e]),{outcome:l,suppressedScheduledCount:u}}var gt={xapp_select_option:"FormFieldSelect-module_xapp_select_option__m-RaK",xapp_select_label:"FormFieldSelect-module_xapp_select_label__U70Ur",xapp_checkbox_select:"FormFieldSelect-module_xapp_checkbox_select__QccWu",xapp_select_input:"FormFieldSelect-module_xapp_select_input__UcGaw",xapp_select_icon:"FormFieldSelect-module_xapp_select_icon__BgEGq",xapp_select_helper:"FormFieldSelect-module_xapp_select_helper__T4Eyt",xapp_select_container:"FormFieldSelect-module_xapp_select_container__HWy4J",xapp_select_title_container:"FormFieldSelect-module_xapp_select_title_container__tnfQy"};ge("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.FormFieldSelect-module_xapp_select_option__m-RaK {\n display: inline-flex;\n align-items: center;\n vertical-align: middle;\n margin: 0 16px 0 -10px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n}\n\n.FormFieldSelect-module_xapp_select_label__U70Ur {\n font-family: var(--xapp-form-widget-checkbox-font-family, var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif));\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.5;\n letter-spacing: 0.00938em;\n}\n\n.FormFieldSelect-module_xapp_checkbox_select__QccWu {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n box-sizing: border-box;\n flex-shrink: 0;\n margin: 6px 0 !important;\n font-size: var(--xapp-form-widget-checkbox-font-size, 14px) !important;\n font-family: var(--xapp-form-widget-checkbox-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif)) !important;\n color: var(--xapp-form-widget-checkbox-color, #000000) !important;\n padding: 8px 10px !important;\n height: 32px !important;\n}\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormFieldSelect-module_xapp_checkbox_select__QccWu {\n height: 44px !important;\n }\n}\n\n.FormFieldSelect-module_xapp_select_input__UcGaw {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n margin: 0 !important;\n padding: 0 !important;\n opacity: 0;\n z-index: 1;\n cursor: inherit;\n -webkit-appearance: none;\n appearance: none;\n}\n\n.FormFieldSelect-module_xapp_select_icon__BgEGq {\n font-size: 24px;\n flex-shrink: 0;\n border-radius: 2px;\n}\n\n.FormFieldSelect-module_xapp_select_input__UcGaw:focus-visible + .FormFieldSelect-module_xapp_select_icon__BgEGq {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n\n.FormFieldSelect-module_xapp_select_helper__T4Eyt {\n margin: 3px 14px 0 !important;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif);\n font-size: 0.75rem !important;\n font-weight: 400;\n line-height: 1.66 !important;\n letter-spacing: 0.03333em;\n text-align: left;\n color: #d32f2f !important;\n}\n\n.FormFieldSelect-module_xapp_select_container__HWy4J {\n display: flex;\n flex-wrap: wrap; /* Allows items to wrap onto a new row */\n justify-content: center; /* Centers items horizontally */\n}\n\n.FormFieldSelect-module_xapp_select_title_container__tnfQy {\n text-align: center; /* Keeps the title over the centered options */\n}\n.FormFieldSelect-module_xapp_select_title_container__tnfQy p {\n font-family: var(--xapp-form-widget-checkbox-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n color: var(--xapp-form-widget-checkbox-color, #000000);\n}\n.FormFieldSelect-module_xapp_select_title_container__empty__zC4gk p {\n margin: 0;\n}");var vt=function(r){var a=r.field,i=r.onFieldChange,s=r.errorMessage,d=n.useState([]),l=d[0],p=d[1],c=n.useState(""),u=c[0],m=c[1],f=function(e){var n=e.target,t=n.name,r=n.checked;p(function(e){return r?o(o([],e,!0),[t],!1):e.filter(function(e){return e!==t})})},_=function(e){m(e.target.value)},h="xapp-select-".concat(n.useId()),x="".concat(h,"-title"),g="".concat(h,"-helper-text"),v=!!s;return n.useEffect(function(){a.radio?i(a.name,u?[u]:[]):i(a.name,l)},[l,u,a.name,a.radio,i]),e.jsxs("div",{style:t({},a.style),children:[e.jsx("div",{className:"".concat(gt.xapp_select_title_container).concat(a.title?"":"__empty"),children:e.jsx("p",{id:x,children:a.title})}),e.jsx("div",{className:gt.xapp_select_container,role:a.radio?"radiogroup":"group","aria-invalid":a.radio&&v||void 0,"aria-labelledby":a.title?x:void 0,"aria-describedby":v?g:void 0,children:a.items.map(function(n){var t=a.radio?u===n.id:l.includes(n.id),r=a.radio?t?Ye:Ge:t?$e:qe;return e.jsxs("label",{className:gt.xapp_select_option,children:[e.jsxs("span",{className:"".concat(gt.xapp_checkbox_select," ").concat(t?gt.xapp_checkbox_select_checked:""),children:[a.radio?e.jsx("input",{type:"radio",className:gt.xapp_select_input,name:a.name,value:n.id,checked:t,onChange:_}):e.jsx("input",{type:"checkbox",className:gt.xapp_select_input,name:n.id,checked:t,onChange:f,"aria-invalid":v||void 0}),e.jsx(r,{className:gt.xapp_select_icon})]}),e.jsx("span",{className:gt.xapp_select_label,children:n.label})]},n.id)})}),s&&e.jsx("p",{id:g,className:gt.xapp_select_helper,children:s})]})},bt={xapp_form_card:"FormFieldCard-module_xapp_form_card__AcVAf",xapp_form_card_body:"FormFieldCard-module_xapp_form_card_body__vuEht",xapp_form_card_header:"FormFieldCard-module_xapp_form_card_header__SS1vk",xapp_form_card_header_title:"FormFieldCard-module_xapp_form_card_header_title__xZzN5",xapp_form_card_header_subheader:"FormFieldCard-module_xapp_form_card_header_subheader__zOL4x",xapp_form_card_media:"FormFieldCard-module_xapp_form_card_media__o6A6S",xapp_form_card_content:"FormFieldCard-module_xapp_form_card_content__xk0qq",xapp_form_card_text:"FormFieldCard-module_xapp_form_card_text__L-a2X",xapp_form_card_text_h1:"FormFieldCard-module_xapp_form_card_text_h1__YgA4Z",xapp_form_card_text_h2:"FormFieldCard-module_xapp_form_card_text_h2__Tx0rO",xapp_form_card_text_h3:"FormFieldCard-module_xapp_form_card_text_h3__Js1Op",xapp_form_card_text_h4:"FormFieldCard-module_xapp_form_card_text_h4__9yry6",xapp_form_card_text_h5:"FormFieldCard-module_xapp_form_card_text_h5__toyJR",xapp_form_card_text_h6:"FormFieldCard-module_xapp_form_card_text_h6__0-eii",xapp_form_card_text_subtitle1:"FormFieldCard-module_xapp_form_card_text_subtitle1__NANlV",xapp_form_card_text_subtitle2:"FormFieldCard-module_xapp_form_card_text_subtitle2__MYx4s",xapp_form_card_text_body1:"FormFieldCard-module_xapp_form_card_text_body1__mLBa1",xapp_form_card_text_body2:"FormFieldCard-module_xapp_form_card_text_body2__LVGQo",xapp_form_card_text_inherit:"FormFieldCard-module_xapp_form_card_text_inherit__v3d-Y",xapp_form_card_text_button:"FormFieldCard-module_xapp_form_card_text_button__2t1tt",xapp_form_card_text_caption:"FormFieldCard-module_xapp_form_card_text_caption__GcGFA",xapp_form_card_text_overline:"FormFieldCard-module_xapp_form_card_text_overline__ial1O"};ge(".FormFieldCard-module_xapp_form_card__AcVAf img {\n width: 50% !important;\n}\n\n.FormFieldCard-module_xapp_form_card_body__vuEht {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n border-radius: 4px;\n background-color: transparent;\n font-family: var(--xapp-form-widget-card-font-family, var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif));\n}\n\n.FormFieldCard-module_xapp_form_card_header__SS1vk {\n display: flex;\n flex-direction: column;\n padding: 16px;\n font-family: inherit;\n}\n\n.FormFieldCard-module_xapp_form_card_header_title__xZzN5 {\n display: block;\n font-size: 1.5rem;\n font-weight: 400;\n line-height: 1.334;\n color: var(--xapp-form-widget-card-color, rgba(0, 0, 0, 0.87));\n}\n\n.FormFieldCard-module_xapp_form_card_header_subheader__zOL4x {\n display: block;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.5;\n color: rgba(0, 0, 0, 0.6);\n}\n\n.FormFieldCard-module_xapp_form_card_media__o6A6S {\n display: block;\n object-fit: cover;\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n}\n\n.FormFieldCard-module_xapp_form_card_content__xk0qq {\n padding: 4px;\n}\n\n.FormFieldCard-module_xapp_form_card_text__L-a2X {\n margin: 0;\n font-family: inherit;\n}\n\n.FormFieldCard-module_xapp_form_card_text_h1__YgA4Z {\n font-size: 6rem;\n font-weight: 300;\n line-height: 1.167;\n letter-spacing: -0.01562em;\n}\n\n.FormFieldCard-module_xapp_form_card_text_h2__Tx0rO {\n font-size: 3.75rem;\n font-weight: 300;\n line-height: 1.2;\n letter-spacing: -0.00833em;\n}\n\n.FormFieldCard-module_xapp_form_card_text_h3__Js1Op {\n font-size: 3rem;\n font-weight: 400;\n line-height: 1.167;\n letter-spacing: 0;\n}\n\n.FormFieldCard-module_xapp_form_card_text_h4__9yry6 {\n font-size: 2.125rem;\n font-weight: 400;\n line-height: 1.235;\n letter-spacing: 0.00735em;\n}\n\n.FormFieldCard-module_xapp_form_card_text_h5__toyJR {\n font-size: 1.5rem;\n font-weight: 400;\n line-height: 1.334;\n letter-spacing: 0;\n}\n\n.FormFieldCard-module_xapp_form_card_text_h6__0-eii {\n font-size: 1.25rem;\n font-weight: 500;\n line-height: 1.6;\n letter-spacing: 0.0075em;\n}\n\n.FormFieldCard-module_xapp_form_card_text_subtitle1__NANlV {\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.75;\n letter-spacing: 0.00938em;\n}\n\n.FormFieldCard-module_xapp_form_card_text_subtitle2__MYx4s {\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1.57;\n letter-spacing: 0.00714em;\n}\n\n.FormFieldCard-module_xapp_form_card_text_body1__mLBa1 {\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.5;\n letter-spacing: 0.00938em;\n}\n\n.FormFieldCard-module_xapp_form_card_text_body2__LVGQo {\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 1.43;\n letter-spacing: 0.01071em;\n}\n\n.FormFieldCard-module_xapp_form_card_text_inherit__v3d-Y {\n font: inherit;\n letter-spacing: inherit;\n}\n\n.FormFieldCard-module_xapp_form_card_text_button__2t1tt {\n display: block;\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1.75;\n letter-spacing: 0.02857em;\n text-transform: uppercase;\n}\n\n.FormFieldCard-module_xapp_form_card_text_caption__GcGFA {\n display: block;\n font-size: 0.75rem;\n font-weight: 400;\n line-height: 1.66;\n letter-spacing: 0.03333em;\n}\n\n.FormFieldCard-module_xapp_form_card_text_overline__ial1O {\n display: block;\n font-size: 0.75rem;\n font-weight: 400;\n line-height: 2.66;\n letter-spacing: 0.08333em;\n text-transform: uppercase;\n}");var yt={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p",button:"span",caption:"span",overline:"span"},wt={primary:"#1976d2",secondary:"#9c27b0",error:"#d32f2f",warning:"#ed6c02",info:"#0288d1",success:"#2e7d32",textPrimary:"rgba(0, 0, 0, 0.87)",textSecondary:"rgba(0, 0, 0, 0.6)",textDisabled:"rgba(0, 0, 0, 0.38)","text.primary":"rgba(0, 0, 0, 0.87)","text.secondary":"rgba(0, 0, 0, 0.6)","text.disabled":"rgba(0, 0, 0, 0.38)"};var Ft=function(n){var r,a=n.field,o=a.variant&&yt[a.variant]?a.variant:"body2",i=yt[o];return e.jsx("div",{className:bt.xapp_form_card,children:e.jsxs("div",{className:bt.xapp_form_card_body,children:[a.header&&e.jsxs("div",{className:bt.xapp_form_card_header,children:[e.jsx("span",{className:bt.xapp_form_card_header_title,children:a.header.title}),a.header.subheader&&e.jsx("span",{className:bt.xapp_form_card_header_subheader,children:a.header.subheader})]}),a.media&&e.jsx("img",{className:bt.xapp_form_card_media,src:a.media.imageUrl,alt:a.media.alt,height:a.media.height,width:a.media.width}),a.text&&e.jsx("div",{className:bt.xapp_form_card_content,children:e.jsx(i,{className:"".concat(bt.xapp_form_card_text," ").concat(bt["xapp_form_card_text_".concat(o)]||""),"data-variant":o,style:t({whiteSpace:"pre-line",textAlign:a.align||"center",color:(r=a.color||"textSecondary",wt[r]||r)},a.style),children:a.text})})]})})},kt="FormFieldChips-module_xapp_checkbox_chip__8DRkb",St="FormFieldChips-module_xapp_chip_label__Yua52",Tt="FormFieldChips-module_xapp_chip_link__yhO-O",Ct="FormFieldChips-module_xapp_chip_icon__Awxmc",Dt="FormFieldChips-module_xapp_chips_helper__2gCIL",Rt="FormFieldChips-module_xapp_chip_clicked__S8xmo",Nt="FormFieldChips-module_xapp_chips_container__ZITF5",It="FormFieldChips-module_xapp_chip_wrapper__AGfKl",At="FormFieldChips-module_xapp_chips_title_container__VGw77";function Mt(e){return!!e&&!e.url}ge("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.FormFieldChips-module_xapp_checkbox_chip__8DRkb {\n display: inline-flex !important;\n align-items: center;\n justify-content: center;\n position: relative;\n box-sizing: border-box !important;\n max-width: 100%;\n vertical-align: middle;\n white-space: nowrap;\n border: 0 !important;\n outline: 0;\n line-height: 1.5 !important;\n text-transform: none !important;\n text-decoration: none !important;\n letter-spacing: normal;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n margin: 6px !important;\n font-size: var(--xapp-form-widget-chips-font-size, 0.875em) !important;\n font-family: var(--xapp-form-widget-chips-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif)) !important;\n padding: 8px 16px !important;\n height: 32px !important;\n border-radius: var(--xapp-form-widget-border-radius-lg, 16px) !important;\n min-width: 130px !important;\n background-color: var(--xapp-form-widget-chips-background-color, #c4dced) !important;\n color: var(--xapp-form-widget-chips-color, #000000) !important;\n cursor: pointer;\n transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out, transform 150ms ease-in-out !important;\n}\n.FormFieldChips-module_xapp_checkbox_chip__8DRkb:hover {\n box-shadow: var(--xapp-form-widget-box-shadow-subtle, 0 2px 8px rgba(0, 0, 0, 0.08)) !important;\n transform: translateY(-1px);\n}\n.FormFieldChips-module_xapp_checkbox_chip__8DRkb:active {\n transform: scale(0.98) !important;\n}\n.FormFieldChips-module_xapp_checkbox_chip__8DRkb:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n box-shadow: none !important;\n transform: none !important;\n}\n.FormFieldChips-module_xapp_checkbox_chip__8DRkb:focus {\n outline: none;\n}\n.FormFieldChips-module_xapp_checkbox_chip__8DRkb:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormFieldChips-module_xapp_checkbox_chip__8DRkb {\n min-width: 100px !important;\n font-size: 16px !important;\n height: 44px !important;\n }\n}\n\n.FormFieldChips-module_xapp_chip_label__Yua52 {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n padding-left: 4px;\n padding-right: 4px;\n font-family: var(--xapp-form-widget-chips-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif)) !important;\n}\n\n.FormFieldChips-module_xapp_chip_link__yhO-O .FormFieldChips-module_xapp_chip_label__Yua52 {\n text-decoration: underline;\n}\n\n.FormFieldChips-module_xapp_chip_icon__Awxmc {\n flex-shrink: 0;\n font-size: 1.5rem;\n margin-left: 5px;\n margin-right: -6px;\n}\n\n.FormFieldChips-module_xapp_chips_helper__2gCIL {\n margin: 3px 14px 0 !important;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif);\n font-size: 0.75rem !important;\n font-weight: 400;\n line-height: 1.66 !important;\n letter-spacing: 0.03333em;\n text-align: left;\n color: #d32f2f !important;\n}\n\n.FormFieldChips-module_xapp_chip_clicked__S8xmo {\n background-color: var(--xapp-form-widget-chips-background-color-selected, var(--xapp-form-widget-chips-background-color-dark, #6e7ae1)) !important;\n color: var(--xapp-form-widget-chips-color-selected, #ffffff) !important;\n box-shadow: 0 2px 8px rgba(110, 122, 225, 0.3) !important;\n}\n\n.FormFieldChips-module_xapp_chips_container__ZITF5 {\n display: flex;\n width: 100%;\n flex-wrap: wrap;\n justify-content: center;\n}\n\n.FormFieldChips-module_xapp_chip_wrapper__AGfKl {\n flex: 0 0 calc(33.33% - 10px);\n margin: 0 2px;\n text-align: center;\n}\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormFieldChips-module_xapp_chip_wrapper__AGfKl {\n margin: 0 2px;\n }\n}\n\n.FormFieldChips-module_xapp_chips_title_container__VGw77 {\n margin: inherit;\n}\n.FormFieldChips-module_xapp_chips_title_container__VGw77 p {\n font-family: var(--xapp-form-widget-chips-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n font-size: 1.25em;\n font-weight: 600;\n line-height: 1.3;\n}\n.FormFieldChips-module_xapp_chips_title_container__empty__5seHa p {\n margin: 10px 0;\n}");var jt=function(r){var a=r.field,i=r.onFieldChange,s=r.errorMessage,d=r.value,l=r.disabledItemIds,p=d||r.field.items.filter(Mt).filter(function(e){return e.selected}).map(function(e){return e.id}),c=n.useState(p),u=c[0],m=c[1],f=(l||[]).join(",");n.useEffect(function(){var e=f?f.split(","):[];e.length>0&&m(function(n){var t=n.filter(function(n){return!e.includes(n)});return t.length===n.length?n:t})},[f]);var _="xapp-chips-".concat(n.useId()),h="".concat(_,"-title"),x="".concat(_,"-helper-text");return n.useEffect(function(){"function"==typeof i&&i(a.name,u)},[u,a.name,i]),e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignContent:"center",alignItems:"center"},children:[e.jsx("div",{className:"".concat(At).concat(a.title?"":"__empty"),style:t({},a.style),children:e.jsx("p",{id:h,children:a.title})}),e.jsx("div",{className:Nt,role:"group","aria-labelledby":a.title?h:void 0,"aria-describedby":s?x:void 0,children:a.items.map(function(n,t){var r=u.includes(n.id),i=!!(null==l?void 0:l.includes(n.id)),s="".concat(kt," ").concat(r?Rt:""),d=e.jsxs(e.Fragment,{children:[r&&e.jsx(We,{className:Ct}),e.jsx("span",{className:St,children:n.label})]});return Mt(n)?e.jsx("div",{className:It,children:e.jsx("button",{type:"button","aria-pressed":r,disabled:i,onClick:function(){return function(e){if(!(null==l?void 0:l.includes(e))){var n=u.includes(e);a.radio?m(function(t){return n?[]:[e]}):m(function(t){return n?t.filter(function(n){return n!==e}):o(o([],t,!0),[e],!1)})}}(n.id)},className:s,children:d})},t):function(e){return!!e.url}(n)?e.jsx("div",{className:It,children:e.jsx("a",{href:n.url,className:"".concat(s," ").concat(Tt),children:d})},t):e.jsx(e.Fragment,{})})}),s&&e.jsx("p",{id:x,className:Dt,children:s})]})},Et={PHONE:{type:"tel",inputMode:"tel",autoComplete:"tel"},EMAIL:{type:"email",inputMode:"email",autoComplete:"email"},ZIP_CODE:{type:"text",inputMode:"numeric",autoComplete:"postal-code"},ADDRESS:{type:"text",inputMode:"text",autoComplete:"street-address"}},zt={type:"text",inputMode:"text"},Ot={name:"name",fullname:"name",yourname:"name",customername:"name",contactname:"name",firstname:"given-name",fname:"given-name",givenname:"given-name",lastname:"family-name",lname:"family-name",surname:"family-name",familyname:"family-name",email:"email",emailaddress:"email",phone:"tel",phonenumber:"tel",telephone:"tel",tel:"tel",mobile:"tel",mobilephone:"tel",cellphone:"tel",zip:"postal-code",zipcode:"postal-code",postalcode:"postal-code",postcode:"postal-code",address:"street-address",streetaddress:"street-address",street:"street-address",city:"address-level2",town:"address-level2",state:"address-level1",province:"address-level1",company:"organization",companyname:"organization",organization:"organization",business:"organization",businessname:"organization"};function Pt(e){var n=e.format,r=e.name,a=e.isLastField,o=n?Et[n]:void 0,i=a?"done":"next";if(o)return t(t({},o),{enterKeyHint:i});var s=function(e){if(e)return Ot[e.toLowerCase().replace(/[^a-z0-9]/g,"")]}(r);return t(t({},zt),s?{autoComplete:s,enterKeyHint:i}:{enterKeyHint:i})}var Lt={xapp_text_input_container__title:"FormFieldTextInput-module_xapp_text_input_container__title__zeqDT",xapp_text_input_container__field:"FormFieldTextInput-module_xapp_text_input_container__field__B5K33",xapp_text_input_counter:"FormFieldTextInput-module_xapp_text_input_counter__oSgo1","xapp_text_input_counter--limit":"FormFieldTextInput-module_xapp_text_input_counter--limit__59Lau",xapp_text_input_text:"FormFieldTextInput-module_xapp_text_input_text__3rHVn",xapp_text_input_root:"FormFieldTextInput-module_xapp_text_input_root__LhuLl",xapp_text_input_focused:"FormFieldTextInput-module_xapp_text_input_focused__TMVDB",xapp_text_input_error:"FormFieldTextInput-module_xapp_text_input_error__t0djn",xapp_text_input_control:"FormFieldTextInput-module_xapp_text_input_control__GO3Jw",xapp_text_input_label:"FormFieldTextInput-module_xapp_text_input_label__mNAse",xapp_text_input_asterisk:"FormFieldTextInput-module_xapp_text_input_asterisk__sODty",xapp_text_input_helper:"FormFieldTextInput-module_xapp_text_input_helper__scKZk"};ge('/**\n * The phone breakpoint.\n *\n * Width alone cannot express "phone". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step\'s action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field\'s helper / error line. The metrics are MUI\'s FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.FormFieldTextInput-module_xapp_text_input_container__title__zeqDT p {\n margin: 0;\n font-family: var(--xapp-form-widget-text-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n}\n.FormFieldTextInput-module_xapp_text_input_container__field__B5K33 {\n position: relative;\n}\n\n.FormFieldTextInput-module_xapp_text_input_counter__oSgo1 {\n position: absolute;\n right: 36px;\n bottom: 8px;\n font-size: 12px;\n color: #666;\n font-family: var(--xapp-form-widget-text-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n transition: color 200ms ease-in-out;\n}\n.FormFieldTextInput-module_xapp_text_input_counter--limit__59Lau {\n color: #d32f2f;\n font-weight: 500;\n}\n\n.FormFieldTextInput-module_xapp_text_input_text__3rHVn {\n display: inline-flex;\n flex-direction: column;\n position: relative;\n width: 100%;\n min-width: 0;\n margin: 16px 0 8px;\n padding: 0;\n border: 0;\n box-sizing: border-box;\n vertical-align: top;\n}\n\n.FormFieldTextInput-module_xapp_text_input_root__LhuLl {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n box-sizing: border-box;\n font-family: var(--xapp-form-widget-text-font-family, var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif));\n font-size: 1rem;\n line-height: 1.4375em;\n cursor: text;\n}\n.FormFieldTextInput-module_xapp_text_input_root__LhuLl::before, .FormFieldTextInput-module_xapp_text_input_root__LhuLl::after {\n display: var(--xapp-form-widget-text-underline-display, block) !important;\n content: "";\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n}\n.FormFieldTextInput-module_xapp_text_input_root__LhuLl::before {\n border-bottom: 1px solid rgba(0, 0, 0, 0.42);\n transition: border-bottom-color 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n}\n.FormFieldTextInput-module_xapp_text_input_root__LhuLl::after {\n border-bottom: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n transform: scaleX(0);\n transition: transform 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;\n}\n.FormFieldTextInput-module_xapp_text_input_root__LhuLl:hover::before {\n border-bottom-color: rgba(0, 0, 0, 0.87);\n}\n\n.FormFieldTextInput-module_xapp_text_input_focused__TMVDB::after {\n transform: scaleX(1);\n}\n\n.FormFieldTextInput-module_xapp_text_input_error__t0djn .FormFieldTextInput-module_xapp_text_input_root__LhuLl::before, .FormFieldTextInput-module_xapp_text_input_error__t0djn .FormFieldTextInput-module_xapp_text_input_root__LhuLl::after {\n border-bottom-color: #d32f2f;\n}\n.FormFieldTextInput-module_xapp_text_input_error__t0djn .FormFieldTextInput-module_xapp_text_input_root__LhuLl::after {\n transform: scaleX(1);\n}\n\n.FormFieldTextInput-module_xapp_text_input_control__GO3Jw {\n display: block;\n min-width: 0;\n padding: 21px 12px 4px 12px !important;\n border: var(--xapp-form-widget-text-border-width, 0) solid var(--xapp-form-widget-text-border-color, transparent) !important;\n background-color: var(--xapp-form-widget-text-background-color, rgba(0, 0, 0, 0.06)) !important;\n border-radius: var(--xapp-form-widget-border-radius-sm, 8px) var(--xapp-form-widget-border-radius-sm, 8px) var(--xapp-form-widget-text-bottom-radius, 0) var(--xapp-form-widget-text-bottom-radius, 0) !important;\n transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out !important;\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87)) !important;\n font-size: var(--xapp-form-widget-text-font-size, 1rem) !important;\n font-family: var(--xapp-form-widget-text-font-family, var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif)) !important;\n line-height: 1.4375em !important;\n letter-spacing: inherit;\n height: auto !important;\n min-height: 0 !important;\n width: 100% !important;\n max-width: 100% !important;\n box-sizing: border-box !important;\n margin: 0 !important;\n margin-bottom: 0 !important;\n border-width: var(--xapp-form-widget-text-border-width, 0) !important;\n border-style: solid !important;\n box-shadow: none;\n -webkit-appearance: none !important;\n appearance: none !important;\n}\n.FormFieldTextInput-module_xapp_text_input_control__GO3Jw::placeholder {\n color: currentColor;\n opacity: 0.42;\n transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n}\n.FormFieldTextInput-module_xapp_text_input_control__GO3Jw[data-shrink=false]::placeholder {\n opacity: 0 !important;\n}\n.FormFieldTextInput-module_xapp_text_input_control__GO3Jw:hover {\n background-color: var(--xapp-form-widget-text-background-color-dark, rgba(0, 0, 0, 0.09)) !important;\n border-color: var(--xapp-form-widget-text-border-color-focus, var(--xapp-form-widget-text-border-color, transparent)) !important;\n}\n.FormFieldTextInput-module_xapp_text_input_control__GO3Jw:focus {\n background-color: var(--xapp-form-widget-text-background-color-dark, rgba(0, 0, 0, 0.09)) !important;\n border-color: var(--xapp-form-widget-text-border-color-focus, var(--xapp-form-widget-text-border-color, transparent)) !important;\n outline: none !important;\n box-shadow: inset 0 0 0 2px var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54)) !important;\n}\n\ntextarea.FormFieldTextInput-module_xapp_text_input_control__GO3Jw {\n resize: none;\n overflow: auto;\n}\n\n.FormFieldTextInput-module_xapp_text_input_label__mNAse {\n position: absolute !important;\n left: 0;\n top: 0;\n z-index: 1;\n display: block;\n max-width: calc(100% - 24px);\n margin: 0 !important;\n padding: 0 !important;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n pointer-events: none;\n transform-origin: top left;\n transform: translate(12px, 13px) scale(1) !important;\n transition: color 200ms cubic-bezier(0, 0, 0.2, 1) 0ms, transform 200ms cubic-bezier(0, 0, 0.2, 1) 0ms !important;\n color: rgba(0, 0, 0, 0.6);\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif) !important;\n font-size: 1rem !important;\n font-weight: 400 !important;\n line-height: 1.4375em !important;\n letter-spacing: 0.00938em;\n}\n.FormFieldTextInput-module_xapp_text_input_label__mNAse[data-shrink=true] {\n max-width: calc(133% - 24px);\n transform: translate(12px, 4px) scale(0.75) !important;\n}\n.FormFieldTextInput-module_xapp_text_input_focused__TMVDB .FormFieldTextInput-module_xapp_text_input_label__mNAse {\n color: var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n}\n.FormFieldTextInput-module_xapp_text_input_error__t0djn .FormFieldTextInput-module_xapp_text_input_label__mNAse {\n color: #d32f2f;\n}\n\n.FormFieldTextInput-module_xapp_text_input_error__t0djn .FormFieldTextInput-module_xapp_text_input_asterisk__sODty {\n color: #d32f2f;\n}\n\n.FormFieldTextInput-module_xapp_text_input_helper__scKZk {\n margin: 3px 14px 0 !important;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif);\n font-size: 0.75rem !important;\n font-weight: 400;\n line-height: 1.66 !important;\n letter-spacing: 0.03333em;\n text-align: left;\n color: #d32f2f !important;\n}');var Ht=function(r){var a=r.field,o=r.onFieldChange,i=r.value,s=r.errorMessage,d=r.required,l=r.isLastField,p=n.useState(i||""),c=p[0],u=p[1],m=n.useState(!1),f=m[0],_=m[1],h="xapp-text-".concat(n.useId()),x="".concat(h,"-helper-text"),g=n.useRef(null);n.useEffect(function(){o(a.name,c)},[a.name,o,c]),n.useEffect(function(){u(i||"")},[i]);var v=!!a.multiline&&!a.rows;n.useLayoutEffect(function(){var e=g.current;if(v&&e){e.style.height="auto";var n=parseFloat(getComputedStyle(e).lineHeight)||0,t=a.rowsMax&&n?n*a.rowsMax:1/0,r=Math.min(e.scrollHeight,t);r>0&&(e.style.height="".concat(r,"px"))}},[v,a.rowsMax,c]);var b=a.maxLength,y=c.length,w=void 0!==b&&y>=b,F=void 0!==b&&y>=.8*b,k=Pt({format:a.format,name:a.name,isLastField:l}),S=k.type,T=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)n.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(t[r[a]]=e[r[a]])}return t}(k,["type"]),C=f||c.length>0||!a.label,D=t(t({},T),{id:h,name:a.name,className:Lt.xapp_text_input_control,placeholder:a.placeholder,value:c,onChange:function(e){var n=e.target.value;u(n)},onFocus:function(){return _(!0)},onBlur:function(){return _(!1)},required:d,maxLength:a.maxLength||void 0,"aria-invalid":!!s,"aria-describedby":s?x:void 0,"data-shrink":C?"true":"false"});return e.jsxs("div",{className:Lt.xapp_text_input_container,children:[a.title&&e.jsx("div",{className:Lt.xapp_text_input_container__title,children:e.jsx("p",{children:a.title})}),e.jsxs("div",{className:Lt.xapp_text_input_container__field,children:[e.jsxs("div",{className:"".concat(Lt.xapp_text_input_text," ").concat(s?Lt.xapp_text_input_error:""),style:a.style,children:[e.jsxs("div",{className:"".concat(Lt.xapp_text_input_root," ").concat(f?Lt.xapp_text_input_focused:""," ").concat(a.multiline?Lt.xapp_text_input_multiline:""),children:[a.label&&e.jsxs("label",{htmlFor:h,className:Lt.xapp_text_input_label,"data-shrink":C?"true":"false",children:[a.label,d&&e.jsx("span",{className:Lt.xapp_text_input_asterisk,"aria-hidden":"true",children:" *"})]}),a.multiline?e.jsx("textarea",t({},D,{ref:g,rows:a.rows||1})):e.jsx("input",t({},D,{type:S}))]}),s&&e.jsx("p",{id:x,className:Lt.xapp_text_input_helper,children:s})]}),F&&e.jsxs("div",{className:"".concat(Lt.xapp_text_input_counter," ").concat(w?Lt["xapp_text_input_counter--limit"]:""),children:[y,"/",b]})]})]})},Ut="FormFieldDropdown-module_xapp_dropdown_container__4oRlr",Bt="FormFieldDropdown-module_xapp_dropdown_control__Dbrih",Wt="FormFieldDropdown-module_xapp_dropdown_select__CH-Gc",$t="FormFieldDropdown-module_xapp_dropdown_arrow__hX1wc",qt="FormFieldDropdown-module_xapp_dropdown_outline__fxBhy",Yt="FormFieldDropdown-module_xapp_dropdown_label__chOkA",Gt="FormFieldDropdown-module_xapp_dropdown_error__-pG-B",Vt="FormFieldDropdown-module_xapp_dropdown_helper__uYy73",Xt="FormFieldDropdown-module_xapp_dropdown_free_form__h8qhc",Jt="FormFieldDropdown-module_xapp_dropdown_free_form_input__Fc7Ow";ge("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.FormFieldDropdown-module_xapp_dropdown_container__4oRlr {\n margin-top: 20px;\n margin-bottom: 20px;\n}\n\n.FormFieldDropdown-module_xapp_dropdown_control__Dbrih {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n box-sizing: border-box;\n border-radius: 4px;\n background-color: var(--xapp-form-widget-dropdown-background-color, transparent);\n}\n\n.FormFieldDropdown-module_xapp_dropdown_select__CH-Gc {\n display: block;\n width: 100% !important;\n max-width: 100% !important;\n height: auto !important;\n min-height: 1.4375em;\n box-sizing: border-box !important;\n margin: 0 !important;\n padding: 8.5px 32px 8.5px 14px !important;\n border: 0 !important;\n border-radius: 4px;\n outline: 0;\n background: transparent none !important;\n box-shadow: none !important;\n -webkit-appearance: none !important;\n -moz-appearance: none !important;\n appearance: none !important;\n cursor: pointer;\n color: var(--xapp-form-widget-dropdown-color, rgba(0, 0, 0, 0.87)) !important;\n font-size: var(--xapp-form-widget-dropdown-font-size, 14px);\n font-family: var(--xapp-form-widget-dropdown-font-family, var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif));\n line-height: 1.4375em !important;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormFieldDropdown-module_xapp_dropdown_select__CH-Gc {\n font-size: var(--xapp-form-widget-dropdown-font-size-mobile, 16px);\n }\n}\n\n.FormFieldDropdown-module_xapp_dropdown_arrow__hX1wc {\n position: absolute;\n right: 7px;\n top: calc(50% - 0.5em);\n font-size: 24px;\n color: rgba(0, 0, 0, 0.54);\n pointer-events: none;\n}\n\n.FormFieldDropdown-module_xapp_dropdown_outline__fxBhy {\n position: absolute;\n inset: -5px 0 0;\n margin: 0 !important;\n padding: 0 8px !important;\n min-width: 0;\n border: 1px solid rgba(0, 0, 0, 0.23) !important;\n border-radius: inherit;\n text-align: left;\n overflow: hidden;\n pointer-events: none;\n}\n.FormFieldDropdown-module_xapp_dropdown_outline__fxBhy legend {\n float: unset;\n display: block;\n width: auto;\n max-width: 100%;\n height: 11px;\n margin: 0 !important;\n padding: 0 !important;\n border: 0 !important;\n font-size: 0.75em;\n visibility: hidden;\n white-space: nowrap;\n}\n.FormFieldDropdown-module_xapp_dropdown_outline__fxBhy legend > span {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n opacity: 0;\n}\n\n.FormFieldDropdown-module_xapp_dropdown_control__Dbrih:hover .FormFieldDropdown-module_xapp_dropdown_outline__fxBhy {\n border-color: rgba(0, 0, 0, 0.87) !important;\n}\n\n.FormFieldDropdown-module_xapp_dropdown_control__Dbrih:focus-within .FormFieldDropdown-module_xapp_dropdown_outline__fxBhy {\n border: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54)) !important;\n}\n\n.FormFieldDropdown-module_xapp_dropdown_label__chOkA {\n position: absolute !important;\n left: 0;\n top: 0;\n z-index: 1;\n max-width: calc(133% - 32px);\n margin: 0 !important;\n padding: 0 !important;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n pointer-events: none;\n transform-origin: top left;\n transform: translate(14px, -9px) scale(0.75) !important;\n color: rgba(0, 0, 0, 0.6);\n font-family: var(--xapp-form-widget-dropdown-font-family, var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif));\n font-size: 1rem !important;\n font-weight: 400;\n line-height: 1.4375em;\n letter-spacing: 0.00938em;\n}\n.FormFieldDropdown-module_xapp_dropdown_control__Dbrih:focus-within .FormFieldDropdown-module_xapp_dropdown_label__chOkA {\n color: var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n}\n\n.FormFieldDropdown-module_xapp_dropdown_error__-pG-B .FormFieldDropdown-module_xapp_dropdown_outline__fxBhy, .FormFieldDropdown-module_xapp_dropdown_error__-pG-B:hover .FormFieldDropdown-module_xapp_dropdown_outline__fxBhy, .FormFieldDropdown-module_xapp_dropdown_error__-pG-B:focus-within .FormFieldDropdown-module_xapp_dropdown_outline__fxBhy {\n border-color: #d32f2f !important;\n}\n.FormFieldDropdown-module_xapp_dropdown_error__-pG-B .FormFieldDropdown-module_xapp_dropdown_label__chOkA, .FormFieldDropdown-module_xapp_dropdown_error__-pG-B:focus-within .FormFieldDropdown-module_xapp_dropdown_label__chOkA {\n color: #d32f2f;\n}\n\n.FormFieldDropdown-module_xapp_dropdown_helper__uYy73 {\n margin: 3px 14px 0 !important;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif);\n font-size: 0.75rem !important;\n font-weight: 400;\n line-height: 1.66 !important;\n letter-spacing: 0.03333em;\n text-align: left;\n color: #d32f2f !important;\n}\n\n.FormFieldDropdown-module_xapp_dropdown_free_form__h8qhc {\n margin-top: 8px;\n}\n\n.FormFieldDropdown-module_xapp_dropdown_free_form_input__Fc7Ow {\n display: block;\n width: 100% !important;\n max-width: 100% !important;\n height: auto !important;\n box-sizing: border-box !important;\n margin: 0 !important;\n padding: 8.5px 14px !important;\n border: 1px solid rgba(0, 0, 0, 0.23) !important;\n border-radius: 4px !important;\n background: var(--xapp-form-widget-dropdown-background-color, transparent) !important;\n box-shadow: none !important;\n color: var(--xapp-form-widget-dropdown-color, rgba(0, 0, 0, 0.87)) !important;\n font-size: var(--xapp-form-widget-dropdown-font-size, 14px);\n font-family: var(--xapp-form-widget-dropdown-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n line-height: 1.4375em !important;\n -webkit-appearance: none;\n appearance: none;\n}\n.FormFieldDropdown-module_xapp_dropdown_free_form_input__Fc7Ow:hover {\n border-color: rgba(0, 0, 0, 0.87) !important;\n}\n.FormFieldDropdown-module_xapp_dropdown_free_form_input__Fc7Ow:focus {\n outline: 0;\n border: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54)) !important;\n padding: 7.5px 13px !important;\n}\n.FormFieldDropdown-module_xapp_dropdown_free_form_input__Fc7Ow.FormFieldDropdown-module_xapp_dropdown_error__-pG-B {\n border-color: #d32f2f !important;\n}\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormFieldDropdown-module_xapp_dropdown_free_form_input__Fc7Ow {\n font-size: var(--xapp-form-widget-dropdown-font-size-mobile, 16px);\n }\n}");var Kt=function(t){var r=t.field,a=t.onFieldChange,o=t.errorMessage,i=t.required,s=t.freeFormErrorMessage,d="".concat(r.name,"-helper-text"),l="".concat(r.name,"-free-form"),p="".concat(l,"-helper-text"),c=n.useState(function(){var e=r.items.find(function(e){return e.selected});return(null==e?void 0:e.id)||"none"}),u=c[0],m=c[1],f=n.useState(""),_=f[0],h=f[1],x=n.useState(function(){var e=r.items.find(function(e){return e.selected});return(null==e?void 0:e.freeFormInput)||!1}),g=x[0],v=x[1],b=n.useRef(a);n.useEffect(function(){"development"===process.env.NODE_ENV&&b.current!==a&&console.warn("FormFieldDropdown: onFieldChange prop is not memoized. This may cause performance issues. Please wrap it in useCallback in the parent component."),b.current=a},[a]);var y=n.useMemo(function(){if(g){var e=r.items.find(function(e){return e.id===u});return(null==e?void 0:e.freeFormFieldName)||"message"}return null},[g,u,r.items]);return n.useEffect(function(){"none"!==u&&a(r.name,u),g&&_&&y&&a(y,_)},[u,_,g,r.name,y,a]),e.jsxs("div",{className:Ut,children:[e.jsxs("div",{className:"".concat(Bt," ").concat(o?Gt:""),children:[e.jsxs("label",{htmlFor:r.name,className:Yt,children:[r.title,i&&e.jsx("span",{"aria-hidden":"true",children:" *"})]}),e.jsxs("select",{className:Wt,name:r.name,id:r.name,value:u,onChange:function(e){var n=e.target.value,t=r.items.find(function(e){return e.id===u});m(n);var o=r.items.find(function(e){return e.id===n});if(o&&o.freeFormInput)v(!0);else if(v(!1),(null==t?void 0:t.freeFormInput)&&_){var i=(null==t?void 0:t.freeFormFieldName)||"message";h(""),a(i,"")}},required:i,"aria-invalid":!!o,"aria-describedby":o?d:void 0,children:[e.jsx("option",{value:"none",children:"Select an option"}),r.items.map(function(n){return e.jsx("option",{value:n.id,children:n.label},n.id)})]}),e.jsx(Ve,{className:$t}),e.jsx("fieldset",{"aria-hidden":"true",className:qt,children:e.jsx("legend",{children:e.jsxs("span",{children:[r.title,i&&" *"]})})})]}),o&&e.jsx("p",{id:d,className:Vt,children:o}),g&&e.jsxs("div",{className:Xt,children:[e.jsx("input",{type:"text",id:l,className:"".concat(Jt," ").concat(s?Gt:""),required:!0,placeholder:"Please specify","aria-label":"Please specify",value:_,onChange:function(e){h(e.target.value)},maxLength:r.maxLength||void 0,"aria-invalid":!!s,"aria-describedby":s?p:void 0}),s&&e.jsx("p",{id:p,className:Vt,children:s})]})]})},Zt="Calendar-module_xapp_calendar__g0vk4",Qt="Calendar-module_xapp_calendar_header__rpFZl",er="Calendar-module_xapp_calendar_label__JueKy",nr="Calendar-module_xapp_calendar_nav__RRUAJ",tr="Calendar-module_xapp_calendar_nav_button__NTU0D",rr="Calendar-module_xapp_calendar_week__7Ouri",ar="Calendar-module_xapp_calendar_weeks__EdB4Q",or="Calendar-module_xapp_calendar_skeleton__yL-4v",ir="Calendar-module_xapp_calendar_weekday__NzfbO",sr="Calendar-module_xapp_calendar_day__Lb9-E",dr="Calendar-module_xapp_calendar_day_outside__4XT5w",lr="Calendar-module_xapp_calendar_day_today__uclpX",pr="Calendar-module_xapp_calendar_day_selected__qi4gk",cr="Calendar-module_xapp_calendar_filler__8Rf7z",ur="Calendar-module_xapp_calendar_skeleton_day__yJl4Q";ge("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n/* The month calendar that replaced @mui/x-date-pickers' DateCalendar (#1745).\n *\n * The metrics are MUI's own - a 320px calendar, 36px round days with a 2px gap, a 40px header -\n * so an unthemed calendar looks as it did. Box properties carry !important where a host page's\n * `button { ... }` rules would otherwise reach in: the widget is embedded on sites we do not\n * control, and MUI's emotion styles used to win those fights for us. */\n.Calendar-module_xapp_calendar__g0vk4 {\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: 320px;\n max-width: 100%;\n margin: 0 auto;\n color: var(--xapp-form-widget-date-color, rgba(0, 0, 0, 0.87));\n font-family: var(--xapp-form-widget-date-font-family, var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif));\n}\n\n.Calendar-module_xapp_calendar_header__rpFZl {\n display: flex;\n align-items: center;\n min-height: 40px;\n max-height: 40px;\n margin: 12px 0 4px;\n padding: 0 12px 0 24px;\n}\n\n.Calendar-module_xapp_calendar_label__JueKy {\n flex: 1 1 auto;\n margin-right: auto;\n font-family: inherit;\n font-size: 1rem;\n font-weight: 500;\n line-height: 1.75;\n letter-spacing: 0.00938em;\n}\n\n.Calendar-module_xapp_calendar_nav__RRUAJ {\n display: flex;\n}\n\n.Calendar-module_xapp_calendar_nav_button__NTU0D {\n appearance: none;\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 0 !important;\n min-height: 0 !important;\n padding: 0 !important;\n border: 0 !important;\n background-image: none !important;\n box-shadow: none !important;\n font-family: inherit;\n text-transform: none;\n cursor: pointer;\n width: 40px !important;\n height: 40px !important;\n border-radius: 50% !important;\n background-color: transparent !important;\n color: rgba(0, 0, 0, 0.54) !important;\n font-size: 1.5rem;\n}\n.Calendar-module_xapp_calendar_nav_button__NTU0D:hover:not(:disabled) {\n background-color: rgba(0, 0, 0, 0.04) !important;\n}\n.Calendar-module_xapp_calendar_nav_button__NTU0D:disabled {\n color: rgba(0, 0, 0, 0.26) !important;\n cursor: default;\n}\n.Calendar-module_xapp_calendar_nav_button__NTU0D:focus {\n outline: none;\n}\n.Calendar-module_xapp_calendar_nav_button__NTU0D:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n\n.Calendar-module_xapp_calendar_week__7Ouri {\n display: flex;\n justify-content: center;\n align-items: center;\n margin: 2px 0;\n}\n\n.Calendar-module_xapp_calendar_weeks__EdB4Q,\n.Calendar-module_xapp_calendar_skeleton__yL-4v {\n min-height: 240px;\n}\n\n.Calendar-module_xapp_calendar_weekday__NzfbO {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 40px;\n margin: 0 2px;\n color: rgba(0, 0, 0, 0.6);\n font-size: 0.75rem;\n font-weight: 400;\n line-height: 1.66;\n letter-spacing: 0.03333em;\n text-align: center;\n}\n\n.Calendar-module_xapp_calendar_day__Lb9-E {\n appearance: none;\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 0 !important;\n min-height: 0 !important;\n padding: 0 !important;\n border: 0 !important;\n background-image: none !important;\n box-shadow: none !important;\n font-family: inherit;\n text-transform: none;\n cursor: pointer;\n width: 36px !important;\n height: 36px !important;\n margin: 0 2px !important;\n border-radius: 50% !important;\n background-color: transparent !important;\n color: inherit !important;\n font-size: 0.75rem;\n font-weight: 400;\n line-height: 1.66;\n letter-spacing: 0.03333em;\n transition: background-color 200ms ease-in-out;\n}\n.Calendar-module_xapp_calendar_day__Lb9-E:hover:not(:disabled) {\n background-color: rgba(25, 118, 210, 0.04) !important;\n}\n.Calendar-module_xapp_calendar_day__Lb9-E:disabled {\n color: rgba(0, 0, 0, 0.38) !important;\n cursor: default;\n}\n.Calendar-module_xapp_calendar_day__Lb9-E:focus {\n outline: none;\n}\n.Calendar-module_xapp_calendar_day__Lb9-E:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n\n.Calendar-module_xapp_calendar_day_outside__4XT5w {\n color: rgba(0, 0, 0, 0.6) !important;\n}\n\n.Calendar-module_xapp_calendar_day_today__uclpX:not(.Calendar-module_xapp_calendar_day_selected__qi4gk) {\n border: 1px solid rgba(0, 0, 0, 0.6) !important;\n}\n\n.Calendar-module_xapp_calendar_day_selected__qi4gk {\n background-color: var(--xapp-form-widget-date-background-color-selected, #1976d2) !important;\n color: #ffffff !important;\n font-weight: 500;\n}\n.Calendar-module_xapp_calendar_day_selected__qi4gk:hover:not(:disabled) {\n background-color: var(--xapp-form-widget-date-background-color-selected, #1976d2) !important;\n}\n\n.Calendar-module_xapp_calendar_filler__8Rf7z {\n width: 36px;\n height: 36px;\n margin: 0 2px;\n}\n\n.Calendar-module_xapp_calendar_skeleton_day__yJl4Q {\n width: 36px;\n height: 36px;\n margin: 0 2px;\n border-radius: 50%;\n background-color: rgba(0, 0, 0, 0.11);\n animation: Calendar-module_xapp_calendar_pulse__LTQW7 2s ease-in-out 0.5s infinite;\n}\n\n@keyframes Calendar-module_xapp_calendar_pulse__LTQW7 {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.4;\n }\n 100% {\n opacity: 1;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .Calendar-module_xapp_calendar_skeleton_day__yJl4Q {\n animation: none;\n }\n}\n/* Phones: 44x44 days, weekday labels and month arrows (WCAG 2.5.8, Apple's HIG). Date selection\n * is the most expensive mis-tap in this funnel. Seven 44px columns only fit the 320px calendar\n * once the 2px side gaps go, so the gap goes rather than the cell. */\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .Calendar-module_xapp_calendar_day__Lb9-E {\n width: 44px !important;\n height: 44px !important;\n margin: 0 !important;\n font-size: 0.875rem;\n }\n .Calendar-module_xapp_calendar_weekday__NzfbO {\n width: 44px;\n height: 44px;\n margin: 0;\n }\n .Calendar-module_xapp_calendar_filler__8Rf7z,\n .Calendar-module_xapp_calendar_skeleton_day__yJl4Q {\n width: 44px;\n height: 44px;\n margin: 0;\n }\n .Calendar-module_xapp_calendar_nav_button__NTU0D {\n width: 44px !important;\n height: 44px !important;\n }\n .Calendar-module_xapp_calendar_weeks__EdB4Q,\n .Calendar-module_xapp_calendar_skeleton__yL-4v {\n min-height: 288px;\n }\n}");function mr(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.filter(function(e){return!!e}).join(" ")}var fr=function(t){var r=t.value,a=t.onChange,o=t.shouldDisableDate,i=t.minDate,s=t.maxDate,d=t.referenceDate,l=t.loading,p=t.showDaysOutsideCurrentMonth,c=t.fixedWeekNumber,u=t.getDayClassName,m=t.classes,f=void 0===m?{}:m,_=t.className,h=n.useMemo(function(){return(t.today||Hn()).startOf("day")},[t.today?t.today.format("YYYY-MM-DD"):void 0]),x=n.useId(),g=n.useRef(null),v=n.useRef(!1),b=n.useState(function(){return(r||d||h).startOf("month")}),y=b[0],w=b[1],F=n.useState(function(){return(r||h).startOf("day")}),k=F[0],S=F[1],T=r?r.format("YYYY-MM-DD"):void 0;n.useEffect(function(){r&&(S(r.startOf("day")),w(function(e){return r.isSame(e,"month")?e:r.startOf("month")}))},[T]);var C=n.useCallback(function(e){return!!i&&e.isBefore(i,"day")||!!s&&e.isAfter(s,"day")},[i,s]),D=n.useCallback(function(e){return C(e)||!!o&&o(e)},[C,o]),R=n.useCallback(function(e,n,t){for(var r=e.isBefore(n,"day")?n:e.isAfter(t,"day")?t:e,a=t.diff(n,"day"),o=0;o<=a;o++)for(var i=0,s=[r.add(-o,"day"),r.add(o,"day")];i<s.length;i++){var d=s[i];if(!d.isBefore(n,"day")&&!d.isAfter(t,"day")&&!D(d))return d}},[D]),N=n.useMemo(function(){return k.isSame(y,"month")&&!D(k)?k:R(k,y.startOf("month"),y.endOf("month").startOf("day"))},[k,y,D,R]);n.useEffect(function(){var e;if(v.current){v.current=!1;var n=String(k.valueOf()),t=null===(e=g.current)||void 0===e?void 0:e.querySelector('[data-timestamp="'.concat(n,'"]'));null==t||t.focus()}},[k,y]);var I=function(e,n){for(var t=e,r=0;r<366;r+=Math.abs(n)){if(t=t.add(n,"day"),C(t))return;if(!D(t))return t}},A=function(e,n){var t=e.add(n,"month");return R(t,t.startOf("month"),t.endOf("month").startOf("day"))},M=function(e,n){var t;switch(e.key){case"ArrowLeft":t=I(n,-1);break;case"ArrowRight":t=I(n,1);break;case"ArrowUp":t=I(n,-7);break;case"ArrowDown":t=I(n,7);break;case"Home":case"End":var r="Home"===e.key?n.startOf("week"):n.endOf("week").startOf("day");p||r.isSame(n,"month")||(r="Home"===e.key?n.startOf("month"):n.endOf("month").startOf("day")),t=function(e,n){for(var t=n.isBefore(e,"day")?-1:1,r=Math.abs(n.diff(e,"day")),a=0;a<=r;a++){var o=e.add(a*t,"day");if(!D(o))return o}}(r,n);break;case"PageUp":t=A(n,-1);break;case"PageDown":t=A(n,1);break;default:return}e.preventDefault(),t&&!t.isSame(n,"day")&&function(e){v.current=!0,S(e),e.isSame(y,"month")||w(e.startOf("month"))}(t)},j=!!i&&!y.isAfter(i,"month"),E=!!s&&!y.isBefore(s,"month"),z=n.useMemo(function(){return function(e,n){var t=e.startOf("month"),r=Math.ceil((t.day()+t.daysInMonth())/7),a=Math.max(r,n||0),o=t.startOf("week");return Array.from({length:a},function(e,n){return Array.from({length:7},function(e,t){return o.add(7*n+t,"day")})})}(y,c)},[y,c]),O=z[0];return e.jsxs("div",{className:mr(Zt,_),"data-xapp-calendar":"",children:[e.jsxs("div",{className:mr(Qt,f.header),children:[e.jsx("span",{"aria-live":"polite",className:er,id:x,children:y.format("MMMM YYYY")}),e.jsxs("div",{className:nr,children:[e.jsx("button",{"aria-label":"Previous month",className:tr,disabled:j,onClick:function(){return w(y.add(-1,"month"))},type:"button",children:e.jsx(Xe,{})}),e.jsx("button",{"aria-label":"Next month",className:tr,disabled:E,onClick:function(){return w(y.add(1,"month"))},type:"button",children:e.jsx(Je,{})})]})]}),e.jsxs("div",{"aria-busy":!!l||void 0,"aria-labelledby":x,ref:g,role:"grid",children:[e.jsx("div",{className:rr,role:"row",children:O.map(function(n){return e.jsx("span",{"aria-label":n.format("dddd"),className:mr(ir,f.weekday),role:"columnheader",children:n.format("dd").charAt(0)},n.day())})}),l?e.jsx("div",{"aria-hidden":"true",className:or,children:z.map(function(n,t){return e.jsx("div",{className:rr,children:n.map(function(n){return e.jsx("span",{className:ur},n.valueOf())})},t)})}):e.jsx("div",{className:mr(ar,f.weeks),role:"rowgroup",children:z.map(function(n,t){return e.jsx("div",{className:rr,role:"row",children:n.map(function(n){var t=!n.isSame(y,"month");if(t&&!p)return e.jsx("span",{className:cr,role:"gridcell"},n.valueOf());var o=D(n),i=!!r&&n.isSame(r,"day"),s=n.isSame(h,"day");return e.jsx("button",{"aria-current":s?"date":void 0,"aria-label":n.format("dddd, MMMM D, YYYY"),"aria-selected":i,className:mr(sr,f.day,i&&pr,i&&f.daySelected,s&&lr,s&&f.dayToday,t&&dr,u&&u(n,o)),"data-timestamp":n.valueOf(),disabled:o,onClick:function(){return function(e){S(e),e.isSame(y,"month")||w(e.startOf("month")),a(e)}(n)},onKeyDown:function(e){return M(e,n)},role:"gridcell",tabIndex:N&&n.isSame(N,"day")?0:-1,type:"button",children:n.date()},n.valueOf())})},t)})})]})]})};function _r(e){if(e){var n=e.split(",").map(function(e){return e.trim()}).filter(function(e){return!!e});return n.length>0?n:void 0}}function hr(e,n){if(!n||0===n.length)return!1;var t=e.format("YYYY-MM-DD"),r=e.format("dddd");return n.some(function(e){return xr(t,e)||xr(r,e)})}function xr(e,n){var t=n.split("*").map(gr).join(".*");return new RegExp("^".concat(t,"$")).test(e)}function gr(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function vr(e,n){return Array.isArray(n.availableDays)&&n.availableDays.length>0?n.availableDays.map(function(e){return e.toLowerCase()}).includes(e.format("dddd").toLowerCase()):0!==e.day()&&6!==e.day()}var br="FormFieldDate-module_xapp_date_picker_container__d8LYB",yr="FormFieldDate-module_xapp_date_picker__Rvtj1",wr="FormFieldDate-module_xapp_date_picker_header__-IdYL",Fr="FormFieldDate-module_xapp_date_picker_weekday__G7-Zs",kr="FormFieldDate-module_xapp_date_picker_weeks__GeGSq",Sr="FormFieldDate-module_xapp_date_picker_day__NFNvS",Tr="FormFieldDate-module_xapp_date_picker_day_today__mxuN9",Cr="FormFieldDate-module_xapp_date_picker_past__ECo-S",Dr="FormFieldDate-module_xapp_date_picker_available__2Xtlu",Rr="FormFieldDate-module_xapp_date_picker_day_selected__10ZGY",Nr="FormFieldDate-module_xapp_date_picker_loading__z6hMR",Ir="FormFieldDate-module_xapp_date_picker_error__GFfVJ";ge("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.FormFieldDate-module_xapp_date_picker_container__d8LYB {\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n font-family: var(--xapp-form-widget-date-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n}\n\n/* The compact look this field has always shipped with, now on the shared Calendar (#1745).\n *\n * Until #1745 these rules targeted MUI's class names. The published bundle keeps CSS-module\n * names unchanged, so there they matched and drew 30px days tinted by availability; Storybook\n * hashes the names, so it never showed them. The Calendar's parts carry these classes directly\n * now, so both builds draw the production look.\n *\n * Each rule is scoped under `.xapp_date_picker` so it outranks the Calendar's own rule for the\n * same part whichever order the two stylesheets load in. */\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_header__-IdYL {\n margin-top: 10px;\n margin-bottom: 4px;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_weekday__G7-Zs {\n width: 30px;\n height: 32px;\n font-weight: 600;\n font-size: 0.75rem;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_weeks__GeGSq {\n min-height: 200px;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_day__NFNvS {\n width: 30px !important;\n height: 30px !important;\n font-weight: 600;\n font-size: 0.75rem;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_day__NFNvS:hover:not(:disabled) {\n background-color: #cfd8da !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_day__NFNvS:disabled {\n font-weight: 300;\n text-decoration: line-through;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_day_today__mxuN9 {\n font-weight: bold;\n color: #321aa3 !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_past__ECo-S {\n background-color: rgba(48, 49, 53, 0.2392156863) !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_available__2Xtlu {\n background-color: rgba(0, 255, 21, 0.1607843137) !important;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_day_selected__10ZGY {\n background-color: var(--xapp-form-widget-date-background-color-selected, #1976d2) !important;\n color: #fff !important;\n font-weight: 600;\n}\n.FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_day_selected__10ZGY:hover:not(:disabled) {\n background-color: var(--xapp-form-widget-date-background-color-selected, #1976d2) !important;\n}\n\n.FormFieldDate-module_xapp_date_picker_loading__z6hMR {\n margin: 3px 14px 0 !important;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif);\n font-size: 0.75rem !important;\n font-weight: 400;\n line-height: 1.66 !important;\n letter-spacing: 0.03333em;\n text-align: left;\n color: #d32f2f !important;\n margin: 14px 0 -14px 98px !important;\n color: inherit !important;\n}\n\n.FormFieldDate-module_xapp_date_picker_error__GFfVJ {\n margin: 3px 14px 0 !important;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif);\n font-size: 0.75rem !important;\n font-weight: 400;\n line-height: 1.66 !important;\n letter-spacing: 0.03333em;\n text-align: left;\n color: #d32f2f !important;\n margin: 14px 0 -14px 14px !important;\n}\n\n/* Mobile: 44x44 tappable day cells.\n *\n * Date selection is the most expensive mis-tap in this funnel - the visitor either books the\n * wrong day or gives up - and the 30px cells above are under the 44x44 that Apple's HIG and\n * WCAG 2.5.8 ask for. Seven 44px columns fit the 320px calendar once the 2px side margins go,\n * hence dropping the gap rather than the cell. */\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_day__NFNvS {\n width: 44px !important;\n height: 44px !important;\n margin: 0 !important;\n font-size: 0.875rem;\n }\n .FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_weekday__G7-Zs {\n width: 44px;\n height: 44px;\n margin: 0;\n }\n .FormFieldDate-module_xapp_date_picker__Rvtj1 .FormFieldDate-module_xapp_date_picker_weeks__GeGSq {\n min-height: 264px;\n }\n}");var Ar={blockWeekends:!0,blockCurrentDay:!0,blockNextBusinessDays:2},Mr=function(t){var r=Hn().add(2,"month"),a=Hn(),o=t.field,i=t.onFieldChange,s=t.errorMessage,d=t.busyDays,l=t.loading,p=t.blockedDate,c=n.useState(),u=c[0],m=c[1];n.useEffect(function(){i(o.name,u)},[u,o.name,i]);var f=_r(d),_=n.useCallback(function(e){if(p&&e.format("YYYY-MM-DD")===p)return!0;if(!f)return function(e,n,t){if(n.blockWeekends&&(0===e.day()||6===e.day()))return!0;if(n.blockCurrentDay&&e.isSame(t,"day"))return!0;if(n.blockNextBusinessDays){for(var r=t,a=0,o=0;a<n.blockNextBusinessDays&&o<366;)o++,vr(r=r.add(1,"day"),n)&&a++;if(e.isBefore(r,"day"))return!0}return!!(n.currentDayAvailableUntil&&e.isSame(t,"day")&&t.format("HH:mm")>n.currentDayAvailableUntil)||!(!(Array.isArray(n.availableDays)&&n.availableDays.length>0)||n.availableDays.map(function(e){return e.toLowerCase()}).includes(e.format("dddd").toLowerCase()))}(e,Object.keys((null==o?void 0:o.defaultBusyDays)||{}).length>0?o.defaultBusyDays||{}:Ar,a);try{return hr(e,f)}catch(e){console.error("shouldDisableDate: ".concat(e))}return!1},[a,f,o.defaultBusyDays,p]);return e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignContent:"center",alignItems:"center"},children:[e.jsx("div",{className:br,children:e.jsx(fr,{className:yr,classes:{header:wr,weekday:Fr,weeks:kr,day:Sr,daySelected:Rr,dayToday:Tr},fixedWeekNumber:6,getDayClassName:function(e,n){var t=e.isBefore(a,"day"),o=e.isAfter(r,"day");return t||o?Cr:n?void 0:Dr},loading:l,maxDate:r,minDate:a,onChange:function(e){m(e)},shouldDisableDate:_,showDaysOutsideCurrentMonth:!0,today:a,value:u})}),l&&e.jsx("p",{className:Nr,children:"Getting latest availability..."}),!l&&s&&e.jsx("p",{className:Ir,children:s})]})},jr=/^\d{4}-\d{2}-\d{2}/;function Er(e){if(!e)return"";if("string"==typeof e&&jr.test(e))return e.slice(0,10);var n=e instanceof Date?e:new Date(e);return isNaN(n.getTime())?"":n.toISOString().slice(0,10)}var zr=function(r){var a,o,i=r.field,s=r.onFieldChange,d=r.value,l=r.errorMessage,p=r.required,c=r.isLastField,u=Er((null==d?void 0:d.from)||(null===(a=i.preselecteDates)||void 0===a?void 0:a.from)),m=Er((null==d?void 0:d.to)||(null===(o=i.preselecteDates)||void 0===o?void 0:o.to)),f=n.useState({from:u,to:m}),_=f[0],h=f[1];n.useEffect(function(){h({from:u,to:m})},[u,m]);var x=function(e){h(e),s(i.name,e.from||e.to?e:void 0)},g="".concat(i.name,"-from"),v="".concat(i.name,"-to");return e.jsxs("div",{style:i.style,children:[i.title&&e.jsx("h2",{children:i.title}),e.jsx("label",{htmlFor:g,children:"From"}),e.jsx("input",{id:g,name:g,type:"date",value:_.from,onChange:function(e){x(t(t({},_),{from:e.target.value}))},max:_.to||void 0,required:p,enterKeyHint:"next"}),e.jsx("label",{htmlFor:v,children:"To"}),e.jsx("input",{id:v,name:v,type:"date",value:_.to,onChange:function(e){x(t(t({},_),{to:e.target.value}))},min:_.from||void 0,required:p,enterKeyHint:c?"done":"next"}),l&&e.jsx("p",{children:l})]})},Or="FormFieldDateTime-module_xapp_datetime__rPNwE",Pr="FormFieldDateTime-module_xapp_datetime_title__VNHwW",Lr="FormFieldDateTime-module_xapp_datetime_body__ta9Ui",Hr="FormFieldDateTime-module_xapp_datetime_calendar__Ge5W6",Ur="FormFieldDateTime-module_xapp_datetime_times_column__UY7ho",Br="FormFieldDateTime-module_xapp_datetime_timezone__ZE56Q",Wr="FormFieldDateTime-module_xapp_datetime_times__rhU-O",$r="FormFieldDateTime-module_xapp_datetime_group__CeL-E",qr="FormFieldDateTime-module_xapp_datetime_time__x5lxl",Yr="FormFieldDateTime-module_xapp_datetime_time_selected__IRT84",Gr="FormFieldDateTime-module_xapp_datetime_message__4rf-S",Vr="FormFieldDateTime-module_xapp_datetime_error__bTyZK";ge("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.FormFieldDateTime-module_xapp_datetime__rPNwE {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n font-family: var(--xapp-form-widget-date-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n}\n\n.FormFieldDateTime-module_xapp_datetime_title__VNHwW {\n margin: 0 0 8px;\n font-family: inherit;\n font-size: 1rem;\n text-align: center;\n}\n\n/* Calendar and column side by side on a wide enough viewport.\n *\n * `flex-wrap` rather than a fixed two-column grid: the pair has to be allowed to fall\n * onto two rows rather than force the step to scroll sideways, which is the failure the\n * mobile rule below would otherwise only fix at the breakpoint. */\n.FormFieldDateTime-module_xapp_datetime_body__ta9Ui {\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n align-items: flex-start;\n gap: 16px;\n width: 100%;\n}\n\n.FormFieldDateTime-module_xapp_datetime_calendar__Ge5W6 {\n flex: 0 0 auto;\n}\n\n/* The zone notice and the column travel together, so the sizing the column used to own\n * lives here now - the column itself keeps only the scrolling, which the notice must\n * stay outside of or it scrolls away from the times it describes. */\n.FormFieldDateTime-module_xapp_datetime_times_column__UY7ho {\n flex: 1 1 160px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 0;\n max-width: 240px;\n}\n\n.FormFieldDateTime-module_xapp_datetime_timezone__ZE56Q {\n margin: 0;\n padding: 0 4px;\n font-size: var(--xapp-form-widget-date-font-size, 14px);\n text-align: left;\n}\n\n/* A column of buttons rather than chips: a half-hour schedule produces 16 or more\n * offerings and chips wrap into an unreadable block past a handful. */\n.FormFieldDateTime-module_xapp_datetime_times__rhU-O {\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 0;\n max-height: 320px;\n overflow-y: auto;\n padding: 4px;\n}\n\n.FormFieldDateTime-module_xapp_datetime_group__CeL-E {\n position: sticky;\n top: 0;\n z-index: 1;\n margin: 4px 0 0;\n padding: 4px 0;\n background-color: #ffffff;\n font-family: inherit;\n font-size: var(--xapp-form-widget-date-font-size, 14px);\n font-weight: 600;\n text-align: left;\n}\n\n.FormFieldDateTime-module_xapp_datetime_time__x5lxl {\n flex: 0 0 auto;\n min-height: 44px;\n padding: 8px 12px;\n border: 1px solid var(--xapp-form-widget-chips-background-color, #c4dced);\n border-radius: var(--xapp-form-widget-border-radius-sm, 8px);\n background-color: transparent;\n /* Not $form-chips-color: that is the chips' FOREGROUND, authored to sit on the filled\n * chip background. This button is transparent, so a theme whose chips are dark with\n * white text - the common case - renders white on white and the times vanish. The\n * body text colour is the one that belongs on the form's own background. */\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87));\n font-family: var(--xapp-form-widget-chips-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n font-size: var(--xapp-form-widget-chips-font-size, 0.875em);\n font-weight: 600;\n cursor: pointer;\n transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out, transform 150ms ease-in-out;\n}\n.FormFieldDateTime-module_xapp_datetime_time__x5lxl:hover {\n background-color: var(--xapp-form-widget-chips-background-color, #c4dced);\n /* Background and foreground move together: whenever the chip background is\n * applied, the colour the theme paired with it applies too. */\n color: var(--xapp-form-widget-chips-color, #000000);\n box-shadow: var(--xapp-form-widget-box-shadow-subtle, 0 2px 8px rgba(0, 0, 0, 0.08));\n}\n.FormFieldDateTime-module_xapp_datetime_time__x5lxl:active {\n transform: scale(0.98);\n}\n.FormFieldDateTime-module_xapp_datetime_time__x5lxl:focus {\n outline: none;\n}\n.FormFieldDateTime-module_xapp_datetime_time__x5lxl:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormFieldDateTime-module_xapp_datetime_time__x5lxl {\n font-size: 16px;\n }\n}\n\n.FormFieldDateTime-module_xapp_datetime_time_selected__IRT84 {\n border-color: var(--xapp-form-widget-chips-background-color-selected, var(--xapp-form-widget-chips-background-color-dark, #6e7ae1));\n background-color: var(--xapp-form-widget-chips-background-color-selected, var(--xapp-form-widget-chips-background-color-dark, #6e7ae1));\n color: var(--xapp-form-widget-chips-color-selected, #ffffff);\n}\n.FormFieldDateTime-module_xapp_datetime_time_selected__IRT84:hover {\n background-color: var(--xapp-form-widget-chips-background-color-selected, var(--xapp-form-widget-chips-background-color-dark, #6e7ae1));\n}\n\n.FormFieldDateTime-module_xapp_datetime_message__4rf-S {\n margin: 8px 0;\n font-size: var(--xapp-form-widget-date-font-size, 14px);\n text-align: center;\n}\n\n.FormFieldDateTime-module_xapp_datetime_error__bTyZK {\n margin: 3px 14px 0 !important;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif);\n font-size: 0.75rem !important;\n font-weight: 400;\n line-height: 1.66 !important;\n letter-spacing: 0.03333em;\n text-align: left;\n color: #d32f2f !important;\n margin-top: 14px !important;\n}\n\n/* Stacked, with the column under the calendar and given room to scroll on its own. */\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormFieldDateTime-module_xapp_datetime_body__ta9Ui {\n flex-direction: column;\n align-items: center;\n }\n .FormFieldDateTime-module_xapp_datetime_times_column__UY7ho {\n width: 100%;\n max-width: 320px;\n }\n .FormFieldDateTime-module_xapp_datetime_times__rhU-O {\n max-height: 260px;\n }\n}");var Xr="Appointment times",Jr="Times shown in";function Kr(e){return"".concat(e.start,"|").concat(e.end||"")}var Zr=function(t){var r=t.field,a=t.onFieldChange,o=t.errorMessage,i=t.value,s=t.required,d=t.busyDays,l=t.offeringsByDate,p=t.nextBusinessDayBlock,c=t.preselectFirstAvailable,u=r.schedule,m=n.useMemo(function(){return t.now||new Date},[t.now]),f=n.useState(function(){return(null==i?void 0:i.date)?Hn("".concat(i.date,"T00:00:00")):void 0}),_=f[0],h=f[1],x=n.useState(function(){return i?Kr(i):void 0}),g=x[0],v=x[1],b=n.useMemo(function(){return _?pt(u,_.toDate(),m,l,p):[]},[u,_,m,l,p]),y=n.useMemo(function(){return b.find(function(e){return Kr(e)===g})},[b,g]),w=n.useMemo(function(){if(_&&y){var e,n,t=et(_.toDate()),r={date:t,label:it(y),start:y.start,datetime:rt(t,y.start,null==u?void 0:u.timezone)};return y.end&&(r.end=y.end),i&&(n=r,(e=i).date===n.date&&e.start===n.start&&e.end===n.end&&e.label===n.label&&e.datetime===n.datetime)?i:r}},[_,y,u,i]);n.useEffect(function(){a(r.name,w)},[w,r.name,a]);var F=n.useMemo(function(){return _r(d)},[d]);n.useEffect(function(){_&&hr(_,F)&&(h(void 0),v(void 0))},[_,F]);var k=n.useMemo(function(){return c?ut(u,m,function(e){return hr(Hn(e),F)},l,p):void 0},[c,u,m,F,l,p]);n.useEffect(function(){k&&!_&&h(Hn(k))},[k,_]);var S,T=n.useCallback(function(e){return!ct(u,e.toDate(),m,l,p)||hr(e,F)},[u,m,F,l,p]),C=st(u),D=!!u,R=null==u?void 0:u.timezone,N=function(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}),!0}catch(e){return!1}}(R),I=n.useMemo(function(){if(!D)return"";var e=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch(e){return""}}();return function(e,n){var t=tt(e);if(!t)return"";var r=n&&n!==e?tt(n):"";return r&&r!==t?"".concat(Jr," ").concat(t,", not your time zone (").concat(r,")."):"".concat(Jr," ").concat(t,".")}(N?R:e,e)},[D,R,N]);return n.useEffect(function(){D&&!N&&console.warn('FormFieldDateTime: "'.concat(R,'" is not a usable timezone, so ')+"times are shown in the visitor's zone instead. Set the schedule's timezone to an IANA identifier such as \"America/New_York\".")},[D,R,N]),e.jsxs("div",{className:Or,style:r.style,children:[!!r.title&&e.jsx("h2",{className:Pr,children:r.title}),e.jsxs("div",{className:Lr,children:[e.jsx("div",{className:Hr,children:e.jsx(fr,{maxDate:Hn(m).add(C,"day"),onChange:function(e){h(e),v(void 0)},referenceDate:Hn(m),shouldDisableDate:T,today:Hn(m),value:_||null})}),e.jsxs("div",{className:Ur,children:[!!I&&e.jsx("p",{className:Br,children:I}),e.jsxs("div",{"aria-label":s?"".concat(Xr," (required)"):Xr,className:Wr,role:"group",children:[!_&&e.jsx("p",{className:Gr,children:"Select a date to see the available times."}),!!_&&0===b.length&&e.jsx("p",{className:Gr,children:"No times are available on this date."}),b.map(function(t,r){var a=Kr(t),o=t.group!==S?t.group:void 0;return S=t.group,e.jsxs(n.Fragment,{children:[!!o&&e.jsx("h3",{className:$r,children:o}),e.jsx("button",{"aria-pressed":a===g,className:"".concat(qr," ").concat(a===g?Yr:""),onClick:function(){return v(a)},type:"button",children:it(t)})]},"".concat(a,"-").concat(r))})]})]})]}),!!o&&e.jsx("p",{className:Vr,children:o})]})},Qr={exports:{}};Qr.exports=(()=>{return e={705:e=>{e.exports=function(e,n){const t=[];return 0===n.length?t.push({text:e,highlight:!1}):n[0][0]>0&&t.push({text:e.slice(0,n[0][0]),highlight:!1}),n.forEach((r,a)=>{const o=r[0],i=r[1];t.push({text:e.slice(o,i),highlight:!0}),a===n.length-1?i<e.length&&t.push({text:e.slice(i,e.length),highlight:!1}):i<n[a+1][0]&&t.push({text:e.slice(i,n[a+1][0]),highlight:!1})}),t}}},n={},function t(r){var a=n[r];if(void 0!==a)return a.exports;var o=n[r]={exports:{}};return e[r](o,o.exports,t),o.exports}(705);var e,n})();var ea=i(Qr.exports);function na(e){return null!=e.placePrediction}function ta(e){var n,t=e.placePrediction;return{placeId:t.placeId,description:t.text.text,structured_formatting:{main_text:t.structuredFormat.mainText.text,secondary_text:(null===(n=t.structuredFormat.secondaryText)||void 0===n?void 0:n.text)||"",main_text_matched_substrings:(t.structuredFormat.mainText.matches||[]).map(function(e){var n,t,r;return{offset:null!==(n=e.startOffset)&&void 0!==n?n:0,length:(null!==(t=e.endOffset)&&void 0!==t?t:0)-(null!==(r=e.startOffset)&&void 0!==r?r:0)}})}}}var ra=function(){function e(e){this.baseUrl=e.baseUrl||"https://api.xapp.ai",this.key=e.apiKey}return e.prototype.getPlacePredictions=function(e,n){var t,r={};if(e.params){if(e.params.components){var a=e.params.components.split("|").filter(function(e){return e.startsWith("country:")}).map(function(e){return e.replace("country:","").toLowerCase()});a.length>0&&(r.includedRegionCodes=a)}if(e.params.language&&(r.languageCode=e.params.language),e.params.location){var o=e.params.location.split(",").map(Number),i=o[0],s=o[1];isNaN(i)||isNaN(s)||(r.locationBias={circle:{center:{latitude:i,longitude:s},radius:Number(e.params.radius)||5e4}})}}r.input=e.input,(null===(t=e.componentRestrictions)||void 0===t?void 0:t.country)?r.includedRegionCodes=[e.componentRestrictions.country.toLowerCase()]:r.includedRegionCodes||(r.includedRegionCodes=["us"]);var d="".concat(this.baseUrl,"/places/autocomplete");this.key&&(d+="?key=".concat(encodeURIComponent(this.key))),fetch(d,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}).then(function(e){if(!e.ok)throw new Error("getPlacePredictions: HTTP error! Status: ".concat(e.status));return e.json()}).then(function(e){n((e.suggestions||[]).filter(na).map(ta))}).catch(function(e){se("getPlacePredictions: Fetch error:",e),n([])})},e.prototype.getPlaceDetails=function(e,n){var t="".concat(this.baseUrl,"/places/details/").concat(encodeURIComponent(e));this.key&&(t+="?key=".concat(encodeURIComponent(this.key))),fetch(t).then(function(e){if(!e.ok)throw new Error("getPlaceDetails: HTTP error! Status: ".concat(e.status));return e.json()}).then(function(e){n(e)}).catch(function(e){se("getPlaceDetails: Fetch error:",e),n(void 0)})},e}(),aa="FormFieldTextInputAddress-module_xapp_text_input_address__-FQjM",oa="FormFieldTextInputAddress-module_xapp_address_anchor__HPntW",ia="FormFieldTextInputAddress-module_xapp_address_root__2w9ks",sa="FormFieldTextInputAddress-module_xapp_address_focused__DQ0B3",da="FormFieldTextInputAddress-module_xapp_address_error__inPHs",la="FormFieldTextInputAddress-module_xapp_address_control__4YDQD",pa="FormFieldTextInputAddress-module_xapp_address_label__lrzNq",ca="FormFieldTextInputAddress-module_xapp_address_asterisk__hVgBb",ua="FormFieldTextInputAddress-module_xapp_address_helper__CU-Ne",ma="FormFieldTextInputAddress-module_xapp_address_popup__dw-zo",fa="FormFieldTextInputAddress-module_xapp_address_listbox__o7hkI",_a="FormFieldTextInputAddress-module_xapp_address_option__nGWID",ha="FormFieldTextInputAddress-module_xapp_address_option_active__KX0-4",xa="FormFieldTextInputAddress-module_xapp_address_option_icon__N4n4Y",ga="FormFieldTextInputAddress-module_xapp_address_option_text__C2ulS",va="FormFieldTextInputAddress-module_xapp_address_secondary__YipJC",ba="FormFieldTextInputAddress-module_xapp_address_no_options__zSLTf",ya="FormFieldTextInputAddress-module_xapp_address_attribution__VGy3K";ge('/**\n * The phone breakpoint.\n *\n * Width alone cannot express "phone". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step\'s action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field\'s helper / error line. The metrics are MUI\'s FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.FormFieldTextInputAddress-module_xapp_text_input_address__-FQjM {\n display: inline-flex;\n flex-direction: column;\n position: relative;\n width: 100%;\n min-width: 0;\n margin: 16px 0 8px;\n padding: 0;\n border: 0;\n box-sizing: border-box;\n vertical-align: top;\n}\n\n.FormFieldTextInputAddress-module_xapp_address_anchor__HPntW {\n position: relative;\n width: 100%;\n}\n\n.FormFieldTextInputAddress-module_xapp_address_root__2w9ks {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n box-sizing: border-box;\n background-color: var(--xapp-form-widget-text-root-background, rgba(0, 0, 0, 0.06)) !important;\n border: var(--xapp-form-widget-text-root-border, 0) !important;\n border-radius: var(--xapp-form-widget-text-root-radius, 4px 4px 0 0) !important;\n font-family: var(--xapp-form-widget-text-font-family, var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif));\n font-size: 1rem;\n line-height: 1.4375em;\n cursor: text;\n}\n.FormFieldTextInputAddress-module_xapp_address_root__2w9ks:hover, .FormFieldTextInputAddress-module_xapp_address_root__2w9ks.FormFieldTextInputAddress-module_xapp_address_focused__DQ0B3 {\n border-color: var(--xapp-form-widget-text-border-color-focus, var(--xapp-form-widget-text-border-color, transparent)) !important;\n}\n.FormFieldTextInputAddress-module_xapp_address_root__2w9ks::before, .FormFieldTextInputAddress-module_xapp_address_root__2w9ks::after {\n display: var(--xapp-form-widget-text-underline-display, block) !important;\n content: "";\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n}\n.FormFieldTextInputAddress-module_xapp_address_root__2w9ks::before {\n border-bottom: 1px solid rgba(0, 0, 0, 0.42);\n transition: border-bottom-color 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n}\n.FormFieldTextInputAddress-module_xapp_address_root__2w9ks::after {\n border-bottom: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n transform: scaleX(0);\n transition: transform 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;\n}\n.FormFieldTextInputAddress-module_xapp_address_root__2w9ks:hover::before {\n border-bottom-color: rgba(0, 0, 0, 0.87);\n}\n\n.FormFieldTextInputAddress-module_xapp_address_focused__DQ0B3::after {\n transform: scaleX(1);\n}\n\n.FormFieldTextInputAddress-module_xapp_address_error__inPHs .FormFieldTextInputAddress-module_xapp_address_root__2w9ks::before, .FormFieldTextInputAddress-module_xapp_address_error__inPHs .FormFieldTextInputAddress-module_xapp_address_root__2w9ks::after {\n border-bottom-color: #d32f2f;\n}\n.FormFieldTextInputAddress-module_xapp_address_error__inPHs .FormFieldTextInputAddress-module_xapp_address_root__2w9ks::after {\n transform: scaleX(1);\n}\n\n.FormFieldTextInputAddress-module_xapp_address_control__4YDQD {\n display: block;\n min-width: 0;\n padding: 21px 12px 4px 12px !important;\n border: 0 !important;\n background-color: var(--xapp-form-widget-text-input-background, var(--xapp-form-widget-text-background-color, rgba(0, 0, 0, 0.06))) !important;\n border-radius: var(--xapp-form-widget-border-radius-sm, 8px) var(--xapp-form-widget-border-radius-sm, 8px) var(--xapp-form-widget-text-bottom-radius, 0) var(--xapp-form-widget-text-bottom-radius, 0) !important;\n transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out !important;\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87)) !important;\n font-size: var(--xapp-form-widget-text-font-size, 1rem) !important;\n font-family: var(--xapp-form-widget-text-font-family, var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif)) !important;\n line-height: 1.4375em !important;\n letter-spacing: inherit;\n height: auto !important;\n min-height: 0 !important;\n width: 100% !important;\n max-width: 100% !important;\n box-sizing: border-box !important;\n margin: 0 !important;\n margin-bottom: 0 !important;\n border-width: 0 !important;\n border-style: none !important;\n box-shadow: none;\n -webkit-appearance: none !important;\n appearance: none !important;\n}\n.FormFieldTextInputAddress-module_xapp_address_control__4YDQD::placeholder {\n color: currentColor;\n opacity: 0.42;\n transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n}\n.FormFieldTextInputAddress-module_xapp_address_control__4YDQD[data-shrink=false]::placeholder {\n opacity: 0 !important;\n}\n.FormFieldTextInputAddress-module_xapp_address_control__4YDQD:hover {\n background-color: var(--xapp-form-widget-text-background-color-dark, rgba(0, 0, 0, 0.09)) !important;\n}\n.FormFieldTextInputAddress-module_xapp_address_control__4YDQD:focus {\n background-color: var(--xapp-form-widget-text-background-color-dark, rgba(0, 0, 0, 0.09)) !important;\n outline: none !important;\n box-shadow: inset 0 0 0 2px var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54)) !important;\n}\n\n.FormFieldTextInputAddress-module_xapp_address_label__lrzNq {\n position: absolute !important;\n left: 0;\n top: 0;\n z-index: 1;\n display: block;\n max-width: calc(100% - 24px);\n margin: 0 !important;\n padding: 0 !important;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n pointer-events: none;\n transform-origin: top left;\n transform: translate(12px, 13px) scale(1) !important;\n transition: color 200ms cubic-bezier(0, 0, 0.2, 1) 0ms, transform 200ms cubic-bezier(0, 0, 0.2, 1) 0ms !important;\n color: rgba(0, 0, 0, 0.6);\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif) !important;\n font-size: 1rem !important;\n font-weight: 400 !important;\n line-height: 1.4375em !important;\n letter-spacing: 0.00938em;\n}\n.FormFieldTextInputAddress-module_xapp_address_label__lrzNq[data-shrink=true] {\n max-width: calc(133% - 24px);\n transform: translate(12px, 4px) scale(0.75) !important;\n}\n.FormFieldTextInputAddress-module_xapp_address_focused__DQ0B3 .FormFieldTextInputAddress-module_xapp_address_label__lrzNq {\n color: var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n}\n.FormFieldTextInputAddress-module_xapp_address_error__inPHs .FormFieldTextInputAddress-module_xapp_address_label__lrzNq {\n color: #d32f2f;\n}\n\n.FormFieldTextInputAddress-module_xapp_address_error__inPHs .FormFieldTextInputAddress-module_xapp_address_asterisk__hVgBb {\n color: #d32f2f;\n}\n\n.FormFieldTextInputAddress-module_xapp_address_helper__CU-Ne {\n margin: 3px 14px 0 !important;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif);\n font-size: 0.75rem !important;\n font-weight: 400;\n line-height: 1.66 !important;\n letter-spacing: 0.03333em;\n text-align: left;\n color: #d32f2f !important;\n}\n\n.FormFieldTextInputAddress-module_xapp_address_popup__dw-zo {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n z-index: 16000;\n margin: 2px 0 0;\n overflow: hidden;\n background-color: #fff;\n color: rgba(0, 0, 0, 0.87);\n border-radius: 4px;\n box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12);\n font-family: var(--xapp-form-widget-text-font-family, var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif));\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.5;\n letter-spacing: 0.00938em;\n text-align: left;\n}\n.FormFieldTextInputAddress-module_xapp_address_popup__dw-zo[hidden] {\n display: none;\n}\n\n.FormFieldTextInputAddress-module_xapp_address_listbox__o7hkI {\n list-style: none !important;\n margin: 0 !important;\n padding: 8px 0 !important;\n max-height: 40vh;\n overflow: auto;\n box-sizing: border-box;\n}\n.FormFieldTextInputAddress-module_xapp_address_listbox__o7hkI:empty {\n display: none;\n}\n\n.FormFieldTextInputAddress-module_xapp_address_option__nGWID {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n min-height: 48px;\n margin: 0 !important;\n padding: 6px 16px !important;\n box-sizing: border-box;\n cursor: pointer;\n user-select: none;\n outline: 0;\n -webkit-tap-highlight-color: transparent;\n}\n.FormFieldTextInputAddress-module_xapp_address_option__nGWID::before, .FormFieldTextInputAddress-module_xapp_address_option__nGWID::marker {\n content: none !important;\n}\n\n.FormFieldTextInputAddress-module_xapp_address_option_active__KX0-4 {\n background-color: rgba(0, 0, 0, 0.04);\n}\n\n.FormFieldTextInputAddress-module_xapp_address_option_icon__N4n4Y {\n flex: 0 0 auto;\n width: 1em;\n height: 1em;\n margin-right: 20px;\n font-size: 1.5rem;\n fill: rgba(0, 0, 0, 0.6);\n}\n\n.FormFieldTextInputAddress-module_xapp_address_option_text__C2ulS {\n display: block;\n min-width: 0;\n word-wrap: break-word;\n}\n\n.FormFieldTextInputAddress-module_xapp_address_secondary__YipJC {\n display: block;\n font-size: 0.875rem;\n line-height: 1.43;\n letter-spacing: 0.01071em;\n color: rgba(0, 0, 0, 0.6);\n}\n\n.FormFieldTextInputAddress-module_xapp_address_no_options__zSLTf {\n padding: 14px 16px;\n color: rgba(0, 0, 0, 0.6);\n}\n\n.FormFieldTextInputAddress-module_xapp_address_attribution__VGy3K {\n text-align: right;\n padding: 4px 12px 8px;\n}\n.FormFieldTextInputAddress-module_xapp_address_attribution__VGy3K img {\n display: inline-block;\n height: 14px;\n width: auto;\n}');var wa=function(){return e.jsx("svg",{className:xa,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:e.jsx("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7m0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5"})})},Fa=function(r){var a,o=r.field,i=r.onFieldChange,s=r.errorMessage,d=r.required,l=r.googleMapsApiKey,p=r.mapsBaseUrl,c=r.requireSelection,u=!(null!==(a=o.requireSelection)&&void 0!==a?a:c),m=n.useState(null),f=m[0],_=m[1],h=n.useState(""),x=h[0],g=h[1],v=n.useState([]),b=v[0],y=v[1],w=n.useState(!1),F=w[0],k=w[1],S=n.useState(!1),T=S[0],C=S[1],D=n.useState(-1),R=D[0],N=D[1],I="xapp-address-".concat(n.useId()),A="".concat(I,"-listbox"),M="".concat(I,"-helper-text"),j=function(e){return"".concat(I,"-option-").concat(e)},E=n.useRef(null),z=n.useRef(""),O=function(e){z.current=e,g(e)};n.useEffect(function(){i(o.name,x)},[o.name,i,x]);var P=o.googleMapsApiKey||l,L=o.mapsBaseUrl||p,H=n.useMemo(function(){return new ra({apiKey:P,baseUrl:L})},[P,L]),U=function(){if(!L)return!0;try{var e=new URL(L).hostname;return"xapp.ai"===e||e.endsWith(".xapp.ai")}catch(e){return!1}}(),B=n.useMemo(function(){return function(e,n){var t,r=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];clearTimeout(t),t=setTimeout(function(){return e.apply(void 0,r)},n)};return r.clear=function(){return clearTimeout(t)},r}(function(e,n){H.getPlacePredictions(e,n)},400)},[H]);n.useEffect(function(){return function(){return B.clear()}},[B]),n.useEffect(function(){var e=!0;if(""!==x){var n=o.mapsUrlQueryParams||void 0;return B({input:x,params:n},function(n){e&&y(n||[])}),function(){e=!1}}y([])},[x,B,o.mapsUrlQueryParams]);var W=n.useMemo(function(){return f?b.filter(function(e){return e.description!==f.description}):b},[b,f]),$=F&&(W.length>0||!u&&""!==x);n.useEffect(function(){N(-1)},[W]),n.useLayoutEffect(function(){var e=E.current,n=R>=0?null==e?void 0:e.children[R]:void 0;e&&n instanceof HTMLElement&&(n.offsetTop<e.scrollTop?e.scrollTop=n.offsetTop:n.offsetTop+n.offsetHeight>e.scrollTop+e.clientHeight&&(e.scrollTop=n.offsetTop+n.offsetHeight-e.clientHeight))},[R,$]);var q=function(){k(!1),N(-1)},Y=function(e){if(q(),_(e),O(e.description),e.placeId){var n=e.placeId,r=e.description;H.getPlaceDetails(n,function(n){(null==n?void 0:n.formattedAddress)&&z.current===r&&(_(t(t({},e),{description:n.formattedAddress})),O(n.formattedAddress))})}},G=T||x.length>0||!o.label,V=$&&R>=0?j(R):void 0;return e.jsxs("div",{className:"".concat(aa," ").concat(s?da:""),style:o.style,children:[e.jsxs("div",{className:oa,children:[e.jsxs("div",{className:"".concat(ia," ").concat(T?sa:""),children:[o.label&&e.jsxs("label",{htmlFor:I,className:pa,"data-shrink":G?"true":"false",children:[o.label,d&&e.jsx("span",{className:ca,"aria-hidden":"true",children:" *"})]}),e.jsx("input",{id:I,name:o.name,type:"text",className:la,role:"combobox","aria-autocomplete":"list","aria-expanded":$,"aria-controls":A,"aria-activedescendant":V,"aria-invalid":!!s,"aria-describedby":s?M:void 0,autoComplete:"off",autoCapitalize:"none",spellCheck:!1,placeholder:o.placeholder,required:d,maxLength:o.maxLength||void 0,value:x,onChange:function(e){var n=e.target.value;O(n),""===n?_(null):k(!0)},onKeyDown:function(e){switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),k(!0),n="ArrowDown"===e.key?1:-1,0!==(t=W.length)&&N(function(e){var r=e+n;return r>=t?-1:r<-1?t-1:r});break;case"Enter":$&&R>=0&&W[R]?(e.preventDefault(),Y(W[R])):q();break;case"Escape":$&&(e.preventDefault(),e.stopPropagation(),q())}var n,t},onFocus:function(){return C(!0)},onBlur:function(){if(C(!1),q(),!u){var e=(null==f?void 0:f.description)||"";x!==e&&O(e)}},onMouseDown:function(){$||""===x||k(!0)},"data-shrink":G?"true":"false"})]}),e.jsxs("div",{className:ma,hidden:!$,onMouseDown:function(e){return e.preventDefault()},children:[e.jsx("ul",{ref:E,id:A,role:"listbox","aria-label":"".concat(o.label||"Address"," suggestions"),className:fa,children:W.map(function(n,t){var r=n.structured_formatting.main_text_matched_substrings||[],a=ea(n.structured_formatting.main_text,r.map(function(e){return[e.offset,e.offset+e.length]}));return e.jsxs("li",{id:j(t),role:"option","aria-selected":t===R,className:"".concat(_a," ").concat(t===R?ha:""),onMouseMove:function(){return N(t)},onClick:function(){return Y(n)},children:[e.jsx(wa,{}),e.jsxs("span",{className:ga,children:[a.map(function(n,t){return e.jsx("span",{style:{fontWeight:n.highlight?"bold":"normal"},children:n.text},t)}),e.jsx("span",{className:va,children:n.structured_formatting.secondary_text})]})]},n.placeId||n.description)})}),$&&0===W.length&&e.jsx("div",{className:ba,children:"No locations"}),U&&e.jsx("div",{className:ya,children:e.jsx("img",{src:"https://maps.gstatic.com/mapfiles/api-3/images/powered-by-google-on-white3.png",alt:"powered by Google"})})]})]}),s&&e.jsx("p",{id:M,className:ua,children:s})]})},ka=function(e){return"string"!=typeof e||0===e.trim().length},Sa=function(e){var n=e.replace(/\D/g,"");if(10===n.length||11===n.length&&n.startsWith("1")){return/^(1)?[-. ]?\(?(\d{3})\)?[-. ]?(\d{3})[-. ]?(\d{4})$/.test(n)}return!1},Ta=function(e){return null==e||("string"==typeof e?0===e.trim().length:Array.isArray(e)?0===e.length:("object"==typeof e&&e.constructor===Object||"object"==typeof e)&&0===Object.keys(e).length)},Ca="FormStepDisplay-module_xapp_step_iframe_wrapper__BBFRw",Da="FormStepDisplay-module_xapp_step_full_bleed__rhGGK",Ra="FormStepDisplay-module_xapp_external_widget_container__ec4Hs",Na="FormStepDisplay-module_xapp_external_widget_anchor__NSXBg",Ia="FormStepDisplay-module_xapp_external_widget_fallback__lkFJ-",Aa="FormStepDisplay-module_xapp_external_widget_loading__aRtx6",Ma="FormStepDisplay-module_xapp_external_widget_spinner__ga0X7",ja="FormStepDisplay-module_xapp_submit_error__Zbqdj",Ea="FormStepDisplay-module_xapp_formfield__hRmVx",za="FormStepDisplay-module_active__fCsMz",Oa="FormStepDisplay-module_xapp_formfield_title__INjeF",Pa="FormStepDisplay-module_xapp_formfield_subtitle__8VQC2",La="FormStepDisplay-module_xapp_form_actions__lXYdk",Ha="FormStepDisplay-module_xapp_form_actions_final__0TUxT",Ua="FormStepDisplay-module_xapp_final_button_container__Gco-E",Ba="FormStepDisplay-module_xapp_form_nav_buttons__lI4BI",Wa="FormStepDisplay-module_xapp_dummy_button__Q-nE6",$a="FormStepDisplay-module_xapp_step_button__KeEND",qa="FormStepDisplay-module_xapp_primary_button__d2wra",Ya="FormStepDisplay-module_xapp_secondary_button__LuMfN",Ga="FormStepDisplay-module_xapp_disabled_button__RjSfL",Va="FormStepDisplay-module_xapp_back_button__mPqT0",Xa="FormStepDisplay-module_xapp_back_button_label__9kKIl",Ja="FormStepDisplay-module_xapp_back_button_icon__w7o4I";ge("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.FormStepDisplay-module_xapp_step_iframe_wrapper__BBFRw {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n overflow: scroll;\n position: relative;\n}\n\n.FormStepDisplay-module_xapp_step_full_bleed__rhGGK {\n margin-left: -8px;\n margin-right: -8px;\n}\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormStepDisplay-module_xapp_step_full_bleed__rhGGK {\n margin-left: calc(-1 * (8px + env(safe-area-inset-left, 0px)));\n margin-right: calc(-1 * (8px + env(safe-area-inset-right, 0px)));\n }\n}\n\n.FormStepDisplay-module_xapp_external_widget_container__ec4Hs {\n background-color: var(--xapp-form-widget-external-widget-background-color, transparent);\n padding: var(--xapp-form-widget-external-widget-padding, 0);\n min-height: var(--xapp-form-widget-external-widget-min-height, auto);\n box-sizing: border-box;\n}\n\n.FormStepDisplay-module_xapp_external_widget_anchor__NSXBg {\n margin: 0;\n padding: 0;\n}\n\n.FormStepDisplay-module_xapp_external_widget_fallback__lkFJ- {\n padding: 20px;\n text-align: center;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n}\n\n.FormStepDisplay-module_xapp_external_widget_loading__aRtx6 {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 14px;\n min-height: 240px;\n padding: 40px 20px;\n text-align: center;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87));\n}\n.FormStepDisplay-module_xapp_external_widget_loading__aRtx6 p {\n margin: 0;\n font-size: 0.95em;\n opacity: 0.7;\n}\n\n.FormStepDisplay-module_xapp_external_widget_spinner__ga0X7 {\n display: inline-block;\n width: 44px;\n height: 44px;\n color: var(--xapp-form-widget-primary-button-color, #ea6539);\n}\n.FormStepDisplay-module_xapp_external_widget_spinner__ga0X7 svg {\n width: 100%;\n height: 100%;\n}\n\n.FormStepDisplay-module_xapp_submit_error__Zbqdj {\n padding: 12px 20px;\n text-align: center;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n color: #b3261e;\n}\n\n.FormStepDisplay-module_xapp_formfield__hRmVx {\n display: none;\n font-family: inherit !important;\n}\n.FormStepDisplay-module_xapp_formfield__hRmVx.FormStepDisplay-module_active__fCsMz {\n display: block;\n}\n.FormStepDisplay-module_xapp_formfield_title__INjeF p {\n margin: 10px 0 20px 0;\n font-size: 1em;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n}\n.FormStepDisplay-module_xapp_formfield__hRmVx .MuiAutocomplete-clearIndicator,\n.FormStepDisplay-module_xapp_formfield__hRmVx .MuiAutocomplete-popupIndicator {\n color: rgba(0, 0, 0, 0.54) !important;\n background-color: transparent !important;\n transition: background-color 200ms ease-in-out !important;\n}\n.FormStepDisplay-module_xapp_formfield__hRmVx .MuiAutocomplete-clearIndicator:hover,\n.FormStepDisplay-module_xapp_formfield__hRmVx .MuiAutocomplete-popupIndicator:hover {\n background-image: unset !important;\n background-color: #cfd8da !important;\n}\n.FormStepDisplay-module_xapp_formfield__hRmVx .MuiAutocomplete-clearIndicator:focus,\n.FormStepDisplay-module_xapp_formfield__hRmVx .MuiAutocomplete-popupIndicator:focus {\n background-image: unset !important;\n}\n\n.FormStepDisplay-module_xapp_formfield_title__INjeF p {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n text-align: var(--xapp-form-widget-step-title-align, left);\n font-size: var(--xapp-form-widget-step-title-font-size, inherit);\n font-weight: var(--xapp-form-widget-step-title-font-weight, inherit);\n color: var(--xapp-form-widget-step-title-color, inherit);\n}\n\n.FormStepDisplay-module_xapp_formfield_subtitle__8VQC2 {\n font-size: 0.875em;\n opacity: 0.8;\n}\n\n.FormStepDisplay-module_xapp_form_actions__lXYdk {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.FormStepDisplay-module_xapp_form_actions_final__0TUxT {\n flex-direction: var(--xapp-form-widget-final-button-direction, column);\n gap: var(--xapp-form-widget-final-button-gap, 0);\n}\n.FormStepDisplay-module_xapp_form_actions_final__0TUxT .FormStepDisplay-module_xapp_final_button_container__Gco-E {\n padding: var(--xapp-form-widget-final-button-container-padding, 20px 20px 0 20px);\n}\n.FormStepDisplay-module_xapp_form_actions_final__0TUxT .FormStepDisplay-module_xapp_form_nav_buttons__lI4BI {\n padding: var(--xapp-form-widget-final-button-nav-padding, 20px);\n flex: var(--xapp-form-widget-final-button-nav-flex, 1 1 auto);\n align-self: var(--xapp-form-widget-final-button-nav-align, stretch);\n align-items: center;\n}\n\n.FormStepDisplay-module_xapp_final_button_container__Gco-E {\n display: flex;\n justify-content: center;\n padding: 20px 20px 0 20px;\n}\n.FormStepDisplay-module_xapp_final_button_container__Gco-E button {\n font-size: var(--xapp-form-widget-button-font-size, 1.2em) !important;\n padding: var(--xapp-form-widget-button-padding, 12px 32px) !important;\n min-width: 200px !important;\n border-radius: var(--xapp-form-widget-button-radius, var(--xapp-form-widget-border-radius-md, 12px)) !important;\n}\n\n.FormStepDisplay-module_xapp_form_nav_buttons__lI4BI {\n display: flex;\n justify-content: space-between;\n padding: 20px;\n align-self: stretch;\n}\n\n.FormStepDisplay-module_xapp_dummy_button__Q-nE6 {\n flex-grow: 1;\n}\n\n.FormStepDisplay-module_xapp_step_button__KeEND {\n display: inline-flex !important;\n align-items: center;\n justify-content: center;\n position: relative;\n box-sizing: border-box !important;\n min-width: 64px;\n margin: 0 !important;\n border: 0;\n outline: 0;\n vertical-align: middle;\n cursor: pointer;\n user-select: none;\n -webkit-appearance: none;\n appearance: none;\n -webkit-tap-highlight-color: transparent;\n color: #fff !important;\n line-height: 1.75 !important;\n letter-spacing: 0.02857em;\n text-transform: uppercase !important;\n text-decoration: none !important;\n text-shadow: none !important;\n}\n.FormStepDisplay-module_xapp_step_button__KeEND:disabled {\n color: rgba(0, 0, 0, 0.26) !important;\n pointer-events: none;\n}\n\n.FormStepDisplay-module_xapp_primary_button__d2wra {\n background-color: var(--xapp-form-widget-primary-button-color, #ea6539) !important;\n font-family: inherit !important;\n border-radius: var(--xapp-form-widget-button-radius, var(--xapp-form-widget-border-radius-md, 12px)) !important;\n font-size: var(--xapp-form-widget-button-font-size, 0.875rem) !important;\n font-weight: var(--xapp-form-widget-button-font-weight, 500) !important;\n padding: var(--xapp-form-widget-button-padding, 6px 16px) !important;\n min-height: 44px !important;\n box-shadow: var(--xapp-form-widget-button-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)) !important;\n transition: box-shadow 200ms ease-in-out, transform 150ms ease-in-out, opacity 200ms ease-in-out !important;\n}\n.FormStepDisplay-module_xapp_primary_button__d2wra:hover {\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;\n opacity: 0.9 !important;\n}\n.FormStepDisplay-module_xapp_primary_button__d2wra:active {\n transform: scale(0.98) !important;\n}\n.FormStepDisplay-module_xapp_primary_button__d2wra:focus {\n outline: none;\n}\n.FormStepDisplay-module_xapp_primary_button__d2wra:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n\n.FormStepDisplay-module_xapp_secondary_button__LuMfN {\n background-color: var(--xapp-form-widget-secondary-button-color, #d24cc7) !important;\n font-family: inherit !important;\n border-radius: var(--xapp-form-widget-button-radius, var(--xapp-form-widget-border-radius-md, 12px)) !important;\n font-size: var(--xapp-form-widget-button-font-size, 0.875rem) !important;\n font-weight: var(--xapp-form-widget-button-font-weight, 500) !important;\n padding: var(--xapp-form-widget-button-padding, 6px 16px) !important;\n min-height: 44px !important;\n box-shadow: var(--xapp-form-widget-button-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)) !important;\n transition: box-shadow 200ms ease-in-out, transform 150ms ease-in-out, opacity 200ms ease-in-out !important;\n}\n.FormStepDisplay-module_xapp_secondary_button__LuMfN:hover {\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;\n opacity: 0.9 !important;\n}\n.FormStepDisplay-module_xapp_secondary_button__LuMfN:active {\n transform: scale(0.98) !important;\n}\n.FormStepDisplay-module_xapp_secondary_button__LuMfN:focus {\n outline: none;\n}\n.FormStepDisplay-module_xapp_secondary_button__LuMfN:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n\n.FormStepDisplay-module_xapp_disabled_button__RjSfL {\n background-color: var(--xapp-form-widget-secondary-button-color, #d24cc7) !important;\n opacity: 0.5 !important;\n font-family: inherit !important;\n border-radius: var(--xapp-form-widget-button-radius, var(--xapp-form-widget-border-radius-md, 12px)) !important;\n font-size: var(--xapp-form-widget-button-font-size, 0.875rem) !important;\n font-weight: var(--xapp-form-widget-button-font-weight, 500) !important;\n padding: var(--xapp-form-widget-button-padding, 6px 16px) !important;\n min-height: 44px !important;\n box-shadow: none !important;\n cursor: not-allowed !important;\n}\n.FormStepDisplay-module_xapp_back_button__mPqT0 {\n background: var(--xapp-form-widget-back-button-background, var(--xapp-form-widget-primary-button-color, #ea6539)) !important;\n border: var(--xapp-form-widget-back-button-border, 0) !important;\n border-radius: var(--xapp-form-widget-back-button-radius, var(--xapp-form-widget-border-radius-md, 12px)) !important;\n padding: var(--xapp-form-widget-back-button-padding, 6px 16px) !important;\n min-width: var(--xapp-form-widget-back-button-size, 64px) !important;\n width: var(--xapp-form-widget-back-button-size, auto) !important;\n height: var(--xapp-form-widget-back-button-size, auto) !important;\n color: var(--xapp-form-widget-back-button-color, var(--xapp-form-widget-primary-button-text-color, #b7c5d1)) !important;\n font-size: var(--xapp-form-widget-back-button-font-size, 0.875rem) !important;\n font-weight: var(--xapp-form-widget-back-button-font-weight, 500) !important;\n box-shadow: var(--xapp-form-widget-back-button-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)) !important;\n}\n.FormStepDisplay-module_xapp_back_button__mPqT0:hover {\n color: var(--xapp-form-widget-back-button-color-hover, var(--xapp-form-widget-primary-button-text-color, #b7c5d1)) !important;\n border-color: var(--xapp-form-widget-back-button-color-hover, currentColor) !important;\n}\n\n.FormStepDisplay-module_xapp_back_button_label__9kKIl {\n display: var(--xapp-form-widget-back-button-label-display, inline);\n}\n\n.FormStepDisplay-module_xapp_back_button_icon__w7o4I {\n display: var(--xapp-form-widget-back-button-icon-display, none);\n align-items: center;\n justify-content: center;\n font-size: 20px;\n line-height: 1;\n -webkit-text-stroke: var(--xapp-form-widget-back-button-icon-stroke, 0);\n}");function Ka(e){return!!e&&void 0!==e.externalWidget}function Za(e){return"value"in e&&void 0!==e.value}ge("/**\n * CostGuide / Contractor Appointments booking-embed style overrides.\n *\n * The partner renders its form into #airo-anchor in the light DOM with stable, semantic\n * class names (spike: chat-widget#1514). This is a plain (non-module) stylesheet on purpose\n * so the selectors below emit literally rather than being scoped -- they target the partner's\n * own markup, not ours.\n *\n * Two hard constraints from the spike:\n * 1. Their rules are scoped `#airo-anchor #step-<name> .<class>` (two ids + a class), so a\n * plain `#airo-anchor .btn-next` measurably loses. Overrides must carry `#airo-anchor`\n * specificity AND `!important` to win.\n * 2. Most of their text inherits the container font, but `input` is explicitly Arial, so the\n * font must be re-applied to inputs directly.\n *\n * Every value maps to a `--xapp-form-widget-*` theme variable (with a fallback matching\n * `styles/_variables.scss`), so a Studio-themed widget restyles the partner's form too --\n * nothing here is a hard-coded color, font, or radius.\n *\n * Partner selectors verified: 2026-08-04. Re-verify against their markup per chat-widget#1516.\n */\n/* Primary action buttons: btn-next / btn-orange */\n#airo-anchor .btn-next,\n#airo-anchor .btn-orange {\n background-color: var(--xapp-form-widget-primary-button-color, #ea6539) !important;\n color: var(--xapp-form-widget-primary-button-text-color, #b7c5d1) !important;\n border-radius: var(--xapp-form-widget-border-radius-md, 12px) !important;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n\n/* Secondary / back button: btn-back */\n#airo-anchor .btn-back {\n background-color: var(--xapp-form-widget-secondary-button-color, #d24cc7) !important;\n color: var(--xapp-form-widget-secondary-button-text-color, #b7c5d1) !important;\n border-radius: var(--xapp-form-widget-border-radius-md, 12px) !important;\n}\n\n/* Headings and body text: stepwrap / ms-title / ms-subtitle / page-title / label-item */\n#airo-anchor .stepwrap,\n#airo-anchor .ms-title,\n#airo-anchor .ms-subtitle,\n#airo-anchor .page-title,\n#airo-anchor .label-item {\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87)) !important;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n\n/* Inputs are explicitly Arial in their sheet, so the inherited container font never reaches\n them -- re-apply directly (spike finding). radio-item grouped for the same reason. */\n#airo-anchor input,\n#airo-anchor .radio-item {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n\n/* Focus rings consistent with ours rather than their default orange. */\n#airo-anchor input:focus,\n#airo-anchor .btn-next:focus,\n#airo-anchor .btn-back:focus {\n outline-color: var(--xapp-form-widget-focus-ring-color, #012b54) !important;\n}");var Qa=["preferred_time","preferred_date"];function eo(e){return"DATE"===e.type||"DATETIME"===e.type||"CHIPS"===e.type&&Qa.indexOf(e.name)>=0}function no(e){var n=[e.name,"".concat(e.name,"_start"),"".concat(e.name,"_end")];if("DATETIME"===e.type){var t=e;n.push(t.dateFieldName||qn,t.dateTimeFieldName||Yn,t.timeZoneFieldName||Gn)}return n}function to(e){return!!e&&void 0!==e.mandatoryGroup}var ro=function(o){var i=n.useRef({}),s=n.useRef(new Set),d=n.useRef(!1),l=n.useRef(o.formStep.fields),p=n.useRef({}),c=n.useState({}),u=c[0],m=c[1],f=n.useState({}),_=f[0],h=f[1],x=n.useState({}),g=x[0],v=x[1],b=n.useState(!1),y=b[0],w=b[1],F=xe().context,k=function(e){var n=null==e?void 0:e.schedulingDisabled;return!0===n||"true"===n}(F),S=null==F?void 0:F.offeringsByDate,T=n.useMemo(function(){return function(e){var n=e;if("string"==typeof n)try{n=JSON.parse(n)}catch(e){return}if(n&&"object"==typeof n&&!Array.isArray(n)){var t={};return Object.entries(n).forEach(function(e){var n=e[0],r=e[1];t[n]=Array.isArray(r)?r.filter(dt):[]}),t}}(S)},[S]),C=null==F?void 0:F.nextBusinessDayBlock,D=n.useMemo(function(){return function(e){var n=e;if("string"==typeof n)try{n=JSON.parse(n)}catch(e){return}if(n&&"object"==typeof n){var t=n,r=t.date,a=jn(t.blockedUntil);if("string"==typeof r&&An.test(r)&&a)return{date:r,blockedUntil:a}}}(C)},[C]),R=n.useState(),N=R[0],I=R[1],A=n.useCallback(function(e){return k&&!!e&&eo(e)},[k]),M=o.formStep,j=o.onNextStep,E=o.onPrevStep,z=o.onData,O=o.onDataWithLabels,P=o.getData,L=o.getDataWithLabels,H=o.loading,U=o.currentStepIndex,B=o.totalSteps,W=o.onTrackNextStep,$=o.currentStepDataRef,q=o.isActive,Y=o.externalWidgetConfigPending,G=o.onTrackHandoffRendered,V=o.onTrackHandoffNoRender,X=o.onTrackHandoffScheduled,J=o.onTrackHandoffError,K=o.onExternalWidgetFallback,Z=o.submitError,Q=o.hideIntro,ee=q&&!Y&&Ka(M)?M.externalWidget:void 0,ne=xt(ee,{onRendered:function(e){return null==G?void 0:G(M.name,e)},onNoRender:function(e){return null==V?void 0:V(M.name,e)},onScheduled:function(e,n){return null==X?void 0:X(M.name,e,n)},onError:function(e){return null==J?void 0:J(M.name,e)},onFallback:function(e){return null==K?void 0:K(e)}}).outcome,te=n.useState(!1),re=te[0],ae=te[1];n.useLayoutEffect(function(){if(ee){var e=ee.anchorId,n=document.getElementById(e);if(n){if(!(n.childElementCount>0)){var t=new MutationObserver(function(){var n=document.getElementById(e);n&&n.childElementCount>0&&(ae(!0),t.disconnect())});return t.observe(n,{childList:!0,subtree:!0}),function(){return t.disconnect()}}ae(!0)}}else ae(!1)},[ee]);var oe=n.useCallback(function(){var e={};Object.entries(p.current).forEach(function(n){var r=n[0],a=n[1];try{var o=t(t(t({},P()),i.current),{safeIncludes:function(e,n){return Array.isArray(e)?e.includes(n):"string"==typeof e&&e===n}});e[r]=a.call(o)}catch(n){"development"===process.env.NODE_ENV&&console.error('Condition evaluation failed for field "'.concat(r,'":'),n),e[r]=!1}}),function(e,n){var t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return!1;for(var a=0,o=t;a<o.length;a++){var i=o[a];if(e[i]!==n[i])return!1}return!0}(e,_)||h(e)},[_,P]);n.useEffect(function(){for(var e={},n=0,t=M.fields;n<t.length;n++){var r=t[n];if(to(r)&&!A(r)){var a=r.mandatoryGroup;a&&(e[a]||(e[a]=[]),e[a].push(r.name))}}m(e)},[M.fields,A]);l.current!==M.fields&&(l.current=M.fields,s.current.clear(),d.current=!1,i.current={});for(var ie=0,se=M.fields;ie<se.length;ie++){var de=se[ie];!Za(de)||s.current.has(de.name)||Object.prototype.hasOwnProperty.call(i.current,de.name)||(i.current[de.name]=de.value,s.current.add(de.name))}var le=function(e){for(var n=t({},e),r=0,a=M.fields;r<a.length;r++){var o=a[r];A(o)&&delete n[o.name]}return n};n.useEffect(function(){for(var e=0,n=M.fields;e<n.length;e++){var t=n[e];if("CHIPS"===t.type){var r=t.items.filter(function(e){return Mt(e)}).filter(function(e){return e.selected}).map(function(e){return e.id});r.length>0&&!Object.prototype.hasOwnProperty.call(i.current,t.name)&&(i.current[t.name]=r)}if(t.condition){var a=Rn(t.condition);p.current[t.name]=new Function("return (".concat(a,");"))}}s.current.size>0&&!d.current&&(d.current=!0,z(le(i.current))),oe()},[oe,M.fields]);var pe=n.useCallback(function(){var e={},n=!0,r={};M.fields.forEach(function(t){var a={valid:!0},o=i.current[t.name];if(!1===_[t.name]||A(t))e[t.name]=a;else{if(function(e){return!!e&&"DROPDOWN"===e.type}(t))if(!t.mandatory||null!=o&&"none"!==o){if(null!=o&&"none"!==o){var s=t.items.find(function(e){return e.id===o});if(s&&s.freeFormInput){var d=s.freeFormFieldName||"message",l=i.current[d];(!l||"string"==typeof l&&""===l.trim())&&(e[d]={valid:!1,message:"Please specify additional details"},a={valid:!1,message:""})}}}else a={valid:!1,message:t.mandatoryError||"Please select an option"};else if(function(e){return!!e&&"DATERANGE"===e.type}(t))t.mandatory&&!function(e){var n=e;return!!(null==n?void 0:n.from)&&!!(null==n?void 0:n.to)}(o)&&(a={valid:!1,message:t.mandatoryError||"Please select a date range"});else if(function(e){return!!e&&"DATETIME"===e.type}(t))t.mandatory&&!function(e){var n=e;return!!(null==n?void 0:n.date)&&!!(null==n?void 0:n.start)}(o)&&(a={valid:!1,message:t.mandatoryError||"Please select a date and a time"});else if(Object.prototype.hasOwnProperty.call(i.current,t.name))if(function(e){return!!e&&"TEXT"===e.type}(t))if(!0===t.mandatory&&ka(o))a={valid:!1,message:t.mandatoryError||"This field is mandatory"};else if("EMAIL"!==t.format||ka(o)){if("PHONE"!==t.format||ka(o)){if("ZIP_CODE"===t.format&&!ka(o)&&(a=function(e){if(ka(e))return{valid:!0};var n=/^\d{5}$/.test(e)||/^\d{5}-\d{4}$/.test(e)||/^[A-Za-z]\d[A-Za-z]\s?\d[A-Za-z]\d$/.test(e);return{valid:n,message:n?void 0:"Invalid zip code or postal code"}}(o),a.valid)){var p=function(e){if(ka(e))return e;var n=e.trim(),t=n.match(/^([A-Za-z]\d[A-Za-z])(\d[A-Za-z]\d)$/);return t?"".concat(t[1].toUpperCase()," ").concat(t[2].toUpperCase()):/^[A-Za-z]\d[A-Za-z]\s\d[A-Za-z]\d$/.test(n)?n.toUpperCase():e}(o);p!==o&&(r[t.name]=p)}}else if(a=function(e){if(ka(e))return{valid:!0};var n=Sa(e);return{valid:n,message:n?void 0:"Invalid phone number"}}(o),a.valid){var c=function(e){if(ka(e)||!Sa(e))return e;var n=e.replace(/\D/g,"");return 11===n.length&&n.startsWith("1")&&(n=n.slice(1)),n.replace(/(\d{3})(\d{3})(\d{4})/,"($1) $2-$3")}(o);c!==o&&(r[t.name]=c)}}else a={valid:u=/^[\w-.]+@([\w-]+\.)+[\w-]{2,4}$/.test(String(o).toLowerCase()),message:u?void 0:"Invalid email address"};else!function(e){return!!e&&"CHIPS"===e.type}(t)?function(e){return!!e&&"DATE"===e.type}(t)&&t.mandatory&&null==o?a={valid:!1,message:"Please select a day"}:function(e){return!!e&&"CHECK"===e.type}(t)&&t.mandatory&&!(null==o?void 0:o.length)&&(a={valid:!1,message:t.mandatoryError||"This field is mandatory"}):t.minRequired&&o.length<t.minRequired?a={valid:!1,message:"Please select at least ".concat(t.minRequired," option(s)")}:t.maxAllowed&&o.length>t.maxAllowed?a={valid:!1,message:"Please select no more than ".concat(t.maxAllowed," option(s)")}:t.mandatory&&1!==(null==o?void 0:o.length)&&(a={valid:!1,message:"Please select one option"});var u;n=n&&a.valid,e[t.name]=a}});for(var a=function(t){if(!t.some(function(e){return!Ta(i.current[e])})){var r=M.fields.find(function(e){return e.name===t[0]}),a=g[t[0]],o=(null==a?void 0:a.message)||(null==r?void 0:r.mandatoryError)||"At least one of these fields is required";t.forEach(function(n){e[n]={valid:!1,message:o}}),n=!1}},o=0,s=Object.entries(u);o<s.length;o++){a(s[o][1])}return Ta(r)||(i.current=t(t({},i.current),r)),function(e,n){var t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return!1;for(var a=0,o=t;a<o.length;a++){var i=o[a];if(!n.hasOwnProperty(i))return!1;var s=e[i],d=n[i];if(s.valid!==d.valid)return!1}return!0}(g,e)||v(e),n},[_,g,M.fields,u,A]),ce=function(){return r(void 0,void 0,void 0,function(){var e;return a(this,function(n){switch(n.label){case 0:if(!pe()||y)return[2];w(!0),n.label=1;case 1:return n.trys.push([1,,4,5]),ue(i.current),W&&void 0!==U&&void 0!==B&&(e=U===B-1,W(M.name,U,le(i.current),e)),j?[4,j("submit"===M.nextAction)]:[3,3];case 2:n.sent(),n.label=3;case 3:return[3,5];case 4:return w(!1),[7];case 5:return[2]}})})},ue=function(e){for(var n=le(e),r=P(),a=L(),o={},i={},s=0,d=M.fields;s<d.length;s++){var l=d[s];if(A(l))for(var p=0,c=no(l);p<c.length;p++){var u=c[p];Object.prototype.hasOwnProperty.call(r,u)&&(o[u]=void 0),Object.prototype.hasOwnProperty.call(a,u)&&(i[u]=void 0)}}for(var m=t(t({},o),n),f={},_=function(e,n,t){if(n.length>0){var r=n.join(", ");m["".concat(e,"_start")]=r,f["".concat(e,"_start")]=r}if(t.length>0){var a=t.join(", ");m["".concat(e,"_end")]=a,f["".concat(e,"_end")]=a}},h=function(e){var t,r,a,o,i,s=n[e],d=M.fields.find(function(n){return n.name===e});if("CHIPS"===(null==d?void 0:d.type)&&void 0!==s){var l=[],p=[],c=[];s.forEach(function(e){var n=d.items.find(function(n){return n.id===e});if(n){l.push(n.label);var t=n;t.startTime&&p.push(t.startTime),t.endTime&&c.push(t.endTime)}}),f[e]=function(e){if(0===e.length)return"";if(1===e.length)return e[0];if(2===e.length)return e.join(" and ");var n=e.pop();return e.join(", ")+", and "+n}(l),_(e,p,c)}else if("DATETIME"===(null==d?void 0:d.type)&&void 0!==s){var u=d,h=s;m[e]=h.label,f[e]=h.label,_(e,h.start?[h.start]:[],h.end?[h.end]:[]);var x=u.dateFieldName||qn;m[x]=h.date,f[x]=h.date;var g=u.dateTimeFieldName||Yn;m[g]=h.datetime,f[g]=h.datetime;var v=at(u.schedule);if(v){var b=u.timeZoneFieldName||Gn;m[b]=v,f[b]=v}}else if("DROPDOWN"===(null==d?void 0:d.type)&&void 0!==s){var y=d.items.find(function(e){return e.id===s});y?y.label&&y.label.trim().length>0?f[e]=y.label:f[e]=s.replace(/_/g," ").split(" ").map(function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}).join(" "):f[e]=s}else"DATE"===(null==d?void 0:d.type)&&void 0!==s?f[e]=(t=new Date(s),r=t.getDate(),a=t.toLocaleString("default",{month:"long"}),o=t.getFullYear(),i=function(e){if(e>=11&&e<=13)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}(r),"".concat(a," ").concat(r).concat(i,", ").concat(o)):f[e]=s},x=0,g=Object.keys(n);x<g.length;x++){h(g[x])}z(m),O(t(t({},i),f))},me=function(){for(var e in g)if(!1!==_[e]&&!g[e].valid)return!0;return!1},fe=n.useCallback(function(e,n){var r,a,o=!Object.prototype.hasOwnProperty.call(i.current,e);if(s.current.has(e)){if(!o&&i.current[e]===n)return void s.current.delete(e);if(!o&&i.current[e]!==n)return}(o||i.current[e]!==n)&&(Array.isArray(n)&&0===n.length&&(n=void 0),i.current=t(t({},i.current),((r={})[e]=n,r)),(null===(a=null==M?void 0:M.fields)||void 0===a?void 0:a.some(function(n){return n.name===e&&"DATE"===n.type}))&&I(function(e){return e&&"function"==typeof e.format?e.format("YYYY-MM-DD"):void 0}(n)),$&&($.current=i.current),oe(),Ta(g)||pe())},[oe,g,pe,$,M]),_e=n.useContext(Re);oe();var he,ge=!!M&&M.fullBleed;return e.jsxs("div",{className:ge?Da:void 0,children:[!Q&&!!M&&(M.title||M.subtitle)&&e.jsxs("div",{className:Oa,children:[!!M.title&&e.jsx("p",{children:M.title}),!!M.subtitle&&e.jsx("p",{className:Pa,children:M.subtitle})]}),!!M&&M.warnBeforeUnloadMessage&&e.jsxs("div",{style:{backgroundColor:"#fff3cd",color:"#856404",padding:"12px 16px",marginBottom:"16px",borderRadius:"4px",border:"1px solid #ffeaa7",display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx("span",{style:{fontSize:"20px"},children:"⚠️"}),e.jsx("span",{children:M.warnBeforeUnloadMessage})]}),(he=M,!!he&&void 0!==he.iframe&&e.jsx("div",{className:Ca,children:e.jsx("iframe",{src:M.iframe.src,title:M.title,width:M.iframe.width||"100%",height:M.iframe.height||"100%",frameBorder:"0",allowFullScreen:!0})})),Ka(M)&&e.jsxs("div",{className:Ra,children:[e.jsx("div",{id:M.externalWidget.anchorId,className:Na}),q&&"pending"===ne&&!re&&e.jsxs("div",{className:Aa,role:"status","aria-live":"polite",children:[e.jsx("span",{className:Ma,children:e.jsx(Ue,{})}),e.jsx("p",{children:"Finding available appointments…"})]}),("no_render"===ne||"error"===ne)&&!M.externalWidget.fallbackStep&&e.jsx("div",{className:Ia,children:e.jsx("p",{children:"We're sorry, we couldn't load the booking form. Please try again later."})})]}),e.jsx("div",{children:function(){if(!M)return[];var n=M.fields||[],t=n.findIndex(function(e){return A(e)}),r=D&&n.some(function(e){return eo(e)&&"CHIPS"===e.type&&(n=e.items,t=D.date,r=D,(a=zn(n)).length>0&&a.every(function(e){return En(t,e.startTime,r)}));var n,t,r,a})?D.date:void 0,a=n.map(function(a,s){var d,l,p,c,u,m,f,h,x,v,b,y,w,k=s===n.length-1;if(A(a))return s===t?e.jsx("div",{className:"".concat(Ea," ").concat(za),children:e.jsx(Ft,{field:{name:"scheduling_disabled",type:"CARD",text:"We'll contact you to schedule a time."},onFieldChange:fe})},s):null;switch(a.type){case"TEXT":v="ADDRESS"===a.format?e.jsx(Fa,{field:a,onFieldChange:fe,value:i.current[a.name],errorMessage:null===(d=g[a.name])||void 0===d?void 0:d.message,required:a.mandatory,googleMapsApiKey:_e.googleMapsApiKey,mapsBaseUrl:_e.mapsBaseUrl},a.name):e.jsx(Ht,{field:a,onFieldChange:fe,value:i.current[a.name],errorMessage:null===(l=g[a.name])||void 0===l?void 0:l.message,required:a.mandatory,isLastField:k},a.name);break;case"DROPDOWN":var S=a,C=i.current[S.name],R=void 0;if(C&&"none"!==C){var I=S.items.find(function(e){return e.id===C});if(I&&I.freeFormInput){var M=I.freeFormFieldName||"message";R=null===(p=g[M])||void 0===p?void 0:p.message}}v=e.jsx(Kt,{field:S,onFieldChange:fe,errorMessage:null===(c=g[a.name])||void 0===c?void 0:c.message,required:a.mandatory,freeFormErrorMessage:R},a.name);break;case"CHECK":v=e.jsx(vt,{field:a,onFieldChange:fe,errorMessage:null===(u=g[a.name])||void 0===u?void 0:u.message},a.name);break;case"CHIPS":v=e.jsx(jt,{field:a,onFieldChange:fe,errorMessage:null===(m=g[a.name])||void 0===m?void 0:m.message,value:i.current[a.name],disabledItemIds:eo(a)?(b=a.items,y=N,w=D,zn(b).filter(function(e){return En(y,e.startTime,w)}).map(function(e){return e.id})):void 0},a.name);break;case"DATE":var j=null==F?void 0:F.busyDays;v=e.jsx(Mr,{field:a,onFieldChange:fe,errorMessage:null===(f=g[a.name])||void 0===f?void 0:f.message,busyDays:j,loading:H,blockedDate:r},a.name);break;case"DATETIME":v=e.jsx(Zr,{field:a,onFieldChange:fe,value:i.current[a.name],errorMessage:null===(h=g[a.name])||void 0===h?void 0:h.message,required:a.mandatory,busyDays:null==F?void 0:F.busyDays,offeringsByDate:T,nextBusinessDayBlock:D,preselectFirstAvailable:o.preselectFirstAvailableDate},a.name);break;case"DATERANGE":v=e.jsx(zr,{field:a,onFieldChange:fe,value:i.current[a.name],errorMessage:null===(x=g[a.name])||void 0===x?void 0:x.message,required:a.mandatory,isLastField:k},a.name);break;case"CARD":v=e.jsx(Ft,{field:In(a,L()),onFieldChange:fe},a.name);break;default:v=null}return e.jsx("div",{className:"".concat(Ea," ").concat(!1!==_[a.name]?za:""),children:v},s)});return a.filter(function(e){return null!==e})}()}),!!Z&&e.jsx("div",{className:ja,role:"alert",children:e.jsx("p",{children:Z})}),e.jsxs("div",t({className:"".concat(La," ").concat(M.final?Ha:"")},M.final?{"data-xapp-final-actions":""}:{},{children:[!!j&&"omit"!==M.nextAction&&M.final&&e.jsx("div",{className:Ua,children:e.jsx("button",{type:"button",className:"".concat($a," ").concat(me()||y?Ga:M.nextLabel?Ya:qa),disabled:y,onClick:ce,children:y?"Loading...":M.nextLabel||"Next"})}),e.jsxs("div",{className:Ba,children:[void 0===E&&e.jsx("div",{className:Wa}),!!E&&"omit"!==M.previousAction&&e.jsxs("button",{type:"button",className:"".concat($a," ").concat(qa," ").concat(Va),onClick:function(){ue(i.current),E&&E()},"aria-label":M.previousLabel||"Previous",children:[e.jsx("span",{className:Xa,children:M.previousLabel||"Previous"}),e.jsx("span",{className:Ja,"aria-hidden":"true",children:"←"})]}),!!j&&"omit"!==M.nextAction&&!M.final&&e.jsx("button",{type:"button",className:"".concat($a," ").concat(me()||y?Ga:M.nextLabel?Ya:qa),disabled:y,onClick:ce,children:y?"Loading...":M.nextLabel||"Next"})]})]}))]})},ao="FormFrame-module_xapp_form_frame_root__BLTha",oo="FormFrame-module_xapp_form_frame_intro__S4kWd",io="FormFrame-module_xapp_form_frame_title__GA8dy",so="FormFrame-module_xapp_form_frame_subtitle__WOeJI",lo="FormFrame-module_xapp_form_frame_framed__9E311",po="FormFrame-module_xapp_form_frame_plain__rBarK",co="FormFrame-module_xapp_form_frame_tab_row__osSVR",uo="FormFrame-module_xapp_form_frame_tab__0O2ga";ge(".FormFrame-module_xapp_form_frame_root__BLTha {\n display: block;\n}\n\n.FormFrame-module_xapp_form_frame_intro__S4kWd {\n background-color: #ffffff;\n padding: 28px 16px 18px;\n text-align: center;\n}\n\n.FormFrame-module_xapp_form_frame_title__GA8dy {\n margin: 0;\n font-family: Poppins, Arial, Verdana, sans-serif;\n font-size: 24px;\n font-weight: 700;\n line-height: 1.15;\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87));\n}\n\n.FormFrame-module_xapp_form_frame_subtitle__WOeJI {\n margin: 6px 0 0 0;\n font-family: Poppins, Arial, Verdana, sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 1.4;\n color: var(--xapp-form-widget-text-color, rgba(0, 0, 0, 0.87));\n opacity: 0.75;\n}\n\n.FormFrame-module_xapp_form_frame_framed__9E311 {\n position: relative;\n border: 4px solid var(--xapp-form-widget-border-color, #d3d3df);\n border-radius: 0;\n background-color: var(--xapp-form-widget-background-color, #f3f8fb);\n margin-top: -2px;\n padding: 24px 22px 8px;\n}\n\n.FormFrame-module_xapp_form_frame_plain__rBarK {\n display: block;\n}\n\n.FormFrame-module_xapp_form_frame_tab_row__osSVR {\n background-color: #ffffff;\n text-align: center;\n}\n\n.FormFrame-module_xapp_form_frame_tab__0O2ga {\n display: inline-block;\n position: relative;\n z-index: 1;\n padding: 12px 30px;\n border-radius: 12px 12px 0 0;\n background-color: var(--xapp-form-widget-header-background-color, #012b54);\n color: var(--xapp-form-widget-header-text-color, #b7c5d1);\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n font-size: 14px;\n font-weight: 700;\n letter-spacing: 1px;\n white-space: nowrap;\n}");var mo=function(n){var t=n.framing,r=n.framed,a=n.children,o=null==t?void 0:t.tabLabel,i=null==t?void 0:t.introTitle,s=null==t?void 0:t.introSubtitle,d=(null==t?void 0:t.introPlacement)||"above-tab",l=i||s?e.jsxs("div",{className:oo,"data-xapp-form-frame-intro":"",children:[!!i&&e.jsx("h2",{className:io,"data-xapp-form-frame-title":"",children:i}),!!s&&e.jsx("p",{className:so,"data-xapp-form-frame-subtitle":"",children:s})]}):null;return e.jsxs("div",{className:ao,children:["above-tab"===d&&l,r&&!!o&&e.jsx("div",{className:co,children:e.jsx("span",{className:uo,"data-xapp-form-frame-tab":"",children:o})}),e.jsxs("div",{className:r?lo:po,"data-xapp-form-frame":r?"framed":"plain",children:["inline"===d&&l,a]})]})},fo="SimpleNavigationHeader-module_xapp_navigation_header__YhCD1",_o="SimpleNavigationHeader-module_xapp_navigation_header_showcase__NhRLn",ho="SimpleNavigationHeader-module_xapp_navigation_header_container__V9y-e",xo="SimpleNavigationHeader-module_xapp_navigation_header_row__rmXFD",go="SimpleNavigationHeader-module_xapp_navigation_header_title__yVgEi",vo="SimpleNavigationHeader-module_xapp_navigation_header_track__Ktw8x",bo="SimpleNavigationHeader-module_xapp_navigation_header_step__tTjar",yo="SimpleNavigationHeader-module_xapp_navigation_header_dot__THRsN",wo="SimpleNavigationHeader-module_xapp_navigation_header_label__tLrJ6";ge('/**\n * The phone breakpoint.\n *\n * Width alone cannot express "phone". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step\'s action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field\'s helper / error line. The metrics are MUI\'s FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.SimpleNavigationHeader-module_xapp_navigation_header__YhCD1 {\n background-color: inherit !important;\n}\n\n.SimpleNavigationHeader-module_xapp_navigation_header_showcase__NhRLn {\n background-color: inherit !important;\n padding: 0px !important;\n}\n\n.SimpleNavigationHeader-module_xapp_navigation_header_container__V9y-e {\n background-color: inherit !important;\n}\n\n.SimpleNavigationHeader-module_xapp_navigation_header_row__rmXFD {\n display: flex;\n justify-content: center;\n gap: 16px;\n padding: 16px;\n}\n\n.SimpleNavigationHeader-module_xapp_navigation_header_title__yVgEi {\n margin: 0;\n color: var(--xapp-form-widget-header-text-color, #b7c5d1);\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif);\n font-size: 2.125rem;\n font-weight: 400;\n line-height: 1.235;\n letter-spacing: 0.00735em;\n}\n\n.SimpleNavigationHeader-module_xapp_navigation_header_track__Ktw8x {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n min-height: 50px;\n}\n.SimpleNavigationHeader-module_xapp_navigation_header_track__Ktw8x::before {\n content: "";\n position: absolute;\n top: 50%;\n left: 0;\n right: 0;\n height: 3px;\n background-color: white;\n z-index: 1;\n}\n\n.SimpleNavigationHeader-module_xapp_navigation_header_step__tTjar {\n position: relative;\n top: 10px;\n z-index: 2;\n display: flex;\n flex-direction: column;\n align-items: center;\n min-width: 100px;\n}\n\n.SimpleNavigationHeader-module_xapp_navigation_header_dot__THRsN {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: 30px !important;\n min-width: auto;\n height: 30px !important;\n margin: 0;\n padding: 0 !important;\n border: 3px solid white !important;\n border-radius: 50% !important;\n box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);\n cursor: pointer;\n}\n.SimpleNavigationHeader-module_xapp_navigation_header_dot__THRsN:focus {\n outline: none;\n}\n.SimpleNavigationHeader-module_xapp_navigation_header_dot__THRsN:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n\n.SimpleNavigationHeader-module_xapp_navigation_header_label__tLrJ6 {\n margin: 8px;\n color: var(--xapp-form-widget-header-text-color, #b7c5d1);\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, Roboto, Helvetica, Arial, sans-serif);\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 1.43;\n letter-spacing: 0.01071em;\n}');var Fo=function(n){var t=n.items,r=n.onHeaderClick,a=n.labelHeader,o=n.stepName,i=n.isShowCase;if(a){var s=t.find(function(e){return e.step===o}),d=null==s?void 0:s.label;return void 0===d?null:e.jsx("div",{className:"".concat(xo," ").concat(i?_o:ho),children:e.jsx("h4",{className:go,children:d})})}return e.jsx("div",{className:"".concat(xo," ").concat(fo),children:e.jsx("div",{className:vo,children:t.map(function(n,t){return e.jsxs("div",{className:bo,children:[e.jsx("button",{type:"button","aria-label":n.label,className:"".concat(fo," ").concat(yo),onClick:function(){r("".concat(n.step))}}),e.jsx("p",{className:wo,children:n.label})]},t)})})})};
2
+ /*! Copyright (c) 2025, XAPP AI */function ko(e,n){var t=e.slice(0,5);return!!n.find(function(e){if(e===t)return!0;if(e.includes("*")){var n=e.replace(/\*/g,"\\d")+"$";return new RegExp("^".concat(n)).test(t)}return!1})}function So(e){if(e){var n=e.match(/\b\d{5}(?:-\d{4})?\b/g);if(n)for(var t=n.length-1;t>=0;t--){var r=n[t],a=e.indexOf(r),o=e.slice(0,a);if(/(,|\b[A-Z]{2})\s*$/.test(o.trim()))return r;if(a>15)return r}}}var To="FormDisplay-module_xapp_formstep__OW1rY",Co="FormDisplay-module_active__5wTV3",Do="FormDisplay-module_xapp_header_container__Y-eFl",Ro="FormDisplay-module_xapp_header_container_showcase__MWJfr";ge(".FormDisplay-module_xapp_formstep__OW1rY {\n display: none;\n padding: 8px;\n}\n.FormDisplay-module_xapp_formstep__OW1rY.FormDisplay-module_active__5wTV3 {\n display: block;\n background-color: var(--xapp-form-widget-background-color, #f3f8fb) !important;\n}\n.FormDisplay-module_xapp_formstep__OW1rY.FormDisplay-module_title__-BtIw p {\n margin: 10px 0 0 0;\n}\n.FormDisplay-module_xapp_formstep__OW1rY {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n\n.FormDisplay-module_xapp_header_container__Y-eFl {\n background-color: var(--xapp-form-widget-header-background-color, #012b54) !important;\n position: absolute;\n top: 0px;\n right: 0px;\n left: 0px;\n z-index: 1000;\n min-height: 88px;\n padding-top: 16px;\n}\n.FormDisplay-module_xapp_header_container__Y-eFl .FormDisplay-module_empty_step_header__eHbBH {\n height: 42px;\n}\n.FormDisplay-module_xapp_header_container__Y-eFl {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.FormDisplay-module_xapp_header_container__Y-eFl .MuiTypography-root {\n color: var(--xapp-form-widget-header-text-color, #b7c5d1) !important;\n}\n\n.FormDisplay-module_xapp_header_container_showcase__MWJfr {\n border-top-left-radius: 12px;\n border-top-right-radius: 12px;\n background-color: var(--xapp-form-widget-header-background-color, #012b54) !important;\n padding-top: 10px;\n padding-bottom: 10px;\n margin-top: 10px;\n}\n.FormDisplay-module_xapp_header_container_showcase__MWJfr .FormDisplay-module_empty_step_header__eHbBH {\n height: 42px;\n}\n.FormDisplay-module_xapp_header_container_showcase__MWJfr {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.FormDisplay-module_xapp_header_container_showcase__MWJfr .MuiTypography-root {\n color: var(--xapp-form-widget-header-text-color, #b7c5d1) !important;\n}");var No=function(o){var i,s=o.form,d=o.onActionResponse,l=o.isShowCase,p=o.loading,c=o.onTrackNextStep,u=o.onTrackPreviousStep,m=o.onTrackSubmit,f=o.onTrackSubmitFailure,_=o.currentStepDataRef,h=o.initialStep,x=o.preselectFirstAvailableDate,g=o.onTrackInitialStep,v=o.onFormNext,b=o.stepUpdate,y=o.onTrackHandoffRendered,w=o.onTrackHandoffNoRender,F=o.onTrackHandoffScheduled,k=o.onTrackHandoffError,S=n.useContext(Re).framing,T=n.useState(0),C=T[0],D=T[1],R=n.useRef(!1),N=n.useState({}),I=N[0],A=N[1],M=n.useState(void 0),j=M[0],E=M[1],z=function(e){var n=e.step;n&&A(function(r){var a,o,i,s=r[n],d={fields:e.fields||[]};return(null===(o=e.externalWidget)||void 0===o?void 0:o.config)?(H.current[n]=!0,d.externalWidget={config:t(t({},null===(i=null==s?void 0:s.externalWidget)||void 0===i?void 0:i.config),e.externalWidget.config)}):(null==s?void 0:s.externalWidget)&&(d.externalWidget=s.externalWidget),t(t({},r),((a={})[n]=d,a))})};n.useEffect(function(){b&&z(b)},[b]);var O=n.useState(!1),P=O[0],L=O[1],H=n.useRef({}),U=n.useState(!1),B=U[0],W=U[1];n.useEffect(function(){var e;W(!1);var n=null===(e=s.steps)||void 0===e?void 0:e[C];if(n&&Ka(n)){var t=setTimeout(function(){W(!0),H.current[n.name]=!0,L(!1)},5e3);return function(){return clearTimeout(t)}}},[C]);var $=n.useRef({});n.useEffect(function(){if(Array.isArray(s.steps)&&s.steps.length>0)for(var e=function(e){if(e.condition){var n=Rn(e.condition,"context",["isInServiceArea"]);$.current[e.name]=function(e){return new Function("context","isInServiceArea","return (".concat(n,");"))(e,ko)}}},n=0,t=s.steps;n<t.length;n++){e(t[n])}},[null==s?void 0:s.steps]),n.useEffect(function(){var e;(C<0||C>=(null===(e=null==s?void 0:s.steps)||void 0===e?void 0:e.length))&&D(0)},[null==s?void 0:s.steps,C]),n.useEffect(function(){if(!R.current&&"number"==typeof h){var e=null==s?void 0:s.steps;(null==e?void 0:e.length)&&(R.current=!0,h>0&&h<e.length&&(D(h),null==g||g(h)))}},[null==s?void 0:s.steps,h,g]);var q=n.useMemo(function(){var e,n,t=null===(e=s.steps)||void 0===e?void 0:e[C];return null!==(n=null==t?void 0:t.warnBeforeUnload)&&void 0!==n&&n},[C,s.steps]);n.useEffect(function(){if(q){var e=function(e){return e.preventDefault(),e.returnValue="",""};return window.addEventListener("beforeunload",e),function(){window.removeEventListener("beforeunload",e)}}},[q]);var Y=n.useRef({}),G=n.useRef({}),V=n.useRef({}),X=n.useRef(!1);n.useEffect(function(){X.current=!1},[C]);var J=function(e){return r(void 0,void 0,void 0,function(){var n,r,o,i,d,l,p,c,u,m,f,_,h,x;return a(this,function(a){switch(a.label){case 0:for(n=-1,r=C+1;r<s.steps.length;r++){if(o=s.steps[r],i=$.current[o.name],d=Y.current.zip_code||Y.current.zip||So(Y.current.address),l=t(t({},Y.current),{zip:d}),!i){n=r;break}if(i(l)){n=r;break}}if(p=s.steps[C],!(n>=0&&!e&&v&&(null==p?void 0:p.serverCallback)))return[3,4];A(function(e){var r=t({},e);return delete r[s.steps[n].name],r}),a.label=1;case 1:return a.trys.push([1,3,,4]),c=new Promise(function(e){return setTimeout(function(){return e(void 0)},3e3)}),u=v({result:V.current,form:s.name,step:s.steps[C].name,nextStep:s.steps[n].name}),[4,Promise.race([u,c])];case 2:if(m=a.sent(),null==(f=m)?void 0:f.displays)for(_=0,h=f.displays;_<h.length;_++)"FORM_STEP_UPDATE"===(x=h[_]).type&&z(x);return[3,4];case 3:return a.sent(),[3,4];case 4:return n>=0&&!!e&&Ka(s.steps[n])&&!H.current[s.steps[n].name]&&L(!0),n>=0&&D(n),e?[4,te(C)]:[3,6];case 5:a.sent(),a.label=6;case 6:return[2]}})})},K=function(){for(var e,n,r=C,a=(null===(n=null===(e=s.steps)||void 0===e?void 0:e[r])||void 0===n?void 0:n.name)||"unknown",o=C-1;o>=0;o--){var i=s.steps[o],d=$.current[i.name],l=Y.current.zip_code||Y.current.zip||So(Y.current.address),p=t(t({},Y.current),{zip:l});if(!d){u&&u(a,r,i.name,o),D(o);break}if(d(p)){u&&u(a,r,i.name,o),D(o);break}}},Z=function(e){V.current=e,Y.current=t(t({},Y.current),e)},Q=function(){return Y.current},ee=function(e){G.current=t(t({},G.current),e)},ne=function(){return G.current},te=function(e){return r(void 0,void 0,void 0,function(){var n,t,r,o,i;return a(this,function(a){switch(a.label){case 0:if(X.current)return[2];if(X.current=!0,t=(n=null!=e?e:C)>=0&&n<s.steps.length?n:0,m&&m(s.steps[t].name,t,Y.current,s.steps.length),r={result:Y.current,form:s.name,step:s.steps[t].name,final:!!s.steps[t].final},"function"!=typeof d)return[2];E(void 0),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,d(r,"FORM_SUBMIT")];case 2:return a.sent(),[3,4];case 3:return o=a.sent(),X.current=!1,E(t),i=o instanceof Error?o.message:String(o),se("FORM_SUBMIT failed on step ".concat(s.steps[t].name,": ").concat(i)),f&&f(s.steps[t].name,t,s.steps.length,i),[3,4];case 4:return[2]}})})},re=function(e){var n=s.steps.findIndex(function(n){return n.name===e});-1!==n?D(n):se("External widget fallback: Cannot find step to jump to: ".concat(e))},ae=C;(C<0||C>=(null===(i=null==s?void 0:s.steps)||void 0===i?void 0:i.length))&&(ae=0);var oe=Ka(s.steps[ae]),ie=!oe,de=oe,le=!!(null==S?void 0:S.tabLabel)&&!!s.labelHeader&&ie||de;return e.jsxs("div",t({},le?{"data-xapp-header-suppressed":""}:{},de?{"data-xapp-bare-handoff":""}:{},{children:[s.header.length>0&&!le&&e.jsx("div",{className:l?Ro:Do,children:e.jsx(Fo,{items:s.header,onHeaderClick:function(e){var n=s.steps.findIndex(function(n){return n.name===e});-1!==n?D(n):se("Header click: Cannot find step to jump to: ".concat(e))},labelHeader:s.labelHeader,stepName:s.steps[ae].name,isShowCase:l})}),e.jsx("div",{children:s.steps.map(function(n,r){var a,o,i=I[n.name],d=n;if((null==i?void 0:i.fields)&&(d=t(t({},d),{fields:i.fields})),null===(a=null==i?void 0:i.externalWidget)||void 0===a?void 0:a.config){var l=n.externalWidget;l&&(d=t(t({},d),{externalWidget:t(t({},l),{config:t(t({},l.config),i.externalWidget.config)})}))}var u=s.steps[ae].name===n.name,m=!Ka(d),f=e.jsx(ro,{formStep:d,preselectFirstAvailableDate:x,onData:Z,onDataWithLabels:ee,onNextStep:ae<s.steps.length?J:void 0,onPrevStep:ae>0?K:void 0,getData:Q,getDataWithLabels:ne,loading:p,currentStepIndex:r,totalSteps:s.steps.length,onTrackNextStep:c,currentStepDataRef:_,isActive:u,externalWidgetConfigPending:P&&Ka(n)&&!(null===(o=null==i?void 0:i.externalWidget)||void 0===o?void 0:o.config)&&!B,onTrackHandoffRendered:y,onTrackHandoffNoRender:w,onTrackHandoffScheduled:F,onTrackHandoffError:k,onExternalWidgetFallback:re,hideIntro:!!(null==S?void 0:S.introTitle)||!!(null==S?void 0:S.introSubtitle)||Ka(d),submitError:j===r?"We couldn't submit your information. Please check your connection and try again.":void 0});return e.jsx("div",{className:"".concat(To," ").concat(u?Co:""),"data-xapp-form-step-active":u?"true":"false",children:S?e.jsx(mo,{framing:S,framed:m,children:f}):f},r)})})]}))},Io=function(n){var t=n.display,r=n.onActionResponse,a=n.loading,o=n.onTrackNextStep,i=n.onTrackPreviousStep,s=n.onTrackSubmit,d=n.onTrackSubmitFailure,l=n.currentStepDataRef,p=n.initialStep,c=n.preselectFirstAvailableDate,u=n.onTrackInitialStep,m=n.onFormNext,f=n.stepUpdate,_=n.onTrackHandoffRendered,h=n.onTrackHandoffNoRender,x=n.onTrackHandoffScheduled,g=n.onTrackHandoffError;return e.jsxs("div",{className:"xapp-search-response-display",children:[pe(t)&&e.jsx(No,{form:t,loading:a,onActionResponse:r,onTrackNextStep:o,onTrackPreviousStep:i,onTrackSubmit:s,onTrackSubmitFailure:d,currentStepDataRef:l,initialStep:p,preselectFirstAvailableDate:c,onTrackInitialStep:u,onFormNext:m,stepUpdate:f,onTrackHandoffRendered:_,onTrackHandoffNoRender:h,onTrackHandoffScheduled:x,onTrackHandoffError:g}),le(t)&&e.jsx(Dn,{list:t}),de(t)&&e.jsx(Sn,{carousel:t})]})},Ao=function(n){var t=n.html;return e.jsx("div",{className:"xapp-search-response-html",dangerouslySetInnerHTML:{__html:t}})},Mo=function(n){var t=n.text;return e.jsx("div",{className:"xapp-search-response-text",children:e.jsx("p",{children:t})})},jo=function(t){var r=t.audio,a=t.onAudioChange,o=n.useRef(null);return n.useEffect(function(){var e=o.current,n=function(){ie("Audio finished playing"),a(!1)},t=function(){ie("Audio started playing"),a(!0)};return e&&(e.addEventListener("ended",n),e.addEventListener("play",t)),function(){e&&(e.removeEventListener("ended",n),e.removeEventListener("play",t))}},[r,a]),e.jsx("audio",{ref:o,autoPlay:!0,src:r})},Eo="SearchResponseOutputSpeech-module_xapp_search_response_output_speech__DCf8F";ge("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.SearchResponseOutputSpeech-module_xapp_search_response_output_speech__DCf8F {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n font-weight: normal;\n font-size: 16px;\n font-style: normal;\n color: #000;\n}\n.SearchResponseOutputSpeech-module_xapp_search_response_output_speech__DCf8F p {\n margin: 0 0 1em 0;\n}\n.SearchResponseOutputSpeech-module_xapp_search_response_output_speech__DCf8F p:last-child {\n margin-bottom: 0;\n}");var zo=function(t){var r,a=t.outputSpeech,o=t.onAudioChange,i="string"==typeof a?a:null==a?void 0:a.displayText,s="string"==typeof a||null==a?void 0:a.html,d="string"==typeof a||null==a?void 0:a.ssml;if(n.useContext(Re).isVoiceEnabled){var l=d?function(e){for(var n,t=/<audio\s+src\s*=\s*"(.+?)"\s*\/?>/g,r=[];null!==(n=t.exec(e));)r.push(n[1]);return r}(d):[];r=l.length>0?l[0]:void 0}return e.jsxs("div",{className:Eo,children:[!!s&&e.jsx(Ao,{html:s}),!!i&&!s&&e.jsx(Mo,{text:i}),!!r&&e.jsx(jo,{audio:r,onAudioChange:o})]})},Oo={};Object.defineProperty(Oo,"__esModule",{value:!0});var Po=Oo.isLinkoutSuggestion=function(e){if(!e)return!1;return void 0!==e.url};var Lo="Button-module_xapp_search_btn__cQf3T",Ho="Button-module_xapp_search_btn__expand__dUwot";ge("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.Button-module_xapp_search_btn__cQf3T {\n display: inline-block;\n border-radius: var(--xapp-form-widget-border-radius-md, 12px);\n border: solid 1px var(--xapp-form-widget-border-color, #d3d3df);\n background: white;\n padding: 4px 24px;\n color: black;\n text-decoration: none;\n box-sizing: border-box;\n text-align: center;\n line-height: normal;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n font-size: 16px;\n cursor: pointer;\n transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out, transform 150ms ease-in-out;\n}\n.Button-module_xapp_search_btn__cQf3T:hover {\n background-color: rgba(0, 0, 0, 0.04);\n box-shadow: var(--xapp-form-widget-box-shadow-subtle, 0 2px 8px rgba(0, 0, 0, 0.08));\n}\n.Button-module_xapp_search_btn__cQf3T:active {\n transform: scale(0.98);\n}\n.Button-module_xapp_search_btn__cQf3T:focus {\n outline: none;\n}\n.Button-module_xapp_search_btn__cQf3T:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n.Button-module_xapp_search_btn__expand__dUwot {\n width: 100%;\n}");var Uo=function(n){var t=n.className,r=n.expand,a=n.onClick;return e.jsx("button",{type:"button",className:"".concat(Lo," ").concat(r?Ho:""," ").concat(t||""),onClick:a,children:n.children})},Bo="SuggestedAction-module_xapp_search_suggested_action__gbLCz";ge("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.SuggestedAction-module_xapp_search_suggested_action__gbLCz {\n display: inline-block;\n border-radius: var(--xapp-form-widget-border-radius-md, 12px);\n border: solid 1px var(--xapp-form-widget-border-color, var(--xapp-form-accent-color, #d3d3df));\n background: white;\n padding: 4px 24px;\n color: black;\n text-decoration: none;\n box-sizing: border-box;\n text-align: center;\n line-height: normal;\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n font-size: 16px;\n cursor: pointer;\n transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out, transform 150ms ease-in-out;\n}\n.SuggestedAction-module_xapp_search_suggested_action__gbLCz:hover {\n background-color: rgba(0, 0, 0, 0.04);\n box-shadow: var(--xapp-form-widget-box-shadow-subtle, 0 2px 8px rgba(0, 0, 0, 0.08));\n}\n.SuggestedAction-module_xapp_search_suggested_action__gbLCz:active {\n transform: scale(0.98);\n}\n.SuggestedAction-module_xapp_search_suggested_action__gbLCz:focus {\n outline: none;\n}\n.SuggestedAction-module_xapp_search_suggested_action__gbLCz:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}");var Wo=function(t){var r=t.action,a=t.className,o=t.onClick,i=n.useCallback(function(){o(r)},[r,o]);return Po(r)?e.jsx("span",{className:"".concat(Bo," ").concat(a||""),children:e.jsx("a",{href:r.url,children:De(r)})}):e.jsxs(Uo,{className:"".concat(Bo," ").concat(a||""),onClick:i,children:[" ",De(r)]})},$o={xapp_search_suggested_actions__actions:"SuggestedActions-module_xapp_search_suggested_actions__actions__Apv0-",xapp_search_suggested_actions__item:"SuggestedActions-module_xapp_search_suggested_actions__item__Q7nQb"};ge(".SuggestedActions-module_xapp_search_suggested_actions__actions__Apv0- {\n margin-top: 8px;\n margin-bottom: 8px;\n}\n.SuggestedActions-module_xapp_search_suggested_actions__item__Q7nQb {\n margin-right: 16px;\n}");var qo=function(n){var t=n.actions,r=n.onActionClick;return e.jsx("div",{className:$o.xapp_search_suggested_actions,children:e.jsx("div",{className:$o.xapp_search_suggested_actions__actions,children:t.map(function(n,t){return e.jsx(Wo,{action:n,className:$o.xapp_search_suggested_actions__item,onClick:r},t)})})})},Yo={xapp_search_response_part:"SearchResponsePart-module_xapp_search_response_part__sF6gs",noHeaderForm:"SearchResponsePart-module_noHeaderForm__HdlyL"};ge(".SearchResponsePart-module_xapp_search_response_part__sF6gs {\n margin-bottom: 12px;\n margin-top: 86px;\n border-radius: 8px;\n}\n.SearchResponsePart-module_xapp_search_response_part__sF6gs.SearchResponsePart-module_noHeaderForm__HdlyL {\n margin-top: 12px;\n}\n.SearchResponsePart-module_xapp_search_response_part__sF6gs:has([data-xapp-header-suppressed]) {\n margin-top: 12px;\n}");var Go=function(n){var t=n.extraClass,r=t?Yo[t]||t:"";return e.jsx("div",{className:"".concat(Yo.xapp_search_response_part," ").concat(r),children:n.children})},Vo="FormResponse-module_xapp_search_response__r2YN1";ge(".FormResponse-module_xapp_search_response__r2YN1 {\n padding: 0 10px;\n overflow: auto;\n}");var Xo=function(n){var t=n.response,r=n.className,a=n.onActionClick,o=n.onActionResponse,i=n.onAudioChange,s=n.loading,d=n.onTrackNextStep,l=n.onTrackPreviousStep,p=n.onTrackSubmit,c=n.onTrackSubmitFailure,u=n.currentStepDataRef,m=n.initialStep,f=n.preselectFirstAvailableDate,_=n.onTrackInitialStep,h=n.onFormNext,x=n.stepUpdate,g=n.onTrackHandoffRendered,v=n.onTrackHandoffNoRender,b=n.onTrackHandoffScheduled,y=n.onTrackHandoffError,w=t.outputSpeech,F=t.displays,k="object"==typeof w?w.suggestions:void 0;return e.jsxs("div",{className:"".concat(Vo," ").concat(r||""),children:[!!w&&e.jsx(Go,{children:e.jsx(Ze,{children:e.jsx(zo,{outputSpeech:w,onAudioChange:i})})}),!!(null==k?void 0:k.length)&&(null==k?void 0:k.length)>0&&e.jsx(qo,{actions:k,onActionClick:a}),!!(null==F?void 0:F.length)&&(null==F?void 0:F.length)>0&&F.map(function(n,t){var r=pe(n)&&(!n.header||0===n.header.length);return e.jsx(Go,{extraClass:r?"noHeaderForm":"",children:e.jsx(Io,{display:n,onActionResponse:o,loading:s,onTrackNextStep:d,onTrackPreviousStep:l,onTrackSubmit:p,onTrackSubmitFailure:c,currentStepDataRef:u,initialStep:m,preselectFirstAvailableDate:f,onTrackInitialStep:_,onFormNext:h,stepUpdate:x,onTrackHandoffRendered:g,onTrackHandoffNoRender:v,onTrackHandoffScheduled:b,onTrackHandoffError:y})},t)})]})},Jo=["pointerdown","keydown","scroll","touchstart"],Ko=function(){function e(e,n,t){this.api=e,this.sessionId=n,this.formId=t}return e.forVisit=function(n,t){return new e(n,n.visitSession().sessionId,t)},e.prototype.trackFormOpen=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata({isOpen:!0}),this.watchForFirstInteraction(),t={eventType:"form_open",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),ie("[EventTracking] form_open event tracked: ".concat(e.formName)),[3,3];case 2:return r=a.sent(),se("[EventTracking] Failed to track form_open event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackEngaged=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata(),t={eventType:"engaged",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),ie("[EventTracking] engaged event tracked: ".concat(e.formName," (").concat(e.trigger,")")),[3,3];case 2:return r=a.sent(),se("[EventTracking] Failed to track engaged event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackNextStep=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata(),t={eventType:"next_step",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),ie("[EventTracking] next_step event tracked: ".concat(e.completedStepName)),[3,3];case 2:return r=a.sent(),se("[EventTracking] Failed to track next_step event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackPreviousStep=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata(),t={eventType:"previous_step",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),ie("[EventTracking] previous_step event tracked: ".concat(e.fromStepName," -> ").concat(e.toStepName)),[3,3];case 2:return r=a.sent(),se("[EventTracking] Failed to track previous_step event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackStepChange=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata(),t={eventType:"step_change",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),ie("[EventTracking] step_change event tracked: ".concat(e.fromStepName," -> ").concat(e.toStepName," (").concat(e.direction,")")),[3,3];case 2:return r=a.sent(),se("[EventTracking] Failed to track step_change event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackSubmit=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata(),t={eventType:"submit",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),ie("[EventTracking] submit event tracked: ".concat(e.finalStepName)),[3,3];case 2:return r=a.sent(),se("[EventTracking] Failed to track submit event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackSubmitFailure=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata(),t={eventType:"submit_failure",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),ie("[EventTracking] submit_failure event tracked: ".concat(e.finalStepName)),[3,3];case 2:return r=a.sent(),se("[EventTracking] Failed to track submit_failure event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackClose=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata(),t={eventType:"close",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),ie("[EventTracking] close event tracked: ".concat(e.lastStepName)),[3,3];case 2:return r=a.sent(),se("[EventTracking] Failed to track close event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackPartialData=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata(),t={eventType:"partial_data",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),ie("[EventTracking] partial_data event tracked: ".concat(e.lastStepName," (").concat(e.abandonmentReason,")")),[3,3];case 2:return r=a.sent(),se("[EventTracking] Failed to track partial_data event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackHandoffRendered=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata(),t={eventType:"handoff_rendered",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),ie("[EventTracking] handoff_rendered event tracked: ".concat(e.stepName," (").concat(e.provider,")")),[3,3];case 2:return r=a.sent(),se("[EventTracking] Failed to track handoff_rendered event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackHandoffNoRender=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata(),t={eventType:"handoff_no_render",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),ie("[EventTracking] handoff_no_render event tracked: ".concat(e.stepName," (").concat(e.provider,")")),[3,3];case 2:return r=a.sent(),se("[EventTracking] Failed to track handoff_no_render event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackHandoffScheduled=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata(),t={eventType:"handoff_scheduled",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),ie("[EventTracking] handoff_scheduled event tracked: ".concat(e.stepName," (").concat(e.provider,")")),[3,3];case 2:return r=a.sent(),se("[EventTracking] Failed to track handoff_scheduled event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackHandoffError=function(e){return r(this,void 0,void 0,function(){var n,t,r;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.buildMetadata(),t={eventType:"handoff_error",metadata:n,data:e},[4,this.sendEvent(t)];case 1:return a.sent(),ie("[EventTracking] handoff_error event tracked: ".concat(e.stepName," (").concat(e.provider,")")),[3,3];case 2:return r=a.sent(),se("[EventTracking] Failed to track handoff_error event: ".concat(r)),[3,3];case 3:return[2]}})})},e.prototype.trackLoad=function(e){try{var n=this.buildMetadata();delete n.currentUrl;var r={eventType:"load",metadata:t(t({},n),e),data:{}};return this.api.trackEventBeacon(r,"form")}catch(e){return se("[EventTracking] Failed to queue load event: ".concat(e)),!1}},e.prototype.trackPartialDataBeacon=function(e){try{var n={eventType:"partial_data",metadata:this.buildMetadata(),data:e};return this.api.trackEventBeacon(n)}catch(e){return se("[EventTracking] Failed to queue partial_data beacon: ".concat(e)),!1}},e.prototype.buildMetadata=function(e){var n=(void 0===e?{}:e).isOpen,t=void 0!==n&&n,r=new Date,a=Date.now();t&&void 0===this.openedAt&&(this.openedAt=a);var o={timestamp:r.toISOString(),sessionId:this.sessionId||"unknown",formId:this.formId||"unknown",userAgent:navigator.userAgent},i=$();i&&(o.internal=i),void 0!==this.openedAt&&(o.msOnPage=String(Math.max(0,a-this.openedAt)),void 0!==this.firstInteractionAt&&(o.msToFirstInteraction=String(Math.max(0,this.firstInteractionAt-this.openedAt))));try{o.timezone=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){}try{o.language=navigator.language,o.screenWidth=String(window.screen.width),o.screenHeight=String(window.screen.height),o.viewportWidth=String(window.innerWidth),o.viewportHeight=String(window.innerHeight)}catch(e){}var s=J(),d=s.visitorId,l=s.visitId;o.userId=d,o.visitorId=d,o.visitId=l;try{var p=new URL(window.location.href);(null==p?void 0:p.host.toLowerCase().startsWith("localhost"))||(o.currentUrl=window.location.href)}catch(e){}try{var c=q(document.referrer);c&&(o.referrer=c)}catch(e){}try{var u=this.getTrackingParameters();Object.assign(o,u)}catch(e){}return o},e.prototype.dispose=function(){var e;null===(e=this.stopWatchingForInteraction)||void 0===e||e.call(this)},e.prototype.adoptVisitFrom=function(e){var n;e&&e!==this&&void 0!==e.openedAt&&(this.openedAt=e.openedAt,this.firstInteractionAt=e.firstInteractionAt,null===(n=e.stopWatchingForInteraction)||void 0===n||n.call(e),void 0===this.firstInteractionAt&&this.watchForFirstInteraction())},e.prototype.watchForFirstInteraction=function(){var e=this;if(!this.stopWatchingForInteraction&&void 0===this.firstInteractionAt&&"undefined"!=typeof document)try{var n=function(n){var t;n.isTrusted&&(void 0===e.firstInteractionAt&&(e.firstInteractionAt=Date.now()),null===(t=e.stopWatchingForInteraction)||void 0===t||t.call(e))};this.stopWatchingForInteraction=function(){for(var t=0,r=Jo;t<r.length;t++){var a=r[t];document.removeEventListener(a,n,!0)}e.stopWatchingForInteraction=void 0};for(var t=0,r=Jo;t<r.length;t++){var a=r[t];document.addEventListener(a,n,{capture:!0,passive:!0})}}catch(e){}},e.prototype.getTrackingParameters=function(){return re(this.api.trackingScope)},e.prototype.sendEvent=function(e){return r(this,void 0,void 0,function(){var n;return a(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.api.trackEvent(e.eventType,e)];case 1:return t.sent(),[3,3];case 2:return n=t.sent(),se("[EventTracking] API call failed: ".concat(n)),[3,3];case 3:return[2]}})})},e}(),Zo="FormWidget-module_loading__aAJ-B",Qo="FormWidget-module_xapp_form_widget__V-G-H",ei="FormWidget-module_xapp_form_widget__content__a9NXC",ni="FormWidget-module_xapp_form_widget__response__X8Hbz",ti="FormWidget-module_xapp_form_widget__spinner__FBxso",ri="FormWidget-module_xapp_form_widget__close__0lp0O",ai="FormWidget-module_embedded__UB1Gi";ge("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.FormWidget-module_loading__aAJ-B {\n background-color: rgba(0, 0, 0, 0) !important;\n border: 0px !important;\n}\n\n.FormWidget-module_xapp_form_widget__V-G-H {\n display: flex;\n flex-direction: column;\n border: solid 1px var(--xapp-form-widget-border-color, #d3d3df);\n background: var(--xapp-form-widget-background-color, #f3f8fb);\n border-radius: var(--xapp-form-widget-border-radius-xl, 20px);\n overflow: hidden;\n max-width: 740px;\n max-height: 100%;\n box-shadow: var(--xapp-form-widget-box-shadow, 0 4px 24px rgba(0, 0, 0, 0.12));\n box-sizing: border-box;\n position: relative;\n}\n.FormWidget-module_xapp_form_widget__V-G-H:has([data-xapp-bare-handoff]) {\n border: 0;\n border-radius: 0;\n box-shadow: none;\n background: transparent;\n}\n.FormWidget-module_xapp_form_widget__V-G-H:has([data-xapp-bare-handoff]) .FormWidget-module_xapp_form_widget__content__a9NXC {\n border-top: 0;\n}\n.FormWidget-module_xapp_form_widget__content__a9NXC {\n display: flex;\n flex-direction: column;\n border-top: solid 1px var(--xapp-form-widget-border-color, #d3d3df);\n max-height: 100%;\n min-height: 128px;\n overflow: hidden;\n width: 100%;\n}\n.FormWidget-module_xapp_form_widget__response__X8Hbz {\n padding-top: 1em;\n}\n.FormWidget-module_xapp_form_widget__spinner__FBxso {\n width: 100px;\n height: 100px;\n margin: auto;\n padding: 20px;\n}\n.FormWidget-module_xapp_form_widget__close__0lp0O {\n position: absolute;\n top: 8px;\n right: 8px;\n width: 28px;\n height: 28px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #666;\n cursor: pointer;\n font-weight: bold;\n border: none;\n background: rgba(255, 255, 255, 0.9);\n z-index: 1000;\n transition: background-color 200ms ease-in-out, transform 150ms ease-in-out, box-shadow 200ms ease-in-out;\n box-shadow: var(--xapp-form-widget-box-shadow-subtle, 0 2px 8px rgba(0, 0, 0, 0.08));\n}\n.FormWidget-module_xapp_form_widget__close__0lp0O::before {\n content: \"\";\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 44px;\n height: 44px;\n}\n.FormWidget-module_xapp_form_widget__close__0lp0O:hover {\n background-color: rgb(255, 255, 255);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n transform: scale(1.05);\n}\n.FormWidget-module_xapp_form_widget__close__0lp0O:active {\n transform: scale(0.95);\n}\n.FormWidget-module_xapp_form_widget__close__0lp0O:focus {\n outline: none;\n}\n.FormWidget-module_xapp_form_widget__close__0lp0O:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n\n/* A width per breakpoint, capped at the container.\n *\n * These used to set `width` in pixels, derived from the VIEWPORT, which says\n * nothing about the container the widget was actually put in. Anywhere\n * narrower -- get.xapp.ai embeds the form in a ~548px frame -- it rendered at\n * 740px and spilled out, clipped and silent. #1687.\n *\n * #1690 answered that with `width: 100%` and a `max-width` cap, which broke the\n * floating popup instead: its body is a centred flex item that shrinks to fit,\n * so 100% of it is the form's own content width, and a step of stacked fields\n * rendered as a ~175-260px sliver in the middle of a desktop page.\n *\n * So the width is definite again and the container caps it: `max-width: 100%`\n * lets it shrink inside a narrower frame, and a shrink-to-fit parent sizes to\n * the definite width rather than to the content. Its own date/time layout is\n * flex-wrap: wrap, so it stacks unaided once two columns no longer fit.\n */\n@media (min-width: 1201px) {\n .FormWidget-module_xapp_form_widget__V-G-H {\n width: 740px;\n max-width: 100%;\n }\n}\n@media (min-width: 992px) and (max-width: 1200px) {\n .FormWidget-module_xapp_form_widget__V-G-H {\n width: 600px;\n max-width: 100%;\n }\n}\n@media (min-width: 641px) and (max-width: 991px) {\n .FormWidget-module_xapp_form_widget__V-G-H {\n width: 500px;\n max-width: 100%;\n }\n}\n/* Mobile */\n@media (max-width: 640px), (max-height: 480px) and (pointer: coarse) {\n .FormWidget-module_xapp_form_widget__V-G-H {\n width: 100%;\n max-width: none;\n height: 100%;\n border-radius: 0;\n border: 0;\n }\n .FormWidget-module_xapp_form_widget__content__a9NXC {\n width: 100%;\n border-top: 0;\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n }\n}\n.FormWidget-module_embedded__UB1Gi {\n width: 100%;\n height: 100%;\n max-width: none;\n border: none;\n border-radius: 0;\n box-shadow: none;\n}");var oi=[1e3,2e3];var ii=function(n){var t=n.config;return e.jsx(Re.Provider,{value:t,children:e.jsx(si,{docked:n.docked,embedded:n.embedded,initialStep:n.initialStep,preselectFirstAvailableDate:n.preselectFirstAvailableDate,openedByTrigger:n.openedByTrigger,preselectChipLabel:n.preselectChipLabel,onPreselectChipUsed:n.onPreselectChipUsed,onSubmit:n.onSubmit,response:n.response})})},si=function(o){var i,s=o.docked,d=o.embedded,l=o.initialStep,p=o.preselectFirstAvailableDate,c=o.openedByTrigger,u=o.preselectChipLabel,m=o.onPreselectChipUsed,f=o.onSubmit,_=he(),h=_[0],x=_[1],g=Ne(),v=g.loading,b=g.run,y=h.query,w=h.sendRequest,F=h.active,k=n.useState(o.response),S=k[0],T=k[1],C=n.useState(void 0),D=C[0],R=C[1],N=n.useState(!1),I=N[0],A=N[1],M=n.useState(0),j=M[0],E=M[1],z=n.useContext(Re),O=Me(z.api.demoMode||null===(i=z.trustedForm)||void 0===i?void 0:i.scriptUrl),P=n.useMemo(function(){return Ce.getApi({key:z.api.key,url:z.api.url,intentId:z.intentId,demoMode:z.api.demoMode})},[z]),L=n.useRef(null),H=n.useRef({}),U=n.useRef({}),B=n.useRef(0),W=n.useRef(!1),$=n.useRef(!1),q=n.useRef(void 0),Y=n.useCallback(function(){var e=q.current;if(e)return e;var n=X();return q.current=n,n},[]),G=n.useRef(new Set),V=n.useRef(null),J=n.useRef("unknown"),K=n.useRef(!1),Z=n.useRef(!1),Q=n.useRef(!1),ee=n.useCallback(function(e){var n,t,r;L.current&&!Q.current&&(Q.current=!0,L.current.trackEngaged({formName:J.current,trigger:e,firstStepName:null===(r=null===(t=null===(n=V.current)||void 0===n?void 0:n.steps)||void 0===t?void 0:t[0])||void 0===r?void 0:r.name}))},[]),ne=n.useCallback(function(){T(void 0),x({type:"new-search"}),x({type:"set-modal-state",active:!1,minimized:!0,sendRequest:!1})},[x]),te=n.useCallback(function(){var e,n,r,a,o;if(L.current&&!W.current&&!K.current){var i=V.current;if(i){var s=(null===(e=i.steps)||void 0===e?void 0:e.length)||1,d=B.current,l=t(t({},H.current),U.current),p=Object.keys(l).length>0;L.current.trackClose({lastStepName:(null===(r=null===(n=i.steps)||void 0===n?void 0:n[d])||void 0===r?void 0:r.name)||"unknown",lastStepIndex:d,totalStepsCompleted:d,totalSteps:s,formData:p?l:void 0}),L.current.trackPartialData({lastStepName:(null===(o=null===(a=i.steps)||void 0===a?void 0:a[d])||void 0===o?void 0:o.name)||"unknown",lastStepIndex:d,totalStepsCompleted:d,totalSteps:s,partialData:p?l:void 0,abandonmentReason:"widget_close"}),K.current=!0}}T(void 0),x({type:"new-search"}),x({type:"set-modal-state",active:!1,minimized:!1,sendRequest:!1}),P.channelActionRequest({data:{result:{},step:"",form:""}},"FORM_CLOSE").then(function(e){ie("ACTION Request (FORM_CLOSE). Data: Response: ".concat(JSON.stringify(e))),E(0)})},[P,x]);n.useEffect(function(){return function(){var e;null===(e=L.current)||void 0===e||e.dispose()}},[]),n.useEffect(function(){var e=ae(window.location.href,{persistToLocalStorage:!0,persistenceDays:30,preferUrlParameters:!0,scope:P.trackingScope});"development"===process.env.NODE_ENV&&Object.keys(e).length>0&&ie("[FormWidget] Captured tracking parameters:",e)},[P]),n.useEffect(function(){var e=function(){var e,n,r,a=t(t({},H.current),U.current);if(L.current&&!W.current&&!K.current){var o=V.current;if(o){var i=(null===(e=o.steps)||void 0===e?void 0:e.length)||1,s=B.current;L.current.trackPartialDataBeacon({lastStepName:(null===(r=null===(n=o.steps)||void 0===n?void 0:n[s])||void 0===r?void 0:r.name)||"unknown",lastStepIndex:s,partialData:a,totalStepsCompleted:s,totalSteps:i,completionPercentage:Math.round(s/i*100),abandonmentReason:"close_tab"}),K.current=!0}}};return window.addEventListener("beforeunload",e),function(){return window.removeEventListener("beforeunload",e)}},[]),n.useEffect(function(){var e=null,n=function(){var e,n,r,a=t(t({},H.current),U.current);if(L.current&&!W.current&&!K.current){var o=V.current;if(o){var i=(null===(e=o.steps)||void 0===e?void 0:e.length)||1,s=B.current;L.current.trackPartialDataBeacon({lastStepName:(null===(r=null===(n=o.steps)||void 0===n?void 0:n[s])||void 0===r?void 0:r.name)||"unknown",lastStepIndex:s,partialData:a,totalStepsCompleted:s,totalSteps:i,completionPercentage:Math.round(s/i*100),abandonmentReason:"timeout"}),K.current=!0}}},r=function(){if(document.hidden){var t=(r=new Date,(a=new Date(r)).setHours(24,0,0,0),a.getTime()-r.getTime());e=setTimeout(n,t)}else e&&(clearTimeout(e),e=null);var r,a};return document.addEventListener("visibilitychange",r),function(){document.removeEventListener("visibilitychange",r),e&&clearTimeout(e)}},[]);var re=n.useCallback(function(e,n){x({query:e.query,intentId:e.intentId,type:"set-query"}),b(function(){return P.intentRequest(e).then(function(t){var r,a,o,i;T(t),x({type:"set-response",response:t,query:e.query,intentId:e.intentId});var s=null===(r=null==t?void 0:t.displays)||void 0===r?void 0:r.find(function(e){var n=e;return"FORM"===(null==n?void 0:n.type)});if(s){V.current=s;var d=P.visitSession().sessionId,l=s.name||"unknown";J.current=l;var p=L.current;if(L.current=new Ko(P,d,l),L.current.adoptVisitFrom(p),!Z.current){Z.current=!0;var c=(null===(a=s.steps)||void 0===a?void 0:a.length)||1,u=null===(i=null===(o=s.steps)||void 0===o?void 0:o[0])||void 0===i?void 0:i.name;L.current.trackFormOpen({formName:l,totalSteps:c,firstStepName:u,lastStepIndex:0})}(null==n?void 0:n.engagementTrigger)&&ee(n.engagementTrigger)}})})},[P,x,b,ee]),oe=n.useCallback(function(e,n){var t=function(){return P.channelActionRequest(e,n).then(function(t){var r;if(ie("ACTION Request (".concat(n,"). Data: ").concat(JSON.stringify(e)," Response: ").concat(JSON.stringify(t))),function(e){return!!e&&!0===e[ke]}(t)&&se("ACTION Request (".concat(n,") was suppressed: this session already sent a final submit.")),(t.outputSpeech||t.displays)&&x({type:"set-response",response:t,query:""}),"FORM_SUBMIT"===n&&t.displays){var a=t.displays.find(function(e){return"FORM_STEP_UPDATE"===(null==e?void 0:e.type)});a&&R(a)}if((null===(r=t.context)||void 0===r?void 0:r.active)&&t.context.active.length>0){var o=t.context.active[0].parameters||{};x({type:"set-context",context:o})}e.autoClose?E(1):e.autoMinimize?E(2):E(0)})};return"FORM_SUBMIT"===n?b(function(){return function(e,n){return r(this,void 0,void 0,function(){var t,r,o;return a(this,function(a){switch(a.label){case 0:r=0,a.label=1;case 1:return r<=n.length?r>0?[4,(i=n[r-1],new Promise(function(e){setTimeout(e,i)}))]:[3,3]:[3,7];case 2:a.sent(),a.label=3;case 3:return a.trys.push([3,5,,6]),[4,e()];case 4:return[2,a.sent()];case 5:return o=a.sent(),t=o,se("FORM_SUBMIT attempt ".concat(r+1," of ").concat(n.length+1," failed: ").concat(o)),[3,6];case 6:return r++,[3,1];case 7:throw t}var i})})}(t,oi)}):b(t).catch(function(e){se("ACTION Request (".concat(n,") failed: ").concat(e))})},[P,x,b]);n.useEffect(function(){if(s&&!$.current||w&&F&&(z.autoGreeting||z.intentId)){s&&($.current=!0),P.resetSession();var e=s||c?void 0:"manual_open";re({query:z.autoGreeting,intentId:z.intentId},{engagementTrigger:e}),x({type:"set-modal-state",active:!0,minimized:!1,sendRequest:!1})}},[s,c,w,F,re,x,z.autoGreeting,P,z.intentId]),n.useEffect(function(){I||(1===j?(T(void 0),x({type:"new-search"}),x({type:"set-modal-state",active:!1,minimized:!1,sendRequest:!1}),E(0)):2===j&&(T(void 0),x({type:"new-search"}),x({type:"set-modal-state",active:!1,minimized:!0,sendRequest:!1}),E(0)))},[I,x,j]);var de=n.useCallback(function(e){var n=De(e);re({query:n},{engagementTrigger:"chip_click"})},[re]);n.useEffect(function(){if(u&&S){var e=S.outputSpeech,n="object"==typeof e&&null!==e?e.suggestions:void 0;if(n&&0!==n.length){var t=n.find(function(e){return De(e).toLowerCase()===u.toLowerCase()});t&&(ie("Auto-selecting chip: ".concat(De(t))),setTimeout(function(){de(t)},100)),m&&m()}}},[S,u,de,m]);var le=n.useCallback(function(e,n){if(n||(n=e.action),e.timezoneOffset=(new Date).getTimezoneOffset(),"FORM_SUBMIT"===n){var r=O();r&&e.result&&(e.result=t(t({},e.result),r));var a=Y();z.api.demoMode||G.current.has(a)||!Pe(z.ga4MeasurementId,a,"form-widget")||G.current.add(a),e.extras=t(t(t(t({},e.extras),{eventId:a}),(o=je("_fbp"),i=je("_fbc"),t(t({},o?{fbp:o}:{}),i?{fbc:i}:{}))),function(e,n){if(Oe())return{ga4OptOut:!0};var t={},r=function(e){var n=(null==e?void 0:e.split("."))||[];if(!(n.length<4)){var t=n.slice(-2).join(".");return/^\d+\.\d+$/.test(t)?t:void 0}}(je("_ga"));if(r&&(t.gaClientId=r),ze(e)){var a=e.trim().replace(/^G-/i,""),o=function(e){var n=(null==e?void 0:e.split("."))||[];if(!(n.length<3)){var t;if("GS2"===n[0]){var r=n[2].split("$").find(function(e){return e.startsWith("s")});t=null==r?void 0:r.slice(1)}else t=n[2];return t&&/^\d+$/.test(t)?t:void 0}}(je("_ga_".concat(a)));o&&(t.gaSessionId=o)}return n&&(t.ga4ClientFired=!0),t}(z.ga4MeasurementId,G.current.has(a)))}var o,i;return oe(e,n)},[oe,O,Y,z.api.demoMode,z.ga4MeasurementId]),pe=n.useCallback(function(e){return P.channelActionRequest(e,"FORM_NEXT")},[P]),ce=function(e){A(e)},ue=n.useCallback(function(e){B.current=e},[]),me=n.useCallback(function(e,n,r,a){var o,i,s;if(H.current=t(t({},H.current),r),U.current={},B.current=n+1,ee("step_transition"),L.current){var d=V.current,l=null===(i=null===(o=null==d?void 0:d.steps)||void 0===o?void 0:o[n+1])||void 0===i?void 0:i.name,p=(null===(s=null==d?void 0:d.steps)||void 0===s?void 0:s.length)||1;L.current.trackNextStep({completedStepName:e,completedStepIndex:n,nextStepName:l,stepData:r,isLastStep:a}),l&&L.current.trackStepChange({fromStepName:e,fromStepIndex:n,toStepName:l,toStepIndex:n+1,direction:"forward",lastStepIndex:n+1,totalSteps:p})}},[ee]),fe=n.useCallback(function(e,n,t,r){var a,o;if(U.current={},B.current=r,L.current){var i=(null===(o=null===(a=V.current)||void 0===a?void 0:a.steps)||void 0===o?void 0:o.length)||1;L.current.trackPreviousStep({fromStepName:e,fromStepIndex:n,toStepName:t,toStepIndex:r,lastStepIndex:r,totalSteps:i}),L.current.trackStepChange({fromStepName:e,fromStepIndex:n,toStepName:t,toStepIndex:r,direction:"backward",lastStepIndex:r,totalSteps:i})}},[]),_e=n.useCallback(function(e,n,r,a){if(!W.current){W.current=!0;var o=O(),i=o?t(t({},r),o):r;if(H.current=i,L.current&&L.current.trackSubmit({finalStepName:e,finalStepIndex:n,completedData:i,totalSteps:a}),f&&!z.api.demoMode)try{f(Y())}catch(e){se("[FormWidget] onSubmit callback threw:",e)}}},[O,f,Y,z.api.demoMode]),xe=n.useCallback(function(e,n,t,r){var a;null===(a=L.current)||void 0===a||a.trackSubmitFailure({finalStepName:e,finalStepIndex:n,totalSteps:t,reason:r})},[]),ge=n.useCallback(function(e,n){var t;null===(t=L.current)||void 0===t||t.trackHandoffRendered({stepName:e,provider:n})},[]),ve=n.useCallback(function(e,n){var t;null===(t=L.current)||void 0===t||t.trackHandoffNoRender({stepName:e,provider:n})},[]),be=n.useCallback(function(e,n,t){var r;null===(r=L.current)||void 0===r||r.trackHandoffScheduled({stepName:e,provider:n,payload:t})},[]),ye=n.useCallback(function(e,n){var t;null===(t=L.current)||void 0===t||t.trackHandoffError({stepName:e,provider:n})},[]),we=!!y||!!S;return s?e.jsx("div",{className:"".concat(Qo," ").concat(d?ai:""," ").concat(v?Zo:""),children:e.jsx("div",{className:"".concat(ei," ").concat(v?Zo:""),children:S?e.jsx(Xo,{response:S,className:ni,onActionClick:de,onActionResponse:le,onAudioChange:ce,loading:v,onTrackNextStep:me,onTrackPreviousStep:fe,onTrackSubmit:_e,onTrackSubmitFailure:xe,currentStepDataRef:U,initialStep:l,preselectFirstAvailableDate:p,onTrackInitialStep:ue,onFormNext:pe,stepUpdate:D,onTrackHandoffRendered:ge,onTrackHandoffNoRender:ve,onTrackHandoffScheduled:be,onTrackHandoffError:ye}):e.jsx("div",{className:ti,children:e.jsx(Ue,{})})})}):e.jsxs("div",{className:"".concat(Qo," ").concat(d?ai:""," ").concat(v&&!S?Zo:""),children:[we&&e.jsxs("div",{className:"".concat(ei," ").concat(v&&!S?Zo:""),children:[!S&&v&&e.jsx("div",{className:ti,children:e.jsx(Ue,{})}),S&&e.jsx(Xo,{response:S,className:ni,onActionClick:de,onActionResponse:le,onAudioChange:ce,loading:v,onTrackNextStep:me,onTrackPreviousStep:fe,onTrackSubmit:_e,onTrackSubmitFailure:xe,currentStepDataRef:U,initialStep:l,preselectFirstAvailableDate:p,onTrackInitialStep:ue,onFormNext:pe,stepUpdate:D,onTrackHandoffRendered:ge,onTrackHandoffNoRender:ve,onTrackHandoffScheduled:be,onTrackHandoffError:ye})]}),S&&!!ne&&e.jsx("div",{className:ri,onClick:te,children:"✕"})]})},di=function(e){var t,r=e.theme;n.useEffect(function(){var e,n=null===(e=null==r?void 0:r.font)||void 0===e?void 0:e.link;return n&&function(e){try{var n=new URL(e);if("https:"!==n.protocol)return void console.warn("Only HTTPS font URLs are allowed:",e);["fonts.googleapis.com","fonts.gstatic.com","use.typekit.net","use.fontawesome.com","cdn.jsdelivr.net","unpkg.com","cdnjs.cloudflare.com"].includes(n.hostname)||console.warn("Font URL from untrusted domain:",n.hostname),"fonts.googleapis.com"!==n.hostname||n.searchParams.has("display")||(n.searchParams.set("display","swap"),e=n.toString())}catch(n){return void console.error("Invalid font URL:",e,n)}var t="xapp-form-widget-font",r=document.getElementById(t);r&&r.remove();var a=document.createElement("link");a.id=t,a.rel="stylesheet",a.href=e,a.crossOrigin="anonymous",document.head.appendChild(a)}(n),function(){if(n){var e=document.getElementById("xapp-form-widget-font");e&&e.getAttribute("href")===n&&e.remove()}}},[null===(t=null==r?void 0:r.font)||void 0===t?void 0:t.link]);var o=JSON.stringify(function(e){var n=[],t=function(e){var n=e||{};return ci("--xapp-form-widget-",ui(mi("background-color",null==n?void 0:n.backgroundColor),mi("header-background-color",null==n?void 0:n.headerBackgroundColor),mi("header-text-color",null==n?void 0:n.headerTextColor),mi("primary-button-color",null==n?void 0:n.primaryButtonColor),mi("primary-button-text-color",null==n?void 0:n.primaryButtonTextColor),mi("secondary-button-color",null==n?void 0:n.secondaryButtonColor),mi("secondary-button-text-color",null==n?void 0:n.secondaryButtonTextColor),mi("border-color",null==n?void 0:n.borderColor),mi("border-radius-md",null==n?void 0:n.borderRadius),mi("border-radius-xl",null==n?void 0:n.borderRadius),ci("font-",ui(function(e){return a(this,function(n){switch(n.label){case 0:return e?[4,["family",e.fontFamily]]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})}(null==n?void 0:n.font))),ci("text-",ui(function(e){return a(this,function(n){switch(n.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,15];case 1:return n.sent(),[4,["background-color-dark",fi(e.backgroundColor,3)]];case 2:return n.sent(),[4,["color",e.color]];case 3:return n.sent(),[4,["font-size",e.fontSize]];case 4:return n.sent(),[4,["font-family",e.fontFamily]];case 5:return n.sent(),[4,["border-color",e.borderColor]];case 6:return n.sent(),[4,["border-width",e.borderWidth]];case 7:return n.sent(),[4,["border-color-focus",e.borderColorFocus||e.borderColor]];case 8:return n.sent(),[4,["underline-display",e.borderWidth?"none":void 0]];case 9:return n.sent(),[4,["bottom-radius",e.borderWidth?"var(--xapp-form-widget-border-radius-sm, 8px)":void 0]];case 10:return n.sent(),e.borderWidth?[4,["root-background",e.backgroundColor]]:[3,15];case 11:return n.sent(),[4,["root-border","".concat(e.borderWidth," solid ").concat(e.borderColor||"transparent")]];case 12:return n.sent(),[4,["root-radius","var(--xapp-form-widget-border-radius-sm, 8px)"]];case 13:return n.sent(),[4,["input-background","transparent"]];case 14:n.sent(),n.label=15;case 15:return[2]}})}(null==n?void 0:n.text))),ci("back-button-",ui(function(e){var n,t,r;return a(this,function(a){switch(a.label){case 0:return n="icon"===(null==e?void 0:e.backButtonVariant),t=null==e?void 0:e.backButton,[4,["label-display",n?"none":"inline"]];case 1:return a.sent(),[4,["icon-display",n?"inline-flex":"none"]];case 2:return a.sent(),n?(r=null==t?void 0:t.color,[4,["background","transparent"]]):[3,12];case 3:return a.sent(),[4,["border","".concat((null==t?void 0:t.borderWidth)||"1px"," solid ").concat((null==t?void 0:t.borderColor)||r||"currentColor")]];case 4:return a.sent(),[4,["icon-stroke",null==t?void 0:t.iconStroke]];case 5:return a.sent(),[4,["radius","50%"]];case 6:return a.sent(),[4,["shadow","none"]];case 7:return a.sent(),[4,["size","44px"]];case 8:return a.sent(),[4,["padding","0"]];case 9:return a.sent(),[4,["color",r||"currentColor"]];case 10:return a.sent(),[4,["color-hover",(null==t?void 0:t.colorHover)||r||"currentColor"]];case 11:a.sent(),a.label=12;case 12:return[2]}})}(n))),ci("button-",ui(function(e){return a(this,function(n){switch(n.label){case 0:return e?[4,["font-size",e.fontSize]]:[3,6];case 1:return n.sent(),[4,["font-weight",e.fontWeight]];case 2:return n.sent(),[4,["padding",e.padding]];case 3:return n.sent(),[4,["radius",e.borderRadius]];case 4:return n.sent(),[4,["shadow",e.boxShadow]];case 5:n.sent(),n.label=6;case 6:return[2]}})}(null==n?void 0:n.button))),ci("step-title-",ui(function(e){return a(this,function(n){switch(n.label){case 0:return e?[4,["align",e.align]]:[3,5];case 1:return n.sent(),[4,["font-size",e.fontSize]];case 2:return n.sent(),[4,["font-weight",e.fontWeight]];case 3:return n.sent(),[4,["color",e.color]];case 4:n.sent(),n.label=5;case 5:return[2]}})}(null==n?void 0:n.stepTitle))),ci("final-button-",ui(function(e){return a(this,function(n){switch(n.label){case 0:return"inline"!==(null==e?void 0:e.finalButtonPlacement)?[3,7]:[4,["direction","row-reverse"]];case 1:return n.sent(),[4,["gap","24px"]];case 2:return n.sent(),[4,["nav-flex","0 0 auto"]];case 3:return n.sent(),[4,["nav-align","center"]];case 4:return n.sent(),[4,["container-padding","20px 0"]];case 5:return n.sent(),[4,["nav-padding","20px 0"]];case 6:n.sent(),n.label=7;case 7:return[2]}})}(n))),ci("dropdown-",ui(function(e){return a(this,function(n){switch(n.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,5];case 1:return n.sent(),[4,["color",e.color]];case 2:return n.sent(),[4,["font-size",e.fontSize]];case 3:return n.sent(),[4,["font-family",e.fontFamily]];case 4:n.sent(),n.label=5;case 5:return[2]}})}(null==n?void 0:n.dropdown))),ci("checkbox-",ui(function(e){return a(this,function(n){switch(n.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,5];case 1:return n.sent(),[4,["color",e.color]];case 2:return n.sent(),[4,["font-size",e.fontSize]];case 3:return n.sent(),[4,["font-family",e.fontFamily]];case 4:n.sent(),n.label=5;case 5:return[2]}})}(null==n?void 0:n.checkbox))),ci("chips-",ui(function(e){return a(this,function(n){switch(n.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,8];case 1:return n.sent(),[4,["background-color-selected",e.backgroundColorSelected]];case 2:return n.sent(),[4,["background-color-dark",fi(e.backgroundColor,20)]];case 3:return n.sent(),[4,["color",e.color]];case 4:return n.sent(),[4,["color-selected",e.colorSelected]];case 5:return n.sent(),[4,["font-size",e.fontSize]];case 6:return n.sent(),[4,["font-family",e.fontFamily]];case 7:n.sent(),n.label=8;case 8:return[2]}})}(null==n?void 0:n.chips))),ci("date-",ui(function(e){return a(this,function(n){switch(n.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,6];case 1:return n.sent(),[4,["background-color-selected",e.backgroundColorSelected]];case 2:return n.sent(),[4,["color",e.color]];case 3:return n.sent(),[4,["font-size",e.fontSize]];case 4:return n.sent(),[4,["font-family",e.fontFamily]];case 5:n.sent(),n.label=6;case 6:return[2]}})}(null==n?void 0:n.date))),ci("card-",ui(function(e){return a(this,function(n){switch(n.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,5];case 1:return n.sent(),[4,["color",e.color]];case 2:return n.sent(),[4,["font-size",e.fontSize]];case 3:return n.sent(),[4,["font-family",e.fontFamily]];case 4:n.sent(),n.label=5;case 5:return[2]}})}(null==n?void 0:n.card))),ci("side-button-",ui(function(e){return a(this,function(n){switch(n.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,8];case 1:return n.sent(),[4,["background-color-dark",fi(e.backgroundColor,10)]];case 2:return n.sent(),[4,["color",e.color]];case 3:return n.sent(),[4,["font-size",e.fontSize]];case 4:return n.sent(),[4,["font-family",e.fontFamily]];case 5:return n.sent(),[4,["top",e.top]];case 6:return n.sent(),[4,["min-length",e.minLength]];case 7:n.sent(),n.label=8;case 8:return[2]}})}(null==n?void 0:n.sideButton))),ci("external-widget-",ui(function(e){return a(this,function(n){switch(n.label){case 0:return e?[4,["background-color",e.backgroundColor]]:[3,4];case 1:return n.sent(),[4,["padding",e.padding]];case 2:return n.sent(),[4,["min-height",e.minHeight]];case 3:n.sent(),n.label=4;case 4:return[2]}})}(null==n?void 0:n.externalWidget)))))}(e),r=t.next();for(;!1===r.done;){var o=r.value,i=o[0],s=o[1];null!=s&&""!==s&&n.push([i,s]),r=t.next()}return n}(r));return n.useLayoutEffect(function(){var e=JSON.parse(o);return function(e){for(var n,t=document.documentElement,r=0,a=e;r<a.length;r++){var o=a[r],i=o[0],s=o[1];t.style.setProperty(i,s),pi.set(i,(null!==(n=pi.get(i))&&void 0!==n?n:0)+1)}}(e),function(){return function(e){for(var n,t=document.documentElement,r=0,a=e;r<a.length;r++){var o=a[r][0],i=(null!==(n=pi.get(o))&&void 0!==n?n:1)-1;i<=0?(pi.delete(o),t.style.removeProperty(o)):pi.set(o,i)}}(e)}},[o]),null};var li,pi=new Map;function ci(e,n){var t;return a(this,function(r){switch(r.label){case 0:t=n.next(),r.label=1;case 1:return t.done?[3,3]:[4,["".concat(e).concat(t.value[0]),t.value[1]]];case 2:return r.sent(),t=n.next(),[3,1];case 3:return[2]}})}function ui(){var e,n,t,r,o,i=[];for(e=0;e<arguments.length;e++)i[e]=arguments[e];return a(this,function(e){switch(e.label){case 0:n=0,t=i,e.label=1;case 1:if(!(n<t.length))return[3,5];r=t[n],o=r.next(),e.label=2;case 2:return!1!==o.done?[3,4]:[4,o.value];case 3:return e.sent(),o=r.next(),[3,2];case 4:return n++,[3,1];case 5:return[2]}})}function mi(e,n){return a(this,function(t){switch(t.label){case 0:return[4,[e,n]];case 1:return t.sent(),[2]}})}function fi(e,n){var t,r,a,o,i,s,d,l,p,c;if(!e)return e;try{if(e.startsWith("#")){var u=e.match(/\w\w/g);u&&(r=(t=u.map(function(e){return parseInt(e,16)}))[0],a=t[1],o=t[2])}else if(e.startsWith("rgb")){var m=(p=/^rgba?\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)$/,c=/^rgb?\((\d+),\s*(\d+),\s*(\d+)\)$/,(l=(d=e).match(p))?{r:parseInt(l[1]),g:parseInt(l[2]),b:parseInt(l[3]),a:parseFloat(l[4])}:(l=d.match(c))?{r:parseInt(l[1]),g:parseInt(l[2]),b:parseInt(l[3])}:null);m&&(r=m.r,a=m.g,o=m.b,i=m.a)}if(void 0===r||void 0===a||void 0===o)return se("Darken: Unsupported color format: ".concat(e)),e;if(void 0!==i){if(0===r&&0===a&&0===o)i+=n/100;else{var f=.3*r+.59*a+.11*o,_=f*(1-n/100)/f;r=Math.round(r*_),a=Math.round(a*_),o=Math.round(o*_)}s="rgba(".concat(r,", ").concat(a,", ").concat(o,", ").concat(i,")")}else r=Math.max(0,r-n),a=Math.max(0,a-n),o=Math.max(0,o-n),s="#".concat(r.toString(16).padStart(2,"0")).concat(a.toString(16).padStart(2,"0")).concat(o.toString(16).padStart(2,"0"))}catch(n){se("Darken: Unsupported color format: ".concat(e," - Error: ").concat(n))}return s}!function(e){e.XAPP_FORM_BUTTON="xapp-form-button"}(li||(li={}));var _i="SideButton-module_xapp_form_sticky_button__YqORL",hi="SideButton-module_left__GT6z8",xi="SideButton-module_right__Hy2FU";ge("/**\n * The phone breakpoint.\n *\n * Width alone cannot express \"phone\". A phone on its side is 740-863px wide - wider than\n * an iPad in portrait - so `max-width: 640px` silently excluded every landscape phone, and\n * with it the full-screen panel, the full-bleed modal, the 44px hit boxes, the safe-area\n * insets and the soft-keyboard padding. Measured on 2026-08-13: in landscape the chat\n * input sat ~22px from the bottom of a 340px viewport, so any keyboard covered it, and the\n * form step's action row was unreachable. XappMedia/chat-widget#1561.\n *\n * The second arm adds short-and-touch, which is what a landscape phone is. Verified in\n * Chromium against device descriptors: it matches iPhone 14, Pixel 7 and Galaxy S8 in\n * landscape, and matches no iPad in either orientation and no desktop. `pointer: coarse`\n * reports the PRIMARY pointer, so a touch laptop driven by a trackpad stays on desktop.\n *\n * Use this instead of writing the query by hand, so the definition lives in one place.\n */\n/**\n * A field's helper / error line. The metrics are MUI's FormHelperText, which every field used\n * until #1741, so a validation message sits exactly where it always has.\n */\n.SideButton-module_xapp_form_sticky_button__YqORL {\n position: fixed;\n z-index: 10000;\n cursor: pointer;\n transform: translateY(-50%);\n text-align: center;\n writing-mode: vertical-rl;\n background-color: var(--xapp-form-widget-side-button-background-color, #d8412a);\n color: var(--xapp-form-widget-side-button-color, #ffffff);\n font-size: var(--xapp-form-widget-side-button-font-size, 1.5em);\n font-family: var(--xapp-form-widget-side-button-font-family, var(--xapp-form-widget-font-family, RobotoRegular, serif));\n top: var(--xapp-form-widget-side-button-top, 50%);\n min-height: var(--xapp-form-widget-side-button-min-length, 200px);\n box-shadow: var(--xapp-form-widget-box-shadow, 0 4px 24px rgba(0, 0, 0, 0.12));\n transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out, transform 150ms ease-in-out;\n}\n.SideButton-module_xapp_form_sticky_button__YqORL:hover {\n background-color: var(--xapp-form-widget-side-button-background-color-dark, darkred);\n box-shadow: var(--xapp-form-widget-box-shadow-hover, 0 6px 32px rgba(0, 0, 0, 0.16));\n}\n.SideButton-module_xapp_form_sticky_button__YqORL:active {\n transform: translateY(-50%) scale(0.98);\n}\n.SideButton-module_xapp_form_sticky_button__YqORL:focus {\n outline: none;\n}\n.SideButton-module_xapp_form_sticky_button__YqORL:focus-visible {\n outline: 2px solid var(--xapp-form-widget-focus-ring-color, var(--xapp-form-widget-header-background-color, #012b54));\n outline-offset: 0px;\n}\n.SideButton-module_xapp_form_sticky_button__YqORL.SideButton-module_left__GT6z8 {\n left: 0;\n border-top-right-radius: 50%;\n border-bottom-right-radius: 50%;\n padding: 20px 20px 20px 10px;\n}\n.SideButton-module_xapp_form_sticky_button__YqORL.SideButton-module_right__Hy2FU {\n right: 0;\n border-top-right-radius: 50%;\n border-bottom-right-radius: 50%;\n padding: 20px 20px 20px 10px;\n transform: translateY(-50%) rotate(180deg);\n}\n.SideButton-module_xapp_form_sticky_button__YqORL.SideButton-module_right__Hy2FU:active {\n transform: translateY(-50%) rotate(180deg) scale(0.98);\n}");var gi=function(n){var t=n.onClick,r=n.position,a=n.label,o=n.hidden,i="right"===(null==r?void 0:r.toLowerCase())?xi:hi;return e.jsx("div",{onClick:t,className:"".concat(_i," ").concat(i),"data-xapp-form-side-button":"true",style:o?{display:"none"}:void 0,"aria-hidden":o||void 0,children:e.jsx("span",{children:a||"Schedule Now"})})},vi="xafw-auto-open-dismissed";function bi(e){if(!("number"!=typeof e||e<0))return Math.min(e,3e5)}function yi(e){if("number"==typeof e)return Math.max(0,Math.min(e,100))}function wi(e){var t,r=e.config,a=e.isActive,o=e.onOpen,i=e.hasInteracted,s=n.useRef(new Set),d=n.useRef(!1),l=n.useRef(null),p=(null==r?void 0:r.sessionKey)||vi,c=(null==r?void 0:r.mode)||"any",u=null==r?void 0:r.triggers,m=bi(null==u?void 0:u.delay),f=yi(null==u?void 0:u.scrollPercent),_=null==u?void 0:u.exitIntent,h="number"!=typeof(t=null==u?void 0:u.exitIntentThreshold)||t<0?50:t,x=bi(null==u?void 0:u.inactivity),g=null==r?void 0:r.patterns,v=null==r?void 0:r.minimumWidth,b=n.useMemo(function(){return JSON.stringify(null!=g?g:[])},[g]),y=n.useRef([]),w=n.useCallback(function(){var e=[];return void 0!==(null==u?void 0:u.delay)&&e.push("delay"),void 0!==(null==u?void 0:u.scrollPercent)&&e.push("scrollPercent"),(null==u?void 0:u.exitIntent)&&e.push("exitIntent"),void 0!==(null==u?void 0:u.inactivity)&&e.push("inactivity"),e},[null==u?void 0:u.delay,null==u?void 0:u.scrollPercent,null==u?void 0:u.exitIntent,null==u?void 0:u.inactivity]),F=n.useCallback(function(e){if(!d.current)if(s.current.add(e),"any"===c)d.current=!0,o();else if("all"===c){var n=y.current.every(function(e){return s.current.has(e)});n&&(d.current=!0,o())}},[c,o]);n.useEffect(function(){s.current=new Set,d.current=!1,y.current=w()},[w]),n.useEffect(function(){if((void 0!==m||void 0!==f||_||void 0!==x)&&!a&&!i&&!function(e){try{return"true"===sessionStorage.getItem(e)}catch(e){return!1}}(p)&&function(e){if(!e||0===e.length)return!0;var n=window.location.href;return e.some(function(e){return n.includes(e)})}(g)&&function(e){return"number"!=typeof e||window.innerWidth>=e}(v)){var e=[],n=[],t=function(e,t,r,a){e.addEventListener(t,r,a),n.push({target:e,event:t,handler:r,options:a})};if("number"==typeof m&&m>0){var r=setTimeout(function(){F("delay")},m);e.push(r)}if("number"==typeof f){var o=f,s=!1,d=function(){var e=window.scrollY||document.documentElement.scrollTop,n=document.documentElement.scrollHeight-window.innerHeight;n<=0||(e/n*100>=o&&F("scrollPercent"),s=!1)};t(window,"scroll",function(){s||(s=!0,"function"==typeof requestAnimationFrame?requestAnimationFrame(d):d())},{passive:!0}),d()}if(_&&!("ontouchstart"in window||navigator.maxTouchPoints>0)){var c=null!=h?h:50;t(document,"mouseout",function(e){e.clientY<=c&&F("exitIntent")})}if("number"==typeof x&&x>0){var u=function(){l.current&&clearTimeout(l.current),l.current=setTimeout(function(){F("inactivity")},x)};u();["mousemove","keydown","scroll","click","touchstart"].forEach(function(e){t(document,e,u,{passive:!0})})}return function(){e.forEach(function(e){return clearTimeout(e)}),l.current&&(clearTimeout(l.current),l.current=null),n.forEach(function(e){var n=e.target,t=e.event,r=e.handler,a=e.options;n.removeEventListener(t,r,a)})}}},[m,f,_,h,x,b,v,a,i,p,F])}
3
+ /*! Copyright (c) 2026, XAPPmedia */var Fi="data-xapp-form-page",ki="data-xapp-form-page-count";function Si(){var e=parseInt(document.body.getAttribute(ki)||"0",10);return Number.isNaN(e)?0:e}function Ti(){if("undefined"==typeof document||!document.body)return function(){};document.body.setAttribute(ki,String(Si()+1)),document.body.setAttribute(Fi,"true");var e=!1;return function(){if(!e){e=!0;var n=Math.max(0,Si()-1);0===n?(document.body.removeAttribute(Fi),document.body.removeAttribute(ki)):document.body.setAttribute(ki,String(n))}}}function Ci(e){var n=null!=e?e:"undefined"!=typeof document?document.getElementById("xapp-form-widget"):null;return!!n&&(n.classList.contains("embedded")||n.classList.contains("xapp-embedded"))}var Di,Ri=function(e){e.target instanceof Element&&(Di={target:e.target,at:Date.now()})};var Ni="Form-module_xapp_form__mMqzX";ge('@font-face {\n font-family: RobotoRegular;\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: local("Roboto"), local("Roboto-Regular"), url(https://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2) format("woff2");\n}\n.Form-module_xapp_form__mMqzX {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif);\n}\n.Form-module_xapp_form__mMqzX .MuiTypography-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiButton-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiButtonBase-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX button {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiInputBase-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiInputBase-input {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiTextField-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiInputLabel-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiFormHelperText-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiFilledInput-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiFilledInput-input {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiChip-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiChip-label {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiAutocomplete-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiAutocomplete-input {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiFormControl-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX .MuiFormControlLabel-root {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}\n.Form-module_xapp_form__mMqzX [class*="Mui"]:not([class*="Portal"]) {\n font-family: var(--xapp-form-widget-font-family, RobotoRegular, serif) !important;\n}');var Ii=function(r){var a,o,i,s,d=r.config,l=r.theme,p=he()[1],c=xe(),u=c.active,m=c.minimized,f=n.useState(),_=f[0],h=f[1],x=n.useState(!1),g=x[0],v=x[1],b=n.useState(!1),y=b[0],w=b[1],F=n.useState(Ci)[0],k=!!(null===(a=d.autoOpen)||void 0===a?void 0:a.enabled)&&!function(e){var n=null==e?void 0:e.triggers;return void 0!==bi(null==n?void 0:n.delay)||void 0!==yi(null==n?void 0:n.scrollPercent)||!!(null==n?void 0:n.exitIntent)||void 0!==bi(null==n?void 0:n.inactivity)}(d.autoOpen),S=n.useCallback(function(e){(null==e?void 0:e.preselectChipLabel)&&h(e.preselectChipLabel),p({type:"open-modal-state"})},[p]),T=n.useCallback(function(){S()},[S]),C=n.useCallback(function(e){S(e)},[S]),D=n.useCallback(function(){return{active:u,minimized:m}},[u,m]),R=n.useMemo(function(){return Ce.getApi({key:d.api.key,url:d.api.url,intentId:d.intentId,demoMode:d.api.demoMode})},[d]),N=n.useCallback(function(){var e;if(h(void 0),v(!0),y){try{var n=(null===(e=d.autoOpen)||void 0===e?void 0:e.sessionKey)||vi;sessionStorage.setItem(n,"true")}catch(e){}w(!1)}p({type:"new-search"}),p({type:"set-modal-state",active:!1,minimized:!1,sendRequest:!1}),R.channelActionRequest({data:{result:{},step:"",form:""}},"FORM_CLOSE").then(function(e){ie("ACTION Request (FORM_CLOSE). Data: Response: ".concat(JSON.stringify(e)))})},[R,null===(o=d.autoOpen)||void 0===o?void 0:o.sessionKey,p,y]),I=n.useCallback(function(){w(!0),p({type:"set-modal-state",active:!0,minimized:!1,sendRequest:!0})},[p]);return wi({config:d.autoOpen,isActive:u,onOpen:I,hasInteracted:g}),n.useEffect(function(){var e=document.getElementsByClassName(li.XAPP_FORM_BUTTON);if(e.length)ie("Assigning ".concat(e.length," button(s) by class: ").concat(li.XAPP_FORM_BUTTON)),Array.from(e).forEach(function(e){e.onclick=T,e.onfocus=T});else{var n=document.getElementById(li.XAPP_FORM_BUTTON);n?(ie("Assigning one button by id: ".concat(li.XAPP_FORM_BUTTON,")}")),n.onclick=T,n.onfocus=T):ie("Cannot assign buttons by class or id: ".concat(li.XAPP_FORM_BUTTON,")}"))}window.xafwControl={openForm:C,formStatus:D}},[D,T,C]),n.useEffect(function(){var e=d.triggerSelector,n=function(){document.removeEventListener("click",Ri,!0);var e=Di;if(Di=void 0,e&&!(Date.now()-e.at>1e4))return e.target}();if(e){try{document.querySelector(e)}catch(n){return void se('Invalid triggerSelector "'.concat(e,'": ').concat(n))}(null==n?void 0:n.closest(e))&&(ie('Opening for a triggerSelector "'.concat(e,'" click made before the form loaded')),T());var t=function(n){var t=n.target instanceof Element?n.target.closest(e):null;t&&(t instanceof HTMLAnchorElement&&("#"===t.getAttribute("href")||""===t.getAttribute("href"))&&n.preventDefault(),T())};return document.addEventListener("click",t,!0),function(){document.removeEventListener("click",t,!0)}}},[d.triggerSelector,T]),s=r.button&&"object"==typeof r.button?e.jsx(r.button.type,t({},r.button.props,{onClick:T,onFocus:T})):e.jsx(e.Fragment,{}),e.jsxs("div",{className:Ni,children:[e.jsx(di,{theme:l}),d.sideButtonLabel&&!k&&!F&&e.jsx(gi,{onClick:T,label:d.sideButtonLabel,position:null===(i=null==l?void 0:l.sideButton)||void 0===i?void 0:i.position,hidden:d.hideSideButton}),s,(u||k)&&e.jsx(Fe,{disableBackdrop:k,embedded:F,onClose:N,children:e.jsx(ii,{docked:k,embedded:F,openedByTrigger:y,config:d,preselectChipLabel:_,onPreselectChipUsed:function(){return h(void 0)}})})]})};function Ai(){var e=null===document||void 0===document?void 0:document.getElementById("xapp-form-js");return function(e){if(!e)return{path:""};var n=e.lastIndexOf("/"),t="";n>=0&&(t=e.substr(0,n));var r=new URL(e),a=new URLSearchParams(r.search).get("key")||"";return{path:t,key:a}}(null==e?void 0:e.src)}var Mi="none";function ji(e){var n,t=e.standalone,r=e.stylePreset,a=e.partnerCode,o=e.getPresetStyle;if(t&&r!==Mi){if(r)return r;if(a)return(null===(n=null==o?void 0:o(a))||void 0===n?void 0:n.enabled)?a:void 0}}function Ei(e,n){return n?e?Oi(e,n):n:e}function zi(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function Oi(e,n){for(var r=t({},e),a=0,o=Object.entries(n);a<o.length;a++){var i=o[a],s=i[0],d=i[1];if(void 0!==d){var l=r[s];r[s]=zi(d)&&zi(l)?Oi(l,d):d}}return r}exports.COST_GUIDE_FORM_STYLE={enabled:!0,theme:{borderColor:"transparent",borderRadius:"8px",backgroundColor:"#ffffff",headerBackgroundColor:"#ffffff",headerTextColor:"#1c3f47",primaryButtonColor:"#fb9b26",primaryButtonTextColor:"#ffffff",secondaryButtonColor:"#fb9b26",secondaryButtonTextColor:"#ffffff",text:{color:"#1c3f47",backgroundColor:"#ffffff",borderColor:"#cfe3e7",borderWidth:"1px",borderColorFocus:"#92dae1"},chips:{backgroundColor:"#d6eef2",color:"#1c3f47",backgroundColorSelected:"#1aacbe",colorSelected:"#ffffff"},date:{backgroundColorSelected:"#1aacbe"},button:{fontSize:"20px",fontWeight:"700",padding:"17px 25px",borderRadius:"10px",boxShadow:"0 4px 5px 4px rgba(0, 0, 0, 0.15)"},finalButtonPlacement:"inline",stepTitle:{align:"center",fontSize:"24px",fontWeight:"700",color:"#174146"},backButtonVariant:"icon",backButton:{color:"#a0cdd3",borderColor:"#a0cdd3",colorHover:"#174146",borderWidth:"2px",iconStroke:"0.8px"},font:{fontFamily:"Poppins, Arial, Verdana, sans-serif",link:"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;700&display=swap"},standAlone:{backgroundColor:"rgb(243, 248, 251)"},externalWidget:{minHeight:"600px"}}},exports.DEFAULT_DATE_FIELD_NAME=qn,exports.DEFAULT_DATE_TIME_FIELD_NAME=Yn,exports.DEFAULT_HORIZON_DAYS=60,exports.DEFAULT_SLOT_MINUTES=30,exports.DEFAULT_TIME_ZONE_FIELD_NAME=Gn,exports.FORM_PAGE_ATTRIBUTE=Fi,exports.FORM_PAGE_COUNT_ATTRIBUTE=ki,exports.Form=Ii,exports.FormContainer=function(n){return e.jsx(_e,{children:e.jsx(Ii,{config:n.config,theme:n.theme,button:n.button,buttonElementLookup:n.buttonElementLookup})})},exports.FormDisplay=No,exports.FormFrame=mo,exports.FormWidget=ii,exports.LeftAngleIcon=Le,exports.RightAngleIcon=He,exports.STYLE_PRESET_NONE=Mi,exports.SearchIcon=function(){return e.jsx("svg",{fill:"#000000",height:"300px",width:"30px",version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 382.163 382.163",children:e.jsxs("g",{children:[e.jsx("path",{d:"M344.89,215.855c0-50.602-24.567-95.57-62.396-123.618l2.982-5.326l46.258,25.92c1.16,0.65,2.418,0.958,3.659,0.958\n\t\tc2.626,0,5.175-1.381,6.55-3.835c8.883-15.853,11.061-34.216,6.132-51.706c-4.243-15.059-13.327-27.91-25.887-36.864l5.722-10.22\n\t\tc2.023-3.614,0.733-8.185-2.881-10.208c-3.614-2.023-8.184-0.734-10.208,2.88l-5.72,10.216\n\t\tc-31.487-13.349-68.758-1.123-85.857,29.391c-0.972,1.735-1.215,3.786-0.676,5.7s1.817,3.536,3.553,4.509l46.268,25.925\n\t\tl-2.406,4.297c-23.084-13.853-50.078-21.83-78.903-21.83c-28.825,0-55.818,7.977-78.902,21.829l-2.408-4.296l46.269-25.926\n\t\tc3.614-2.025,4.902-6.595,2.877-10.209c-8.883-15.853-23.407-27.297-40.897-32.226c-15.061-4.244-30.765-3.205-44.96,2.833\n\t\tL67.342,3.838c-2.023-3.615-6.593-4.904-10.208-2.881c-3.614,2.023-4.904,6.594-2.881,10.208l5.721,10.22\n\t\tc-12.559,8.954-21.643,21.804-25.886,36.864c-4.929,17.49-2.751,35.854,6.132,51.706c1.375,2.454,3.924,3.835,6.55,3.835\n\t\tc1.241,0,2.5-0.309,3.659-0.958l46.257-25.919l2.984,5.324c-37.83,28.047-62.397,73.016-62.397,123.619\n\t\tc0,45.21,19.61,85.924,50.767,114.091l-9.427,43.114c-0.885,4.047,1.678,8.044,5.725,8.929c0.54,0.118,1.078,0.175,1.609,0.175\n\t\tc3.448,0,6.553-2.393,7.32-5.899l7.818-35.757c25.321,18.332,56.416,29.157,89.996,29.157c33.58,0,64.676-10.825,89.997-29.158\n\t\tl7.818,35.758c0.767,3.507,3.871,5.899,7.319,5.899c0.531,0,1.07-0.057,1.609-0.175c4.046-0.885,6.61-4.882,5.725-8.929\n\t\tl-9.427-43.115C325.281,301.778,344.89,261.065,344.89,215.855z M308.517,30.436c12.357,6.924,21.279,18.246,25.121,31.88\n\t\tc3.155,11.198,2.574,22.853-1.57,33.507l-91.609-51.331C256.211,23.856,285.228,17.387,308.517,30.436z M50.096,95.824\n\t\tc-4.145-10.654-4.726-22.31-1.57-33.507c3.842-13.634,12.763-24.956,25.121-31.88c8.179-4.583,17.064-6.758,25.833-6.758\n\t\tc16.201,0,32.005,7.425,42.225,20.814L50.096,95.824z M52.273,215.855c0-76.54,62.269-138.809,138.809-138.809\n\t\tS329.89,139.315,329.89,215.855s-62.27,138.809-138.809,138.809S52.273,292.394,52.273,215.855z"}),e.jsx("path",{d:"M191.081,107.685c-59.645,0-108.17,48.525-108.17,108.17c0,59.645,48.525,108.17,108.17,108.17\n\t\tc59.646,0,108.17-48.525,108.17-108.17C299.252,156.21,250.727,107.685,191.081,107.685z M191.081,309.025\n\t\tc-51.374,0-93.17-41.796-93.17-93.17c0-51.374,41.796-93.17,93.17-93.17c51.375,0,93.17,41.796,93.17,93.17\n\t\tC284.252,267.229,242.456,309.025,191.081,309.025z"}),e.jsx("path",{d:"M198.585,190.081v-36.262c0-4.142-3.358-7.5-7.5-7.5s-7.5,3.358-7.5,7.5v36.26c-8.784,2.559-15.718,9.492-18.279,18.276\n\t\th-16.941c-4.142,0-7.5,3.358-7.5,7.5s3.358,7.5,7.5,7.5h16.941c3.254,11.165,13.574,19.349,25.775,19.349\n\t\tc14.805,0,26.849-12.044,26.849-26.849C217.93,203.655,209.748,193.337,198.585,190.081z M191.081,227.704\n\t\tc-6.533,0-11.849-5.315-11.849-11.849s5.315-11.849,11.849-11.849c6.534,0,11.849,5.315,11.849,11.849\n\t\tS197.615,227.704,191.081,227.704z"})]})})},exports.SpinnerIcon=Ue,exports.WidgetStylesheet=di,exports.firstSelectableDate=ut,exports.formatOfferingLabel=it,exports.generateOfferings=pt,exports.horizonDaysOf=st,exports.isDateSelectable=ct,exports.markFormPage=Ti,exports.mergeFormWidgetTheme=Ei,exports.parseWidgetEnv=function(e){var n,t,r=(null===(n=e.connection)||void 0===n?void 0:n.accountKey)||Ai().key||"";return[{api:{url:(null===(t=e.connection)||void 0===t?void 0:t.serverUrl)||"",key:r},suggestionsUrl:e.autocompleteSuggestionsUrl,autoGreeting:e.autoGreeting||"contact us",intentId:e.intentId,sideButtonLabel:e.sideButtonLabel,hideSideButton:e.hideSideButton,googleMapsApiKey:e.googleMapsApiKey,mapsBaseUrl:e.mapsBaseUrl,autoOpen:e.autoOpen,disabled:e.disabled,trustedForm:e.trustedForm,triggerSelector:e.triggerSelector,ga4MeasurementId:e.ga4MeasurementId},e.theme]},exports.resolveFormStyle=function(e){var n=e.customerTheme,t=e.getPresetStyle,r=ji(e),a=r?null==t?void 0:t(r):void 0;return a?{preset:r,theme:Ei(n,a.theme),framing:a.framing}:{theme:n}},exports.resolveStylePresetName=ji,exports.timeZoneOf=at,exports.toCalendarDate=et,exports.toOffsetIso=rt,exports.useFormPageMarker=function(e){void 0===e&&(e=!0),n.useEffect(function(){if(e)return Ti()},[e])};