"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[278],{39372:function(e,s,n){n.d(s,{B_:function(){return r},Qi:function(){return c},ZK:function(){return o}});var t=n(52322),a=n(2784),l=n(98614),i=n(24991);let r={en:(0,t.jsxs)("svg",{width:"24",height:"16",viewBox:"0 0 24 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsxs)("g",{clipPath:"url(#clip0_757_73814)",children:[(0,t.jsx)("path",{d:"M0 0H24V16H0V0Z",fill:"white"}),(0,t.jsx)("path",{d:"M0 0H24V1.23041H0V0ZM0 2.46082H24V3.69123H0V2.46082ZM0 4.92164H24V6.15205H0V4.92164ZM0 7.38246H24V8.61287H0V7.38246ZM0 9.84795H24V11.0784H0V9.84795ZM0 12.3088H24V13.5392H0V12.3088ZM0 14.7696H24V16H0V14.7696Z",fill:"#D80027"}),(0,t.jsx)("path",{d:"M0 0H12V8.61287H0V0Z",fill:"#2E52B2"}),(0,t.jsx)("path",{d:"M2.23709 6.49824L2.04995 5.89941L1.84411 6.49824H1.22656L1.72715 6.85847L1.54001 7.4573L2.04995 7.08771L2.54586 7.4573L2.35405 6.85847L2.86399 6.49824H2.23709ZM4.87101 6.49824L4.67919 5.89941L4.4827 6.49824H3.86516L4.36574 6.85847L4.17861 7.4573L4.67919 7.08771L5.18446 7.4573L4.99732 6.85847L5.49791 6.49824H4.87101ZM7.51428 6.49824L7.31311 5.89941L7.12598 6.49824H6.4944L7.00902 6.85847L6.81253 7.4573L7.31311 7.08771L7.82773 7.4573L7.63124 6.85847L8.13183 6.49824H7.51428ZM10.1435 6.49824L9.95639 5.89941L9.7599 6.49824H9.13767L9.64294 6.85847L9.4558 7.4573L9.95639 7.08771L10.4617 7.4573L10.2605 6.85847L10.7751 6.49824H10.1435ZM4.67919 3.5228L4.4827 4.12163H3.86516L4.36574 4.49122L4.17861 5.08069L4.67919 4.71578L5.18446 5.08069L4.99732 4.49122L5.49791 4.12163H4.87101L4.67919 3.5228ZM2.04995 3.5228L1.84411 4.12163H1.22656L1.72715 4.49122L1.54001 5.08069L2.04995 4.71578L2.54586 5.08069L2.35405 4.49122L2.86399 4.12163H2.23709L2.04995 3.5228ZM7.31311 3.5228L7.12598 4.12163H6.4944L7.00902 4.49122L6.81253 5.08069L7.31311 4.71578L7.82773 5.08069L7.63124 4.49122L8.13183 4.12163H7.51428L7.31311 3.5228ZM9.95639 3.5228L9.7599 4.12163H9.13767L9.64294 4.49122L9.4558 5.08069L9.95639 4.71578L10.4617 5.08069L10.2605 4.49122L10.7751 4.12163H10.1435L9.95639 3.5228ZM2.04995 1.15555L1.84411 1.74502H1.22656L1.72715 2.11461L1.54001 2.70876L2.04995 2.33917L2.54586 2.70876L2.35405 2.11461L2.86399 1.74502H2.23709L2.04995 1.15555ZM4.67919 1.15555L4.4827 1.74502H3.86516L4.36574 2.11461L4.17861 2.70876L4.67919 2.33917L5.18446 2.70876L4.99732 2.11461L5.49791 1.74502H4.87101L4.67919 1.15555ZM7.31311 1.15555L7.12598 1.74502H6.4944L7.00902 2.11461L6.81253 2.70876L7.31311 2.33917L7.82773 2.70876L7.63124 2.11461L8.13183 1.74502H7.51428L7.31311 1.15555ZM9.95639 1.15555L9.7599 1.74502H9.13767L9.64294 2.11461L9.4558 2.70876L9.95639 2.33917L10.4617 2.70876L10.2605 2.11461L10.7751 1.74502H10.1435L9.95639 1.15555Z",fill:"white"})]}),(0,t.jsx)("defs",{children:(0,t.jsx)("clipPath",{id:"clip0_757_73814",children:(0,t.jsx)("rect",{width:"24",height:"16",rx:"2",fill:"white"})})})]}),es:(0,t.jsxs)("svg",{width:"24",height:"16",viewBox:"0 0 24 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsxs)("g",{clipPath:"url(#clip0_757_73821)",children:[(0,t.jsx)("path",{d:"M0 0H24.1644V16H0V0Z",fill:"white"}),(0,t.jsx)("path",{d:"M0 0H24.1644V4.26667H0V0ZM0 11.7333H24.1644V16H0V11.7333Z",fill:"#D03433"}),(0,t.jsx)("path",{d:"M0 4.26666H24.1644V11.7333H0V4.26666Z",fill:"#FBCA46"}),(0,t.jsx)("path",{d:"M8.37891 7.46667H9.45288V8.00001H8.37891V7.46667Z",fill:"white"}),(0,t.jsx)("path",{d:"M7.73423 9.06665C7.73423 9.38665 8.05642 9.59999 8.37861 9.59999C8.7008 9.59999 9.02299 9.38665 9.02299 9.06665L9.13039 7.46665H7.62683L7.73423 9.06665ZM7.08984 7.46665C7.08984 7.14665 7.30464 6.93332 7.51943 6.93332H9.13039C9.45258 6.93332 9.66738 7.14665 9.66738 7.35999V7.46665L9.55998 9.06665C9.45258 9.70665 9.02299 10.1333 8.37861 10.1333C7.73423 10.1333 7.30464 9.70665 7.19724 9.06665L7.08984 7.46665Z",fill:"#A41517"}),(0,t.jsx)("path",{d:"M7.30236 8.00001H9.45031V8.53334H8.91332L8.37634 9.60001L7.83935 8.53334H7.30236V8.00001ZM5.69141 6.40001H6.76538V10.1333H5.69141V6.40001ZM9.9873 6.40001H11.0613V10.1333H9.9873V6.40001ZM7.30236 5.86668C7.30236 5.54668 7.51716 5.33334 7.83935 5.33334H8.91332C9.23552 5.33334 9.45031 5.54668 9.45031 5.86668V6.08001C9.45031 6.29334 9.34291 6.40001 9.12812 6.40001H7.51716C7.40976 6.40001 7.30236 6.29334 7.30236 6.18668V5.86668Z",fill:"#A41517"})]}),(0,t.jsx)("defs",{children:(0,t.jsx)("clipPath",{id:"clip0_757_73821",children:(0,t.jsx)("rect",{width:"24",height:"16",rx:"2",fill:"white"})})})]})},c={en:"English",es:"Espa\xf1ol"},o=()=>{let{i18n:e}=(0,l.$G)(),s=(0,a.useCallback)(s=>{(0,i.D0)(s),e.changeLanguage(s)},[e]);return{language:e.language,setLanguage:s}}},95866:function(e,s,n){n.d(s,{Y:function(){return a}});var t=n(2784);let a=e=>{let s=(0,t.useRef)(!1),[n,a]=(0,t.useState)();return(0,t.useEffect)(()=>{a(String(window.sessionStorage.getItem(e)||"")),s.current=!0},[]),[s.current,n||""]}},17984:function(e,s,n){n.d(s,{$:function(){return o}});var t=n(52322),a=n(85496),l=n(39372),i=n(92701),r=n(77155),c=n(98614);let o=()=>{let{language:e,setLanguage:s}=(0,l.ZK)(),{t:n}=(0,c.$G)("common");return(0,t.jsx)("div",{children:(0,t.jsxs)(a.J,{className:"relative",children:[(0,t.jsx)(a.J.Button,{className:"focus:outline-none",children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("span",{children:l.B_[e]}),(0,t.jsx)("h3",{className:"ml-2 text-base font-bold text-content-1000",children:e.toUpperCase()}),(0,t.jsx)(i.ChevronDown,{className:"w-4 h-4 ml-1"})]})}),(0,t.jsx)(a.J.Panel,{className:"absolute top-9 z-[2]",children:(0,t.jsxs)("div",{className:"w-[284px] rounded-lg border p-4 border-alpha-100 bg-white shadow-xl",children:[(0,t.jsx)("h4",{className:"text-sm text-content-400 font-medium mb-2",children:n("change-language")}),(0,t.jsx)(r.Y,{className:"mb-2 h-10",name:"language",id:"en",label:(0,t.jsxs)("div",{className:"flex items-center text-base text-content-1000",children:[l.B_.en,(0,t.jsxs)("span",{className:"ml-2",children:[l.Qi.en," - EN"]})]}),checked:"en"===e,onChange:()=>{s("en")}}),(0,t.jsx)(r.Y,{name:"language",id:"es",label:(0,t.jsxs)("div",{className:"flex items-center text-base text-content-1000",children:[l.B_.es,(0,t.jsxs)("span",{className:"ml-2",children:[l.Qi.es," - ES"]})]}),checked:"es"===e,onChange:()=>{s("es")}})]})})]})})}},88278:function(e,s,n){n.d(s,{A:function(){return E},p:function(){return y}});var t=n(52322),a=n(56638),l=n(65052),i=n(5632),r=n(17269),c=n(95220),o=n(95866),d=n(98614),h=n(81438),x=n(37877),m=n(81584),u=n(52956),L=n(94564),p=n(92701),j=n(65998),f=n(85496),g=n(39097),H=n.n(g),N=n(98217),b=n(58611),w=n(58557),v=n(77155),_=n(39372);let M=e=>{let{href:s,children:n,onClick:a}=e;return a?(0,t.jsx)("p",{className:"flex items-center gap-3  stroke-content-200 px-4 py-3 text-base font-[500] focus:outline-primary-500",onClick:a,onKeyDown:()=>{},role:"button",children:n}):(0,t.jsx)(H(),{className:"flex items-center gap-3  stroke-content-200 px-4 py-3 text-base font-[500] focus:outline-primary-500",href:s,children:n})},V=()=>(0,t.jsx)("div",{className:"h-px w-full bg-alpha-40 "}),Z=()=>{var e,s;let{user:n,updateAuth:a}=(0,x.aC)(),{application:l}=(0,w.I)(),{t:i}=(0,d.$G)("common"),{language:r,setLanguage:o}=(0,_.ZK)();return n?(0,t.jsxs)(f.J,{className:"relative",children:[(0,t.jsx)(f.J.Button,{className:"focus:outline-none",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(p.Menu01,{className:"stroke-content-200",size:"20"}),(0,t.jsx)("h3",{className:" text-sm font-bold",children:(null==l?void 0:null===(s=l.data)||void 0===s?void 0:null===(e=s.current_applicant)||void 0===e?void 0:e.first_name)&&l.data.current_applicant.last_name?(0,b.P)({firstName:l.data.current_applicant.first_name,lastName:l.data.current_applicant.last_name,middleName:l.data.current_applicant.middle_name,short:!0}):(0,b.P)({firstName:n.first_name,lastName:n.last_name,middleName:n.middle_name,short:!0})})]})}),(0,t.jsx)(f.J.Panel,{className:"absolute top-12 z-[2]",children:(0,t.jsxs)("div",{className:"w-[284px] rounded-lg border border-alpha-100 bg-white shadow-xl overflow-hidden",children:[(0,t.jsxs)(M,{href:"/",children:[(0,t.jsx)(p.List,{className:"stroke-inherit",size:"20"}),i("layout-menu.applications")]}),(0,t.jsx)(V,{}),(0,t.jsxs)(M,{href:"/settings",children:[(0,t.jsx)(p.User01,{className:"stroke-inherit",size:"20"}),i("layout-menu.profile")]}),(0,t.jsx)(V,{}),(0,t.jsxs)(M,{href:"#",onClick:()=>{window.sessionStorage.clear(),(0,c._i)("/screen/auth",{method:"DELETE"}).then(()=>a()).catch(e=>{(0,N.yv)(e.message||"Something went wrong",{variant:"error"})})},children:[(0,t.jsx)(p.Logout01,{className:"stroke-inherit",size:"20"}),i("layout-menu.logout")]}),(0,t.jsxs)("div",{className:"border-t p-4 border-alpha-40 bg-white shadow-xl",children:[(0,t.jsx)("h4",{className:"text-sm text-content-400 font-medium mb-2",children:i("change-language")}),(0,t.jsx)(v.Y,{className:"mb-2 h-10",name:"language",id:"en",label:(0,t.jsxs)("div",{className:"flex items-center text-base text-content-1000",children:[_.B_.en,(0,t.jsxs)("span",{className:"ml-2",children:[_.Qi.en," - EN"]})]}),checked:"en"===r,onChange:()=>{o("en")}}),(0,t.jsx)(v.Y,{name:"language",id:"es",label:(0,t.jsxs)("div",{className:"flex items-center text-base text-content-1000",children:[_.B_.es,(0,t.jsxs)("span",{className:"ml-2",children:[_.Qi.es," - ES"]})]}),checked:"es"===r,onChange:()=>{o("es")}})]})]})})]}):null};var k=n(17984);let C=e=>{let{partnerName:s,logoUrl:n,isLoading:a}=e,{t:l}=(0,d.$G)("common"),{show:r,isOpen:c,boot:o,shutdown:f}=(0,h.o)(),{pathname:g,back:H}=(0,i.useRouter)(),{user:N}=(0,x.aC)(),b=()=>{r(),!c&&N&&(f(),o({customAttributes:{source:"boomscreen_applicant"},email:N.email,name:N.first_name,hideDefaultLauncher:!0}),r())};return g.includes("units")?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.d,{if:!!n,children:(0,t.jsx)("nav",{className:"px-4 h-16 flex items-center border-b border-alpha-100",children:(0,t.jsx)("img",{alt:"partner logo",className:"h-10 w-auto",src:n})})}),(0,t.jsxs)("nav",{className:"flex items-center justify-between h-16 px-4",children:[(0,t.jsx)(u.c,{if:a,children:(0,t.jsx)("p",{className:"text-base text-medium text-content-1000",children:s})}),(0,t.jsx)(L.hU,{Icon:p.LifeBuoy02,className:"ml-auto lg:hidden shrink-0",onClick:b,size:L.rm.SM,variant:L.gZ.TEXT})]})]}):(0,t.jsxs)("nav",{className:"flex items-center justify-between h-16 px-4",children:[g.includes("auth/sign-up")?(0,t.jsx)("div",{children:(0,t.jsx)(k.$,{})}):"/settings"===g||g.includes("/upload_documents")?(0,t.jsx)(j.zx,{Icon:p.ArrowLeft,borderLess:!0,className:"-translate-x-1 pl-1",onClick:()=>{H()},size:j.qE.SM,children:l("back")}):(0,t.jsx)(Z,{}),(0,t.jsx)(j.zx,{Icon:p.LifeBuoy02,className:"flex shrink-0 items-center gap-1 ml-auto",onClick:b,size:j.qE.SM,variant:j.Wu.TEXT,children:l("get-help")})]})},y=e=>["PARTNER_BY_ML",e],E=e=>{let{children:s,footer:n,notPadded:d,header:h,className:x,style:m,token:u}=e,[L,p]=(0,o.Y)("ml_token"),j=p||u||"",{pathname:f}=(0,i.useRouter)(),{isLoading:g,data:H}=(0,r.a)({queryKey:y(j),queryFn:()=>(0,c.eE)("/screen/magic_links/partner",{params:{token:j}}).then(e=>{let{data:s}=e;return s.partner}),enabled:!!("/units"===f&&L&&j),retry:!1});return(0,t.jsxs)("div",{className:(0,l.cx)("relative flex h-screen flex-col",null!=x?x:"bg-white"),style:m,children:[h||(0,t.jsx)("header",{className:"border-b border-alpha-100 bg-background-1000",children:(0,t.jsx)(C,{isLoading:g,logoUrl:null==H?void 0:H.logo_url,partnerName:null==H?void 0:H.name})}),(0,t.jsx)("section",{className:(0,l.cx)("animate-appear hide-scroll flex-grow overflow-y-auto",d?"":"p-4"),children:s}),(0,t.jsx)(a.di,{if:!!n,children:(0,t.jsx)("footer",{className:"border-t border-alpha-100 bg-background-1000 px-4 py-3",children:n})})]})}},58611:function(e,s,n){n.d(s,{P:function(){return t}});let t=e=>{let{firstName:s,lastName:n,middleName:t,short:a}=e,l=t?"".concat(t[0],"."):"";return t?"".concat(s," ").concat(a?l:t," ").concat(n):"".concat(s," ").concat(n)}}}]);