@flarehr/apollo-benefits-onboarding 0.1.3183 → 0.1.3185

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 Fi=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,Bi=/\\([\u000b\u0020-\u00ff])/g,ji=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,Mi=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(!ji.test(r))throw new TypeError("invalid media type");var o=new Di(r.toLowerCase());if(-1!==n){var i,a,s;for(Fi.lastIndex=n;a=Fi.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(Bi,"$1")),o.parameters[i]=s}if(n!==t.length)throw new TypeError("invalid parameter format")}return o};function Di(e){this.parameters=Object.create(null),this.type=e}var zi=new Map,Hi=function(e){return e.cloneNode(!0)},qi=function(){return"file:"===window.location.protocol},Wi=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=Mi(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(qi()?"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||qi()&&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()},Vi={},$i=function(e,t){Vi[e]=Vi[e]||[],Vi[e].push(t)},Gi=function(e,t,n){if(zi.has(e)){var r=zi.get(e);if(void 0===r)return void $i(e,n);if(r instanceof SVGSVGElement)return void n(null,Hi(r))}zi.set(e,void 0),$i(e,n),Wi(e,t,(function(t,n){var r;t?zi.set(e,t):(null===(r=n.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&zi.set(e,n.responseXML.documentElement),function(e){for(var t=function(t,n){setTimeout((function(){if(Array.isArray(Vi[e])){var n=zi.get(e),r=Vi[e][t];n instanceof SVGSVGElement&&r(null,Hi(n)),n instanceof Error&&r(n),t===Vi[e].length-1&&delete Vi[e]}}),0)},n=0,r=Vi[e].length;n<r;n++)t(n)}(e)}))},Yi=function(e,t,n){Wi(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)}))},Zi=0,Ji=[],Xi={},Ki="http://www.w3.org/1999/xlink",Qi=function(e,t,n,r,o,i,a){var s=e.getAttribute("data-src")||e.getAttribute("src");if(s){if(-1!==Ji.indexOf(e))return Ji.splice(Ji.indexOf(e),1),void(e=null);Ji.push(e),e.setAttribute("src",""),(r?Gi:Yi)(s,o,(function(r,o){if(!o)return Ji.splice(Ji.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 u=e.getAttribute("width");u&&o.setAttribute("width",u);var d=e.getAttribute("height");d&&o.setAttribute("height",d);var p=Array.from(new Set(Ui(Ui(Ui([],(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=_+"-"+ ++Zi,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(Ki,"href");l&&l.toString()==="#"+g[e].id&&i.push(r[a])}for(var c=0,u=i.length;c<u;c++)i[c].setAttributeNS(Ki,"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=[],S=0,E=k.length;S<E;S++)(x=k[S].getAttribute("type"))&&"application/ecmascript"!==x&&"application/javascript"!==x&&"text/javascript"!==x||((v=k[S].innerText||k[S].textContent)&&C.push(v),o.removeChild(k[S]));if(C.length>0&&("always"===t||"once"===t&&!Xi[s])){for(var N=0,T=C.length;N<T;N++)new Function(C[N])(window);Xi[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",Ki),i(o),!e.parentNode)return Ji.splice(Ji.indexOf(e),1),e=null,void a(new Error("Parent node is null"));e.parentNode.replaceChild(o,e),Ji.splice(Ji.indexOf(e),1),e=null,a(null,o)}))}else a(new Error("Invalid data-src or src attribute"))},ea={exports:{}};function ta(){}function na(){}na.resetWarningCache=ta;ea.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:na,resetWarningCache:ta};return n.PropTypes=n,n}();var ra=ea.exports,oa=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],ia="http://www.w3.org/2000/svg",aa="http://www.w3.org/1999/xlink",sa=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,Ii(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,u=o.title,d=o.useRequestCache,p=this.props.onError,f=this.props.beforeInjection,m=this.props.afterInjection,h=this.props.wrapper;"svg"===h?((n=document.createElementNS(ia,h)).setAttribute("xmlns",ia),n.setAttribute("xmlns:xlink",aa),r=document.createElementNS(ia,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,u=void 0===c||c,d=n.evalScripts,p=void 0===d?"never":d,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;_++)Qi(e[_],p,g,u,m,l,(function(t,n){a(t,n),e&&"length"in e&&e.length===++y&&o(y)}));else e?Qi(e,p,g,u,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(u){var r=e.querySelector(":scope > title");r&&e.removeChild(r);var o=document.createElement("title");o.innerHTML=u,e.prepend(o)}try{f(e)}catch(a){g(a)}},cacheRequests:d,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})(Li({},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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,oa);return v(r,Li({},o,{ref:this.refCallback},"svg"===r?{xmlns:ia,xmlnsXlink:aa}:{}),this.state.isLoading&&n&&v(n,null),this.state.hasError&&t&&v(t,null))},t}(S);sa.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"},sa.propTypes={afterInjection:ra.func,beforeInjection:ra.func,desc:ra.string,evalScripts:ra.oneOf(["always","once","never"]),fallback:ra.oneOfType([ra.func,ra.object,ra.string]),httpRequestWithCredentials:ra.bool,loading:ra.oneOfType([ra.func,ra.object,ra.string]),onError:ra.func,renumerateIRIElements:ra.bool,src:ra.string.isRequired,title:ra.string,useRequestCache:ra.bool,wrapper:ra.oneOf(["div","span","svg"])};const la=e=>{const{fetchAssessments:t,getOffers:n,hostInformation:{experiment:r,treatment:o}}=Zn(fo),[i,a]=zn(void 0),[s,l]=zn("fetching-offers"),[c,u]=zn([]),{trace:d}=So();Ri((()=>{(async()=>{await Pi(5e3),await t();const e=n().map((e=>({name:e.content.productName,url:e.content.iconUrl})));u(e),l("displaying-offers-one-by-one");for(let t=0;t<e.length;t++)a(t),await Pi(1e3);await Pi(1e3),l("scaling-up-offers"),await Pi(1e3),l("set-up-benefits")})()}));const p=Gn((()=>{switch(s){case"fetching-offers":case"displaying-offers-one-by-one":case"scaling-up-offers":return"Personalising your benefits plan";case"set-up-benefits":return"Your Benefits Plan"}}),[s]),f=Gn((()=>{switch(s){case"fetching-offers":return"Finding benefits...";case"displaying-offers-one-by-one":case"scaling-up-offers":return 0===i?"1 benefit found that matches your profile":`${i+1} benefits found that match your profile`;case"set-up-benefits":return"Based on your profile, your are eligible to enrol in these benefits"}}),[s,i]),m=Gn((()=>"fetching-offers"===s),[s]),h=Gn((()=>"scaling-up-offers"!==s),[s]),g=Gn((()=>"scaling-up-offers"===s||"set-up-benefits"===s),[s]),y=Gn((()=>"set-up-benefits"===s),[s]),_=Gn((()=>"set-up-benefits"===s),[s]);return uo(bi,{children:[uo(bi.Top,{children:uo("div",{className:"flex flex-col gap-4",children:[uo("div",{className:"transition-opacity duration-700 ease-in-out "+(m?"opacity-100":"opacity-0"),children:uo(wo,{size:"lg"})}),uo(Si,{className:"transition-opacity duration-700 ease-in-out "+(h?"opacity-100":"opacity-0"),children:p}),uo(Ei,{className:"transition-opacity duration-700 ease-in-out "+(h?"opacity-100":"opacity-0"),children:f})]})}),uo(bi.Bottom,{children:uo("div",{class:"flex flex-col items-center gap-4",children:[uo(ca,{scaleUp:g,showName:y,icons:c}),uo(xo,{testId:"set_up_benefits_button_next_screen",class:"mt-4 w-full md:w-[240px] transition-opacity duration-700 ease-in-out "+(_?"opacity-100":"hidden opacity-0"),onClickPromise:async()=>{await d("marketplace-started",{experiment:r,treatment:o}),await e.onComplete()},children:"Set up your benefits"})]})})]})},ca=({scaleUp:e,showName:t,icons:n})=>uo("div",{children:[uo("style",{children:"\n .bg-lighter-than-text{\n background-color: hsl(from currentColor h s l / 0.08);\n }\n\n .animate-slide-from-right {\n opacity: 0;\n transform: translateX(400px);\n animation: slide-from-right 1s ease-out forwards;\n }\n\n @keyframes slide-from-right {\n from {\n transform: translateX(400px);\n opacity: 0;\n }\n to {\n transform: translateX(0);\n opacity: 1;\n }\n }\n "}),uo("div",{className:"flex gap-4 transition-scale transition-margin duration-700 ease-in-out "+(e?"scale-150 m-4":"scale-100"),children:n.map(((e,n)=>uo("div",{className:"mt-4 flex flex-col gap-1 items-center text-primary-base text-[0.5rem] w-12 max-w-12 min-w-12 animate-slide-from-right",style:{animationDelay:1e3*n+"ms"},children:[uo(sa,{src:e.url,wrapper:"svg",className:"w-10 h-10 max-h-10 max-w-10 min-h-10 min-w-10 p-2.5 rounded-lg bg-lighter-than-text",beforeInjection:e=>{var t;e.removeAttribute("width"),e.removeAttribute("height"),null==(t=e.querySelector("path"))||t.removeAttribute("fill"),e.setAttribute("fill","currentColor")}}),uo("p",{className:"transition-opacity duration-700 ease-in-out "+(t?"opacity-100":"opacity-0"),children:e.name})]},e.name)))})]});var ua=(e=>(e[e.PHONE_NUMBER=0]="PHONE_NUMBER",e[e.OTP=1]="OTP",e[e.SUCCESS=2]="SUCCESS",e))(ua||{});const da=({className:e,children:t,...n})=>uo("label",{class:`text-base text-gray-600 ${e??""}`,...n,children:t}),pa=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"})),fa=({className:e,onClick:t,...n})=>{const[r,o]=zn(!1);return uo("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:Yn((()=>{if(!r)return o(!0),t().finally((()=>{o(!1)}))}),[r,t]),...n,children:[uo("div",{class:"relative "+(r?"invisible":""),children:n.children}),r&&uo("div",{class:"absolute",children:uo(wo,{theme:"primary"})})]})},ma=({className:e,allowedKeyPattern:t,onChange:n,value:r,leadingIconElement:o,trailingIconElement:i,...a})=>{const s=Yn((e=>{t.test(e.key)||e.preventDefault()}),[t]);return uo(C,{children:uo("div",{class:"relative",children:[o,uo("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]})})},ha=e=>e.replace(/ /g,""),ga=e=>{const t=ha(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)},ya=({phoneNumber:e,onSubmit:t,onDecline:n})=>{const{hostInformation:{workflowsJourneyType:r}}=Zn(fo),[o,i]=zn(""),{setPhoneNumber:a,phoneNumber:s}=(e=>{const{identity:t}=Zn(fo),[n,r]=zn((()=>e&&ga(e)?e:"")),o=Gn((()=>ga(n)),[n]),i=Gn((()=>ha(n)),[n]),a=Gn((()=>i.startsWith("04")?`+61${i.replace(/^0+/,"")}`:i.startsWith("614")?`+${i}`:i),[i]),s=Gn((()=>(e=>{let t=0;return"#### ### ### ### ### ### ###".replace(/#/g,(()=>e[t++]??"")).trim()})(i)),[i]),l=Gn((()=>ga(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]=zn(s.isVerified),u=Yn((()=>{i("")}),[]),d=Yn((()=>{const e=s.valid?"":"Please enter a valid Australian mobile number beginning with 04.";i(e),c(s.isVerified)}),[s.isVerified,s.valid]),p=Yn((async()=>{s.valid&&await t(s).catch(i)}),[s,t]),f=Yn((async()=>{c(!1)}),[]),m=uo("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 ",uo(pa,{})]});return uo(bi,{children:[uo(bi.Top,{children:uo("div",{className:"flex flex-col gap-5",children:[uo(Si,{children:"Join your workplace benefits program"}),uo(Ei,{children:[s.isVerified?"Confirm ":"Enter "," your ",uo("b",{children:"personal"})," mobile number to finish setting up your Flare Benefits account linked to your workplace"]})]})}),uo(bi.Bottom,{children:uo("div",{className:"mt-5 md:w-[300px] text-left",children:[uo(da,{className:"font-medium text-sm text-gray-900 text-left",children:"Australian Mobile Number"}),uo(ma,{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:u,onfocusout:d,trailingIconElement:l&&m,disabled:l}),0!==o.length&&uo("div",{className:"h-8 leading-none",children:uo("span",{className:"text-xs text-rose-500",children:o})}),l&&uo("div",{className:"mt-2 ml-2 mb-2 leading-none",children:uo("span",{className:"text-xs",children:["Not your personal number?",uo(fa,{class:"text-blue-500",onClick:f,children:"Change number"})]})}),uo("div",{children:uo("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"," ",uo("a",{href:"https://www.flarehr.com/flare-app-terms-and-conditions/",target:"_blank",rel:"noreferrer",children:" Terms of Use "}),"and",uo("a",{href:"https://www.flarehr.com/privacy-policy/",target:"_blank",rel:"noreferrer",children:" Privacy Policy"}),"."," "]})}),uo(xo,{testId:"sign_in_mobile_number_button_send_otp",class:"mt-5 md:w-full",onClickPromise:p,children:"Join your workplace"}),r!==ne.AppInvite&&uo(xo,{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"})]})})]})},_a=""+("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),ba=({onContinue:e})=>{const{featureFlags:{marketplaceScheme:t},hostInformation:{experiment:n,treatment:r}}=Zn(fo),{trace:o}=So(),i=Gn((()=>"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]),a=Yn((async()=>{"allowance"!==t.scheme&&await o("marketplace-started",{experiment:n,treatment:r}),e()}),[n,t.scheme,e,o,r]);return qn((()=>{if("allowance"===t.scheme){const t=setTimeout(e,3e3);return()=>clearTimeout(t)}}),[t,e]),uo(bi,{children:[uo(bi.Top,{children:uo("img",{src:_a,className:"h-16 w-16"})}),uo(bi.Bottom,{children:uo("div",{className:"mt-5 flex flex-col items-center gap-5 text-center",children:[uo(Si,{children:i.title}),uo(Ei,{children:i.description}),!i.isNextButtonHidden&&uo(xo,{testId:"sign_in_success_button_next_screen",class:"mt-5 w-full md:w-[240px]",onClickPromise:a,children:"Set up your benefits"})]})})]})},wa=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"})),va=({open:e})=>uo(bo,{open:e,children:uo(_o,{children:uo("div",{className:"flex flex-col gap-5 items-center justify-center text-center",children:[uo(wo,{size:"lg"}),uo(Si,{children:"Creating your account"}),uo("div",{children:[uo(Ei,{children:"This can take up to 30 seconds."}),uo(Ei,{children:"Please don't navigate away or refresh your browser."})]})]})})}),xa=({phoneNumber:e,onVerify:t,onResendOtp:n,onGoBack:r})=>{const{otp:o,setOtp:i}=(()=>{const[e,t]=zn("");return{otp:{valid:Gn((()=>6===e.length),[e.length]),code:e},setOtp:t}})(),[a,s]=zn(!1),[l,c]=zn(""),{countdown:u,restart:d}=(e=>{const[t,n]=zn(e),r=Vn(),o=Yn((()=>{clearInterval(r.current)}),[]);return qn((()=>o),[o]),{countdown:t,restart:Yn((()=>{let t=e;clearInterval(r.current),r.current=setInterval((()=>{t<0?clearInterval(r.current):n(t--)}),1e3)}),[e])}})(60);qn(d,[d]);const p=Yn((()=>(s(!0),c(""),t(o.code).catch(c).finally((()=>{s(!1)})))),[t,o.code]),f=Yn((()=>(c(""),n().then(d).catch(c))),[n,d]);return uo(C,{children:[uo(va,{open:a}),uo(bi,{children:[uo(bi.Top,{children:uo("div",{className:"flex flex-col gap-5",children:[uo(Si,{children:"Verify your mobile number"}),uo(Ei,{children:["An SMS verification code has been sent to the number ",e,"."]})]})}),uo(bi.Bottom,{children:uo("div",{className:"mt-5 md:w-[300px] text-left",children:[uo(da,{className:"font-medium text-sm text-gray-900 text-left",children:"Enter your verification code"}),uo(ma,{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&&uo("span",{className:"text-xs text-rose-500",children:l}),uo("p",{class:"mt-2 text-center text-xs text-gray-600 disabled:opacity-75 ",children:["Didn't get the code?",uo(fa,{disabled:0!==u,className:"underline mx-2 disabled:text-gray-600 disabled:hover:bg-transparent disabled:cursor-text disabled:px-0",onClick:f,children:"Resend SMS"}),0!==u&&uo(C,{children:["in ",u," secs"]})]}),uo(xo,{testId:"sign_in_otp_button_verify_otp",class:"mt-5 md:w-full",disabled:!o.valid,onClickPromise:p,children:"Continue"}),uo(xo,{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:uo("span",{className:"flex gap-3",children:[uo(wa,{}),"Back"]})})]})})]})]})},ka=({phoneNumber:e,onSignUp:t,onVerify:n,onResendOtp:r,onSuccess:o,onDecline:i})=>{const{trace:a}=So(),[s,l]=zn(e??""),{step:c,goBack:u,goToStep:d}=(()=>{const[e,t]=zn(0),n=Yn((()=>{const n=e-1;n>=0&&t(n)}),[e]),r=Yn((e=>{e<=2&&t(e)}),[]);return{step:e,goBack:n,goToStep:r}})();qn((()=>{(async()=>{await a("sign-up-viewed")})()}),[a]);const p=Yn((e=>t(e.formatted).then((async t=>{l(e.masked),t.isVerificationRequired?d(ua.OTP):(await a("sign-up-completed"),d(ua.SUCCESS))}))),[d,t,a]),f=Yn((()=>a("sign-up-declined").then(i)),[i,a]),m=Yn((e=>n(e).then((async()=>{await a("sign-up-completed"),d(ua.SUCCESS)}))),[d,n,a]);return uo(C,{children:[c===ua.PHONE_NUMBER&&uo(ya,{phoneNumber:s,onSubmit:p,onDecline:f}),c===ua.OTP&&uo(xa,{phoneNumber:s,onVerify:m,onResendOtp:r,onGoBack:u}),c===ua.SUCCESS&&uo(ba,{onContinue:o})]})};var Ca=(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))(Ca||{});const Sa=e=>{var t;const n=null==(t=null==e?void 0:e.response)?void 0:t.data;throw Ca[null==n?void 0:n.code]??"Sorry, we are currently experiencing some issues. Please try again later."},Ea=({onSuccess:e,onDecline:t})=>{const{identity:{phoneNumber:n}}=Zn(fo),{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(Sa)},resendOtp:async()=>{await vn.backend.getClient().post("auth/resend").catch(Sa)}};return uo(C,{children:uo(ka,{phoneNumber:n,onSignUp:r,onVerify:o,onResendOtp:i,onSuccess:e,onDecline:t})})},Na=""+("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),Ta=e=>{const{trace:t}=So(),{hostInformation:{experiment:n,treatment:r}}=Zn(fo);return qn((()=>{t("benefits-setup-started",{experiment:n,treatment:r})}),[n,t,r]),uo(bi,{children:[uo(bi.Top,{children:uo("img",{class:"max-w-[30rem] w-full",src:Na})}),uo(bi.Bottom,{children:uo("div",{children:[uo("h3",{class:"mt-8 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:"Finish setting up your workplace benefits"}),uo("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."}),uo(xo,{testId:"introduction_button_next_screen",class:"mt-8",onClickPromise:async()=>{e.onStepComplete()},children:"Continue"})]})})]})},Aa=({visible:e,children:t})=>{const n=Vn(e);return e&&!n.current&&(n.current=!0),n.current?uo("div",{hidden:!e,children:t}):null},Oa=({icon:e})=>"string"==typeof e?uo(sa,{src:e,wrapper:"svg",className:"w-10 h-10 max-h-10 max-w-10 min-h-10 min-w-10 p-2.5 rounded-lg bg-lighter-than-text",beforeInjection:e=>{var t;e.removeAttribute("width"),e.removeAttribute("height"),null==(t=e.querySelector("path"))||t.removeAttribute("fill"),e.setAttribute("fill","currentColor")}}):uo("div",{className:"w-10 h-10 max-h-10 max-w-10 min-h-10 min-w-10 p-2.5 rounded-lg bg-lighter-than-text",children:e}),Ra=({label:e,icon:t})=>uo("div",{className:"flex flex-col gap-1 items-center w-12 max-w-12 min-w-12",children:[t,uo("p",{className:"max-h-10 max-w-20 break-words text-ellipsis overflow-hidden line-clamp-2",children:e})]}),Pa=({children:e})=>uo(C,{children:e}),La=({selectedIndex:e,onChange:t,children:n})=>{const r=Gn((()=>fr.toArray(n).filter((e=>e.type===Ra))),[n]),o=Gn((()=>fr.toArray(n).filter((e=>e.type===Pa))),[n]);return Ri((()=>{o.length>0&&(null==t||t(0))})),uo("div",{children:[uo("div",{className:"flex items-baseline gap-8 md:mb-4",children:[uo("style",{children:"\n .bg-lighter-than-text{\n background-color: hsl(from currentColor h s l / 0.08);\n }\n "}),r.map(((n,r)=>uo("div",{onClick:()=>null==t?void 0:t(r),className:`\n text-sm font-medium cursor-auto h-full relative\n flex items-center justify-center\n ${r===e?"text-primary-base":"text-gray-400"}\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)=>uo(Aa,{visible:n===e,children:t},t.key)))]})},Ia=()=>uo("div",{class:"flex justify-center",children:uo(wo,{size:"lg"})}),Ua=(Fa=e=>{var t,n,r;const{featureFlags:{marketplaceScheme:o},hostInformation:i,offersProgress:{canOfferSkipToEstimate:a}}=Zn(fo),{trace:s}=So(),l=Vn(null);return Ri((()=>{s({type:"offer-viewed",offerName:e.marketPlaceOffer.name,data:e.marketPlaceOffer.metadata},{experiment:e.marketPlaceOffer.metadata.featureName,treatment:e.marketPlaceOffer.metadata.treatmentName}),l.current&&(l.current.terms=e.marketPlaceOffer.content.terms,l.current.details=e.marketPlaceOffer.content.details,l.current["on-accept"]=async()=>{await s({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})},l.current["on-decline"]=async()=>{await s({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)},l.current["on-complete"]=()=>e.onStepComplete(!0,!0),l.current["on-skip"]=e.marketPlaceOffer.content.skipButtonHidden?void 0:()=>e.onStepComplete(!0,!1))})),uo("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","skip-to-completion":a(e.marketPlaceOffer.name),ref:l})},e=>{const t=Vn(null),[n,r]=zn(),[o,i]=zn(!1);return qn((()=>{(async()=>{const e=await xn.workplaceBackend.getIdToken();r(e)})(),(()=>{if(t.current&&!t.current.querySelector("script[data-injected]")){const e=document.createElement("script"),n=ho(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)})()}),[]),uo("div",{ref:t,className:n,children:n&&o?uo(Fa,{...e,accessToken:n}):uo(Ia,{})})});var Fa;const Ba=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
- /*! @license DOMPurify 3.2.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.2.6/LICENSE */,{entries:ja,setPrototypeOf:Ma,isFrozen:Da,getPrototypeOf:za,getOwnPropertyDescriptor:Ha}=Object;let{freeze:qa,seal:Wa,create:Va}=Object,{apply:$a,construct:Ga}="undefined"!=typeof Reflect&&Reflect;qa||(qa=function(e){return e}),Wa||(Wa=function(e){return e}),$a||($a=function(e,t,n){return e.apply(t,n)}),Ga||(Ga=function(e,t){return new e(...t)});const Ya=cs(Array.prototype.forEach),Za=cs(Array.prototype.lastIndexOf),Ja=cs(Array.prototype.pop),Xa=cs(Array.prototype.push),Ka=cs(Array.prototype.splice),Qa=cs(String.prototype.toLowerCase),es=cs(String.prototype.toString),ts=cs(String.prototype.match),ns=cs(String.prototype.replace),rs=cs(String.prototype.indexOf),os=cs(String.prototype.trim),is=cs(Object.prototype.hasOwnProperty),as=cs(RegExp.prototype.test),ss=(ls=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ga(ls,t)});var ls;function cs(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return $a(e,t,r)}}function us(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Qa;Ma&&Ma(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(Da(t)||(t[r]=e),o=e)}e[o]=!0}return e}function ds(e){for(let t=0;t<e.length;t++){is(e,t)||(e[t]=null)}return e}function ps(e){const t=Va(null);for(const[n,r]of ja(e)){is(e,n)&&(Array.isArray(r)?t[n]=ds(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=ps(r):t[n]=r)}return t}function fs(e,t){for(;null!==e;){const n=Ha(e,t);if(n){if(n.get)return cs(n.get);if("function"==typeof n.value)return cs(n.value)}e=za(e)}return function(){return null}}const ms=qa(["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"]),hs=qa(["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"]),gs=qa(["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"]),ys=qa(["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"]),_s=qa(["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"]),bs=qa(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ws=qa(["#text"]),vs=qa(["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"]),xs=qa(["accent-height","accumulate","additive","alignment-baseline","amplitude","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","exponent","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","intercept","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","slope","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","tablevalues","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"]),ks=qa(["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"]),Cs=qa(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ss=Wa(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Es=Wa(/<%[\w\W]*|[\w\W]*%>/gm),Ns=Wa(/\$\{[\w\W]*/gm),Ts=Wa(/^data-[\-\w.\u00B7-\uFFFF]+$/),As=Wa(/^aria-[\-\w]+$/),Os=Wa(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Rs=Wa(/^(?:\w+script|data):/i),Ps=Wa(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ls=Wa(/^html$/i),Is=Wa(/^[a-z][.\w]*(-[.\w]+)+$/i);var Us=Object.freeze({__proto__:null,ARIA_ATTR:As,ATTR_WHITESPACE:Ps,CUSTOM_ELEMENT:Is,DATA_ATTR:Ts,DOCTYPE_NAME:Ls,ERB_EXPR:Es,IS_ALLOWED_URI:Os,IS_SCRIPT_OR_DATA:Rs,MUSTACHE_EXPR:Ss,TMPLIT_EXPR:Ns});const Fs=1,Bs=3,js=7,Ms=8,Ds=9;var zs=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.2.6",n.removed=[],!t||!t.document||t.document.nodeType!==Ds||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const o=r,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:f,trustedTypes:m}=t,h=c.prototype,g=fs(h,"cloneNode"),y=fs(h,"remove"),_=fs(h,"nextSibling"),b=fs(h,"childNodes"),w=fs(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:S,getElementsByTagName:E}=r,{importNode:N}=o;let T={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof ja&&"function"==typeof w&&k&&void 0!==k.createHTMLDocument;const{MUSTACHE_EXPR:A,ERB_EXPR:O,TMPLIT_EXPR:R,DATA_ATTR:P,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:I,ATTR_WHITESPACE:U,CUSTOM_ELEMENT:F}=Us;let{IS_ALLOWED_URI:B}=Us,j=null;const M=us({},[...ms,...hs,...gs,..._s,...ws]);let D=null;const z=us({},[...vs,...xs,...ks,...Cs]);let H=Object.seal(Va(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=us({},["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 ue=null;const de=us({},["audio","video","img","source","image","track"]);let pe=null;const fe=us({},["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=us({},[me,he,ge],es);let ve=us({},["mi","mo","mn","ms","mtext"]),xe=us({},["annotation-xml"]);const ke=us({},["title","style","font","a","script"]);let Ce=null;const Se=["application/xhtml+xml","text/html"];let Ee=null,Ne=null;const Te=r.createElement("form"),Ae=function(e){return e instanceof RegExp||e instanceof Function},Oe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ne||Ne!==e){if(e&&"object"==typeof e||(e={}),e=ps(e),Ce=-1===Se.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ee="application/xhtml+xml"===Ce?es:Qa,j=is(e,"ALLOWED_TAGS")?us({},e.ALLOWED_TAGS,Ee):M,D=is(e,"ALLOWED_ATTR")?us({},e.ALLOWED_ATTR,Ee):z,be=is(e,"ALLOWED_NAMESPACES")?us({},e.ALLOWED_NAMESPACES,es):we,pe=is(e,"ADD_URI_SAFE_ATTR")?us(ps(fe),e.ADD_URI_SAFE_ATTR,Ee):fe,ue=is(e,"ADD_DATA_URI_TAGS")?us(ps(de),e.ADD_DATA_URI_TAGS,Ee):de,le=is(e,"FORBID_CONTENTS")?us({},e.FORBID_CONTENTS,Ee):ce,q=is(e,"FORBID_TAGS")?us({},e.FORBID_TAGS,Ee):ps({}),W=is(e,"FORBID_ATTR")?us({},e.FORBID_ATTR,Ee):ps({}),se=!!is(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,B=e.ALLOWED_URI_REGEXP||Os,ye=e.NAMESPACE||ge,ve=e.MATHML_TEXT_INTEGRATION_POINTS||ve,xe=e.HTML_INTEGRATION_POINTS||xe,H=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ae(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ae(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&&(j=us({},ws),D=[],!0===se.html&&(us(j,ms),us(D,vs)),!0===se.svg&&(us(j,hs),us(D,xs),us(D,Cs)),!0===se.svgFilters&&(us(j,gs),us(D,xs),us(D,Cs)),!0===se.mathMl&&(us(j,_s),us(D,ks),us(D,Cs))),e.ADD_TAGS&&(j===M&&(j=ps(j)),us(j,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(D===z&&(D=ps(D)),us(D,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&us(pe,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ce&&(le=ps(le)),us(le,e.FORBID_CONTENTS,Ee)),ie&&(j["#text"]=!0),X&&us(j,["html","head","body"]),j.table&&(us(j,["tbody"]),delete q.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw ss('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw ss('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(""));qa&&qa(e),Ne=e}},Re=us({},[...hs,...gs,...ys]),Pe=us({},[..._s,...bs]),Le=function(e){Xa(n.removed,{element:e});try{w(e).removeChild(e)}catch(t){y(e)}},Ie=function(e,t){try{Xa(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(r){Xa(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{Le(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=ts(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ce&&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,Ce)}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?E.call(t,X?"html":"body")[0]:X?t.documentElement:i},Fe=function(e){return C.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Be=function(e){return e instanceof p&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},je=function(e){return"function"==typeof l&&e instanceof l};function Me(e,t,r){Ya(e,(e=>{e.call(n,t,r,Ne)}))}const De=function(e){let t=null;if(Me(T.beforeSanitizeElements,e,null),Be(e))return Le(e),!0;const r=Ee(e.nodeName);if(Me(T.uponSanitizeElement,e,{tagName:r,allowedTags:j}),J&&e.hasChildNodes()&&!je(e.firstElementChild)&&as(/<[/\w!]/g,e.innerHTML)&&as(/<[/\w!]/g,e.textContent))return Le(e),!0;if(e.nodeType===js)return Le(e),!0;if(J&&e.nodeType===Ms&&as(/<[/\w]/g,e.data))return Le(e),!0;if(!j[r]||q[r]){if(!q[r]&&He(r)){if(H.tagNameCheck instanceof RegExp&&as(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 Le(e),!0}return e instanceof c&&!function(e){let t=w(e);t&&t.tagName||(t={namespaceURI:ye,tagName:"template"});const n=Qa(e.tagName),r=Qa(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===he?t.namespaceURI===ge?"svg"===n:t.namespaceURI===me?"svg"===n&&("annotation-xml"===r||ve[r]):Boolean(Re[n]):e.namespaceURI===me?t.namespaceURI===ge?"math"===n:t.namespaceURI===he?"math"===n&&xe[r]:Boolean(Pe[n]):e.namespaceURI===ge?!(t.namespaceURI===he&&!xe[r])&&!(t.namespaceURI===me&&!ve[r])&&!Pe[n]&&(ke[n]||!Re[n]):!("application/xhtml+xml"!==Ce||!be[e.namespaceURI]))}(e)?(Le(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!as(/<\/no(script|embed|frames)/i,e.innerHTML)?(Z&&e.nodeType===Bs&&(t=e.textContent,Ya([A,O,R],(e=>{t=ns(t,e," ")})),e.textContent!==t&&(Xa(n.removed,{element:e.cloneNode()}),e.textContent=t)),Me(T.afterSanitizeElements,e,null),!1):(Le(e),!0)},ze=function(e,t,n){if(re&&("id"===t||"name"===t)&&(n in r||n in Te))return!1;if($&&!W[t]&&as(P,t));else if(V&&as(L,t));else if(!D[t]||W[t]){if(!(He(e)&&(H.tagNameCheck instanceof RegExp&&as(H.tagNameCheck,e)||H.tagNameCheck instanceof Function&&H.tagNameCheck(e))&&(H.attributeNameCheck instanceof RegExp&&as(H.attributeNameCheck,t)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(t))||"is"===t&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&as(H.tagNameCheck,n)||H.tagNameCheck instanceof Function&&H.tagNameCheck(n))))return!1}else if(pe[t]);else if(as(B,ns(n,U,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==rs(n,"data:")||!ue[e]){if(G&&!as(I,ns(n,U,"")));else if(n)return!1}else;return!0},He=function(e){return"annotation-xml"!==e&&ts(e,F)},qe=function(e){Me(T.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Be(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:D,forceKeepAttr:void 0};let o=t.length;for(;o--;){const a=t[o],{name:s,namespaceURI:l,value:c}=a,u=Ee(s),d=c;let p="value"===s?d:os(d);if(r.attrName=u,r.attrValue=p,r.keepAttr=!0,r.forceKeepAttr=void 0,Me(T.uponSanitizeAttribute,e,r),p=r.attrValue,!oe||"id"!==u&&"name"!==u||(Ie(s,e),p="user-content-"+p),J&&as(/((--!?|])>)|<\/(style|title)/i,p)){Ie(s,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Ie(s,e);continue}if(!Y&&as(/\/>/i,p)){Ie(s,e);continue}Z&&Ya([A,O,R],(e=>{p=ns(p,e," ")}));const f=Ee(e.nodeName);if(ze(f,u,p)){if(v&&"object"==typeof m&&"function"==typeof m.getAttributeType)if(l);else switch(m.getAttributeType(f,u)){case"TrustedHTML":p=v.createHTML(p);break;case"TrustedScriptURL":p=v.createScriptURL(p)}if(p!==d)try{l?e.setAttributeNS(l,s,p):e.setAttribute(s,p),Be(e)?Le(e):Ja(n.removed)}catch(i){Ie(s,e)}}else Ie(s,e)}Me(T.afterSanitizeAttributes,e,null)},We=function e(t){let n=null;const r=Fe(t);for(Me(T.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)Me(T.uponSanitizeShadowNode,n,null),De(n),qe(n),n.content instanceof a&&e(n.content);Me(T.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&&!je(e)){if("function"!=typeof e.toString)throw ss("toString is not a function");if("string"!=typeof(e=e.toString()))throw ss("dirty is not a string, aborting")}if(!n.isSupported)return e;if(K||Oe(t),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!j[t]||q[t])throw ss("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===Fs&&"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&&Le(r.firstChild);const u=Fe(ae?e:r);for(;s=u.nextNode();)De(s),qe(s),s.content instanceof a&&We(s.content);if(ae)return e;if(ee){if(te)for(c=S.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(D.shadowroot||D.shadowrootmode)&&(c=N.call(o,c,!0)),c}let d=X?r.outerHTML:r.innerHTML;return X&&j["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&as(Ls,r.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+d),Z&&Ya([A,O,R],(e=>{d=ns(d,e," ")})),v&&ne?v.createHTML(d):d},n.setConfig=function(){Oe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),K=!0},n.clearConfig=function(){Ne=null,K=!1},n.isValidAttribute=function(e,t,n){Ne||Oe({});const r=Ee(e),o=Ee(t);return ze(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&Xa(T[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=Za(T[e],t);return-1===n?void 0:Ka(T[e],n,1)[0]}return Ja(T[e])},n.removeHooks=function(e){T[e]=[]},n.removeAllHooks=function(){T={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const Hs=({children:e})=>{const t=ao.Children.toArray(e),n=t.find((e=>e.type===qs)),r=t.find((e=>e.type===Ws));return uo(_i,{appear:!0,show:!0,enter:"transition duration-700 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",children:uo("div",{class:"md:grid md:grid-cols-2 max-w-[59.5rem] mx-auto",children:[uo(_i,{appear:!0,show:!0,enter:"transition duration-700 ease-out md:transition-none",enterFrom:"-translate-y-6",enterTo:"translate-y-0",children:n&&uo("div",{class:"flex items-center h-full",children:n})}),uo(_i,{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&&uo("div",{class:"flex items-center h-full",children:r})})]})})},qs=({children:e})=>uo(C,{children:e}),Ws=({children:e})=>uo(C,{children:e});Hs.Left=qs,Hs.Right=Ws;const Vs=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"})),$s=e=>uo(_i,{appear:!0,show:!0,enter:"transition duration-300 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",children:uo("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)=>uo("div",{class:"flex space-x-1",children:[uo("span",{children:uo(Ni,{class:"h-5 w-5 fill-primary-base"})}),uo("span",{class:"text-sm leading-5 text-gray-600",children:e})]},t)))})}),Gs=e=>{const[t,n]=zn(!1);return uo("div",{class:e.class,children:t?uo($s,{items:e.items}):uo("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",uo("span",{class:"ml-1",children:uo(Vs,{class:"h-4 w-4"})})]})})},Ys=e=>{var t,n,r,o;const{featureFlags:{marketplaceScheme:i}}=Zn(fo),{trace:a}=So(),[s,l]=zn(!1);Ri((()=>{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 uo(Hs,{children:[uo(Hs.Left,{children:uo("div",{children:uo(_i,{appear:!0,show:!0,enter:"transition duration-700 ease-out md:transition-none",enterFrom:"-translate-y-6",enterTo:"translate-y-0",children:uo("div",{children:[uo("img",{class:"mt-4 max-w-full w-full mx-auto md:hidden",src:e.step.content.mobileImageUrl,loading:"lazy"}),uo("div",{class:"md:max-w-[27.5rem]",children:[uo("h3",{class:"mt-8 md:mt-3 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:e.step.content.title}),uo("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&&uo("div",{class:"mt-6 hidden md:block",children:uo($s,{items:e.step.content.details})})]}),e.step.content.details&&uo(Gs,{class:"mt-6 md:hidden",items:e.step.content.details}),"allowance"===i.scheme&&"offer"==(null==(t=e.step.content.specialBanner)?void 0:t.type)&&uo(ko,{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:uo("div",{children:[uo("p",{className:"font-semibold text-lg leading-tight text-gray-900",children:e.step.content.specialBanner.title}),uo("span",{className:"font-normal text-sm text-gray-900",children:e.step.content.specialBanner.subtitle})]})}),e.children&&e.children,uo("div",{class:"flex flex-col md:flex-row md:justify-between gap-4 md:max-w-[27.5rem] mt-6 md:mt-11",children:[uo(xo,{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)&&uo(xo,{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&&uo("p",{className:"mt-6 text-xs",children:[uo("span",{children:"*"}),uo("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&&uo(bo,{open:s,children:[uo(yo,{children:uo("div",{className:"relative",children:[uo("h3",{className:"text-base font-semibold text-gray-900",children:"Terms & Conditions"}),uo("span",{className:"absolute top-0 right-0 p-1 rounded-full bg-gray-200 cursor-pointer hover:bg-gray-100",onClick:()=>l(!1),children:uo(Ba,{className:"h-4 min-h-4 max-h-4 w-4 min-w-4 max-w-4"})})]})}),uo(_o,{children:uo("div",{class:"flex flex-col gap-3 mt-6 text-gray-600 text-xs",children:e.step.content.terms.map(((e,t)=>uo("span",{dangerouslySetInnerHTML:{__html:zs.sanitize(e,{ADD_ATTR:["target"]})}},t)))})})]})]})})})}),uo(Hs.Right,{children:uo("img",{class:"max-w-[30rem] w-full hidden md:block",src:e.step.content.imageUrl,loading:"lazy"})})]})},Zs=e=>{var t,n,r;const{featureFlags:{marketplaceScheme:o}}=Zn(fo),{trace:i}=So(),[a,s]=zn(!1);Ri((()=>{"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 uo(Hs,{children:[uo(Hs.Left,{children:uo("div",{children:uo(_i,{appear:!0,show:!0,enter:"transition duration-700 ease-out md:transition-none",enterFrom:"-translate-y-6",enterTo:"translate-y-0",children:uo("div",{children:[uo("img",{class:"mt-4 max-w-full w-full mx-auto md:hidden",src:e.step.content.mobileImageUrl,loading:"lazy"}),uo("div",{class:"md:max-w-[27.5rem]",children:[uo("h3",{class:"mt-8 md:mt-3 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:e.step.content.title}),uo("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&&uo("div",{class:"mt-6 hidden md:block",children:uo($s,{items:e.step.content.details})})]}),e.step.content.details&&uo(Gs,{class:"mt-6 md:hidden",items:e.step.content.details}),"allowance"===o.scheme&&"offer"==(null==(t=e.step.content.specialBanner)?void 0:t.type)&&uo(ko,{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:uo("div",{children:[uo("p",{className:"font-semibold text-lg leading-tight text-gray-900",children:e.step.content.specialBanner.title}),uo("span",{className:"font-normal text-sm text-gray-900",children:e.step.content.specialBanner.subtitle})]})}),e.children&&e.children,uo("div",{class:"flex flex-col md:flex-row md:justify-between gap-4 md:max-w-[27.5rem] mt-6 md:mt-11",children:uo(xo,{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&&uo("p",{className:"mt-6 text-xs",children:[uo("span",{children:"*"}),uo("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&&uo(bo,{open:a,children:[uo(yo,{children:uo("div",{className:"relative",children:[uo("h3",{className:"text-base font-semibold text-gray-900",children:"Terms & Conditions"}),uo("span",{className:"absolute top-0 right-0 p-1 rounded-full bg-gray-200 cursor-pointer hover:bg-gray-100",onClick:()=>s(!1),children:uo(Ba,{className:"h-4 min-h-4 max-h-4 w-4 min-w-4 max-w-4"})})]})}),uo(_o,{children:uo("div",{class:"flex flex-col gap-3 mt-6 text-gray-600 text-xs",children:e.step.content.terms.map(((e,t)=>uo("span",{dangerouslySetInnerHTML:{__html:zs.sanitize(e,{ADD_ATTR:["target"]})}},t)))})})]})]})})})}),uo(Hs.Right,{children:uo("img",{class:"max-w-[30rem] w-full hidden md:block",src:e.step.content.imageUrl,loading:"lazy"})})]})},Js=({current:e,total:t})=>uo("div",{className:"flex justify-between md:block text-xs tracking-wide",children:uo("span",{className:"relative px-3 py-0.5 text-primary-base font-semibold",children:[e," OF ",t,uo("span",{className:"absolute left-0 rounded-xl bg-primary-base opacity-10 w-full h-[90%]"})]})}),Xs=e=>{const{getOffers:t,featureFlags:{marketplaceSubNavigation:n},offersProgress:{update:r,isOfferCompleted:o,isOfferProgressed:i}}=Zn(fo),[a,s]=zn(0),{trace:l}=So(),c=Yn(((n,o,i)=>{r(n,o,i),a===t().length-1?e.onComplete():s(a+1)}),[r,a,t,e]),u=Yn((e=>{s(e);const n=t()[e];l({type:"offer-selected",offerName:n.name},{experiment:n.metadata.featureName,treatment:n.metadata.treatmentName})}),[t,l]),d=(e,t,n)=>{const r=i(e);return!!o(e)||(!r||t!==n)&&!!r},p=t();return uo("div",{className:"max-w-[59.5rem] mx-auto",children:[!n&&uo(Js,{current:a+1,total:p.length+1}),uo(La,{selectedIndex:a,onChange:u,children:[n&&p.map(((e,t)=>{var n,r;return uo(Ra,{label:null==(n=e.content)?void 0:n.productName,icon:uo(Oa,{icon:d(e.name,t,a)?uo(Ni,{}):null==(r=e.content)?void 0:r.iconUrl})},e.name)})),p.map((e=>{var t,n,r;return uo(Pa,{children:["Eoi"===(null==(t=e.content)?void 0:t.template)&&uo(Ys,{step:e,primaryButton:{text:e.content.acceptButton,onClick:()=>c(e.name,!0,!0)},secondaryButton:{text:e.content.declineButton,onClick:()=>c(e.name,!1,!1)}}),"Simple"===(null==(n=e.content)?void 0:n.template)&&uo(Zs,{step:e,primaryButton:{text:e.content.acceptButton,onClick:()=>c(e.name,!0,!0)}}),"Assessment"===(null==(r=e.content)?void 0:r.template)&&uo(Ua,{onStepComplete:(t,n)=>c(e.name,t,n),marketPlaceOffer:e},e.name)]},e.name)}))]})]})},Ks=()=>uo("div",{class:"flex justify-center",children:uo(wo,{size:"lg"})}),Qs=(e=>t=>{const n=Vn(null),[r,o]=zn(),[i,a]=zn(!1);return qn((()=>{(async()=>{const e=await xn.workplaceBackend.getIdToken();o(e)})(),(()=>{if(n.current&&!n.current.querySelector("script[data-injected]")){const e=document.createElement("script"),t=ho(xn.workplaceBackend.getBaseUrl());e.type="module",e.src=`https://npm-cdn.flarehr.com/@flarehr/benefits-plan-assessment@${t}/dist/benefits-plan-assessment.js`,e.dataset.injected="true",e.onload=()=>{a(!0)},n.current.appendChild(e)}else a(!0)})()}),[]),uo("div",{ref:n,className:r,children:r&&i?uo(e,{...t,accessToken:r}):uo(Ks,{})})})((e=>{const{hostInformation:t,benefitsPlanPersonalisationAssessmentId:n}=Zn(fo),r=Vn(null);return Ri((()=>{r.current&&(r.current["on-complete"]=e.onComplete)})),uo("benefits-plan-assessment",{"base-url":xn.workplaceBackend.getBaseUrl(),"profile-id":xn.workplaceBackend.getProfileId(),"skip-intro":!0,"skip-more-details":!0,"skip-summary":!0,"access-token":e.accessToken,"assessment-id":n,"track-client":t.client,"track-source":t.source,"track-channel":t.channel,"track-experiment":t.experiment,"track-treatment":t.treatment,"assessment-title":"Tell us a bit about yourself",description:"Answer a few questions to help us set up a personalised benefits plan for you:","vertical-alignment":"items-center",ref:r})})),el=""+("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),tl=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"})),nl=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"})),rl=""+("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),ol=({onComplete:e})=>{const{trace:t}=So(),{identity:n,getIdentityRegistrationStatus:r,hostInformation:{experiment:o,treatment:i}}=Zn(fo);qn((()=>{(async()=>{await t({type:"summary-viewed",data:{summaryVariant:"app"}},{experiment:o,treatment:i})})()}),[o,t,i]);const a={...il(n,r()),imageUrl:el,mobileImageUrl:rl},s={text:"Continue",class:"mt-6 md:mt-14",onClick:async()=>{await t("completed",{experiment:o,treatment:i}),await e()}};return uo(Hs,{children:[uo(Hs.Left,{children:uo("div",{children:[uo("img",{class:"mt-4 max-w-full w-full mx-auto md:hidden",src:a.mobileImageUrl,loading:"lazy"}),uo("div",{class:"md:max-w-[27.5rem]",children:[uo("h3",{class:"mt-8 md:mt-3 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:a.title}),uo("p",{class:"mt-2 text-base md:text-lg leading-6 md:leading-7 text-gray-600 break-words",children:a.description})]}),uo("div",{class:"mt-6 flex space-x-6",children:[uo(tl,{}),uo(nl,{})]}),uo(xo,{testId:"step-benefits-finish",class:s.class,onClickPromise:s.onClick,children:s.text})]})}),uo(Hs.Right,{children:uo("img",{class:"max-w-[30rem] w-full hidden md:block",src:a.imageUrl,loading:"lazy"})})]})},il=(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.`}}},al=""+("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),sl=""+("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),ll=({onComplete:e})=>{const{trace:t}=So(),{getWorkplaceLinkingStatus:n,hostInformation:{experiment:r,treatment:o}}=Zn(fo);qn((()=>{(async()=>{await t({type:"summary-viewed",data:{summaryVariant:"generic"}},{experiment:r,treatment:o})})()}),[r,o,t]);const i={imageUrl:al,mobileImageUrl:sl,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."},a={text:"Continue",class:"mt-6 md:mt-6",onClick:async()=>{await t("completed",{experiment:r,treatment:o}),await e()}};return uo(Hs,{children:[uo(Hs.Left,{children:uo("div",{children:[uo("img",{class:"mt-4 max-w-full w-full mx-auto md:hidden",src:i.mobileImageUrl,loading:"lazy"}),uo("div",{class:"md:max-w-[27.5rem]",children:[uo("h3",{class:"mt-8 md:mt-3 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:i.title}),uo("p",{class:"mt-2 text-base md:text-lg leading-6 md:leading-7 text-gray-600 break-words",children:i.description})]}),uo("div",{class:"flex flex-col md:flex-row md:justify-between gap-4 md:max-w-[27.5rem] mt-6 md:mt-11",children:uo(xo,{testId:"step-benefits-finish",class:a.class,onClickPromise:a.onClick,children:a.text})})]})}),uo(Hs.Right,{children:uo("img",{class:"max-w-[30rem] w-full hidden md:block",src:i.imageUrl,loading:"lazy"})})]})},cl=()=>{const{updateIdentity:e}=Zn(fo),{current:t,goNext:n}=function(){const{isAppEnabled:e,getIdentityRegistrationStatus:t,featureFlags:n}=Zn(fo),r=Gn((()=>"allowance"===n.marketplaceScheme.scheme?["Allowance_JoinBenefits","FlareAppIdentity","BenefitsPersonalisationAssessment","ConfigureBenefits","MarketplaceOffers","Allowance_BenefitsSummary"]:["Introduction","FlareAppIdentity","BenefitsPersonalisationAssessment","ConfigureBenefits","MarketplaceOffers",e?"SummaryApp":"SummaryGeneric"]),[n.marketplaceScheme.scheme,e]),[o,i]=zn(r[0]);qn((()=>{i(r[0])}),[r]);const a=Yn((async()=>{if(r.indexOf(o)===r.length-1){const e=document.querySelector(dl),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}}(),r=Yn((()=>{e(!0),n()}),[n,e]),o=Yn((()=>{e(!1),n()}),[n,e]);switch(t){case"Introduction":return uo(Ta,{onStepComplete:n});case"Allowance_JoinBenefits":return uo(xi,{onContinue:n});case"FlareAppIdentity":return uo(Ea,{onSuccess:r,onDecline:o});case"BenefitsPersonalisationAssessment":return uo(Qs,{onComplete:n});case"ConfigureBenefits":return uo(la,{onComplete:n});case"MarketplaceOffers":return uo(Xs,{onComplete:n});case"Allowance_BenefitsSummary":return uo(Oi,{onContinue:n});case"SummaryApp":return uo(ol,{onComplete:n});case"SummaryGeneric":return uo(ll,{onComplete:n});default:return uo(C,{})}},ul=()=>{const e=Zn(fo);return uo(C,{children:[uo(bo,{open:e.isFetching,children:uo(_o,{children:uo(wo,{size:"lg"})})}),e.isInitialized?uo(cl,{}):uo("div",{className:"fixed flex items-center justify-center top-0 bottom-0 left-0 right-0",children:uo(wo,{size:"lg"})})]})},dl="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]=zn(0);qn((()=>le((()=>{n(t+1)}))),[t]);const r={backendUrl:e["backend-url"],accessToken:e["access-token"],workflowsInstanceId:e["workflows-instance-id"],workflowsJourneyType:e["journey-type"]},o={channel:"onboarding",client:"onboarding",source:(e=>{switch(e){case ne.BenefitsExisting:case ne.AppInvite:return"Invite";default:return"Onboarding"}})(r.workflowsJourneyType),experiment:"onboarding-marketplace-scheme",workflowsJourneyType:r.workflowsJourneyType,workflowsInstanceId:r.workflowsInstanceId};return Sn(r.backendUrl,r.accessToken,o),"prod"===ho(r.backendUrl)&&go.init("p09arvzysr"),uo(C,{children:[uo("style",{children:vo.toString()}),uo("div",{class:"font-inter pt-6 pb-8 md:py-24 px-px",children:uo(mo,{hostInformation:o,children:uo(ul,{})})},t)]})}),dl,[],{shadow:!0})}));
7
+ var Fi=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,Bi=/\\([\u000b\u0020-\u00ff])/g,ji=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,Mi=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(!ji.test(r))throw new TypeError("invalid media type");var o=new Di(r.toLowerCase());if(-1!==n){var i,a,s;for(Fi.lastIndex=n;a=Fi.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(Bi,"$1")),o.parameters[i]=s}if(n!==t.length)throw new TypeError("invalid parameter format")}return o};function Di(e){this.parameters=Object.create(null),this.type=e}var zi=new Map,Hi=function(e){return e.cloneNode(!0)},qi=function(){return"file:"===window.location.protocol},Wi=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=Mi(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(qi()?"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||qi()&&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()},Vi={},$i=function(e,t){Vi[e]=Vi[e]||[],Vi[e].push(t)},Gi=function(e,t,n){if(zi.has(e)){var r=zi.get(e);if(void 0===r)return void $i(e,n);if(r instanceof SVGSVGElement)return void n(null,Hi(r))}zi.set(e,void 0),$i(e,n),Wi(e,t,(function(t,n){var r;t?zi.set(e,t):(null===(r=n.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&zi.set(e,n.responseXML.documentElement),function(e){for(var t=function(t,n){setTimeout((function(){if(Array.isArray(Vi[e])){var n=zi.get(e),r=Vi[e][t];n instanceof SVGSVGElement&&r(null,Hi(n)),n instanceof Error&&r(n),t===Vi[e].length-1&&delete Vi[e]}}),0)},n=0,r=Vi[e].length;n<r;n++)t(n)}(e)}))},Yi=function(e,t,n){Wi(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)}))},Zi=0,Ji=[],Xi={},Ki="http://www.w3.org/1999/xlink",Qi=function(e,t,n,r,o,i,a){var s=e.getAttribute("data-src")||e.getAttribute("src");if(s){if(-1!==Ji.indexOf(e))return Ji.splice(Ji.indexOf(e),1),void(e=null);Ji.push(e),e.setAttribute("src",""),(r?Gi:Yi)(s,o,(function(r,o){if(!o)return Ji.splice(Ji.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 u=e.getAttribute("width");u&&o.setAttribute("width",u);var d=e.getAttribute("height");d&&o.setAttribute("height",d);var p=Array.from(new Set(Ui(Ui(Ui([],(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=_+"-"+ ++Zi,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(Ki,"href");l&&l.toString()==="#"+g[e].id&&i.push(r[a])}for(var c=0,u=i.length;c<u;c++)i[c].setAttributeNS(Ki,"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=[],S=0,E=k.length;S<E;S++)(x=k[S].getAttribute("type"))&&"application/ecmascript"!==x&&"application/javascript"!==x&&"text/javascript"!==x||((v=k[S].innerText||k[S].textContent)&&C.push(v),o.removeChild(k[S]));if(C.length>0&&("always"===t||"once"===t&&!Xi[s])){for(var N=0,T=C.length;N<T;N++)new Function(C[N])(window);Xi[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",Ki),i(o),!e.parentNode)return Ji.splice(Ji.indexOf(e),1),e=null,void a(new Error("Parent node is null"));e.parentNode.replaceChild(o,e),Ji.splice(Ji.indexOf(e),1),e=null,a(null,o)}))}else a(new Error("Invalid data-src or src attribute"))},ea={exports:{}};function ta(){}function na(){}na.resetWarningCache=ta;ea.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:na,resetWarningCache:ta};return n.PropTypes=n,n}();var ra=ea.exports,oa=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],ia="http://www.w3.org/2000/svg",aa="http://www.w3.org/1999/xlink",sa=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,Ii(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,u=o.title,d=o.useRequestCache,p=this.props.onError,f=this.props.beforeInjection,m=this.props.afterInjection,h=this.props.wrapper;"svg"===h?((n=document.createElementNS(ia,h)).setAttribute("xmlns",ia),n.setAttribute("xmlns:xlink",aa),r=document.createElementNS(ia,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,u=void 0===c||c,d=n.evalScripts,p=void 0===d?"never":d,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;_++)Qi(e[_],p,g,u,m,l,(function(t,n){a(t,n),e&&"length"in e&&e.length===++y&&o(y)}));else e?Qi(e,p,g,u,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(u){var r=e.querySelector(":scope > title");r&&e.removeChild(r);var o=document.createElement("title");o.innerHTML=u,e.prepend(o)}try{f(e)}catch(a){g(a)}},cacheRequests:d,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})(Li({},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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,oa);return v(r,Li({},o,{ref:this.refCallback},"svg"===r?{xmlns:ia,xmlnsXlink:aa}:{}),this.state.isLoading&&n&&v(n,null),this.state.hasError&&t&&v(t,null))},t}(S);sa.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"},sa.propTypes={afterInjection:ra.func,beforeInjection:ra.func,desc:ra.string,evalScripts:ra.oneOf(["always","once","never"]),fallback:ra.oneOfType([ra.func,ra.object,ra.string]),httpRequestWithCredentials:ra.bool,loading:ra.oneOfType([ra.func,ra.object,ra.string]),onError:ra.func,renumerateIRIElements:ra.bool,src:ra.string.isRequired,title:ra.string,useRequestCache:ra.bool,wrapper:ra.oneOf(["div","span","svg"])};const la=e=>{const{fetchAssessments:t,getOffers:n,hostInformation:{experiment:r,treatment:o}}=Zn(fo),[i,a]=zn(void 0),[s,l]=zn("fetching-offers"),[c,u]=zn([]),{trace:d}=So();Ri((()=>{(async()=>{await Pi(5e3),await t();const e=n().map((e=>({name:e.content.productName,url:e.content.iconUrl})));u(e),l("displaying-offers-one-by-one");for(let t=0;t<e.length;t++)a(t),await Pi(1e3);await Pi(1e3),l("scaling-up-offers"),await Pi(1e3),l("set-up-benefits")})()}));const p=Gn((()=>{switch(s){case"fetching-offers":case"displaying-offers-one-by-one":case"scaling-up-offers":return"Personalising your benefits plan";case"set-up-benefits":return"Your Benefits Plan"}}),[s]),f=Gn((()=>{switch(s){case"fetching-offers":return"Finding benefits...";case"displaying-offers-one-by-one":case"scaling-up-offers":return 0===i?"1 benefit found that matches your profile":`${i+1} benefits found that match your profile`;case"set-up-benefits":return"Based on your profile, these are the benefits available to you"}}),[s,i]),m=Gn((()=>"fetching-offers"===s),[s]),h=Gn((()=>"scaling-up-offers"!==s),[s]),g=Gn((()=>"scaling-up-offers"===s||"set-up-benefits"===s),[s]),y=Gn((()=>"set-up-benefits"===s),[s]),_=Gn((()=>"set-up-benefits"===s),[s]);return uo(bi,{children:[uo(bi.Top,{children:uo("div",{className:"flex flex-col gap-4",children:[uo("div",{className:"transition-opacity duration-700 ease-in-out "+(m?"opacity-100":"opacity-0"),children:uo(wo,{size:"lg"})}),uo(Si,{className:"transition-opacity duration-700 ease-in-out "+(h?"opacity-100":"opacity-0"),children:p}),uo(Ei,{className:"transition-opacity duration-700 ease-in-out "+(h?"opacity-100":"opacity-0"),children:f})]})}),uo(bi.Bottom,{children:uo("div",{class:"flex flex-col items-center gap-4",children:[uo(ca,{scaleUp:g,showName:y,icons:c}),uo(xo,{testId:"set_up_benefits_button_next_screen",class:"mt-4 w-full md:w-[240px] transition-opacity duration-700 ease-in-out "+(_?"opacity-100":"hidden opacity-0"),onClickPromise:async()=>{await d("marketplace-started",{experiment:r,treatment:o}),await e.onComplete()},children:"Set up your benefits"})]})})]})},ca=({scaleUp:e,showName:t,icons:n})=>uo("div",{children:[uo("style",{children:"\n .bg-lighter-than-text{\n background-color: hsl(from currentColor h s l / 0.08);\n }\n\n .animate-slide-from-right {\n opacity: 0;\n transform: translateX(400px);\n animation: slide-from-right 1s ease-out forwards;\n }\n\n @keyframes slide-from-right {\n from {\n transform: translateX(400px);\n opacity: 0;\n }\n to {\n transform: translateX(0);\n opacity: 1;\n }\n }\n "}),uo("div",{className:"flex gap-4 transition-scale transition-margin duration-700 ease-in-out "+(e?"scale-150 m-4":"scale-100"),children:n.map(((e,n)=>uo("div",{className:"mt-4 flex flex-col gap-1 items-center text-primary-base text-[0.5rem] w-12 max-w-12 min-w-12 animate-slide-from-right",style:{animationDelay:1e3*n+"ms"},children:[uo(sa,{src:e.url,wrapper:"svg",className:"w-10 h-10 max-h-10 max-w-10 min-h-10 min-w-10 p-2.5 rounded-lg bg-lighter-than-text",beforeInjection:e=>{var t;e.removeAttribute("width"),e.removeAttribute("height"),null==(t=e.querySelector("path"))||t.removeAttribute("fill"),e.setAttribute("fill","currentColor")}}),uo("p",{className:"transition-opacity duration-700 ease-in-out "+(t?"opacity-100":"opacity-0"),children:e.name})]},e.name)))})]});var ua=(e=>(e[e.PHONE_NUMBER=0]="PHONE_NUMBER",e[e.OTP=1]="OTP",e[e.SUCCESS=2]="SUCCESS",e))(ua||{});const da=({className:e,children:t,...n})=>uo("label",{class:`text-base text-gray-600 ${e??""}`,...n,children:t}),pa=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"})),fa=({className:e,onClick:t,...n})=>{const[r,o]=zn(!1);return uo("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:Yn((()=>{if(!r)return o(!0),t().finally((()=>{o(!1)}))}),[r,t]),...n,children:[uo("div",{class:"relative "+(r?"invisible":""),children:n.children}),r&&uo("div",{class:"absolute",children:uo(wo,{theme:"primary"})})]})},ma=({className:e,allowedKeyPattern:t,onChange:n,value:r,leadingIconElement:o,trailingIconElement:i,...a})=>{const s=Yn((e=>{t.test(e.key)||e.preventDefault()}),[t]);return uo(C,{children:uo("div",{class:"relative",children:[o,uo("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]})})},ha=e=>e.replace(/ /g,""),ga=e=>{const t=ha(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)},ya=({phoneNumber:e,onSubmit:t,onDecline:n})=>{const{hostInformation:{workflowsJourneyType:r}}=Zn(fo),[o,i]=zn(""),{setPhoneNumber:a,phoneNumber:s}=(e=>{const{identity:t}=Zn(fo),[n,r]=zn((()=>e&&ga(e)?e:"")),o=Gn((()=>ga(n)),[n]),i=Gn((()=>ha(n)),[n]),a=Gn((()=>i.startsWith("04")?`+61${i.replace(/^0+/,"")}`:i.startsWith("614")?`+${i}`:i),[i]),s=Gn((()=>(e=>{let t=0;return"#### ### ### ### ### ### ###".replace(/#/g,(()=>e[t++]??"")).trim()})(i)),[i]),l=Gn((()=>ga(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]=zn(s.isVerified),u=Yn((()=>{i("")}),[]),d=Yn((()=>{const e=s.valid?"":"Please enter a valid Australian mobile number beginning with 04.";i(e),c(s.isVerified)}),[s.isVerified,s.valid]),p=Yn((async()=>{s.valid&&await t(s).catch(i)}),[s,t]),f=Yn((async()=>{c(!1)}),[]),m=uo("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 ",uo(pa,{})]});return uo(bi,{children:[uo(bi.Top,{children:uo("div",{className:"flex flex-col gap-5",children:[uo(Si,{children:"Join your workplace benefits program"}),uo(Ei,{children:[s.isVerified?"Confirm ":"Enter "," your ",uo("b",{children:"personal"})," mobile number to finish setting up your Flare Benefits account linked to your workplace"]})]})}),uo(bi.Bottom,{children:uo("div",{className:"mt-5 md:w-[300px] text-left",children:[uo(da,{className:"font-medium text-sm text-gray-900 text-left",children:"Australian Mobile Number"}),uo(ma,{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:u,onfocusout:d,trailingIconElement:l&&m,disabled:l}),0!==o.length&&uo("div",{className:"h-8 leading-none",children:uo("span",{className:"text-xs text-rose-500",children:o})}),l&&uo("div",{className:"mt-2 ml-2 mb-2 leading-none",children:uo("span",{className:"text-xs",children:["Not your personal number?",uo(fa,{class:"text-blue-500",onClick:f,children:"Change number"})]})}),uo("div",{children:uo("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"," ",uo("a",{href:"https://www.flarehr.com/flare-app-terms-and-conditions/",target:"_blank",rel:"noreferrer",children:" Terms of Use "}),"and",uo("a",{href:"https://www.flarehr.com/privacy-policy/",target:"_blank",rel:"noreferrer",children:" Privacy Policy"}),"."," "]})}),uo(xo,{testId:"sign_in_mobile_number_button_send_otp",class:"mt-5 md:w-full",onClickPromise:p,children:"Join your workplace"}),r!==ne.AppInvite&&uo(xo,{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"})]})})]})},_a=""+("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),ba=({onContinue:e})=>{const{featureFlags:{marketplaceScheme:t},hostInformation:{experiment:n,treatment:r}}=Zn(fo),{trace:o}=So(),i=Gn((()=>({title:"You’ve joined your workplace benefits program",isNextButtonHidden:"allowance"===t.scheme})),[t]),a=Yn((async()=>{"allowance"!==t.scheme&&await o("marketplace-started",{experiment:n,treatment:r}),e()}),[n,t.scheme,e,o,r]);return qn((()=>{if("allowance"===t.scheme){const t=setTimeout(e,3e3);return()=>clearTimeout(t)}}),[t,e]),uo(bi,{children:[uo(bi.Top,{children:uo("img",{src:_a,className:"h-16 w-16"})}),uo(bi.Bottom,{children:uo("div",{className:"mt-5 flex flex-col items-center gap-5 text-center",children:[uo(Si,{children:i.title}),!i.isNextButtonHidden&&uo(xo,{testId:"sign_in_success_button_next_screen",class:"mt-5 w-full md:w-[240px]",onClickPromise:a,children:"Set up your benefits"})]})})]})},wa=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"})),va=({open:e})=>uo(bo,{open:e,children:uo(_o,{children:uo("div",{className:"flex flex-col gap-5 items-center justify-center text-center",children:[uo(wo,{size:"lg"}),uo(Si,{children:"Creating your account"}),uo("div",{children:[uo(Ei,{children:"This can take up to 30 seconds."}),uo(Ei,{children:"Please don't navigate away or refresh your browser."})]})]})})}),xa=({phoneNumber:e,onVerify:t,onResendOtp:n,onGoBack:r})=>{const{otp:o,setOtp:i}=(()=>{const[e,t]=zn("");return{otp:{valid:Gn((()=>6===e.length),[e.length]),code:e},setOtp:t}})(),[a,s]=zn(!1),[l,c]=zn(""),{countdown:u,restart:d}=(e=>{const[t,n]=zn(e),r=Vn(),o=Yn((()=>{clearInterval(r.current)}),[]);return qn((()=>o),[o]),{countdown:t,restart:Yn((()=>{let t=e;clearInterval(r.current),r.current=setInterval((()=>{t<0?clearInterval(r.current):n(t--)}),1e3)}),[e])}})(60);qn(d,[d]);const p=Yn((()=>(s(!0),c(""),t(o.code).catch(c).finally((()=>{s(!1)})))),[t,o.code]),f=Yn((()=>(c(""),n().then(d).catch(c))),[n,d]);return uo(C,{children:[uo(va,{open:a}),uo(bi,{children:[uo(bi.Top,{children:uo("div",{className:"flex flex-col gap-5",children:[uo(Si,{children:"Verify your mobile number"}),uo(Ei,{children:["An SMS verification code has been sent to the number ",e,"."]})]})}),uo(bi.Bottom,{children:uo("div",{className:"mt-5 md:w-[300px] text-left",children:[uo(da,{className:"font-medium text-sm text-gray-900 text-left",children:"Enter your verification code"}),uo(ma,{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&&uo("span",{className:"text-xs text-rose-500",children:l}),uo("p",{class:"mt-2 text-center text-xs text-gray-600 disabled:opacity-75 ",children:["Didn't get the code?",uo(fa,{disabled:0!==u,className:"underline mx-2 disabled:text-gray-600 disabled:hover:bg-transparent disabled:cursor-text disabled:px-0",onClick:f,children:"Resend SMS"}),0!==u&&uo(C,{children:["in ",u," secs"]})]}),uo(xo,{testId:"sign_in_otp_button_verify_otp",class:"mt-5 md:w-full",disabled:!o.valid,onClickPromise:p,children:"Continue"}),uo(xo,{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:uo("span",{className:"flex gap-3",children:[uo(wa,{}),"Back"]})})]})})]})]})},ka=({phoneNumber:e,onSignUp:t,onVerify:n,onResendOtp:r,onSuccess:o,onDecline:i})=>{const{trace:a}=So(),[s,l]=zn(e??""),{step:c,goBack:u,goToStep:d}=(()=>{const[e,t]=zn(0),n=Yn((()=>{const n=e-1;n>=0&&t(n)}),[e]),r=Yn((e=>{e<=2&&t(e)}),[]);return{step:e,goBack:n,goToStep:r}})();qn((()=>{(async()=>{await a("sign-up-viewed")})()}),[a]);const p=Yn((e=>t(e.formatted).then((async t=>{l(e.masked),t.isVerificationRequired?d(ua.OTP):(await a("sign-up-completed"),d(ua.SUCCESS))}))),[d,t,a]),f=Yn((()=>a("sign-up-declined").then(i)),[i,a]),m=Yn((e=>n(e).then((async()=>{await a("sign-up-completed"),d(ua.SUCCESS)}))),[d,n,a]);return uo(C,{children:[c===ua.PHONE_NUMBER&&uo(ya,{phoneNumber:s,onSubmit:p,onDecline:f}),c===ua.OTP&&uo(xa,{phoneNumber:s,onVerify:m,onResendOtp:r,onGoBack:u}),c===ua.SUCCESS&&uo(ba,{onContinue:o})]})};var Ca=(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))(Ca||{});const Sa=e=>{var t;const n=null==(t=null==e?void 0:e.response)?void 0:t.data;throw Ca[null==n?void 0:n.code]??"Sorry, we are currently experiencing some issues. Please try again later."},Ea=({onSuccess:e,onDecline:t})=>{const{identity:{phoneNumber:n}}=Zn(fo),{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(Sa)},resendOtp:async()=>{await vn.backend.getClient().post("auth/resend").catch(Sa)}};return uo(C,{children:uo(ka,{phoneNumber:n,onSignUp:r,onVerify:o,onResendOtp:i,onSuccess:e,onDecline:t})})},Na=""+("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),Ta=e=>{const{trace:t}=So(),{hostInformation:{experiment:n,treatment:r}}=Zn(fo);return qn((()=>{t("benefits-setup-started",{experiment:n,treatment:r})}),[n,t,r]),uo(bi,{children:[uo(bi.Top,{children:uo("img",{class:"max-w-[30rem] w-full",src:Na})}),uo(bi.Bottom,{children:uo("div",{children:[uo("h3",{class:"mt-8 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:"Finish setting up your workplace benefits"}),uo("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."}),uo(xo,{testId:"introduction_button_next_screen",class:"mt-8",onClickPromise:async()=>{e.onStepComplete()},children:"Continue"})]})})]})},Aa=({visible:e,children:t})=>{const n=Vn(e);return e&&!n.current&&(n.current=!0),n.current?uo("div",{hidden:!e,children:t}):null},Oa=({icon:e})=>"string"==typeof e?uo(sa,{src:e,wrapper:"svg",className:"w-10 h-10 max-h-10 max-w-10 min-h-10 min-w-10 p-2.5 rounded-lg bg-lighter-than-text",beforeInjection:e=>{var t;e.removeAttribute("width"),e.removeAttribute("height"),null==(t=e.querySelector("path"))||t.removeAttribute("fill"),e.setAttribute("fill","currentColor")}}):uo("div",{className:"w-10 h-10 max-h-10 max-w-10 min-h-10 min-w-10 p-2.5 rounded-lg bg-lighter-than-text",children:e}),Ra=({label:e,icon:t})=>uo("div",{className:"flex flex-col gap-1 items-center w-12 max-w-12 min-w-12",children:[t,uo("p",{className:"max-h-10 max-w-20 break-words text-ellipsis overflow-hidden line-clamp-2",children:e})]}),Pa=({children:e})=>uo(C,{children:e}),La=({selectedIndex:e,onChange:t,children:n})=>{const r=Gn((()=>fr.toArray(n).filter((e=>e.type===Ra))),[n]),o=Gn((()=>fr.toArray(n).filter((e=>e.type===Pa))),[n]);return Ri((()=>{o.length>0&&(null==t||t(0))})),uo("div",{children:[uo("div",{className:"flex items-baseline gap-8 md:mb-4",children:[uo("style",{children:"\n .bg-lighter-than-text{\n background-color: hsl(from currentColor h s l / 0.08);\n }\n "}),r.map(((n,r)=>uo("div",{onClick:()=>null==t?void 0:t(r),className:`\n text-sm font-medium cursor-auto h-full relative\n flex items-center justify-center\n ${r===e?"text-primary-base":"text-gray-400"}\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)=>uo(Aa,{visible:n===e,children:t},t.key)))]})},Ia=()=>uo("div",{class:"flex justify-center",children:uo(wo,{size:"lg"})}),Ua=(Fa=e=>{var t,n,r;const{featureFlags:{marketplaceScheme:o},hostInformation:i,offersProgress:{canOfferSkipToEstimate:a}}=Zn(fo),{trace:s}=So(),l=Vn(null);return Ri((()=>{s({type:"offer-viewed",offerName:e.marketPlaceOffer.name,data:e.marketPlaceOffer.metadata},{experiment:e.marketPlaceOffer.metadata.featureName,treatment:e.marketPlaceOffer.metadata.treatmentName}),l.current&&(l.current.terms=e.marketPlaceOffer.content.terms,l.current.details=e.marketPlaceOffer.content.details,l.current["on-accept"]=async()=>{await s({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})},l.current["on-decline"]=async()=>{await s({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)},l.current["on-complete"]=()=>e.onStepComplete(!0,!0),l.current["on-skip"]=e.marketPlaceOffer.content.skipButtonHidden?void 0:()=>e.onStepComplete(!0,!1))})),uo("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","skip-to-completion":a(e.marketPlaceOffer.name),ref:l})},e=>{const t=Vn(null),[n,r]=zn(),[o,i]=zn(!1);return qn((()=>{(async()=>{const e=await xn.workplaceBackend.getIdToken();r(e)})(),(()=>{if(t.current&&!t.current.querySelector("script[data-injected]")){const e=document.createElement("script"),n=ho(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)})()}),[]),uo("div",{ref:t,className:n,children:n&&o?uo(Fa,{...e,accessToken:n}):uo(Ia,{})})});var Fa;const Ba=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
+ /*! @license DOMPurify 3.2.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.2.6/LICENSE */,{entries:ja,setPrototypeOf:Ma,isFrozen:Da,getPrototypeOf:za,getOwnPropertyDescriptor:Ha}=Object;let{freeze:qa,seal:Wa,create:Va}=Object,{apply:$a,construct:Ga}="undefined"!=typeof Reflect&&Reflect;qa||(qa=function(e){return e}),Wa||(Wa=function(e){return e}),$a||($a=function(e,t,n){return e.apply(t,n)}),Ga||(Ga=function(e,t){return new e(...t)});const Ya=cs(Array.prototype.forEach),Za=cs(Array.prototype.lastIndexOf),Ja=cs(Array.prototype.pop),Xa=cs(Array.prototype.push),Ka=cs(Array.prototype.splice),Qa=cs(String.prototype.toLowerCase),es=cs(String.prototype.toString),ts=cs(String.prototype.match),ns=cs(String.prototype.replace),rs=cs(String.prototype.indexOf),os=cs(String.prototype.trim),is=cs(Object.prototype.hasOwnProperty),as=cs(RegExp.prototype.test),ss=(ls=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ga(ls,t)});var ls;function cs(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return $a(e,t,r)}}function us(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Qa;Ma&&Ma(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(Da(t)||(t[r]=e),o=e)}e[o]=!0}return e}function ds(e){for(let t=0;t<e.length;t++){is(e,t)||(e[t]=null)}return e}function ps(e){const t=Va(null);for(const[n,r]of ja(e)){is(e,n)&&(Array.isArray(r)?t[n]=ds(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=ps(r):t[n]=r)}return t}function fs(e,t){for(;null!==e;){const n=Ha(e,t);if(n){if(n.get)return cs(n.get);if("function"==typeof n.value)return cs(n.value)}e=za(e)}return function(){return null}}const ms=qa(["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"]),hs=qa(["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"]),gs=qa(["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"]),ys=qa(["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"]),_s=qa(["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"]),bs=qa(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ws=qa(["#text"]),vs=qa(["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"]),xs=qa(["accent-height","accumulate","additive","alignment-baseline","amplitude","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","exponent","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","intercept","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","slope","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","tablevalues","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"]),ks=qa(["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"]),Cs=qa(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ss=Wa(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Es=Wa(/<%[\w\W]*|[\w\W]*%>/gm),Ns=Wa(/\$\{[\w\W]*/gm),Ts=Wa(/^data-[\-\w.\u00B7-\uFFFF]+$/),As=Wa(/^aria-[\-\w]+$/),Os=Wa(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Rs=Wa(/^(?:\w+script|data):/i),Ps=Wa(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ls=Wa(/^html$/i),Is=Wa(/^[a-z][.\w]*(-[.\w]+)+$/i);var Us=Object.freeze({__proto__:null,ARIA_ATTR:As,ATTR_WHITESPACE:Ps,CUSTOM_ELEMENT:Is,DATA_ATTR:Ts,DOCTYPE_NAME:Ls,ERB_EXPR:Es,IS_ALLOWED_URI:Os,IS_SCRIPT_OR_DATA:Rs,MUSTACHE_EXPR:Ss,TMPLIT_EXPR:Ns});const Fs=1,Bs=3,js=7,Ms=8,Ds=9;var zs=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.2.6",n.removed=[],!t||!t.document||t.document.nodeType!==Ds||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const o=r,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:f,trustedTypes:m}=t,h=c.prototype,g=fs(h,"cloneNode"),y=fs(h,"remove"),_=fs(h,"nextSibling"),b=fs(h,"childNodes"),w=fs(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:S,getElementsByTagName:E}=r,{importNode:N}=o;let T={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof ja&&"function"==typeof w&&k&&void 0!==k.createHTMLDocument;const{MUSTACHE_EXPR:A,ERB_EXPR:O,TMPLIT_EXPR:R,DATA_ATTR:P,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:I,ATTR_WHITESPACE:U,CUSTOM_ELEMENT:F}=Us;let{IS_ALLOWED_URI:B}=Us,j=null;const M=us({},[...ms,...hs,...gs,..._s,...ws]);let D=null;const z=us({},[...vs,...xs,...ks,...Cs]);let H=Object.seal(Va(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=us({},["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 ue=null;const de=us({},["audio","video","img","source","image","track"]);let pe=null;const fe=us({},["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=us({},[me,he,ge],es);let ve=us({},["mi","mo","mn","ms","mtext"]),xe=us({},["annotation-xml"]);const ke=us({},["title","style","font","a","script"]);let Ce=null;const Se=["application/xhtml+xml","text/html"];let Ee=null,Ne=null;const Te=r.createElement("form"),Ae=function(e){return e instanceof RegExp||e instanceof Function},Oe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ne||Ne!==e){if(e&&"object"==typeof e||(e={}),e=ps(e),Ce=-1===Se.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ee="application/xhtml+xml"===Ce?es:Qa,j=is(e,"ALLOWED_TAGS")?us({},e.ALLOWED_TAGS,Ee):M,D=is(e,"ALLOWED_ATTR")?us({},e.ALLOWED_ATTR,Ee):z,be=is(e,"ALLOWED_NAMESPACES")?us({},e.ALLOWED_NAMESPACES,es):we,pe=is(e,"ADD_URI_SAFE_ATTR")?us(ps(fe),e.ADD_URI_SAFE_ATTR,Ee):fe,ue=is(e,"ADD_DATA_URI_TAGS")?us(ps(de),e.ADD_DATA_URI_TAGS,Ee):de,le=is(e,"FORBID_CONTENTS")?us({},e.FORBID_CONTENTS,Ee):ce,q=is(e,"FORBID_TAGS")?us({},e.FORBID_TAGS,Ee):ps({}),W=is(e,"FORBID_ATTR")?us({},e.FORBID_ATTR,Ee):ps({}),se=!!is(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,B=e.ALLOWED_URI_REGEXP||Os,ye=e.NAMESPACE||ge,ve=e.MATHML_TEXT_INTEGRATION_POINTS||ve,xe=e.HTML_INTEGRATION_POINTS||xe,H=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ae(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ae(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&&(j=us({},ws),D=[],!0===se.html&&(us(j,ms),us(D,vs)),!0===se.svg&&(us(j,hs),us(D,xs),us(D,Cs)),!0===se.svgFilters&&(us(j,gs),us(D,xs),us(D,Cs)),!0===se.mathMl&&(us(j,_s),us(D,ks),us(D,Cs))),e.ADD_TAGS&&(j===M&&(j=ps(j)),us(j,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(D===z&&(D=ps(D)),us(D,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&us(pe,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ce&&(le=ps(le)),us(le,e.FORBID_CONTENTS,Ee)),ie&&(j["#text"]=!0),X&&us(j,["html","head","body"]),j.table&&(us(j,["tbody"]),delete q.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw ss('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw ss('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(""));qa&&qa(e),Ne=e}},Re=us({},[...hs,...gs,...ys]),Pe=us({},[..._s,...bs]),Le=function(e){Xa(n.removed,{element:e});try{w(e).removeChild(e)}catch(t){y(e)}},Ie=function(e,t){try{Xa(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(r){Xa(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{Le(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=ts(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ce&&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,Ce)}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?E.call(t,X?"html":"body")[0]:X?t.documentElement:i},Fe=function(e){return C.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Be=function(e){return e instanceof p&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},je=function(e){return"function"==typeof l&&e instanceof l};function Me(e,t,r){Ya(e,(e=>{e.call(n,t,r,Ne)}))}const De=function(e){let t=null;if(Me(T.beforeSanitizeElements,e,null),Be(e))return Le(e),!0;const r=Ee(e.nodeName);if(Me(T.uponSanitizeElement,e,{tagName:r,allowedTags:j}),J&&e.hasChildNodes()&&!je(e.firstElementChild)&&as(/<[/\w!]/g,e.innerHTML)&&as(/<[/\w!]/g,e.textContent))return Le(e),!0;if(e.nodeType===js)return Le(e),!0;if(J&&e.nodeType===Ms&&as(/<[/\w]/g,e.data))return Le(e),!0;if(!j[r]||q[r]){if(!q[r]&&He(r)){if(H.tagNameCheck instanceof RegExp&&as(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 Le(e),!0}return e instanceof c&&!function(e){let t=w(e);t&&t.tagName||(t={namespaceURI:ye,tagName:"template"});const n=Qa(e.tagName),r=Qa(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===he?t.namespaceURI===ge?"svg"===n:t.namespaceURI===me?"svg"===n&&("annotation-xml"===r||ve[r]):Boolean(Re[n]):e.namespaceURI===me?t.namespaceURI===ge?"math"===n:t.namespaceURI===he?"math"===n&&xe[r]:Boolean(Pe[n]):e.namespaceURI===ge?!(t.namespaceURI===he&&!xe[r])&&!(t.namespaceURI===me&&!ve[r])&&!Pe[n]&&(ke[n]||!Re[n]):!("application/xhtml+xml"!==Ce||!be[e.namespaceURI]))}(e)?(Le(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!as(/<\/no(script|embed|frames)/i,e.innerHTML)?(Z&&e.nodeType===Bs&&(t=e.textContent,Ya([A,O,R],(e=>{t=ns(t,e," ")})),e.textContent!==t&&(Xa(n.removed,{element:e.cloneNode()}),e.textContent=t)),Me(T.afterSanitizeElements,e,null),!1):(Le(e),!0)},ze=function(e,t,n){if(re&&("id"===t||"name"===t)&&(n in r||n in Te))return!1;if($&&!W[t]&&as(P,t));else if(V&&as(L,t));else if(!D[t]||W[t]){if(!(He(e)&&(H.tagNameCheck instanceof RegExp&&as(H.tagNameCheck,e)||H.tagNameCheck instanceof Function&&H.tagNameCheck(e))&&(H.attributeNameCheck instanceof RegExp&&as(H.attributeNameCheck,t)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(t))||"is"===t&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&as(H.tagNameCheck,n)||H.tagNameCheck instanceof Function&&H.tagNameCheck(n))))return!1}else if(pe[t]);else if(as(B,ns(n,U,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==rs(n,"data:")||!ue[e]){if(G&&!as(I,ns(n,U,"")));else if(n)return!1}else;return!0},He=function(e){return"annotation-xml"!==e&&ts(e,F)},qe=function(e){Me(T.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Be(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:D,forceKeepAttr:void 0};let o=t.length;for(;o--;){const a=t[o],{name:s,namespaceURI:l,value:c}=a,u=Ee(s),d=c;let p="value"===s?d:os(d);if(r.attrName=u,r.attrValue=p,r.keepAttr=!0,r.forceKeepAttr=void 0,Me(T.uponSanitizeAttribute,e,r),p=r.attrValue,!oe||"id"!==u&&"name"!==u||(Ie(s,e),p="user-content-"+p),J&&as(/((--!?|])>)|<\/(style|title)/i,p)){Ie(s,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Ie(s,e);continue}if(!Y&&as(/\/>/i,p)){Ie(s,e);continue}Z&&Ya([A,O,R],(e=>{p=ns(p,e," ")}));const f=Ee(e.nodeName);if(ze(f,u,p)){if(v&&"object"==typeof m&&"function"==typeof m.getAttributeType)if(l);else switch(m.getAttributeType(f,u)){case"TrustedHTML":p=v.createHTML(p);break;case"TrustedScriptURL":p=v.createScriptURL(p)}if(p!==d)try{l?e.setAttributeNS(l,s,p):e.setAttribute(s,p),Be(e)?Le(e):Ja(n.removed)}catch(i){Ie(s,e)}}else Ie(s,e)}Me(T.afterSanitizeAttributes,e,null)},We=function e(t){let n=null;const r=Fe(t);for(Me(T.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)Me(T.uponSanitizeShadowNode,n,null),De(n),qe(n),n.content instanceof a&&e(n.content);Me(T.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&&!je(e)){if("function"!=typeof e.toString)throw ss("toString is not a function");if("string"!=typeof(e=e.toString()))throw ss("dirty is not a string, aborting")}if(!n.isSupported)return e;if(K||Oe(t),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!j[t]||q[t])throw ss("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===Fs&&"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&&Le(r.firstChild);const u=Fe(ae?e:r);for(;s=u.nextNode();)De(s),qe(s),s.content instanceof a&&We(s.content);if(ae)return e;if(ee){if(te)for(c=S.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(D.shadowroot||D.shadowrootmode)&&(c=N.call(o,c,!0)),c}let d=X?r.outerHTML:r.innerHTML;return X&&j["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&as(Ls,r.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+d),Z&&Ya([A,O,R],(e=>{d=ns(d,e," ")})),v&&ne?v.createHTML(d):d},n.setConfig=function(){Oe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),K=!0},n.clearConfig=function(){Ne=null,K=!1},n.isValidAttribute=function(e,t,n){Ne||Oe({});const r=Ee(e),o=Ee(t);return ze(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&Xa(T[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=Za(T[e],t);return-1===n?void 0:Ka(T[e],n,1)[0]}return Ja(T[e])},n.removeHooks=function(e){T[e]=[]},n.removeAllHooks=function(){T={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const Hs=({children:e})=>{const t=ao.Children.toArray(e),n=t.find((e=>e.type===qs)),r=t.find((e=>e.type===Ws));return uo(_i,{appear:!0,show:!0,enter:"transition duration-700 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",children:uo("div",{class:"md:grid md:grid-cols-2 max-w-[59.5rem] mx-auto",children:[uo(_i,{appear:!0,show:!0,enter:"transition duration-700 ease-out md:transition-none",enterFrom:"-translate-y-6",enterTo:"translate-y-0",children:n&&uo("div",{class:"flex items-center h-full",children:n})}),uo(_i,{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&&uo("div",{class:"flex items-center h-full",children:r})})]})})},qs=({children:e})=>uo(C,{children:e}),Ws=({children:e})=>uo(C,{children:e});Hs.Left=qs,Hs.Right=Ws;const Vs=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"})),$s=e=>uo(_i,{appear:!0,show:!0,enter:"transition duration-300 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",children:uo("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)=>uo("div",{class:"flex space-x-1",children:[uo("span",{children:uo(Ni,{class:"h-5 w-5 fill-primary-base"})}),uo("span",{class:"text-sm leading-5 text-gray-600",children:e})]},t)))})}),Gs=e=>{const[t,n]=zn(!1);return uo("div",{class:e.class,children:t?uo($s,{items:e.items}):uo("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",uo("span",{class:"ml-1",children:uo(Vs,{class:"h-4 w-4"})})]})})},Ys=e=>{var t,n,r,o;const{featureFlags:{marketplaceScheme:i}}=Zn(fo),{trace:a}=So(),[s,l]=zn(!1);Ri((()=>{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 uo(Hs,{children:[uo(Hs.Left,{children:uo("div",{children:uo(_i,{appear:!0,show:!0,enter:"transition duration-700 ease-out md:transition-none",enterFrom:"-translate-y-6",enterTo:"translate-y-0",children:uo("div",{children:[uo("img",{class:"mt-4 max-w-full w-full mx-auto md:hidden",src:e.step.content.mobileImageUrl,loading:"lazy"}),uo("div",{class:"md:max-w-[27.5rem]",children:[uo("h3",{class:"mt-8 md:mt-3 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:e.step.content.title}),uo("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&&uo("div",{class:"mt-6 hidden md:block",children:uo($s,{items:e.step.content.details})})]}),e.step.content.details&&uo(Gs,{class:"mt-6 md:hidden",items:e.step.content.details}),"allowance"===i.scheme&&"offer"==(null==(t=e.step.content.specialBanner)?void 0:t.type)&&uo(ko,{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:uo("div",{children:[uo("p",{className:"font-semibold text-lg leading-tight text-gray-900",children:e.step.content.specialBanner.title}),uo("span",{className:"font-normal text-sm text-gray-900",children:e.step.content.specialBanner.subtitle})]})}),e.children&&e.children,uo("div",{class:"flex flex-col md:flex-row md:justify-between gap-4 md:max-w-[27.5rem] mt-6 md:mt-11",children:[uo(xo,{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)&&uo(xo,{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&&uo("p",{className:"mt-6 text-xs",children:[uo("span",{children:"*"}),uo("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&&uo(bo,{open:s,children:[uo(yo,{children:uo("div",{className:"relative",children:[uo("h3",{className:"text-base font-semibold text-gray-900",children:"Terms & Conditions"}),uo("span",{className:"absolute top-0 right-0 p-1 rounded-full bg-gray-200 cursor-pointer hover:bg-gray-100",onClick:()=>l(!1),children:uo(Ba,{className:"h-4 min-h-4 max-h-4 w-4 min-w-4 max-w-4"})})]})}),uo(_o,{children:uo("div",{class:"flex flex-col gap-3 mt-6 text-gray-600 text-xs",children:e.step.content.terms.map(((e,t)=>uo("span",{dangerouslySetInnerHTML:{__html:zs.sanitize(e,{ADD_ATTR:["target"]})}},t)))})})]})]})})})}),uo(Hs.Right,{children:uo("img",{class:"max-w-[30rem] w-full hidden md:block",src:e.step.content.imageUrl,loading:"lazy"})})]})},Zs=e=>{var t,n,r;const{featureFlags:{marketplaceScheme:o}}=Zn(fo),{trace:i}=So(),[a,s]=zn(!1);Ri((()=>{"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 uo(Hs,{children:[uo(Hs.Left,{children:uo("div",{children:uo(_i,{appear:!0,show:!0,enter:"transition duration-700 ease-out md:transition-none",enterFrom:"-translate-y-6",enterTo:"translate-y-0",children:uo("div",{children:[uo("img",{class:"mt-4 max-w-full w-full mx-auto md:hidden",src:e.step.content.mobileImageUrl,loading:"lazy"}),uo("div",{class:"md:max-w-[27.5rem]",children:[uo("h3",{class:"mt-8 md:mt-3 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:e.step.content.title}),uo("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&&uo("div",{class:"mt-6 hidden md:block",children:uo($s,{items:e.step.content.details})})]}),e.step.content.details&&uo(Gs,{class:"mt-6 md:hidden",items:e.step.content.details}),"allowance"===o.scheme&&"offer"==(null==(t=e.step.content.specialBanner)?void 0:t.type)&&uo(ko,{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:uo("div",{children:[uo("p",{className:"font-semibold text-lg leading-tight text-gray-900",children:e.step.content.specialBanner.title}),uo("span",{className:"font-normal text-sm text-gray-900",children:e.step.content.specialBanner.subtitle})]})}),e.children&&e.children,uo("div",{class:"flex flex-col md:flex-row md:justify-between gap-4 md:max-w-[27.5rem] mt-6 md:mt-11",children:uo(xo,{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&&uo("p",{className:"mt-6 text-xs",children:[uo("span",{children:"*"}),uo("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&&uo(bo,{open:a,children:[uo(yo,{children:uo("div",{className:"relative",children:[uo("h3",{className:"text-base font-semibold text-gray-900",children:"Terms & Conditions"}),uo("span",{className:"absolute top-0 right-0 p-1 rounded-full bg-gray-200 cursor-pointer hover:bg-gray-100",onClick:()=>s(!1),children:uo(Ba,{className:"h-4 min-h-4 max-h-4 w-4 min-w-4 max-w-4"})})]})}),uo(_o,{children:uo("div",{class:"flex flex-col gap-3 mt-6 text-gray-600 text-xs",children:e.step.content.terms.map(((e,t)=>uo("span",{dangerouslySetInnerHTML:{__html:zs.sanitize(e,{ADD_ATTR:["target"]})}},t)))})})]})]})})})}),uo(Hs.Right,{children:uo("img",{class:"max-w-[30rem] w-full hidden md:block",src:e.step.content.imageUrl,loading:"lazy"})})]})},Js=({current:e,total:t})=>uo("div",{className:"flex justify-between md:block text-xs tracking-wide",children:uo("span",{className:"relative px-3 py-0.5 text-primary-base font-semibold",children:[e," OF ",t,uo("span",{className:"absolute left-0 rounded-xl bg-primary-base opacity-10 w-full h-[90%]"})]})}),Xs=e=>{const{getOffers:t,featureFlags:{marketplaceSubNavigation:n},offersProgress:{update:r,isOfferCompleted:o,isOfferProgressed:i}}=Zn(fo),[a,s]=zn(0),{trace:l}=So(),c=Yn(((n,o,i)=>{r(n,o,i),a===t().length-1?e.onComplete():s(a+1)}),[r,a,t,e]),u=Yn((e=>{s(e);const n=t()[e];l({type:"offer-selected",offerName:n.name},{experiment:n.metadata.featureName,treatment:n.metadata.treatmentName})}),[t,l]),d=(e,t,n)=>{const r=i(e);return!!o(e)||(!r||t!==n)&&!!r},p=t();return uo("div",{className:"max-w-[59.5rem] mx-auto",children:[!n&&uo(Js,{current:a+1,total:p.length+1}),uo(La,{selectedIndex:a,onChange:u,children:[n&&p.map(((e,t)=>{var n,r;return uo(Ra,{label:null==(n=e.content)?void 0:n.productName,icon:uo(Oa,{icon:d(e.name,t,a)?uo(Ni,{}):null==(r=e.content)?void 0:r.iconUrl})},e.name)})),p.map((e=>{var t,n,r;return uo(Pa,{children:["Eoi"===(null==(t=e.content)?void 0:t.template)&&uo(Ys,{step:e,primaryButton:{text:e.content.acceptButton,onClick:()=>c(e.name,!0,!0)},secondaryButton:{text:e.content.declineButton,onClick:()=>c(e.name,!1,!1)}}),"Simple"===(null==(n=e.content)?void 0:n.template)&&uo(Zs,{step:e,primaryButton:{text:e.content.acceptButton,onClick:()=>c(e.name,!0,!0)}}),"Assessment"===(null==(r=e.content)?void 0:r.template)&&uo(Ua,{onStepComplete:(t,n)=>c(e.name,t,n),marketPlaceOffer:e},e.name)]},e.name)}))]})]})},Ks=()=>uo("div",{class:"flex justify-center",children:uo(wo,{size:"lg"})}),Qs=(e=>t=>{const n=Vn(null),[r,o]=zn(),[i,a]=zn(!1);return qn((()=>{(async()=>{const e=await xn.workplaceBackend.getIdToken();o(e)})(),(()=>{if(n.current&&!n.current.querySelector("script[data-injected]")){const e=document.createElement("script"),t=ho(xn.workplaceBackend.getBaseUrl());e.type="module",e.src=`https://npm-cdn.flarehr.com/@flarehr/benefits-plan-assessment@${t}/dist/benefits-plan-assessment.js`,e.dataset.injected="true",e.onload=()=>{a(!0)},n.current.appendChild(e)}else a(!0)})()}),[]),uo("div",{ref:n,className:r,children:r&&i?uo(e,{...t,accessToken:r}):uo(Ks,{})})})((e=>{const{hostInformation:t,benefitsPlanPersonalisationAssessmentId:n}=Zn(fo),r=Vn(null);return Ri((()=>{r.current&&(r.current["on-complete"]=e.onComplete)})),uo("benefits-plan-assessment",{"base-url":xn.workplaceBackend.getBaseUrl(),"profile-id":xn.workplaceBackend.getProfileId(),"skip-intro":!0,"skip-more-details":!0,"skip-summary":!0,"access-token":e.accessToken,"assessment-id":n,"track-client":t.client,"track-source":t.source,"track-channel":t.channel,"track-experiment":t.experiment,"track-treatment":t.treatment,"assessment-title":"Personalise your benefits plan",description:"Setup your profile so that we can find the most relevant benefits for you","vertical-alignment":"items-center",ref:r})})),el=""+("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),tl=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"})),nl=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"})),rl=""+("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),ol=({onComplete:e})=>{const{trace:t}=So(),{identity:n,getIdentityRegistrationStatus:r,hostInformation:{experiment:o,treatment:i}}=Zn(fo);qn((()=>{(async()=>{await t({type:"summary-viewed",data:{summaryVariant:"app"}},{experiment:o,treatment:i})})()}),[o,t,i]);const a={...il(n,r()),imageUrl:el,mobileImageUrl:rl},s={text:"Continue",class:"mt-6 md:mt-14",onClick:async()=>{await t("completed",{experiment:o,treatment:i}),await e()}};return uo(Hs,{children:[uo(Hs.Left,{children:uo("div",{children:[uo("img",{class:"mt-4 max-w-full w-full mx-auto md:hidden",src:a.mobileImageUrl,loading:"lazy"}),uo("div",{class:"md:max-w-[27.5rem]",children:[uo("h3",{class:"mt-8 md:mt-3 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:a.title}),uo("p",{class:"mt-2 text-base md:text-lg leading-6 md:leading-7 text-gray-600 break-words",children:a.description})]}),uo("div",{class:"mt-6 flex space-x-6",children:[uo(tl,{}),uo(nl,{})]}),uo(xo,{testId:"step-benefits-finish",class:s.class,onClickPromise:s.onClick,children:s.text})]})}),uo(Hs.Right,{children:uo("img",{class:"max-w-[30rem] w-full hidden md:block",src:a.imageUrl,loading:"lazy"})})]})},il=(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.`}}},al=""+("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),sl=""+("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),ll=({onComplete:e})=>{const{trace:t}=So(),{getWorkplaceLinkingStatus:n,hostInformation:{experiment:r,treatment:o}}=Zn(fo);qn((()=>{(async()=>{await t({type:"summary-viewed",data:{summaryVariant:"generic"}},{experiment:r,treatment:o})})()}),[r,o,t]);const i={imageUrl:al,mobileImageUrl:sl,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."},a={text:"Continue",class:"mt-6 md:mt-6",onClick:async()=>{await t("completed",{experiment:r,treatment:o}),await e()}};return uo(Hs,{children:[uo(Hs.Left,{children:uo("div",{children:[uo("img",{class:"mt-4 max-w-full w-full mx-auto md:hidden",src:i.mobileImageUrl,loading:"lazy"}),uo("div",{class:"md:max-w-[27.5rem]",children:[uo("h3",{class:"mt-8 md:mt-3 text-2xl md:text-3xl leading-8 md:leading-9 font-bold",children:i.title}),uo("p",{class:"mt-2 text-base md:text-lg leading-6 md:leading-7 text-gray-600 break-words",children:i.description})]}),uo("div",{class:"flex flex-col md:flex-row md:justify-between gap-4 md:max-w-[27.5rem] mt-6 md:mt-11",children:uo(xo,{testId:"step-benefits-finish",class:a.class,onClickPromise:a.onClick,children:a.text})})]})}),uo(Hs.Right,{children:uo("img",{class:"max-w-[30rem] w-full hidden md:block",src:i.imageUrl,loading:"lazy"})})]})},cl=()=>{const{updateIdentity:e}=Zn(fo),{current:t,goNext:n}=function(){const{isAppEnabled:e,getIdentityRegistrationStatus:t,featureFlags:n}=Zn(fo),r=Gn((()=>"allowance"===n.marketplaceScheme.scheme?["Allowance_JoinBenefits","FlareAppIdentity","BenefitsPersonalisationAssessment","ConfigureBenefits","MarketplaceOffers","Allowance_BenefitsSummary"]:["Introduction","FlareAppIdentity","BenefitsPersonalisationAssessment","ConfigureBenefits","MarketplaceOffers",e?"SummaryApp":"SummaryGeneric"]),[n.marketplaceScheme.scheme,e]),[o,i]=zn(r[0]);qn((()=>{i(r[0])}),[r]);const a=Yn((async()=>{if(r.indexOf(o)===r.length-1){const e=document.querySelector(dl),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}}(),r=Yn((()=>{e(!0),n()}),[n,e]),o=Yn((()=>{e(!1),n()}),[n,e]);switch(t){case"Introduction":return uo(Ta,{onStepComplete:n});case"Allowance_JoinBenefits":return uo(xi,{onContinue:n});case"FlareAppIdentity":return uo(Ea,{onSuccess:r,onDecline:o});case"BenefitsPersonalisationAssessment":return uo(Qs,{onComplete:n});case"ConfigureBenefits":return uo(la,{onComplete:n});case"MarketplaceOffers":return uo(Xs,{onComplete:n});case"Allowance_BenefitsSummary":return uo(Oi,{onContinue:n});case"SummaryApp":return uo(ol,{onComplete:n});case"SummaryGeneric":return uo(ll,{onComplete:n});default:return uo(C,{})}},ul=()=>{const e=Zn(fo);return uo(C,{children:[uo(bo,{open:e.isFetching,children:uo(_o,{children:uo(wo,{size:"lg"})})}),e.isInitialized?uo(cl,{}):uo("div",{className:"fixed flex items-center justify-center top-0 bottom-0 left-0 right-0",children:uo(wo,{size:"lg"})})]})},dl="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]=zn(0);qn((()=>le((()=>{n(t+1)}))),[t]);const r={backendUrl:e["backend-url"],accessToken:e["access-token"],workflowsInstanceId:e["workflows-instance-id"],workflowsJourneyType:e["journey-type"]},o={channel:"onboarding",client:"onboarding",source:(e=>{switch(e){case ne.BenefitsExisting:case ne.AppInvite:return"Invite";default:return"Onboarding"}})(r.workflowsJourneyType),experiment:"onboarding-marketplace-scheme",workflowsJourneyType:r.workflowsJourneyType,workflowsInstanceId:r.workflowsInstanceId};return Sn(r.backendUrl,r.accessToken,o),"prod"===ho(r.backendUrl)&&go.init("p09arvzysr"),uo(C,{children:[uo("style",{children:vo.toString()}),uo("div",{class:"font-inter pt-6 pb-8 md:py-24 px-px",children:uo(mo,{hostInformation:o,children:uo(ul,{})})},t)]})}),dl,[],{shadow:!0})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flarehr/apollo-benefits-onboarding",
3
- "version": "0.1.3183",
3
+ "version": "0.1.3185",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "dist/"