1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3523],{9137:e=>{e.exports={"welcome-text":"_style_welcome-text__hD36A","new-student-form-input":"_style_new-student-form-input__BzX_1"}},11146:(e,t,n)=>{"use strict";n.d(t,{A:()=>j});var o=n(37876),s=n(14232),i=n(95062),r=n.n(i),l=n(85825),a=n(14868),d=n(54611),c=n(73412),p=n(91426),u=n(36905),g=n(49693),x=n(34498),m=n(26363),h=n(55093),f=n(96307),b=n(8547),y=n(48913);let A={display:"flex",alignItems:"flex-start",gap:1.75,p:"16px 18px"};function j(e){let{onSuccess:t,closeModal:n,signinSubmitText:i,signupSubmitText:r,testIdPrefix:j="cy-stage-booking"}=e,{t:k}=(0,l.Bd)("forms"),[v,S]=(0,s.useState)("");return(0,o.jsx)(u.G3,{reCaptchaKey:g.RECAPTCHA_KEY,scriptProps:{defer:!0},children:v?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1.5,mb:2.25},children:[(0,o.jsx)(d.A,{sx:{fontSize:13.5,fontWeight:600,color:"custom.ink"},children:k("login"===v?"stageBooking.account.currentLogin":"stageBooking.account.currentCreate")}),(0,o.jsx)(x.A,{onClick:()=>S(""),"data-testid":`${j}-account-change`,children:k("stageBooking.account.change")})]}),"login"===v?(0,o.jsx)(b.A,{submitText:i,onSuccessSignin:t,onClickSignup:()=>S("create"),showHeader:!1}):(0,o.jsx)(y.A,{submitText:r,closeModal:n,onSuccessSignup:t,onClickSignin:()=>S("login"),showOpenSigninButton:!1,showHeader:!1,showTeacherWarning:!1}),(0,o.jsx)(a.A,{sx:{mt:2},children:(0,o.jsx)(f.A,{})})]}):(0,o.jsxs)(a.A,{sx:{display:"grid",gap:1.5},children:[(0,o.jsxs)(h.A,{onClick:()=>S("login"),"data-testid":`${j}-account-login`,sx:A,children:[(0,o.jsx)(m.A,{children:(0,o.jsx)(c.A,{})}),(0,o.jsxs)(a.A,{children:[(0,o.jsx)(d.A,{sx:{fontSize:14.5,fontWeight:600,color:"custom.ink"},children:k("stageBooking.account.login")}),(0,o.jsx)(d.A,{sx:{fontSize:12.5,color:"text.secondary",mt:.25},children:k("stageBooking.account.loginSub")})]})]}),(0,o.jsxs)(h.A,{onClick:()=>S("create"),"data-testid":`${j}-account-create`,sx:A,children:[(0,o.jsx)(m.A,{children:(0,o.jsx)(p.A,{})}),(0,o.jsxs)(a.A,{children:[(0,o.jsx)(d.A,{sx:{fontSize:14.5,fontWeight:600,color:"custom.ink"},children:k("stageBooking.account.create")}),(0,o.jsx)(d.A,{sx:{fontSize:12.5,color:"text.secondary",mt:.25},children:k("stageBooking.account.createSub")})]})]})]})})}j.propTypes={onSuccess:r().func.isRequired,closeModal:r().func,signinSubmitText:r().string,signupSubmitText:r().string,testIdPrefix:r().string}},24855:(e,t,n)=>{"use strict";n.d(t,{A:()=>x});var o=n(37876),s=n(14232),i=n(95062),r=n.n(i),l=n(14868),a=n(54611),d=n(32595),c=n(16581);let p={display:"flex",alignItems:"center",gap:1.75,pb:2,borderBottom:"1px solid",borderColor:"custom.line"},u={width:34,height:34,borderRadius:"50%",border:"1px solid",borderColor:"custom.line2",bgcolor:"var(--gr-card)",display:"grid",placeItems:"center",cursor:"pointer",color:"custom.ink",flexShrink:0,"&:hover":{borderColor:"custom.ink"},"& svg":{fontSize:16}},g={height:2,bgcolor:"custom.line",flexShrink:0};function x(e){let{title:t,eyebrow:n=null,progress:i=null,onBack:r=null,backLabel:x,focusKey:m=null,sx:h=[],...f}=e,b=(0,s.useRef)(null);return(0,s.useEffect)(()=>{b.current?.focus()},[m]),(0,o.jsxs)(l.A,{sx:[{minWidth:0},...Array.isArray(h)?h:[h]],...f,children:[(0,o.jsxs)(l.A,{sx:p,children:[r&&(0,o.jsx)(l.A,{component:"button",type:"button",onClick:r,"aria-label":x,"data-testid":"cy-step-drawer-back",sx:u,children:(0,o.jsx)(d.A,{})}),(0,o.jsxs)(l.A,{sx:{flex:1,minWidth:0},children:[n&&(0,o.jsx)(c.A,{variant:"section",component:"div",children:n}),(0,o.jsx)(a.A,{component:"h2",ref:b,tabIndex:-1,sx:e=>({fontFamily:e.typography.serifFontFamily,fontSize:18,fontWeight:600,color:"custom.ink",outline:"none"}),children:t})]})]}),null!=i&&(0,o.jsx)(l.A,{sx:g,"aria-hidden":"true",children:(0,o.jsx)(l.A,{sx:{height:"100%",width:`${i}%`,bgcolor:"custom.accent",transition:"width .35s ease"}})})]})}x.propTypes={title:r().node,eyebrow:r().node,progress:r().number,onBack:r().func,backLabel:r().string,focusKey:r().any,sx:r().oneOfType([r().object,r().array])}},26363:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(37876);n(14232);var s=n(95062),i=n.n(s),r=n(14868);let l=e=>({width:e,height:e,borderRadius:"8px",bgcolor:"custom.paper2",display:"grid",placeItems:"center",color:"custom.ink",flexShrink:0,"& svg":{fontSize:Math.round(e/2)}});function a(e){let{children:t,size:n=38,sx:s=[],...i}=e;return(0,o.jsx)(r.A,{sx:[l(n),...Array.isArray(s)?s:[s]],...i,children:t})}a.propTypes={children:i().node,size:i().number,sx:i().oneOfType([i().object,i().array])}},31096:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>A,fH:()=>u});var o=n(37876);n(14232);var s=n(95062),i=n.n(s),r=n(85825),l=n(14868),a=n(54611),d=n(74446),c=n(16581);let p={alignSelf:"stretch",ml:"-35px",mt:"-66px",mb:"-20px",bgcolor:"custom.foot",color:"custom.white",borderRadius:"14px 0 0 14px",overflow:"hidden"},u=e=>
1null!=e?`${Number(e).toLocaleString("fr-FR")}\u00A0â¬`:null,g={p:"10px 20px",borderBottom:"1px solid rgba(255,255,255,0.12)"},x={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:1.5,fontSize:13,py:"5px"},m={color:"rgba(255,255,255,0.62)"},h={fontSize:11.5,fontWeight:500,color:"custom.white",bgcolor:"rgba(255,255,255,0.08)",border:"1px solid rgba(255,255,255,0.16)",borderRadius:"99px",p:"4px 10px"},f={listStyle:"none",m:0,p:"14px 20px 18px",display:"flex",flexDirection:"column",gap:1.25,"& li":{display:"flex",alignItems:"flex-start",gap:1,fontSize:12,lineHeight:1.5,color:"rgba(255,255,255,0.72)","& svg":{fontSize:15,color:"custom.accent",flexShrink:0,mt:"1.5px"},"& b":{color:"custom.white",fontWeight:600}}},b={p:"0 20px 16px",fontSize:11.5,lineHeight:1.5,color:"rgba(255,255,255,0.62)"};function y(e){let{title:t,eyebrow:n,dateRange:s,isOnline:i=!1,location:u,volumeText:y,subjects:A=[],totalDisplay:j,strikeTotalDisplay:k,promo:v,points:S,footnote:C,sticky:T=!1,sx:w}=e,{t:B}=(0,r.Bd)("forms"),_=i?B("stageBooking.recap.formatOnline"):[B("stageBooking.recap.formatPresentiel"),u].filter(Boolean).join(" \xb7 "),I=Array.isArray(S)&&S.length>0;return(0,o.jsx)(l.A,{sx:[p,...Array.isArray(w)?w:[w]],children:(0,o.jsxs)(l.A,{sx:T?{position:"sticky",top:0}:void 0,children:[(0,o.jsxs)(l.A,{sx:{p:"18px 20px 14px",borderBottom:"1px solid rgba(255,255,255,0.12)"},children:[(0,o.jsx)(c.A,{tone:"accent",children:n||B("stageBooking.aside.eyebrow")}),(0,o.jsx)(a.A,{sx:e=>({fontFamily:e.typography.serifFontFamily,fontSize:17,fontWeight:600,mt:.5,lineHeight:1.25}),children:t})]}),(0,o.jsxs)(l.A,{sx:g,children:[s&&(0,o.jsxs)(l.A,{sx:x,children:[(0,o.jsx)(l.A,{component:"span",sx:m,children:B("stageBooking.aside.dates")}),(0,o.jsx)(l.A,{component:"span",sx:{fontWeight:500},children:s})]}),(0,o.jsxs)(l.A,{sx:x,children:[(0,o.jsx)(l.A,{component:"span",sx:m,children:B("stageBooking.recap.format")}),(0,o.jsx)(l.A,{component:"span",sx:{fontWeight:500},children:_})]}),y&&(0,o.jsxs)(l.A,{sx:x,children:[(0,o.jsx)(l.A,{component:"span",sx:m,children:B("stageBooking.recap.volume")}),(0,o.jsx)(l.A,{component:"span",sx:{fontWeight:500},children:y})]}),A.length>0&&(0,o.jsx)(l.A,{sx:{display:"flex",flexWrap:"wrap",gap:.75,py:"8px"},children:A.map(e=>(0,o.jsx)(l.A,{component:"span",sx:h,children:e.name},e.id||e.name))})]}),j&&(0,o.jsxs)(l.A,{sx:{p:"14px 20px",borderBottom:I?"1px solid rgba(255,255,255,0.12)":"none",bgcolor:"rgba(255,255,255,0.06)"},children:[v&&(0,o.jsxs)(l.A,{sx:[x,{color:"custom.accent",pt:0,pb:1}],"data-testid":"cy-stage-recap-promo",children:[(0,o.jsx)(l.A,{component:"span",children:B("stageBooking.recap.promo",{code:v.code})}),(0,o.jsx)(l.A,{component:"span",sx:{fontWeight:600},children:v.amountDisplay})]}),(0,o.jsxs)(l.A,{sx:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:1.5},children:[(0,o.jsx)(c.A,{variant:"section",tone:"dark",component:"span",children:B("stageBooking.footer.total")}),(0,o.jsxs)(l.A,{sx:{display:"flex",alignItems:"baseline",gap:1},children:[k&&(0,o.jsx)(a.A,{component:"s",sx:{fontSize:13,color:"rgba(255,255,255,0.55)"},children:k}),(0,o.jsx)(a.A,{sx:e=>({fontFamily:e.typography.serifFontFamily,fontSize:22,fontWeight:600,lineHeight:1}),"data-testid":"cy-stage-recap-total",children:j})]})]})]}),I&&(0,o.jsx)(l.A,{component:"ul",sx:f,children:S.map(e=>(0,o.jsxs)(l.A,{component:"li",children:[(0,o.jsx)(d.A,{"aria-hidden":!0}),(0,o.jsxs)("span",{children:[(0,o.jsx)("b",{children:e.t})," ",e.s]})]},e.t))}),C&&(0,o.jsx)(a.A,{component:"p",sx:b,"data-testid":"cy-stage-recap-footnote",children:C})]})})}y.propTypes={title:i().string,eyebrow:i().string,dateRange:i().string,isOnline:i().bool,location:i().string,volumeText:i().string,subjects:i().arrayOf(i().object),totalDisplay:i().string,strikeTotalDisplay:i().string,promo:i().shape({code:i().string,amountDisplay:i().string}),points:i().arrayOf(i().shape({t:i().string,s:i().string})),footnote:i().node,sticky:i().bool,sx:i().oneOfType([i().object,i().array])};let A=y},34498:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var o=n(37876),s=n(14232),i=n(95062),r=n.n(i),l=n(98349),a=n(14868);let d={minWidth:0,minHeight:"auto",height:"auto",px:0,py:0,fontSize:12,fontWeight:500,whiteSpace:"nowrap","& .MuiButton-startIcon":{mr:.75,ml:0}},c=(0,s.forwardRef)(function(e,t){let{children:n,icon:i=null,href:r,onClick:c,disabled:p=!1,confirmLabel:u=null,sx:g=[],...x}
1=e,[m,h]=(0,s.useState)(!1),f=(0,s.useRef)(null);return(0,s.useEffect)(()=>()=>clearTimeout(f.current),[]),(0,o.jsx)(l.A,{ref:t,variant:"underlined",size:"small",onClick:e=>{c?.(e),u&&(h(!0),clearTimeout(f.current),f.current=setTimeout(()=>h(!1),2e3))},startIcon:i?(0,o.jsx)(a.A,{component:"span",sx:{display:"inline-flex","& svg":{fontSize:12,color:"var(--gr-ink-3)"}},children:i}):void 0,sx:[d,...Array.isArray(g)?g:[g]],...r?{component:"a",href:r}:{disabled:p},...x,children:m&&u?u:n})});c.propTypes={children:r().node.isRequired,icon:r().node,href:r().string,onClick:r().func,disabled:r().bool,confirmLabel:r().string,sx:r().oneOfType([r().object,r().func,r().array])};let p=c},53523:(e,t,n)=>{"use strict";n.r(t),n.d(t,{StageBookingModal:()=>Y,default:()=>J});var o=n(37876),s=n(14232),i=n(95062),r=n.n(i),l=n(48011),a=n(85825),d=n(14868),c=n(54611),p=n(75370),u=n(98349),g=n(98313),x=n(61877),m=n(57138),h=n(2513),f=n(34498),b=n(16581),y=n(88059),A=n(24703),j=n(55093),k=n(95293),v=n(24855),S=n(65284),C=n(15494),T=n(91065),w=n(11785),B=n(11146),_=n(31096),I=n(96438),E=n(61113),O=n(2014),z=n(82979),F=n(58490),W=n(4899),R=n(66545),L=n(26043),P=n(5996),H=n(41044),M=n(36146),N=n(61349),$=n(44564),D=n(17250);let q=["compte","eleve","facture","paiement"],K={width:{xs:"100%",md:940},maxWidth:"100%",display:"grid",gridTemplateColumns:{xs:"1fr",md:"300px minmax(0, 1fr)"},gap:{xs:0,md:3.5},alignItems:"start"},V={display:"flex",alignItems:"center",gap:1.25,m:"4px 0 16px","&::after":{content:'""',flex:1,height:"1px",bgcolor:"custom.line"}},G={display:"grid",gridTemplateColumns:{xs:"1fr",sm:"1fr 1fr"},gap:1.5,mb:3},U={position:"relative",p:"16px 18px"},X=e=>({position:"absolute",top:12,right:12,width:20,height:20,borderRadius:"50%",display:"grid",placeItems:"center",bgcolor:e?"custom.successColor":"custom.paper2",border:"1px solid",borderColor:e?"custom.successColor":"custom.line2","& svg":{fontSize:13,color:e?"custom.white":"transparent"}});function Y(e){let{groupLesson:t={},composition:n=null,closeModal:i}=e,{t:r}=(0,a.Bd)(["forms","common"]),Y=r("common:months",{returnObjects:!0}),J=(0,l.wA)(),{id:Q,title:Z,subjects:ee=[],start_date:et,end_date:en,location:eo,hourly_rate:es,whole_session_price:ei,level:er,equivalent_levels:el,online:ea,school_year:ed}=t,ec=!!ea||"En ligne"===eo,ep=(0,l.d4)(R.Tp.selectIsAuthenticated),eu=(0,l.d4)(L.Tp.selectUser),eg=(0,l.d4)(L.Tp.selectChildren),ex=(0,l.d4)(L.Tp.selectUserAsStudent),em=(0,l.d4)(M.Tp.selectTraineeshipTypes),{isError:eh,isFetching:ef,error:eb}=(0,l.d4)(e=>H.js.selectLoadingState(e,P.gK.P1,Q)),ey=(0,s.useMemo)(()=>eh?(0,h.VWt)(eb,r,{fieldPrefix:"groupLessonErrors.field",codeMap:F.Vt,genericKey:"groupLessonErrors.generic",renderGeneric:e=>(0,o.jsx)(W.A,{t:r,i18nKey:e})}):[],[eh,eb,r]);(0,s.useEffect)(()=>()=>{J(H.aD.resetLoadingState(P.gK.P1,Q)),J(H.aD.resetLoadingState(P.gK.t))},[J,Q]),(0,s.useEffect)(()=>{(0,h.OFD)("group_lesson_book")},[]);let[eA]=(0,s.useState)(()=>ep?q.filter(e=>"compte"!==e):q),[ej,ek]=(0,s.useState)(eA[0]),ev=eA.indexOf(ej),eS=(ev+1)/eA.length*100,eC=(0,s.useCallback)(()=>ek("eleve"),[]),eT=0===eg.length,[ew,eB]=(0,s.useState)(""),[e_,eI]=(0,s.useState)({}
1),[eE,eO]=(0,s.useState)(!1),[ez,eF]=(0,s.useState)(null),[eW,eR]=(0,s.useState)(""),[eL,eP]=(0,s.useState)(""),eH=(0,s.useMemo)(()=>[er,...el||[]].filter(e=>e&&!e.generic).map(e=>({value:e.id,label:e.name})),[er,el]),[eM,eN]=(0,s.useState)(eH[0]||null),e$=[eu?.bill_address,eu?.address].find(e=>e?.free_address||e?.full_address)||null,[eD,eq]=(0,s.useState)(e$),[eK,eV]=(0,s.useState)(!1),[eG,eU]=(0,s.useState)("");(0,s.useEffect)(()=>{e$&&eq(e=>e||e$)},[e$]);let eX=(0,l.d4)(P.Tp.selectSubmission),eY=(0,l.d4)(P.Tp.selectCheckout),{isFetching:eJ,isError:eQ,error:eZ}=(0,l.d4)(e=>H.js.selectLoadingState(e,P.gK.t)),e0=eY?.promoCode&&eY?.discount>0?{code:eY.promoCode,discount:eY.discount,toPayed:eY.toPayed}:null,e1=e=>J(P.zU.postDiscountCode(e,{...eX,level:er,description:Z})),e5=()=>{eU(""),e1("")},e2=!!(eD?.free_address||eD?.full_address),e4=eD?.isAccurateAddress!==void 0||!!eD?.full_address,e3=(0,s.useMemo)(()=>{let e=n?.subjects;return e?.length?ee.filter(t=>e.includes(t.name)):ee},[n,ee]),e6="moi"===ew?O.O8:O.f7,e8="moi"===ew?eu:e_,e9=!e8||Object.entries(e8).length<=1,e7=e8?.email&&e8?.phone?.phone_number,te=!!ew&&!e9&&!!eM&&!!ez&&(!ec||"moi"===ew||e7),{start:tt,end:tn}=et&&en?(0,h.HAX)(et,en):{},to=tt?(0,h.E1Y)(tt,tn,Y):null,ts=n?.rate??es??null,ti=n?.totalPrice??ei??null,tr=n?.totalHours??null,tl=r("stageBooking.aside.points",{returnObjects:!0}),ta=(0,h.LO9)({period:(0,h.c58)(t),level:eM?{name:eM.label}:er,traineeshipTypes:em,t:r,fallback:Z||er?.name||""}),td={k:r("stageBooking.steps.k",{n:ev+1,total:eA.length}),t:r(`stageBooking.steps.${ej}`)},tc=null!=ti?Number(ti):null,tp=e0?e0.toPayed??(null!=tc?Math.max(0,tc-e0.discount):null):null,tu=e0?tp:tc,tg=(0,_.fH)(tu)??(null!=ts?r("stageBooking.recap.rateValue",{rate:ts}):"â"),tx=null!=tr?r("stageBooking.recap.volumeValue",{hours:tr,count:e3.length}):null,tm=e0&&null!=tc?(0,_.fH)(tc):null,th=e0?{code:e0.code,amountDisplay:`â${(0,_.fH)(e0.discount)}`}:null,{isStreetAddress:tf,isAccurateAddress:tb,isForeignAddress:ty,...tA}=eD||{},tj={traineeship_level_id:Q,student_id:"moi"===ew?ex?.id??null:e8?.id,details:{subjects_id:e3.map(e=>Number(e.id)),scholar_level_id:eM?.value?parseInt(eM.value,10):null,class_level:ez,comment:eW,...e2&&{address:tA},...eG&&{promo_code:eG}}},tk=ep?JSON.stringify(tj):null;return(0,s.useEffect)(()=>{tk&&J(N.Rp.updateMissionAbortedGroupLesson(tj))},[tk,J]),(0,o.jsxs)(d.A,{sx:K,"data-testid":"cy-stage-booking-modal",children:[(0,o.jsx)(_.Ay,{title:ta,dateRange:to,isOnline:ec,location:eo,volumeText:tx,subjects:e3,totalDisplay:tg,strikeTotalDisplay:tm,promo:th,points:Array.isArray(tl)?tl:void 0,footnote:(0,o.jsx)(a.x6,{t:r,i18nKey:"stageBooking.aside.cgu",components:{cguLink:(0,o.jsx)(A.A,{href:z.Kb,target:"_blank",rel:"noopener noreferrer","data-testid":"cy-stage-booking-cgu-link"})}}),sticky:!0,sx:{display:{xs:"none",md:"block"}}}),(0,o.jsxs)(d.A,{sx:{minWidth:0},children:[(0,o.jsx)(v.A,{title:td.t,eyebrow:td.k,progress:eS,onBack:()=>(eP(""),J(H.aD.resetLoadingState(P.gK.P1,Q)),ev<=0)?i():ek(eA[ev-1]),backLabel:r("stageBooking.footer.back"),focusKey:ej}),(0,o.jsxs)(d.A,{sx:{pt:3},children:["compte"===ej&&(0,o.jsx)(B.A,{onSuccess:()=>ek("eleve"),closeModal:i,signinSubmitText:r("signinForm.groupLessonSubmit"),signupSubmitText:r("signupForm.groupLessonSubmit")}),"eleve"===ej&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b.A,{variant:"section",component:"div",sx:V,children:r("stageBooking.forWhom.title")}),(0,o.jsx)(d.A,{sx:G,role:"group","aria-label":r("stageBooking.forWhom.title"),children:[{key:"enfant",node:"child",testId:"child"},{key:"moi",node:"self",testId:"self"}].map(e=>{let{key:t,node:n,testId:s}=e,i=ew===t;return(0,o.jsxs)(j.A,{selected:i,onClick:()=>eB(t),"data-testid":`cy-stage-booking-forwhom-${s}`,sx:U,children:[(0,o.jsx)(d.A,{component:"span",sx:X(i),"aria-hidden":!0,children:(0,o.jsx)(x.A,{})}),(0,o.jsx)(c.A,{sx:{fontSize:14.5,fontWeight:600,color:"custom.ink",pr:3.5},children:r(`stageBooking.forWhom.${n}.title`)}),(0,o.jsx)(c.A,{sx:{fontSize:12,color:"text.secondary",mt:.75},children:r(`stageBooking.forWhom.${n}.desc`)})]},t)})}),"enfant"===ew&&(0,o.jsx)(o.Fragment,{children:eT?(0,o.jsx)(E.A,{ds:!0,onChange:e=>eI(e),disabled:ef,isError:!!eL}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b.A,{variant:"section",component:"div",sx:V,children:r("stageBooking.forWhom.studentTitle")}),(0,o.jsx)(I.A,{title:"",options:eg.map(e=>({id:e.id,value:e,label:e.firstname,icon:(0,o.jsx)($.A,{})})),addOption:{label:r("addStudent"),icon:(0,o.jsx)(D.A,{}),onClick:()=>eO(!0),isActive:eE},defaultValue:e_,onValueSelected:(e,t)=>{t?(eI({}),eO(!0)):(eI({...e,phone:{phone_region:e?.phone?.phone_region||"",phone_country:e?.phone?.phone_country||"",phone_number:e?.phone?.phone_number||""}}),eO(!1))},disabled:ef,isError:!!eL}),eE&&(0,o.jsx)(E.A,{ds:!0,onChange:e=>eI(e),disabled:ef,isError:!!eL})]})}),ew&&eH.length>1&&(0,o.jsxs)(d.A,{"data-testid":"cy-stage-booking-scholar-level",children:[(0,o.jsx)(b.A,{variant:"section",component:"div",sx:[V,{mt:3}],children:r("classLevel",{year:ed})}),(0,o.jsx)(C.A,{defaultOption:eM,options:eH,isSearchable:!0,onSelected:e=>eN(e)})]}),(0,o.jsx)(b.A,{variant:"section",component:"div",sx:[V,{mt:3}],children:r("stageBooking.rythme.title")}),(0,o.jsx)(d.A,{sx:G,children:[{key:"standard",node:"consolider"},{key:"high-level",node:"exceller"}].map(e=>{let{key:t,node:n}=e,s=ez===t;return(0,o.jsxs)(j.A,{selected:s,onClick:()=>eF(t),"data-testid":`cy-stage-booking-rythme-${n}`,sx:U,children:[(0,o.jsx)(d.A,{component:"span",sx:X(s),"aria-hidden":!0,
1children:(0,o.jsx)(x.A,{})}),(0,o.jsx)(c.A,{sx:{fontSize:14.5,fontWeight:600,color:"custom.ink",pr:3.5},children:r(`stageBooking.rythme.${n}.title`)}),(0,o.jsx)(c.A,{sx:{fontSize:12,color:"text.secondary",mt:.75},children:r(`stageBooking.rythme.${n}.desc`)})]},t)})}),(0,o.jsx)(y.A,{label:r("stageBooking.besoins.label"),children:(0,o.jsx)(p.A,{multiline:!0,minRows:3,placeholder:r("stageBooking.besoins.placeholder"),helperText:r("stageBooking.besoins.help"),value:eW,onChange:e=>eR(e.target.value),inputProps:{"data-testid":"cy-stage-booking-besoins"}})}),!!eL&&(0,o.jsx)(w.A,{text:eL,type:"danger",onClose:()=>eP(""),dataTestId:"cy-stage-booking-form-alert"}),eh&&(0,o.jsx)(w.A,{type:"danger",dataTestId:"cy-stage-booking-error",centeredText:1===ey.length,...ey.length>1?{list:ey}:{text:ey[0]}})]}),"facture"===ej&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b.A,{variant:"section",component:"div",sx:V,children:r("stageBooking.facture.title")}),(0,o.jsxs)(y.A,{label:r("stageBooking.facture.addressLabel"),sx:{mb:2.5},children:[(0,o.jsx)(S.default,{dataTestId:"cy-stage-booking-address",onPlaceSelected:e=>{let{fullAddress:t}=e;return eq(e=>t||e)},initialQuery:eD?.free_address||eD?.full_address,onlyAddress:!0,allowForeignAddress:!0,withCheckInit:!0,placeholder:r("stageBooking.facture.addressPlaceholder")}),(0,o.jsx)(c.A,{sx:{fontSize:12,color:"custom.muted",mt:.75},children:r("stageBooking.facture.addressHelp")})]}),eK||e0?(0,o.jsx)(y.A,{label:r("stageBooking.facture.promoLabel"),htmlFor:"stage-booking-promo-input",error:!e0&&eQ?eZ?.code?r("checkoutForm.discount.invalid",{promo:eZ.code}):r("error"):null,hint:e0?r("stageBooking.facture.promoApplied"):r("stageBooking.facture.promoHelp"),hintTone:e0?"success":"muted",children:(0,o.jsxs)(d.A,{component:"form",onSubmit:e=>{e.preventDefault(),!eJ&&(e0?e5():eG&&e1(eG))},sx:{display:"flex",gap:1.5,alignItems:"flex-end"},children:[(0,o.jsx)(p.A,{id:"stage-booking-promo-input",placeholder:r("stageBooking.facture.promoPlaceholder"),error:!e0&&eQ,value:eG,disabled:!!e0||eJ,onChange:e=>eU(e.target.value),sx:{flex:1},inputProps:{"data-testid":"cy-stage-booking-promo"}}),(0,o.jsx)(f.A,{type:"submit",disabled:eJ||!e0&&!eG,"data-testid":"cy-stage-booking-promo-apply",sx:{mb:"13px"},children:e0?r("stageBooking.facture.promoRemove"):r("checkoutForm.discount.apply")})]})}):(0,o.jsx)(f.A,{icon:(0,o.jsx)(m.A,{}),onClick:()=>eV(!0),"data-testid":"cy-stage-booking-promo-link",children:r("stageBooking.facture.promoLink")})]}),"paiement"===ej&&(0,o.jsx)(T.default,{groupLesson:t,initialAddress:eD,initialPromoCode:eG,hideBillingAddress:!0,hideSummary:!0,onEditSubmission:eC})]}),("eleve"===ej||"facture"===ej)&&(0,o.jsxs)(k.A,{children:[(0,o.jsxs)(d.A,{sx:{display:{xs:"block",md:"none"},mb:1.5},children:[e0&&(0,o.jsxs)(d.A,{sx:{display:"flex",alignItems:"baseline",justifyContent:"space-between",mb:.5},children:[(0,o.jsx)(c.A,{sx:{fontSize:12.5,color:"custom.accent2"},children:r("stageBooking.recap.promo",{code:e0.code})}),(0,o.jsxs)(c.A,{sx:{fontSize:12.5,fontWeight:600,color:"custom.accent2"},children:["â",(0,_.fH)(e0.discount)]})]}),(0,o.jsxs)(d.A,{sx:{display:"flex",alignItems:"baseline",justifyContent:"space-between"},children:[(0,o.jsx)(b.A,{variant:"section",component:"span",children:r("stageBooking.footer.total")}),(0,o.jsx)(c.A,{sx:e=>({fontFamily:e.typography.serifFontFamily,fontSize:20,fontWeight:600,color:"custom.ink"}),children:tg})]})]}),"facture"===ej&&!!eL&&(0,o.jsx)(w.A,{text:eL,type:"danger",onClose:()=>eP(""),dataTestId:"cy-stage-booking-facture-alert"}),(0,o.jsx)(u.A,{variant:"default",fullWidth:!0,endIcon:(0,o.jsx)(g.A,{}),disabled:ef,"data-testid":"cy-stage-booking-proceed",onClick:"eleve"===ej?()=>{if(!te)return void eP(r("errorFormIncomplete"));eP("");let e={lessonId:Q,student:{...e8,...eM?.value&&{classLevel:eM.value}},role:e6,...eW&&{commentary:eW},subjects:e3,type:ez,shouldUpdateLevel:!1,level:er,description:Z};J(P.zU.registerGroupLesson(e,()=>ek("facture")))}:()=>e2?e4?void(eP(""),ek("paiement")):void eP(r("checkoutForm.error.address")):void eP(r("checkoutForm.error.incomplete")),children:r("stageBooking.footer.continue")})]})]})]})}Y.propTypes={groupLesson:r().object,composition:r().shape({subjects:r().arrayOf(r().str
1ing),rate:r().number,totalPrice:r().number,totalHours:r().number}),closeModal:r().func};let J=Y},55093:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(37876);n(14232);var s=n(95062),i=n.n(s),r=n(14868);let l=(e,t,n)=>({textAlign:"left",border:"1px solid",borderColor:e?"custom.ink":"custom.line2",borderRadius:"6px",bgcolor:"var(--gr-card)",cursor:t?"not-allowed":n?"default":"pointer",opacity:t?.45:1,transition:"all .14s ease",boxShadow:e?e=>`inset 0 0 0 1px ${e.palette.custom.ink}`:"none","&:hover":{borderColor:e?"custom.ink":t||n?"custom.line2":"custom.ink3"}});function a(e){let{selected:t,dim:n=!1,locked:s=!1,sx:i=[],children:a,...d}=e;return(0,o.jsx)(r.A,{component:"button",type:"button",disabled:n||s,"aria-pressed":"boolean"==typeof t?t:void 0,sx:[l(!!t,n,s),...Array.isArray(i)?i:[i]],...d,children:a})}a.propTypes={selected:i().bool,dim:i().bool,locked:i().bool,sx:i().oneOfType([i().object,i().array,i().func]),children:i().node}},61113:(e,t,n)=>{"use strict";n.d(t,{A:()=>k});var o=n(37876),s=n(14232),i=n(95062),r=n.n(i),l=n(85825),a=n(14868),d=n(75370),c=n(2513),p=n(16581),u=n(88059),g=n(36627),x=n(3539),m=n(44564),h=n(8947),f=n(49693),b=n(9137),y=n.n(b);let A={display:"flex",alignItems:"center",gap:1.25,m:"4px 0 16px","&::after":{content:'""',flex:1,height:"1px",bgcolor:"custom.line"}};function j(e){let{defaultNewStudent:t={firstname:"",lastname:"",email:""},onChange:n,disabled:i=!1,isErrorEmailExists:r=!1,isError:l=!1,isErrorIncompleteOnline:b=!1,ds:j=!1,t:k=c.Gs8.t}=e,v={phone_region:t?.phone?.phone_region||f.PHONE_REGION,phone_country:t?.phone?.phone_country||f.PHONE_COUNTRY,phone_number:t?.phone?.phone_number||""},[S,C]=(0,s.useState)(t?.firstname||""),[T,w]=(0,s.useState)(t?.lastname||""),[B,_]=(0,s.useState)(t?.email||""),[I,E]=(0,s.useState)(v);(0,s.useEffect)(()=>{let e={firstname:S,lastname:T};B&&(e.email=B),I.phone_number&&(e.phone=I),n(e)},[S,T,B,I]);let O=r||b&&!B;return j?(0,o.jsxs)(a.A,{children:[(0,o.jsx)(p.A,{variant:"section",component:"div",sx:A,children:k("newStudent")}),(0,o.jsx)(u.A,{label:k("placeholder.firstname"),sx:{mb:2},children:(0,o.jsx)(d.A,{value:S,onChange:e=>C(e.target.value),disabled:i,error:l&&!S,inputProps:{"data-testid":"cy-new-student-firstname"}})}),(0,o.jsx)(u.A,{label:k("placeholder.lastname"),sx:{mb:2},children:(0,o.jsx)(d.A,{value:T,onChange:e=>w(e.target.value),disabled:i,error:l&&!T,inputProps:{"data-testid":"cy-new-student-lastname"}})}),(0,o.jsx)(u.A,{label:k("placeholder.email"),sx:{mb:2},children:(0,o.jsx)(d.A,{type:"email",inputMode:"email",value:B,onChange:e=>_(e.target.value),disabled:i,error:O,inputProps:{"data-testid":"cy-new-student-email"}})}),(0,o.jsx)(u.A,{label:k("placeholder.phone"),children:(0,o.jsx)(x.A,{value:I.phone_number,defaultCode:I.phone_country,defaultCountry:I.phone_region,withIcon:!1,onChange:e=>E(e),disabled:i,phoneError:b&&!I.phone_number,dataTestId:"cy-new-student-phone"})})]}):(0,o.jsxs)(s.Fragment,{children:[(0,o.jsx)("div",{className:"welcome-text",children:(0,o.jsx)("h3",{children:k("newStudent")})}),(0,o.jsx)(g.A,{id:"student-firstname",name:"firstname",className:y()["new-student-form-input"],icon:m.A,placeholder:k("placeholder.firstname"),value:S,onChange:e=>{C(e)},disabled:i,error:l&&!S,dataTestId:"cy-new-student-firstname"}),(0,o.jsx)(g.A,{id:"student-lastname",name:"lastname",className:y()["new-student-form-input"],icon:m.A,placeholder:k("placeholder.lastname"),value:T,onChange:e=>{w(e)},disabled:i,error:l&&!T,dataTestId:"cy-new-student-lastname"}),(0,o.jsx)(g.A,{id:"email",name:"email",className:y()["new-student-form-input"],icon:h.A,type:"email",inputMode:"email",placeholder:k("placeholder.email"),value:B,onChange:e=>{_(e)},disabled:i,error:O,dataTestId:"cy-new-student-email"}),(0,o.jsx)(x.A,{value:I.phone_number,defaultCode:I.phone_country,defaultCountry:I.phone_region,className:y()["contact-form-input"],onChange:e=>E(e),placeholder:k("placeholder.phone"),disabled:i,phoneError:b&&!I.phone_number,dataTestId:"cy-new-student-phone"})]})}j.propTypes={defaultNewStudent:r().shape({firstname:r().string,lastname:r().string,email:r().string,phone:r().object}),onChange:r().func.isRequired,disabled:r().bool,isErrorEmailExists:r().bool,isError:r().oneOfType([r().bool,r().string]),isErrorIncompleteOnline:r().oneOfType([r().bool,r().string]),ds:r().bool,t:r(
1).func};let k=(0,l.CI)("forms")(j)},88059:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var o=n(37876),s=n(14232),i=n(95062),r=n.n(i),l=n(14868),a=n(19199),d=n(5323);function c(e){let{id:t,label:n,required:i=!1,helper:r=null,error:c=null,hint:p=null,hintTone:u="muted",htmlFor:g=null,children:x,sx:m={}}=e,h=(0,s.useId)(),f=g,b=x;if(n&&!g){let e=s.Children.toArray(x),t=e.find(s.isValidElement);t&&(f=t.props.id||`${h}-input`,t.props.id||(b=e.map(e=>e===t?(0,s.cloneElement)(e,{id:f}):e)))}let y=n&&(0,o.jsx)(a.A,{required:i,htmlFor:f||void 0,sx:e=>({...e.typography.fieldLabel,fontSize:"10px",mb:r?0:"7px",whiteSpace:"normal"}),children:n});return(0,o.jsxs)(l.A,{id:t,sx:[{width:"100%","& .MuiFormControl-root, & .MuiInputBase-root":{width:"100%"}},m],children:[n&&r?(0,o.jsxs)(l.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:"7px"},children:[y,r]}):y,b,c?(0,o.jsx)(d.A,{error:!0,sx:{mt:.5,height:"auto",lineHeight:1.4},children:c}):p&&(0,o.jsx)(d.A,{sx:{mt:.5,height:"auto",lineHeight:1.4,color:"success"===u?"custom.successColor":"custom.muted"},children:p})]})}c.propTypes={id:r().string,label:r().node,required:r().bool,helper:r().node,error:r().node,hint:r().node,hintTone:r().oneOf(["muted","success"]),htmlFor:r().string,children:r().node,sx:r().oneOfType([r().object,r().array])}},95293:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(37876);n(14232);var s=n(95062),i=n.n(s),r=n(14868);let l={borderTop:"1px solid",borderColor:"custom.line",pt:2,mt:3};function a(e){let{children:t,sx:n=[],...s}=e;return(0,o.jsx)(r.A,{sx:[l,...Array.isArray(n)?n:[n]],...s,children:t})}a.propTypes={children:i().node,sx:i().oneOfType([i().object,i().array])}},96438:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var o=n(37876),s=n(14232),i=n(95062),r=n.n(i),l=n(85825),a=n(14868),d=n(54611),c=n(98349),p=n(2513);function u(e){let{title:t,subtitle:n="",options:i=[],addOption:r=null,defaultValue:l=null,onValueSelected:u,disabled:g=!1,isError:x=!1,renderExtra:m=null}=e,[h,f]=(0,s.useState)(l),[b,y]=(0,s.useState)(r?.isActive||!1),A=2===i.length+ +!!r?2:3,j=e=>{f(e.value),y(!1),u(e.value,!1)},k=e=>({textTransform:"none",transition:"all 0.2s",backgroundColor:e?"primary.main":"action.selected",color:e?"white":"inherit",opacity:g?.6:1,border:"2px solid",borderColor:x&&(0,p.kZJ)(h)&&!b?"error.main":"transparent","&:hover":{backgroundColor:g?e?"primary.main":"action.selected":"primary.main",color:g?e?"white":"inherit":"white"}});return(0,o.jsxs)(a.A,{sx:{width:"100%",marginBottom:3},children:[(t||n)&&(0,o.jsxs)(a.A,{sx:{marginBottom:2},children:[t&&(0,o.jsx)(d.A,{fontSize:24,variant:"h3",textAlign:"center",fontWeight:"bold",sx:{marginBottom:4},children:t}),n&&(0,o.jsx)(d.A,{variant:"h2",component:"h4",children:n})]}),(0,o.jsxs)(a.A,{sx:e=>({display:"grid",gridTemplateColumns:`repeat(${A}, 1fr)`,gap:1,marginTop:2.5,[e.breakpoints.down("md")]:{gridTemplateColumns:"1fr"}}),children:[i.map(e=>{let t=h===e.value||"object"==typeof h&&h?.id===e.value?.id;return(0,o.jsx)(c.A,{fullWidth:!0,startIcon:e.icon,disabled:g,onClick:()=>j(e),"data-testid":e.testId,sx:k(t),children:e.label},e.id)}),r&&(0,o.jsx)(c.A,{fullWidth:!0,startIcon:r.icon,disabled:g,onClick:()=>{f(null),y(!0),u(null,!0),r?.onClick&&r.onClick()},"data-testid":r.testId,sx:{...k(b),paddingX:2},children:r.label})]}),m&&m()]})}u.propTypes={title:r().string.isRequired,subtitle:r().string,options:r().arrayOf(r().shape({id:r().oneOfType([r().string,r().number]).isRequired,value:r().any.isRequired,label:r().string.isRequired,icon:r().node,testId:r().string})).isRequired,addOption:r().shape({label:r().string.isRequired,icon:r().node,onClick:r().func,isActive:r().bool,testId:r().string}),defaultValue:r().any,onValueSelected:r().func.isRequired,disabled:r().bool.isRequired,isError:r().oneOfType([r().bool,r().string]).isRequired,renderExtra:r().func},u.defaultProps={subtitle:"",addOption:null,defaultValue:null,disabled:!1,isError:!1,renderExtra:null};let g=(0,l.CI)("forms")(u)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.