@flarehr/apollo-benefits-onboarding 0.1.2915 → 0.1.2916
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.
|
@@ -4,5 +4,5 @@ var __defProp=Object.defineProperty,__typeError=e=>{throw TypeError(e)},__defNor
|
|
|
4
4
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
5
5
|
* MIT Licensed
|
|
6
6
|
*/
|
|
7
|
-
var Co=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,Eo=/\\([\u000b\u0020-\u00ff])/g,So=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,No=function(e){if(!e)throw new TypeError("argument string is required");var t="object"==typeof e?function(e){var t;"function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]);if("string"!=typeof t)throw new TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof t)throw new TypeError("argument string is required to be a string");var n=t.indexOf(";"),r=-1!==n?t.slice(0,n).trim():t.trim();if(!So.test(r))throw new TypeError("invalid media type");var o=new To(r.toLowerCase());if(-1!==n){var i,a,s;for(Co.lastIndex=n;a=Co.exec(t);){if(a.index!==n)throw new TypeError("invalid parameter format");n+=a[0].length,i=a[1].toLowerCase(),34===(s=a[2]).charCodeAt(0)&&-1!==(s=s.slice(1,-1)).indexOf("\\")&&(s=s.replace(Eo,"$1")),o.parameters[i]=s}if(n!==t.length)throw new TypeError("invalid parameter format")}return o};function To(e){this.parameters=Object.create(null),this.type=e}var Ao=new Map,Oo=function(e){return e.cloneNode(!0)},Ro=function(){return"file:"===window.location.protocol},Lo=function(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&2===r.readyState){var t=r.getResponseHeader("Content-Type");if(!t)throw new Error("Content type not found");var o=No(t).type;if("image/svg+xml"!==o&&"text/plain"!==o)throw new Error("Invalid content type: ".concat(o))}if(4===r.readyState){if(404===r.status||null===r.responseXML)throw new Error(Ro()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(!(200===r.status||Ro()&&0===r.status))throw new Error("There was a problem injecting the SVG: "+r.status+" "+r.statusText);n(null,r)}}catch(i){if(r.abort(),!(i instanceof Error))throw i;n(i,r)}},r.open("GET",e),r.withCredentials=t,r.overrideMimeType&&r.overrideMimeType("text/xml"),r.send()},Po={},Io=function(e,t){Po[e]=Po[e]||[],Po[e].push(t)},Uo=function(e,t,n){if(Ao.has(e)){var r=Ao.get(e);if(void 0===r)return void Io(e,n);if(r instanceof SVGSVGElement)return void n(null,Oo(r))}Ao.set(e,void 0),Io(e,n),Lo(e,t,(function(t,n){var r;t?Ao.set(e,t):(null===(r=n.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&Ao.set(e,n.responseXML.documentElement),function(e){for(var t=function(t,n){setTimeout((function(){if(Array.isArray(Po[e])){var n=Ao.get(e),r=Po[e][t];n instanceof SVGSVGElement&&r(null,Oo(n)),n instanceof Error&&r(n),t===Po[e].length-1&&delete Po[e]}}),0)},n=0,r=Po[e].length;n<r;n++)t(n)}(e)}))},Fo=function(e,t,n){Lo(e,t,(function(e,t){var r;e?n(e):(null===(r=t.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&n(null,t.responseXML.documentElement)}))},jo=0,Bo=[],Do={},Mo="http://www.w3.org/1999/xlink",zo=function(e,t,n,r,o,i,a){var s=e.getAttribute("data-src")||e.getAttribute("src");if(s){if(-1!==Bo.indexOf(e))return Bo.splice(Bo.indexOf(e),1),void(e=null);Bo.push(e),e.setAttribute("src",""),(r?Uo:Fo)(s,o,(function(r,o){if(!o)return Bo.splice(Bo.indexOf(e),1),e=null,void a(r);var l=e.getAttribute("id");l&&o.setAttribute("id",l);var c=e.getAttribute("title");c&&o.setAttribute("title",c);var d=e.getAttribute("width");d&&o.setAttribute("width",d);var u=e.getAttribute("height");u&&o.setAttribute("height",u);var p=Array.from(new Set(ko(ko(ko([],(o.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();o.setAttribute("class",p);var f=e.getAttribute("style");f&&o.setAttribute("style",f),o.setAttribute("data-src",s);var m=[].filter.call(e.attributes,(function(e){return/^data-\w[\w-]*$/.test(e.name)}));if(Array.prototype.forEach.call(m,(function(e){e.name&&e.value&&o.setAttribute(e.name,e.value)})),n){var h,g,y,_,b,w={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]};Object.keys(w).forEach((function(e){h=e,y=w[e];for(var t=function(e,t){var n;_=g[e].id,b=_+"-"+ ++jo,Array.prototype.forEach.call(y,(function(e){for(var t=0,r=(n=o.querySelectorAll("["+e+'*="'+_+'"]')).length;t<r;t++){var i=n[t].getAttribute(e);i&&!i.match(new RegExp('url\\("?#'+_+'"?\\)'))||n[t].setAttribute(e,"url(#"+b+")")}}));for(var r=o.querySelectorAll("[*|href]"),i=[],a=0,s=r.length;a<s;a++){var l=r[a].getAttributeNS(Mo,"href");l&&l.toString()==="#"+g[e].id&&i.push(r[a])}for(var c=0,d=i.length;c<d;c++)i[c].setAttributeNS(Mo,"href","#"+b);g[e].id=b},n=0,r=(g=o.querySelectorAll(h+"[id]")).length;n<r;n++)t(n)}))}o.removeAttribute("xmlns:a");for(var v,x,k=o.querySelectorAll("script"),C=[],E=0,S=k.length;E<S;E++)(x=k[E].getAttribute("type"))&&"application/ecmascript"!==x&&"application/javascript"!==x&&"text/javascript"!==x||((v=k[E].innerText||k[E].textContent)&&C.push(v),o.removeChild(k[E]));if(C.length>0&&("always"===t||"once"===t&&!Do[s])){for(var N=0,T=C.length;N<T;N++)new Function(C[N])(window);Do[s]=!0}var A=o.querySelectorAll("style");if(Array.prototype.forEach.call(A,(function(e){e.textContent+=""})),o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("xmlns:xlink",Mo),i(o),!e.parentNode)return Bo.splice(Bo.indexOf(e),1),e=null,void a(new Error("Parent node is null"));e.parentNode.replaceChild(o,e),Bo.splice(Bo.indexOf(e),1),e=null,a(null,o)}))}else a(new Error("Invalid data-src or src attribute"))},Ho={exports:{}};function qo(){}function Wo(){}Wo.resetWarningCache=qo;Ho.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Wo,resetWarningCache:qo};return n.PropTypes=n,n}();var Vo=Ho.exports,$o=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Go="http://www.w3.org/2000/svg",Yo="http://www.w3.org/1999/xlink",Zo=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).initialState={hasError:!1,isLoading:!0},t.state=t.initialState,t._isMounted=!1,t.reactWrapper=void 0,t.nonReactWrapper=void 0,t.refCallback=function(e){t.reactWrapper=e},t}var n,r;r=e,(n=t).prototype=Object.create(r.prototype),n.prototype.constructor=n,xo(n,r);var o=t.prototype;return o.renderSVG=function(){var e,t=this;if(this.reactWrapper instanceof(e=this.reactWrapper,((null==e?void 0:e.ownerDocument)||document).defaultView||window).Node){var n,r,o=this.props,i=o.desc,a=o.evalScripts,s=o.httpRequestWithCredentials,l=o.renumerateIRIElements,c=o.src,d=o.title,u=o.useRequestCache,p=this.props.onError,f=this.props.beforeInjection,m=this.props.afterInjection,h=this.props.wrapper;"svg"===h?((n=document.createElementNS(Go,h)).setAttribute("xmlns",Go),n.setAttribute("xmlns:xlink",Yo),r=document.createElementNS(Go,h)):(n=document.createElement(h),r=document.createElement(h)),n.appendChild(r),r.dataset.src=c,this.nonReactWrapper=this.reactWrapper.appendChild(n);var g=function(e){t.removeSVG(),t._isMounted?t.setState((function(){return{hasError:!0,isLoading:!1}}),(function(){p(e)})):p(e)};!function(e,t){var n=void 0===t?{}:t,r=n.afterAll,o=void 0===r?function(){}:r,i=n.afterEach,a=void 0===i?function(){}:i,s=n.beforeEach,l=void 0===s?function(){}:s,c=n.cacheRequests,d=void 0===c||c,u=n.evalScripts,p=void 0===u?"never":u,f=n.httpRequestWithCredentials,m=void 0!==f&&f,h=n.renumerateIRIElements,g=void 0===h||h;if(e&&"length"in e)for(var y=0,_=0,b=e.length;_<b;_++)zo(e[_],p,g,d,m,l,(function(t,n){a(t,n),e&&"length"in e&&e.length===++y&&o(y)}));else e?zo(e,p,g,d,m,l,(function(t,n){a(t,n),o(1),e=null})):o(0)}(r,{afterEach:function(e,n){e?g(e):t._isMounted&&t.setState((function(){return{isLoading:!1}}),(function(){try{m(n)}catch(e){g(e)}}))},beforeEach:function(e){if(e.setAttribute("role","img"),i){var t=e.querySelector(":scope > desc");t&&e.removeChild(t);var n=document.createElement("desc");n.innerHTML=i,e.prepend(n)}if(d){var r=e.querySelector(":scope > title");r&&e.removeChild(r);var o=document.createElement("title");o.innerHTML=d,e.prepend(o)}try{f(e)}catch(a){g(a)}},cacheRequests:u,evalScripts:a,httpRequestWithCredentials:s,renumerateIRIElements:l})}},o.removeSVG=function(){var e;null!=(e=this.nonReactWrapper)&&e.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},o.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},o.componentDidUpdate=function(e){var t=this;(function(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1})(vo({},e),this.props)&&this.setState((function(){return t.initialState}),(function(){t.removeSVG(),t.renderSVG()}))},o.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},o.render=function(){var e=this.props;e.afterInjection,e.beforeInjection,e.desc,e.evalScripts;var t=e.fallback;e.httpRequestWithCredentials;var n=e.loading;e.renumerateIRIElements,e.src,e.title,e.useRequestCache;var r=e.wrapper,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,$o);return v(r,vo({},o,{ref:this.refCallback},"svg"===r?{xmlns:Go,xmlnsXlink:Yo}:{}),this.state.isLoading&&n&&v(n,null),this.state.hasError&&t&&v(t,null))},t}(E);Zo.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"},Zo.propTypes={afterInjection:Vo.func,beforeInjection:Vo.func,desc:Vo.string,evalScripts:Vo.oneOf(["always","once","never"]),fallback:Vo.oneOfType([Vo.func,Vo.object,Vo.string]),httpRequestWithCredentials:Vo.bool,loading:Vo.oneOfType([Vo.func,Vo.object,Vo.string]),onError:Vo.func,renumerateIRIElements:Vo.bool,src:Vo.string.isRequired,title:Vo.string,useRequestCache:Vo.bool,wrapper:Vo.oneOf(["div","span","svg"])};const Jo=({visible:e,children:t})=>{const n=qn(e);return e&&!n.current&&(n.current=!0),n.current?lo("div",{hidden:!e,children:t}):null},Xo=({icon:e})=>"string"==typeof e?lo(Zo,{src:e,wrapper:"svg",className:"w-6 h-6 max-w-6 max-h-6 min-w-6 min-h-6",beforeInjection:e=>{var t;e.removeAttribute("width"),e.removeAttribute("height"),null==(t=e.querySelector("path"))||t.removeAttribute("fill"),e.setAttribute("fill","currentColor")}}):lo("div",{className:"w-6 h-6 max-w-6 max-h-6 min-w-6 min-h-6",children:e}),Ko=({label:e,icon:t})=>lo("div",{className:"flex items-center flex-col",children:[t,lo("p",{className:"max-h-10 max-w-20 break-words text-ellipsis overflow-hidden line-clamp-2 mt-2",children:e})]}),Qo=({children:e})=>lo(C,{children:e}),ei=({selectedIndex:e,onChange:t,children:n})=>{const r=Vn((()=>ur.toArray(n).filter((e=>e.type===Ko))),[n]),o=Vn((()=>ur.toArray(n).filter((e=>e.type===Qo))),[n]);return wo((()=>{o.length>0&&(null==t||t(0))})),lo("div",{children:[lo("div",{className:"flex items-baseline md:mb-4",children:r.map(((n,r)=>lo("div",{onClick:()=>null==t?void 0:t(r),className:`\n text-sm font-medium cursor-auto w-10 min-w-10 max-w-10 h-12 min-h-12 max-h-12 mr-10 h-full relative\n flex items-center justify-center\n [&:not(:last-child):after]:absolute [&:not(:last-child):after]:top-3 [&:not(:last-child):after]:content-[""] [&:not(:last-child):after]:w-10 [&:not(:last-child):after]:border-b-2 [&:not(:last-child):after]:border-solid [&:not(:last-child):after]:border-gray-200 [&:not(:last-child):after]:left-10\n ${r===e?"text-primary-base":"text-gray-400"}\n hover:before:content-[''] \n ${o.length>0?"hover:before:cursor-pointer":"hover:before:cursor-default"} \n hover:before:w-16 hover:before:h-16 hover:before:absolute\n `,children:n},n.key)))}),o.map(((t,n)=>lo(Jo,{visible:n===e,children:t},t.key)))]})},ti=({className:e,children:t})=>lo("h1",{className:`text-2xl md:text-3xl font-bold ${e??""}`,children:t}),ni=({className:e,children:t})=>lo("h3",{class:`text-base md:text-lg text-gray-600 ${e??""}`,children:t}),ri=e=>v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...e},v("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})),oi=({title:e,steps:t,...n})=>{const r=t.length,o=t.filter((e=>e.completed)).length;return lo("div",{...n,children:[e&&lo("h1",{className:"text-lg font-semibold mb-4",children:e}),lo("ol",{children:t.map(((e,t)=>{const n=o===t;return lo("li",{className:"relative flex-1 pb-6 "+(t!==r-1?`after:content-[''] after:w-0.5 after:h-[calc(100%-theme(height.8))] ${e.completed?"after:bg-primary-base":"after:bg-gray-300"} after:inline-block after:absolute after:top-8 after:left-4`:""),children:lo("div",{className:"flex font-medium w-full",children:[lo("span",{className:`w-8 min-w-8 max-w-8 h-8 min-h-8 max-h-8 ${e.completed?"bg-primary-base":"bg-white"} border-2 ${e.completed||n?"border-primary-base":"border-gray-300"} rounded-full flex justify-center items-center mr-3 text-sm ${n?"text-primary-base":"text-gray-500"}`,children:e.completed?lo(ri,{className:"w-4 h-4 text-white"}):t+1}),lo("div",{children:[lo("h4",{className:"text-sm text-left font-semibold "+(e.completed||n?"text-primary-base":"text-gray-600"),children:e.title}),lo("p",{className:"text-sm text-left font-normal",children:e.description})]})]})},t)}))})]})};var ii=Object.defineProperty,ai=(e,t,n)=>(((e,t,n)=>{t in e?ii(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let si=new class{constructor(){ai(this,"current",this.detect()),ai(this,"handoffState","pending"),ai(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},li=(e,t)=>{si.isServer?zn(e,t):Hn(e,t)};function ci(e){let t=qn(e);return li((()=>{t.current=e}),[e]),t}let di=function(e){let t=ci(e);return oo.useCallback(((...e)=>t.current(...e)),[t])};function ui(){let e=[],t={addEventListener:(e,n,r,o)=>(e.addEventListener(n,r,o),t.add((()=>e.removeEventListener(n,r,o)))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(n)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let n=setTimeout(...e);return t.add((()=>clearTimeout(n)))},microTask(...e){let n={current:!0};return function(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}((()=>{n.current&&e[0]()})),t.add((()=>{n.current=!1}))},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add((()=>{Object.assign(e.style,{[t]:r})}))},group(e){let t=ui();return e(t),this.add((()=>t.dispose()))},add:t=>(e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function pi(){let[e]=Dn(ui);return zn((()=>()=>e.dispose()),[e]),e}function fi(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in io&&io.useSyncExternalStore((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,n]=Dn(si.isHandoffComplete);return t&&!1===si.isHandoffComplete&&n(!1),zn((()=>{!0!==t&&n(!0)}),[t]),zn((()=>si.handoff()),[]),!e&&t}function mi(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,mi),r}let hi=Symbol();function gi(...e){let t=qn(e);zn((()=>{t.current=e}),[e]);let n=di((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[hi])))?void 0:n}function yi(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}var _i,bi,wi=((bi=wi||{})[bi.None=0]="None",bi[bi.RenderStrategy=1]="RenderStrategy",bi[bi.Static=2]="Static",bi),vi=((_i=vi||{})[_i.Unmount=0]="Unmount",_i[_i.Hidden=1]="Hidden",_i);function xi({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:a,mergeRefs:s}){s=null!=s?s:Ci;let l=Ei(t,e);if(i)return ki(l,n,r,a,s);let c=null!=o?o:0;if(2&c){let{static:e=!1,...t}=l;if(e)return ki(t,n,r,a,s)}if(1&c){let{unmount:e=!0,...t}=l;return mi(e?0:1,{0:()=>null,1:()=>ki({...t,hidden:!0,style:{display:"none"}},n,r,a,s)})}return ki(l,n,r,a,s)}function ki(e,t={},n,r,o){let{as:i=n,children:a,refName:s="ref",...l}=Ti(e,["unmount","static"]),c=void 0!==e.ref?{[s]:e.ref}:{},d="function"==typeof a?a(t):a;"className"in l&&l.className&&"function"==typeof l.className&&(l.className=l.className(t));let u={};if(t){let e=!1,n=[];for(let[r,o]of Object.entries(t))"boolean"==typeof o&&(e=!0),!0===o&&n.push(r);e&&(u["data-headlessui-state"]=n.join(" "))}if(i===C&&Object.keys(Ni(l)).length>0){if(!qr(d)||Array.isArray(d)&&d.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(l).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"));let e=d.props,t="function"==typeof(null==e?void 0:e.className)?(...t)=>yi(null==e?void 0:e.className(...t),l.className):yi(null==e?void 0:e.className,l.className),n=t?{className:t}:{};return Vr(d,Object.assign({},Ei(d.props,Ni(Ti(l,["ref"]))),u,c,{ref:o(d.ref,c.ref)},n))}return v(i,Object.assign({},Ti(l,["ref"]),i!==C&&c,i!==C&&u),d)}function Ci(...e){return e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function Ei(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map((e=>[e,void 0]))));for(let r in n)Object.assign(t,{[r](e,...t){let o=n[r];for(let n of o){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;n(e,...t)}}});return t}function Si(e){var t;return Object.assign(cr(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Ni(e){let t=Object.assign({},e);for(let n in t)void 0===t[n]&&delete t[n];return t}function Ti(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let Ai=G(null);Ai.displayName="OpenClosedContext";var Oi=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Oi||{});function Ri(){return Gn(Ai)}function Li({value:e,children:t}){return oo.createElement(Ai.Provider,{value:e},t)}function Pi(){let e=qn(!1);return li((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function Ii(e,...t){e&&t.length>0&&e.classList.add(...t)}function Ui(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Fi(e,t,n,r){let o=n?"enter":"leave",i=ui(),a=void 0!==r?function(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}(r):()=>{};"enter"===o&&(e.removeAttribute("hidden"),e.style.display="");let s=mi(o,{enter:()=>t.enter,leave:()=>t.leave}),l=mi(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=mi(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Ui(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Ii(e,...t.base,...s,...c),i.nextFrame((()=>{Ui(e,...t.base,...s,...c),Ii(e,...t.base,...s,...l),function(e,t){let n=ui();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,a]=[r,o].map((e=>{let[t=0]=e.split(",").filter(Boolean).map((e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e))).sort(((e,t)=>t-e));return t})),s=i+a;if(0!==s){n.group((n=>{n.setTimeout((()=>{t(),n.dispose()}),s),n.addEventListener(e,"transitionrun",(e=>{e.target===e.currentTarget&&n.dispose()}))}));let r=n.addEventListener(e,"transitionend",(e=>{e.target===e.currentTarget&&(t(),r())}))}else t();n.add((()=>t())),n.dispose}(e,(()=>(Ui(e,...t.base,...s),Ii(e,...t.base,...t.entered),a())))})),i.dispose}function ji(e=""){return e.split(/\s+/).filter((e=>e.length>1))}let Bi=G(null);Bi.displayName="TransitionContext";var Di,Mi=((Di=Mi||{}).Visible="visible",Di.Hidden="hidden",Di);let zi=G(null);function Hi(e){return"children"in e?Hi(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function qi(e,t){let n=ci(e),r=qn([]),o=Pi(),i=pi(),a=di(((e,t=vi.Hidden)=>{let a=r.current.findIndex((({el:t})=>t===e));-1!==a&&(mi(t,{[vi.Unmount](){r.current.splice(a,1)},[vi.Hidden](){r.current[a].state="hidden"}}),i.microTask((()=>{var e;!Hi(r)&&o.current&&(null==(e=n.current)||e.call(n))})))})),s=di((e=>{let t=r.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>a(e,vi.Unmount)})),l=qn([]),c=qn(Promise.resolve()),d=qn({enter:[],leave:[],idle:[]}),u=di(((e,n,r)=>{l.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter((([t])=>t!==e))),null==t||t.chains.current[n].push([e,new Promise((e=>{l.current.push(e)}))]),null==t||t.chains.current[n].push([e,new Promise((e=>{Promise.all(d.current[n].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===n?c.current=c.current.then((()=>null==t?void 0:t.wait.current)).then((()=>r(n))):r(n)})),p=di(((e,t,n)=>{Promise.all(d.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=l.current.shift())||e()})).then((()=>n(t)))}));return Vn((()=>({children:r,register:s,unregister:a,onStart:u,onStop:p,wait:c,chains:d})),[s,a,r,u,p,d,c])}function Wi(){}zi.displayName="NestingContext";let Vi=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function $i(e){var t;let n={};for(let r of Vi)n[r]=null!=(t=e[r])?t:Wi;return n}let Gi=wi.RenderStrategy;let Yi=Si((function(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,a=qn(null),s=gi(a,t);fi();let l=Ri();if(void 0===n&&null!==l&&(n=(l&Oi.Open)===Oi.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,d]=Dn(n?"visible":"hidden"),u=qi((()=>{d("hidden")})),[p,f]=Dn(!0),m=qn([n]);li((()=>{!1!==p&&m.current[m.current.length-1]!==n&&(m.current.push(n),f(!1))}),[m,n]);let h=Vn((()=>({show:n,appear:r,initial:p})),[n,r,p]);zn((()=>{if(n)d("visible");else if(Hi(u)){let e=a.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&d("hidden")}else d("hidden")}),[n,u]);let g={unmount:o},y=di((()=>{var t;p&&f(!1),null==(t=e.beforeEnter)||t.call(e)})),_=di((()=>{var t;p&&f(!1),null==(t=e.beforeLeave)||t.call(e)}));return oo.createElement(zi.Provider,{value:u},oo.createElement(Bi.Provider,{value:h},xi({ourProps:{...g,as:C,children:oo.createElement(Zi,{ref:s,...g,...i,beforeEnter:y,beforeLeave:_})},theirProps:{},defaultTag:C,features:Gi,visible:"visible"===c,name:"Transition"})))})),Zi=Si((function(e,t){var n,r;let{beforeEnter:o,afterEnter:i,beforeLeave:a,afterLeave:s,enter:l,enterFrom:c,enterTo:d,entered:u,leave:p,leaveFrom:f,leaveTo:m,...h}=e,g=qn(null),y=gi(g,t),_=null==(n=h.unmount)||n?vi.Unmount:vi.Hidden,{show:b,appear:w,initial:v}=function(){let e=Gn(Bi);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[x,k]=Dn(b?"visible":"hidden"),C=function(){let e=Gn(zi);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:E,unregister:S}=C;zn((()=>E(g)),[E,g]),zn((()=>{if(_===vi.Hidden&&g.current)return b&&"visible"!==x?void k("visible"):mi(x,{hidden:()=>S(g),visible:()=>E(g)})}),[x,g,E,S,b,_]);let N=ci({base:ji(h.className),enter:ji(l),enterFrom:ji(c),enterTo:ji(d),entered:ji(u),leave:ji(p),leaveFrom:ji(f),leaveTo:ji(m)}),T=function(e){let t=qn($i(e));return zn((()=>{t.current=$i(e)}),[e]),t}({beforeEnter:o,afterEnter:i,beforeLeave:a,afterLeave:s}),A=fi();zn((()=>{if(A&&"visible"===x&&null===g.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[g,x,A]);let O=v&&!w,R=w&&b&&v,L=(()=>!A||O?"idle":b?"enter":"leave")(),P=function(e=0){let[t,n]=Dn(e),r=Pi(),o=$n((e=>{r.current&&n((t=>t|e))}),[t,r]),i=$n((e=>Boolean(t&e)),[t]),a=$n((e=>{r.current&&n((t=>t&~e))}),[n,r]),s=$n((e=>{r.current&&n((t=>t^e))}),[n]);return{flags:t,addFlag:o,hasFlag:i,removeFlag:a,toggleFlag:s}}(0),I=di((e=>mi(e,{enter:()=>{P.addFlag(Oi.Opening),T.current.beforeEnter()},leave:()=>{P.addFlag(Oi.Closing),T.current.beforeLeave()},idle:()=>{}}))),U=di((e=>mi(e,{enter:()=>{P.removeFlag(Oi.Opening),T.current.afterEnter()},leave:()=>{P.removeFlag(Oi.Closing),T.current.afterLeave()},idle:()=>{}}))),F=qi((()=>{k("hidden"),S(g)}),C),j=qn(!1);!function({immediate:e,container:t,direction:n,classes:r,onStart:o,onStop:i}){let a=Pi(),s=pi(),l=ci(n);li((()=>{e&&(l.current="enter")}),[e]),li((()=>{let e=ui();s.add(e.dispose);let n=t.current;if(n&&"idle"!==l.current&&a.current)return e.dispose(),o.current(l.current),e.add(Fi(n,r.current,"enter"===l.current,(()=>{e.dispose(),i.current(l.current)}))),e.dispose}),[n])}({immediate:R,container:g,classes:N,direction:L,onStart:ci((e=>{j.current=!0,F.onStart(g,e,I)})),onStop:ci((e=>{j.current=!1,F.onStop(g,e,U),"leave"===e&&!Hi(F)&&(k("hidden"),S(g))}))});let B=h,D={ref:y};return R?B={...B,className:yi(h.className,...N.current.enter,...N.current.enterFrom)}:j.current&&(B.className=yi(h.className,null==(r=g.current)?void 0:r.className),""===B.className&&delete B.className),oo.createElement(zi.Provider,{value:F},oo.createElement(Li,{value:mi(x,{visible:Oi.Open,hidden:Oi.Closed})|P.flags},xi({ourProps:D,theirProps:B,defaultTag:"div",features:Gi,visible:"visible"===x,name:"Transition.Child"})))})),Ji=Si((function(e,t){let n=null!==Gn(Bi),r=null!==Ri();return oo.createElement(oo.Fragment,null,!n&&r?oo.createElement(Yi,{ref:t,...e}):oo.createElement(Zi,{ref:t,...e}))})),Xi=Object.assign(Yi,{Child:Ji,Root:Yi});const Ki=({children:e})=>{const t=oo.Children.toArray(e),n=t.find((e=>e.type===Qi)),r=t.find((e=>e.type===ea));return lo(Xi,{appear:!0,show:!0,enter:"transition duration-700 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",children:lo("div",{class:"flex flex-col text-center items-center max-w-[40rem] mx-auto",children:[lo(Xi,{appear:!0,show:!0,enter:"transition duration-700 ease-out md:transition-none",enterFrom:"-translate-y-6",enterTo:"translate-y-0",children:n&&lo("div",{class:"flex items-center h-full",children:n})}),lo(Xi,{appear:!0,show:!0,enter:"transition delay-300 duration-[600ms] ease-out",enterFrom:"opacity-0 -translate-y-6",enterTo:"opacity-100 translate-y-0",children:r&&lo("div",{class:"flex items-center h-full",children:r})})]})})},Qi=({children:e})=>lo(C,{children:e}),ea=({children:e})=>lo(C,{children:e});Ki.Top=Qi,Ki.Bottom=ea;const ta=({onContinue:e})=>{const{featureFlags:{marketplaceScheme:t},offers:n}=Gn(uo),r="allowance"===t.scheme?t.content.setUpBenefits:void 0;return lo(C,{children:r&&lo("div",{className:"flex flex-col items-center max-w-full w-full mx-auto",children:[lo(ei,{selectedIndex:-1,children:n.map((e=>lo(Ko,{label:e.content.productName,icon:lo(Xo,{icon:e.content.iconUrl})},e.name)))}),lo(Ki,{children:[lo(Ki.Top,{children:lo("div",{className:"flex flex-col gap-4",children:[lo(ti,{children:r.title}),lo(ni,{children:r.description})]})}),lo(Ki.Bottom,{children:lo("div",{className:"mt-5 flex flex-col items-center gap-5 text-center",children:[r.progress&&lo(bo,{className:"lg:w-3/4",title:r.progress.title,children:lo(oi,{steps:r.progress.steps,className:"mt-2 rounded-md px-6 py-4"})}),lo(_o,{testId:"allowance_set_up_benefits_button_next_screen",class:"mt-5 w-full md:w-[240px]",onClickPromise:e,children:r.buttonText}),r.termsAndConditions&&lo("span",{className:"font-normal text-xs mt-4 lg:w-3/4",children:lo(r.termsAndConditions,{})})]})})]})]})})},na=({icon:e,children:t,className:n,...r})=>lo("div",{...r,className:`${n??""} rounded-md shadow-sm`,children:lo("div",{className:"flex items-center gap-4 px-4 py-4",children:[e&&lo("span",{className:"w-8 min-w-8 max-w-8",children:e}),t&&lo("span",{className:"text-left text-base",children:t})]})}),ra=(e,t)=>{switch(!0){case"started"===e:return vn.backend.command({eventType:"Started"},t);case"membership-accepted"===e:return vn.backend.command({eventType:"OfferProgressed",offerName:"Membership",data:{accepted:!0,featureName:"",treatmentName:"",template:"Eoi"}},t);case"membership-declined"===e:return vn.backend.command({eventType:"OfferProgressed",offerName:"Membership",data:{accepted:!1,featureName:"",treatmentName:"",template:"Eoi"}},t);case"sign-up-viewed"===e:return vn.backend.command({eventType:"OfferViewed",offerName:"Membership",data:{featureName:"",treatmentName:""}},t);case"sign-up-completed"===e:return(async()=>{await vn.backend.command({eventType:"OfferProgressed",offerName:"Membership",data:{accepted:!0,featureName:"",treatmentName:"",template:"Eoi"}},t),await vn.backend.command({eventType:"CustomerRegistrationCompleted",isRegistered:!0},t)})();case"sign-up-declined"===e:return(async()=>{await vn.backend.command({eventType:"CustomerRegistrationCompleted",isRegistered:!1},t),await vn.backend.command({eventType:"OfferProgressed",offerName:"Membership",data:{accepted:!1,featureName:"",treatmentName:"",template:"Eoi"}},t)})();case"object"==typeof e&&"offer-selected"===e.type:return vn.workplaceBackend.track("MarketplaceOffer Selected",{offer:e.offerName},t);case"object"==typeof e&&"offer-viewed"===e.type:return vn.backend.command({...e,eventType:"OfferViewed"},t);case"object"==typeof e&&"offer-accepted"===e.type:return vn.backend.command({eventType:"OfferProgressed",offerName:e.offerName,data:{...e.data,accepted:!0}},t);case"object"==typeof e&&"offer-declined"===e.type:return vn.backend.command({eventType:"OfferProgressed",offerName:e.offerName,data:{...e.data,accepted:!1}},t);case"object"==typeof e&&"offer-progressed"===e.type:return vn.backend.command({eventType:"OfferProgressed",offerName:e.offerName,data:e.data},t);case"object"==typeof e&&"summary-viewed"===e.type:return vn.backend.command({eventType:"SummaryViewed",summaryVariant:e.data.summaryVariant},t);case"completed"===e:return vn.backend.command({eventType:"Completed"},t)}return Promise.resolve()},oa=()=>({trace:ra}),ia=e=>{const{trace:t}=oa(),{featureFlags:{marketplaceScheme:n}}=Gn(uo),r="allowance"===n.scheme?n.content.joinBenefits:void 0;return lo(C,{children:r&&lo(Ki,{children:[lo(Ki.Top,{children:[lo("img",{class:"max-w-[30rem] w-full hidden md:block",src:r.desktopImageUrl}),lo("img",{class:"max-w-[30rem] w-full md:hidden",src:r.mobileImageUrl})]}),lo(Ki.Bottom,{children:lo("div",{children:[lo("h3",{class:"mt-8 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:r.title}),lo("p",{class:"mt-3 text-lg leading-7 text-gray-600",children:r.description}),lo(na,{className:"bg-teal-50 mt-5",style:{background:"linear-gradient(90deg, rgba(255, 216, 77, 0.10) 0%, rgba(255, 135, 111, 0.10) 100%)"},icon:r.specialBanner.icon,children:lo("div",{children:[lo("p",{className:"font-semibold text-base text-gray-900",children:r.specialBanner.title}),lo("span",{className:"font-normal text-base text-gray-900",children:r.specialBanner.subTitle})]})}),lo(_o,{testId:"introduction_button_next_screen",class:"mt-8",onClickPromise:async()=>{await t("started",{experiment:"onboarding-marketplace-scheme",treatment:n.scheme}),e.onContinue()},children:r.buttonText})]})})]})})},aa=""+("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/assets/get-app-CQalMIl7.jpg?inline").href:new URL("assets/get-app-CQalMIl7.jpg?inline","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href),sa=()=>lo("div",{className:"mt-4 flex items-center border rounded-md border-gray-300",children:[lo("img",{className:"h-40 h-min-40 h-max-40 m-0.5",src:aa}),lo("div",{className:"flex flex-col gap-1",children:[lo("h4",{className:"font-bold text-lg text-left",children:"Workplace benefits in your pocket!"}),lo("p",{className:"font-normal text-base text-left",children:"Download the Flare app for easy access to your workplace benefits and exclusive discounts."}),lo("a",{className:"focus:ring-2 focus:ring-primary-focus font-bold rounded-md self-start text-primary-base",target:"_blank",rel:"noreferrer",href:"https://flarehr.app.link/download",children:["Get the Flare App ","->"]})]})]}),la=({onContinue:e})=>{const{offersProgress:{hasCompletedAnyOffers:t},isAppEnabled:n,featureFlags:{marketplaceScheme:r}}=Gn(uo),{trace:o}=oa(),i=Vn((()=>{const e=t();switch(!0){case n&&e:return"allowance-accepted-app";case n&&!e:return"allowance-declined-app";case!n&&e:return"allowance-accepted-noapp";case!n&&!e:return"allowance-declined-noapp";default:throw"Invalid summary variant"}}),[t,n]);zn((()=>{(async()=>{await o({type:"summary-viewed",data:{summaryVariant:i}},{experiment:"onboarding-marketplace-scheme",treatment:r.scheme})})()}),[r,i,o]);const a=$n((async()=>{await o("completed",{experiment:"onboarding-marketplace-scheme",treatment:r.scheme}),await e()}),[r,e,o]),s="allowance"===r.scheme?r.content.summary:void 0;return lo(C,{children:s&&lo(Ki,{children:[lo(Ki.Top,{children:lo("div",{className:"flex flex-col gap-4",children:[lo(ti,{children:s.title}),lo(ni,{children:s.description})]})}),lo(Ki.Bottom,{children:lo("div",{className:"mt-5 flex flex-col items-center gap-5 text-center",children:[s.progress&&lo(bo,{className:"lg:w-3/4",title:s.progress.title,children:lo(oi,{steps:s.progress.steps,className:"mt-2 rounded-md px-6 py-4"})}),lo(_o,{testId:"step-benefits-finish",class:"mt-5 w-full md:w-[240px]",onClickPromise:a,children:s.buttonText}),n&&lo(sa,{})]})})]})})};var ca=(e=>(e[e.PHONE_NUMBER=0]="PHONE_NUMBER",e[e.OTP=1]="OTP",e[e.SUCCESS=2]="SUCCESS",e))(ca||{});const da=({className:e,children:t,...n})=>lo("label",{class:`text-base text-gray-600 ${e??""}`,...n,children:t}),ua=e=>v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"green",className:"w-5 h-5",...e},v("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"})),pa=({className:e,onClick:t,...n})=>{const[r,o]=Dn(!1);return lo("button",{className:`inline-flex items-center justify-center px-2 text-primary-base rounded-md bg-transparent hover:bg-sky-50/50 focus:ring-2 focus:ring-primary-focus ${e??""}`,onClick:$n((()=>{if(!r)return o(!0),t().finally((()=>{o(!1)}))}),[r,t]),...n,children:[lo("div",{class:"relative "+(r?"invisible":""),children:n.children}),r&&lo("div",{class:"absolute animate-spin",children:lo(go,{theme:"primary"})})]})},fa=({className:e,allowedKeyPattern:t,onChange:n,value:r,leadingIconElement:o,trailingIconElement:i,...a})=>{const s=$n((e=>{t.test(e.key)||e.preventDefault()}),[t]);return lo(C,{children:lo("div",{class:"relative",children:[o,lo("input",{"data-testid":a.testId,type:"text",className:`border-0 ring-2 ring-gray-200 focus:outline-none text-base font-medium rounded-md shadow-sm ${e}`,value:r,onKeyPress:s,onChange:e=>n(e.currentTarget.value),...a}),i]})})},ma=e=>e.replace(/ /g,""),ha=e=>{const t=ma(e);return t.startsWith("04")&&10===t.length||t.startsWith("614")&&11===t.length||t.startsWith("+614")&&12===t.length||/^\+642\d{7,9}$/.test(t)},ga=({phoneNumber:e,onSubmit:t,onDecline:n})=>{const{hostInformation:{workflowsJourneyType:r}}=Gn(uo),[o,i]=Dn(""),{setPhoneNumber:a,phoneNumber:s}=(e=>{const{identity:t}=Gn(uo),[n,r]=Dn((()=>e&&ha(e)?e:"")),o=Vn((()=>ha(n)),[n]),i=Vn((()=>ma(n)),[n]),a=Vn((()=>i.startsWith("04")?`+61${i.replace(/^0+/,"")}`:i.startsWith("614")?`+${i}`:i),[i]),s=Vn((()=>(e=>{let t=0;return"#### ### ### ### ### ### ###".replace(/#/g,(()=>e[t++]??"")).trim()})(i)),[i]),l=Vn((()=>ha(t.verifiedPhoneNumber)&&a===t.verifiedPhoneNumber),[a,t.verifiedPhoneNumber]);return{setPhoneNumber:r,phoneNumber:{valid:o,original:n,formatted:a,masked:s,isVerified:l}}})(e),[l,c]=Dn(s.isVerified),d=$n((()=>{i("")}),[]),u=$n((()=>{const e=s.valid?"":"Please enter a valid Australian mobile number beginning with 04.";i(e),c(s.isVerified)}),[s.isVerified,s.valid]),p=$n((async()=>{s.valid&&await t(s).catch(i)}),[s,t]),f=$n((async()=>{c(!1)}),[]),m=lo("div",{class:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-xs text-green-700 font-bold",children:["Verified ",lo(ua,{})]});return lo(Ki,{children:[lo(Ki.Top,{children:lo("div",{className:"flex flex-col gap-5",children:[lo(ti,{children:"Join your workplace benefits program"}),lo(ni,{children:[s.isVerified?"Confirm ":"Enter "," your ",lo("b",{children:"personal"})," mobile number to finish setting up your Flare Benefits account linked to your workplace"]})]})}),lo(Ki.Bottom,{children:lo("div",{className:"mt-5 md:w-[300px] text-left",children:[lo(da,{className:"font-medium text-sm text-gray-900 text-left",children:"Australian Mobile Number"}),lo(fa,{testId:"sign_in_mobile_number_text_input_mobile_number",allowedKeyPattern:/[+0-9]/,inputMode:"numeric",className:"mt-1 mb-1 w-full p-2 focus-visible:ring-gray-500",value:s.original,onChange:a,onfocusin:d,onfocusout:u,trailingIconElement:l&&m,disabled:l}),0!==o.length&&lo("div",{className:"h-8 leading-none",children:lo("span",{className:"text-xs text-rose-500",children:o})}),l&&lo("div",{className:"mt-2 ml-2 mb-2 leading-none",children:lo("span",{className:"text-xs",children:["Not your personal number?",lo(pa,{class:"text-blue-500",onClick:f,children:"Change number"})]})}),lo("div",{children:lo("span",{className:"font-medium text-sm text-gray-900 text-center",children:["By creating your account you confirm you have read and agree to Flare Benefits"," ",lo("a",{href:"https://www.flarehr.com/flare-app-terms-and-conditions/",target:"_blank",rel:"noreferrer",children:" Terms of Use "}),"and",lo("a",{href:"https://www.flarehr.com/privacy-policy/",target:"_blank",rel:"noreferrer",children:" Privacy Policy"}),"."," "]})}),lo(_o,{testId:"sign_in_mobile_number_button_send_otp",class:"mt-5 md:w-full",onClickPromise:p,children:"Join your workplace"}),"AppInvite"!==r&&lo(_o,{testId:"sign_in_mobile_number_button_decline_to_send_otp",class:"mt-5 md:w-full bg-white hover:!bg-gray-100 focus:!ring-gray-200 !border-0 !shadow-none !text-gray-700 !border-gray-300",onClickPromise:n,children:"Not now"})]})})]})},ya=""+("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/assets/check-animated-QQOZQPLY.gif?inline").href:new URL("assets/check-animated-QQOZQPLY.gif?inline","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href),_a=({onContinue:e})=>{const{featureFlags:{marketplaceScheme:t}}=Gn(uo),n=Vn((()=>"allowance"===t.scheme?{title:"Account created successfully",description:"You now have access to your workplace benefits",isNextButtonHidden:!0}:{title:"You’ve joined your workplace benefits program",description:"You now have access to your workplace benefits",isNextButtonHidden:!1}),[t]);return zn((()=>{if("allowance"===t.scheme){const t=setTimeout(e,3e3);return()=>clearTimeout(t)}}),[t,e]),lo(Ki,{children:[lo(Ki.Top,{children:lo("img",{src:ya,className:"h-16 w-16"})}),lo(Ki.Bottom,{children:lo("div",{className:"mt-5 flex flex-col items-center gap-5 text-center",children:[lo(ti,{children:n.title}),lo(ni,{children:n.description}),!n.isNextButtonHidden&&lo(_o,{testId:"sign_in_success_button_next_screen",class:"mt-5 w-full md:w-[240px]",onClickPromise:async()=>{e()},children:"Set up your benefits"})]})})]})},ba=e=>v("svg",{xmlns:"http://www.w3.org/2000/svg",height:24,viewBox:"0 -960 960 960",width:24,fill:"currentColor",...e},v("path",{d:"m313-440 224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"})),wa=({children:e})=>lo(C,{children:e}),va=({children:e})=>lo(C,{children:e}),xa=({open:e,children:t})=>{const n=Vn((()=>oo.Children.toArray(t).find((e=>e.type===wa))),[t]),r=Vn((()=>oo.Children.toArray(t).find((e=>e.type===va))),[t]),[o,i]=Dn(!e);return zn((()=>{let t;return e?i(!1):t=setTimeout((()=>{i(!0)}),200),()=>{t&&clearTimeout(t)}}),[e]),lo("div",{hidden:o,children:lo("div",{className:"z-50 fixed inset-0 w-screen bg-gray-500/75 transition-opacity "+(e?"ease-in duration-300 opacity-100":"ease-in duration-200 opacity-0"),children:lo("div",{className:"flex overflow-y-auto min-h-full items-end justify-center p-4 sm:items-center sm:p-0",children:lo("div",{className:"relative transform overflow-hidden rounded-lg bg-white shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg "+(e?"ease-out duration-300 opacity-100 translate-y-0 sm:scale-100":"ease-in duration-200 opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"),children:lo("div",{className:"bg-white p-4 sm:p-6",children:lo("div",{className:"sm:flex sm:items-start",children:lo("div",{className:"mt-3 sm:ml-4 sm:mt-0",children:[n,lo("div",{className:"mt-4",children:r})]})})})})})})})},ka=({open:e})=>lo(xa,{open:e,children:lo(va,{children:lo("div",{className:"flex flex-col gap-5 items-center justify-center text-center",children:[lo("span",{class:"animate-spin",children:lo(go,{size:"lg"})}),lo(ti,{children:"Creating your account"}),lo("div",{children:[lo(ni,{children:"This can take up to 30 seconds."}),lo(ni,{children:"Please don't navigate away or refresh your browser."})]})]})})}),Ca=({phoneNumber:e,onVerify:t,onResendOtp:n,onGoBack:r})=>{const{otp:o,setOtp:i}=(()=>{const[e,t]=Dn("");return{otp:{valid:Vn((()=>6===e.length),[e.length]),code:e},setOtp:t}})(),[a,s]=Dn(!1),[l,c]=Dn(""),{countdown:d,restart:u}=(e=>{const[t,n]=Dn(e),r=qn(),o=$n((()=>{clearInterval(r.current)}),[]);return zn((()=>o),[o]),{countdown:t,restart:$n((()=>{let t=e;clearInterval(r.current),r.current=setInterval((()=>{t<0?clearInterval(r.current):n(t--)}),1e3)}),[e])}})(60);zn(u,[u]);const p=$n((()=>(s(!0),c(""),t(o.code).catch(c).finally((()=>{s(!1)})))),[t,o.code]),f=$n((()=>(c(""),n().then(u).catch(c))),[n,u]);return lo(C,{children:[lo(ka,{open:a}),lo(Ki,{children:[lo(Ki.Top,{children:lo("div",{className:"flex flex-col gap-5",children:[lo(ti,{children:"Verify your mobile number"}),lo(ni,{children:["An SMS verification code has been sent to the number ",e,"."]})]})}),lo(Ki.Bottom,{children:lo("div",{className:"mt-5 md:w-[300px] text-left",children:[lo(da,{className:"font-medium text-sm text-gray-900 text-left",children:"Enter your verification code"}),lo(fa,{testId:"sign_in_otp_text_input_otp",allowedKeyPattern:/[0-9]/,inputMode:"numeric",minLength:6,maxLength:6,className:"mt-1 mb-1 w-full p-2 focus-visible:ring-gray-500",trailingIconElement:!1,onChange:i}),l&&lo("span",{className:"text-xs text-rose-500",children:l}),lo("p",{class:"mt-2 text-center text-xs text-gray-600 disabled:opacity-75 ",children:["Didn't get the code?",lo(pa,{disabled:0!==d,className:"underline mx-2 disabled:text-gray-600 disabled:hover:bg-transparent disabled:cursor-text disabled:px-0",onClick:f,children:"Resend SMS"}),0!==d&&lo(C,{children:["in ",d," secs"]})]}),lo(_o,{testId:"sign_in_otp_button_verify_otp",class:"mt-5 md:w-full",disabled:!o.valid,onClickPromise:p,children:"Continue"}),lo(_o,{testId:"sign_in_otp_button_decline_to_verify_otp",class:"mt-5 md:w-full bg-white hover:!bg-gray-100 focus:!ring-gray-200 !border-0 !shadow-none !text-gray-700 !border-gray-300",onClickPromise:async()=>{r()},children:lo("span",{className:"flex gap-3",children:[lo(ba,{}),"Back"]})})]})})]})]})},Ea=({phoneNumber:e,onSignUp:t,onVerify:n,onResendOtp:r,onSuccess:o,onDecline:i})=>{const{trace:a}=oa(),[s,l]=Dn(e??""),{step:c,goBack:d,goToStep:u}=(()=>{const[e,t]=Dn(0),n=$n((()=>{const n=e-1;n>=0&&t(n)}),[e]),r=$n((e=>{e<=2&&t(e)}),[]);return{step:e,goBack:n,goToStep:r}})();zn((()=>{(async()=>{await a("sign-up-viewed")})()}),[a]);const p=$n((e=>t(e.formatted).then((async t=>{l(e.masked),t.isVerificationRequired?u(ca.OTP):(await a("sign-up-completed"),u(ca.SUCCESS))}))),[u,t,a]),f=$n((()=>a("sign-up-declined").then(i)),[i,a]),m=$n((e=>n(e).then((async()=>{await a("sign-up-completed"),u(ca.SUCCESS)}))),[u,n,a]);return lo(C,{children:[c===ca.PHONE_NUMBER&&lo(ga,{phoneNumber:s,onSubmit:p,onDecline:f}),c===ca.OTP&&lo(Ca,{phoneNumber:s,onVerify:m,onResendOtp:r,onGoBack:d}),c===ca.SUCCESS&&lo(_a,{onContinue:o})]})};var Sa=(e=>(e.Auth_AccountDisabled="Sorry, your account has been deactivated. Please contact Flare if there are any issues.",e.Auth_AccountLocked="Sorry, your account is currently locked due to too many attempts. Please try again later.",e.Auth_Unregistered="Sorry, we are currently experiencing some issues. Please try again later.",e.Auth_InvalidVerificationCode="Your one time passcode doesn't look right. Please try again with a new one time passcode.",e.Auth_SessionExpired="Sorry, looks like your session has expired. Please try again.",e.Validation_InvalidPhoneNumber="Please enter a valid Australian mobile number beginning with 04.",e))(Sa||{});const Na=e=>{var t;const n=null==(t=null==e?void 0:e.response)?void 0:t.data;throw Sa[null==n?void 0:n.code]??"Sorry, we are currently experiencing some issues. Please try again later."},Ta=({onSuccess:e,onDecline:t})=>{const{identity:{phoneNumber:n}}=Gn(uo),{signUp:r,verifyOtp:o,resendOtp:i}={signUp:async e=>vn.backend.getClient().post("v2.0/auth/signUp",{mobileNumber:e}).then((e=>({isVerificationRequired:e.data.isVerificationRequired??!0}))),verifyOtp:async e=>{await vn.backend.getClient().post("auth/verify",{otp:e}).catch(Na)},resendOtp:async()=>{await vn.backend.getClient().post("auth/resend").catch(Na)}};return lo(C,{children:lo(Ea,{phoneNumber:n,onSignUp:r,onVerify:o,onResendOtp:i,onSuccess:e,onDecline:t})})},Aa=""+("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/assets/intro-COqxd5jd.png").href:new URL("assets/intro-COqxd5jd.png","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href),Oa=e=>{const{trace:t}=oa(),{featureFlags:{marketplaceScheme:n}}=Gn(uo);return lo(Ki,{children:[lo(Ki.Top,{children:lo("img",{class:"max-w-[30rem] w-full",src:Aa})}),lo(Ki.Bottom,{children:lo("div",{children:[lo("h3",{class:"mt-8 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:"Finish setting up your workplace benefits"}),lo("p",{class:"mt-3 text-lg leading-7 text-gray-600",children:"Because your workplace uses Flare you have access to a range of exclusive benefits that can save you thousands of dollars every year on your car, private health insurance, weekly grocery shop and more."}),lo(_o,{testId:"introduction_button_next_screen",class:"mt-8",onClickPromise:async()=>{await t("started",{experiment:"onboarding-marketplace-scheme",treatment:n.scheme}),e.onStepComplete()},children:"Continue"})]})})]})},Ra=()=>lo("div",{class:"flex justify-center",children:lo("span",{class:"animate-spin",children:lo(go,{size:"lg"})})}),La=(Pa=e=>{var t,n,r;const{featureFlags:{marketplaceScheme:o},hostInformation:i}=Gn(uo),{trace:a}=oa(),s=qn(null);return wo((()=>{a({type:"offer-viewed",offerName:e.marketPlaceOffer.name,data:e.marketPlaceOffer.metadata},{experiment:e.marketPlaceOffer.metadata.featureName,treatment:e.marketPlaceOffer.metadata.treatmentName}),s.current&&(s.current.terms=e.marketPlaceOffer.content.terms,s.current.details=e.marketPlaceOffer.content.details,s.current["on-accept"]=async()=>{await a({type:"offer-accepted",offerName:e.marketPlaceOffer.name,data:{...e.marketPlaceOffer.metadata,template:e.marketPlaceOffer.content.template,assessmentId:e.marketPlaceOffer.content.assessmentId}},{experiment:e.marketPlaceOffer.metadata.featureName,treatment:e.marketPlaceOffer.metadata.treatmentName})},s.current["on-decline"]=async()=>{await a({type:"offer-declined",offerName:e.marketPlaceOffer.name,data:{...e.marketPlaceOffer.metadata,template:e.marketPlaceOffer.content.template,assessmentId:e.marketPlaceOffer.content.assessmentId}},{experiment:e.marketPlaceOffer.metadata.featureName,treatment:e.marketPlaceOffer.metadata.treatmentName}),e.onStepComplete(!1,!1)},s.current["on-complete"]=()=>e.onStepComplete(!0,!0),s.current["on-skip"]=e.marketPlaceOffer.content.skipButtonHidden?void 0:()=>e.onStepComplete(!0,!1))})),lo("benefits-plan-assessment",{"base-url":xn.workplaceBackend.getBaseUrl(),"profile-id":xn.workplaceBackend.getProfileId(),"skip-more-details":!0,"access-token":e.accessToken,"image-url":e.marketPlaceOffer.content.imageUrl,"assessment-id":e.marketPlaceOffer.content.assessmentId,"assessment-instructions":"allowance"===o.scheme?e.marketPlaceOffer.content.assessmentInstructions:void 0,"track-client":i.client,"track-source":i.source,"track-channel":i.channel,"track-experiment":i.experiment,"track-treatment":i.treatment,"marketplace-offer-name":e.marketPlaceOffer.name,"assessment-title":e.marketPlaceOffer.content.title,description:e.marketPlaceOffer.content.description,"accept-button":e.marketPlaceOffer.content.acceptButton,"decline-button":e.marketPlaceOffer.content.declineButton,"special-banner-title":"allowance"===o.scheme?null==(t=e.marketPlaceOffer.content.specialBanner)?void 0:t.title:void 0,"special-banner-subtitle":"allowance"===o.scheme?null==(n=e.marketPlaceOffer.content.specialBanner)?void 0:n.subtitle:void 0,"special-banner-type":"allowance"===o.scheme?null==(r=e.marketPlaceOffer.content.specialBanner)?void 0:r.type:void 0,"vertical-alignment":"items-center",ref:s})},e=>{const t=qn(null),[n,r]=Dn(),[o,i]=Dn(!1);return zn((()=>{(async()=>{const e=await xn.workplaceBackend.getIdToken();r(e)})(),(()=>{if(t.current&&!t.current.querySelector("script[data-injected]")){const e=document.createElement("script"),n=mo(xn.workplaceBackend.getBaseUrl());e.type="module",e.src=`https://npm-cdn.flarehr.com/@flarehr/benefits-plan-assessment@${n}/dist/benefits-plan-assessment.js`,e.dataset.injected="true",e.onload=()=>{i(!0)},t.current.appendChild(e)}else i(!0)})()}),[]),lo("div",{ref:t,className:n,children:n&&o?lo(Pa,{...e,accessToken:n}):lo(Ra,{})})});var Pa;const Ia=e=>v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",...e},v("path",{fill:"currentColor",d:"M345 137c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-119 119L73 103c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l119 119L39 375c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l119-119L311 409c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-119-119L345 137z"}))
|
|
7
|
+
var Co=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,Eo=/\\([\u000b\u0020-\u00ff])/g,So=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,No=function(e){if(!e)throw new TypeError("argument string is required");var t="object"==typeof e?function(e){var t;"function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]);if("string"!=typeof t)throw new TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof t)throw new TypeError("argument string is required to be a string");var n=t.indexOf(";"),r=-1!==n?t.slice(0,n).trim():t.trim();if(!So.test(r))throw new TypeError("invalid media type");var o=new To(r.toLowerCase());if(-1!==n){var i,a,s;for(Co.lastIndex=n;a=Co.exec(t);){if(a.index!==n)throw new TypeError("invalid parameter format");n+=a[0].length,i=a[1].toLowerCase(),34===(s=a[2]).charCodeAt(0)&&-1!==(s=s.slice(1,-1)).indexOf("\\")&&(s=s.replace(Eo,"$1")),o.parameters[i]=s}if(n!==t.length)throw new TypeError("invalid parameter format")}return o};function To(e){this.parameters=Object.create(null),this.type=e}var Ao=new Map,Oo=function(e){return e.cloneNode(!0)},Ro=function(){return"file:"===window.location.protocol},Lo=function(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&2===r.readyState){var t=r.getResponseHeader("Content-Type");if(!t)throw new Error("Content type not found");var o=No(t).type;if("image/svg+xml"!==o&&"text/plain"!==o)throw new Error("Invalid content type: ".concat(o))}if(4===r.readyState){if(404===r.status||null===r.responseXML)throw new Error(Ro()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(!(200===r.status||Ro()&&0===r.status))throw new Error("There was a problem injecting the SVG: "+r.status+" "+r.statusText);n(null,r)}}catch(i){if(r.abort(),!(i instanceof Error))throw i;n(i,r)}},r.open("GET",e),r.withCredentials=t,r.overrideMimeType&&r.overrideMimeType("text/xml"),r.send()},Po={},Io=function(e,t){Po[e]=Po[e]||[],Po[e].push(t)},Uo=function(e,t,n){if(Ao.has(e)){var r=Ao.get(e);if(void 0===r)return void Io(e,n);if(r instanceof SVGSVGElement)return void n(null,Oo(r))}Ao.set(e,void 0),Io(e,n),Lo(e,t,(function(t,n){var r;t?Ao.set(e,t):(null===(r=n.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&Ao.set(e,n.responseXML.documentElement),function(e){for(var t=function(t,n){setTimeout((function(){if(Array.isArray(Po[e])){var n=Ao.get(e),r=Po[e][t];n instanceof SVGSVGElement&&r(null,Oo(n)),n instanceof Error&&r(n),t===Po[e].length-1&&delete Po[e]}}),0)},n=0,r=Po[e].length;n<r;n++)t(n)}(e)}))},Fo=function(e,t,n){Lo(e,t,(function(e,t){var r;e?n(e):(null===(r=t.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&n(null,t.responseXML.documentElement)}))},jo=0,Bo=[],Do={},Mo="http://www.w3.org/1999/xlink",zo=function(e,t,n,r,o,i,a){var s=e.getAttribute("data-src")||e.getAttribute("src");if(s){if(-1!==Bo.indexOf(e))return Bo.splice(Bo.indexOf(e),1),void(e=null);Bo.push(e),e.setAttribute("src",""),(r?Uo:Fo)(s,o,(function(r,o){if(!o)return Bo.splice(Bo.indexOf(e),1),e=null,void a(r);var l=e.getAttribute("id");l&&o.setAttribute("id",l);var c=e.getAttribute("title");c&&o.setAttribute("title",c);var d=e.getAttribute("width");d&&o.setAttribute("width",d);var u=e.getAttribute("height");u&&o.setAttribute("height",u);var p=Array.from(new Set(ko(ko(ko([],(o.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();o.setAttribute("class",p);var f=e.getAttribute("style");f&&o.setAttribute("style",f),o.setAttribute("data-src",s);var m=[].filter.call(e.attributes,(function(e){return/^data-\w[\w-]*$/.test(e.name)}));if(Array.prototype.forEach.call(m,(function(e){e.name&&e.value&&o.setAttribute(e.name,e.value)})),n){var h,g,y,_,b,w={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]};Object.keys(w).forEach((function(e){h=e,y=w[e];for(var t=function(e,t){var n;_=g[e].id,b=_+"-"+ ++jo,Array.prototype.forEach.call(y,(function(e){for(var t=0,r=(n=o.querySelectorAll("["+e+'*="'+_+'"]')).length;t<r;t++){var i=n[t].getAttribute(e);i&&!i.match(new RegExp('url\\("?#'+_+'"?\\)'))||n[t].setAttribute(e,"url(#"+b+")")}}));for(var r=o.querySelectorAll("[*|href]"),i=[],a=0,s=r.length;a<s;a++){var l=r[a].getAttributeNS(Mo,"href");l&&l.toString()==="#"+g[e].id&&i.push(r[a])}for(var c=0,d=i.length;c<d;c++)i[c].setAttributeNS(Mo,"href","#"+b);g[e].id=b},n=0,r=(g=o.querySelectorAll(h+"[id]")).length;n<r;n++)t(n)}))}o.removeAttribute("xmlns:a");for(var v,x,k=o.querySelectorAll("script"),C=[],E=0,S=k.length;E<S;E++)(x=k[E].getAttribute("type"))&&"application/ecmascript"!==x&&"application/javascript"!==x&&"text/javascript"!==x||((v=k[E].innerText||k[E].textContent)&&C.push(v),o.removeChild(k[E]));if(C.length>0&&("always"===t||"once"===t&&!Do[s])){for(var N=0,T=C.length;N<T;N++)new Function(C[N])(window);Do[s]=!0}var A=o.querySelectorAll("style");if(Array.prototype.forEach.call(A,(function(e){e.textContent+=""})),o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("xmlns:xlink",Mo),i(o),!e.parentNode)return Bo.splice(Bo.indexOf(e),1),e=null,void a(new Error("Parent node is null"));e.parentNode.replaceChild(o,e),Bo.splice(Bo.indexOf(e),1),e=null,a(null,o)}))}else a(new Error("Invalid data-src or src attribute"))},Ho={exports:{}};function qo(){}function Wo(){}Wo.resetWarningCache=qo;Ho.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Wo,resetWarningCache:qo};return n.PropTypes=n,n}();var Vo=Ho.exports,$o=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Go="http://www.w3.org/2000/svg",Yo="http://www.w3.org/1999/xlink",Zo=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).initialState={hasError:!1,isLoading:!0},t.state=t.initialState,t._isMounted=!1,t.reactWrapper=void 0,t.nonReactWrapper=void 0,t.refCallback=function(e){t.reactWrapper=e},t}var n,r;r=e,(n=t).prototype=Object.create(r.prototype),n.prototype.constructor=n,xo(n,r);var o=t.prototype;return o.renderSVG=function(){var e,t=this;if(this.reactWrapper instanceof(e=this.reactWrapper,((null==e?void 0:e.ownerDocument)||document).defaultView||window).Node){var n,r,o=this.props,i=o.desc,a=o.evalScripts,s=o.httpRequestWithCredentials,l=o.renumerateIRIElements,c=o.src,d=o.title,u=o.useRequestCache,p=this.props.onError,f=this.props.beforeInjection,m=this.props.afterInjection,h=this.props.wrapper;"svg"===h?((n=document.createElementNS(Go,h)).setAttribute("xmlns",Go),n.setAttribute("xmlns:xlink",Yo),r=document.createElementNS(Go,h)):(n=document.createElement(h),r=document.createElement(h)),n.appendChild(r),r.dataset.src=c,this.nonReactWrapper=this.reactWrapper.appendChild(n);var g=function(e){t.removeSVG(),t._isMounted?t.setState((function(){return{hasError:!0,isLoading:!1}}),(function(){p(e)})):p(e)};!function(e,t){var n=void 0===t?{}:t,r=n.afterAll,o=void 0===r?function(){}:r,i=n.afterEach,a=void 0===i?function(){}:i,s=n.beforeEach,l=void 0===s?function(){}:s,c=n.cacheRequests,d=void 0===c||c,u=n.evalScripts,p=void 0===u?"never":u,f=n.httpRequestWithCredentials,m=void 0!==f&&f,h=n.renumerateIRIElements,g=void 0===h||h;if(e&&"length"in e)for(var y=0,_=0,b=e.length;_<b;_++)zo(e[_],p,g,d,m,l,(function(t,n){a(t,n),e&&"length"in e&&e.length===++y&&o(y)}));else e?zo(e,p,g,d,m,l,(function(t,n){a(t,n),o(1),e=null})):o(0)}(r,{afterEach:function(e,n){e?g(e):t._isMounted&&t.setState((function(){return{isLoading:!1}}),(function(){try{m(n)}catch(e){g(e)}}))},beforeEach:function(e){if(e.setAttribute("role","img"),i){var t=e.querySelector(":scope > desc");t&&e.removeChild(t);var n=document.createElement("desc");n.innerHTML=i,e.prepend(n)}if(d){var r=e.querySelector(":scope > title");r&&e.removeChild(r);var o=document.createElement("title");o.innerHTML=d,e.prepend(o)}try{f(e)}catch(a){g(a)}},cacheRequests:u,evalScripts:a,httpRequestWithCredentials:s,renumerateIRIElements:l})}},o.removeSVG=function(){var e;null!=(e=this.nonReactWrapper)&&e.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},o.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},o.componentDidUpdate=function(e){var t=this;(function(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1})(vo({},e),this.props)&&this.setState((function(){return t.initialState}),(function(){t.removeSVG(),t.renderSVG()}))},o.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},o.render=function(){var e=this.props;e.afterInjection,e.beforeInjection,e.desc,e.evalScripts;var t=e.fallback;e.httpRequestWithCredentials;var n=e.loading;e.renumerateIRIElements,e.src,e.title,e.useRequestCache;var r=e.wrapper,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,$o);return v(r,vo({},o,{ref:this.refCallback},"svg"===r?{xmlns:Go,xmlnsXlink:Yo}:{}),this.state.isLoading&&n&&v(n,null),this.state.hasError&&t&&v(t,null))},t}(E);Zo.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"},Zo.propTypes={afterInjection:Vo.func,beforeInjection:Vo.func,desc:Vo.string,evalScripts:Vo.oneOf(["always","once","never"]),fallback:Vo.oneOfType([Vo.func,Vo.object,Vo.string]),httpRequestWithCredentials:Vo.bool,loading:Vo.oneOfType([Vo.func,Vo.object,Vo.string]),onError:Vo.func,renumerateIRIElements:Vo.bool,src:Vo.string.isRequired,title:Vo.string,useRequestCache:Vo.bool,wrapper:Vo.oneOf(["div","span","svg"])};const Jo=({visible:e,children:t})=>{const n=qn(e);return e&&!n.current&&(n.current=!0),n.current?lo("div",{hidden:!e,children:t}):null},Xo=({icon:e})=>"string"==typeof e?lo(Zo,{src:e,wrapper:"svg",className:"w-6 h-6 max-w-6 max-h-6 min-w-6 min-h-6",beforeInjection:e=>{var t;e.removeAttribute("width"),e.removeAttribute("height"),null==(t=e.querySelector("path"))||t.removeAttribute("fill"),e.setAttribute("fill","currentColor")}}):lo("div",{className:"w-6 h-6 max-w-6 max-h-6 min-w-6 min-h-6",children:e}),Ko=({label:e,icon:t})=>lo("div",{className:"flex items-center flex-col",children:[t,lo("p",{className:"max-h-10 max-w-20 break-words text-ellipsis overflow-hidden line-clamp-2 mt-2",children:e})]}),Qo=({children:e})=>lo(C,{children:e}),ei=({selectedIndex:e,onChange:t,children:n})=>{const r=Vn((()=>ur.toArray(n).filter((e=>e.type===Ko))),[n]),o=Vn((()=>ur.toArray(n).filter((e=>e.type===Qo))),[n]);return wo((()=>{o.length>0&&(null==t||t(0))})),lo("div",{children:[lo("div",{className:"flex items-baseline md:mb-4",children:r.map(((n,r)=>lo("div",{onClick:()=>null==t?void 0:t(r),className:`\n text-sm font-medium cursor-auto w-10 min-w-10 max-w-10 h-12 min-h-12 max-h-12 mr-10 h-full relative\n flex items-center justify-center\n [&:not(:last-child):after]:absolute [&:not(:last-child):after]:top-3 [&:not(:last-child):after]:content-[""] [&:not(:last-child):after]:w-10 [&:not(:last-child):after]:border-b-2 [&:not(:last-child):after]:border-solid [&:not(:last-child):after]:border-gray-200 [&:not(:last-child):after]:left-10\n ${r===e?"text-primary-base":"text-gray-400"}\n hover:before:content-[''] \n ${o.length>0?"hover:before:cursor-pointer":"hover:before:cursor-default"} \n hover:before:w-16 hover:before:h-16 hover:before:absolute\n `,children:n},n.key)))}),o.map(((t,n)=>lo(Jo,{visible:n===e,children:t},t.key)))]})},ti=({className:e,children:t})=>lo("h1",{className:`text-2xl md:text-3xl font-bold ${e??""}`,children:t}),ni=({className:e,children:t})=>lo("h3",{class:`text-base md:text-lg text-gray-600 ${e??""}`,children:t}),ri=e=>v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...e},v("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})),oi=({title:e,steps:t,...n})=>{const r=t.length,o=t.filter((e=>e.completed)).length;return lo("div",{...n,children:[e&&lo("h1",{className:"text-lg font-semibold mb-4",children:e}),lo("ol",{children:t.map(((e,t)=>{const n=o===t;return lo("li",{className:"relative flex-1 pb-6 "+(t!==r-1?`after:content-[''] after:w-0.5 after:h-[calc(100%-theme(height.8))] ${e.completed?"after:bg-primary-base":"after:bg-gray-300"} after:inline-block after:absolute after:top-8 after:left-4`:""),children:lo("div",{className:"flex font-medium w-full",children:[lo("span",{className:`w-8 min-w-8 max-w-8 h-8 min-h-8 max-h-8 ${e.completed?"bg-primary-base":"bg-white"} border-2 ${e.completed||n?"border-primary-base":"border-gray-300"} rounded-full flex justify-center items-center mr-3 text-sm ${n?"text-primary-base":"text-gray-500"}`,children:e.completed?lo(ri,{className:"w-4 h-4 text-white"}):t+1}),lo("div",{children:[lo("h4",{className:"text-sm text-left font-semibold "+(e.completed||n?"text-primary-base":"text-gray-600"),children:e.title}),lo("p",{className:"text-sm text-left font-normal",children:e.description})]})]})},t)}))})]})};var ii=Object.defineProperty,ai=(e,t,n)=>(((e,t,n)=>{t in e?ii(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let si=new class{constructor(){ai(this,"current",this.detect()),ai(this,"handoffState","pending"),ai(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},li=(e,t)=>{si.isServer?zn(e,t):Hn(e,t)};function ci(e){let t=qn(e);return li((()=>{t.current=e}),[e]),t}let di=function(e){let t=ci(e);return oo.useCallback(((...e)=>t.current(...e)),[t])};function ui(){let e=[],t={addEventListener:(e,n,r,o)=>(e.addEventListener(n,r,o),t.add((()=>e.removeEventListener(n,r,o)))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(n)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let n=setTimeout(...e);return t.add((()=>clearTimeout(n)))},microTask(...e){let n={current:!0};return function(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}((()=>{n.current&&e[0]()})),t.add((()=>{n.current=!1}))},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add((()=>{Object.assign(e.style,{[t]:r})}))},group(e){let t=ui();return e(t),this.add((()=>t.dispose()))},add:t=>(e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function pi(){let[e]=Dn(ui);return zn((()=>()=>e.dispose()),[e]),e}function fi(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in io&&io.useSyncExternalStore((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,n]=Dn(si.isHandoffComplete);return t&&!1===si.isHandoffComplete&&n(!1),zn((()=>{!0!==t&&n(!0)}),[t]),zn((()=>si.handoff()),[]),!e&&t}function mi(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,mi),r}let hi=Symbol();function gi(...e){let t=qn(e);zn((()=>{t.current=e}),[e]);let n=di((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[hi])))?void 0:n}function yi(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}var _i,bi,wi=((bi=wi||{})[bi.None=0]="None",bi[bi.RenderStrategy=1]="RenderStrategy",bi[bi.Static=2]="Static",bi),vi=((_i=vi||{})[_i.Unmount=0]="Unmount",_i[_i.Hidden=1]="Hidden",_i);function xi({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:a,mergeRefs:s}){s=null!=s?s:Ci;let l=Ei(t,e);if(i)return ki(l,n,r,a,s);let c=null!=o?o:0;if(2&c){let{static:e=!1,...t}=l;if(e)return ki(t,n,r,a,s)}if(1&c){let{unmount:e=!0,...t}=l;return mi(e?0:1,{0:()=>null,1:()=>ki({...t,hidden:!0,style:{display:"none"}},n,r,a,s)})}return ki(l,n,r,a,s)}function ki(e,t={},n,r,o){let{as:i=n,children:a,refName:s="ref",...l}=Ti(e,["unmount","static"]),c=void 0!==e.ref?{[s]:e.ref}:{},d="function"==typeof a?a(t):a;"className"in l&&l.className&&"function"==typeof l.className&&(l.className=l.className(t));let u={};if(t){let e=!1,n=[];for(let[r,o]of Object.entries(t))"boolean"==typeof o&&(e=!0),!0===o&&n.push(r);e&&(u["data-headlessui-state"]=n.join(" "))}if(i===C&&Object.keys(Ni(l)).length>0){if(!qr(d)||Array.isArray(d)&&d.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(l).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"));let e=d.props,t="function"==typeof(null==e?void 0:e.className)?(...t)=>yi(null==e?void 0:e.className(...t),l.className):yi(null==e?void 0:e.className,l.className),n=t?{className:t}:{};return Vr(d,Object.assign({},Ei(d.props,Ni(Ti(l,["ref"]))),u,c,{ref:o(d.ref,c.ref)},n))}return v(i,Object.assign({},Ti(l,["ref"]),i!==C&&c,i!==C&&u),d)}function Ci(...e){return e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function Ei(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map((e=>[e,void 0]))));for(let r in n)Object.assign(t,{[r](e,...t){let o=n[r];for(let n of o){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;n(e,...t)}}});return t}function Si(e){var t;return Object.assign(cr(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Ni(e){let t=Object.assign({},e);for(let n in t)void 0===t[n]&&delete t[n];return t}function Ti(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let Ai=G(null);Ai.displayName="OpenClosedContext";var Oi=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Oi||{});function Ri(){return Gn(Ai)}function Li({value:e,children:t}){return oo.createElement(Ai.Provider,{value:e},t)}function Pi(){let e=qn(!1);return li((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function Ii(e,...t){e&&t.length>0&&e.classList.add(...t)}function Ui(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Fi(e,t,n,r){let o=n?"enter":"leave",i=ui(),a=void 0!==r?function(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}(r):()=>{};"enter"===o&&(e.removeAttribute("hidden"),e.style.display="");let s=mi(o,{enter:()=>t.enter,leave:()=>t.leave}),l=mi(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=mi(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Ui(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Ii(e,...t.base,...s,...c),i.nextFrame((()=>{Ui(e,...t.base,...s,...c),Ii(e,...t.base,...s,...l),function(e,t){let n=ui();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,a]=[r,o].map((e=>{let[t=0]=e.split(",").filter(Boolean).map((e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e))).sort(((e,t)=>t-e));return t})),s=i+a;if(0!==s){n.group((n=>{n.setTimeout((()=>{t(),n.dispose()}),s),n.addEventListener(e,"transitionrun",(e=>{e.target===e.currentTarget&&n.dispose()}))}));let r=n.addEventListener(e,"transitionend",(e=>{e.target===e.currentTarget&&(t(),r())}))}else t();n.add((()=>t())),n.dispose}(e,(()=>(Ui(e,...t.base,...s),Ii(e,...t.base,...t.entered),a())))})),i.dispose}function ji(e=""){return e.split(/\s+/).filter((e=>e.length>1))}let Bi=G(null);Bi.displayName="TransitionContext";var Di,Mi=((Di=Mi||{}).Visible="visible",Di.Hidden="hidden",Di);let zi=G(null);function Hi(e){return"children"in e?Hi(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function qi(e,t){let n=ci(e),r=qn([]),o=Pi(),i=pi(),a=di(((e,t=vi.Hidden)=>{let a=r.current.findIndex((({el:t})=>t===e));-1!==a&&(mi(t,{[vi.Unmount](){r.current.splice(a,1)},[vi.Hidden](){r.current[a].state="hidden"}}),i.microTask((()=>{var e;!Hi(r)&&o.current&&(null==(e=n.current)||e.call(n))})))})),s=di((e=>{let t=r.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>a(e,vi.Unmount)})),l=qn([]),c=qn(Promise.resolve()),d=qn({enter:[],leave:[],idle:[]}),u=di(((e,n,r)=>{l.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter((([t])=>t!==e))),null==t||t.chains.current[n].push([e,new Promise((e=>{l.current.push(e)}))]),null==t||t.chains.current[n].push([e,new Promise((e=>{Promise.all(d.current[n].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===n?c.current=c.current.then((()=>null==t?void 0:t.wait.current)).then((()=>r(n))):r(n)})),p=di(((e,t,n)=>{Promise.all(d.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=l.current.shift())||e()})).then((()=>n(t)))}));return Vn((()=>({children:r,register:s,unregister:a,onStart:u,onStop:p,wait:c,chains:d})),[s,a,r,u,p,d,c])}function Wi(){}zi.displayName="NestingContext";let Vi=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function $i(e){var t;let n={};for(let r of Vi)n[r]=null!=(t=e[r])?t:Wi;return n}let Gi=wi.RenderStrategy;let Yi=Si((function(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,a=qn(null),s=gi(a,t);fi();let l=Ri();if(void 0===n&&null!==l&&(n=(l&Oi.Open)===Oi.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,d]=Dn(n?"visible":"hidden"),u=qi((()=>{d("hidden")})),[p,f]=Dn(!0),m=qn([n]);li((()=>{!1!==p&&m.current[m.current.length-1]!==n&&(m.current.push(n),f(!1))}),[m,n]);let h=Vn((()=>({show:n,appear:r,initial:p})),[n,r,p]);zn((()=>{if(n)d("visible");else if(Hi(u)){let e=a.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&d("hidden")}else d("hidden")}),[n,u]);let g={unmount:o},y=di((()=>{var t;p&&f(!1),null==(t=e.beforeEnter)||t.call(e)})),_=di((()=>{var t;p&&f(!1),null==(t=e.beforeLeave)||t.call(e)}));return oo.createElement(zi.Provider,{value:u},oo.createElement(Bi.Provider,{value:h},xi({ourProps:{...g,as:C,children:oo.createElement(Zi,{ref:s,...g,...i,beforeEnter:y,beforeLeave:_})},theirProps:{},defaultTag:C,features:Gi,visible:"visible"===c,name:"Transition"})))})),Zi=Si((function(e,t){var n,r;let{beforeEnter:o,afterEnter:i,beforeLeave:a,afterLeave:s,enter:l,enterFrom:c,enterTo:d,entered:u,leave:p,leaveFrom:f,leaveTo:m,...h}=e,g=qn(null),y=gi(g,t),_=null==(n=h.unmount)||n?vi.Unmount:vi.Hidden,{show:b,appear:w,initial:v}=function(){let e=Gn(Bi);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[x,k]=Dn(b?"visible":"hidden"),C=function(){let e=Gn(zi);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:E,unregister:S}=C;zn((()=>E(g)),[E,g]),zn((()=>{if(_===vi.Hidden&&g.current)return b&&"visible"!==x?void k("visible"):mi(x,{hidden:()=>S(g),visible:()=>E(g)})}),[x,g,E,S,b,_]);let N=ci({base:ji(h.className),enter:ji(l),enterFrom:ji(c),enterTo:ji(d),entered:ji(u),leave:ji(p),leaveFrom:ji(f),leaveTo:ji(m)}),T=function(e){let t=qn($i(e));return zn((()=>{t.current=$i(e)}),[e]),t}({beforeEnter:o,afterEnter:i,beforeLeave:a,afterLeave:s}),A=fi();zn((()=>{if(A&&"visible"===x&&null===g.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[g,x,A]);let O=v&&!w,R=w&&b&&v,L=(()=>!A||O?"idle":b?"enter":"leave")(),P=function(e=0){let[t,n]=Dn(e),r=Pi(),o=$n((e=>{r.current&&n((t=>t|e))}),[t,r]),i=$n((e=>Boolean(t&e)),[t]),a=$n((e=>{r.current&&n((t=>t&~e))}),[n,r]),s=$n((e=>{r.current&&n((t=>t^e))}),[n]);return{flags:t,addFlag:o,hasFlag:i,removeFlag:a,toggleFlag:s}}(0),I=di((e=>mi(e,{enter:()=>{P.addFlag(Oi.Opening),T.current.beforeEnter()},leave:()=>{P.addFlag(Oi.Closing),T.current.beforeLeave()},idle:()=>{}}))),U=di((e=>mi(e,{enter:()=>{P.removeFlag(Oi.Opening),T.current.afterEnter()},leave:()=>{P.removeFlag(Oi.Closing),T.current.afterLeave()},idle:()=>{}}))),F=qi((()=>{k("hidden"),S(g)}),C),j=qn(!1);!function({immediate:e,container:t,direction:n,classes:r,onStart:o,onStop:i}){let a=Pi(),s=pi(),l=ci(n);li((()=>{e&&(l.current="enter")}),[e]),li((()=>{let e=ui();s.add(e.dispose);let n=t.current;if(n&&"idle"!==l.current&&a.current)return e.dispose(),o.current(l.current),e.add(Fi(n,r.current,"enter"===l.current,(()=>{e.dispose(),i.current(l.current)}))),e.dispose}),[n])}({immediate:R,container:g,classes:N,direction:L,onStart:ci((e=>{j.current=!0,F.onStart(g,e,I)})),onStop:ci((e=>{j.current=!1,F.onStop(g,e,U),"leave"===e&&!Hi(F)&&(k("hidden"),S(g))}))});let B=h,D={ref:y};return R?B={...B,className:yi(h.className,...N.current.enter,...N.current.enterFrom)}:j.current&&(B.className=yi(h.className,null==(r=g.current)?void 0:r.className),""===B.className&&delete B.className),oo.createElement(zi.Provider,{value:F},oo.createElement(Li,{value:mi(x,{visible:Oi.Open,hidden:Oi.Closed})|P.flags},xi({ourProps:D,theirProps:B,defaultTag:"div",features:Gi,visible:"visible"===x,name:"Transition.Child"})))})),Ji=Si((function(e,t){let n=null!==Gn(Bi),r=null!==Ri();return oo.createElement(oo.Fragment,null,!n&&r?oo.createElement(Yi,{ref:t,...e}):oo.createElement(Zi,{ref:t,...e}))})),Xi=Object.assign(Yi,{Child:Ji,Root:Yi});const Ki=({children:e})=>{const t=oo.Children.toArray(e),n=t.find((e=>e.type===Qi)),r=t.find((e=>e.type===ea));return lo(Xi,{appear:!0,show:!0,enter:"transition duration-700 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",children:lo("div",{class:"flex flex-col text-center items-center max-w-[40rem] mx-auto",children:[lo(Xi,{appear:!0,show:!0,enter:"transition duration-700 ease-out md:transition-none",enterFrom:"-translate-y-6",enterTo:"translate-y-0",children:n&&lo("div",{class:"flex items-center h-full",children:n})}),lo(Xi,{appear:!0,show:!0,enter:"transition delay-300 duration-[600ms] ease-out",enterFrom:"opacity-0 -translate-y-6",enterTo:"opacity-100 translate-y-0",children:r&&lo("div",{class:"flex items-center h-full",children:r})})]})})},Qi=({children:e})=>lo(C,{children:e}),ea=({children:e})=>lo(C,{children:e});Ki.Top=Qi,Ki.Bottom=ea;const ta=({onContinue:e})=>{const{featureFlags:{marketplaceScheme:t},offers:n}=Gn(uo),r="allowance"===t.scheme?t.content.setUpBenefits:void 0;return lo(C,{children:r&&lo("div",{className:"flex flex-col items-center max-w-full w-full mx-auto",children:[lo(ei,{selectedIndex:-1,children:n.map((e=>lo(Ko,{label:e.content.productName,icon:lo(Xo,{icon:e.content.iconUrl})},e.name)))}),lo(Ki,{children:[lo(Ki.Top,{children:lo("div",{className:"flex flex-col gap-4",children:[lo(ti,{children:r.title}),lo(ni,{children:r.description})]})}),lo(Ki.Bottom,{children:lo("div",{className:"mt-5 flex flex-col items-center gap-5 text-center",children:[r.progress&&lo(bo,{className:"lg:w-3/4",title:r.progress.title,children:lo(oi,{steps:r.progress.steps,className:"mt-2 rounded-md px-6 py-4"})}),lo(_o,{testId:"allowance_set_up_benefits_button_next_screen",class:"mt-5 w-full md:w-[240px]",onClickPromise:e,children:r.buttonText}),r.termsAndConditions&&lo("span",{className:"font-normal text-xs mt-4 lg:w-3/4",children:lo(r.termsAndConditions,{})})]})})]})]})})},na=({icon:e,children:t,className:n,...r})=>lo("div",{...r,className:`${n??""} rounded-md shadow-sm`,children:lo("div",{className:"flex items-center gap-4 px-4 py-4",children:[e&&lo("span",{className:"w-8 min-w-8 max-w-8",children:e}),t&&lo("span",{className:"text-left text-base",children:t})]})}),ra=(e,t)=>{switch(!0){case"started"===e:return vn.backend.command({eventType:"Started"},t);case"membership-accepted"===e:return vn.backend.command({eventType:"OfferProgressed",offerName:"Membership",data:{accepted:!0,featureName:"",treatmentName:"",template:"Eoi"}},t);case"membership-declined"===e:return vn.backend.command({eventType:"OfferProgressed",offerName:"Membership",data:{accepted:!1,featureName:"",treatmentName:"",template:"Eoi"}},t);case"sign-up-viewed"===e:return vn.backend.command({eventType:"OfferViewed",offerName:"Membership",data:{featureName:"",treatmentName:""}},t);case"sign-up-completed"===e:return(async()=>{await vn.backend.command({eventType:"OfferProgressed",offerName:"Membership",data:{accepted:!0,featureName:"",treatmentName:"",template:"Eoi"}},t),await vn.backend.command({eventType:"CustomerRegistrationCompleted",isRegistered:!0},t)})();case"sign-up-declined"===e:return(async()=>{await vn.backend.command({eventType:"CustomerRegistrationCompleted",isRegistered:!1},t),await vn.backend.command({eventType:"OfferProgressed",offerName:"Membership",data:{accepted:!1,featureName:"",treatmentName:"",template:"Eoi"}},t)})();case"object"==typeof e&&"offer-selected"===e.type:return vn.workplaceBackend.track("MarketplaceOffer Selected",{offer:e.offerName},t);case"object"==typeof e&&"offer-viewed"===e.type:return vn.backend.command({...e,eventType:"OfferViewed"},t);case"object"==typeof e&&"offer-accepted"===e.type:return vn.backend.command({eventType:"OfferProgressed",offerName:e.offerName,data:{...e.data,accepted:!0}},t);case"object"==typeof e&&"offer-declined"===e.type:return vn.backend.command({eventType:"OfferProgressed",offerName:e.offerName,data:{...e.data,accepted:!1}},t);case"object"==typeof e&&"offer-progressed"===e.type:return vn.backend.command({eventType:"OfferProgressed",offerName:e.offerName,data:e.data},t);case"object"==typeof e&&"summary-viewed"===e.type:return vn.backend.command({eventType:"SummaryViewed",summaryVariant:e.data.summaryVariant},t);case"completed"===e:return vn.backend.command({eventType:"Completed"},t)}return Promise.resolve()},oa=()=>({trace:ra}),ia=e=>{const{trace:t}=oa(),{featureFlags:{marketplaceScheme:n}}=Gn(uo),r="allowance"===n.scheme?n.content.joinBenefits:void 0;return lo(C,{children:r&&lo(Ki,{children:[lo(Ki.Top,{children:[lo("img",{class:"max-w-[30rem] w-full hidden md:block",src:r.desktopImageUrl}),lo("img",{class:"max-w-[30rem] w-full md:hidden",src:r.mobileImageUrl})]}),lo(Ki.Bottom,{children:lo("div",{children:[lo("h3",{class:"mt-8 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:r.title}),lo("p",{class:"mt-3 text-lg leading-7 text-gray-600",children:r.description}),lo(na,{className:"bg-teal-50 mt-5",style:{background:"linear-gradient(90deg, rgba(255, 216, 77, 0.10) 0%, rgba(255, 135, 111, 0.10) 100%)"},icon:r.specialBanner.icon,children:lo("div",{children:[lo("p",{className:"font-semibold text-base text-gray-900",children:r.specialBanner.title}),lo("span",{className:"font-normal text-base text-gray-900",children:r.specialBanner.subTitle})]})}),lo(_o,{testId:"introduction_button_next_screen",class:"mt-8",onClickPromise:async()=>{await t("started",{experiment:"onboarding-marketplace-scheme",treatment:n.scheme}),e.onContinue()},children:r.buttonText})]})})]})})},aa=""+("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/assets/get-app-CQalMIl7.jpg?inline").href:new URL("assets/get-app-CQalMIl7.jpg?inline","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href),sa=()=>lo("div",{className:"mt-4 flex items-center border rounded-md border-gray-300",children:[lo("img",{className:"h-40 h-min-40 h-max-40 m-0.5",src:aa}),lo("div",{className:"flex flex-col gap-1",children:[lo("h4",{className:"font-bold text-lg text-left",children:"Workplace benefits in your pocket!"}),lo("p",{className:"font-normal text-base text-left",children:"Download the Flare app for easy access to your workplace benefits and exclusive discounts."}),lo("a",{className:"focus:ring-2 focus:ring-primary-focus font-bold rounded-md self-start text-primary-base",target:"_blank",rel:"noreferrer",href:"https://flarehr.app.link/download",children:["Get the Flare App ","->"]})]})]}),la=({onContinue:e})=>{const{offersProgress:{hasCompletedAnyOffers:t},isAppEnabled:n,featureFlags:{marketplaceScheme:r}}=Gn(uo),{trace:o}=oa(),i=Vn((()=>{const e=t();switch(!0){case n&&e:return"allowance-accepted-app";case n&&!e:return"allowance-declined-app";case!n&&e:return"allowance-accepted-noapp";case!n&&!e:return"allowance-declined-noapp";default:throw"Invalid summary variant"}}),[t,n]);zn((()=>{(async()=>{await o({type:"summary-viewed",data:{summaryVariant:i}},{experiment:"onboarding-marketplace-scheme",treatment:r.scheme})})()}),[r,i,o]);const a=$n((async()=>{await o("completed",{experiment:"onboarding-marketplace-scheme",treatment:r.scheme}),await e()}),[r,e,o]),s="allowance"===r.scheme?r.content.summary:void 0;return lo(C,{children:s&&lo(Ki,{children:[lo(Ki.Top,{children:lo("div",{className:"flex flex-col gap-4",children:[lo(ti,{children:s.title}),lo(ni,{children:s.description})]})}),lo(Ki.Bottom,{children:lo("div",{className:"mt-5 flex flex-col items-center gap-5 text-center",children:[s.progress&&lo(bo,{className:"lg:w-3/4",title:s.progress.title,children:lo(oi,{steps:s.progress.steps,className:"mt-2 rounded-md px-6 py-4"})}),lo(_o,{testId:"step-benefits-finish",class:"mt-5 w-full md:w-[240px]",onClickPromise:a,children:s.buttonText}),n&&lo(sa,{})]})})]})})};var ca=(e=>(e[e.PHONE_NUMBER=0]="PHONE_NUMBER",e[e.OTP=1]="OTP",e[e.SUCCESS=2]="SUCCESS",e))(ca||{});const da=({className:e,children:t,...n})=>lo("label",{class:`text-base text-gray-600 ${e??""}`,...n,children:t}),ua=e=>v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"green",className:"w-5 h-5",...e},v("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"})),pa=({className:e,onClick:t,...n})=>{const[r,o]=Dn(!1);return lo("button",{className:`inline-flex items-center justify-center px-2 text-primary-base rounded-md bg-transparent hover:bg-sky-50/50 focus:ring-2 focus:ring-primary-focus ${e??""}`,onClick:$n((()=>{if(!r)return o(!0),t().finally((()=>{o(!1)}))}),[r,t]),...n,children:[lo("div",{class:"relative "+(r?"invisible":""),children:n.children}),r&&lo("div",{class:"absolute animate-spin",children:lo(go,{theme:"primary"})})]})},fa=({className:e,allowedKeyPattern:t,onChange:n,value:r,leadingIconElement:o,trailingIconElement:i,...a})=>{const s=$n((e=>{t.test(e.key)||e.preventDefault()}),[t]);return lo(C,{children:lo("div",{class:"relative",children:[o,lo("input",{"data-testid":a.testId,type:"text",className:`border-0 ring-2 ring-gray-200 focus:outline-none text-base font-medium rounded-md shadow-sm ${e}`,value:r,onKeyPress:s,onChange:e=>n(e.currentTarget.value),...a}),i]})})},ma=e=>e.replace(/ /g,""),ha=e=>{const t=ma(e);return t.startsWith("04")&&10===t.length||t.startsWith("614")&&11===t.length||t.startsWith("+614")&&12===t.length||/^\+642\d{7,9}$/.test(t)},ga=({phoneNumber:e,onSubmit:t,onDecline:n})=>{const{hostInformation:{workflowsJourneyType:r}}=Gn(uo),[o,i]=Dn(""),{setPhoneNumber:a,phoneNumber:s}=(e=>{const{identity:t}=Gn(uo),[n,r]=Dn((()=>e&&ha(e)?e:"")),o=Vn((()=>ha(n)),[n]),i=Vn((()=>ma(n)),[n]),a=Vn((()=>i.startsWith("04")?`+61${i.replace(/^0+/,"")}`:i.startsWith("614")?`+${i}`:i),[i]),s=Vn((()=>(e=>{let t=0;return"#### ### ### ### ### ### ###".replace(/#/g,(()=>e[t++]??"")).trim()})(i)),[i]),l=Vn((()=>ha(t.verifiedPhoneNumber)&&a===t.verifiedPhoneNumber),[a,t.verifiedPhoneNumber]);return{setPhoneNumber:r,phoneNumber:{valid:o,original:n,formatted:a,masked:s,isVerified:l}}})(e),[l,c]=Dn(s.isVerified),d=$n((()=>{i("")}),[]),u=$n((()=>{const e=s.valid?"":"Please enter a valid Australian mobile number beginning with 04.";i(e),c(s.isVerified)}),[s.isVerified,s.valid]),p=$n((async()=>{s.valid&&await t(s).catch(i)}),[s,t]),f=$n((async()=>{c(!1)}),[]),m=lo("div",{class:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-xs text-green-700 font-bold",children:["Verified ",lo(ua,{})]});return lo(Ki,{children:[lo(Ki.Top,{children:lo("div",{className:"flex flex-col gap-5",children:[lo(ti,{children:"Join your workplace benefits program"}),lo(ni,{children:[s.isVerified?"Confirm ":"Enter "," your ",lo("b",{children:"personal"})," mobile number to finish setting up your Flare Benefits account linked to your workplace"]})]})}),lo(Ki.Bottom,{children:lo("div",{className:"mt-5 md:w-[300px] text-left",children:[lo(da,{className:"font-medium text-sm text-gray-900 text-left",children:"Australian Mobile Number"}),lo(fa,{testId:"sign_in_mobile_number_text_input_mobile_number",allowedKeyPattern:/[+0-9]/,inputMode:"numeric",className:"mt-1 mb-1 w-full p-2 focus-visible:ring-gray-500",value:s.original,onChange:a,onfocusin:d,onfocusout:u,trailingIconElement:l&&m,disabled:l}),0!==o.length&&lo("div",{className:"h-8 leading-none",children:lo("span",{className:"text-xs text-rose-500",children:o})}),l&&lo("div",{className:"mt-2 ml-2 mb-2 leading-none",children:lo("span",{className:"text-xs",children:["Not your personal number?",lo(pa,{class:"text-blue-500",onClick:f,children:"Change number"})]})}),lo("div",{children:lo("span",{className:"font-medium text-sm text-gray-900 text-center",children:["By creating your account you confirm you have read and agree to Flare Benefits"," ",lo("a",{href:"https://www.flarehr.com/flare-app-terms-and-conditions/",target:"_blank",rel:"noreferrer",children:" Terms of Use "}),"and",lo("a",{href:"https://www.flarehr.com/privacy-policy/",target:"_blank",rel:"noreferrer",children:" Privacy Policy"}),"."," "]})}),lo(_o,{testId:"sign_in_mobile_number_button_send_otp",class:"mt-5 md:w-full",onClickPromise:p,children:"Join your workplace"}),r!==ne.AppInvite&&lo(_o,{testId:"sign_in_mobile_number_button_decline_to_send_otp",class:"mt-5 md:w-full bg-white hover:!bg-gray-100 focus:!ring-gray-200 !border-0 !shadow-none !text-gray-700 !border-gray-300",onClickPromise:n,children:"Not now"})]})})]})},ya=""+("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/assets/check-animated-QQOZQPLY.gif?inline").href:new URL("assets/check-animated-QQOZQPLY.gif?inline","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href),_a=({onContinue:e})=>{const{featureFlags:{marketplaceScheme:t}}=Gn(uo),n=Vn((()=>"allowance"===t.scheme?{title:"Account created successfully",description:"You now have access to your workplace benefits",isNextButtonHidden:!0}:{title:"You’ve joined your workplace benefits program",description:"You now have access to your workplace benefits",isNextButtonHidden:!1}),[t]);return zn((()=>{if("allowance"===t.scheme){const t=setTimeout(e,3e3);return()=>clearTimeout(t)}}),[t,e]),lo(Ki,{children:[lo(Ki.Top,{children:lo("img",{src:ya,className:"h-16 w-16"})}),lo(Ki.Bottom,{children:lo("div",{className:"mt-5 flex flex-col items-center gap-5 text-center",children:[lo(ti,{children:n.title}),lo(ni,{children:n.description}),!n.isNextButtonHidden&&lo(_o,{testId:"sign_in_success_button_next_screen",class:"mt-5 w-full md:w-[240px]",onClickPromise:async()=>{e()},children:"Set up your benefits"})]})})]})},ba=e=>v("svg",{xmlns:"http://www.w3.org/2000/svg",height:24,viewBox:"0 -960 960 960",width:24,fill:"currentColor",...e},v("path",{d:"m313-440 224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"})),wa=({children:e})=>lo(C,{children:e}),va=({children:e})=>lo(C,{children:e}),xa=({open:e,children:t})=>{const n=Vn((()=>oo.Children.toArray(t).find((e=>e.type===wa))),[t]),r=Vn((()=>oo.Children.toArray(t).find((e=>e.type===va))),[t]),[o,i]=Dn(!e);return zn((()=>{let t;return e?i(!1):t=setTimeout((()=>{i(!0)}),200),()=>{t&&clearTimeout(t)}}),[e]),lo("div",{hidden:o,children:lo("div",{className:"z-50 fixed inset-0 w-screen bg-gray-500/75 transition-opacity "+(e?"ease-in duration-300 opacity-100":"ease-in duration-200 opacity-0"),children:lo("div",{className:"flex overflow-y-auto min-h-full items-end justify-center p-4 sm:items-center sm:p-0",children:lo("div",{className:"relative transform overflow-hidden rounded-lg bg-white shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg "+(e?"ease-out duration-300 opacity-100 translate-y-0 sm:scale-100":"ease-in duration-200 opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"),children:lo("div",{className:"bg-white p-4 sm:p-6",children:lo("div",{className:"sm:flex sm:items-start",children:lo("div",{className:"mt-3 sm:ml-4 sm:mt-0",children:[n,lo("div",{className:"mt-4",children:r})]})})})})})})})},ka=({open:e})=>lo(xa,{open:e,children:lo(va,{children:lo("div",{className:"flex flex-col gap-5 items-center justify-center text-center",children:[lo("span",{class:"animate-spin",children:lo(go,{size:"lg"})}),lo(ti,{children:"Creating your account"}),lo("div",{children:[lo(ni,{children:"This can take up to 30 seconds."}),lo(ni,{children:"Please don't navigate away or refresh your browser."})]})]})})}),Ca=({phoneNumber:e,onVerify:t,onResendOtp:n,onGoBack:r})=>{const{otp:o,setOtp:i}=(()=>{const[e,t]=Dn("");return{otp:{valid:Vn((()=>6===e.length),[e.length]),code:e},setOtp:t}})(),[a,s]=Dn(!1),[l,c]=Dn(""),{countdown:d,restart:u}=(e=>{const[t,n]=Dn(e),r=qn(),o=$n((()=>{clearInterval(r.current)}),[]);return zn((()=>o),[o]),{countdown:t,restart:$n((()=>{let t=e;clearInterval(r.current),r.current=setInterval((()=>{t<0?clearInterval(r.current):n(t--)}),1e3)}),[e])}})(60);zn(u,[u]);const p=$n((()=>(s(!0),c(""),t(o.code).catch(c).finally((()=>{s(!1)})))),[t,o.code]),f=$n((()=>(c(""),n().then(u).catch(c))),[n,u]);return lo(C,{children:[lo(ka,{open:a}),lo(Ki,{children:[lo(Ki.Top,{children:lo("div",{className:"flex flex-col gap-5",children:[lo(ti,{children:"Verify your mobile number"}),lo(ni,{children:["An SMS verification code has been sent to the number ",e,"."]})]})}),lo(Ki.Bottom,{children:lo("div",{className:"mt-5 md:w-[300px] text-left",children:[lo(da,{className:"font-medium text-sm text-gray-900 text-left",children:"Enter your verification code"}),lo(fa,{testId:"sign_in_otp_text_input_otp",allowedKeyPattern:/[0-9]/,inputMode:"numeric",minLength:6,maxLength:6,className:"mt-1 mb-1 w-full p-2 focus-visible:ring-gray-500",trailingIconElement:!1,onChange:i}),l&&lo("span",{className:"text-xs text-rose-500",children:l}),lo("p",{class:"mt-2 text-center text-xs text-gray-600 disabled:opacity-75 ",children:["Didn't get the code?",lo(pa,{disabled:0!==d,className:"underline mx-2 disabled:text-gray-600 disabled:hover:bg-transparent disabled:cursor-text disabled:px-0",onClick:f,children:"Resend SMS"}),0!==d&&lo(C,{children:["in ",d," secs"]})]}),lo(_o,{testId:"sign_in_otp_button_verify_otp",class:"mt-5 md:w-full",disabled:!o.valid,onClickPromise:p,children:"Continue"}),lo(_o,{testId:"sign_in_otp_button_decline_to_verify_otp",class:"mt-5 md:w-full bg-white hover:!bg-gray-100 focus:!ring-gray-200 !border-0 !shadow-none !text-gray-700 !border-gray-300",onClickPromise:async()=>{r()},children:lo("span",{className:"flex gap-3",children:[lo(ba,{}),"Back"]})})]})})]})]})},Ea=({phoneNumber:e,onSignUp:t,onVerify:n,onResendOtp:r,onSuccess:o,onDecline:i})=>{const{trace:a}=oa(),[s,l]=Dn(e??""),{step:c,goBack:d,goToStep:u}=(()=>{const[e,t]=Dn(0),n=$n((()=>{const n=e-1;n>=0&&t(n)}),[e]),r=$n((e=>{e<=2&&t(e)}),[]);return{step:e,goBack:n,goToStep:r}})();zn((()=>{(async()=>{await a("sign-up-viewed")})()}),[a]);const p=$n((e=>t(e.formatted).then((async t=>{l(e.masked),t.isVerificationRequired?u(ca.OTP):(await a("sign-up-completed"),u(ca.SUCCESS))}))),[u,t,a]),f=$n((()=>a("sign-up-declined").then(i)),[i,a]),m=$n((e=>n(e).then((async()=>{await a("sign-up-completed"),u(ca.SUCCESS)}))),[u,n,a]);return lo(C,{children:[c===ca.PHONE_NUMBER&&lo(ga,{phoneNumber:s,onSubmit:p,onDecline:f}),c===ca.OTP&&lo(Ca,{phoneNumber:s,onVerify:m,onResendOtp:r,onGoBack:d}),c===ca.SUCCESS&&lo(_a,{onContinue:o})]})};var Sa=(e=>(e.Auth_AccountDisabled="Sorry, your account has been deactivated. Please contact Flare if there are any issues.",e.Auth_AccountLocked="Sorry, your account is currently locked due to too many attempts. Please try again later.",e.Auth_Unregistered="Sorry, we are currently experiencing some issues. Please try again later.",e.Auth_InvalidVerificationCode="Your one time passcode doesn't look right. Please try again with a new one time passcode.",e.Auth_SessionExpired="Sorry, looks like your session has expired. Please try again.",e.Validation_InvalidPhoneNumber="Please enter a valid Australian mobile number beginning with 04.",e))(Sa||{});const Na=e=>{var t;const n=null==(t=null==e?void 0:e.response)?void 0:t.data;throw Sa[null==n?void 0:n.code]??"Sorry, we are currently experiencing some issues. Please try again later."},Ta=({onSuccess:e,onDecline:t})=>{const{identity:{phoneNumber:n}}=Gn(uo),{signUp:r,verifyOtp:o,resendOtp:i}={signUp:async e=>vn.backend.getClient().post("v2.0/auth/signUp",{mobileNumber:e}).then((e=>({isVerificationRequired:e.data.isVerificationRequired??!0}))),verifyOtp:async e=>{await vn.backend.getClient().post("auth/verify",{otp:e}).catch(Na)},resendOtp:async()=>{await vn.backend.getClient().post("auth/resend").catch(Na)}};return lo(C,{children:lo(Ea,{phoneNumber:n,onSignUp:r,onVerify:o,onResendOtp:i,onSuccess:e,onDecline:t})})},Aa=""+("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/assets/intro-COqxd5jd.png").href:new URL("assets/intro-COqxd5jd.png","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href),Oa=e=>{const{trace:t}=oa(),{featureFlags:{marketplaceScheme:n}}=Gn(uo);return lo(Ki,{children:[lo(Ki.Top,{children:lo("img",{class:"max-w-[30rem] w-full",src:Aa})}),lo(Ki.Bottom,{children:lo("div",{children:[lo("h3",{class:"mt-8 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:"Finish setting up your workplace benefits"}),lo("p",{class:"mt-3 text-lg leading-7 text-gray-600",children:"Because your workplace uses Flare you have access to a range of exclusive benefits that can save you thousands of dollars every year on your car, private health insurance, weekly grocery shop and more."}),lo(_o,{testId:"introduction_button_next_screen",class:"mt-8",onClickPromise:async()=>{await t("started",{experiment:"onboarding-marketplace-scheme",treatment:n.scheme}),e.onStepComplete()},children:"Continue"})]})})]})},Ra=()=>lo("div",{class:"flex justify-center",children:lo("span",{class:"animate-spin",children:lo(go,{size:"lg"})})}),La=(Pa=e=>{var t,n,r;const{featureFlags:{marketplaceScheme:o},hostInformation:i}=Gn(uo),{trace:a}=oa(),s=qn(null);return wo((()=>{a({type:"offer-viewed",offerName:e.marketPlaceOffer.name,data:e.marketPlaceOffer.metadata},{experiment:e.marketPlaceOffer.metadata.featureName,treatment:e.marketPlaceOffer.metadata.treatmentName}),s.current&&(s.current.terms=e.marketPlaceOffer.content.terms,s.current.details=e.marketPlaceOffer.content.details,s.current["on-accept"]=async()=>{await a({type:"offer-accepted",offerName:e.marketPlaceOffer.name,data:{...e.marketPlaceOffer.metadata,template:e.marketPlaceOffer.content.template,assessmentId:e.marketPlaceOffer.content.assessmentId}},{experiment:e.marketPlaceOffer.metadata.featureName,treatment:e.marketPlaceOffer.metadata.treatmentName})},s.current["on-decline"]=async()=>{await a({type:"offer-declined",offerName:e.marketPlaceOffer.name,data:{...e.marketPlaceOffer.metadata,template:e.marketPlaceOffer.content.template,assessmentId:e.marketPlaceOffer.content.assessmentId}},{experiment:e.marketPlaceOffer.metadata.featureName,treatment:e.marketPlaceOffer.metadata.treatmentName}),e.onStepComplete(!1,!1)},s.current["on-complete"]=()=>e.onStepComplete(!0,!0),s.current["on-skip"]=e.marketPlaceOffer.content.skipButtonHidden?void 0:()=>e.onStepComplete(!0,!1))})),lo("benefits-plan-assessment",{"base-url":xn.workplaceBackend.getBaseUrl(),"profile-id":xn.workplaceBackend.getProfileId(),"skip-more-details":!0,"access-token":e.accessToken,"image-url":e.marketPlaceOffer.content.imageUrl,"assessment-id":e.marketPlaceOffer.content.assessmentId,"assessment-instructions":"allowance"===o.scheme?e.marketPlaceOffer.content.assessmentInstructions:void 0,"track-client":i.client,"track-source":i.source,"track-channel":i.channel,"track-experiment":i.experiment,"track-treatment":i.treatment,"marketplace-offer-name":e.marketPlaceOffer.name,"assessment-title":e.marketPlaceOffer.content.title,description:e.marketPlaceOffer.content.description,"accept-button":e.marketPlaceOffer.content.acceptButton,"decline-button":e.marketPlaceOffer.content.declineButton,"special-banner-title":"allowance"===o.scheme?null==(t=e.marketPlaceOffer.content.specialBanner)?void 0:t.title:void 0,"special-banner-subtitle":"allowance"===o.scheme?null==(n=e.marketPlaceOffer.content.specialBanner)?void 0:n.subtitle:void 0,"special-banner-type":"allowance"===o.scheme?null==(r=e.marketPlaceOffer.content.specialBanner)?void 0:r.type:void 0,"vertical-alignment":"items-center",ref:s})},e=>{const t=qn(null),[n,r]=Dn(),[o,i]=Dn(!1);return zn((()=>{(async()=>{const e=await xn.workplaceBackend.getIdToken();r(e)})(),(()=>{if(t.current&&!t.current.querySelector("script[data-injected]")){const e=document.createElement("script"),n=mo(xn.workplaceBackend.getBaseUrl());e.type="module",e.src=`https://npm-cdn.flarehr.com/@flarehr/benefits-plan-assessment@${n}/dist/benefits-plan-assessment.js`,e.dataset.injected="true",e.onload=()=>{i(!0)},t.current.appendChild(e)}else i(!0)})()}),[]),lo("div",{ref:t,className:n,children:n&&o?lo(Pa,{...e,accessToken:n}):lo(Ra,{})})});var Pa;const Ia=e=>v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",...e},v("path",{fill:"currentColor",d:"M345 137c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-119 119L73 103c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l119 119L39 375c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l119-119L311 409c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-119-119L345 137z"}))
|
|
8
8
|
/*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */,{entries:Ua,setPrototypeOf:Fa,isFrozen:ja,getPrototypeOf:Ba,getOwnPropertyDescriptor:Da}=Object;let{freeze:Ma,seal:za,create:Ha}=Object,{apply:qa,construct:Wa}="undefined"!=typeof Reflect&&Reflect;Ma||(Ma=function(e){return e}),za||(za=function(e){return e}),qa||(qa=function(e,t,n){return e.apply(t,n)}),Wa||(Wa=function(e,t){return new e(...t)});const Va=os(Array.prototype.forEach),$a=os(Array.prototype.pop),Ga=os(Array.prototype.push),Ya=os(String.prototype.toLowerCase),Za=os(String.prototype.toString),Ja=os(String.prototype.match),Xa=os(String.prototype.replace),Ka=os(String.prototype.indexOf),Qa=os(String.prototype.trim),es=os(Object.prototype.hasOwnProperty),ts=os(RegExp.prototype.test),ns=(rs=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Wa(rs,t)});var rs;function os(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return qa(e,t,r)}}function is(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ya;Fa&&Fa(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(ja(t)||(t[r]=e),o=e)}e[o]=!0}return e}function as(e){for(let t=0;t<e.length;t++){es(e,t)||(e[t]=null)}return e}function ss(e){const t=Ha(null);for(const[n,r]of Ua(e)){es(e,n)&&(Array.isArray(r)?t[n]=as(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=ss(r):t[n]=r)}return t}function ls(e,t){for(;null!==e;){const n=Da(e,t);if(n){if(n.get)return os(n.get);if("function"==typeof n.value)return os(n.value)}e=Ba(e)}return function(){return null}}const cs=Ma(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ds=Ma(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),us=Ma(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ps=Ma(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),fs=Ma(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),ms=Ma(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),hs=Ma(["#text"]),gs=Ma(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),ys=Ma(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),_s=Ma(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),bs=Ma(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ws=za(/\{\{[\w\W]*|[\w\W]*\}\}/gm),vs=za(/<%[\w\W]*|[\w\W]*%>/gm),xs=za(/\${[\w\W]*}/gm),ks=za(/^data-[\-\w.\u00B7-\uFFFF]/),Cs=za(/^aria-[\-\w]+$/),Es=za(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ss=za(/^(?:\w+script|data):/i),Ns=za(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ts=za(/^html$/i),As=za(/^[a-z][.\w]*(-[.\w]+)+$/i);var Os=Object.freeze({__proto__:null,MUSTACHE_EXPR:ws,ERB_EXPR:vs,TMPLIT_EXPR:xs,DATA_ATTR:ks,ARIA_ATTR:Cs,IS_ALLOWED_URI:Es,IS_SCRIPT_OR_DATA:Ss,ATTR_WHITESPACE:Ns,DOCTYPE_NAME:Ts,CUSTOM_ELEMENT:As});const Rs=1,Ls=3,Ps=7,Is=8,Us=9;var Fs=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window;const n=t=>e(t);if(n.version="3.1.6",n.removed=[],!t||!t.document||t.document.nodeType!==Us)return n.isSupported=!1,n;let{document:r}=t;const o=r,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:f,trustedTypes:m}=t,h=c.prototype,g=ls(h,"cloneNode"),y=ls(h,"remove"),_=ls(h,"nextSibling"),b=ls(h,"childNodes"),w=ls(h,"parentNode");if("function"==typeof s){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let v,x="";const{implementation:k,createNodeIterator:C,createDocumentFragment:E,getElementsByTagName:S}=r,{importNode:N}=o;let T={};n.isSupported="function"==typeof Ua&&"function"==typeof w&&k&&void 0!==k.createHTMLDocument;const{MUSTACHE_EXPR:A,ERB_EXPR:O,TMPLIT_EXPR:R,DATA_ATTR:L,ARIA_ATTR:P,IS_SCRIPT_OR_DATA:I,ATTR_WHITESPACE:U,CUSTOM_ELEMENT:F}=Os;let{IS_ALLOWED_URI:j}=Os,B=null;const D=is({},[...cs,...ds,...us,...fs,...hs]);let M=null;const z=is({},[...gs,...ys,..._s,...bs]);let H=Object.seal(Ha(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),q=null,W=null,V=!0,$=!0,G=!1,Y=!0,Z=!1,J=!0,X=!1,K=!1,Q=!1,ee=!1,te=!1,ne=!1,re=!0,oe=!1,ie=!0,ae=!1,se={},le=null;const ce=is({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let de=null;const ue=is({},["audio","video","img","source","image","track"]);let pe=null;const fe=is({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),me="http://www.w3.org/1998/Math/MathML",he="http://www.w3.org/2000/svg",ge="http://www.w3.org/1999/xhtml";let ye=ge,_e=!1,be=null;const we=is({},[me,he,ge],Za);let ve=null;const xe=["application/xhtml+xml","text/html"];let ke=null,Ce=null;const Ee=r.createElement("form"),Se=function(e){return e instanceof RegExp||e instanceof Function},Ne=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ce||Ce!==e){if(e&&"object"==typeof e||(e={}),e=ss(e),ve=-1===xe.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ke="application/xhtml+xml"===ve?Za:Ya,B=es(e,"ALLOWED_TAGS")?is({},e.ALLOWED_TAGS,ke):D,M=es(e,"ALLOWED_ATTR")?is({},e.ALLOWED_ATTR,ke):z,be=es(e,"ALLOWED_NAMESPACES")?is({},e.ALLOWED_NAMESPACES,Za):we,pe=es(e,"ADD_URI_SAFE_ATTR")?is(ss(fe),e.ADD_URI_SAFE_ATTR,ke):fe,de=es(e,"ADD_DATA_URI_TAGS")?is(ss(ue),e.ADD_DATA_URI_TAGS,ke):ue,le=es(e,"FORBID_CONTENTS")?is({},e.FORBID_CONTENTS,ke):ce,q=es(e,"FORBID_TAGS")?is({},e.FORBID_TAGS,ke):{},W=es(e,"FORBID_ATTR")?is({},e.FORBID_ATTR,ke):{},se=!!es(e,"USE_PROFILES")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,$=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Y=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Z=e.SAFE_FOR_TEMPLATES||!1,J=!1!==e.SAFE_FOR_XML,X=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,Q=e.FORCE_BODY||!1,re=!1!==e.SANITIZE_DOM,oe=e.SANITIZE_NAMED_PROPS||!1,ie=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,j=e.ALLOWED_URI_REGEXP||Es,ye=e.NAMESPACE||ge,H=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Se(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Se(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(H.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Z&&($=!1),te&&(ee=!0),se&&(B=is({},hs),M=[],!0===se.html&&(is(B,cs),is(M,gs)),!0===se.svg&&(is(B,ds),is(M,ys),is(M,bs)),!0===se.svgFilters&&(is(B,us),is(M,ys),is(M,bs)),!0===se.mathMl&&(is(B,fs),is(M,_s),is(M,bs))),e.ADD_TAGS&&(B===D&&(B=ss(B)),is(B,e.ADD_TAGS,ke)),e.ADD_ATTR&&(M===z&&(M=ss(M)),is(M,e.ADD_ATTR,ke)),e.ADD_URI_SAFE_ATTR&&is(pe,e.ADD_URI_SAFE_ATTR,ke),e.FORBID_CONTENTS&&(le===ce&&(le=ss(le)),is(le,e.FORBID_CONTENTS,ke)),ie&&(B["#text"]=!0),X&&is(B,["html","head","body"]),B.table&&(is(B,["tbody"]),delete q.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw ns('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw ns('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');v=e.TRUSTED_TYPES_POLICY,x=v.createHTML("")}else void 0===v&&(v=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(i){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(m,i)),null!==v&&"string"==typeof x&&(x=v.createHTML(""));Ma&&Ma(e),Ce=e}},Te=is({},["mi","mo","mn","ms","mtext"]),Ae=is({},["foreignobject","annotation-xml"]),Oe=is({},["title","style","font","a","script"]),Re=is({},[...ds,...us,...ps]),Le=is({},[...fs,...ms]),Pe=function(e){Ga(n.removed,{element:e});try{w(e).removeChild(e)}catch(t){y(e)}},Ie=function(e,t){try{Ga(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(r){Ga(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!M[e])if(ee||te)try{Pe(t)}catch(r){}else try{t.setAttribute(e,"")}catch(r){}},Ue=function(e){let t=null,n=null;if(Q)e="<remove></remove>"+e;else{const t=Ja(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ve&&ye===ge&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=v?v.createHTML(e):e;if(ye===ge)try{t=(new f).parseFromString(o,ve)}catch(a){}if(!t||!t.documentElement){t=k.createDocument(ye,"template",null);try{t.documentElement.innerHTML=_e?x:o}catch(a){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),ye===ge?S.call(t,X?"html":"body")[0]:X?t.documentElement:i},Fe=function(e){return C.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},je=function(e){return e instanceof p&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof u)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Be=function(e){return"function"==typeof l&&e instanceof l},De=function(e,t,r){T[e]&&Va(T[e],(e=>{e.call(n,t,r,Ce)}))},Me=function(e){let t=null;if(De("beforeSanitizeElements",e,null),je(e))return Pe(e),!0;const r=ke(e.nodeName);if(De("uponSanitizeElement",e,{tagName:r,allowedTags:B}),e.hasChildNodes()&&!Be(e.firstElementChild)&&ts(/<[/\w]/g,e.innerHTML)&&ts(/<[/\w]/g,e.textContent))return Pe(e),!0;if(e.nodeType===Ps)return Pe(e),!0;if(J&&e.nodeType===Is&&ts(/<[/\w]/g,e.data))return Pe(e),!0;if(!B[r]||q[r]){if(!q[r]&&He(r)){if(H.tagNameCheck instanceof RegExp&&ts(H.tagNameCheck,r))return!1;if(H.tagNameCheck instanceof Function&&H.tagNameCheck(r))return!1}if(ie&&!le[r]){const t=w(e)||e.parentNode,n=b(e)||e.childNodes;if(n&&t){for(let r=n.length-1;r>=0;--r){const o=g(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,_(e))}}}return Pe(e),!0}return e instanceof c&&!function(e){let t=w(e);t&&t.tagName||(t={namespaceURI:ye,tagName:"template"});const n=Ya(e.tagName),r=Ya(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===he?t.namespaceURI===ge?"svg"===n:t.namespaceURI===me?"svg"===n&&("annotation-xml"===r||Te[r]):Boolean(Re[n]):e.namespaceURI===me?t.namespaceURI===ge?"math"===n:t.namespaceURI===he?"math"===n&&Ae[r]:Boolean(Le[n]):e.namespaceURI===ge?!(t.namespaceURI===he&&!Ae[r])&&!(t.namespaceURI===me&&!Te[r])&&!Le[n]&&(Oe[n]||!Re[n]):!("application/xhtml+xml"!==ve||!be[e.namespaceURI]))}(e)?(Pe(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!ts(/<\/no(script|embed|frames)/i,e.innerHTML)?(Z&&e.nodeType===Ls&&(t=e.textContent,Va([A,O,R],(e=>{t=Xa(t,e," ")})),e.textContent!==t&&(Ga(n.removed,{element:e.cloneNode()}),e.textContent=t)),De("afterSanitizeElements",e,null),!1):(Pe(e),!0)},ze=function(e,t,n){if(re&&("id"===t||"name"===t)&&(n in r||n in Ee))return!1;if($&&!W[t]&&ts(L,t));else if(V&&ts(P,t));else if(!M[t]||W[t]){if(!(He(e)&&(H.tagNameCheck instanceof RegExp&&ts(H.tagNameCheck,e)||H.tagNameCheck instanceof Function&&H.tagNameCheck(e))&&(H.attributeNameCheck instanceof RegExp&&ts(H.attributeNameCheck,t)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(t))||"is"===t&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&ts(H.tagNameCheck,n)||H.tagNameCheck instanceof Function&&H.tagNameCheck(n))))return!1}else if(pe[t]);else if(ts(j,Xa(n,U,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Ka(n,"data:")||!de[e]){if(G&&!ts(I,Xa(n,U,"")));else if(n)return!1}else;return!0},He=function(e){return"annotation-xml"!==e&&Ja(e,F)},qe=function(e){De("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:M};let o=t.length;for(;o--;){const a=t[o],{name:s,namespaceURI:l,value:c}=a,d=ke(s);let u="value"===s?c:Qa(c);if(r.attrName=d,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,De("uponSanitizeAttribute",e,r),u=r.attrValue,J&&ts(/((--!?|])>)|<\/(style|title)/i,u)){Ie(s,e);continue}if(r.forceKeepAttr)continue;if(Ie(s,e),!r.keepAttr)continue;if(!Y&&ts(/\/>/i,u)){Ie(s,e);continue}Z&&Va([A,O,R],(e=>{u=Xa(u,e," ")}));const p=ke(e.nodeName);if(ze(p,d,u)){if(!oe||"id"!==d&&"name"!==d||(Ie(s,e),u="user-content-"+u),v&&"object"==typeof m&&"function"==typeof m.getAttributeType)if(l);else switch(m.getAttributeType(p,d)){case"TrustedHTML":u=v.createHTML(u);break;case"TrustedScriptURL":u=v.createScriptURL(u)}try{l?e.setAttributeNS(l,s,u):e.setAttribute(s,u),je(e)?Pe(e):$a(n.removed)}catch(i){}}}De("afterSanitizeAttributes",e,null)},We=function e(t){let n=null;const r=Fe(t);for(De("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)De("uponSanitizeShadowNode",n,null),Me(n)||(n.content instanceof a&&e(n.content),qe(n));De("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,s=null,c=null;if(_e=!e,_e&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Be(e)){if("function"!=typeof e.toString)throw ns("toString is not a function");if("string"!=typeof(e=e.toString()))throw ns("dirty is not a string, aborting")}if(!n.isSupported)return e;if(K||Ne(t),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=ke(e.nodeName);if(!B[t]||q[t])throw ns("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)r=Ue("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),i.nodeType===Rs&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!ee&&!Z&&!X&&-1===e.indexOf("<"))return v&&ne?v.createHTML(e):e;if(r=Ue(e),!r)return ee?null:ne?x:""}r&&Q&&Pe(r.firstChild);const d=Fe(ae?e:r);for(;s=d.nextNode();)Me(s)||(s.content instanceof a&&We(s.content),qe(s));if(ae)return e;if(ee){if(te)for(c=E.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(M.shadowroot||M.shadowrootmode)&&(c=N.call(o,c,!0)),c}let u=X?r.outerHTML:r.innerHTML;return X&&B["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&ts(Ts,r.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+u),Z&&Va([A,O,R],(e=>{u=Xa(u,e," ")})),v&&ne?v.createHTML(u):u},n.setConfig=function(){Ne(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),K=!0},n.clearConfig=function(){Ce=null,K=!1},n.isValidAttribute=function(e,t,n){Ce||Ne({});const r=ke(e),o=ke(t);return ze(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(T[e]=T[e]||[],Ga(T[e],t))},n.removeHook=function(e){if(T[e])return $a(T[e])},n.removeHooks=function(e){T[e]&&(T[e]=[])},n.removeAllHooks=function(){T={}},n}();const js=({children:e})=>{const t=oo.Children.toArray(e),n=t.find((e=>e.type===Bs)),r=t.find((e=>e.type===Ds));return lo(Xi,{appear:!0,show:!0,enter:"transition duration-700 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",children:lo("div",{class:"md:grid md:grid-cols-2 max-w-[59.5rem] mx-auto",children:[lo(Xi,{appear:!0,show:!0,enter:"transition duration-700 ease-out md:transition-none",enterFrom:"-translate-y-6",enterTo:"translate-y-0",children:n&&lo("div",{class:"flex items-center h-full",children:n})}),lo(Xi,{appear:!0,show:!0,enter:"transition delay-300 duration-[600ms] ease-out",enterFrom:"opacity-0 -translate-y-6",enterTo:"opacity-100 translate-y-0",children:r&&lo("div",{class:"flex items-center h-full",children:r})})]})})},Bs=({children:e})=>lo(C,{children:e}),Ds=({children:e})=>lo(C,{children:e});js.Left=Bs,js.Right=Ds;const Ms=e=>v("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...e},v("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})),zs=e=>lo(Xi,{appear:!0,show:!0,enter:"transition duration-300 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",children:lo("div",{class:"w-full border border-gray-200 rounded-lg shadow-sm p-4 pl-3 md:p-6 space-y-2",children:e.items.map(((e,t)=>lo("div",{class:"flex space-x-1",children:[lo("span",{children:lo(ri,{class:"h-5 w-5 fill-primary-base"})}),lo("span",{class:"text-sm leading-5 text-gray-600",children:e})]},t)))})}),Hs=e=>{const[t,n]=Dn(!1);return lo("div",{class:e.class,children:t?lo(zs,{items:e.items}):lo("button",{type:"button",class:"w-full inline-flex justify-center items-center px-4 py-3 border border-gray-200 shadow-sm text-sm font-medium rounded-md text-primary-base bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-focus",onClick:()=>n(!0),children:["Learn more",lo("span",{class:"ml-1",children:lo(Ms,{class:"h-4 w-4"})})]})})},qs=e=>{var t,n,r,o;const{featureFlags:{marketplaceScheme:i}}=Gn(uo),{trace:a}=oa(),[s,l]=Dn(!1);wo((()=>{a({type:"offer-viewed",offerName:e.step.name,data:e.step.metadata},{experiment:e.step.metadata.featureName,treatment:e.step.metadata.treatmentName})}));const c=async t=>{t?await a({type:"offer-accepted",offerName:e.step.name,data:{...e.step.metadata,template:"Eoi"}},{experiment:e.step.metadata.featureName,treatment:e.step.metadata.treatmentName}):await a({type:"offer-declined",offerName:e.step.name,data:{...e.step.metadata,template:"Eoi"}},{experiment:e.step.metadata.featureName,treatment:e.step.metadata.treatmentName});return(t?e.primaryButton:e.secondaryButton).onClick()};return lo(js,{children:[lo(js.Left,{children:lo("div",{children:lo(Xi,{appear:!0,show:!0,enter:"transition duration-700 ease-out md:transition-none",enterFrom:"-translate-y-6",enterTo:"translate-y-0",children:lo("div",{children:[lo("img",{class:"mt-4 max-w-full w-full mx-auto md:hidden",src:e.step.content.mobileImageUrl,loading:"lazy"}),lo("div",{class:"md:max-w-[27.5rem]",children:[lo("h3",{class:"mt-8 md:mt-3 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:e.step.content.title}),lo("p",{class:"mt-2 text-base md:text-lg leading-6 md:leading-7 text-gray-600 break-words",children:e.step.content.description}),e.step.content.details&&lo("div",{class:"mt-6 hidden md:block",children:lo(zs,{items:e.step.content.details})})]}),e.step.content.details&&lo(Hs,{class:"mt-6 md:hidden",items:e.step.content.details}),"allowance"===i.scheme&&"offer"==(null==(t=e.step.content.specialBanner)?void 0:t.type)&&lo(na,{style:{background:"linear-gradient(90deg, rgba(255, 135, 111, 0.10) 0%, rgba(166, 80, 255, 0.10) 100%)"},className:"md:max-w-[27.5rem] mt-6",children:lo("div",{children:[lo("p",{className:"font-semibold text-lg leading-tight text-gray-900",children:e.step.content.specialBanner.title}),lo("span",{className:"font-normal text-sm text-gray-900",children:e.step.content.specialBanner.subtitle})]})}),e.children&&e.children,lo("div",{class:"flex flex-col md:flex-row md:justify-between gap-4 md:max-w-[27.5rem] mt-6 md:mt-11",children:[lo(_o,{testId:`offer_${e.step.name}_button_accept`,class:e.primaryButton.class??"",onClickPromise:()=>c(!0),children:e.primaryButton.text??"Next"}),(null==(n=e.secondaryButton)?void 0:n.text)&&lo(_o,{testId:`offer_${e.step.name}_button_decline`,class:e.secondaryButton.class??"bg-white hover:!bg-gray-100 focus:!ring-gray-200 !border-0 !shadow-none !text-gray-700 !border-gray-300",onClickPromise:()=>c(!1),children:e.secondaryButton.text})]}),(null==(r=e.step.content.terms)?void 0:r.length)>0&&lo("p",{className:"mt-6 text-xs",children:[lo("span",{children:"*"}),lo("span",{className:"underline text-primary-base cursor-pointer",onClick:()=>l(!0),children:"T&C's apply"})]}),(null==(o=e.step.content.terms)?void 0:o.length)>0&&lo(xa,{open:s,children:[lo(wa,{children:lo("div",{className:"relative",children:[lo("h3",{className:"text-base font-semibold text-gray-900",children:"Terms & Conditions"}),lo("span",{className:"absolute top-0 right-0 p-1 rounded-full bg-gray-200 cursor-pointer hover:bg-gray-100",onClick:()=>l(!1),children:lo(Ia,{className:"h-4 min-h-4 max-h-4 w-4 min-w-4 max-w-4"})})]})}),lo(va,{children:lo("div",{class:"flex flex-col gap-3 mt-6 text-gray-600 text-xs",children:e.step.content.terms.map(((e,t)=>lo("span",{dangerouslySetInnerHTML:{__html:Fs.sanitize(e,{ADD_ATTR:["target"]})}},t)))})})]})]})})})}),lo(js.Right,{children:lo("img",{class:"max-w-[30rem] w-full hidden md:block",src:e.step.content.imageUrl,loading:"lazy"})})]})},Ws=e=>{var t,n,r;const{featureFlags:{marketplaceScheme:o}}=Gn(uo),{trace:i}=oa(),[a,s]=Dn(!1);wo((()=>{"name"in e.step&&i({type:"offer-viewed",offerName:e.step.name,data:e.step.metadata},{experiment:e.step.metadata.featureName,treatment:e.step.metadata.treatmentName})}));return lo(js,{children:[lo(js.Left,{children:lo("div",{children:lo(Xi,{appear:!0,show:!0,enter:"transition duration-700 ease-out md:transition-none",enterFrom:"-translate-y-6",enterTo:"translate-y-0",children:lo("div",{children:[lo("img",{class:"mt-4 max-w-full w-full mx-auto md:hidden",src:e.step.content.mobileImageUrl,loading:"lazy"}),lo("div",{class:"md:max-w-[27.5rem]",children:[lo("h3",{class:"mt-8 md:mt-3 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:e.step.content.title}),lo("p",{class:"mt-2 text-base md:text-lg leading-6 md:leading-7 text-gray-600 break-words",children:e.step.content.description}),e.step.content.details&&lo("div",{class:"mt-6 hidden md:block",children:lo(zs,{items:e.step.content.details})})]}),e.step.content.details&&lo(Hs,{class:"mt-6 md:hidden",items:e.step.content.details}),"allowance"===o.scheme&&"offer"==(null==(t=e.step.content.specialBanner)?void 0:t.type)&&lo(na,{style:{background:"linear-gradient(90deg, rgba(255, 135, 111, 0.10) 0%, rgba(166, 80, 255, 0.10) 100%)"},className:"md:max-w-[27.5rem] mt-6",children:lo("div",{children:[lo("p",{className:"font-semibold text-lg leading-tight text-gray-900",children:e.step.content.specialBanner.title}),lo("span",{className:"font-normal text-sm text-gray-900",children:e.step.content.specialBanner.subtitle})]})}),e.children&&e.children,lo("div",{class:"flex flex-col md:flex-row md:justify-between gap-4 md:max-w-[27.5rem] mt-6 md:mt-11",children:lo(_o,{testId:`offer_${e.step.name}_button_accept`,class:e.primaryButton.class??"",onClickPromise:async()=>{"name"in e.step&&await i({type:"offer-progressed",offerName:e.step.name,data:{...e.step.metadata,template:"Simple"}},{experiment:e.step.metadata.featureName,treatment:e.step.metadata.treatmentName}),e.primaryButton.onClick()},children:e.primaryButton.text??"Next"})}),(null==(n=e.step.content.terms)?void 0:n.length)>0&&lo("p",{className:"mt-6 text-xs",children:[lo("span",{children:"*"}),lo("span",{className:"underline text-primary-base cursor-pointer",onClick:()=>s(!0),children:"T&C's apply"})]}),(null==(r=e.step.content.terms)?void 0:r.length)>0&&lo(xa,{open:a,children:[lo(wa,{children:lo("div",{className:"relative",children:[lo("h3",{className:"text-base font-semibold text-gray-900",children:"Terms & Conditions"}),lo("span",{className:"absolute top-0 right-0 p-1 rounded-full bg-gray-200 cursor-pointer hover:bg-gray-100",onClick:()=>s(!1),children:lo(Ia,{className:"h-4 min-h-4 max-h-4 w-4 min-w-4 max-w-4"})})]})}),lo(va,{children:lo("div",{class:"flex flex-col gap-3 mt-6 text-gray-600 text-xs",children:e.step.content.terms.map(((e,t)=>lo("span",{dangerouslySetInnerHTML:{__html:Fs.sanitize(e,{ADD_ATTR:["target"]})}},t)))})})]})]})})})}),lo(js.Right,{children:lo("img",{class:"max-w-[30rem] w-full hidden md:block",src:e.step.content.imageUrl,loading:"lazy"})})]})},Vs=({current:e,total:t})=>lo("div",{className:"flex justify-between md:block text-xs tracking-wide",children:lo("span",{className:"relative px-3 py-0.5 text-primary-base font-semibold",children:[e," OF ",t,lo("span",{className:"absolute left-0 rounded-xl bg-primary-base opacity-10 w-full h-[90%]"})]})}),$s=e=>{const{featureFlags:{marketplaceSubNavigation:t},offersProgress:{update:n,showCheckIcon:r}}=Gn(uo),[o,i]=Dn(0),{trace:a}=oa(),s=$n(((t,r,a)=>{n(t,r,a),o===e.offers.length-1?e.onComplete():i(o+1)}),[n,o,e]),l=$n((t=>{i(t);const n=e.offers[t];a({type:"offer-selected",offerName:n.name},{experiment:n.metadata.featureName,treatment:n.metadata.treatmentName})}),[e.offers,a]);return lo("div",{className:"max-w-[59.5rem] mx-auto",children:[!t&&lo(Vs,{current:o+1,total:e.offers.length+1}),lo(ei,{selectedIndex:o,onChange:l,children:[t&&e.offers.map(((e,t)=>lo(Ko,{label:e.content.productName,icon:lo(Xo,{icon:r(e.name,t===o)?lo(ri,{}):e.content.iconUrl})},e.name))),e.offers.map((e=>lo(Qo,{children:["Eoi"===e.content.template&&lo(qs,{step:e,primaryButton:{text:e.content.acceptButton,onClick:()=>s(e.name,!0,!0)},secondaryButton:{text:e.content.declineButton,onClick:()=>s(e.name,!1,!1)}}),"Simple"===e.content.template&&lo(Ws,{step:e,primaryButton:{text:e.content.acceptButton,onClick:()=>s(e.name,!0,!0)}}),"Assessment"===e.content.template&&lo(La,{onStepComplete:(t,n)=>s(e.name,t,n),marketPlaceOffer:e},e.name)]},e.name)))]})]})},Gs=""+("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/assets/get-app-CQalMIl7.jpg").href:new URL("assets/get-app-CQalMIl7.jpg","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href),Ys=e=>v("svg",{width:36,height:42,viewBox:"0 0 36 42",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},v("path",{d:"M29.7406 21.8737C29.7406 18.5174 31.3138 16.0681 34.3678 14.1632C32.6094 11.714 30.0182 10.444 26.5941 10.1719C23.2625 9.89974 19.6532 11.9861 18.3576 11.9861C16.9694 11.9861 13.8229 10.2626 11.3242 10.2626C6.14176 10.3533 0.681641 14.2539 0.681641 22.3273C0.681641 24.6858 1.05182 27.135 1.97726 29.6749C3.18034 33.0312 7.43738 41.1953 11.8795 41.0139C14.1931 41.0139 15.8589 39.3811 18.9129 39.3811C21.8743 39.3811 23.355 41.0139 25.9463 41.0139C30.4809 41.0139 34.3678 33.5755 35.4783 30.2192C29.4629 27.4071 29.7406 22.0551 29.7406 21.8737ZM24.5581 6.99696C27.0568 4.09418 26.7792 1.37283 26.7792 0.375C24.5581 0.556424 21.9668 1.9171 20.4861 3.54991C18.8203 5.36415 17.8949 7.63194 18.08 10.0812C20.4861 10.2626 22.7072 9.08333 24.5581 6.99696Z",fill:"#9CA3AF"})),Zs=e=>v("svg",{width:37,height:40,viewBox:"0 0 37 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},v("path",{d:"M24.1063 18.8401L6.78538 1.88173L28.8088 14.2567L24.1063 18.8401ZM2.318 0.888672C1.29913 1.42339 0.59375 2.41645 0.59375 3.63867V37.3262C0.59375 38.5484 1.29913 39.5415 2.318 39.9998L22.382 20.4442L2.318 0.888672ZM35.6274 18.1526L31.0033 15.5553L25.8305 20.4442L31.0033 25.4095L35.7058 22.8123C37.1165 21.7428 37.1165 19.222 35.6274 18.1526ZM6.78538 39.0067L28.8088 26.7081L24.1063 22.1248L6.78538 39.0067Z",fill:"#9CA3AF"})),Js=""+("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/assets/get-app-mobile-DORYS6YR.jpg").href:new URL("assets/get-app-mobile-DORYS6YR.jpg","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href),Xs=({onComplete:e})=>{const{trace:t}=oa(),{identity:n,getIdentityRegistrationStatus:r,featureFlags:{marketplaceScheme:o}}=Gn(uo);zn((()=>{(async()=>{await t({type:"summary-viewed",data:{summaryVariant:"app"}},{experiment:"onboarding-marketplace-scheme",treatment:o.scheme})})()}),[o,t]);const i={...Ks(n,r()),imageUrl:Gs,mobileImageUrl:Js},a={text:"Continue",class:"mt-6 md:mt-14",onClick:async()=>{await t("completed",{experiment:"onboarding-marketplace-scheme",treatment:o.scheme}),await e()}};return lo(js,{children:[lo(js.Left,{children:lo("div",{children:[lo("img",{class:"mt-4 max-w-full w-full mx-auto md:hidden",src:i.mobileImageUrl,loading:"lazy"}),lo("div",{class:"md:max-w-[27.5rem]",children:[lo("h3",{class:"mt-8 md:mt-3 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:i.title}),lo("p",{class:"mt-2 text-base md:text-lg leading-6 md:leading-7 text-gray-600 break-words",children:i.description})]}),lo("div",{class:"mt-6 flex space-x-6",children:[lo(Ys,{}),lo(Zs,{})]}),lo(_o,{testId:"step-benefits-finish",class:a.class,onClickPromise:a.onClick,children:a.text})]})}),lo(js.Right,{children:lo("img",{class:"max-w-[30rem] w-full hidden md:block",src:i.imageUrl,loading:"lazy"})})]})},Ks=(e,t)=>{switch(t){case"RegistrationAbandoned":return{title:"Join your workplace",description:`We’ve sent an email to ${e.email} with instructions on how to join your workplace. This will enable you to access all your workplace benefits through the Flare app in the future.`};case"NewlyRegistered":return{title:"Join your workplace’s benefits program",description:`We’ve sent an email to ${e.email} with instructions on how to download the Flare app - where your company’s benefits live.`};default:return{title:"Check your email",description:`We’ve sent an email to ${e.email} with instructions on how to download and activate the Flare App and Card.`}}},Qs=""+("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/assets/all-set-vt2mQYDm.jpg").href:new URL("assets/all-set-vt2mQYDm.jpg","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href),el=""+("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__dirname+"/assets/all-set-mobile-Fhtje9HW.jpg").href:new URL("assets/all-set-mobile-Fhtje9HW.jpg","undefined"==typeof document?location.href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||document.baseURI).href),tl=({onComplete:e})=>{const{trace:t}=oa(),{getWorkplaceLinkingStatus:n,featureFlags:{marketplaceScheme:r}}=Gn(uo);zn((()=>{(async()=>{await t({type:"summary-viewed",data:{summaryVariant:"generic"}},{experiment:"onboarding-marketplace-scheme",treatment:r.scheme})})()}),[r,t]);const o={imageUrl:Qs,mobileImageUrl:el,title:"You're all set!",description:"PreviouslyLinked"===n()?"You’ve already connected this employer with your Flare Benefits account. Simply continue and review the details you have provided to complete your onboarding.":"Simply continue and review the details you have provided to complete your onboarding."},i={text:"Continue",class:"mt-6 md:mt-6",onClick:async()=>{await t("completed",{experiment:"onboarding-marketplace-scheme",treatment:r.scheme}),await e()}};return lo(js,{children:[lo(js.Left,{children:lo("div",{children:[lo("img",{class:"mt-4 max-w-full w-full mx-auto md:hidden",src:o.mobileImageUrl,loading:"lazy"}),lo("div",{class:"md:max-w-[27.5rem]",children:[lo("h3",{class:"mt-8 md:mt-3 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:o.title}),lo("p",{class:"mt-2 text-base md:text-lg leading-6 md:leading-7 text-gray-600 break-words",children:o.description})]}),lo("div",{class:"flex flex-col md:flex-row md:justify-between gap-4 md:max-w-[27.5rem] mt-6 md:mt-11",children:lo(_o,{testId:"step-benefits-finish",class:i.class,onClickPromise:i.onClick,children:i.text})})]})}),lo(js.Right,{children:lo("img",{class:"max-w-[30rem] w-full hidden md:block",src:o.imageUrl,loading:"lazy"})})]})},nl=()=>{const{offers:e,workplace:t,updateIdentity:n}=Gn(uo),{current:r,goNext:o}=function(){const{isAppEnabled:e,getIdentityRegistrationStatus:t,featureFlags:n}=Gn(uo),r=Vn((()=>"allowance"===n.marketplaceScheme.scheme?["Allowance_JoinBenefits","FlareAppIdentity","Allowance_ConfigureBenefits","MarketplaceOffers","Allowance_BenefitsSummary"]:["Introduction","FlareAppIdentity","MarketplaceOffers",e?"SummaryApp":"SummaryGeneric"]),[n,e]),[o,i]=Dn(r[0]),a=$n((async()=>{if(r.indexOf(o)===r.length-1){const e=document.querySelector(ol),t=new CustomEvent("step-completion",{bubbles:!0});return null==e||e.dispatchEvent(t),void(await new Promise((e=>setTimeout(e,1e4))))}if("RegistrationAbandoned"!==t())try{const e=r.findIndex((e=>e===o)),t=r[e+1];return void i(t)}catch{}else i(r[r.length-1])}),[o,t,r]);return{current:o,goNext:a}}(),i=$n((()=>{n(!0),o()}),[o,n]),a=$n((()=>{n(!1),o()}),[o,n]);switch(r){case"Introduction":return lo(Oa,{employerName:t.employerName,onStepComplete:o});case"Allowance_JoinBenefits":return lo(ia,{employerName:t.employerName,onContinue:o});case"FlareAppIdentity":return lo(Ta,{onSuccess:i,onDecline:a});case"Allowance_ConfigureBenefits":return lo(ta,{onContinue:o});case"MarketplaceOffers":return lo($s,{offers:e,onComplete:o});case"Allowance_BenefitsSummary":return lo(la,{onContinue:o});case"SummaryApp":return lo(Xs,{onComplete:o});case"SummaryGeneric":return lo(tl,{onComplete:o});default:return lo(C,{})}},rl=()=>Gn(uo).isLoading?lo("div",{class:"flex justify-center",children:lo("span",{class:"animate-spin",children:lo(go,{size:"lg"})})}):lo(nl,{}),ol="benefits-onboarding";!function(e,t,n,r){function o(){var t=Reflect.construct(HTMLElement,[],o);return t._vdomComponent=e,t._root=r&&r.shadow?t.attachShadow({mode:r.mode||"open"}):t,t}(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=X,o.prototype.attributeChangedCallback=Q,o.prototype.disconnectedCallback=ee,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach((function(e){Object.defineProperty(o.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var n=typeof t;null!=t&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(e,t)}})})),customElements.define(t,o)}((e=>{const[t,n]=Dn(0);zn((()=>le((()=>{n(t+1)}))),[t]);const r={backendUrl:e["backend-url"],accessToken:e["access-token"],workflowsInstanceId:e["workflows-instance-id"],workflowsJourneyType:e["journey-type"]};return kn(r.backendUrl,r.accessToken,r.workflowsInstanceId,r.workflowsJourneyType),"prod"===mo(r.backendUrl)&&ho.init("p09arvzysr"),lo(C,{children:[lo("style",{children:yo.toString()}),lo("div",{class:"font-inter pt-6 pb-8 md:py-24 px-px",children:lo(fo,{workflowsJourneyType:r.workflowsJourneyType,children:lo(rl,{})})},t)]})}),ol,[],{shadow:!0})}));
|