1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4753],{502:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(95155),s=i(18950);let l=({title:e,isOpen:t,setIsOpen:i,children:l})=>(0,n.jsx)(s._s,{direction:"right",open:t,onOpenChange:i,children:(0,n.jsxs)(s.zj,{className:"h-screen top-0 right-0 left-auto mt-0 !max-w-[600px] rounded-none overflow-y-auto",children:[(0,n.jsxs)(s.BE,{className:"border-b border-b-slate-500",children:[(0,n.jsx)(s.gk,{children:e}),(0,n.jsx)(s.I6,{})]}),l]})})},685:(e,t,i)=>{"use strict";i.d(t,{A:()=>C});var n=i(95155),s=i(59434),l=i(35649),a=i(25618),r=i(12115),o=i(51012),c=i(84616),d=i(51154),u=i(10281),m=i(82098),x=i(30285),p=i(11867),f=i(75376),h=i(46102),g=i(49345),b=i(44632),v=i(35918),j=i(66773),N=i(67977),w=i.n(N),y=i(96738);let k={titleFr:"Card",titleEn:"Card",titleNl:"Card",descriptionFr:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla.",descriptionEn:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla.",descriptionNl:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla.",image:""},C=({data:e=null,lng:t="fr",edit:i=!1,save:N,cancel:C,visibility:S,updateBlockContent:$})=>{let A=o.n.use.navCommunity(),I=o.n.use.siteInfo(),F=(0,r.useRef)((0,s.ZH)(t)),[_,E]=(0,r.useState)((0,s.ZH)(t)),L=e=>{F.current=e,E(e)},[z,B]=(0,r.useState)(e?.content?.list&&e?.content?.list.length>0?e?.content?.list:[k,k,k]),{content:T,backwardActive:P,forwardActive:R,setContent:M,goBackward:D,goForward:O,saveHistory:U}=(0,f._)(),V=(0,r.useRef)(null),q=(e,t,i,n)=>{V.current=e,M(e,t,i,n)},[H,Z]=(0,r.useState)(null),[J,G]=(0,r.useState)(!1),W=(0,p.A)(!0),Q=(0,r.useRef)(null),K=(0,r.useRef)(null);function Y({newName:e=null,newTitle:t=null,newDescription:i=null}){q({...V.current,...e&&{[`name${F.current}`]:e},...t&&{[`title${F.current}`]:t},...i&&{[`description${F.current}`]:i}})}function X(e,t){let i=z.map((i,n)=>n===e?t:i);q({...V.current,list:i})}function ee(e){let t=[...z];t.splice(e,1),q({...V.current,list:t})}return(0,r.useEffect)(()=>{t!=_.toLowerCase()&&L((0,s.ZH)(t)),(0,v.T)(t).then(e=>{Z(e)})},[t]),(0,r.useEffect)(()=>{q(e?.content,!0)},[e]),(0,r.useEffect)(()=>{i&&q(T?.content??T,!1)},[i]),(0,r.useEffect)(()=>{B(T?.list&&T?.list.length>0?T?.list:[k,k,k])},[T]),(0,r.useEffect)(()=>{async function t(){let t=[...T.list??[]],i=I?.config?.imagesLibrary??[];for(let e=0;e<(T.list??[]).length;e++){let n=T.list[e];if(n.image&&n.image instanceof File){G(!0);let s=await (0,b.k)({community:A,file:n.image});t[e].image=s.data.data.fullMediaUrl,i.push(s.data.data.fullMediaUrl)}}G(!1),$(e?.uuid??"",{...V.current,list:t}),W.mutate({siteId:I?.id??0,data:{config:{...I?.config,imagesLibrary:i}}})}N&&$&&(U(),t())},[N,$]),(0,r.useEffect)(()=>{C&&q(e?.content,!0,!0)},[C]),(0,r.useEffect)(()=>{void 0!=S&&((T?.content??T)?.visibility??!0)!=(S??!0)&&$&&$(e?.uuid??"",{...T,visibility:S})},[S]),i?(0,n.jsxs)("div",{className:"relative flex flex-col gap-5 !max-w-full",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(a.p$,{className:"border-[1px] border-dark1",contentEditable:!0,ref:Q,onBlur:function(){let e=Q.current.innerText;(T?.[`name${F.current}`]??H?.flipping_card_section??"CARTES \xc0 RETOURNER")!=e&&Y({newName:e})},children:T?.[`name${_}`]??H?.flipping_card_section??"CARTES \xc0 RETOURNER"}),(0,n.jsx)(a.H2,{className:"border-[1px] border-dark1 mb-2.5",contentEditable:!0,ref:K,onBlur:function(){let e=K.current.innerText;(T?.[`title${F.current}`]??"Catalogue des cartes \xe0 retourner")!=e&&Y({newTitle:e})},children:T?.[`title${(0,s.ZH)(t)}`]??"Catalogue des cartes \xe0 retourner"}),(0,n.jsx)(g.A,{disable:!1,value:T?.[`description${_}`]??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",onChange:function(e){(T?.[`description${F.current}`]??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.")!=e&&Y({newDescription:e})}})]}),(0,n.jsxs)("div",{className:"container relative",children:[(0,n.jsx)("div",{className:"absolute -top-11 right-2",children:(0,n.jsx)(x.$,{variant:"outline",className:"!px-2 h-auto",onClick:function(){let e=[...z];e.push(k),q({...V.current,list:e})},children:(0,n.jsx)(c.A,{size:30})})}),(0,n.jsx)("div",{className:"[&>.list]:grid [&>.list]:grid-cols-1 [&>.list]:md:grid-cols-2 [&>.list]:lg:grid-cols-3 [&>.list]:gap-10",children:(0,n.jsx)(j.Ay,{onSortEnd:(e,t)=>{let i=[...z];i=w()(i,e,t),q({...V.current,list:i})},className:"list",children:z.map((e,t)=>t).map(e=>(0,n.jsx)(j.Uq,{children:(0,n.jsxs)("div",{className:"select-none relative",children:[(0,n.jsx)(j.$B,{children:(0,n.jsx)(y.CustomKnob,{})}),(0,n.jsx)(l.default,{data:z[e],lng:t,edit:i,cancel:C,cardPosition:e,updateElementList:X,deleteC
1ard:z.length>1?ee:void 0})]})},e))})})]}),J&&(0,n.jsx)("div",{className:"z-10 absolute w-full h-full bg-[#00000088] top-[50%] left-[50%] flex flex-col gap-2 justify-center items-center text-white -translate-x-[50%] -translate-y-[50%] cursor-pointer",children:(0,n.jsx)(d.A,{className:"h-[100px] w-[100px] animate-spin text-white"})}),(0,n.jsxs)("ul",{className:"absolute left-[-62px] top-[40%] z-[1] flex flex-col gap-2",children:[(0,n.jsxs)(h.m_,{children:[(0,n.jsx)(h.k$,{className:(0,s.cn)("flex h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",!P&&"opacity-50 pointer-events-none"),asChild:!0,children:(0,n.jsx)("li",{className:"flex h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",onPointerDown:P?()=>D():void 0,children:(0,n.jsx)(u.A,{size:20})})}),(0,n.jsx)(h.ZI,{children:"Go backward"})]}),(0,n.jsxs)(h.m_,{children:[(0,n.jsx)(h.k$,{className:(0,s.cn)("flex h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",!R&&"opacity-50 pointer-events-none"),asChild:!0,children:(0,n.jsx)("li",{className:"flex h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",onPointerDown:R?()=>O():void 0,children:(0,n.jsx)(m.A,{size:20})})}),(0,n.jsx)(h.ZI,{children:"Go forward"})]})]})]}):(0,n.jsxs)("div",{className:(0,s.cn)("flex flex-col gap-[1.875em] w-full",!(T?.visibility==void 0||T?.visibility)&&"opacity-50"),style:{...T?.fontColor?{"--dark-1":T?.fontColor,"--dark-3":`${T?.fontColor}99`}:{}},children:[(0,n.jsxs)("div",{className:(0,s.cn)("flex flex-col items-center gap-3 mb-[0]",(T?.[`name${_}`]==void 0||""!=(T?.[`name${_}`]??"").trim()&&"\n"!=(T?.[`name${_}`]??"").trim()||T?.[`title${_}`]==void 0||""!=(T?.[`title${_}`]??"").trim()&&"\n"!=(T?.[`title${_}`]??"").trim()||T?.[`description${_}`]==void 0||T?.[`description${_}`]!=""&&T?.[`description${_}`]!="\n"&&T?.[`description${_}`]!="<p><br></p>")&&"!mb-[30px]"),children:[(T?.[`name${_}`]==void 0||""!=(T?.[`name${_}`]??"").trim()&&"\n"!=(T?.[`name${_}`]??"").trim())&&(0,n.jsx)(a.p$,{className:"!mb-0 text-center",children:T?.[`name${_}`]??T?.nameFr??H?.flipping_card_section??"CARTES \xc0 RETOURNER"}),(T?.[`title${_}`]==void 0||""!=(T?.[`title${_}`]??"").trim()&&"\n"!=(T?.[`title${_}`]??"").trim())&&(0,n.jsx)(a.H2,{className:"text-center",children:T?.[`title${(0,s.ZH)(t)}`]??T?.titleFr??"Catalogue des cartes \xe0 retourner"}),(T?.[`description${_}`]==void 0||T?.[`description${_}`].trim()!=""&&T?.[`description${_}`]!="\n"&&T?.[`description${_}`]!="<p><br></p>")&&(0,n.jsx)("div",{className:"sun-editor-editable !p-0 !text-dark1 !bg-transparent !text-base w-4/5 text-center",dangerouslySetInnerHTML:{__html:T?.[`description${(0,s.ZH)(t)}`]??T?.descriptionFr??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book."}})]}),(0,n.jsx)("div",{className:"container grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-10",children:z.map((e,i)=>(0,n.jsx)(l.default,{data:e,lng:t,imageObjectType:T?.imageObject},`card-${i}`))})]})}},1473:(e,t,i)=>{"use strict";i.d(t,{A:()=>B});var n=i(95155),s=i(17313),l=i(12115),a=i(62177),r=i(54416),o=i(84616),c=i(18199),d=i(80119),u=i(30285),m=i(18950),x=i(66424),p=i(11867),f=i(16225),h=i(59434),g=i(63560),b=i(14436),v=i(22346),j=i(78055),N=i(73096),w=i(62523),y=i(17759);let k=({site:e,setIsOpen:t})=>{let[i,k]=(0,l.useState)(!1),C=(0,p.A)(),S=(0,a.mN)({resolver:(0,g.u)(b.o2),defaultValues:{actions:[{buttonTextEn:"",buttonTextNl:"",buttonTextFr:"",linkEn:"",linkNl:"",linkFr:""}],secondaryLogoUrl:void 0}});return(0,l.useEffect)(()=>{(e?.config?.actions??[]).length>0&&S.setValue("actions",e?.config?.actions??[]),e?.config?.secondaryLogoUrl&&S.setValue("secondaryLogoUrl",e?.config?.secondaryLogoUrl)},[e]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.F,{children:(0,n.jsx)("div",{className:"m-4",children:(0,n.jsx)(y.lV,{...S,children:(0,n.jsx)("form",{className:"space-y-6",children:(0,n.jsxs)(c.x,{axis:"y",values:(S.watch("actions")??[]).map((e,t)=>t),onReorder:e=>{let t=e.map(e=>(S.watch("actions")??[])[e]);S.setValue("actions",t)},style:{display:"flex",flexDirection:"column",gap:"20px"},children:[(S.watch("actions")??[]).map((t,i)=>(0,n.jsx)(d.N,{value:i,children:(0,n.jsxs)(s.tU,{defaultValue:"fr",className:"!gap-0 relative cursor-grab",children:[(0,n.jsxs)("div",{className:"absolute top-[2px] flex gap-2 items-center",children:[(S.watch("actions")??[]).length>1&&(0,n.jsx)("span",{className:"flex items-center justify-center w-6 h-6 !text-slate-900 cursor-pointer",onClick:()=>(function(e){let t=[...S.watch("actions")??[]];t.splice(e,1),S.setValue("actions",t)})(i),children:(0,n.jsx)(r.A,{className:"size-4"})}),(0,n.jsxs)("span",{className:"font-semibold",children:[0==i?"Premier":"Deuxi\xe8me"," bouton"]})]}
1),(0,n.jsx)(s.j7,{className:"ml-auto bg-white !rounded-none !p-0 gap-0.5",children:f.e.map((t,i)=>("En"!=t||e?.config?.hasEnLng)&&("Nl"!=t||e?.config?.hasNlLng)?(0,n.jsx)(s.Xi,{value:t.toLowerCase(),className:"text-sm rounded-[4px_4px_0_0] bg-white border border-slate-900 text-slate-900 cursor-pointer !px-2.5 !py-2 !shadow-none data-[state=active]:bg-slate-900 data-[state=active]:text-white",children:(0,h.ZH)(f.tN.fr[t])},i):null)}),f.e.map((t,l)=>("En"!=t||e?.config?.hasEnLng)&&("Nl"!=t||e?.config?.hasNlLng)?(0,n.jsx)(s.av,{value:t.toLowerCase(),children:(0,n.jsxs)("div",{className:"relative -top-[1px] flex flex-col gap-5 bg-white px-2.5 py-5 border border-slate-900 rounded-[4px_0_4px_4px]",children:[(0,n.jsx)(y.zB,{control:S.control,name:`actions.${i}.${"buttonText"+t}`,render:({field:e})=>(0,n.jsxs)(y.eI,{className:"flex flex-col",children:[(0,n.jsx)(y.lR,{className:"",children:"Label"}),(0,n.jsx)(y.MJ,{children:(0,n.jsx)(w.p,{...e,value:e.value?.toString(),className:"outline-none outline-0 bg-white"})})]})}),(0,n.jsx)(y.zB,{control:S.control,name:`actions.${i}.${"link"+t}`,render:({field:e})=>(0,n.jsxs)(y.eI,{className:"flex flex-col",children:[(0,n.jsx)(y.lR,{className:"",children:"L'URL"}),(0,n.jsx)(y.MJ,{children:(0,n.jsx)(w.p,{...e,onChange:t=>{e.onChange(t),S.setValue(`actions.${i}.pageId`,null)},value:e.value?.toString(),className:"outline-none outline-0 bg-white"})})]})}),(0,n.jsx)(y.zB,{control:S.control,name:`actions.${i}.pageId`,render:({field:e})=>(0,n.jsxs)(y.eI,{className:"flex flex-col",children:[(0,n.jsx)(y.lR,{className:"",children:"S\xe9lectionner l'url \xe0 partir d'une page"}),(0,n.jsx)(y.MJ,{children:(0,n.jsx)(j.B,{link:S.watch(`actions.${i}.${"link"+t}`),pageId:e.value,setLink:e=>S.setValue(`actions.${i}.${"link"+t}`,e),setPageId:e=>S.setValue(`actions.${i}.pageId`,e)})})]})})]})},l):null)]},i)},i)),(S.watch("actions")??[]).length<2&&(0,n.jsx)("div",{children:(0,n.jsxs)(u.$,{variant:"outline",className:"!px-2 h-auto cursor-pointer flex justify-start items-center",onClick:function(){let e=[...S.watch("actions")??[]];e.push({buttonTextEn:"",buttonTextNl:"",buttonTextFr:"",linkEn:"",linkNl:"",linkFr:""}),S.setValue("actions",e)},children:[(0,n.jsx)(o.A,{size:30}),(0,n.jsx)("span",{className:"text-sm font-medium text-slate-900",children:"Ajouter un deuxi\xe8me bouton"})]})}),(e?.config?.logoSecondary??"")!=""&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(v.w,{className:"my-2.5 text-slate-900"}),(0,n.jsxs)(s.tU,{defaultValue:"fr",className:"!gap-0 relative",children:[(0,n.jsx)("div",{className:"absolute top-[2px] flex gap-2 items-center",children:(0,n.jsx)("span",{className:"font-semibold",children:"Url du second logo"})}),(0,n.jsx)(s.j7,{className:"ml-auto bg-white !rounded-none !p-0 gap-0.5",children:f.e.map((t,i)=>("En"!=t||e?.config?.hasEnLng)&&("Nl"!=t||e?.config?.hasNlLng)?(0,n.jsx)(s.Xi,{value:t.toLowerCase(),className:"text-sm rounded-[4px_4px_0_0] bg-white border border-slate-900 text-slate-900 cursor-pointer !px-2.5 !py-2 !shadow-none data-[state=active]:bg-slate-900 data-[state=active]:text-white",children:(0,h.ZH)(f.tN.fr[t])},i):null)}),f.e.map((t,i)=>("En"!=t||e?.config?.hasEnLng)&&("Nl"!=t||e?.config?.hasNlLng)?(0,n.jsx)(s.av,{value:t.toLowerCase(),children:(0,n.jsxs)("div",{className:"relative -top-[1px] flex flex-col gap-5 bg-white px-2.5 py-5 border border-slate-900 rounded-[4px_0_4px_4px]",children:[(0,n.jsx)(y.zB,{control:S.control,name:`secondaryLogoUrl.${"link"+t}`,render:({field:e})=>(0,n.jsxs)(y.eI,{className:"flex flex-col",children:[(0,n.jsx)(y.lR,{className:"",children:"L'URL"}),(0,n.jsx)(y.MJ,{children:(0,n.jsx)(w.p,{...e,onChange:t=>{e.onChange(t),S.setValue("secondaryLogoUrl.pageId",null)},value:e.value?.toString(),className:"outline-none outline-0 bg-white"})})]})}),(0,n.jsx)(y.zB,{control:S.control,name:"secondaryLogoUrl.pageId",render:({field:e})=>(0,n.jsxs)(y.eI,{className:"flex flex-col",children:[(0,n.jsx)(y.lR,{className:"",children:"S\xe9lectionner l'url \xe0 partir d'une page"}
1),(0,n.jsx)(y.MJ,{children:(0,n.jsx)(j.B,{link:S.watch(`secondaryLogoUrl.${"link"+t}`),pageId:e.value,setLink:e=>S.setValue(`secondaryLogoUrl.${"link"+t}`,e),setPageId:e=>S.setValue("secondaryLogoUrl.pageId",e)})})]})})]})},i):null)]})]})]})})})})}),(0,n.jsx)(m.tb,{className:"border-t border-t-slate-500",children:(0,n.jsxs)("div",{className:"flex justify-between",children:[(e?.config?.actions??[])&&(0,n.jsx)(u.$,{variant:"ghost",type:"button",onClick:()=>{e?.id&&(k(!0),C.mutate({siteId:e?.id??0,data:{config:{...e?.config,actions:[]}}}),k(!1),t(!1))},children:"Supprimer les boutons"}),i?(0,n.jsx)(N.N,{}):(0,n.jsx)(u.$,{type:"button",onClick:S.handleSubmit(i=>{e?.id&&(k(!0),C.mutate({siteId:e?.id??0,data:{config:{...e?.config,...i}}}),k(!1),t(!1))}),children:"Enregister"})]})})]})};var C=i(51012),S=i(66474),$=i(47863),A=i(56671),I=i(45158);let F=({site:e,blocks:t,menuId:i,setBlocks:s,setIsOpen:a})=>{let r=C.n.use.siteMenu(),o=C.n.use.reload(),p=C.n.use.setReload(),[f,g]=(0,l.useState)(!1),[b,v]=(0,l.useState)([]),[j,w]=(0,l.useState)(null);(0,l.useEffect)(()=>{v(r)},[r]);let y=e=>{let t=b.find(e=>e.uid==j)?.children??[],i=e.map(e=>t.find(t=>t.uid==e));v(e=>e.map(e=>e.uid==j?{...e,children:i}:e))},k=async()=>{g(!0);try{await (0,I.t)(i,b),p(!o),a(!1),A.o.success("Succ\xe8s",{description:"Le changement effectu\xe9 sur le menu est bien enregistr\xe9"})}catch(e){console.log("Header Menu ====",e),A.o.error("Erreur",{description:"Une erreur est survenue, re-essayer plus tard"})}finally{g(!1)}};return j?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.F,{children:(0,n.jsx)("div",{className:"flex flex-col gap-2.5 m-4 mb-auto",children:b.filter(e=>!("MENU"===e.type&&(!e.children||0===e.children.length))).map((e,t)=>(0,n.jsxs)("div",{className:(0,h.cn)("group relative list-none whitespace-nowrap",e.hide&&"opacity-60"),children:[(0,n.jsxs)("a",{className:(0,h.cn)("flex items-center !text-slate-900 font-semibold text-sm justify-between p-2 bg-slate-50 opacity-75",j==e.uid&&"pointer-events-auto opacity-100 border border-slate-500"),onClick:()=>{w((e.children??[]).length>0&&e.uid!=j?e.uid:null)},children:[e.labelFr.toUpperCase(),(e.children??[]).length>0&&(j!=e.uid?(0,n.jsx)(S.A,{className:"ml-1 h-4 w-4"}):(0,n.jsx)($.A,{className:"ml-1 h-4 w-4"}))]}),j==e.uid&&(e.children??[]).length>0&&(0,n.jsx)(c.x,{axis:"y",values:e.children.map(e=>e.uid),onReorder:y,style:{display:"flex",flexDirection:"column",gap:"10px",flexWrap:"wrap",padding:"10px 0 10px 30px"},children:e.children.map((e,t)=>(0,n.jsx)(d.N,{value:e.uid,children:(0,n.jsx)("div",{className:(0,h.cn)("group relative list-none whitespace-nowrap"),children:(0,n.jsx)("a",{className:"block px-4 py-2 font-semibold text-sm uppercase !text-slate-900 p-2 border border-dashed border-slate-900 cursor-grab active:cursor-grabbing bg-slate-100",children:e.labelFr})},t)},e.uid))})]},t))})}),(0,n.jsx)(m.tb,{className:"border-t border-t-slate-500",children:(0,n.jsxs)("div",{className:"flex justify-between",children:[(0,n.jsx)(u.$,{variant:"ghost",type:"button",onClick:()=>a(!1),children:"Annuler"}),f?(0,n.jsx)(N.N,{}):(0,n.jsx)(u.$,{type:"button",onClick:k,children:"Enregister"})]})})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.F,{children:(0,n.jsx)("div",{className:"m-4 mb-auto",children:(0,n.jsx)(c.x,{axis:"y",values:b.filter(e=>!("MENU"===e.type&&(!e.children||0===e.children.length))).map(e=>e.uid),onReorder:i=>{let n=i.map(e=>b.find(t=>t.uid==e));if(v(n),e?.isSAP){let e=n.map(e=>t.find(t=>e.blockId?.toString()===t.blockId?.toString()||e.blockId?.toString()===t.blockParentId?.toString()));e&&s([...e])}},style:{display:"flex",flexDirection:"column",gap:"10px",flexWrap:"wrap"},children:b.filter(e=>!("MENU"===e.type&&(!e.children||0===e.children.length))).map((e,t)=>(0,n.jsx)(d.N,{value:e.uid,children:(0,n.jsx)("div",{className:(0,h.cn)("group relative list-none whitespace-nowrap",e.hide&&"opacity-50"),children:(0,n.jsxs)("a",{className:"flex items-center !text-slate-900 font-semibold text-sm justify-between p-2 border border-dashed border-slate-900 bg-slate-50 cursor-grab active:cursor-grabbing",onClick:(e.children??[]).length>0?()=>{w(e.uid)}:void 0,children:[e.labelFr.toUpperCase(),(e.children??[]).length>0&&(0,n.jsx)(S.A,{className:"ml-1 h-4 w-4"})]})},t)}
1,e.uid))})})}),(0,n.jsx)(m.tb,{className:"border-t border-t-slate-500",children:(0,n.jsxs)("div",{className:"flex justify-between",children:[(0,n.jsx)(u.$,{variant:"ghost",type:"button",onClick:()=>a(!1),children:"Annuler"}),f?(0,n.jsx)(N.N,{}):(0,n.jsx)(u.$,{type:"button",onClick:k,children:"Enregister"})]})})]})};var _=i(60377),E=i(74126),L=i(47368);let z=({site:e,setIsOpen:t})=>{let[i,r]=(0,l.useState)(!1),o=(0,p.A)(),c=(0,a.mN)({resolver:(0,g.u)(b.o2),defaultValues:{floatingButton:{buttonTextEn:"",buttonTextNl:"",buttonTextFr:"",linkEn:"",linkNl:"",linkFr:"",icon:void 0}}});return(0,l.useEffect)(()=>{e?.config?.floatingButton&&c.setValue("floatingButton",e?.config?.floatingButton)},[e]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.F,{children:(0,n.jsx)("div",{className:"m-4",children:(0,n.jsx)(y.lV,{...c,children:(0,n.jsx)("form",{className:"space-y-6",children:(0,n.jsxs)(s.tU,{defaultValue:"fr",className:"!gap-0 relative",children:[(0,n.jsx)(s.j7,{className:"ml-auto bg-white !rounded-none !p-0 gap-0.5",children:f.e.map((t,i)=>("En"!=t||e?.config?.hasEnLng)&&("Nl"!=t||e?.config?.hasNlLng)?(0,n.jsx)(s.Xi,{value:t.toLowerCase(),className:"text-sm rounded-[4px_4px_0_0] bg-white border border-slate-900 text-slate-900 cursor-pointer !px-2.5 !py-2 !shadow-none data-[state=active]:bg-slate-900 data-[state=active]:text-white",children:(0,h.ZH)(f.tN.fr[t])},i):null)}),f.e.map((t,i)=>("En"!=t||e?.config?.hasEnLng)&&("Nl"!=t||e?.config?.hasNlLng)?(0,n.jsx)(s.av,{value:t.toLowerCase(),children:(0,n.jsxs)("div",{className:"relative -top-[1px] flex flex-col gap-5 bg-white px-2.5 py-5 border border-slate-900 rounded-[4px_0_4px_4px]",children:[(0,n.jsx)(y.zB,{control:c.control,name:`floatingButton.${"buttonText"+t}`,render:({field:e})=>(0,n.jsxs)(y.eI,{className:"flex flex-col",children:[(0,n.jsx)(y.lR,{className:"",children:"Label"}),(0,n.jsx)(y.MJ,{children:(0,n.jsx)(w.p,{...e,value:e.value?.toString(),className:"outline-none outline-0 bg-white"})})]})}),(0,n.jsx)(y.zB,{control:c.control,name:"floatingButton.icon",render:({field:e})=>(0,n.jsxs)(y.eI,{className:"flex justify-between relative",children:[(0,n.jsx)(y.lR,{className:"",children:"Ic\xf4ne"}),(0,n.jsx)(y.MJ,{children:(0,n.jsxs)("div",{className:"flex gap-2.5 items-center",children:[(0,n.jsx)(L.IconPicker,{preselectedIcon:e.value,customButton:!0,onSelect:e=>c.setValue("floatingButton.icon",e)}),e.value&&(0,n.jsx)(u.$,{variant:"destructive",className:"w-8 h-8",onClick:()=>{c.setValue("floatingButton.icon",void 0)},children:(0,n.jsx)(E.A,{})})]})})]})}),(0,n.jsx)(y.zB,{control:c.control,name:`floatingButton.${"link"+t}`,render:({field:e})=>(0,n.jsxs)(y.eI,{className:"flex flex-col",children:[(0,n.jsx)(y.lR,{className:"",children:"L'URL"}),(0,n.jsx)(y.MJ,{children:(0,n.jsx)(w.p,{...e,onChange:t=>{e.onChange(t),c.setValue("floatingButton.pageId",null)},value:e.value?.toString(),className:"outline-none outline-0 bg-white"})})]})}),(0,n.jsx)(y.zB,{control:c.control,name:"floatingButton.pageId",render:({field:e})=>(0,n.jsxs)(y.eI,{className:"flex flex-col",children:[(0,n.jsx)(y.lR,{className:"",children:"S\xe9lectionner l'url \xe0 partir d'une page"}),(0,n.jsx)(y.MJ,{children:(0,n.jsx)(j.B,{link:c.watch(`floatingButton.${"link"+t}`),pageId:e.value,setLink:e=>c.setValue(`floatingButton.${"link"+t}`,e),setPageId:e=>c.setValue("floatingButton.pageId",e)})})]})})]})},i):null)]})})})})}),(0,n.jsx)(m.tb,{className:"border-t border-t-slate-500",children:(0,n.jsx)("div",{className:"flex justify-end",children:i?(0,n.jsx)(N.N,{}):(0,n.jsx)(u.$,{type:"button",onClick:c.handleSubmit(i=>{e?.id&&(r(!0),o.mutate({siteId:e?.id??0,data:{config:{...e?.config,...i}}}),r(!1),t(!1))},e=>console.log("====",e)),children:"Enregister"})})})]})},B=({site:e,blocks:t,menuId:i,setBlocks:l,setIsOpen:a})=>(0,n.jsxs)(s.tU,{defaultValue:"menu",className:"w-full flex-1 [&>div[data-state=inactive]]:!hidden",children:[(0,n.jsxs)(s.j7,{className:"w-[calc(100%_-_2em)] mt-4 mx-4 bg-slate-900 gap-1",children:[(0,n.jsx)(s.Xi,{className:"cursor-pointer flex-1 bg-transparent text-white hover:bg-[#FFFFFF22] data-[state=active]:bg-white data-[state=active]:text-slate-900",value:"menu",children:"Menu"}),(0,n.jsx)(s.Xi,{className:"cursor-pointer flex-1 bg-transparent text-white hover:bg-[#FFFFFF22] data-[state=active]:bg-white data-[state=active]:text-slate-900",value:"buttons",children:"Boutons & Logo"}),(0,n.jsx)(s.Xi,{className:"cursor-pointer flex-1 bg-transparent text-white hover:bg-[#FFFFFF22] data-[state=active]:bg-white data-[state=active]:text-slate-900",value:"images",children:"Biblioth\xe8que d'images"}),(0,n.jsx)(s.Xi,{className:"cursor-pointer flex-1 bg-transparent text-white hover:bg-[#FFFFFF22] data-[state=active]:bg-white data-[state=active]:text-slate-900",value:"floating",children:"Bouton flottant"})]}),(0,n.jsx)(s.av,{value:"menu",className:"flex flex-col justify-between",children:(0,n.jsx)(F,{site:e,blocks:t,menuId:i,setBlocks:l,setIsOpen:a})}),(0,n.jsx)(s.av,{value:"buttons",className:"flex flex-col justify-between",children:(0,n.jsx)(k,{site:e,setIsOpen:a})}),(0,n.jsx)(s.av,{value:"images",className:"flex flex-col justify-between",children:(0,n.jsx)(_.A,{canBeVideo:!0,setOpen:a})}),(0,n.jsx)(s.av,{value:"floating",className:"flex flex-col justify-between",children:(0,n.jsx)(z,{site:e,setIsOpen:a})})]})},2320:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>c});var n=i(95155),s=i(12115),l=i(74749),a=i(59434),r=i(25618);let o=({html:e})=>{let t=(0,s.useRef)(null);return(0,s.useEffect)(()=>
1{if(!t.current)return;t.current.innerHTML="";let i=Array.from(new DOMParser().parseFromString(e,"text/html").querySelectorAll("script")),n=e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,""),s=document.createElement("div");s.style.width="100%",s.innerHTML=n,t.current.appendChild(s),i.forEach(e=>{let i=document.createElement("script");Array.from(e.attributes).forEach(e=>i.setAttribute(e.name,e.value)),i.textContent=e.textContent,t.current?.appendChild(i)})},[e]),(0,n.jsx)("div",{ref:t,className:"w-full flex justify-center"})},c=({data:e=null,lng:t="fr",edit:i=!1,save:c,cancel:d,visibility:u,updateBlockContent:m})=>{let[x,p]=(0,s.useState)(e?.content),[f,h]=(0,s.useState)((0,a.ZH)(t)),g=(0,s.useRef)((0,a.ZH)(t)),b=e=>{g.current=e,h(e)},v=(0,s.useRef)(null),j=e=>{v.current=e,p(e)},{isMobile:N,isTablet:w}=(0,l.default)();if((0,s.useEffect)(()=>{j(e?.content)},[e]),(0,s.useEffect)(()=>{c&&m&&m(e?.uuid??"",x)},[c,m]),(0,s.useEffect)(()=>{d&&j(e?.content)},[d]),(0,s.useEffect)(()=>{b((0,a.ZH)(t))},[t]),(0,s.useEffect)(()=>{void 0!=u&&(x?.visibility??!0)!=u&&m&&m(e?.uuid??"",{...x,visibility:u})},[u]),i){let e=(x?.[`embeddedCode${f}`]??x?.embeddedCode??"").trim().length>0;return(0,n.jsxs)("div",{id:"embedded",className:"flex flex-col w-full h-full items-center relative gap-4",children:[(0,n.jsxs)("div",{className:"w-full",children:[(0,n.jsx)(r.H2,{className:"text-xl",children:"Code HTML \xe0 int\xe9grer"}),(0,n.jsx)("textarea",{value:x?.[`embeddedCode${f}`]??x?.embeddedCode??"",className:"w-full mt-2.5 p-2 bg-white border rounded-md font-mono text-sm min-h-[120px] resize-y",placeholder:"<tag>...</tag>",onChange:e=>(function({newEmbeddedCode:e=null}){j({...v.current,...e&&{[`embeddedCode${g.current}`]:e}})})({newEmbeddedCode:e.target.value})})]}),e?(0,n.jsx)("div",{className:"relative w-full bg-gray-100 rounded-2xl p-4 pointer-events-none",children:(0,n.jsx)(o,{html:x?.[`embeddedCode${f}`]??x.embeddedCode})}):(0,n.jsx)("div",{className:"flex w-full min-h-[200px] bg-gray-100 rounded-2xl items-center justify-center border-2 border-dashed border-gray-300",children:(0,n.jsx)("p",{className:"text-gray-400 text-md",children:"Aper\xe7u du code int\xe9gr\xe9"})})]})}return N||w?(0,n.jsx)("div",{id:"embedded",className:(0,a.cn)("flex flex-col items-center w-full gap-5",!(x?.visibility==void 0||x?.visibility)&&"opacity-50"),children:(0,n.jsx)("div",{className:"w-full flex justify-center my-4",children:(x?.[`embeddedCode${f}`]??x?.embeddedCode)&&(0,n.jsx)(o,{html:x?.[`embeddedCode${f}`]??x?.embeddedCodeFr??x.embeddedCode})})}):(0,n.jsx)("div",{id:"embedded",className:(0,a.cn)("flex flex-col items-center w-full gap-0",!(x?.visibility==void 0||x?.visibility)&&"opacity-50"),children:(0,n.jsx)("div",{className:"w-full flex justify-center p-4",children:x?.[`embeddedCode${f}`]??x?.embeddedCode?(0,n.jsx)(o,{html:x?.[`embeddedCode${f}`]??x?.embeddedCodeFr??x.embeddedCode}):(0,n.jsx)("div",{className:"flex w-full min-h-[200px] bg-gray-100 rounded-2xl items-center justify-center border-2 border-dashed border-gray-300",children:(0,n.jsx)("p",{className:"text-gray-400 text-md",children:"Aucun code int\xe9gr\xe9"})})})})}},2485:(e,t,i)=>{"use strict";i.d(t,{n:()=>C});var n=i(95155),s=i(12115),l=i(82940),a=i.n(l),r=i(16225);let o=(e,t="",i)=>{let{id:n,title:s,status:l,introduction:a,organization:r,category:o,type:d,isPrivate:h,isExternal:g,externalUrl:b,countLikes:v,countDislikes:j,countComments:N,publishedAt:w,social:y,language:k,readTime:C}=e,S={countLikes:v,countDislikes:j,countComments:N};return y&&(S={...S,isLiked:y.isLiked,isFavorite:y.isFavorite}),{id:n,title:s,status:l,introduction:a,communityName:r.abbreviation||(r.name.length<=30?r.name:r.name.substr(0,30)+"..."),category:{name:c(o,k),colorCode:o&&o.colorCode?o.colorCode:""},articleType:{name:c(d,k),colorCode:d&&d.colorCode?d.colorCode:""},url:`/${k}/article/${e.url}/${n}`,shareUrl:u(e,t,i),hasRelativePath:m(e,i),mainMedia:x(e),album:p(e),authors:f(e,k),isPrivate:h,isExternal:g,externalUrl:b,countLikes:v,countDislikes:j,countComments:N,publishedAt:w,socialData:S,language:k,readTime:C}},c=(e,t)=>{let i=`name${t.charAt(0).toUpperCase()+t.slice(1)}`;return e&&e[i]?e[i]:""},d=(e,t=0,i=0)=>{let n=e,s=!1;if(!e)return"";let l=e.split("."),a=l[l.length-1];return t>0&&(n+=`/w${t}`,s=!0),i>0&&(n+=`${t>0?"-":"/"}h${i}`,s=!0),n+=s?"-noEnlarge":"/noEnlarge",`${n}.${a}`.replace("https://s3.eu-west-1.amazonaws.com/tamtam","https://s3.tamtam.pro")},u=(e,t,i)=>{let{url:n,id:s,organization:l,language:a,isExternal:r,externalUrl:o}=e;if(r)return o;let c="https://blog.be.accountants",d="https://blog.forumforthefuture.be",u="https://blog.degandpartners.com";"local"===t?(c="http://local.blog.be.accountants:3000",d="http://local.blog.forumforthefuture.be:3000",u="http://local.blog.degandpartners.com:3000"):"v3"===t||"production"===t?(c="https://blog.be.accountants",d="https://blog.forumforthefuture.be",u="https://blog.degandpartners.com"):t&&(c=`https://blog.${t}.be.accountants`,d=`https://blog.${t}.forumforthefuture.be`,u=`https://blog.${t}.degandpartners.com`);let m=`/${a}/article/${n}/${s}`;if(l&&[8,9,4].includes(l.id)){if(9===l.id)return`${d}${m}`;else if(8===l.id)return`${c}${m}`;else if(4===l.id)return`${u}${m}`}return i?"local"===t?`http://${i}/${a}/article/${n}/${s}`:`https://${i}/${a}/article/${n}/${s}`:`/${a}/article/${n}/${s}`},m=(e,t)=>
1!t||(![8,9,4].includes(e)||!!t.includes({org_8:"be.accountants",org_9:"forumforthefuture.be",org_4:"degandpartners.com"}[`org_${e}`]))&&!!(t&&t.includes("blog.")),x=({main_media:e})=>{if(e)if(e.preview&&(e.preview.fullMediaUrl||e.preview.webPath))return e.preview.fullMediaUrl?e.preview.fullMediaUrl:r.gs+"/"+e.preview.webPath;else if(e.fullCroppedWebPath)return e.fullCroppedWebPath;else return e.fullMediaUrl?e.fullMediaUrl:e.webPath?`${r.gs}/${e.webPath}`:"";return"/img/article-cover-small.jpg"},p=({albums:e})=>{let t=null;return e&&e.length>0&&(t=e[0].medias.map(e=>{let t=e.preview&&(e.preview.fullMediaUrl||e.preview.webPath)?e.preview.fullMediaUrl?e.preview.fullMediaUrl:`${r.gs}/${e.preview.webPath}`:e.fullMediaUrl?e.fullMediaUrl:e.webPath?`${r.gs}/${e.webPath}`:"";return{id:e.id,path:t}})),t},f=({author:e,chains:t},i="fr")=>{let n=[],s=[];if(e&&e.length>0&&(n=e.filter(e=>!0===e.enableAvatar).map(e=>({id:e.id,name:e.firstName+" "+e.lastName,headline:e.signature.head,avatar:e.avatar,avatarUrl:e.avatarUrl,url:`/${i}/author/${e.url}/${e.id}`}))),t&&t.length>0){let e=`name${i.charAt(0).toUpperCase()+i.slice(1)}`;s=t.map(t=>{let n=null;t.mediaChain&&t.mediaChain.length>0&&t.mediaChain.forEach(e=>{e.language===i&&(n=e)});let s=t[`name${i.charAt(0).toUpperCase()}${i.slice(1)}`],l=`/${i}/chain/${s?h(s):"-"}/${t.id}`;return{id:t.id,name:t[e],headline:t.headline,avatar:n?n.avatar:"",avatarUrl:n?n.avatarUrl:"",url:l}})}return[...n,...s]}
1,h=e=>{e=(e=e.replace(/^\s+|\s+$/g,"")).toLowerCase();let t="\xe3\xe0\xe1\xe4\xe2ẽ\xe8\xe9\xeb\xea\xec\xed\xef\xee\xf5\xf2\xf3\xf6\xf4\xf9\xfa\xfc\xfb\xf1\xe7\xb7/_,:;";for(let i=0,n=t.length;i<n;i++)e=e.replace(RegExp(t.charAt(i),"g"),"aaaaaeeeeeiiiiooooouuuunc------".charAt(i));return e=e.replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")};var g=i(43110),b=i.n(g);let v=({author:e,white:t})=>{let{name:i,headline:s,avatarUrl:l}=e;return(0,n.jsx)("div",{className:b().avatarContainer,children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:b().avatar_bg,children:l?(0,n.jsx)("div",{className:b().avatar,style:{backgroundImage:`url(${d(l,68)})`}}):(0,n.jsx)("div",{className:`${b().avatar} ${b().emptyAvatar}`,children:i?.charAt(0).toUpperCase()})}),(0,n.jsxs)("div",{className:b().avatarInfo,children:[(0,n.jsx)("div",{className:b().avatarName,style:{color:t?"#fff":"#3c4e64"},children:i}),s&&(0,n.jsx)("div",{className:b().avatarSignature,style:{color:t?"#fff":"#6d7f92"},children:s})]})]})})};var j=i(57775),N=i.n(j),w=i(54165);let y=({articleUrl:e,modalOpen:t,closeModal:i})=>(0,n.jsx)(w.lG,{open:t,onOpenChange:e=>{e||i()},children:(0,n.jsx)(w.Cf,{className:"max-w-[90%] h-[90%] md:max-w-[65%] md:h-[95%]",onInteractOutside:e=>{e.preventDefault()},children:e&&(0,n.jsx)("iframe",{className:"w-full h-full shadow-none bg-[color:var(--text-black-color)] border-[none]",src:e,allow:"camera;microphone;autoplay;fullscreen"})})});var k=i(59434);let C=({article:e,type:t,env:i,size:l,isFetching:c,onLike:u,onDislike:m,saveFavorite:x,openModal:p,articleId:f,isSavingFavorite:h,isSavingLike:g,isSavingDislike:b,user:j,token:w,Link:C,host:S,queryParams:$,i18n:A})=>
1{let[I,F]=(0,s.useState)(!1),[_,E]=(0,s.useState)(!1),{id:L,title:z,url:B,shareUrl:T,introduction:P,communityName:R,category:M,articleType:D,mainMedia:O,status:U,isPrivate:V,isExternal:q,publishedAt:H,countLikes:Z,countDislikes:J,countComments:G,authors:W,socialData:Q,hasRelativePath:K,language:Y,readTime:X}=o(e,i,S),ee=(e=!1)=>q?(0,n.jsx)("div",{className:N().isExternal}):(0,n.jsx)("div",{className:`${N().authorsContainer} ${N().authorsContainer_width}`,children:(0,n.jsx)("ul",{children:W.map(t=>(0,n.jsx)("li",{children:(0,n.jsx)(v,{author:t,white:e,Link:C,queryParams:$})},`author-${L}-${t.id}`))})}),et=()=>(0,n.jsxs)("h3",{className:N().title,onClick:()=>E(!0),children:[z," ",V&&(0,n.jsx)("i",{className:"icon-sb-premium"})]}),ei=()=>q?(0,n.jsx)("a",{href:B,target:"_blank",rel:"noreferrer",className:N().title,children:(0,n.jsx)("h3",{children:z})}):et(),en=()=>H?(0,n.jsxs)("div",{className:N().publishedAtReadTime,children:[A.article.publishedOn,function(e,t,i,n){if(!e)return"";let s=new Date().getTimezoneOffset();return a()(e,[i]).locale(t).subtract(s,"minutes").format(n)}(H,Y,"YYYY-MM-DD HH:mm:ss"," DD MMM YYYY "+A.article.atText+" HH:mm"),X&&(0,n.jsxs)("div",{className:N().readTime,children:[(0,n.jsx)("div",{className:N().dot}),(0,n.jsxs)("span",{children:[A.article.reading," ",X,"min"]})]})]}):null,es=()=>j?(0,n.jsxs)("div",{className:N().userActions,children:[(0,n.jsx)("hr",{}),(0,n.jsxs)("div",{className:N().actions,children:[(0,n.jsxs)("div",{className:(0,k.cn)(N().likes,1===Q.isLiked&&N().likesActive),onClick:()=>u(),children:[(0,n.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M17 4.5C14.9 4.5 13.05 5.55 12 7.2C10.95 5.55 9.1 4.5 7 4.5C3.7 4.5 1 7.2 1 10.5C1 16.45 12 22.5 12 22.5C12 22.5 23 16.5 23 10.5C23 7.2 20.3 4.5 17 4.5Z",fill:"currentColor"})}),Z>0&&Z]}),(0,n.jsxs)("div",{className:N().comments,onClick:()=>p(),children:[(0,n.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M12 2C5.92422 2 1 6.00039 1 10.9375C1 13.0688 1.91953 15.0195 3.44922 16.5535C2.91211 18.7191 1.11602 20.6484 1.09453 20.6699C1 20.7687 0.974219 20.9148 1.03008 21.0438C1.08594 21.1727 1.20625 21.25 1.34375 21.25C4.19258 21.25 6.32813 19.8836 7.38516 19.0414C8.79023 19.5699 10.35 19.875 12 19.875C18.0758 19.875 23 15.8746 23 10.9375C23 6.00039 18.0758 2 12 2Z",fill:"currentColor"})}),G>0&&G]}),(0,n.jsxs)("div",{className:N().share,children:[(0,n.jsx)("span",{onClick:()=>F(!I),children:A.article.share}),(0,n.jsxs)("div",{className:(0,k.cn)(N().sharePopup,I?"show":"hide"),children:[(0,n.jsx)("a",{className:N().action,href:`https://www.facebook.com/sharer/sharer.php?u=${T}`,target:"_blank",rel:"noreferrer",children:(0,n.jsx)("i",{className:"icon-sb-facebook"})}),(0,n.jsx)("a",{className:N().action,href:`https://www.linkedin.com/sharing/share-offsite/?url=${T}`,target:"_blank",rel:"noreferrer",children:(0,n.jsx)("i",{className:"icon-sb-linkedin"})}),(0,n.jsx)("a",{className:N().action,href:`https://twitter.com/intent/tweet?url=${T}`,target:"_blank",rel:"noreferrer",children:(0,n.jsx)("i",{className:"icon-sb-twitter"})})]})]})]})]}):null,el=()=>{let t=`${r.W1}/${e.language}/articleframe/${e.id}`;if(j){let e=["token="+w,"userId="+j.id];t+="?params="+encodeURIComponent((0,k.r9)(e.join()))}return(0,n.jsx)(y,{articleUrl:t,modalOpen:_,closeModal:e=>{E(!1)}})};switch(t){case"type5":default:return(0,n.jsxs)("div",{className:(0,k.cn)("hover:shadow-2",`${N().articleTemplate5}`),children:[(0,n.jsx)("div",{className:(0,k.cn)(N().contentImg),style:{backgroundImage:`url(${d(O,void 0,432)})`},children:(0,n.jsxs)("div",{className:N().categoryChannel,children:[(0,n.jsx)("div",{className:N().category,style:{background:`${M.colorCode}`},children:M.name}),e.avatars&&e.avatars.length>0&&(0,n.jsx)("div",{className:N().channel,style:{backgroundImage:`url(${e.avatars[0].avatarUrl})`}})]})}),(0,n.jsxs)("div",{className:N().content,children:[ee(),(0,n.jsx)("div",{className:"line-clamp-3",children:ei()})]}),(0,n.jsxs)("div",{className:N().bottomAction,children:[en(),es()]}),el()]});case"type7":return(0,n.jsxs)("div",{className:`${N().articleTemplate7} ${N()[l]}`,children:[(0,n.jsxs)("div",{className:(0,k.cn)(N().contentImg),style:{backgroundImage:`url(${d(O,void 0,432)})`},children:[(0,n.jsxs)("div",{className:N().categoryChannel,children:[(0,n.jsx)("div",{className:N().category,style:{background:`${M.colorCode}`},children:M.name}),e.avatars&&e.avatars.length>0&&(0,n.jsx)("div",{className:N().channel,style:{backgroundImage:`url(${e.avatars[0].avatarUrl})`}})]}),(0,n.jsxs)("div",{className:N().meta,children:[D&&D.name?(0,n.jsx)("span",{children:D.name}):null,(0,n.jsx)("div",{className:N().community,style:{borderLeftColor:M.colorCode},children:R}),e?.fffLibrary==="ACCEPTED"&&(0,n.jsx)("div",{className:N().fff_lib,style:{background:`${M.colorCode}`},children:"oFFFcourse lib"})]}),ei(),ee(!0),(0,n.jsxs)("div",{className:N().bottomAction,children:[en(),es()]})]}),el()]});case"featured":return(0,n.jsx)("div",{className:`${N().articleFeatured}`,children:(0,n.jsx)("div",{className:N().articleContainer,children:(0,n.jsxs)("div",{className:(0,k.cn)(N().contentImg),style:{backgroundImage:`url(${d(O,void 0,432)})`},children:[(0,n.jsxs)("div",{className:N().categoryChannel,children:[(0,n.jsx)("div",{className:N().category,style:{background:`${M.colorCode}`},children:M.name}),e.avatars&&e.avatars.length>0&&(0,n.jsx)("div",{className:N().channel,style:{backgroundImage:`url(${e.avatars[0].avatarUrl})`}})]}),(0,n.jsxs)("div",{className:N().metaBox,children:[(0,n.jsxs)("div",{className:N().meta,children:[D&&D.name?(0,n.jsx)("span",{children:D.name}):null,(0,n.jsx)("div",{className:N().community,style:{borderLeftColor:M.colorCode},children:R}),e?.fffLibrary==="ACCEPTED"&&(0,n.jsx)("div",{className:N().fff_lib,style:{background:`${M.colorCode}`},children:"oFFFcourse lib"})]}),ei()]}),(0,n.jsxs)("div",{className:N().bottomAction,children:[ee(!0),en(),es()]})]})})})}}},2706:(e,t,i)=>{"use strict";let n;i.d(t,{CX:()=>m,G6:()=>r,M3:()=>o,Ou:()=>a,RI:()=>u,Se:()=>d,UC:()=>x,f3:()=>c});var s=i(16225),l=i(93331);let a=(e,t,i,n,a)=>{let r=`${s.gs}/blog/article`,o={access_token:e,filter:JSON.stringify([{property:"language",value:i,operator:"eq"},{property:"organization.id",value:t,operator:"eq"}]),sort:JSON.stringify([{property:"publishedAt",dir:"desc"}]),fields:JSON.stringify([{entity:"article",fields:["id","language","isPrivate","isExternal","externalUrl","csScope","readTime","relevance","featured","countLikes","countDislikes","countComments","title","url","fffLibrary","relatedArticles"]},{entity:"main_media",fields:["id","yPos","yHeight","webPath","path"]}
1,{entity:"author",fields:{author:["id","enableAvatar"],user:["id","firstName","lastName","url","avatar","isStrict"]}},{entity:"type",fields:["id","nameFr"]},{entity:"chains",fields:["id","nameFr","mediaChain"]},{entity:"category",fields:["id","nameFr","colorCode"]},{entity:"organization",fields:["id","name","url","abbreviation","avatarWebPath"]},{entity:"organizationSource",fields:["id","name","url","abbreviation","avatarWebPath"]},{entity:"social",fields:[]}]),start:a,limit:n,isCustomFields:1,workspace:"fiduciary"};return l.A.get(r,{params:o,headers:{Accept:"*/*,app=siteBuilder"}})},r=({token:e,communityIds:t,search:i,language:a,limit:r,start:o})=>{let c=`${s.gs}/blog/article`,d={access_token:e,filter:JSON.stringify([{property:"oFFFcourse",value:null,operator:"null"},{property:"language",value:a,operator:"eq"},{property:"organization.id",value:t,operator:"in"},{property:"word",value:encodeURI(i),operator:"like"}]),sort:JSON.stringify([{property:"publishedAt",dir:"desc"}]),fields:JSON.stringify([{entity:"article",fields:["id","language","isPrivate","isExternal","externalUrl","csScope","readTime","relevance","featured","countLikes","countDislikes","countComments","title","url","fffLibrary","relatedArticles"]},{entity:"main_media",fields:["id","yPos","yHeight","webPath","path"]},{entity:"author",fields:{author:["id","enableAvatar"],user:["id","firstName","lastName","url","avatar","isStrict"]}},{entity:"type",fields:["id","nameFr"]},{entity:"chains",fields:["id","nameFr","mediaChain"]},{entity:"category",fields:["id","nameFr","colorCode"]},{entity:"organization",fields:["id","name","url","abbreviation","avatarWebPath"]},{entity:"organizationSource",fields:["id","name","url","abbreviation","avatarWebPath"]},{entity:"social",fields:[]}]),start:o,limit:r,isCustomFields:1};return n&&n.cancel(),n=l.A.CancelToken.source(),l.A.get(c,{params:d,cancelToken:n.token,headers:{Accept:"*/*,app=siteBuilder"}})},o=({token:e,communityId:t,language:i,start:n,limit:a})=>{let r=`${s.gs}/blog/article`,o={access_token:e,filter:JSON.stringify([{property:"oFFFcourse",value:null,operator:"null"},{property:"language",value:i,operator:"eq"},{property:"organization.id",value:[9],operator:"in"}]),sort:JSON.stringify([{property:"publishedAt",dir:"desc"}]),fields:JSON.stringify([{entity:"article",fields:["id","language","isPrivate","isExternal","externalUrl","csScope","readTime","relevance","featured","countLikes","countDislikes","countComments","title","url","fffLibrary","relatedArticles"]},{entity:"main_media",fields:["id","yPos","yHeight","webPath","path"]},{entity:"author",fields:{author:["id","enableAvatar"],user:["id","firstName","lastName","url","avatar","isStrict"]}},{entity:"type",fields:["id","nameFr"]},{entity:"chains",fields:["id","nameFr","mediaChain"]},{entity:"category",fields:["id","nameFr","colorCode"]},{entity:"organization",fields:["id","name","url","abbreviation","avatarWebPath"]},{entity:"organizationSource",fields:["id","name","url","abbreviation","avatarWebPath"]},{entity:"social",fields:[]}]),start:n,limit:a,isCustomFields:1,workspace:"offfcourse"};return l.A.get(r,{params:o,headers:{Accept:"*/*,app=siteBuilder"}})},c=({token:e,communityId:t,excludedIds:i=[],language:n,limit:a,start:r})=>{let o=`${s.gs}/blog/article`,c=[{property:"oFFFcourse",value:null,operator:"null"},{property:"language",value:n,operator:"eq"},{property:"organization.id",value:t,operator:"neq"},{property:"canBeShared",value:!0,operator:"eq"}];i.length>0&&c.push({property:"id",value:i,operator:"nin"});let d={access_token:e,filter:JSON.stringify(c),sort:JSON.stringify([{property:"publishedAt",dir:"desc"}]),fields:JSON.stringify([{entity:"article",fields:["id","language","isPrivate","isExternal","externalUrl","csScope","readTime","relevance","featured","countLikes","countDislikes","countComments","title","url","fffLibrary","relatedArticles"]},{entity:"main_media",fields:["id","yPos","yHeight","webPath","path"]},{entity:"author",fields:{author:["id","enableAvatar"],user:["id","firstName","lastName","url","avatar","isStrict"]}},{entity:"type",fields:["id","nameFr"]},{entity:"chains",fields:["id","nameFr","mediaChain"]},{entity:"category",fields:["id","nameFr","colorCode"]},{entity:"organization",fields:["id","name","url","abbreviation","avatarWebPath"]},{entity:"organizationSource",fields:["id","name","url","abbreviation","avatarWebPath"]},{entity:"social",fields:[]}]),start:r,limit:a,isCustomFields:1,workspace:"rss"};return l.A.get(o,{params:d,headers:{Accept:"*/*,app=siteBuilder"}})},d=({token:e,community:t,file:i})=>{let n=`${s.gs}/media/media`,a=new FormData;return a.append("access_token",e),a.append("organization",`${t.id}`),a.append("file",i),l.A.post(n,a,{headers:{Accept:"*/*,app=siteBuilder"}})},u=async({token:e,limit:t,start:i})=>{let n=`${s.gs}/blog/page/faq-rubrics`,{data:a}=await l.A.get(n,{params:{access_token:e,filter:JSON.stringify([{property:"organization",value:9,operator:"eq"}]),limit:t,start:i??0},headers:{Accept:"*/*,app=siteBuilder"}});return a},m=async(e,t)=>{let i=`${s.gs}/event/event/super-tags`,{data:n}=await l.A.get(i,{params:{access_token:e,languages:t},headers:{Accept:"*/*,app=siteBuilder"}});return n},x=async(e,t)=>{let i=`${s.gs}/event/city/get-community-cities`,{data:n}=await l.A.get(i,{params:{access_token:e,communityId:t},headers:{Accept:"*/*,app=siteBuilder"}});return n}},2714:e=>{e.exports={languageOptions:"LanguageSelector_languageOptions__B5G9K",currentLang:"LanguageSelector_currentLang__Jwi_D"}},3055:(e,t,i)=>{"use strict";i.d(t,{A:()=>F});var n=i(95155),s=i(60377),l=i(502),a=i(12115),r=i(60379),o=i(30285),c=i(54165
1),d=i(59434),u=i(56586),m=i(3446);let x=({buttonTitle:e,imageUrl:t,buttonClassname:i,setCroppedArea:s})=>{let[l,r]=(0,a.useState)(void 0),[x,p]=(0,a.useState)({x:0,y:0}),[f,h]=(0,a.useState)(1),g=(0,a.useCallback)((e,t)=>{r(t)},[]);return(0,n.jsxs)(c.lG,{children:[(0,n.jsx)(c.zM,{asChild:!0,children:(0,n.jsxs)(o.$,{variant:"outline",className:(0,d.cn)("text-slate-900 w-9 h-9 rounded-full flex justify-center items-center hover:bg-accent",i),children:[(0,n.jsx)(u.A,{className:"size-5"}),!!e&&e]})}),(0,n.jsxs)(c.Cf,{"aria-describedby":"image-resizer",children:[(0,n.jsx)(c.c7,{children:(0,n.jsx)(c.L3,{children:"Rogner l'image"})}),(0,n.jsx)("div",{className:"relative grid gap-4 w-full h-[20rem]",children:(0,n.jsx)(m.Ay,{image:t,crop:x,zoom:f,minZoom:.25,restrictPosition:!1,onZoomChange:h,onCropChange:p,onCropComplete:g})}),(0,n.jsxs)(c.Es,{children:[(0,n.jsx)(c.HM,{asChild:!0,children:(0,n.jsx)(o.$,{variant:"outline",children:"Annuler"})}),(0,n.jsx)(c.HM,{asChild:!0,children:(0,n.jsx)(o.$,{type:"submit",onClick:()=>{s(l)},children:"Enregistrer"})})]})]})]})};var p=i(42337),f=i(74126),h=i(78749),g=i(92657),b=i(27213),v=i(1392),j=i(76028),N=i(5953),w=i(66140),y=i(66766),k=i(47368),C=i(59959),S=i(62523),$=i(26258),A=i(56671);let I=[["flex-start","flex-start"],["flex-start","center"],["flex-start","flex-end"],["center","flex-start"],["center","center"],["center","flex-end"],["flex-end","flex-start"],["flex-end","center"],["flex-end","flex-end"]];function F({labelClassname:e,iconClassname:t,iconToolsClassname:i,imageUrl:c,croppedImageUrl:u,videoUrl:m,pdfUrl:F,setImageUrl:_,setCroppedImageUrl:E,setCroppedArea:L,setVideoUrl:z,setPdfUrl:B,updateElement:T,removeImage:P,iconName:R,iconColor:M,iconBgColor:D,iconFinalSize:O,iconVerticalAlign:U,iconHorizontalAlign:V,iconOriginalSize:q,hideImage:H,canbeVideo:Z=!1,canbePdf:J=!1,noIconPicker:G=!1}){let[W,Q]=(0,a.useState)(!1),[K,Y]=(0,a.useState)(!1),[X,ee]=(0,a.useState)(!0),[et,ei]=(0,a.useState)([U??"center",V??"center"]),[en,es]=(0,a.useState)(null),[el,ea]=(0,a.useState)(D),[er,eo]=(0,a.useState)(M),ec=(0,$.x)(()=>Y(!1)),ed=(0,a.useRef)(null),eu=(0,a.useRef)(null),em=(0,a.useRef)(q??null),ex=(0,$.x)(()=>ee(!1));(0,a.useEffect)(()=>{if(ed.current&&R){let e=window.getComputedStyle(ed.current).fontSize;!em.current&&(null!=en||q?q&&(em.current=q):em.current=e),es(e)}else null!=en&&es(null)},[ed,R]),(0,a.useEffect)(()=>{ea(D)},[D]),(0,a.useEffect)(()=>{eo(M)},[M]),(0,a.useEffect)(()=>{if(null!=en&&en!=O){if(q){let e=Number(q.replace("px",""));if(Number(en.replace("px",""))>e){es(q),A.o.error(`La taille maximale acc\xe9pt\xe9e pour ce block est ${q}`);return}}eu.current&&clearTimeout(eu.current),eu.current=setTimeout(()=>{T({newIconSize:en,...!q&&{newIconOriginalSize:en}})},500)}},[en]),(0,a.useEffect)(()=>{!K&&ed.current&&R&&((U??"center")!=et[0]||(V??"center")!=et[1])&&T({newIconVerticalAlign:et[0],newIconHorizontalAlign:et[1]})},[K]);let ep=(0,a.useMemo)(()=>{if(em.current&&O){let e=Number(em.current.replace("px",""));return Math.round(Number(O.replace("px",""))/e*100)}return null},[em,O]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:(0,d.cn)(e,H&&"opacity-75"),children:(0,n.jsxs)("div",{className:"relative w-full h-full rounded-2xl flex items-center justify-center",children:[(0,n.jsxs)("div",{className:(0,d.cn)("relative bg-gray-200 w-full h-full rounded-2xl shrink-0",c&&"bg-white"),style:{background:D??"",height:ep?`${ep}%`:""},children:[!R&&(m&&""!=m?(0,n.jsx)(r.default,{video:m,thumbnail:c??""}):(0,n.jsx)(n.Fragment,{children:u&&""!==u&&(0,n.jsx)(y.default,{src:u,alt:"Uploaded",className:"w-full h-full object-cover rounded-2xl",fill:!0})})),R&&(0,n.jsx)(k.IconRenderer,{name:R,className:(0,d.cn)(t),color:M,ref:ed,style:{fontSize:O??"",justifyContent:V??"center",alignItems:U??"center"}})]}),(0,n.jsxs)("div",{className:"absolute rounded-xl w-full h-full bg-[#00000022] top-[50%] left-[50%] flex flex-col gap-2 justify-center items-center text-white -translate-x-[50%] -translate-y-[50%] cursor-pointer",onClick:()=>{Q(!0)},children:[(0,n.jsx)(p.A,{size:30}),(0,n.jsx)("span",{className:"text-center text-base",children:Z?"Charger une image ou une vid\xe9o":"Charger une image"})]}),c&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{title:"Rogner l'image",className:"absolute top-2 right-2 z-[5]",onClick:e=>e.stopPropagation(),"data-action":"image-crop",children:(0,n.jsx)(x,{imageUrl:c,setCroppedArea:L})}),(0,n.jsx)("div",{title:"Supprimer l'image",className:"absolute top-2 right-[3rem] z-[5] bg-white cursor-pointer text-red-500 w-9 h-9 !rounded-full flex justify-center items-center hover:bg-accent",onClick:e=>{e.preventDefault(),e.stopPropagation(),P()},"data-action":"image-delete",children:(0,n.jsx)(f.A,{className:"size-5"})})]}),void 0!=H&&(0,n.jsx)("div",{title:"Cacher l'image",className:(0,d.cn)("absolute top-2 right-[5.5rem] z-[5] bg-white cursor-pointer text-slate-900 w-9 h-9 !rounded-full flex justify-center items-center hover:bg-accent",!c&&"!right-2"),onClick:e=>{e.preventDefault(),e.stopPropagation(),T({newHideImage:!H})},"data-action":"image-hide",children:H?(0,n.jsx)(h.A,{size:20}):(0,n.jsx)(g.A,{size:20})}),G?(0,n.jsx)(o.$,{type:"button",variant:"outline",className:(0,d.cn)("bg-white cursor-pointer w-10 h-10 rounded-full flex justify-center items-center hover:bg-accent absolute bottom-4 left-2 z-[5] !p-0"),onClick:()=>{Q(!0)},children:(0,n.jsx)(b.A,{className:"!size-5"})}):(0,n.jsx)(k.IconPicker,{onSelect:e=>T({newIconName:e}),ref:ex}),R&&(0,n.jsx)(o.$,{variant:"outline",onClick:()=>ee(!X),className:(0,d.cn)("bg-white cursor-pointer w-9 h-9 rounded-full flex justify-center items-center absolute bottom-4 left-12 z-[5]",X&&R&&"!bg-blue-400 !text-white"),children:(0,n.jsx)(v.A,{})}),R&&X&&(0,n.jsxs)("div",{className:(0,d.cn)("absolute bottom-4 left-12 translate-y-2 flex gap-2 z-[10] bg-white p-2 rounded-md items-center border border-slate-500 flex-wrap",i),onClick:e=>{e.stopPropagation()},children:[(0,n.jsx)("div",{"data-action":"icons-color-picker",children:(0,n.jsxs)("div",{title:"Couleur",className:"flex items-center gap-1 p-0.5 pl-1 text-slate-700 rounded-full",onClick:e=>e.stopPropagation(),children:[(0,n.jsx)(j.A,{size:20}),(0,n.jsx)(C.s,{onChange:e=>eo(e),className:"rounded-full border-slate-400 w-8 h-8 !mt-0","aria-describedby":"
1color-picker",value:er??"#000000",onOpenChange:function(){er!=(M??"#000000")&&T({newIconColor:er})}})]})}),(0,n.jsx)("div",{className:"h-8 w-px bg-slate-200"}),(0,n.jsx)("div",{"data-action":"icons-bg-picker",children:(0,n.jsxs)("div",{title:"Arri\xe8re-plan",className:"flex items-center gap-1 p-0.5 pl-1 text-slate-700 rounded-full",onClick:e=>e.stopPropagation(),children:[(0,n.jsx)(N.A,{size:20}),(0,n.jsx)(C.s,{onChange:e=>ea(e),className:"rounded-full border-slate-400 w-8 h-8 !mt-0","aria-describedby":"color-picker",value:el??"#FFFFFF00",onOpenChange:function(){el!=(D??"#FFFFFF00")&&T({newIconBgColor:el})}})]})}),(0,n.jsx)("div",{className:"h-8 w-px bg-slate-200"}),(0,n.jsxs)("div",{className:"flex items-center gap-1 h-fit","data-action":"icons-size-input",children:[(0,n.jsx)(w.A,{size:20}),(0,n.jsx)(S.p,{value:en?.replace("px","")??void 0,className:"bg-white w-[6ch] h-8 !outline-none !ring-none !border-slate-400 rounded-md",onChange:({target:e})=>{var t;Number(t=e.value)&&es(`${t}px`)}})]}),(0,n.jsx)("div",{className:"h-8 w-px bg-slate-200"}),(0,n.jsx)("div",{title:"Alignement",className:"flex items-center gap-2","data-action":"icons-alignment",ref:ec,children:(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("div",{className:"flex rounded-md w-8 h-8 p-1 cursor-pointer border border-slate-400",style:{background:D??"#ffffff00",justifyContent:et[1],alignItems:et[0]},onClick:()=>{Y(!K)},children:(0,n.jsx)("div",{className:"w-4 h-4 rounded-sm",style:{background:M??"#000000"}})}),K&&(0,n.jsx)("div",{className:"absolute -right-2 bottom-11 z-[11] grid grid-cols-3 gap-2.5 p-2.5 bg-white rounded-md w-[148px] border border-slate-500",children:I.map((e,t)=>(0,n.jsx)("div",{className:(0,d.cn)("flex rounded-md w-9 h-9 p-1 cursor-pointer border border-slate-900",et[1]==e[1]&&et[0]==e[0]&&"border-[4px] border-sky-500"),style:{background:D??"#ffffff00",justifyContent:e[1],alignItems:e[0]},onClick:()=>{ei(e)},children:(0,n.jsx)("div",{className:"w-4 h-4 rounded-sm",style:{background:M??"#000000"}})},t))})]})})]})]})}),(0,n.jsx)(l.A,{title:z||!_?"S\xe9lectionner une image ou une vid\xe9o":"S\xe9lectionner une image",isOpen:W,setIsOpen:Q,children:(0,n.jsx)(s.A,{canBeVideo:Z,canBePdf:J,setImageUrl:_,updateElement:T,setCroppedImageUrl:E,setVideoUrl:z,setPdfUrl:B,setOpen:Q})})]})}},5580:(e,t,i)=>{"use strict";i.d(t,{R:()=>s});var n=i(34477);let s=(0,n.createServerReference)("60d9093942ee1cbb0a87aa7d2d8a8242f0924f7f64",n.callServer,void 0,n.findSourceMapURL,"putPageAction")},8117:(e,t,i)=>{"use strict";i.d(t,{PdfViewer:()=>c});var n=i(95155),s=i(12115),l=i(66766),a=i(59434),r=i(54165),o=i(30285);let c=({pdfUrl:e,thumbnailUrl:t,className:i,style:c,viewLabel:d,sizes:u="100vw"})=>
1{let[m,x]=(0,s.useState)(!1);return(0,n.jsxs)("div",{className:"relative w-full h-full group",children:[t?(0,n.jsx)(l.default,{src:t,alt:"PDF Thumbnail",className:(0,a.cn)("w-full h-full object-cover rounded-2xl",i),style:c,fill:!0,sizes:u}):(0,n.jsx)("div",{className:(0,a.cn)("w-full h-full flex items-center justify-center bg-slate-100 rounded-2xl",i),style:c,children:(0,n.jsx)("span",{className:"text-slate-500 text-sm font-medium",children:"PDF"})}),(0,n.jsx)("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",children:(0,n.jsx)(o.$,{size:"sm",className:"bg-black/70 hover:bg-black/90 text-white text-xs px-4 py-2 rounded-lg cursor-pointer whitespace-nowrap",onClick:e=>{e.stopPropagation(),x(!0)},children:d||"View"})}),(0,n.jsx)(r.lG,{open:m,onOpenChange:e=>{x(e)},children:(0,n.jsx)(r.Cf,{className:"max-w-[90%] h-[90%] md:max-w-[80%] md:h-[95%] bg-slate-900 border-none [&>button]:bg-white [&>button]:opacity-100 [&>button]:p-1 [&>button]:rounded-sm p-0",children:(0,n.jsx)("iframe",{src:e,className:"w-full h-full rounded-md",title:"PDF Viewer"})})})]})}},10463:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>_});var n=i(95155),s=i(27677),l=i(25618),a=i(97469),r=i(502),o=i(60377),c=i(30285),d=i(35918),u=i(59434),m=i(62525),x=i(84355),p=i(12115);let f=({cardPosition:e,data:t=null,lng:i="fr",edit:s=!1,cancel:l=!1,isMobile:a=!1,isModal:f,handleReadMore:h,updateElementList:g,deleteTestimonial:b})=>{let v=(0,u.ZH)(i),j="https://tamtam.s3.eu-west-1.amazonaws.com/default_avatar.webp",[N,w]=(0,p.useState)(t),y=(0,p.useRef)(null),k=(0,p.useRef)(null),C=(0,p.useRef)(null),[S,$]=(0,p.useState)(null),[A,I]=(0,p.useState)(t?.image),[F,_]=(0,p.useState)(!1);function E({newComment:t=null,newAuthorName:i=null,newImage:n=null,newAuthorFunction:s=null,newRating:l=null}){let a={...N,...t&&{[`comment${v}`]:t},...i&&{authorName:i},...s&&{[`authorFunction${v}`]:s},...n&&{image:n},...l&&{rating:l}};g&&void 0!=e&&g(e,a)}return(0,p.useEffect)(()=>{(0,d.T)(i).then(e=>{$(e)})},[i]),(0,p.useEffect)(()=>{N?.image===A||N?.image instanceof File||I(N?.image)},[N]),(0,p.useEffect)(()=>{t&&w(t)},[t]),(0,p.useEffect)(()=>{y.current&&(y.current.innerText=N?.[`comment${v}`]??"A customer testimonial that highlights features and answers potential customer doubts about your product or service. Showcase testimonials from a similar demographic to your customers. A customer testimonial that highlights features and answers potential"),k.current&&(k.current.innerText=N?.authorName??"Firstname Lastname"),C.current&&(C.current.innerText=N?.[`authorFunction${v}`]??"Function")},[i]),(0,p.useEffect)(()=>{l&&w(t)},[l]),s?(0,n.jsxs)("div",{className:(0,u.cn)("relative flex flex-col rounded-[14px] items-start justify-between gap-8 bg-white p-8"),children:[b&&void 0!=e&&(0,n.jsx)("div",{className:"absolute top-4 right-4",children:(0,n.jsx)(c.$,{variant:"outline",className:"!px-2 h-auto text-red-500",onClick:()=>b(e),children:(0,n.jsx)(m.A,{size:30})})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"mb-8 flex items-center",children:[1,2,3,4,5].map(e=>(0,n.jsx)("svg",{className:(0,u.cn)("me-1 h-5 w-5 cursor-pointer",e>N?.rating?"text-gray-300":"text-primary-color"),"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 22 20",onClick:()=>{E({newRating:e})},children:(0,n.jsx)("path",{d:"M20.924 7.625a1.523 1.523 0 0 0-1.238-1.044l-5.051-.734-2.259-4.577a1.534 1.534 0 0 0-2.752 0L7.365 5.847l-5.051.734A1.535 1.535 0 0 0 1.463 9.2l3.656 3.563-.863 5.031a1.532 1.532 0 0 0 2.226 1.616L11 17.033l4.518 2.375a1.534 1.534 0 0 0 2.226-1.617l-.863-5.03L20.537 9.2a1.523 1.523 0 0 0 .387-1.575Z"})},`str-${e}`))}),(0,n.jsx)("p",{className:"text-base text-[#29394D] font-normal leading-[140%] border-[1px] border-dark1",contentEditable:"plaintext-only",ref:y,onBlur:function(){E({newComment:y.current.innerText})},children:`"${N?.[`comment${v}`]}"`})]}),(0,n.jsxs)("div",{className:"flex items-center gap-4",children:[(0,n.jsxs)("label",{className:"block relative h-12 w-12 rounded-full bg-gray-300",onClick:e=>{_(!0),e.preventDefault()},children:[(0,n.jsx)("div",{className:(0,u.cn)("relative flex h-12 w-12 items-center justify-center rounded-full bg-gray-300",A?"":"bg-gray-200"),style:{backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"cover",backgroundImage:`url(${!N?j:A||j})`}}),(0,n.jsx)("div",{className:"z-10 absolute rounded-full w-full h-full bg-[#00000022] top-[50%] left-[50%] flex flex-col gap-2 justify-center items-center text-white -translate-x-[50%] -translate-y-[50%] cursor-pointer",children:(0,n.jsx)(x.A,{width:"24",height:"24"})})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-semibold text-[#29394D] border-[1px] border-dark1",contentEditable:"plaintext-only",ref:k,onBlur:function(){E({newAuthorName:k.current.innerText})},children:N?.authorName??"Firstname Lastname"}),(0,n.jsx)("div",{className:"text-sm text-[#29394D] border-[1px] border-dark1",contentEditable:"plaintext-only",ref:C,onBlur:function(){E({newAuthorFunction:C.current.innerText})},children:N?.[`authorFunction${v}`]??"Function"})]})]}),(0,n.jsx)(r.A,{title:"Charger une image",isOpen:F,setIsOpen:_,children:(0,n.jsx)(o.A,{canBeVideo:!1,setImageUrl:I,updateElement:E,setOpen:_})})]}):a?(0,n.jsxs)("div",{className:(0,u.cn)("flex flex-col rounded-[14px] items-start justify-between gap-8 bg-white p-8"),children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"mb-8 flex items-center",children:[1,2,3,4,5].map(e=>(0,n.jsx)("svg",{className:(0,u.cn)("me-1 h-5 w-5",e>N?.rating?"text-gray-300":"text-primary-color"),"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"
1currentColor",viewBox:"0 0 22 20",children:(0,n.jsx)("path",{d:"M20.924 7.625a1.523 1.523 0 0 0-1.238-1.044l-5.051-.734-2.259-4.577a1.534 1.534 0 0 0-2.752 0L7.365 5.847l-5.051.734A1.535 1.535 0 0 0 1.463 9.2l3.656 3.563-.863 5.031a1.532 1.532 0 0 0 2.226 1.616L11 17.033l4.518 2.375a1.534 1.534 0 0 0 2.226-1.617l-.863-5.03L20.537 9.2a1.523 1.523 0 0 0 .387-1.575Z"})},`str-${e}`))}),f?(0,n.jsx)("p",{className:"text-base text-[#29394D] font-normal leading-[140%]",children:`"${N?.[`comment${v}`]??"A customer testimonial that highlights features and answers potential customer doubts about your product or service. Showcase testimonials from a similar demographic to your customers. A customer testimonial that highlights features and answers potential"}"`}):(0,n.jsx)("p",{className:"text-base text-[#29394D] font-normal leading-[140%]",children:`"${(0,u.EJ)(N?.[`comment${v}`]??"A customer testimonial that highlights features and answers potential customer doubts about your product or service. Showcase testimonials from a similar demographic to your customers. A customer testimonial that highlights features and answers potential",240)}"`}),!f&&(N?.[`comment${v}`]??"A customer testimonial that highlights features and answers potential customer doubts about your product or service. Showcase testimonials from a similar demographic to your customers. A customer testimonial that highlights features and answers potential").length>240&&(0,n.jsx)(c.$,{variant:"outline",className:"p-2 h-8 mt-4",onClick:h,children:S?.seeMore??"Voir plus"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-4",children:[(0,n.jsx)("div",{className:(0,u.cn)("relative flex h-12 w-12 items-center justify-center rounded-full bg-gray-300",A?"":"bg-gray-200"),style:{backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"cover",backgroundImage:`url(${!N?j:A||j})`}}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-semibold text-[#29394D]",children:N?.authorName??"Firstname Lastname"}),(0,n.jsx)("div",{className:"text-sm text-[#29394D]",children:N?.[`authorFunction${v}`]??"Function"})]})]})]}):(0,n.jsxs)("div",{className:(0,u.cn)("flex flex-col rounded-[14px] items-start justify-between gap-8 bg-white p-8"),children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"mb-8 flex items-center",children:[1,2,3,4,5].map(e=>(0,n.jsx)("svg",{className:(0,u.cn)("me-1 h-5 w-5",e>N?.rating?"text-gray-300":"text-primary-color"),"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 22 20",children:(0,n.jsx)("path",{d:"M20.924 7.625a1.523 1.523 0 0 0-1.238-1.044l-5.051-.734-2.259-4.577a1.534 1.534 0 0 0-2.752 0L7.365 5.847l-5.051.734A1.535 1.535 0 0 0 1.463 9.2l3.656 3.563-.863 5.031a1.532 1.532 0 0 0 2.226 1.616L11 17.033l4.518 2.375a1.534 1.534 0 0 0 2.226-1.617l-.863-5.03L20.537 9.2a1.523 1.523 0 0 0 .387-1.575Z"})},`str-${e}`))}),f?(0,n.jsx)("p",{className:"text-base text-[#29394D] font-normal leading-[140%]",children:`"${N?.[`comment${v}`]??"A customer testimonial that highlights features and answers potential customer doubts about your product or service. Showcase testimonials from a similar demographic to your customers. A customer testimonial that highlights features and answers potential"}"`}):(0,n.jsx)("p",{className:"text-base text-[#29394D] font-normal leading-[140%]",children:`"${(0,u.EJ)(N?.[`comment${v}`]??"A customer testimonial that highlights features and answers potential customer doubts about your product or service. Showcase testimonials from a similar demographic to your customers. A customer testimonial that highlights features and answers potential",240)}"`}),!f&&(N?.[`comment${v}`]??"A customer testimonial that highlights features and answers potential customer doubts about your product or service. Showcase testimonials from a similar demographic to your customers. A customer testimonial that highlights features and answers potential").length>240&&(0,n.jsx)(c.$,{variant:"outline",className:"p-2 h-8 mt-4",onClick:h,children:S?.seeMore??"Voir plus"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-4",children:[(0,n.jsx)("div",{className:(0,u.cn)("relative flex h-12 w-12 items-center justify-center rounded-full bg-gray-300",A?"":"bg-gray-200"),style:{backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"cover",backgroundImage:`url(${!N?j:A||j})`}}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-semibold text-[#29394D]",children:N?.authorName??"Firstname Lastname"}),(0,n.jsx)("div",{className:"text-sm text-[#29394D]",children:N?.[`authorFunction${v}`]??"Function"})]})]})]})};i(2252),i(59408),i(56970),i(91996);var h=i(84616),g=i(51154),b=i(35169),v=i(92138),j=i(46120),N=i.n(j),w=i(51012),y=i(74749),k=i(54165
1),C=i(44632),S=i(66773),$=i(67977),A=i.n($),I=i(96738);let F={rating:4,commentFr:"A customer testimonial that highlights features and answers potential customer doubts about your product or service. Showcase testimonials from a similar demographic to your customers. A customer testimonial that highlights features and answers potential",commentEn:"A customer testimonial that highlights features and answers potential customer doubts about your product or service. Showcase testimonials from a similar demographic to your customers. A customer testimonial that highlights features and answers potential",commentNl:"A customer testimonial that highlights features and answers potential customer doubts about your product or service. Showcase testimonials from a similar demographic to your customers. A customer testimonial that highlights features and answers potential",authorName:"Firstname Lastname",authorFunctionFr:"Function",authorFunctionEn:"Function",authorFunctionNl:"Function",image:""},_=({data:e=null,lng:t="fr",edit:i=!1,save:r,cancel:o,visibility:m,updateBlockContent:x})=>{let j=w.n.use.navCommunity(),$=(0,u.ZH)(t),[_,E]=(0,p.useState)(null),[L,z]=(0,p.useState)(!0),[B,T]=(0,p.useState)(!1),[P,R]=(0,p.useState)(e?.content),[M,D]=(0,p.useState)(e?.content?.list&&e?.content?.list.length>0?e?.content?.list:[F,F,F]),[O,U]=(0,p.useState)(!1),[V,q]=(0,p.useState)(!1),[H,Z]=(0,p.useState)(null),{isMobile:J,isTablet:G}=(0,y.default)(),W=(0,p.useRef)(null),Q=(0,p.useRef)(null),K=(0,p.useRef)(null),Y=(0,p.useRef)(null),X=(0,p.useRef)(null);function ee({newName:e=null,newTitle:t=null,newDescription:i=null}){R({...P,...e&&{[`name${$}`]:e},...t&&{[`title${$}`]:t},...i&&{[`description${$}`]:i}})}function et(e,t){let i=M.map((i,n)=>n===e?t:i);R({...P,list:i})}function ei(e){let t=[...M];t.splice(e,1),R({...P,list:t})}return(0,p.useEffect)(()=>{(0,d.T)(t).then(e=>{E(e)})},[t]),(0,p.useEffect)(()=>{R(e?.content)},[e]),(0,p.useEffect)(()=>{D(P?.list&&P?.list.length>0?P?.list:[F,F,F])},[P]),(0,p.useEffect)(()=>{async function t(){let t=P.list?[...P.list]:[F,F,F];for(let e=0;e<(P.list??[]).length;e++){let i=P.list[e];if(i.image&&i.image instanceof File){U(!0);let n=await (0,C.k)({community:j,file:i.image});t[e].image=n.data.data.fullMediaUrl}}U(!1),x(e?.uuid??"",{...P,list:t})}r&&x&&t()},[r,x]),(0,p.useEffect)(()=>{if(o&&(R(N()(e?.content)),e?.content?.list&&e?.content?.list.length>0)){let t=e?.content?.list;D(N()(t))}},[o]),(0,p.useEffect)(()=>{void 0!=m&&(P?.visibility??!0)!=m&&x&&x(e?.uuid??"",{...P,visibility:m})},[m]),i?(0,n.jsxs)("div",{className:"relative container w-full",children:[(0,n.jsxs)("div",{className:"mx-auto max-w-[690px] text-center uppercase mb-[30px]",children:[(0,n.jsx)(l.p$,{className:"border-[1px] border-dark1",contentEditable:!0,ref:W,onBlur:function(){let e=W.current.innerText;e!==(P?.[`name${$}`]??"\xc9QUIPE")&&ee({newName:e})},children:P?.[`name${$}`]??_?.testimonials_section??"T\xe9moignage"}),(0,n.jsx)(l.H2,{className:"mb-2.5 border-[1px] border-dark1",contentEditable:!0,ref:Q,onBlur:function(){let e=Q.current.innerText;e!==(P?.[`title${$}`]??"Notre \xe9quipe")&&ee({newTitle:e})},children:P?.[`title${$}`]??"Ce que disent nos testimonials"}),(0,n.jsx)("p",{className:"text-base text-dark1 font-normal leading-[140%] border-[1px] border-dark1",contentEditable:"plaintext-only",ref:K,onBlur:function(){let e=K.current.innerText;e!==(P?.[`description${$}`]??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.")&&ee({newDescription:e})},children:P?.[`description${$}`]??"Lorem ipsum dolor sit amet, consectetur adipiscing elit."})]}),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("div",{className:"absolute -top-11 right-[5%]",children:(0,n.jsx)(c.$,{variant:"outline",className:"!px-2 h-auto",onClick:function(){let e=[...M];e.push(F),R({...P,list:e})},children:(0,n.jsx)(h.A,{size:30})})}),(0,n.jsx)("div",{className:"[&>.list]:grid [&>.list]:grid-cols-1 [&>.list]:md:grid-cols-2 [&>.list]:lg:grid-cols-3 [&>.list]:gap-6",children:(0,n.jsx)(S.Ay,{onSortEnd:(e,t)=>{let i=[...M];i=A()(i,e,t),R({...P,list:i})},className:"list",children:M.map((e,t)=>t).map(s=>(0,n.jsx)(S.Uq,{children:(0,n.jsxs)("div",{className:"select-none relative",children:[(0,n.jsx)(S.$B,{children:(0,n.jsx)(I.CustomKnob,{})}),(0,n.jsx)(f,{data:M[s],lng:t,cancel:o,edit:i,uuid:e?.uuid??"",cardPosition:s,isModal:!1,updateElementList:et,deleteTestimonial:M.length>1?ei:void 0})]})},s))})})]}),O&&(0,n.jsx)("div",{className:"z-10 absolute w-full h-full bg-[#00000088] top-[50%] left-[50%] flex flex-col gap-2 justify-center items-center text-white -translate-x-[50%] -translate-y-[50%] cursor-pointer",children:(0,n.jsx)(g.A,{className:"h-[100px] w-[100px] animate-spin text-white"})})]}):J||G?(0,n.jsxs)("div",{className:(0,u.cn)("w-full flex flex-col gap-[30px] items-center",!(P?.visibility==void 0||P?.visibility)&&"opacity-50"),children:[(0,n.jsxs)("div",{className:"mx-auto max-w-[690px] text-center uppercase",children:[(P?.[`name${$}`]==void 0||P?.[`name${$}`]!=""&&P?.[`name${$}`]!="\n")&&(0,n.jsx)(l.p$,{children:P?.[`name${$}`]??P?.nameFr??_?.testimonials_section??"T\xe9moignage"}),(P?.[`title${$}`]==void 0||P?.[`title${$}`]!=""&&P?.[`title${$}`]!="\n")&&(0,n.jsx)(l.H2,{className:"mb-2.5",children:P?.[`title${$}`]??P?.titleFr??"Ce que disent nos members"}),(P?.[`description${$}`]==void 0||P?.[`description${$}`]!=""&&P?.[`description${$}`]!="\n")&&(0,n.jsx)("p",{className:"text-base text-dark1 font-normal leading-[140%]",children:P?.[`description${$}`]??P?.descriptionFr??"Lorem ipsum dolor sit amet, consectetur adipiscing elit."})]}),(0,n.jsx)("div",{className:(0,u.cn)("relative w-full"),children:(0,n.jsx)(s.RC,{className:"w-[calc(100vw_-_40px)] px-5 [&>.swiper-wrapper>.swiper-slide]:flex [&>.swiper-wrapper>.swiper-slide]:h-auto [&>.swiper-pagination]:static [&>.swiper-wrapper]:items-start",modules:[a.Vx,a.dK,a.Ze,a.Jq],navigation:{prevEl:Y.current,nextEl:X.current},onSwiper:e=>{e.params.navigation.prevEl=Y.current,e.params.navigation.nextEl=X.current,e.navigation.init(),e.navigation.update()},slidesPerView:1,spaceBetween:20,pagination:{clickable:!0},onSlideChange:e=>{z(e.isBeginning),T(e.isEnd)},breakpoints:{768:{slidesPerView:2},1024:{slidesPerView:3}},children:M.map((e,i)=>(0,n.jsx)(s.qr,{children:(0,n.jsx)(f,{data:e,lng:t,isMobile:J||G,isModal:!1,handleReadMore:()=>{Z(e),q(!0)}})},`Testimony-${i}`))})}),(0,n.jsx)(k.lG,{open:V,onOpenChange:q,children:(0,n.jsx)(k.Cf,{className:"sm:max-w-[560px] h-auto",children:(0,n.jsx)(f,{data:H,lng:t,isModal:!0})})})]}):(0,n.jsxs)("div",{className:(0,u.cn)("w-full",!(P?.visibility==void 0||P?.visibility)&&"opacity-50"),children:[(0,n.jsxs)("div",{className:"mx-auto max-w-[690px] text-center uppercase mb-0 has-[div]:mb-[30px] has-[h2]:mb-[30px] has-[p]:mb-[30px]",children:[(P?.[`name${$}`]==void 0||P?.[`name${$}`]!=""&&P?.[`name${$}`]!="\n")&&(0,n.jsx)(l.p$,{children:P?.[`name${$}`]??P?.nameFr??_?.testimonials_section??"T\xe9moignage"}),(P?.[`title${$}`]==void 0||P?.[`title${$}`]!=""&&P?.[`title${$}`]!="\n")&&(0,n.jsx)(l.H2,{className:"mb-2.5",children:P?.[`title${$}`]??P?.titleFr??"Ce que disent nos members"}),(P?.[`description${$}`]==void 0||P?.[`description${$}`]!=""&&P?.[`description${$}`]!="\n")&&(0,n.jsx)("p",{className:"text-base text-dark1 font-normal leading-[140%]",children:P?.[`description${$}`]??P?.descriptionFr??"Lorem ipsum dolor sit amet, consectetur adipiscing elit."})]}),(0,n.jsxs)("div",{className:(0,u.cn)("relative",M.length>3&&"px-[74px]"),children:[(0,n.jsx)(s.RC,{className:"[&>.swiper-wrapper>.swiper-slide]:flex [&>.swiper-wrapper>.swiper-slide]:h-auto [&>.swiper-wrapper]:items-unset",modules:[a.Vx,a.dK,a.Ze,a.Jq],navigation:{prevEl:Y.current,nextEl:X.current},onSwiper:e=>{e.params.navigation.prevEl=Y.current,e.params.navigation.nextEl=X.current,e.navigation.init(),e.navigation.update()},slidesPerView:1,spaceBetween:24,pagination:{clickable:!0},onSlideChange:e=>{z(e.isBeginning),T(e.isEnd)},breakpoints:{768:{slidesPerView:2},1024:{slidesPerView:3}},children:M.map((e,i)=>(0,n.jsx)(s.qr,{children:(0,n.jsx)(f,{data:e,lng:t,isModal:!1,handleReadMore:()=>{Z(e),q(!0)}})},`Testimony-${i}`))}),M.length>3&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{ref:Y,style:{opacity:L?.5:1,cursor:L?"not-allowed":"pointer"},className:"absolute left-0 top-1/2 z-10 flex h-[44px] w-[44px] -translate-y-1/2 cursor-pointer items-center justify-center rounded-full border bg-white -mt-[18px]",children:(0,n.jsx)(b.A,{className:"w-5 h-5 text-dark1"})}),(0,n.jsx)("button",{ref:X,style:{opacity:B?.5:1,cursor:B?"not-allowed":"pointer"},className:"absolute right-0 top-1/2 z-10 flex h-[44px] w-[44px] -translate-y-1/2 cursor-pointer items-center justify-center rounded-full border bg-white -mt-[18px]",children:(0,n.jsx)(v.A,{className:"w-5 h-5 text-dark1"})})]})]}),(0,n.jsx)(k.lG,{open:V,onOpenChange:q,children:(0,n.jsx)(k.Cf,{className:"sm:max-w-[560px] h-auto",children:(0,n.jsx)(f,{data:H,lng:t,isModal:!0})})})]})}},10810:(e,t,i)=>{"use strict";i.d(t,{T:()=>s});var n=i(34477);let s=(0,n.createServerReference)("7fe86ba1b227a1c79517e2a22d901085cd1856137b",n.callServer,void 0,n.findSourceMapURL,"getSiteMenuCachedAction")},11062:(e,t,i)=>{"use strict";i.d(t,{d:()=>n});let n={id:!0,firstName:!0,lastName:!0,type:!0,status:!0,gender:!0,function:!0,mainEmail:!0,enabled:!0,avatarUrl:!0,isUaAdmin:!0,role:!0,roles:!0,communities:!0}},11293:e=>{e.exports={inputWrapper:"inputDatePicker_inputWrapper__II3PD",inputLabel:"inputDatePicker_inputLabel__2rDox"}},11867:(e,t,i)=>{"use strict";i.d(t,{pD:()=>u,rx:()=>m,mU:()=>x,A:()=>p});var n=i(26715),s=i(5041),l=i(56671),a=i(34477);let r=(0,a.createServerReference)("402c1493613d03e8b7e3019468fa6883042cbab6f6",a.callServer,void 0,a.findSourceMapURL,"postDefaultSiteAction"),o=(0,a.createServerReference)("407167c470bd50f5ce05a4f136ad7d38d1ae3b0ae9",a.
1callServer,void 0,a.findSourceMapURL,"postOrganizationSiteAction"),c=(0,a.createServerReference)("4001f54742b6fa560b3df09d312ed55c8621fb5e1c",a.callServer,void 0,a.findSourceMapURL,"postSubDomainSiteAction"),d=(0,a.createServerReference)("601a0adc807b51df9bebed25629a819e56435b8d72",a.callServer,void 0,a.findSourceMapURL,"putOrganizationSiteAction"),u=(e,t)=>{let i=(0,n.jE)();return(0,s.n)({mutationFn:({data:e})=>r(e),onSuccess:t=>{i.invalidateQueries({queryKey:["sites"]}),l.o.success("Succ\xe8s",{description:"Site bien ajout\xe9"}),e&&e(t?.data?.data?.id,t?.data?.data?.pages??[])},onError:e=>{l.o.error("Erreur",{description:e?.response?.data?.errors?.[0]?.message}),t&&t()}})},m=(e,t)=>{let i=(0,n.jE)();return(0,s.n)({mutationFn:({data:e})=>o(e),onSuccess:t=>{i.invalidateQueries({queryKey:["sites"]}),l.o.success("Succ\xe8s",{description:"Site bien ajout\xe9"}),e&&e(t?.data?.data?.id,t?.data?.data?.pages??[])},onError:e=>{l.o.error("Error",{description:e?.response?.data?.errors?.message}),t&&t()}})},x=(e,t)=>{let i=(0,n.jE)();return(0,s.n)({mutationFn:({data:e})=>c(e),onSuccess:t=>{i.invalidateQueries({queryKey:["sites"]}),l.o.success("Succ\xe8s",{description:"Site bien ajout\xe9"}),e&&e(t?.data?.data?.id,t?.data?.data?.pages??[])},onError:e=>{l.o.error("Erreur",{description:e?.response?.data?.errors?.[0]?.message}),t&&t()}})},p=(e=!1)=>{let t=(0,n.jE)();return(0,s.n)({mutationFn:({siteId:e,data:t})=>d(e,t),onSuccess:()=>{t.invalidateQueries({queryKey:["site-info"]}),e||l.o.success("Succ\xe8s",{description:"Donn\xe9es bien enregistr\xe9s"})},onError:t=>{e||l.o.error("Error",{description:t?.response?.data?.errors?.[0]?.message})}})}},12271:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>j});var n=i(95155),s=i(12115),l=i(74126),a=i(76356),r=i(49345),o=i(25618),c=i(59434),d=i(85057),u=i(62523),m=i(46102),x=i(74749),p=i(78055),f=i(37936),h=i(47368),g=i(30285),b=i(90042),v=i.n(b);let j=({data:e=null,lng:t="fr",edit:i=!1,save:b,cancel:j,visibility:N,updateBlockContent:w})=>{let y=(0,s.useRef)((0,c.ZH)(t)),{isMobile:k,isTablet:C}=(0,x.default)(),[S,$]=(0,s.useState)((0,c.ZH)(t)),A=e=>{y.current=e,$(e)}
1,[I,F]=(0,s.useState)(e?.content),_=(0,s.useRef)(null),E=e=>{_.current=e,F(e)},[L,z]=(0,s.useState)(""),B=(0,s.useRef)(null),T=(0,s.useRef)(null),P=(0,s.useRef)(null),R=(0,s.useRef)(null);function M(e){let t=B.current.innerText;U({[1==e?"newName":"newNameSecondary"]:1==e?t:T.current.innerText})}function D(e){let t=P.current.innerText;U({[1==e?"newTitle":"newTitleSecondary"]:1==e?t:R.current.innerText})}function O(e,t){U({[1==t?"newDescription":"newDescriptionSecondary"]:e})}function U({newName:e=null,newNameSecondary:t=null,newTitle:i=null,newTitleSecondary:n=null,newDescription:s=null,newDescriptionSecondary:l=null,newIcon:a,newIconSecondary:r,newLink:o=null,newButtonText:c=null,newBlockAlignment:d=null},u=!1,m=!1){let x={..._.current,...e&&{[`name${y.current}`]:e},...t&&{[`nameSecondary${y.current}`]:t},...i&&{[`title${y.current}`]:i},...n&&{[`titleSecondary${y.current}`]:n},...s&&{[`description${y.current}`]:s},...l&&{[`descriptionSecondary${y.current}`]:l},...a&&{icon:a},...r&&{iconSecondary:r},...m&&{...null!=o&&{[`duplicateLink${u?"Secondary":""}${y.current}`]:o},...null!=c&&{[`duplicateButtonText${u?"Secondary":""}${y.current}`]:c}},...!m&&{...null!=o&&{[`link${u?"Secondary":""}${y.current}`]:o},...null!=c&&{[`buttonText${u?"Secondary":""}${y.current}`]:c}},...null!=d&&{blockAlignment:d}};null===a&&delete x.icon,null===r&&delete x.iconSecondary,E(x)}function V(e){z(e),U({newBlockAlignment:e})}return((0,s.useEffect)(()=>{E(e?.content),z(e?.content?.blockAlignment??"")},[e]),(0,s.useEffect)(()=>{A((0,c.ZH)(t))},[t]),(0,s.useEffect)(()=>{b&&w&&w(e?.uuid??"",I)},[b,w]),(0,s.useEffect)(()=>{j&&E(e?.content)},[j]),(0,s.useEffect)(()=>{void 0!=N&&(I?.visibility??!0)!=N&&w&&w(e?.uuid??"",{..._.current,visibility:N})},[N]),i)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{id:"title-description",className:"flex gap-4 items-start",children:[(0,n.jsxs)("div",{className:(0,c.cn)("flex flex-col gap-2.5 items-center",(""===L||"switch"===L)&&"mt-8"),children:[(0,n.jsx)(h.IconPicker,{preselectedIcon:I?.icon,customButton:!0,onSelect:e=>U({newIcon:e})}),I?.icon&&(0,n.jsx)(g.$,{type:"button",variant:"destructive",className:"w-8 h-8",onClick:()=>{U({newIcon:null})},children:(0,n.jsx)(l.A,{})})]}),(0,n.jsxs)("div",{className:"relative flex flex-col w-full",children:[(0,n.jsxs)("div",{className:(0,c.cn)("relative flex flex-col md:flex-row gap-5 justify-between items-start w-full",v().titleAndDescription,v().edit,v()[L],"upDuplicateDownDuplicate"==L&&v().decreaseFirstHalf),children:[(0,n.jsxs)("div",{className:(0,c.cn)("w-1/2"),children:[(0,n.jsxs)("div",{className:(0,c.cn)("mt-8 w-full min-h-[20rem]",("upDownDuplicate"===L||"upDown"===L)&&"text-center"),children:[(0,n.jsx)(o.p$,{className:"border-[1px] border-dark1",contentEditable:!0,ref:B,onBlur:()=>M(1),children:I?.[`name${S}`]??"TITRE ET DESCRIPTION"}),(0,n.jsx)(o.H2,{className:"mb-[1.25rem] border-[1px] border-dark1",contentEditable:!0,ref:P,onBlur:()=>D(1),children:I?.[`title${S}`]??"D\xe9crivez ce qui diff\xe9rencie votre entreprise de ses concurrents"})]}),"upDuplicateDownDuplicate"==L&&(0,n.jsxs)("div",{className:"flex gap-4 items-start mt-8 min-h-[20rem]",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-2.5 items-center",children:[(0,n.jsx)(h.IconPicker,{preselectedIcon:I?.iconSecondary,customButton:!0,onSelect:e=>U({newIconSecondary:e})}),I?.iconSecondary&&(0,n.jsx)(g.$,{type:"button",variant:"destructive",className:"w-8 h-8",onClick:()=>{U({newIconSecondary:null})},children:(0,n.jsx)(l.A,{})})]}),(0,n.jsxs)("div",{className:"w-full",children:[(0,n.jsx)(o.p$,{className:"border-[1px] border-dark1",contentEditable:!0,ref:T,onBlur:()=>M(2),children:I?.[`nameSecondary${S}`]??"TITRE ET DESCRIPTION 2"}),(0,n.jsx)(o.H2,{className:"mb-[1.25rem] border-[1px] border-dark1",contentEditable:!0,ref:R,onBlur:()=>D(2),children:I?.[`titleSecondary${S}`]??"D\xe9crivez ce qui diff\xe9rencie votre entreprise de ses concurrents 2"})]})]})]}),(0,n.jsxs)("div",{className:(0,c.cn)("mb-auto w-1/2"),children:[(0,n.jsx)(r.A,{disable:!1,value:I?.[`description${S}`]??(L.includes("DownDuplicate")?"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque blandit aliquet sollicitudin. Donec a nunc et mi volutpat tincidunt non vitae tortor. Nam mi felis, luctus vitae malesuada et, feugiat eget nibh. Ut eros turpis, varius sit amet eleifend non, commodo vestibulum lectus. Aenean in leo finibus, maximus odio vitae, tempor est. Morbi lobortis arcu eu ex malesuada ultricies.":`Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque blandit aliquet sollicitudin. Donec a nunc et mi volutpat tincidunt non vitae tortor. Nam mi felis, luctus vitae malesuada et, feugiat eget nibh. Ut eros turpis, varius sit amet eleifend non, commodo vestibulum lectus. Aenean in leo finibus, maximus odio vitae, tempor est. Morbi lobortis arcu eu ex malesuada ultricies. 2 <br/><br/>Morbi hendrerit tincidunt tellus, et tempor felis posuere sed. Aliquam erat volutpat. Maecenas lorem est, aliquet non leo vitae, sodales fermentum magna. In cursus pellentesque nulla, quis cursus sem aliquam sed. Curabitur bibendum nisi libero, eget vestibulum tellus ornare ut. Nulla porttitor consectetur condimentum. Sed so
2dales semper maximus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec sit amet quam magna. Morbi quis semper enim. 3 <br/><br/>Phasellus tincidunt neque risus, quis bibendum metus facilisis at. Donec vulputate velit id purus rutrum, non varius dui sollicitudin. Integer a urna faucibus leo finibus venenatis at at justo.`),onChange:e=>O(e,1)}),L.includes("DownDuplicate")&&(0,n.jsxs)("div",{className:"flex gap-4",children:[(0,n.jsx)("div",{className:"min-w-10"}),(0,n.jsx)(r.A,{disable:!1,value:I?.[`descriptionSecondary${S}`]??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque blandit aliquet sollicitudin. Donec a nunc et mi volutpat tincidunt non vitae tortor. Nam mi felis, luctus vitae malesuada et, feugiat eget nibh. Ut eros turpis, varius sit amet eleifend non, commodo vestibulum lectus. Aenean in leo finibus, maximus odio vitae, tempor est. Morbi lobortis arcu eu ex malesuada ultricies.",onChange:e=>O(e,2)})]})]})]}),(0,n.jsxs)("div",{className:"w-full flex gap-5",children:[(0,n.jsx)("div",{className:(0,c.cn)(L.includes("DownDuplicate")?"w-1/2":"w-full","upDuplicateDownDuplicate"==L&&"!w-[calc(100%_-_112px)]"),children:[1,2].map(e=>{let t=1==e?"principal":"secondaire",i=1==e?"":"Secondary";return(0,n.jsxs)("div",{className:(0,c.cn)("flex items-end gap-4 mt-[1.25rem]",L.includes("DownDuplicate")&&"gap-2"),children:[(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsxs)(d.J,{children:["Texte du bouton ",t]}
3),(0,n.jsx)(u.p,{value:I?.[`buttonText${i}${S}`],className:"bg-white mt-2.5",onChange:t=>U({newButtonText:t.target.value},2==e)})]}),(0,n.jsxs)("div",{className:"w-1/3",children:[(0,n.jsxs)(d.J,{children:["Lien du bouton ",t]}),(0,n.jsx)(u.p,{value:I?.[`link${i}${S}`],className:"bg-white mt-2.5",onChange:t=>U({newLink:t.target.value},2==e)})]}),(0,n.jsx)("div",{className:"text-slate-900 text-sm h-9 flex items-center",children:" - OU - "}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)(d.J,{children:"S\xe9lectionner l'url \xe0 partir d'une page"}),(0,n.jsx)(p.B,{link:I?.[`link${i}${S}`],pageId:void 0,setLink:t=>U({newLink:t},2==e),selectorClassname:"mt-2.5"})]})]},e)})}),L.includes("DownDuplicate")&&(0,n.jsxs)("div",{className:(0,c.cn)("flex gap-4",L.includes("DownDuplicate")?"w-1/2":"w-full","upDuplicateDownDuplicate"==L&&"!w-[calc(100%_+_112px)]"),children:[(0,n.jsx)("div",{className:"min-w-10"}),(0,n.jsx)("div",{className:"flex flex-col",children:[1,2].map(e=>{let t=1==e?"principal":"secondaire",i=1==e?"":"Secondary";return(0,n.jsxs)("div",{className:(0,c.cn)("flex items-end gap-4 mt-[1.25rem]",L.includes("DownDuplicate")&&"gap-2"),children:[(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsxs)(d.J,{children:["Texte du bouton ",t]}
3),(0,n.jsx)(u.p,{value:I?.[`duplicateButtonText${i}${S}`],className:"bg-white mt-2.5",onChange:t=>U({newButtonText:t.target.value},2==e,!0)})]}),(0,n.jsxs)("div",{className:"w-1/3",children:[(0,n.jsxs)(d.J,{children:["Lien du bouton ",t]}),(0,n.jsx)(u.p,{value:I?.[`duplicateLink${i}${S}`],className:"bg-white mt-2.5",onChange:t=>U({newLink:t.target.value},2==e,!0)})]}),(0,n.jsx)("div",{className:"text-slate-900 text-sm h-9 flex items-center",children:" - OU - "}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)(d.J,{children:"S\xe9lectionner l'url \xe0 partir d'une page"}),(0,n.jsx)(p.B,{link:I?.[`link${i}${S}`],pageId:void 0,setLink:t=>U({newLink:t},2==e,!0),selectorClassname:"mt-2.5"})]})]},e)})})]})]})]})]}),(0,n.jsxs)("ul",{className:"absolute left-[24px] top-1/2 z-[1] flex flex-col gap-2",children:[(0,n.jsxs)(m.m_,{children:[(0,n.jsx)(m.k$,{className:"flex h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",asChild:!0,children:(0,n.jsxs)("li",{className:(0,c.cn)("flex h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",(""===L||"switch"===L)&&"border-[1px] border-blue-400 bg-white text-blue-400"),onPointerDown:()=>V(""),children:[(0,n.jsx)("div",{className:(0,c.cn)("w-1.5 h-4 rounded-xs bg-white",(""===L||"switch"===L)&&"bg-blue-400")}),(0,n.jsx)("div",{className:(0,c.cn)("w-1.5 h-4 rounded-xs bg-white",(""===L||"switch"===L)&&"bg-blue-400")})]})}),(0,n.jsx)(m.ZI,{children:"Horizontal"})]}),(""===L||"switch"===L)&&(0,n.jsxs)(m.m_,{children:[(0,n.jsx)(m.k$,{className:"flex h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",asChild:!0,children:(0,n.jsx)("li",{className:"flex h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",onPointerDown:()=>V("switch"!==L?"switch":""),children:(0,n.jsx)(a.A,{size:20})})}),(0,n.jsx)(m.ZI,{children:"Switch"})]}),(0,n.jsxs)(m.m_,{children:[(0,n.jsx)(m.k$,{className:(0,c.cn)("flex h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white","upDown"===L&&"border-[1px] border-blue-400 bg-white text-blue-400"),asChild:!0,children:(0,n.jsxs)("li",{className:"flex flex-col h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",onPointerDown:()=>V("upDown"),children:[(0,n.jsx)("div",{className:(0,c.cn)("w-4 h-1.5 rounded-xs bg-white","upDown"===L&&"bg-blue-400")}),(0,n.jsx)("div",{className:(0,c.cn)("w-4 h-1.5 rounded-xs bg-white","upDown"===L&&"bg-blue-400")})]})}),(0,n.jsx)(m.ZI,{children:"Vertical"})]}),(0,n.jsxs)(m.m_,{children:[(0,n.jsx)(m.k$,{className:(0,c.cn)("flex h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white","upDownDuplicate"===L&&"border-[1px] border-blue-400 bg-white text-blue-400"),asChild:!0,children:(0,n.jsxs)("li",{className:"flex flex-col h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",onPointerDown:()=>V("upDownDuplicate"),children:[(0,n.jsx)("div",{className:(0,c.cn)("w-4 h-1.5 rounded-xs bg-white","upDownDuplicate"===L&&"bg-blue-400")}),(0,n.jsxs)("div",{className:"flex gap-1",children:[(0,n.jsx)("div",{className:(0,c.cn)("w-1.5 h-2 rounded-xs bg-white","upDownDuplicate"===L&&"bg-blue-400")}),(0,n.jsx)("div",{className:(0,c.cn)("w-1.5 h-2 rounded-xs bg-white","upDownDuplicate"===L&&"bg-blue-400")})]})]})}),(0,n.jsx)(m.ZI,{children:"1 titre et 2 descriptions"})]}),(0,n.jsxs)(m.m_,{children:[(0,n.jsx)(m.k$,{className:(0,c.cn)("flex h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white","upDuplicateDownDuplicate"===L&&"border-[1px] border-blue-400 bg-white text-blue-400"),asChild:!0,children:(0,n.jsxs)("li",{className:"flex flex-col h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",onPointerDown:()=>V("upDuplicateDownDuplicate"),children:[(0,n.jsxs)("div",{className:"flex gap-1",children:[(0,n.jsx)("div",{className:(0,c.cn)("w-1.5 h-2 rounded-xs bg-white","upDuplicateDownDuplicate"===L&&"bg-blue-400")}
3),(0,n.jsx)("div",{className:(0,c.cn)("w-1.5 h-2 rounded-xs bg-white","upDuplicateDownDuplicate"===L&&"bg-blue-400")})]}),(0,n.jsxs)("div",{className:"flex gap-1",children:[(0,n.jsx)("div",{className:(0,c.cn)("w-1.5 h-2 rounded-xs bg-white","upDuplicateDownDuplicate"===L&&"bg-blue-400")}),(0,n.jsx)("div",{className:(0,c.cn)("w-1.5 h-2 rounded-xs bg-white","upDuplicateDownDuplicate"===L&&"bg-blue-400")})]})]})}),(0,n.jsx)(m.ZI,{children:"2 titres et 2 descriptions"})]})]})]}):k?(0,n.jsx)("div",{id:"title-description",className:"flex gap-4 items-start",children:(0,n.jsx)("div",{className:(0,c.cn)("flex flex-col md:flex-row gap-5 justify-between items-start w-full",v().mobile,v().titleAndDescription,v()[L],!(I?.visibility==void 0||I?.visibility)&&"opacity-50","upDuplicateDownDuplicate"==L&&I?.icon&&!I?.iconSecondary&&v().decreaseFirstHalf,"upDuplicateDownDuplicate"==L&&!I?.icon&&I?.iconSecondary&&v().decreaseSecondHalf,"upDuplicateDownDuplicate"==L&&I?.icon&&I?.iconSecondary&&v().decreaseMoreFirstHalf),style:{...I?.fontColor?{"--dark-1":I?.fontColor,"--dark-3":`${I?.fontColor}99`}:{}},children:(0,n.jsxs)("div",{className:"w-full",children:[(0,n.jsxs)("div",{className:"flex gap-4",children:[I?.icon&&(0,n.jsx)("div",{className:(0,c.cn)("min-w-10",(""===L||"switch"===L)&&"mt-8"),children:(0,n.jsx)(h.IconRenderer,{name:I?.icon,className:"text-[32px] flex items-center justify-center !text-dark1"})}),(0,n.jsxs)("div",{className:(0,c.cn)("w-full flex flex-col gap-2.5",("upDownDuplicate"===L||"upDown"===L)&&"text-center"),children:[(I?.[`name${S}`]==void 0||""!=(I?.[`name${S}`]??"").trim())&&(0,n.jsx)(o.p$,{className:"!text-start",children:I?.[`name${S}`]??I?.nameFr??"TITRE ET DESCRIPTION"}),(I?.[`title${S}`]==void 0||""!=(I?.[`title${S}`]??"").trim())&&(0,n.jsx)(o.H2,{className:"!text-2xl !mb-0 !text-start",children:I?.[`title${S}`]??I?.titleFr??"D\xe9crivez ce qui diff\xe9rencie votre entreprise de ses concurrents"}),(I?.[`description${S}`]==void 0||I?.[`description${S}`]!=""&&I?.[`description${S}`]!="\n"&&I?.[`description${S}`]!="<p><br></p>")&&(0,n.jsx)("div",{className:"sun-editor-editable !p-0 !text-dark1 !bg-transparent !text-base mb-auto",dangerouslySetInnerHTML:{__html:I?.[`description${S}`]??I?.descriptionFr??(L.includes("DownDuplicate")?"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque blandit aliquet sollicitudin. Donec a nunc et mi volutpat tincidunt non vitae tortor. Nam mi felis, luctus vitae malesuada et, feugiat eget nibh. Ut eros turpis, varius sit amet eleifend non, commodo vestibulum lectus. Aenean in leo finibus, maximus odio vitae, tempor est. Morbi lobortis arcu eu ex malesuada ultricies.":`Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque blandit aliquet sollicitudin. Donec a nunc et mi volutpat tincidunt non vitae tortor. Nam mi felis, luctus vitae malesuada et, feugiat eget nibh. Ut eros turpis, varius sit amet eleifend non, commodo vestibulum lectus. Aenean in leo finibus, maximus odio vitae, tempor est. Morbi lobortis arcu eu ex malesuada ultricies. 4 <br/><br/>Morbi hendrerit tincidunt tellus, et tempor felis posuere sed. Aliquam erat volutpat. Maecenas lorem est, aliquet non leo vitae, sodales fermentum magna. In cursus pellentesque nulla, quis cursus sem aliquam sed. Curabitur bibendum nisi libero, eget vestibulum tellus ornare ut. Nulla porttitor consectetur condimentum. Sed sodales semper maximus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec sit amet quam magna. Morbi quis semper enim. 5 <br/><br/>Phasellus tincidunt neque risus, quis bibendum metus facilisis at. Donec vulputate velit id purus rutrum, non varius dui sollicitudin. Integer a urna faucibus leo finibus venenatis at at justo.`)}}),(0,n.jsxs)("div",{className:(0,c.cn)("flex gap-4 items-center","upDown"==L&&"w-full justify-center"),children:[(I?.[`link${S}`]??"")!==""&&(I?.[`buttonText${S}`]??"")!==""&&(0,n.jsx)(f.CustomLink,{url:I?.[`link${S}`],className:"uppercase rounded-lg shadow-md font-semibold inline-flex items-center justify-center px-6 py-3 border-input bg-button-1",children:I?.[`buttonText${S}`]}),(I?.[`linkSecondary${S}`]??"")!==""&&(I?.[`buttonTextSecondary${S}`]??"")!==""&&(0,n.jsx)(f.CustomLink,{url:I?.[`linkSecondary${S}`],className:"uppercase rounded-lg shadow-md font-semibold inline-flex items-center justify-center px-6 py-3 bg-button-2 text-white",children:I?.[`buttonTextSecondary${S}`]})]})]})]}),"upDuplicateDownDuplicate"==L&&(0,n.jsxs)("div",{className:"flex gap-4",children:[I?.iconSecondary&&(0,n.jsx)("div",{className:"min-w-10",children:(0,n.jsx)(h.IconRenderer,{name:I?.iconSecondary,className:"text-[32px] flex items-center justify-center !text-dark1"})}),(0,n.jsxs)("div",{className:"w-full flex flex-col gap-2.5",children:[(I?.[`nameSecondary${S}`]==void 0||""!=(I?.[`nameSecondary${S}`]??"").trim())&&(0,n.jsx)(o.p$,{className:"!text-start",children:I?.[`nameSecondary${S}`]??I?.nameSecondaryFr??"TITRE ET DESCRIPTION 2"}),(I?.[`titleSecondary${S}`]==void 0||""!=(I?.[`titleSecondary${S}`]??"").trim())&&(0,n.jsx)(o.H2,{className:"!text-2xl !mb-0 !text-start",children:I?.[`titleSecondary${S}`]??I?.titleSecondaryFr??"D\xe9crivez ce qui diff\xe9rencie votre entreprise de ses concurrents 2"}),(I?.[`descriptionSecondary${S}`]==void 0||I?.[`descriptionSecondary${S}`]!=""&&I?.[`descriptionSecondary${S}`]!="\n"&&I?.[`descriptionSecondary${S}`]!="<p><br></p>")&&(0,n.jsx)("div",{className:"sun-editor-editable !p-0 !text-dark1 !bg-transparent !text-base mb-auto",dangerouslySetInnerHTML:{__html:I?.[`descriptionSecondary${S}`]??I?.descriptionSecondaryFr??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque blandit aliquet sollicitudin. Donec a nunc et mi volutpat tincidunt non vitae tortor. Nam mi felis, luctus vitae malesuada et, feugiat eget nibh. Ut eros turpis, varius sit amet eleifend non, commodo vestibulum lectus. Aenean in leo finibus, maximus odio vitae, tempor est. Morbi lobortis arcu eu ex malesuada ultricies."}}),(0,n.jsxs)("div",{className:"flex gap-4 items-center",children:[(I?.[`duplicateLink${S}`]??"")!==""&&(I?.[`duplicateButtonText${S}`]??"")!==""&&(0,n.jsx)(f.CustomLink,{url:I?.[`duplicateLink${S}`],className:"uppercase border rounded-lg shadow-md font-semibold inline-flex items-center justify-center px-6 py-3 border-input bg-background hover:bg-accent hover:text-accent-foreground",children:I?.[`duplicateButtonText${S}`]}),(I?.[`duplicateLinkSecondary${S}`]??"")!==""&&(I?.[`duplicateButtonTextSecondary${S}`]??"")!==""&&(0,n.jsx)(f.CustomLink,{url:I?.[`duplicateLinkSecondary${S}`],className:"uppercase border rounded-lg shadow-md font-semibold inline-flex items-center justify-center px-6 py-3 border-input bg-slate-900 text-white hover:bg-slate-700 hover:text-white",children:I?.[`duplicateButtonTextSecondary${S}`]})]})]})]}),"upDownDuplicate"==L&&(0,n.jsxs)("div",{className:"flex gap-4",children:[I?.icon&&(0,n.jsx)("div",{className:"min-w-10"}),(I?.[`descriptionSecondary${S}`]==void 0||I?.[`descriptionSecondary${S}`]!=""&&I?.[`descriptionSecondary${S}`]!="\n"&&I?.[`descriptionSecondary${S}`]!="<p><br></p>")&&(0,n.jsx)("div",{className:"sun-editor-editable !p-0 !text-dark1 !bg-transparent !text-base mb-auto",dangerouslySetInnerHTML:{__html:I?.[`descriptionSecondary${S}`]??I?.descriptionSecondaryFr??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque blandit aliquet sollicitudin. Donec a nunc et mi volutpat tincidunt non vitae tortor. Nam mi felis, luctus vitae malesuada et, feugiat eget nibh. Ut eros turpis, varius sit amet eleifend non, commodo vestibulum lectus. Aenean in leo finibus, maximus odio vitae, tempor est. Morbi lobortis arcu eu ex malesuada ultricies."}})]})]})})}):C?(0,n.jsxs)("div",{id:"title-description",className:"flex gap-4 items-start",children:[I?.icon&&(0,n.jsx)("div",{className:(0,
5c.cn)("w-10",(""===L||"switch"===L)&&"mt-8",!(I?.visibility==void 0||I?.visibility)&&"opacity-50"),children:(0,n.jsx)(h.IconRenderer,{name:I?.icon,className:"text-[32px] flex items-center justify-center !text-dark1"})}),(0,n.jsxs)("div",{className:(0,c.cn)("flex flex-col md:flex-row gap-5 justify-between items-start w-full",v().tablet,v().titleAndDescription,v()[L],!(I?.visibility==void 0||I?.visibility)&&"opacity-50","upDuplicateDownDuplicate"==L&&I?.icon&&!I?.iconSecondary&&v().decreaseFirstHalf,"upDuplicateDownDuplicate"==L&&!I?.icon&&I?.iconSecondary&&v().decreaseSecondHalf,"upDuplicateDownDuplicate"==L&&I?.icon&&I?.iconSecondary&&v().decreaseMoreFirstHalf),style:{...I?.fontColor?{"--dark-1":I?.fontColor,"--dark-3":`${I?.fontColor}99`}:{}},children:[(0,n.jsxs)("div",{className:"w-1/2",children:[(0,n.jsxs)("div",{className:(0,c.cn)("mt-8 w-full min-h-[20rem]",("upDownDuplicate"===L||"upDown"===L)&&"text-center"),children:[(I?.[`name${S}`]==void 0||""!=(I?.[`name${S}`]??"").trim())&&(0,n.jsx)(o.p$,{children:I?.[`name${S}`]??I?.nameFr??"TITRE ET DESCRIPTION"}),(I?.[`title${S}`]==void 0||""!=(I?.[`title${S}`]??"").trim())&&(0,n.jsx)(o.H2,{className:"!text-2xl !mb-0",children:I?.[`title${S}`]??I?.titleFr??"D\xe9crivez ce qui diff\xe9rencie votre entreprise de ses concurrents"})]}),"upDuplicateDownDuplicate"==L&&(0,n.jsxs)("div",{className:"flex gap-4 items-start mt-8",children:[I?.iconSecondary&&(0,n.jsx)("div",{className:"w-10",children:(0,n.jsx)(h.IconRenderer,{name:I?.iconSecondary,className:"text-[32px] flex items-center justify-center !text-dark1"})}),(0,n.jsxs)("div",{className:"w-full",children:[(I?.[`nameSecondary${S}`]==void 0||""!=(I?.[`nameSecondary${S}`]??"").trim())&&(0,n.jsx)(o.p$,{children:I?.[`nameSecondary${S}`]??I?.nameSecondaryFr??"TITRE ET DESCRIPTION 2"}),(I?.[`titleSecondary${S}`]==void 0||""!=(I?.[`titleSecondary${S}`]??"").trim())&&(0,n.jsx)(o.H2,{className:"!text-2xl !mb-0",children:I?.[`titleSecondary${S}`]??I?.titleSecondaryFr??"D\xe9crivez ce qui diff\xe9rencie votre entreprise de ses concurrents 2"})]})]})]}),(0,n.jsxs)("div",{className:"mb-auto w-1/2",children:[(0,n.jsxs)("div",{className:"w-full flex flex-col",children:[(I?.[`description${S}`]==void 0||I?.[`description${S}`]!=""&&I?.[`description${S}`]!="\n"&&I?.[`description${S}`]!="<p><br></p>")&&(0,n.jsx)("div",{className:"sun-editor-editable !p-0 !text-dark1 !bg-transparent !text-base mb-auto",dangerouslySetInnerHTML:{__html:I?.[`description${S}`]??I?.descriptionFr??(L.includes("DownDuplicate")?"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque blandit aliquet sollicitudin. Donec a nunc et mi volutpat tincidunt non vitae tortor. Nam mi felis, luctus vitae malesuada et, feugiat eget nibh. Ut eros turpis, varius sit amet eleifend non, commodo vestibulum lectus. Aenean in leo finibus, maximus odio vitae, tempor est. Morbi lobortis arcu eu ex malesuada ultricies.":`Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque blandit aliquet sollicitudin. Donec a nunc et mi volutpat tincidunt non vitae tortor. Nam mi felis, luctus vitae malesuada et, feugiat eget nibh. Ut eros turpis, varius sit amet eleifend non, commodo vestibulum lectus. Aenean in leo finibus, maximus odio vitae, tempor est. Morbi lobortis arcu eu ex malesuada ultricies. 6 <br/><br/>Morbi hendrerit tincidunt tellus, et tempor felis posuere sed. Aliquam erat volutpat. Maecenas lorem est, aliquet non leo vitae, sodales fermentum magna. In cursus pellentesque nulla, quis cursus sem aliquam sed. Curabitur bibendum nisi libero, eget vestibulum tellus ornare ut. Nulla porttitor consectetur condimentum. Sed sodales semper maximus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec sit amet quam magna. Morbi quis semper enim. 7 <br/><br/>Phasellus tincidunt neque risus, quis bibendum metus facilisis at. Donec vulputate velit id purus rutrum, non varius dui sollicitudin. Integer a urna faucibus leo finibus venenatis at at justo.`)}}),(0,n.jsxs)("div",{className:(0,c.cn)("flex gap-4 items-center","upDown"==L&&"w-full justify-center"),children:[(I?.[`link${S}`]??"")!==""&&(I?.[`buttonText${S}`]??"")!==""&&(0,n.jsx)(f.CustomLink,{url:I?.[`link${S}`],className:"uppercase border rounded-lg shadow-md font-semibold inline-flex items-center justify-center px-6 py-3 border-input bg-background hover:bg-accent hover:text-accent-foreground",children:I?.[`buttonText${S}`]}),(I?.[`linkSecondary${S}`]??"")!==""&&(I?.[`buttonTextSecondary${S}`]??"")!==""&&(0,n.jsx)(f.CustomLink,{url:I?.[`linkSecondary${S}`],className:"uppercase border rounded-lg shadow-md font-semibold inline-flex items-center justify-center px-6 py-3 border-input bg-slate-900 text-white hover:bg-slate-700 hover:text-white",children:I?.[`buttonTextSecondary${S}`]})]})]}),L.includes("DownDuplicate")&&(0,n.jsxs)("div",{className:"flex gap-4",children:[I?.iconSecondary&&(0,n.jsx)("div",{className:"min-w-10"}),(0,n.jsxs)("div",{className:"w-full flex flex-col",children:[(I?.[`descriptionSecondary${S}`]==void 0||I?.[`descriptionSecondary${S}`]!=""&&I?.[`descriptionSecondary${S}`]!="\n"&&I?.[`descriptionSecondary${S}`]!="<p><br></p>")&&(0,n.jsx)("div",{className:"sun-editor-editable !p-0 !text-dark1 !bg-transparent !text-base mb-auto",dangerouslySetInnerHTML:{__html:I?.[`descriptionSecondary${S}`]??I?.descriptionSecondaryFr??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque blandit aliquet sollicitudin. Donec a nunc et mi volutpat tincidunt non vitae tortor. Nam mi felis, luctus vitae malesuada et, feugiat eget nibh. Ut eros turpis, varius sit amet eleifend non, commodo vestibulum lectus. Aenean in leo finibus, maximus odio vitae, tempor est. Morbi lobortis arcu eu ex malesuada ultricies."}}),(0,n.jsxs)("div",{className:"flex gap-4 items-center",children:[(I?.[`duplicateLink${S}`]??"")!==""&&(I?.[`duplicateButtonText${S}`]??"")!==""&&(0,n.jsx)(f.CustomLink,{url:I?.[`duplicateLink${S}`],className:"uppercase border rounded-lg shadow-md font-semibold inline-flex items-center justify-center px-6 py-3 border-input bg-background hover:bg-accent hover:text-accent-foreground",children:I?.[`duplicateButtonText${S}`]}),(I?.[`duplicateLinkSecondary${S}`]??"")!==""&&(I?.[`duplicateButtonTextSecondary${S}`]??"")!==""&&(0,n.jsx)(f.CustomLink,{url:I?.[`duplicateLinkSecondary${S}`],className:"uppercase border rounded-lg shadow-md font-semibold inline-flex items-center justify-center px-6 py-3 border-input bg-slate-900 text-white hover:bg-slate-700 hover:text-white",children:I?.[`duplicateButtonTextSecondary${S}`]})]})]})]})]})]})]}):(0,n.jsxs)("div",{id:"title-description",className:"flex gap-4 items-start",children:[I?.icon&&(0,n.jsx)("div",{className:(0,
7c.cn)("w-10",(""===L||"switch"===L)&&"mt-8",!(I?.visibility==void 0||I?.visibility)&&"opacity-50"),children:(0,n.jsx)(h.IconRenderer,{name:I?.icon,className:"text-[36px] flex items-center justify-center !text-dark1"})}),(0,n.jsxs)("div",{className:(0,c.cn)("flex flex-col md:flex-row gap-5 justify-between items-start w-full",v().titleAndDescription,v()[L],!(I?.visibility==void 0||I?.visibility)&&"opacity-50","upDuplicateDownDuplicate"==L&&I?.icon&&!I?.iconSecondary&&v().decreaseFirstHalf,"upDuplicateDownDuplicate"==L&&!I?.icon&&I?.iconSecondary&&v().decreaseSecondHalf,"upDuplicateDownDuplicate"==L&&I?.icon&&I?.iconSecondary&&v().decreaseMoreFirstHalf),style:{...I?.fontColor?{"--dark-1":I?.fontColor,"--dark-3":`${I?.fontColor}99`}:{}},children:[(0,n.jsxs)("div",{className:"w-1/2 flex items-start",children:[(0,n.jsxs)("div",{className:(0,c.cn)("mt-8 w-full",("upDownDuplicate"===L||"upDown"===L)&&"text-center w-full [&>h2]:mb-2.5"),children:[(I?.[`name${S}`]==void 0||""!=(I?.[`name${S}`]??"").trim())&&(0,n.jsx)(o.p$,{className:"w-full",children:I?.[`name${S}`]??I?.nameFr??"TITRE ET DESCRIPTION"}),(I?.[`title${S}`]==void 0||""!=(I?.[`title${S}`]??"").trim())&&(0,n.jsx)(o.H2,{className:"w-full !mb-0",children:I?.[`title${S}`]??I?.titleFr??"D\xe9crivez ce qui diff\xe9rencie votre entreprise de ses concurrents"})]}),"upDuplicateDownDuplicate"==L&&(0,n.jsxs)("div",{className:"flex gap-4 items-start mt-8",children:[I?.iconSecondary&&(0,n.jsx)("div",{className:"w-10",children:(0,n.jsx)(h.IconRenderer,{name:I?.iconSecondary,className:"text-[36px] flex items-center justify-center !text-dark1"})}),(0,n.jsxs)("div",{className:"w-full",children:[(I?.[`nameSecondary${S}`]==void 0||""!=(I?.[`nameSecondary${S}`]??"").trim())&&(0,n.jsx)(o.p$,{children:I?.[`nameSecondary${S}`]??I?.nameSecondaryFr??"TITRE ET DESCRIPTION 2"}),(I?.[`titleSecondary${S}`]==void 0||""!=(I?.[`titleSecondary${S}`]??"").trim())&&(0,n.jsx)(o.H2,{children:I?.[`titleSecondary${S}`]??I?.titleSecondaryFr??"D\xe9crivez ce qui diff\xe9rencie votre entreprise de ses concurrents 2"})]})]})]}),(0,n.jsxs)("div",{className:"mb-auto w-1/2",children:[(0,n.jsxs)("div",{className:"w-full flex flex-col",children:[(I?.[`description${S}`]==void 0||I?.[`description${S}`]!=""&&I?.[`description${S}`]!="\n"&&I?.[`description${S}`]!="<p><br></p>")&&(0,n.jsx)("div",{className:"sun-editor-editable !p-0 !text-dark1 !bg-transparent !text-base mb-5",dangerouslySetInnerHTML:{__html:I?.[`description${S}`]??I?.descriptionFr??(L.includes("DownDuplicate")?"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque blandit aliquet sollicitudin. Donec a nunc et mi volutpat tincidunt non vitae tortor. Nam mi felis, luctus vitae malesuada et, feugiat eget nibh. Ut eros turpis, varius sit amet eleifend non, commodo vestibulum lectus. Aenean in leo finibus, maximus odio vitae, tempor est. Morbi lobortis arcu eu ex malesuada ultricies.":`Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque blandit aliquet sollicitudin. Donec a nunc et mi volutpat tincidunt non vitae tortor. Nam mi felis, luctus vitae malesuada et, feugiat eget nibh. Ut eros turpis, varius sit amet eleifend non, commodo vestibulum lectus. Aenean in leo finibus, maximus odio vitae, tempor est. Morbi lobortis arcu eu ex malesuada ultricies. 8 <br/><br/>Morbi hendrerit tincidunt tellus, et tempor felis posuere sed. Aliquam erat volutpat. Maecenas lorem est, aliquet non leo vitae, sodales fermentum magna. In cursus pellentesque nulla, quis cursus sem aliquam sed. Curabitur bibendum nisi libero, eget vestibulum tellus ornare ut. Nulla porttitor consectetur condimentum. Sed sodales semper maximus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec sit amet quam magna. Morbi quis semper enim. 9 <br/><br/>Phasellus tincidunt neque risus, quis bibendum metus facilisis at. Donec vulputate velit id purus rutrum, non varius dui sollicitudin. Integer a urna faucibus leo finibus venenatis at at justo.`)}}),(0,n.jsxs)("div",{className:(0,c.cn)("flex gap-4 items-center","upDown"==L&&"w-full justify-center gap-5"),children:[(I?.[`link${S}`]??"")!==""&&(I?.[`buttonText${S}`]??"")!==""&&(0,n.jsx)(f.CustomLink,{url:I?.[`link${S}`],className:"uppercase border rounded-lg shadow-md font-semibold inline-flex items-center justify-center px-6 py-3 border-input bg-background hover:bg-accent hover:text-accent-foreground",children:I?.[`buttonText${S}`]}),(I?.[`linkSecondary${S}`]??"")!==""&&(I?.[`buttonTextSecondary${S}`]??"")!==""&&(0,n.jsx)(f.CustomLink,{url:I?.[`linkSecondary${S}`],className:"uppercase border rounded-lg shadow-md font-semibold inline-flex items-center justify-center px-6 py-3 border-input bg-slate-900 text-white hover:bg-slate-700 hover:text-white",children:I?.[`buttonTextSecondary${S}`]})]})]}),L.includes("DownDuplicate")&&(0,n.jsxs)("div",{className:"flex gap-4",children:[I?.iconSecondary&&(0,n.jsx)("div",{className:"min-w-10"}),(0,n.jsxs)("div",{className:"w-full flex flex-col",children:[(I?.[`descriptionSecondary${S}`]==void 0||I?.[`descriptionSecondary${S}`]!=""&&I?.[`descriptionSecondary${S}`]!="\n"&&I?.[`descriptionSecondary${S}`]!="<p><br></p>")&&(0,n.jsx)("div",{className:"sun-editor-editable !p-0 !text-dark1 !bg-transparent !text-base mb-auto",dangerouslySetInnerHTML:{__html:I?.[`descriptionSecondary${S}`]??I?.descriptionSecondaryFr??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque blandit aliquet sollicitudin. Donec a nunc et mi volutpat tincidunt non vitae tortor. Nam mi felis, luctus vitae malesuada et, feugiat eget nibh. Ut eros turpis, varius sit amet eleifend non, commodo vestibulum lectus. Aenean in leo finibus, maximus odio vitae, tempor est. Morbi lobortis arcu eu ex malesuada ultricies."}}),(0,n.jsxs)("div",{className:"flex gap-4 items-center",children:[(I?.[`duplicateLink${S}`]??"")!==""&&(I?.[`duplicateButtonText${S}`]??"")!==""&&(0,n.jsx)(f.CustomLink,{url:I?.[`duplicateLink${S}`],className:"uppercase border rounded-lg shadow-md font-semibold inline-flex items-center justify-center px-6 py-3 border-input bg-background hover:bg-accent hover:text-accent-foreground",children:I?.[`duplicateButtonText${S}`]}),(I?.[`duplicateLinkSecondary${S}`]??"")!==""&&(I?.[`duplicateButtonTextSecondary${S}`]??"")!==""&&(0,n.jsx)(f.CustomLink,{url:I?.[`duplicateLinkSecondary${S}`],className:"uppercase border rounded-lg shadow-md font-semibold inline-flex items-center justify-center px-6 py-3 border-input bg-slate-900 text-white hover:bg-slate-700 hover:text-white",children:I?.[`duplicateButtonTextSecondary${S}`]})]})]})]})]})]})]})}},14063:(e,t,i)=>{"use strict";i.d(t,{default:()=>h});var n=i(95155),s=i(12115),l=i(74783),a=i(47863),r=i(66474),o=i(59434),c=i(66766),d=i(6874),u=i.n(d),m=i(37936),x=i(74749),p=i(22912),f=i(89543);let h=({siteInfo:e,siteMenu:t,pages:i,lang:d,token:h,slug:g})=>
9{let[b,v]=(0,s.useState)(!1),[j,N]=(0,s.useState)({}),{isTablet:w}=(0,x.default)(),{goToBlock:y,isActive:k}=(0,p.A)({menuStructure:t?.structure,lang:d,scrollOnMount:!0});return(0,n.jsx)("div",{className:"w-full p-4 sticky top-0 left-0 z-10 backdrop-blur-[4px]",children:(0,n.jsxs)("div",{className:"w-[calc(100vw_-_32px)] bg-navbar-footer rounded-xl shadow-[0px_4px_54px_0px_rgba(0,0,0,0.05)] outline outline-1 outline-offset-[-1px] outline-slate-200 backdrop-blur-[1.50px]",children:[(0,n.jsxs)("div",{className:(0,o.cn)("container flex items-center gap-8 py-2 px-5 w-full mx-auto",b&&"border-b border-b-slate-200"),onClick:()=>v(!b),children:[(0,n.jsx)("div",{className:"flex gap-4 items-center mr-auto",children:[(0,o.$$)(g)?"/images/nacnai.svg":e.config?.logo??e.organization?.avatarUrl??"",e.config?.logoSecondary??""].filter(e=>""!=e).map((t,i)=>{if(""==t&&1==i)return null;let s="/";return 1==i&&e.config?.secondaryLogoUrl&&(s=e.config?.secondaryLogoUrl.linkFr??"/"),(0,n.jsx)(m.CustomLink,{url:s,className:"",children:""!==t||(e?.organization?.avatarUrl??"")!=""?(0,n.jsx)(c.default,{src:""!=t?t:e?.organization?.avatarUrl??"",alt:"Uploaded",className:"!h-[3rem] !w-auto max-w-[6rem] object-contain rounded-xl !relative",fill:!0,sizes:"96px"}):(0,n.jsx)("span",{className:"h-[3rem] flex items-center text-2xl font-bold text-dark1",children:"LOGO"})},i)})}),(0,n.jsx)(l.A,{className:"text-dark1"})]}),b&&(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("ul",{className:(0,o.cn)("relative list-none flex flex-col p-5 gap-5 items-start max-h-[450px] overflow-x-hidden overflow-y-auto",(e?.config?.actions??[]).filter(e=>(e?.buttonTextFr??"")!="").length>0&&"pb-0",w&&"!max-h-[550px]"),children:[e?.isSAP&&(t?.structure??[]).map((e,t)=>(0,n.jsx)(s.Fragment,{children:e.hide?null:(0,n.jsx)("li",{onClick:()=>{v(!1),setTimeout(()=>{y(e.blockId)},0)},"aria-current":k(e.blockId)?"true":void 0,className:(0,o.cn)("flex items-center !text-dark1 font-semibold text-sm cursor-pointer w-full",k(e.blockId)&&"!text-[#18a0fb]"),children:(e?.[`label${(0,o.ZH)(d)}`]).toUpperCase()})},t)),!e?.isSAP&&(t?.structure??[]).map((e,t)=>{let l=(i?.data??[]).find(t=>t.id==e.pageId),c=l?.[`slug${(0,o.ZH)(d)}`]??"",m=c==g?l.id:null;return(0,n.jsx)(s.Fragment,{children:e.hide||"MENU"===e.type&&(!e.children||0===e.children.length)||e.externalLink&&e?.needsLogin&&!h||(e.children??[]).length>0&&(e.children??[]).every(e=>e.externalLink&&e.needsLogin&&!h)?null:(0,n.jsxs)("li",{className:"relative w-full",children:["MENU"!=e.type?(0,n.jsxs)(u(),{href:e.externalLink?`${e.externalLink}${e.needsLogin&&h?`?token=${h}`:""}`:"/"+((i?.data??[]).find(t=>t.id==e.pageId)?.[`slug${(0,o.ZH)(d)}`]??""),className:(0,o.cn)("cursor-pointer flex items-center !text-dark1 font-semibold text-sm",c==g&&"!text-[#18a0fb] font-semibold"),target:e.externalLink&&e.openInNewTab?"_blank":"_self",rel:"noopener noreferrer",children:[(e?.[`label${(0,o.ZH)(d)}`]).toUpperCase(),(e.children??[]).length>0&&(0,n.jsx)("span",{onClick:e=>{e.preventDefault(),N({[`${t}`]:!j[`${t}`]})},children:j[`${t}`]?(0,n.jsx)(a.A,{className:"ml-1 h-4 w-4"}):(0,n.jsx)(r.A,{className:"ml-1 h-4 w-4"})})]}):(0,n.jsxs)("span",{onClick:e=>{e.preventDefault(),N({[`${t}`]:!j[`${t}`]})},className:(0,o.cn)("flex items-center !text-dark1 font-semibold text-sm cursor-pointer",e?.children?.find(e=>m?.toString()===e?.pageId)?"!text-[#18a0fb] font-semibold":""),children:[(e?.[`label${(0,o.ZH)(d)}`]).toUpperCase(),(e.children??[]).length>0&&(0,n.jsx)("span",{children:j[`${t}`]?(0,n.jsx)(a.A,{className:"ml-1 h-4 w-4"}):(0,n.jsx)(r.A,{className:"ml-1 h-4 w-4"})})]}),e.children&&e.children.length>0&&(0,n.jsx)("ul",{className:(0,o.cn)("w-fit flex flex-col gap-5 max-h-0 overflow-hidden",j[`${t}`]&&"max-h-full mt-5"),children:e.children.map((e,t)=>e.externalLink&&e.needsLogin&&!h?null:(0,n.jsx)("li",{children:(0,n.jsx)(u(),{href:e.externalLink?`${e.externalLink}${e.needsLogin&&h?`?token=${h}`:""}`:"/"+((i?.data??[]).find(t=>t.id==e.pageId)?.[`slug${(0,o.ZH)(d)}`]??""),className:(0,o.cn)("whitespace-nowrap block pl-5 font-semibold text-sm !text-dark1 hover:bg-[#00000033] cursor-pointer uppercase",m==Number(e.pageId)?"text-[#18a0fb]":""),target:e.externalLink&&e.openInNewTab?"_blank":"_self",rel:"noopener noreferrer",children:(0,o.ZH)(e?.[`label${(0,o.ZH)(d)}`])})},t))})]})},t)}),(e?.config?.actions??[]).filter(e=>(e?.buttonTextFr??"")!="").length>0&&(0,n.jsx)("div",{className:"sticky left-0 bottom-0 flex items-center gap-2.5 w-full bg-navbar-footer py-5 backdrop-blur-[2px]",children:(e?.config?.actions??[]).filter(e=>(e?.buttonTextFr??"")!="").map((e,t)=>(0,n.jsx)("a",{href:e.linkFr,target:"_blank",className:(0,o.cn)("flex-1 rounded-sm uppercase shadow-md font-semibold inline-flex items-center justify-center px-[1.625rem] py-2.5 text-sm bg-button-1 text-white",0==t&&"py-[9px] px-4 bg-button-2 text-dark1"),children:e.buttonTextFr},t))}),(0,n.jsx)(f.LanguageSelector,{hasEnLng:e.config?.hasEnLng??!1,hasNlLng:e.config?.hasNl
9Lng??!1})]})})]})})}},14332:(e,t,i)=>{"use strict";i.d(t,{u:()=>c});var n=i(95155);i(12115);var s=i(30285),l=i(54165),a=i(54416),r=i(62525),o=i(25618);function c({isOpen:e,setIsOpen:t,handleConfirm:i}){return(0,n.jsx)(l.lG,{open:e,children:(0,n.jsxs)(l.Cf,{className:"max-w-[600px] p-8",children:[(0,n.jsx)(l.HM,{onClick:()=>t(!1),className:"absolute !bg-white right-3 top-3 z-10",children:(0,n.jsx)(a.A,{})}),(0,n.jsx)(l.L3,{}),(0,n.jsx)(l.rr,{}),(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,n.jsx)("div",{className:"flex h-20 w-20 items-center justify-center rounded-[200px] border border-solid border-[#F7585A] text-[28px]",children:(0,n.jsx)(r.A,{size:"32",className:"text-customRed"})}),(0,n.jsx)(o.H2,{className:"mb-8 mt-4 max-w-[360px] text-center",children:"\xcates-vous s\xfbr de vouloir supprimer cet element ?"})]}),(0,n.jsx)(l.Es,{className:"justify-start",children:(0,n.jsxs)("div",{className:"flex w-full gap-5",children:[(0,n.jsx)(s.$,{className:"flex-1 p-6",type:"button",variant:"secondary",onClick:()=>t(!1),children:"Annuler"}),(0,n.jsx)(s.$,{variant:"destructive",className:"flex-1 p-6",onClick:i,children:"Oui, supprimer"})]})})]})})}},14636:(e,t,i)=>{"use strict";i.d(t,{AM:()=>a,Wv:()=>r,hl:()=>o});var n=i(95155);i(12115);var s=i(20547),l=i(59434);function a({...e}){return(0,n.jsx)(s.bL,{"data-slot":"popover",...e})}function r({...e}){return(0,n.jsx)(s.l9,{"data-slot":"popover-trigger",...e})}function o({className:e,align:t="center",sideOffset:i=4,...a}){return(0,n.jsx)(s.ZL,{children:(0,n.jsx)(s.UC,{"data-slot":"popover-content",align:t,sideOffset:i,className:(0,l.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...a})})}},15548:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>O});var n=i(95155),s=i(59434),l=i(12115),a=i(29300),r=i.n(a),o=i(34547),c=i.n(o),d=i(59409),u=i(73963),m=i(47262),x=i(88539),p=i(62523),f=i(30285),h=i(30356),g=i(85057),b=i(82917),v=i.n(b),j=i(29869);function N({file:e,setFile:t,label:i,type:s,labelClassname:a}){let o=(0,l.useRef)(null),[c,d]=(0,l.useState)("*"),[u,m]=(0,l.useState)(""),[x,p]=(0,l.useState)("");return(0,l.useEffect)(()=>{!e&&o.current&&(o.current.value="",m(""),p(""))},[e]),(0,l.useEffect)(()=>{"Images"===s?d("image/*"):"Videos"===s?d("video/*"):"Audios"===s?d("audio/*"):d(".pdf, .doc, .docx, .txt"),e&&e.name&&(m(e.name),e.size>=1e6?p(`${Math.round(e.size/1e6)} MB`):e.size>=1e3&&p(`${Math.round(e.size/1e3)} KB`))},[s]),(0,n.jsxs)("div",{className:v().inputFile,children:[(0,n.jsx)("span",{className:r()(v().label,a),children:i}),(0,n.jsxs)("label",{className:v().uploadZone,htmlFor:i,children:[(0,n.jsx)(j.A,{size:30}),(0,n.jsx)("span",{children:""!=u?u:"Importer un fichier"}),(0,n.jsx)("span",{children:""!=x?`( ${x} )`:"Cliquez ici pour importer"})]}),(0,n.jsx)("input",{ref:o,type:"file",name:i,id:i,accept:c,style:{display:"none"},onChange:function(e){let i=e.target;if(i.files&&i.files.length>0){let e=i.files[0];e&&(m(e.name),e.size>=1e6?p(`${(e.size/1e6).toFixed(1)} MB`):e.size>=1e3&&p(`${(e.size/1e3).toFixed(1)} KB`),t(e))}}})]})}var w=i(82940),y=i.n(w),k=i(11293),C=i.n(k),S=i(14636),$=i(66474),A=i(85511);function I({label:e,value:t,setValue:i,format:s="DD/MM/YYYY",className:a}){let[o,c]=(0,l.useState)(!1),[d,u]=(0,l.useState)(void 0);return(0,l.useEffect)(()=>{t&&""!=t&&t!=y()(d).format(s)&&u(y()(t,s).toDate())},[t]),(0,n.jsxs)("div",{className:r()(C().inputWrapper,a),children:[(0,n.jsx)("span",{className:C().label,children:e}),(0,n.jsxs)(S.AM,{open:o,onOpenChange:c,children:[(0,n.jsx)(S.Wv,{asChild:!0,children:(0,n.jsxs)(f.$,{variant:"outline",id:"date",className:"w-full justify-between font-normal",children:[d?d.toLocaleDateString():"S\xe9lectionner une date",(0,n.jsx)($.A,{})]})}),(0,n.jsx)(S.hl,{className:"w-auto overflow-hidden p-0",align:"start",children:(0,n.jsx)(A.V,{mode:"single",selected:d,captionLayout:"dropdown",onSelect:e=>{u(e),i(y()(e).format(s)),c(!1),c(!1)}})})]})]})}var F=i(56671),_=i(51012),E=i(16225),L=i(93331),z=i(74749),B=i(34477);let T=(0,B.createServerReference)("4053f6a94708d728ad613b271f9d01c7e4fc28f522",B.callServer,void 0,B.findSourceMapURL,"setFilePathAction"),P=(0,B.createServerReference)("78b1ac28ac71ed301da0160533c7622920f40c0abc",B.callServer,void 0,B.findSourceMapURL,"sendFormMailAction");function R({data:e,language:t}){let i=_.n.use.navCommunity(),[a,o]=(0,l.useState)(!1),[b,v]=(0,l.useState)(!1),[j,w]=(0,l.useState)({}),{isMobile:y,isTablet:k}=(0,z.default)();function C(){let t={};for(let i of e.fields)"file"===i.type?t[i.name]=null:"checkbox"===i.type?t[i.name]=[]:t[i.name]="";w(t)}async function S(){if(v(!0),function(){let t=!0;for(let i of e.fields)i.required&&(""===j[i.name]||"checkbox"===i.type&&0==j[i.name].length||"file"===i.type&&null==j[i.name])&&(t=!1);return t}()){o(!0);try{let n=e.email??"",l="",a=[];for(let n of e.fields){let e=(0,u.i0)(n,"label",t),r=n.name;if("object"==typeof j[r]&&Array.isArray(j[r]))l+=`<p>${(0,s.ZH)(e)}: ${j[r].join(",")}</p>`;else if("string"==typeof j[r])l+=`<p>${(0,s.ZH)(e)}: ${j[r]}</p>`;else if(j[r]instanceof Blob){let e=j[r],t=`${E.Gu}/form-attachments/${i?.id}/${e.name}`,n=(await T(t)).data.data.path;await L.A.put(n,{method:"PUT",body:e,headers:{"Content-Type":e.type,Accept:"*"}});let s=n.split("?").length>0?n.split("?")[0]:null;s&&a.push(s)}}await P(n,e.name,l,a),o(!1),v(!1),F.o.success("Succ\xe8ss",{description:"Votre formulaire a \xe9t\xe9 soumis avec succ\xe8s. Merci !"}),C()}catch{F.o.error("Erreur",{description:"Une erreur s'est produite lors de la soumission du formulaire. Veuillez r\xe9essayer."}),o(!1)}}}return(0,l.useEffect)(()=>{C()},[e]),(0,n.jsxs)("div",{className:r()(c().formComponent,(y||k)&&c().mobile),children:[(((0,u.i0)(e,"subTitle",t)??"")!=""||((0,u.i0)(e,"title",t)??"")!=""||((0,u.i0)(e,"description",t)??"")!="")&&(0,n.jsxs)("div",{id:c().header,children:[((0,u.i0)(e,"subTitle",t)??"")!=""&&(0,n.jsx)("span",{id:c().subTitle,children:(0,u.i0)(e,"subTitle",t)}),((0,u.i0)(e,"title",t)??"")!=""&&(0,n.jsx)("span",{id:c().title,children:(0,u.i0)(e,"title",t)}),((0,u.i0)(e,"description",t)??"")!=""&&(0,n.jsx)("span",{id:c().description,children:(0,u.i0)(e,"description",t)})]}),(0,n.jsxs)("div",{id:c().content,children:[e.fields.map((e,i)=>{let s=`${(0,u.i0)(e,"label",t)} ${e.required?"*":""}`;if("select"===e.type)return(0,n.jsxs)("div",{className:c().radio,children:[(0,n.jsx)("span",{className:c().label,children:s}),(0,n.jsxs)(d.l6,{value:j[e.name],onValueChange:t=>w({...j,[e.name]:t}),children:[(0,n.jsx)(d.bq,{className:"w-full h-10 bg-white",children:(0,n.jsx)(d.yv,{placeholder:"S\xe9lectionner une option"})}),(0,n.jsx)(d.gC,{children:e.options.map((e,t)=>(0,n.jsx)(d.eb,{value:e,className:"capitalize",children:e},t))})]},i),b&&e.required&&""==j[e.name]&&(0,n.jsx)("span",{className:"text-sm font-medium text-red-500",children:"Champ obligatoire"})]},i);if("checkbox"===e.type){let t=j[e.name]??[];return(0,n.jsxs)("div",{className:c().radio,children:[(0,n.jsx)("span",{className:c().label,children:s}),(0,n.jsx)("div",{className:"flex items-center gap-4",children:e.options.map((i,s)=>(0,n.jsxs)("div",{className:"flex items-center gap-2 cursor-pointer",children:[(0,n.jsx)("span",{children:i}),(0,n.jsx)("span",{children:(0,n.jsx)(m.S,{checked:t.includes(i),onCheckedChange:n=>(function(e,t,i,n){if(n)e.push(i),w({...j,[t]:e});else{let n=e.indexOf(i);e.splice(n,1),w({...j,[t]:e})}})(t,e.name,i,!!n.valueOf()),className:c().radioButton})})]},s))}),b&&e.required&&0==j[e.name].length&&(0,n.jsx)("span",{className:"text-sm font-medium text-red-500",children:"Champ obligatoire"})]},i)}return"radio"===e.type?(0,n.jsxs)("div",{className:c().radio,children:[(0,n.jsx)("span",{className:c().label,children:s}),(0,n.jsx)(h.z,{onValueChange:t=>w({...j,[e.name]:t}),children:e.options.map((e,t)=>(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)(h.C,{value:e,id:`${e}`}),(0,n.jsx)(g.J,{htmlFor:`${e}`,className:"cursor-pointer",children:e})]},t))}),b&&e.required&&""==j[e.name]&&(0,n.jsx)("span",{className:"text-sm font-medium text-red-500",children:"Champ obligatoire"})]},i):"date picker"===e.type?(0,n.jsxs)("div",{className:c().inputWraper,children:[(0,n.jsx)(I,{label:s,value:j[e.name],setValue:t=>w({...j,[e.name]:t}),className:c().input}),b&&e.required&&""==j[e.name]&&(0,n.jsx)("span",{className:"text-sm font-medium text-red-500",children:"Champ obligatoire"})]},i):"file"===e.type?(0,n.jsxs)("div",{className:c().inputWraper,children:[(0,n.jsx)(N,{file:j[e.name],setFile:t=>w({...j,[e.name]:t}),label:s,type:e.acceptedFile,labelClassname:c().inputLabel}),b&&e.required&&null==j[e.name]&&(0,n.jsx)("span",{className:"text-sm font-medium text-red-500",children:"Champ obligatoire"})]},i):"textarea"===e.type?(0,n.jsxs)("div",{className:c().inputWraper,children:[(0,n.jsx)("span",{className:c().inputLabel,children:s}),(0,n.jsx)(x.T,{name:s,value:j[e.name],className:c().textArea,minLength:5,onChange:({target:t})=>w({...j,[e.name]:t.value})}),b&&e.required&&""==j[e.name]&&(0,n.jsx)("span",{className:"text-sm font-medium text-red-500",children:"Champ obligatoire"})]},i):(0,n.jsxs)("div",{className:c().inputWraper,children:[(0,n.jsx)("span",{className:c().inputLabel,children:s}),(0,n.jsx)(p.p,{name:s,value:j[e.name],type:e.type,className:c().input,onChange:({target:t})=>w({...j,[e.name]:t.value})},i),b&&e.required&&""==j[e.name]&&(0,n.jsx)("span",{className:"text-sm font-medium text-red-500",children:"Champ obligatoire"})]},i)}),(0,n.jsx)(f.$,{className:c().submitButton,onClick:S,disabled:a,children:"Envoyer"})]})]})}var M=i(502),D=i(90555);let O=({data:e=null,lng:t="fr",edit:i=!1,save:a,cancel:r,visibility:o,updateBlockContent:c,uuid:d,editTheBlock:u,setEditTheBlock:m})=>{let x=(0,s.ZH)(t),[p,f]=(0,l.useState)(e?.content),[h,g]=(0,l.useState)(!1),[b,v]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{f(e?.content)},[e]),(0,l.useEffect)(()=>{i!=h&&g(i)},[i]),(0,l.useEffect)(()=>{i!=h&&m&&d&&m({...u,[d]:h})},[h]),(0,l.useEffect)(()=>{a&&c&&c(e?.uuid??"",p)},[a,c]),(0,l.useEffect)(()=>{r&&b&&f(e?.content)},[r,b]),(0,l.useEffect)(()=>{void 0!=o&&(p?.visibility??!0)!=o&&c&&c(e?.uuid??"",{...p,visibility:o})},[o]),i)?(0,n.jsxs)("div",{id:"form",className:(0,s.cn)("flex flex-col md:flex-row justify-between items-start w-full",!(p?.visibility==void 0||p?.visibility)&&"opacity-50"),style:{...p?.fontColor?{"--dark-1":p?.fontColor,"--dark-3":`${p?.fontColor}99`}:{}},children:[(0,n.jsx)(R,{data:p,language:x}),(0,n.jsx)(M.A,{title:"Modification de formulaire",setIsOpen:g,isOpen:h,children:(0,n.jsx)(D.A,{formData:p,createForm:void 0,updateComponentForm:function(t){f(t),v(!0),c(e?.uuid??"",{...t,visibility:o}),g(!1)}})})]}):(0,n.jsx)("div",{id:"form",className:(0,s.cn)("flex flex-col md:flex-row justify-between items-start w-full rounded-lg",!(p?.visibility==void 0||p?.visibility)&&"opacity-50"),style:{...p?.fontColor?{"--dark-1":p?.fontColor,"--dark-3":`${p?.fontColor}99`}:{}},children:(0,n.jsx)(R,{data:p,language:x})})}},15804:(e,t,i)=>{"use strict";i.d(t,{nr:()=>I,mQ:()=>F.default,Ln:()=>_.default,e:()=>D,xF:()=>R.default,lO:()=>O.default});var n=i(95155),s=i(49345),l=i(25618),a=i(60379),r=i(8117),o=i(62523),c=i(85057),d=i(
959434),u=i(51012),m=i(51154),x=i(76356),p=i(10281),f=i(82098),h=i(12115),g=i(28095),b=i(11867),v=i(74749),j=i(3055),N=i(46102),w=i(47368),y=i(36136),k=i(78055),C=i(37936),S=i(75376),$=i(44632),A=i(35918);let I=({data:e=null,lng:t="fr",edit:i=!1,save:I,cancel:F,visibility:_,updateBlockContent:E,reversed:L=!1,priority:z=!1})=>{let B=u.n.use.navCommunity(),T=u.n.use.siteInfo(),[P,R]=(0,h.useState)(null),[M,D]=(0,h.useState)((0,d.ZH)(t)),O=(0,h.useRef)((0,d.ZH)(t)),U=e=>{O.current=e,D(e)},{content:V,contentRef:q,backwardActive:H,forwardActive:Z,setContent:J,goBackward:G,goForward:W,saveHistory:Q}=(0,S._)(),[K,Y]=(0,h.useState)(),[X,ee]=(0,h.useState)(),[et,ei]=(0,h.useState)(),[en,es]=(0,h.useState)(),[el,ea]=(0,h.useState)(),er=(0,h.useRef)(null),eo=(0,h.useRef)(null),[ec,ed]=(0,h.useState)(!1),{isMobile:eu,isTablet:em}=(0,v.default)(),ex=(0,b.A)(!0);(0,h.useEffect)(()=>{(0,A.T)(t).then(e=>{R(e)})},[t]),(0,h.useEffect)(()=>{J(e?.content,!0)},[e]),(0,h.useEffect)(()=>{i&&J(V?.content??V,!1)},[i]),(0,h.useEffect)(()=>{U((0,d.ZH)(t))},[t]),(0,h.useEffect)(()=>{V?.croppedArea&&(el?.x!==V?.croppedArea?.x||el?.y!==V?.croppedArea?.y)&&ea(V?.croppedArea),V?.image===K||V?.image instanceof File||(Y(V?.image),V?.croppedArea||ee(V?.image)),V?.video===et||V?.video instanceof File||ei(V?.video),V?.pdf===en||V?.pdf instanceof File||es(V?.pdf)},[V]),(0,h.useEffect)(()=>{I&&E&&(Q(),V?.image&&V?.image instanceof File?(ed(!0),V?.video&&V?.video instanceof File?(0,$.k)({community:B,file:V.video}).then(t=>{let i={...V};i.video=t.data.data.fullMediaUrl,(0,$.k)({community:B,file:V.image}).then(t=>{i.image=t.data.data.fullMediaUrl,ed(!1),E(e?.uuid??"",i)})}):V?.pdf&&V?.pdf instanceof File?(0,$.k)({community:B,file:V.pdf}).then(t=>{let i={...V};i.pdf=t.data.data.fullMediaUrl,(0,$.k)({community:B,file:V.image}).then(t=>{i.image=t.data.data.fullMediaUrl,ed(!1),E(e?.uuid??"",i)})}):(0,$.k)({community:B,file:V.image}).then(t=>{let i={...V};i.image=t.data.data.fullMediaUrl,ed(!1),E(e?.uuid??"",i);let n=T?.config?.imagesLibrary??[];ex.mutate({siteId:T?.id??0,data:{config:{...T?.config,imagesLibrary:[...n,t.data.data.fullMediaUrl]}}})})):V?.pdf&&V?.pdf instanceof File?(ed(!0),(0,$.k)({community:B,file:V.pdf}).then(t=>{let i={...V};i.pdf=t.data.data.fullMediaUrl,ed(!1),E(e?.uuid??"",i)})):E(e?.uuid??"",V))},[I,E]),(0,h.useEffect)(()=>{F&&J(e?.content,!0,!0)},[F]),(0,h.useEffect)(()=>{void 0!=_&&((V?.content??V)?.visibility??!0)!=_&&E&&E(e?.uuid??"",{...V,visibility:_})},[_]),(0,h.useEffect)(()=>{el&&K&&(0,g.Ay)(K,el,0).then(e=>{e&&(ef({newCroppedArea:el}),ee(URL.createObjectURL(e)))})},[el]);let ep=(0,h.useMemo)(()=>{if(V?.iconOriginalSize&&V?.iconSize){let e=Number(V?.iconOriginalSize.replace("px",""));return Math.round(Number(V?.iconSize.replace("px",""))/e*100)}return null},[V?.iconOriginalSize,V?.iconSize]);function ef({newName:e=null,newTitle:t=null,newDescription:i=null,newLink:n=null,newImage:s=null,newCroppedArea:l=null,newButtonText:a=null,reversed:r=null,newIconName:o=null,newVideo:c=null,newPdf:d=null,newIconColor:u=null,newIconSize:m=null,newIconBgColor:x=null,newIconVerticalAlign:p=null,newIconHorizontalAlign:f=null,newIconOriginalSize:h=null,newHideImage:g=null},b=!1){let v={...q.current,...s&&{image:s,croppedArea:null,iconName:null,iconSize:null,video:null,...d?{}:{pdf:null}},...l&&{croppedArea:l},...c&&{video:c,iconName:null,image:null,pdf:null},...d&&{pdf:d,iconName:null,video:null,...s?{image:s}:{image:null}},...e&&{[`name${O.current}`]:e},...t&&{[`title${O.current}`]:t},...i&&{[`description${O.current}`]:i},...null!=n&&{[`link${b?"Secondary":""}${O.current}`]:n},...null!=a&&{[`buttonText${b?"Secondary":""}${O.current}`]:a},...o&&{video:null,image:null,pdf:null,croppedArea:null,iconName:o},...u&&{iconColor:u},...m&&{iconSize:m},...x&&{iconBgColor:x},...p&&{iconVerticalAlign:p},...f&&{iconHorizontalAlign:f},...null!=r&&{reversed:r},...h&&{iconOriginalSize:h},...null!=g&&{hideImage:g}},j={newName:e,newTitle:t,newDescription:i,newLink:n,newImage:s,newCroppedArea:l,newButtonText:a,reversed:r,newIconName:o,newVideo:c,newPdf:d,newIconColor:u,newIconSize:m,newIconBgColor:x,newIconVerticalAlign:p,newIconHorizontalAlign:f,
9newIconOriginalSize:h,newHideImage:g},N=Object.keys(j).every(e=>null==j[e]),w=v.iconName&&!v.iconSize;J(v,w,!1,N)}return i?(0,n.jsxs)("div",{id:"about",className:(0,d.cn)("flex flex-col w-full relative"),children:[(0,n.jsxs)("div",{className:(0,d.cn)("relative flex flex-col md:flex-row justify-between items-center w-full gap-10 md:gap-28",(V?.reversed!=void 0?V?.reversed:L)&&"flex-col-reverse md:flex-row-reverse"),children:[(0,n.jsxs)("div",{className:"mt-6 mb-auto flex-1",children:[(0,n.jsx)(l.p$,{className:"border-[1px] border-dark1 uppercase",contentEditable:!0,ref:er,onBlur:function(){let e=er.current.innerText;(q.current?.[`name${O.current}`]??P?.about_section??"\xc0 PROPOS")!=e&&ef({newName:e})},children:V?.[`name${M}`]??P?.about_section??"\xc0 PROPOS"}),(0,n.jsx)(l.H2,{className:"mb-[1.25rem] border-[1px] border-dark1",contentEditable:!0,ref:eo,onBlur:function(){let e=eo.current.innerText;(q.current?.[`title${O.current}`]??"D\xe9crivez ce qui diff\xe9rencie votre entreprise de ses concurrents")!=e&&ef({newTitle:e})},children:V?.[`title${M}`]??"D\xe9crivez ce qui diff\xe9rencie votre entreprise de ses concurrents"}),(0,n.jsx)(s.A,{disable:!1,value:V?.[`description${M}`]??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. <br><br> It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.",onChange:function(e){(q.current?.[`description${O.current}`]??"<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. <br><br> It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</p>")!=e&&ef({newDescription:e})}})]}),(0,n.jsx)(j.A,{labelClassname:"my-4 w-full max-w-[540px] md:w-[540px] aspect-[27/21] rounded-2xl",iconClassname:"text-[min(420px,70vw)] w-full h-full flex items-center justify-center",imageUrl:K,setImageUrl:Y,croppedImageUrl:X,setCroppedImageUrl:ee,setCroppedArea:ea,canbeVideo:!0,canbePdf:!0,iconName:V?.iconName,iconColor:V?.iconColor,iconFinalSize:V?.iconSize,iconBgColor:V?.iconBgColor,iconVerticalAlign:V?.iconVerticalAlign,iconHorizontalAlign:V?.iconHorizontalAlign,iconOriginalSize:V?.iconOriginalSize,hideImage:V?.hideImage!=void 0&&V?.hideImage,videoUrl:et,setVideoUrl:ei,pdfUrl:en,setPdfUrl:es,updateElement:ef,removeImage:()=>J({...q.current,image:null,video:null,pdf:null,croppedArea:null,iconName:null})})]}),[1,2].map(e=>{let t=1==e?"principal":"secondaire",i=1==e?"":"Secondary";return(0,n.jsxs)("div",{className:"flex items-end gap-4 mt-[1.25rem]",children:[(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsxs)(c.J,{children:["Texte du bouton ",t]}),(0,n.jsx)(o.p,{value:V?.[`buttonText${i}${M}`],className:"bg-white mt-2.5",onChange:t=>ef({newButtonText:t.target.value},2==e)})]}),(0,n.jsxs)("div",{className:"w-1/3",children:[(0,n.jsxs)(c.J,{children:["Lien du bouton ",t]}),(0,n.jsx)(o.p,{value:V?.[`link${i}${M}`],className:"bg-white mt-2.5",onChange:t=>ef({newLink:t.target.value},2==e)})]}),(0,n.jsx)("div",{className:"text-slate-900 text-sm h-9 flex items-center",children:" - OU - "}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)(c.J,{children:"S\xe9lectionner l'url \xe0 partir d'une page"}),(0,n.jsx)(k.B,{link:V?.[`link${i}${M}`],pageId:void 0,setLink:t=>ef({newLink:t},2==e),selectorClassname:"mt-2.5"})]})]},e)}),ec&&(0,n.jsx)("div",{className:"z-10 absolute w-full h-full bg-[#00000088] top-[50%] left-[50%] flex flex-col gap-2 justify-center items-center text-white -translate-x-[50%] -translate-y-[50%] cursor-pointer",children:(0,n.jsx)(m.A,{className:"h-[100px] w-[100px] animate-spin text-white"})}),(0,n.jsxs)("ul",{className:"absolute left-[-62px] top-[40%] z-[1] flex flex-col gap-2",children:[(0,n.jsxs)(N.m_,{children:[(0,n.jsx)(N.k$,{className:"flex h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",asChild:!0,children:(0,n.jsx)("li",{className:"flex h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",onPointerDown:()=>ef({reversed:!(V?.reversed!=void 0?V?.reversed:L)}),children:(0,n.jsx)(x.A,{size:20})})}),(0,n.jsx)(N.ZI,{children:"Switch"})]}),(0,n.jsxs)(N.m_,{children:[(0,n.jsx)(N.k$,{className:(0,d.cn)("mt-5 flex h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",!H&&"opacity-50 pointer-events-none"),asChild:!0,children:(0,n.jsx)("li",{className:"flex h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",onPointerDown:H?()=>G():void 0,children:(0,n.jsx)(p.A,{size:20})})}),(0,n.jsx)(N.ZI,{children:"Go backward"})]}),(0,n.jsxs)(N.m_,{children:[(0,n.jsx)(N.k$,{className:(0,d.cn)("flex h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",!Z&&"opacity-50 pointer-events-none"),asChild:!0,children:(0,n.jsx)("li",{className:"flex h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",onPointerDown:Z?()=>W():void 0,children:(0,n.jsx)(f.A,{size:20})})}),(0,n.jsx)(N.ZI,{children:"Go forward"})]})]})]}):eu||em?(0,n.jsxs)("div",{id:"about",className:(0,d.cn)("flex flex-col justify-between items-start w-full gap-5",!(V?.visibility==void 0||V?.visibility)&&"opacity-50"),style:{...V?.fontColor?{"--dark-1":V?.fontColor,"--dark-3":`${V?.fontColor}99`}:{}},children:[!V?.hideImage&&(0,n.jsx)("div",{className:(0,d.cn)("relative my-4 w-[calc(100vw_-_40px)] h-[calc((100vw_-_40px)_*_9/16)] rounded-2xl shrink-0"),children:(0,n.jsxs)("div",{className:(0,d.cn)("bg-gray-200 h-full rounded-2xl absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-full z-[1]",X&&""!==X&&"bg-white"),style:{...V?.iconName&&V?.iconBgColor&&{background:V?.iconBgColor??"transparent"},height:ep?`${ep}%`:""},children:[!V?.iconName&&(en&&""!=en?(0,n.jsx)(r.PdfViewer,{pdfUrl:en,thumbnailUrl:K,style:{objectFit:V?.imageObject??"cover"},viewLabel:P?.view_document}):et&&""!=et?(0,n.jsx)(a.default,{video:et,thumbnail:K??""}):(0,n.jsx)(n.Fragment,{children:X&&""!==X&&(0,n.jsx)(y.ImageViewer,{imageUrl:X,style:{objectFit:V?.imageObject??"cover"},priority:z,sizes:"calc(100vw - 40px)"})})),V?.iconName&&(0,n.jsx)(w.IconRenderer,{name:V?.iconName,className:"text-[calc((100vw_-_40px)_*_9/16)] w-full h-full flex items-center justify-center",style:{fontSize:V?.iconSize??"",justifyContent:V?.iconHorizontalAlign??"center",alignItems:V?.iconVerticalAlign??"center"},color:V.iconColor})]})}),(0,n.jsxs)("div",{className:"w-full",children:[(V?.[`name${M}`]==void 0||""!=(V?.[`name${M}`]??"").trim())&&(0,n.jsx)(l.p$,{className:"uppercase",children:V?.[`name${M}`]??V?.nameFr??P?.about_section??"\xc0 PROPOS"}),(V?.[`title${M}`]==void 0||(V?.[`title${M}`]??"")!="")&&(0,n.jsx)(l.H2,{className:"mb-[1rem] !text-2xl",children:V?.[`title${M}`]??V?.titleFr??"D\xe9crivez ce qui diff\xe9rencie votre entreprise de ses concurrents"}),(V?.[`description${M}`]==void 0||V?.[`description${M}`]!=""&&V?.[`description${M}`]!="\n"&&V?.[`description${M}`]!="<p><br></p>")&&(0,n.jsx)("div",{className:"sun-editor-editable !p-0 !text-dark1 !bg-transparent !text-base",dangerouslySetInnerHTML:{__html:V?.[`description${M}`]??V?.descriptionFr??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. <br><br> It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged."}}),(0,n.jsxs)("div",{className:(0,d.cn)("flex flex-col gap-4 mt-8 items-center",em&&"!flex-row"),children:[(V?.[`link${M}`]??"")!==""&&(V?.[`buttonText${M}`]??"")!==""&&(0,n.jsx)(C.CustomLink,{url:V?.[`link${M}`],className:"w-full uppercase border rounded-lg shadow-md font-semibold inline-flex items-center justify-center px-6 py-3 border-input bg-button-2 text-dark1",children:V?.[`buttonText${M}`]}),(V?.[`linkSecondary${M}`]??"")!==""&&(V?.[`buttonTextSecondary${M}`]??"")!==""&&(0,n.jsx)(C.CustomLink,{url:V?.[`linkSecondary${M}`],className:"w-full uppercase border rounded-lg shadow-md font-semibold inline-flex items-center justify-center px-6 py-3 border-input bg-button-1 text-white",children:V?.[`buttonTextSecondary${M}`]})]})]})]}):(0,n.jsxs)("div",{id:"about",className:(0,d.cn)("flex flex-col md:flex-row justify-between items-center w-full gap-10 md:gap-28",!(V?.visibility==void 0||V?.visibility)&&"opacity-50",(V?.reversed!=void 0?V?.reversed:L)&&"flex-col-reverse md:flex-row-reverse"),style:{...V?.fontColor?{"--dark-1":V?.fontColor,"--dark-3":`${V?.fontColor}99`}:{}},children:[(0,n.jsxs)("div",{className:"flex-1",children:[(V?.[`name${M}`]==void 0||""!=(V?.[`name${M}`]??"").trim())&&(0,n.jsx)(l.p$,{className:"uppercase",children:V?.[`name${M}`]??V?.nameFr??P?.about_section??"\xc0 PROPOS"}),(V?.[`title${M}`]==void 0||(V?.[`title${M}`]??"")!="")&&(0,n.jsx)(l.H2,{className:"mb-[1.25rem]",children:V?.[`title${M}`]??V?.titleFr??"D\xe9crivez ce qui diff\xe9rencie votre entreprise de ses concurrents"}),(V?.[`description${M}`]==void 0||V?.[`description${M}`]!=""&&V?.[`description${M}`]!="\n"&&V?.[`description${M}`]!="<p><br></p>")&&(0,n.jsx)("div",{className:"sun-editor-editable !p-0 !text-dark1 !bg-transparent !text-base",dangerouslySetInnerHTML:{__html:V?.[`description${M}`]??V?.descriptionFr??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. <br><br> It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged."}}),(0,n.jsxs)("div",{className:"flex gap-4 items-center",children:[(V?.[`link${M}`]??"")!==""&&(V?.[`buttonText${M}`]??"")!==""&&(0,n.jsx)(C.CustomLink,{url:V?.[`link${M}`],className:"mt-5 uppercase rounded-lg shadow-md font-semibold inline-flex items-center justify-center px-6 py-3 bg-button-2 text-dark1",children:V?.[`buttonText${M}`]}),(V?.[`linkSecondary${M}`]??"")!==""&&(V?.[`buttonTextSecondary${M}`]??"")!==""&&(0,n.jsx)(C.CustomLink,{url:V?.[`linkSecondary${M}`],className:"mt-5 uppercase rounded-lg shadow-md font-semibold inline-flex items-center justify-center px-6 py-3 bg-button-1 text-white",children:V?.[`buttonTextSecondary${M}`]})]})]}),!V?.hideImage&&(0,n.jsx)("div",{className:(0,d.cn)("relative w-full max-w-[540px] md:w-[540px] aspect-[27/21] rounded-2xl md:shrink-0"),style:{aspectRatio:ep?540/(420*ep/100):void 0},children:(0,n.jsxs)("div",{className:(0,d.cn)("bg-gray-200 h-full rounded-2xl absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-full z-[1]",X&&""!==X&&"bg-white"),style:{...V?.iconName&&V?.iconBgColor&&{background:V?.iconBgColor??"transparent"}},children:[!V?.iconName&&(en&&""!=en?(0,n.jsx)(r.PdfViewer,{pdfUrl:en,thumbnailUrl:K,style:{objectFit:V?.imageObject??"cover"},viewLabel:P?.view_document,sizes:"(max-width: 767px) 90vw, 540px"}):et&&""!=et?(0,n.jsx)(a.default,{video:et,thumbnail:K??"",sizes:"(max-width: 767px) 90vw, 540px"}):(0,n.jsx)(n.Fragment,{children:X&&""!==X&&(0,n.jsx)(y.ImageViewer,{imageUrl:X,style:{objectFit:V?.imageObject??"cover"},priority:z,sizes:"(max-width: 767px) 90vw, 540px"})})),V?.iconName&&(0,n.jsx)(w.IconRenderer,{name:V?.iconName,className:"text-[min(420px,70vw)] w-full h-full flex items-center justify-center",color:V.iconColor,style:{fontSize:V?.iconSize??"",justifyContent:V?.iconHorizontalAlign??"center",alignItems:V?.iconVerticalAlign??"center"}})]})})]})};var F=i(59649),_=i(27932),E=i(18160),L=i(84616),z=i(30285),B=i(66773),T=i(67977),P=i.n(T),R=i(96738);let M={titleFr:"Service",titleEn:"Service",titleNl:"Service",descriptionFr:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla.",descriptionEn:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla.",descriptionNl:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla.",image:""},D=({data:e=null,lng:t="fr",edit:i=!1,save:s,cancel:a,visibility:r,updateBlockContent:o})=>{let c=(0,d.ZH)(t),[u,m]=(0,h.useState)(e?.content?.list&&e?.content?.list.length>0?e?.content?.list:[M,M,M]),{content:x,backwardActive:g,forwardActive:b,setContent:j,goBackward:w,goForward:y}=(0,S._)(),{isMobile:k}=(0,v.default)(),C=(0,h.useRef)(null),$=(0,h.useRef)(null);function A({newName:e=null,newDescription:t=null}){j({...x,...e&&{[`name${c}`]:e},...t&&{[`description${c}`]:t}})}function I(e,t){let i=u.map((i,n)=>n===e?t:i);j({...x,list:i})}function F(e){let t=[...u];t.splice(e,1),j({...x,list:t})}return(0,h.useEffect)(()=>{j(e?.content??{},!0)},[e]),(0,h.useEffect)(()=>{i&&j(x?.content??x,!1)},[i]),(0,h.useEffect)(()=>{m(x?.list&&x?.list.length>0?x?.list:[M,M,M])},[x]),(0,h.useEffect)(()=>{s&&o&&o(e?.uuid??"",x)},[s,o]),(0,h.useEffect)(()=>{a&&j(e?.content,!0,!0)},[a]),(0,h.useEffect)(()=>{void 0!=r&&((x?.content??x)?.visibility??!0)!=r&&o&&o(e?.uuid??"",{...x,visibility:r})},[r]),i?(0,n.jsxs)("div",{className:"relative flex flex-col gap-5 !max-w-full",style:{...x?.fontColor?{"--dark-1":x?.fontColor,"--dark-3":`${x?.fontColor}99`}:{}},children:[(0,n.jsxs)("div",{className:"max-w-[690px] text-center mx-auto my-[1.875em]",children:[(0,n.jsx)(l.p$,{className:"border-[1px] border-dark1 min-w-[20ch]",contentEditable:!0,ref:C,onBlur:function(){let e=C.current.innerText;(x?.[`name${c}`]??"SERVICES")!=e&&A({newName:e})},children:x?.[`name${c}`]??"SERVICES"}),(0,n.jsx)(l.H2,{className:"border-[1px] border-dark1 min-w-[30ch]",contentEditable:!0,ref:$,onBlur:function(){let e=$.current.innerText;(x?.[`description${c}`]??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius.")!=e&&A({newDescription:e})},children:x?.[`description${c}`]??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius."})]}),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("div",{className:"absolute -top-12 right-2",children:(0,n.jsxs)(z.$,{variant:"outline",className:"!px-2 h-auto shadow-lg",onClick:function(){let e=[...u];e.push(M),j({...x,list:e})},children:[(0,n.jsx)(L.A,{size:30}),"Ajouter un service"]})}),(0,n.jsx)("div",{className:"[&>.list]:flex [&>.list]:gap-12 [&>.list]:flex-wrap",children:(0,n.jsx)(B.Ay,{onSortEnd:(e,t)=>{let i=[...u];i=P()(i,e,t),j({...x,list:i})},className:"list",children:u.map((e,t)=>t).map(e=>(0,n.jsx)(B.Uq,{children:(0,n.jsxs)("div",{className:"select-none relative",children:[(0,n.jsx)(B.$B,{children:(0,n.jsx)(R.
9CustomKnob,{})}),(0,n.jsx)(E.default,{data:u[e],lng:t,edit:i,cancel:a,cardPosition:e,updateElementList:I,deleteService:u.length>1?F:void 0,className:u.length>3&&!k?"flex-[30%] max-w-[401px]":"flex-1"})]})},e))})})]}),(0,n.jsxs)("ul",{className:"absolute left-[-62px] top-[40%] z-[1] flex flex-col gap-2",children:[(0,n.jsxs)(N.m_,{children:[(0,n.jsx)(N.k$,{className:(0,d.cn)("flex h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",!g&&"opacity-50 pointer-events-none"),asChild:!0,children:(0,n.jsx)("li",{className:"flex h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",onPointerDown:g?()=>w():void 0,children:(0,n.jsx)(p.A,{size:20})})}),(0,n.jsx)(N.ZI,{children:"Go backward"})]}),(0,n.jsxs)(N.m_,{children:[(0,n.jsx)(N.k$,{className:(0,d.cn)("flex h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",!b&&"opacity-50 pointer-events-none"),asChild:!0,children:(0,n.jsx)("li",{className:"flex h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",onPointerDown:b?()=>y():void 0,children:(0,n.jsx)(f.A,{size:20})})}),(0,n.jsx)(N.ZI,{children:"Go forward"})]})]})]}):(0,n.jsxs)("div",{className:(0,d.cn)("flex flex-col w-full",!(x?.visibility==void 0||x?.visibility)&&"opacity-50"),style:{...x?.fontColor?{"--dark-1":x?.fontColor,"--dark-3":`${x?.fontColor}99`}:{}},children:[(0,n.jsxs)("div",{className:(0,d.cn)("max-w-[690px] text-center mx-auto has-[div]:mb-14 has-[h2]:mb-14 has-[p]:mb-14",k&&"has-[div]:mb-8 has-[h2]:mb-8 has-[p]:mb-8"),children:[(x?.[`name${c}`]==void 0||""!=(x?.[`name${c}`]??"").trim())&&(0,n.jsx)(l.p$,{children:x?.[`name${c}`]??x?.nameFr??"SERVICES"}),(x?.[`description${c}`]==void 0||""!=(x?.[`description${c}`]??"").trim())&&(0,n.jsx)(l.H2,{className:(0,d.cn)(k&&"!text-2xl"),children:x?.[`description${c}`]??x?.descriptionFr??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius."})]}),(0,n.jsx)("div",{className:"flex flex-wrap gap-12 justify-center",children:u.map((e,i)=>(0,n.jsx)(E.default,{data:e,lng:t,className:(0,d.cn)(u.length>3&&!k?"flex-[30%] max-w-[401px]":"flex-1",k&&"min-w-full"),imageObjectType:x?.imageObject},`service-${i}`))})]})};var O=i(10463);i(47203)},17313:(e,t,i)=>{"use strict";i.d(t,{Xi:()=>o,av:()=>c,j7:()=>r,tU:()=>a});var n=i(95155);i(12115);var s=i(60704),l=i(59434);function a({className:e,...t}){return(0,n.jsx)(s.bL,{"data-slot":"tabs",className:(0,l.cn)("flex flex-col gap-2",e),...t})}function r({className:e,...t}){return(0,n.jsx)(s.B8,{"data-slot":"tabs-list",className:(0,l.cn)("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function o({className:e,...t}){return(0,n.jsx)(s.l9,{"data-slot":"tabs-trigger",className:(0,l.cn)("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function c({className:e,...t}){return(0,n.jsx)(s.UC,{"data-slot":"tabs-content",className:(0,l.cn)("flex-1 outline-none",e),...t})}},17972:(e,t,i)=>{"use strict";i.d(t,{G7:()=>o,L$:()=>u,h_:()=>m,oI:()=>c,uB:()=>r,xL:()=>d});var n=i(95155);i(12115);var s=i(77740),l=i(47924),a=i(59434);function r({className:e,...t}){return(0,n.jsx)(s.uB,{"data-slot":"command",className:(0,a.cn)("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function o({className:e,...t}){return(0,n.jsxs)("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[(0,n.jsx)(l.A,{className:"size-4 shrink-0 opacity-50"}),(0,n.jsx)(s.uB.Input,{"data-slot":"command-input",className:(0,a.cn)("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function c({className:e,...t}){return(0,n.jsx)(s.uB.List,{"data-slot":"command-list",className:(0,a.cn)("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function d({...e}){return(0,n.jsx)(s.uB.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function u({className:e,...t}){return(0,n.jsx)(s.uB.Group,{"data-slot":"command-group",className:(0,a.cn)("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function m({className:e,...t}){return(0,n.jsx)(s.uB.Item,{"data-slot":"command-item",className:(0,a.cn)("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}i(54165)},18160:(e,t,i)=>{"use strict";i.d(t,{default:()=>g});var n=i(95155),s=i(30285),l=i(62523),a=i(85057),r=i(59434),o=i(62525),c=i(12115),d=i(28095),u=i(47368),m=i(3055),x=i(36136),p=i(78055),f=i(37936),h=i(8117);let g=({cardPosition:e,data:t=null,lng:i="fr",edit:g=!1,cancel:b=!1,className:v,imageObjectType:j,updateElementList:N,deleteService:w})=>{let y=(0,r.ZH)(i),[k,C]=(0,c.useState)(t),S=(0,c.useRef)(null),$=(0,c.useRef)(null),[A,I]=(0,c.useState)(),[F,_]=(0,c.useState)(),[E,L]=(0,c.useState)(),[z,B]=(0,c.useState)();(0,c.useEffect)(()=>{k?.croppedArea&&(E?.x!==k?.croppedArea?.x||E?.y!==k?.croppedArea?.y)&&L(k?.croppedArea),k?.image===A||k?.image instanceof File||(I(k?.image),k?.croppedArea||_(k?.image)),k?.pdf===z||k?.pdf instanceof File||B(k?.pdf)},[k]),(0,c.useEffect)(()=>{t&&C(t)},[t]),(0,c.useEffect)(()=>{S.current&&(S.current.innerText=k?.[`title${y}`]??"Service"),$.current&&($.current.innerText=k?.[`description${y}`]??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla.")},[i]),(0,c.useEffect)(()=>{b&&C(t)},[b]),(0,c.useEffect)(()=>{E&&A&&(0,d.Ay)(A,E,0).then(e=>{e&&(P({newCroppedArea:E}),_(URL.createObjectURL(e)))})},[E]);let T=(0,c.useMemo)(()=>
9{if(k?.iconOriginalSize&&k?.iconSize){let e=Number(k?.iconOriginalSize.replace("px",""));return Math.round(Number(k?.iconSize.replace("px",""))/e*100)}return null},[k?.iconOriginalSize,k?.iconSize]);function P({newTitle:t=null,newDescription:i=null,newIconName:n=null,newImage:s=null,newCroppedArea:l=null,newLink:a=null,newButtonText:r=null,newPdf:o=null,newIconColor:c=null,newIconSize:d=null,newIconBgColor:u=null,newIconVerticalAlign:m=null,newIconHorizontalAlign:x=null,newIconOriginalSize:p=null,newHideImage:f=null}){let h={...k,...t&&{[`title${y}`]:t},...i&&{[`description${y}`]:i},...s&&{image:s,croppedArea:null,iconName:null,iconSize:null,...o?{}:{pdf:null}},...n&&{image:null,croppedArea:null,iconName:n,pdf:null},...l&&{croppedArea:l},...o&&{pdf:o,iconName:null,...s?{image:s}:{image:null}},...null!=a&&{[`link${y}`]:a},...null!=r&&{[`buttonText${y}`]:r},...c&&{iconColor:c},...d&&{iconSize:d},...u&&{iconBgColor:u},...m&&{iconVerticalAlign:m},...x&&{iconHorizontalAlign:x},...p&&{iconOriginalSize:p},...null!=f&&{hideImage:f}};N&&void 0!=e&&N(e,h)}return g?(0,n.jsxs)("div",{className:(0,r.cn)("relative",v),children:[w&&void 0!=e&&(0,n.jsx)("div",{className:"absolute top-2 left-2 z-[2]",children:(0,n.jsxs)(s.$,{variant:"destructive",className:"!px-2 h-auto",onClick:()=>w(e),children:[(0,n.jsx)(o.A,{size:30}),"Supprimer le service"]})}),(0,n.jsx)(m.A,{labelClassname:"block relative w-full h-[240px] mb-[1.875em]",iconClassname:"text-[240px] w-full h-full flex items-center justify-center",imageUrl:A,setImageUrl:I,croppedImageUrl:F,setCroppedImageUrl:_,setCroppedArea:L,canbeVideo:!1,canbePdf:!0,iconName:k.iconName,iconColor:k.iconColor,iconFinalSize:k?.iconSize,iconBgColor:k?.iconBgColor,iconVerticalAlign:k?.iconVerticalAlign,iconHorizontalAlign:k?.iconHorizontalAlign,iconOriginalSize:k?.iconOriginalSize,hideImage:k?.hideImage!=void 0&&k?.hideImage,pdfUrl:z,setPdfUrl:B,updateElement:P,removeImage:()=>N(e,{...k,image:null,croppedArea:null,iconName:null,pdf:null})}),(0,n.jsx)("h3",{className:"text-2xl text-dark1 font-semibold leading-[120%] mb-4 border-[1px] border-dark1",contentEditable:"plaintext-only",ref:S,onBlur:function(){P({newTitle:S.current.innerText})},children:k?.[`title${y}`]??"Service"}),(0,n.jsx)("p",{className:"line-clamp-6 mb-5 text-dark1 border-[1px] border-dark1",contentEditable:"plaintext-only",ref:$,onBlur:function(){P({newDescription:$.current.innerText})},children:k?.[`description${y}`]??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla."}),(0,n.jsxs)("div",{className:"flex flex-col gap-2 mt-[1.25rem]",children:[(0,n.jsxs)("div",{className:"w-full",children:[(0,n.jsx)(a.J,{children:"Texte du bouton"}),(0,n.jsx)(l.p,{value:k?.[`buttonText${y}`],className:"bg-white mt-2",onChange:e=>P({newButtonText:e.target.value})})]}),(0,n.jsxs)("div",{className:"w-full",children:[(0,n.jsx)(a.J,{children:"Lien du bouton"}),(0,n.jsx)(l.p,{value:k?.[`link${y}`],className:"bg-white mt-2",onChange:e=>P({newLink:e.target.value})})]}),(0,n.jsxs)("div",{className:"w-full",children:[(0,n.jsx)(a.J,{children:"S\xe9lectionner l'url \xe0 partir d'une page"}),(0,n.jsx)(p.B,{link:k?.[`link${y}`],pageId:void 0,setLink:e=>P({newLink:e}),selectorClassname:"mt-2"})]})]})]}):(0,n.jsxs)("div",{className:(0,r.cn)("relative",v),children:[!k?.hideImage&&(0,n.jsx)("div",{className:"relative h-[240px] mb-[1.875em]",style:{height:T?`${240*T/100}px`:""},children:(0,n.jsxs)("div",{className:(0,r.cn)("bg-white h-full rounded-xl absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-full z-[1] over"),style:{...k?.iconName&&k?.iconBgColor&&{background:k?.iconBgColor??""}},children:[!k.iconName&&z&&""!==z?(0,n.jsx)(h.PdfViewer,{pdfUrl:z,thumbnailUrl:F,className:"!rounded-xl",style:{objectFit:j??"cover"},sizes:"(max-width: 767px) 100vw, 420px"}):!k.iconName&&F&&""!==F&&(0,n.jsx)(x.ImageViewer,{imageUrl:F,className:"!rounded-xl",style:{objectFit:j??"cover"},sizes:"(max-width: 767px) 100vw, 420px"}),k.iconName&&(0,n.jsx)(u.IconRenderer,{name:k.iconName,className:"text-[240px] w-full h-full flex items-center justify-center",color:k.iconColor,style:{fontSize:k?.iconSize??"",justifyContent:k?.iconHorizontalAlign??"center",alignItems:k?.iconVerticalAlign??"center",height:"100%",width:"100%"}})]})}),(k?.[`title${y}`]==void 0||""!=(k?.[`title${y}`]??"").trim())&&(0,n.jsx)("h3",{className:"text-2xl text-dark1 font-semibold leading-[120%] mb-4",children:k?.[`title${y}`]??"Service"}),(k?.[`description${y}`]==void 0||""!=(k?.[`description${y}`]??"").trim())&&(0,n.jsx)("p",{className:"line-clamp-6 mb-5 text-dark1 whitespace-pre-line",children:k?.[`description${y}`]??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla."}),(k?.[`link${y}`]??"")!=""&&(k?.[`buttonText${y}`]??"")!=""&&(0,n.jsx)(f.CustomLink,{url:k?.[`link${y}`],className:"uppercase border rounded-lg shadow-md font-semibold inline-flex items-center justify-center px-6 py-3 border-input bg-background hover:bg-accent hover:text-accent-foreground",children:k?.[`buttonText${y}`]})]})}},18609:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>P});var n=i(95155),s=i(12115),l=i(59434),a=i(22912),r=i(28883),o=i(4516),c=i(19420),d=i(66474),u=i(51154),m=i(90985);function x({width:e="25",height:t="25",fill:i="currentColor"}){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:"0 0 25 25",fill:"none",children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.332 3.39062H8.33203C5.57061 3.39062 3.33203 5.6292 3.33203 8.39062V16.3906C3.33203 19.152 5.57061 21.3906 8.33203 21.3906H16.332C19.0934 21.3906 21.332 19.152 21.332 16.3906V8.39062C21.332 5.6292 19.0934 3.39062 16.332 3.39062ZM19.582 16.3906C19.5765 18.1832 18.1246 19.6351 16.332 19.6406H8.33203C6.53938 19.6351 5.08752 18.1832 5.08203 16.3906V8.39062C5.08752 6.59798 6.53938 5.14611 8.33203 5.14062H16.332C18.1246 5.14611 19.5765 6.59798 19.582 8.39062V16.3906ZM17.082 8.64062C17.6343 8.64062 18.082 8.1929 18.082 7.64062C18.082 7.08835 17.6343 6.64062 17.082 6.64062C16.5297 6.64062 16.082 7.08835 16.082 7.64062C16.082 8.1929 16.5297 8.64062 17.082 8.64062ZM12.332 7.89062C9.84675 7.89062 7.83203 9.90534 7.83203 12.3906C7.83203 14.8759 9.84675 16.8906 12.332 16.8906C14.8173 16.8906 16.832 14.8759 16.832 12.3906C16.8347 11.1963 16.3614 10.0502 15.5169 9.2057C14.6724 8.36121 13.5263 7.88797 12.332 7.89062ZM9.58203 12.3906C9.58203 13.9094 10.8132 15.1406 12.332 15.1406C13.8508 15.1406 15.082 13.9094 15.082 12.3906C15.082 10.8718 13.8508 9.64062 12.332 9.64062C10.8132 9.64062 9.58203 10.8718 9.58203 12.3906Z",fill:i})})}var p=i(58571),f=i(54324);function h(){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"25",viewBox:"-3.5 -3.5 30 30",fill:"currentColor",children:(0,n.jsx)("path",{d:"M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"})})}var g=i(16225),b=i(51012),v=i(11867),j=i(47262),N=i(66766),w=i(6874),y=i.n(w),k=i(30285),C=i(51368),S=i(56671),$=i(74749),A=i(502),I=i(53189),F=i(76203),_=i(40424),E=i(35918),L=i(54165
9),z=i(25618),B=i(22346),T=i(66424);let P=({data:e=null,lng:t="fr",edit:i,save:w,cancel:P,visibility:R,siteConfig:M,menuStructure:D,currentPageId:O,currentBlockId:U,pages:V,updateBlockContent:q,setCurrentPageId:H,setCurrentPage:Z,setCurrentBlockId:J})=>{b.n.use.navCommunity();let G=b.n.use.access_token(),W=b.n.use.siteInfo(),Q=b.n.use.editMode(),K=b.n.use.siteMenu(),[Y,X]=(0,s.useState)(null),[ee,et]=(0,s.useState)(!!W?.config?.duplicatedBlocks?.footer),[ei,en]=(0,s.useState)(!1),[es,el]=(0,s.useState)(!1),[ea,er]=(0,s.useState)(null),eo=(0,v.A)(),{isMobile:ec}=(0,$.default)(),ed=(0,s.useMemo)(()=>D.length>0?D:K,[K,D]),{goToBlock:eu,isActive:em}=(0,a.A)({menuStructure:ed,lang:t}),ex=e=>null==J?em(e):null!=e&&String(e)===String(U),ep=()=>{if(W?.id){let e=W?.config??{};ee?e.duplicatedBlocks={...e.duplicatedBlocks??{},footer:ee}:e.duplicatedBlocks?.footer&&delete e.duplicatedBlocks?.footer,eo.mutate({siteId:W?.id??0,data:{config:e}})}};async function ef(e,t){let i=e.map((e,t)=>({siteBlock:e,order:t+1,content:e.content}));await (0,F.s)(i,t)}async function eh(){en(!0);try{let{data:t}=await (0,_.q)(Number(W?.id??0)),i={id:e.id,identifier:e.identifier,labelEn:e.labelEn,labelFr:e.labelFr,labelNl:e.labelNl},n=!1;for(let e of t)if(!g.vk.map(e=>e.slugEn).includes(e?.slugEn??"")&&(e?.externalLink??"")==""){let t=await (0,_.q)(e.id??0),s=!0;for(let e of t.data)"footer"==e.siteBlock.identifier&&(s=!1);if(s){let s=(0,C.A)(),l=[...t.data.map(e=>({...e.siteBlock,blockId:e.id,blockParentId:e.blockParentId,content:e.content,uuid:(0,C.A)()})),{...i,uuid:s}];n=!0,ef(l,e)}}n?S.o.success("Succ\xe8s",{description:"Le footer a bien \xe9t\xe9 ajout\xe9 aux autres pages"}):S.o.info("Info",{description:"Tous les pages statiques ont d\xe9j\xe0 un footer"}),en(!1)}catch(e){console.log("Footer ====",e),S.o.success("Erreur",{description:"Une erreur est survenue, re-essayer plus tard"}),en(!1)}}(0,s.useEffect)(()=>{(0,E.T)(t).then(e=>{X(e)})},[t]),(0,s.useEffect)(()=>{w&&q&&(q(e?.uuid??"",e?.content),ee!=W?.config?.duplicatedBlocks?.footer&&ep())},[w,q]),(0,s.useEffect)(()=>{!!i!=es&&el(!!i)},[i]),(0,s.useEffect)(()=>{P&&et(!!W?.config?.duplicatedBlocks?.infos)},[P]),(0,s.useEffect)(()=>{void 0!=R&&(e?.content?.visibility??!0)!=R&&q&&q(e?.uuid??"",{...e?.content??{},visibility:R})},[R]);let eg=(0,s.useCallback)(()=>{if(W){let e=W?.config?.email??"";if(""==e.trim()&&""!=(W?.config?.infos?.email??"").trim()&&(e=W?.config?.infos?.email??""),e.trim().length>0)return(0,n.jsxs)(y(),{href:`mailto:${e}`,className:"flex flex-row items-center gap-2.5 !text-dark1 font-medium text-xs",children:[(0,n.jsx)(r.A,{size:16})," ",(0,n.jsx)("span",{children:e})]})}return null},[W]),eb=(0,s.useCallback)(()=>{if(W){let e=W?.config?.[`address${(0,l.ZH)(t)}`]??"";if(""==e.trim()&&""!=(W?.config?.infos?.address??"").trim()&&(e=W?.config?.infos?.address??""),e.trim().length>0)return(0,n.jsxs)("div",{className:"flex flex-row items-start gap-2.5 !text-dark1 font-medium text-xs",children:[(0,n.jsx)(o.A,{size:16,className:"!min-w-4 mt-0.5"})," ",(0,n.jsx)("span",{children:e})]})}return null},[W,t]),ev=(0,s.useCallback)(()=>{if(W){let e=W?.config?.phone??"";if(""==e.trim()&&""!=(W?.config?.infos?.telephone??"").trim()&&(e=W?.config?.infos?.telephone??""),e.trim().length>0)return(0,n.jsxs)(y(),{href:`tel:${e}`,className:"flex flex-row items-center gap-2.5 !text-dark1 font-medium text-xs",children:[(0,n.jsx)(c.A,{size:16})," ",(0,n.jsx)("span",{children:e})]})}return null},[W,t]);return ec?(0,n.jsxs)("div",{id:"footer",className:(0,l.cn)("relative flex flex-col justify-between items-center w-full bg-navbar-footer px-5",!(e?.content?.visibility==void 0||e?.content?.visibility)&&"opacity-50"),children:[(0,n.jsxs)("div",{className:"w-full mb-10 pt-5 flex flex-col gap-8 items-center",children:[(0,n.jsx)("div",{children:(M?.logo??"")!==""||(W?.organization?.avatarUrl??"")!=""?(0,n.jsx)("div",{className:"h-[64px] flex items-center mr-auto",children:(0,n.jsx)(N.default,{src:(M?.logo??"")!=""?M?.logo??"":W?.organization?.avatarUrl??"",alt:"Uploaded",className:"!h-[64px] !w-auto object-cover rounded-xl mr-auto !relative",fill:!0,sizes:"200px"})}):(0,n.jsx)("span",{className:"h-[64px] flex items-center text-4xl font-bold text-dark1 mr-auto",children:"LOGO"})}),(0,n.jsxs)("div",{className:"flex flex-col justify-between gap-8 items-center w-full",children:[(0,n.jsx)("ul",{className:"flex flex-col gap-4 text-sm h-fit items-center w-full",children:q?ed.map((e,t)=>(0,n.jsx)(s.Fragment,{children:"MENU"===e.type&&(!e.children||0===e.children.length)||e.hide?null:(0,n.jsxs)("li",{className:"group relative list-none",children:[(0,n.jsxs)("a",{onClick:()=>{"PAGE"===e.type&&(H?.(Number(e.pageId)),Z?.(V.find(t=>
9t.id==e.pageId)??null)),"BLOCK"===e.type&&(eu(e.blockId),J?.(Number(e.blockId)))},className:(0,l.cn)("relative flex items-center !text-dark1 font-medium text-xs","MENU"!==e.type&&"cursor-pointer",O==Number(e.pageId)||ex(e.blockId)||e?.children?.find(e=>O?.toString()===e?.pageId)?"underline":""),children:[e.labelFr.toUpperCase(),e.children&&e.children.length>0&&(0,n.jsx)(d.A,{className:"ml-1 h-4 w-4 absolute -right-5"})]}),e.children&&e.children.length>0&&(0,n.jsx)("ul",{className:(0,l.cn)("invisible z-10 absolute left-1/2 -translate-x-1/2 max-w-[80vw] top-full mt-3 min-w-48 w-fit rounded-lg border bg-navbar-footer py-2 opacity-0 shadow-lg transition-all duration-300 group-hover:visible group-hover:opacity-100",t>ed.length/2&&e.children.length>ed.length&&"top-[unset] bottom-full"),children:e.children.map((e,t)=>(0,n.jsx)("li",{children:(0,n.jsx)("a",{className:(0,l.cn)("block px-4 py-2 text-dark1 hover:bg-[#00000033] cursor-pointer",O==Number(e.pageId)?"font-medium":""),children:e.labelFr})},t))})]})},t)):W?.isSAP?ed.map((e,t)=>(0,n.jsx)(s.Fragment,{children:e.hide?null:(0,n.jsx)("li",{onClick:()=>{eu(e.blockId),J?.(Number(e.blockId))},className:(0,l.cn)("cursor-pointer flex items-center !text-dark1 font-medium text-xs",ex(e.blockId)&&"underline"),children:e.labelFr.toUpperCase()})},t)):ed.map((e,t)=>(0,n.jsx)(s.Fragment,{children:e.hide||"MENU"===e.type&&(!e.children||0===e.children.length)||e.externalLink&&e?.needsLogin&&!G||(e.children??[]).length>0&&(e.children??[]).every(e=>e.externalLink&&e.needsLogin&&!G)?null:(0,n.jsxs)("li",{className:"relative group w-full flex justify-center items-center",children:["MENU"!=e.type?(0,n.jsxs)(y(),{href:e.externalLink?`${e.externalLink}${e.needsLogin&&G?`?token=${G}`:""}`:"/"+((V??[]).find(t=>t.id==e.pageId)?.slugFr??""),className:(0,l.cn)("relative cursor-pointer flex items-center !text-dark1 font-medium text-xs hover:underline",(O==Number(e.pageId)||e?.children?.find(e=>O?.toString()===e?.pageId))&&"underline"),target:e.externalLink&&e.openInNewTab?"_blank":"_self",rel:"noopener noreferrer",children:[e.labelFr.toUpperCase(),(e.children??[]).length>0&&(0,n.jsx)(d.A,{className:"ml-1 h-4 w-4 absolute -right-5"})]}):(0,n.jsxs)("span",{className:(0,l.cn)("relative flex items-center !text-dark1 font-medium text-xs","MENU"!==e.type&&"cursor-pointer hover:underline",e?.children?.find(e=>O?.toString()===e?.pageId)?"underline":""),children:[e.labelFr.toUpperCase(),(e.children??[]).length>0&&(0,n.jsx)(d.A,{className:"ml-1 h-4 w-4 absolute -right-5"})]}),e.children&&e.children.length>0&&(0,n.jsx)("ul",{className:(0,l.cn)("invisible z-10 absolute left-1/2 -translate-x-1/2 max-w-[80vw] top-full mt-3 min-w-48 w-fit rounded-lg border bg-navbar-footer py-2 opacity-0 shadow-lg transition-all duration-300 group-hover:visible group-hover:opacity-100",t>ed.length/2&&e.children.length>ed.length&&"top-[unset] bottom-full"),children:e.children.map((e,t)=>e.externalLink&&e.needsLogin&&!G?null:(0,n.jsx)("li",{children:(0,n.jsx)(y(),{href:e.externalLink?`${e.externalLink}${e.needsLogin&&G?`?token=${G}`:""}`:"/"+((V??[]).find(t=>t.id==e.pageId)?.slugFr??""),className:(0,l.cn)("whitespace-nowrap block pl-5 pr-12 py-2.5 font-semibold text-sm !text-dark1 hover:bg-[#00000033] cursor-pointer uppercase",O==Number(e.pageId)?"text-[#18a0fb]":""),target:e.externalLink&&e.openInNewTab?"_blank":"_self",rel:"noopener noreferrer",children:(0,l.ZH)(e.labelFr)})},t))})]})},t))}),(0,n.jsxs)("ul",{className:"flex gap-4 text-sm",children:[M?.showFacebook&&(0,n.jsx)("li",{children:(0,n.jsx)("a",{href:M?.facebook??"",target:"_blank",className:"flex items-center gap-3 font-medium text-xs !text-dark1",children:(0,n.jsx)(m.A,{})})}),M?.showInstagram&&(0,n.jsx)("li",{children:(0,n.jsx)("a",{href:M?.instagram??"",target:"_blank",className:"flex items-center gap-3 font-medium text-xs !text-dark1",children:(0,n.jsx)(x,{})})}),M?.showTwitter&&(0,n.jsx)("li",{children:(0,n.jsx)("a",{href:M?.twitter??"",target:"_blank",className:"flex items-center gap-3 font-medium text-xs !text-dark1",children:(0,n.jsx)(h,{})})}),M?.showLinkedIn&&(0,n.jsx)("li",{children:(0,n.jsx)("a",{href:M?.linkedIn??"",target:"_blank",className:"flex items-center gap-3 font-medium text-xs !text-dark1",children:(0,n.jsx)(p.A,{})})}),M?.showYoutube&&(0,n.jsx)("li",{children:(0,n.jsx)("a",{href:M?.youtube??"",target:"_blank",className:"flex items-center gap-3 font-medium text-xs !text-dark1",children:(0,n.jsx)(f.A,{})})})]}),(eg()||eb()||ev())&&(0,n.jsxs)("ul",{className:"flex flex-wrap gap-4 text-sm justify-center",children:[eg(),eb(),ev()]})]})]}),(0,n.jsxs)("div",{className:"w-full text-sm flex justify-between py-5 border-t border-dark1 text-dark1",children:[(0,n.jsxs)("span",{children:["\xa9 Copyright ",new Date().getFullYear()]}),(0,n.jsxs)("div",{className:"flex gap-6",children:[(0,n.jsx)("a",{className:"cursor-pointer",target:"_blank","data-sentry-element":"Link","data-sentry-source-file":"footer.jsx",href:`https://${g.oO}/privacy`,children:Y?.privacy??"Confidentialit\xe9"}),(0,n.jsx)("a",{className:"cursor-pointer",target:"_blank","data-sentry-element":"Link","data-sentry-source-file":"footer.jsx",href:`https://${g.oO}/privacy`,children:"Cookies"})]})]})]}):(0,n.jsxs)("div",{id:"footer",className:(0,l.cn)("relative container flex flex-col justify-between items-center w-full bg-navbar-footer px-8 pb-12",!(e?.content?.visibility==void 0||e?.content?.visibility)&&"opacity-50"),children:[i&&!W?.isSAP&&(0,n.jsxs)("div",{className:"flex flex-row gap-4 justify-between w-[calc(100%_-_4rem)] absolute bottom-5 left-8",children:[(0,n.jsxs)("div",{className:"flex gap-2.5 items-center",children:[(0,n.jsx)(j.S,{id:"footer-duplicate",checked:ee,onCheckedChange:e=>{et(!!e.valueOf())}}),(0,n.jsx)("label",{htmlFor:"footer-duplicate",className:"cursor-pointer text-sm font-medium text-dark1",children:"Ajouter le footer aux prochaines pages ajout\xe9es"})]}),(0,n.jsxs)(k.$,{onClick:eh,disabled:ei,children:[ei&&(0,n.jsx)(u.A,{className:"mx-auto h-8 animate-spin"}),"Ajouter le footer aux pages statiques"]})]}),(0,n.jsxs)("div",{className:"w-full mb-20 pt-20 flex flex-wrap",children:[(0,n.jsx)("div",{className:"w-1/3",children:(M?.logo??"")!==""||(W?.organization?.avatarUrl??"")!=""?(0,n.jsx)("div",{className:"h-[64px] flex items-center mr-auto",children:(0,n.jsx)(N.default,{src:(M?.logo??"")!=""?M?.logo??"":W?.organization?.avatarUrl??"",alt:"Uploaded",className:"!h-[64px] !w-auto object-cover rounded-xl mr-auto !relative",fill:!0,sizes:"200px"})}):(0,n.jsx)("span",{className:"h-[72px] flex items-center text-4xl font-bold text-dark1 mr-auto",children:"LOGO"})}),(0,n.jsxs)("div",{className:"w-2/3 flex justify-between gap-16",children:[(0,n.jsx)("div",{className:"hidden sm:block"}),(0,n.jsx)("ul",{className:"flex flex-col gap-4 text-sm w-1/4",children:q?ed.map((e,t)=>(0,n.jsx)(s.Fragment,{children:"MENU"===e.type&&(!e.children||0===e.children.length)||e.hide?null:(0,n.jsxs)("li",{className:"group relative list-none",children:[(0,n.jsxs)("a",{onClick:()=>{"PAGE"===e.type&&(H?.(Number(e.pageId)),Z?.(V.find(t=>
9t.id==e.pageId)??null)),"BLOCK"===e.type&&(eu(e.blockId),J?.(Number(e.blockId)))},className:(0,l.cn)("flex items-center !text-dark1 font-medium text-xs cursor-pointer",O==Number(e.pageId)||ex(e.blockId)||e?.children?.find(e=>O?.toString()===e?.pageId)?"underline":""),children:[e.labelFr.toUpperCase(),e.children&&e.children.length>0&&(0,n.jsx)(d.A,{className:"ml-1 h-4 w-4"})]}),e.children&&e.children.length>0&&(0,n.jsx)("ul",{className:(0,l.cn)("invisible z-10 absolute -left-2 top-full mt-3 min-w-48 w-fit rounded-lg border bg-navbar-footer py-2 opacity-0 shadow-lg transition-all duration-300 group-hover:visible group-hover:opacity-100",t>ed.length/2&&e.children.length>ed.length&&"top-[unset] bottom-full"),children:e.children.map((e,t)=>(0,n.jsx)("li",{children:(0,n.jsx)("a",{className:(0,l.cn)("block px-4 py-2 text-dark1 hover:bg-[#00000033] cursor-pointer",O==Number(e.pageId)?"font-medium":""),children:e.labelFr})},t))})]})},t)):W?.isSAP?ed.map((e,t)=>(0,n.jsx)(s.Fragment,{children:e.hide?null:(0,n.jsx)("li",{onClick:()=>{eu(e.blockId),J?.(Number(e.blockId))},className:(0,l.cn)("cursor-pointer flex items-center !text-dark1 font-medium text-xs",ex(e.blockId)&&"underline"),children:e.labelFr.toUpperCase()})},t)):ed.map((e,t)=>(0,n.jsx)(s.Fragment,{children:e.hide||"MENU"===e.type&&(!e.children||0===e.children.length)||e.externalLink&&e?.needsLogin&&!G||(e.children??[]).length>0&&(e.children??[]).every(e=>e.externalLink&&e.needsLogin&&!G)?null:(0,n.jsxs)("li",{className:"relative group",children:["MENU"!=e.type?(0,n.jsxs)(y(),{href:e.externalLink?`${e.externalLink}${e.needsLogin&&G?`?token=${G}`:""}`:"/"+((V??[]).find(t=>t.id==e.pageId)?.slugFr??""),className:(0,l.cn)("cursor-pointer flex items-center !text-dark1 font-medium text-xs hover:underline",(O==Number(e.pageId)||e?.children?.find(e=>O?.toString()===e?.pageId))&&"underline"),target:e.externalLink&&e.openInNewTab?"_blank":"_self",rel:"noopener noreferrer",children:[e.labelFr.toUpperCase(),(e.children??[]).length>0&&(0,n.jsx)(d.A,{className:"ml-1 h-4 w-4"})]}):(0,n.jsxs)("span",{className:(0,l.cn)("flex items-center !text-dark1 font-medium text-xs cursor-pointer hover:underline",e?.children?.find(e=>O?.toString()===e?.pageId)?"underline":""),children:[e.labelFr.toUpperCase(),(e.children??[]).length>0&&(0,n.jsx)(d.A,{className:"ml-1 h-4 w-4"})]}),e.children&&e.children.length>0&&(0,n.jsx)("ul",{className:(0,l.cn)("invisible z-10 absolute -left-2 top-full mt-3 min-w-48 w-fit rounded-lg border bg-navbar-footer py-2 opacity-0 shadow-lg transition-all duration-300 group-hover:visible group-hover:opacity-100",t>ed.length/2&&e.children.length>ed.length&&"top-[unset] bottom-full"),children:e.children.map((e,t)=>e.externalLink&&e.needsLogin&&!G?null:(0,n.jsx)("li",{children:(0,n.jsx)(y(),{href:e.externalLink?`${e.externalLink}${e.needsLogin&&G?`?token=${G}`:""}`:"/"+((V??[]).find(t=>t.id==e.pageId)?.slugFr??""),className:(0,l.cn)("whitespace-nowrap block pl-5 pr-12 py-2.5 font-semibold text-sm !text-dark1 hover:bg-[#00000033] cursor-pointer uppercase",O==Number(e.pageId)?"text-[#18a0fb]":""),target:e.externalLink&&e.openInNewTab?"_blank":"_self",rel:"noopener noreferrer",children:(0,l.ZH)(e.labelFr)})},t))})]})},t))}),(0,n.jsxs)("ul",{className:"flex flex-col gap-4 text-sm w-1/4",children:[M?.showFacebook&&(0,n.jsx)("li",{children:(0,n.jsxs)("a",{href:M?.facebook??"",target:"_blank",className:"flex items-center gap-3 font-medium text-xs !text-dark1",children:[(0,n.jsx)(m.A,{}),(0,n.jsx)("span",{children:"Facebook"})]})}),M?.showInstagram&&(0,n.jsx)("li",{children:(0,n.jsxs)("a",{href:M?.instagram??"",target:"_blank",className:"flex items-center gap-3 font-medium text-xs !text-dark1",children:[(0,n.jsx)(x,{}),(0,n.jsx)("span",{children:"Instagram"})]})}),M?.showTwitter&&(0,n.jsx)("li",{children:(0,n.jsxs)("a",{href:M?.twitter??"",target:"_blank",className:"flex items-center gap-3 font-medium text-xs !text-dark1",children:[(0,n.jsx)(h,{}),(0,n.jsx)("span",{children:"Twitter"})]})}),M?.showLinkedIn&&(0,n.jsx)("li",{children:(0,n.jsxs)("a",{href:M?.linkedIn??"",target:"_blank",className:"flex items-center gap-3 font-medium text-xs !text-dark1",children:[(0,n.jsx)(p.A,{}),(0,n.jsx)("span",{children:"Linkedin"})]})}),M?.showYoutube&&(0,n.jsx)("li",{children:(0,n.jsxs)("a",{href:M?.youtube??"",target:"_blank",className:"flex items-center gap-3 font-medium text-xs !text-dark1",children:[(0,n.jsx)(f.A,{}),(0,n.jsx)("span",{children:"Youtube"})]})})]}),(eg()||eb()||ev())&&(0,n.jsxs)("ul",{className:"flex flex-col gap-4 text-sm w-1/4",children:[eg(),eb(),ev()]})]})]}),(0,n.jsxs)("div",{className:"w-full text-sm flex justify-between pt-8 border-t border-dark1 text-dark1",children:[(0,n.jsxs)("span",{children:["\xa9 Copyright ",new Date().getFullYear()]}),(0,n.jsxs)("div",{className:"flex gap-6",children:[W?.config?.[`privacyMsg${(0,l.ZH)(t)}`]&&(0,n.jsx)("div",{className:"cursor-pointer",onClick:()=>er({[`${Y?.privacy??"Confidentialit\xe9"}`]:W?.config?.[`privacyMsg${(0,l.ZH)(t)}`]}),children:Y?.privacy??"Confidentialit\xe9"}),W?.config?.[`cookiesMsg${(0,l.ZH)(t)}`]&&(0,n.jsx)("div",{className:"cursor-pointer",onClick:()=>er({Cookies:W?.config?.[`cookiesMsg${(0,l.ZH)(t)}`]}),children:"Cookies"}),W?.config?.[`userConditionMsg${(0,l.ZH)(t)}`]&&(0,n.jsx)("div",{className:"cursor-pointer",onClick:()=>er({[Y?.terms_of_use??"Conditions d'utilisation"]:W?.config?.[`userConditionMsg${(0,l.ZH)(t)}`]}),children:Y?.terms_of_use??"Conditions d'utilisation"})]})]}),Q&&W&&(0,n.jsx)(A.A,{title:"Pr\xe9f\xe9rences",isOpen:es,setIsOpen:e=>{el(e)},children:(0,n.jsx)(I.A,{site:W,setIsOpen:el,footerDataOnly:!0})}),ea&&(0,n.jsx)(L.lG,{open:!0,onOpenChange:()=>{er(null)},children:(0,n.jsxs)(L.Cf,{className:"md:max-w-[80%] md:h-[90%] sm:max-w-[90%] sm:h-[95%] bg-white border-none flex flex-col !gap-2.5",children:[(0,n.jsx)(z.H2,{className:"!text-2xl",children:Object.keys(ea)[0]}),(0,n.jsx)(B.w,{}),(0,n.jsx)(T.F,{className:"overflow-y-auto",children:(0,n.jsx)("div",{className:"sun-editor-editable !p-0 !text-dark1 !bg-transparent !text-base",dangerouslySetInnerHTML:{__html:Object.values(ea)[0]}})}),(0,n.jsx)("div",{className:"flex items-center justify-center shadow-inner w-full fixed bottom-0 left-0 bg-white rounded-b",children:(0,n.jsx)("div",{onClick:()=>{er(null)},className:"my-4 uppercase border rounded-lg shadow-md font-semibold inline-flex items-center justify-center px-6 py-3 border-input text-white bg-button-1 hover:bg-slate-700 hover:text-white cursor-pointer",children:"Ok"})})]})})]})}},18950:(e,t,i)=>{"use strict";i.d(t,{BE:()=>d,I6:()=>x,_s:()=>a,gk:()=>m,tb:()=>u,zj:()=>c});var n=i(95155);i(12115);var s=i(69474),l=i(59434);function a({...e}){return(0,n.jsx)(s._s.Root,{"data-slot":"drawer",...e})}function r({...e}){return(0,n.jsx)(s._s.Portal,{"data-slot":"drawer-portal",...e})}function o({className:e,...t}){return(0,n.jsx)(s._s.Overlay,{"data-slot":"drawer-overlay",className:(0,l.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function c({className:e,children:t,...i}){return(0,n.jsxs)(r,{"data-slot":"drawer-portal",children:[(0,n.jsx)(o,{}),(0,n.jsxs)(s._s.Content,{"data-slot":"drawer-content",className:(0,l.cn)("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",e),...i,children:[(0,n.jsx)("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),t]})]})}function d({className:e,...t}){return(0,n.jsx)("div",{"data-slot":"drawer-header",className:(0,l.cn)("flex flex-col gap-1.5 p-4",e),...t})}function u({className:e,...t}){return(0,n.jsx)("div",{"data-slot":"drawer-footer",className:(0,l.cn)("mt-auto flex flex-col gap-2 p-4",e),...t})}function m({className:e,...t}){return(0,n.jsx)(s._s.Title,{"data-slot":"drawer-title",className:(0,l.cn)("text-foreground font-semibold",e),...t})}function x({className:e,...t}){return(0,n.jsx)(s._s.Description,{"data-slot":"drawer-description",className:(0,l.cn)("text-muted-foreground text-sm",e),...t})}},22346:(e,t,i)=>{"use strict";i.d(t,{w:()=>a});var n=i(95155);i(12115);var s=i(87489),l=i(59434);function a({className:e,orientation:t="horizontal",decorative:i=!0,...a}){return(0,n.jsx)(s.b,{"data-slot":"separator-root",decorative:i,orientation:t,className:(0,l.cn)("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...a})}},22912:(e,t,i)=>{"use strict";i.d(t,{A:()=>x});var n=i(12115),s=i(59434);let l=(e,t)=>
9e?.[`label${(0,s.ZH)(t)}`]??"",a=(e,t)=>{let i=(0,s.z9)(l(e,t)).replace(/^-+|-+$/g,"");return""!==i?i:String(e?.blockId??"")},r=(e,t)=>{let i=new Set,n=[];for(let s of e??[]){if(!s||s.hide||null===s.blockId||void 0===s.blockId||""===s.blockId)continue;let e=a(s,t),l=e,r=2;for(;i.has(l);)l=`${e}-${r++}`;i.add(l),n.push({blockId:s.blockId,slug:l})}return n},o=e=>`[data-blockid="${e}"]`,c=e=>null==e||""===e?null:document.querySelector(o(e)),d=(e,t="smooth")=>{let i=c(e);return!!i&&(i.scrollIntoView({behavior:t,block:"start"}),!0)},u=(e,{replace:t=!1}={})=>{let i=new URL(window.location.href),n=null==e||""===e?"":`#${encodeURIComponent(e)}`;i.hash!==n&&(i.hash=n,window.history[t?"replaceState":"pushState"](null,"",i.toString()))},m=()=>{let e=window.location.hash.replace(/^#/,"");if(""===e)return null;try{return decodeURIComponent(e)}catch{return e}},x=({menuStructure:e,lang:t="fr",scrollOnMount:i=!1}={})=>{let s=(0,n.useMemo)(()=>r(e,t),[e,t]),l=(0,n.useRef)(s);l.current=s;let[a,o]=(0,n.useState)(null),c=(0,n.useCallback)(e=>null==e||""===e?null:l.current.find(t=>String(t.blockId)===String(e))?.slug??null,[]),x=(0,n.useCallback)(e=>{let t=c(e);return null!==t&&t===a},[c,a]),p=(0,n.useCallback)(()=>{let e=m();if(null===e)return null;let t=l.current.find(t=>t.slug===e);return t?t.blockId:l.current.some(t=>String(t.blockId)===e)?e:null},[]);return(0,n.useEffect)(()=>{let e=()=>o(m());return e(),window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]),(0,n.useEffect)(()=>{if(!i)return;let e=requestAnimationFrame(()=>{let e=p();null!==e&&d(e,"auto")});return()=>cancelAnimationFrame(e)},[i,p]),{goToBlock:(0,n.useCallback)((e,{smooth:t=!0,updateUrl:i=!0,replaceUrl:n=!1}={})=>{if(null==e||""===e)return!1;if(i){let t=c(e);null!==t&&(u(t,{replace:n}),o(t))}return d(e,t?"smooth":"auto")},[c]),isActive:x,activeSlug:a}}},25071:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(12115);class s extends n.Component{static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){console.error(e)}render(){return this.state.hasError?null:this.props.children}constructor(...e){super(...e),this.state={hasError:!1}}}},25618:(e,t,i)=>{"use strict";i.d(t,{H1:()=>a,H2:()=>r,p$:()=>o});var n=i(95155),s=i(59434),l=i(12115);let a=({children:e,className:t=""})=>(0,n.jsx)("h1",{className:(0,s.cn)("text-4xl font-semibold leading-[120%] tracking-[-0.3px] text-dark1",t),children:e}),r=l.forwardRef(({children:e,className:t="",contentEditable:i=!1,onBlur:l},a)=>(0,n.jsx)("h2",{ref:a,className:(0,s.cn)("text-3xl text-dark1 font-semibold leading-[120%] tracking-[-0.3px]",t),contentEditable:!!i&&"plaintext-only",onBlur:l,children:e})),o=l.forwardRef(({children:e,className:t="",contentEditable:i=!1,onBlur:l},a)=>(0,n.jsx)("div",{ref:a,onBlur:l,className:(0,s.cn)(t,"mb-2.5 text-dark3 font-bold uppercase"),contentEditable:!!i&&"plaintext-only",children:e}))},26004:(e,t,i)=>{"use strict";i.d(t,{l:()=>s});var n=i(34477);let s=(0,n.createServerReference)("60d7a19c719874562ea4df9200c625a17b032066a4",n.callServer,void 0,n.findSourceMapURL,"updateSitePageBlockAction")},26258:(e,t,i)=>{"use strict";i.d(t,{x:()=>s});var n=i(12115);let s=e=>{let t=(0,n.useRef)(null),i=(0,n.useRef)(null);(0,n.useEffect)(()=>{t.current=e});let s=e=>{i.current&&t.current&&!i.current.contains(e.target)&&t.current(e)};return(0,n.useEffect)(()=>(document.addEventListener("click",s),()=>document.removeEventListener("click",s)),[]),i}},27502:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(95155),s=i(51012);let l=(0,i(12115).memo)(function({src:e,needsLogin:t}){let i=s.n.use.access_token();return(0,n.jsxs)("div",{className:"flex flex-col items-center gap-2 mt-5",children:[(0,n.jsxs)("span",{className:"font-bold text-xl text-slate-900",children:["Lien Externe ",(0,n.jsx)("em",{className:"not-italic text-lg text-slate-500 font-semibold",children:t?"(n\xe9cessite un auto-login)":""})]}),(0,n.jsx)("a",{className:"text-base text-slate-500 underline",href:`${e}${t&&i?`?token=${i}`:""}`,target:"_blank",children:e.replace("https://","")})]})})},27932:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>I});var n=i(95155),s=i(12115),l=i(59434),a=i(25618),r=i(30285),o=i(62525),c=i(28095),d=i(3055),u=i(66766),m=i(47368),x=i(85057),p=i(62523),f=i(78055),h=i(37936),g=i(8117);let b=({cardPosition:e,data:t=null,lng:i="fr",edit:a=!1,cancel:b=!1,isMobile:v=!1,imageObjectType:j,updateElementList:N,deletePartner:w})=>
9{let y=(0,l.ZH)(i),[k,C]=(0,s.useState)(t),S=(0,s.useRef)(null),[$,A]=(0,s.useState)(),[I,F]=(0,s.useState)(),[_,E]=(0,s.useState)(),[L,z]=(0,s.useState)();(0,s.useEffect)(()=>{k?.croppedArea&&(_?.x!==k?.croppedArea?.x||_?.y!==k?.croppedArea?.y)&&E(k?.croppedArea),k?.image===$||k?.image instanceof File||(A(k?.image),k?.croppedArea||F(k?.image)),k?.pdf===L||k?.pdf instanceof File||z(k?.pdf)},[k]),(0,s.useEffect)(()=>{t&&C(t)},[t]),(0,s.useEffect)(()=>{b&&C(t)},[b]),(0,s.useEffect)(()=>{_&&$&&(0,c.Ay)($,_,0).then(e=>{e&&(T({newCroppedArea:_}),F(URL.createObjectURL(e)))})},[_]);let B=(0,s.useMemo)(()=>{if(k?.iconOriginalSize&&k?.iconSize){let e=Number(k?.iconOriginalSize.replace("px",""));return Math.round(Number(k?.iconSize.replace("px",""))/e*100)}return null},[k?.iconOriginalSize,k?.iconSize]);function T({newName:t=null,newImage:i=null,newCroppedArea:n=null,newIconName:s=null,newIconColor:l=null,newIconSize:a=null,newIconBgColor:r=null,newIconVerticalAlign:o=null,newIconHorizontalAlign:c=null,newIconOriginalSize:d=null,newLink:u=null,newButtonText:m=null,newPdf:x=null,newHideImage:p=null}){let f={...k,...t&&{name:t},...i&&{image:i,croppedArea:null,iconName:null,iconSize:null,...x?{}:{pdf:null}},...n&&{croppedArea:n},...s&&{image:null,croppedArea:null,iconName:s,pdf:null},...x&&{pdf:x,iconName:null,...i?{image:i}:{image:null}},...l&&{iconColor:l},...a&&{iconSize:a},...r&&{iconBgColor:r},...o&&{iconVerticalAlign:o},...c&&{iconHorizontalAlign:c},...d&&{iconOriginalSize:d},...null!=u&&{[`link${y}`]:u},...null!=m&&{[`buttonText${y}`]:m},...null!=p&&{hideImage:p}};N&&void 0!=e&&N(e,f)}return a?(0,n.jsxs)("div",{className:"relative flex flex-col gap-[10px] w-[220px]",children:[(0,n.jsx)(d.A,{labelClassname:"h-24 [&>div>div>span]:!text-sm",iconClassname:"text-[96px] w-full h-full flex items-center justify-center",iconToolsClassname:"w-max -bottom-9 left-2 shadow-lg",imageUrl:$,setImageUrl:A,croppedImageUrl:I,setCroppedImageUrl:F,setCroppedArea:E,canbeVideo:!1,canbePdf:!0,iconName:k?.iconName,iconColor:k?.iconColor,iconFinalSize:k?.iconSize,iconBgColor:k?.iconBgColor,iconVerticalAlign:k?.iconVerticalAlign,iconHorizontalAlign:k?.iconHorizontalAlign,iconOriginalSize:k?.iconOriginalSize,hideImage:k?.hideImage!=void 0&&k?.hideImage,pdfUrl:L,setPdfUrl:z,updateElement:T,removeImage:()=>N(e,{...k,image:null,croppedArea:null,iconName:null,pdf:null})}),(0,n.jsx)("div",{className:"text-center text-dark1 font-semibold min-h-[54px] border-[1px] border-dark1",contentEditable:"plaintext-only",ref:S,onBlur:function(){T({newName:S.current.innerText})},children:t?.name??"Nom du partenaire"}),(0,n.jsxs)("div",{className:"relative flex flex-col gap-2 mt-[1.25rem]",children:[w&&void 0!=e&&(0,n.jsx)("div",{className:"absolute -top-6 right-0 z-[2]",children:(0,n.jsx)(r.$,{variant:"destructive",className:"!px-2 h-auto",onClick:()=>w(e),children:(0,n.jsx)(o.A,{size:30})})}),(0,n.jsxs)("div",{className:"w-full",children:[(0,n.jsx)(x.J,{children:"Texte du bouton"}),(0,n.jsx)(p.p,{value:k?.[`buttonText${y}`],className:"bg-white mt-2",onChange:e=>T({newButtonText:e.target.value})})]}),(0,n.jsxs)("div",{className:"w-full",children:[(0,n.jsx)(x.J,{children:"Lien du bouton"}),(0,n.jsx)(p.p,{value:k?.[`link${y}`],className:"bg-white mt-2",onChange:e=>T({newLink:e.target.value})})]}),(0,n.jsxs)("div",{className:"w-full",children:[(0,n.jsx)(x.J,{children:"S\xe9lectionner l'url \xe0 partir d'une page"}),(0,n.jsx)(f.B,{link:k?.[`link${y}`],pageId:void 0,setLink:e=>T({newLink:e}),selectorClassname:"mt-2"})]})]})]}):(0,n.jsxs)("div",{className:(0,l.cn)("flex flex-col gap-2.5 w-[220px]",v&&"w-full"),children:[(0,n.jsxs)("div",{className:(0,l.cn)("w-full h-24 bg-contain bg-center bg-no-repeat self-center relative rounded-xl",I||k?.iconName?"":"bg-gray-200"),style:{...k?.iconName&&k?.iconBgColor&&{background:k?.iconBgColor??""},width:B&&100!=B?`${B}%`:"",height:B&&100!=B?`${128*B/100}px`:""},children:[!k?.iconName&&L&&""!==L?(0,n.jsx)(g.PdfViewer,{pdfUrl:L,thumbnailUrl:I,className:"!rounded-xl",style:{objectFit:j??"cover"},sizes:v?"100vw":"220px"}):!k?.iconName&&I&&""!==I?(0,n.jsx)(u.default,{src:I,alt:"service",className:(0,l.cn)("w-full h-full object-contain rounded-xl"),style:{objectFit:j??"cover"}
9,fill:!0,sizes:v?"100vw":"220px"}):null,k?.iconName&&(0,n.jsx)(m.IconRenderer,{name:k?.iconName,className:"text-[96px] w-full h-full flex items-center justify-center",color:k?.iconColor,style:{fontSize:k?.iconSize??"",justifyContent:k?.iconHorizontalAlign??"center",alignItems:k?.iconVerticalAlign??"center",height:"100%",width:"100%"}})]}),(k?.[`link${y}`]??"")!=""&&(k?.[`buttonText${y}`]??"")==""?(0,n.jsx)("a",{href:k?.[`link${y}`],target:"_blank",rel:"noopener noreferrer",className:"text-center text-dark1 font-semibold cursor-pointer hover:underline",children:t?.name??"Nom du partenaire"}):(0,n.jsx)("div",{className:"text-center text-dark1 font-semibold",children:t?.name??"Nom du partenaire"}),(k?.[`link${y}`]??"")!=""&&(k?.[`buttonText${y}`]??"")!=""&&(0,n.jsx)(h.CustomLink,{url:k?.[`link${y}`],className:"font-medium underline text-dark1 text-center",children:k?.[`buttonText${y}`]})]})};var v=i(51012),j=i(84616),N=i(51154),w=i(74749),y=i(66773),k=i(67977),C=i.n(k),S=i(96738),$=i(44632);let A={image:"",name:"Nom du partenaire"},I=({data:e=null,lng:t="fr",edit:i=!1,save:o,cancel:c,visibility:d,updateBlockContent:u})=>{let m=v.n.use.navCommunity(),x=(0,l.ZH)(t),[p,f]=(0,s.useState)(e?.content),[h,g]=(0,s.useState)(e?.content?.list&&e?.content?.list.length>0?e?.content?.list:[A,A,A,A]),[k,I]=(0,s.useState)(!1),{isMobile:F}=(0,w.default)(),_=(0,s.useRef)(null),E=(0,s.useRef)(null),L=(0,s.useRef)(null);function z({newName:e=null,newTitle:t=null,newDescription:i=null,newVisibility:n=null}){f({...p,...e&&{[`name${x}`]:e},...t&&{[`title${x}`]:t},...i&&{[`description${x}`]:i},...n&&{visibility:n}})}function B(e,t){let i=h.map((i,n)=>n===e?t:i);f({...p,list:i})}function T(e){let t=[...h];t.splice(e,1),f({...p,list:t})}return(0,s.useEffect)(()=>{f(e?.content)},[e]),(0,s.useEffect)(()=>{g(p?.list&&p?.list.length>0?p?.list:[A,A,A,A])},[p]),(0,s.useEffect)(()=>{async function t(){let t=p.list??[];for(let e=0;e<(p.list??[]).length;e++){let i=p.list[e];if(i.image&&i.image instanceof File){I(!0);let n=await (0,$.k)({community:m,file:i.image});t[e].image=n.data.data.fullMediaUrl}}I(!1),u(e?.uuid??"",{...p,list:t})}o&&u&&t()},[o,u]),(0,s.useEffect)(()=>{c&&f(e?.content)},[c]),(0,s.useEffect)(()=>{void 0!=d&&(p?.visibility??!0)!=d&&u&&u(e?.uuid??"",{...p,visibility:d})},[d]),i?(0,n.jsxs)("div",{className:"relative container partners",children:[(0,n.jsxs)("div",{className:"max-w-[690px] text-center mx-auto mb-8",children:[(0,n.jsx)(a.p$,{className:"border-[1px] border-dark1",contentEditable:!0,ref:_,onBlur:function(){z({newName:_.current.innerText})},children:p?.[`name${x}`]??"PARTENAIRES"}),(0,n.jsx)(a.H2,{className:"mb-2.5 border-[1px] border-dark1",contentEditable:!0,ref:E,onBlur:function(){z({newTitle:E.current.innerText})},children:p?.[`title${x}`]??"Nous avons travaill\xe9 avec de grandes entreprises"}),(0,n.jsx)("div",{ref:L,onBlur:function(){z({newDescription:L.current.innerText})},contentEditable:"plaintext-only",className:"sun-editor-editable !p-0 text-dark1 border-[1px] border-dark1",dangerouslySetInnerHTML:{__html:p?.[`description${x}`]??"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}})]}),(0,n.jsxs)("div",{className:"relative m-auto",children:[(0,n.jsx)("div",{className:"absolute -top-12 right-2",children:(0,n.jsxs)(r.$,{variant:"outline",className:"!px-2 h-auto shadow-lg",onClick:function(){let e=[...h];e.push(A),f({...p,list:e})},children:[(0,n.jsx)(j.A,{size:30}),"Ajouter un partenaire"]})}),(0,n.jsx)("div",{className:"[&>.list]:grid [&>.list]:grid-cols-[repeat(auto-fit,minmax(220px,1fr))] [&>.list]:gap-[1.5em] [&>.list]:place-items-center",children:(0,n.jsx)(y.Ay,{onSortEnd:(e,t)=>{let i=[...h];i=C()(i,e,t),f({...p,list:i})},className:"list",children:h.map((e,t)=>t).map(s=>(0,n.jsx)(y.Uq,{children:(0,n.jsxs)("div",{className:"select-none relative",children:[(0,n.jsx)(y.$B,{children:(0,n.jsx)(S.CustomKnob,{})}),(0,n.jsx)(b,{data:h[s],lng:t,cancel:c,edit:i,uuid:e?.uuid??"",cardPosition:s,updateElementList:
9B,deletePartner:h.length>2?T:void 0})]})},s))})})]}),k&&(0,n.jsx)("div",{className:"z-10 absolute w-full h-full bg-[#00000088] top-[50%] left-[50%] flex flex-col gap-2 justify-center items-center text-white -translate-x-[50%] -translate-y-[50%] cursor-pointer",children:(0,n.jsx)(N.A,{className:"h-[100px] w-[100px] animate-spin text-white"})})]}):F?(0,n.jsxs)("div",{className:(0,l.cn)("w-full",!(p?.visibility==void 0||p?.visibility)&&"opacity-50"),style:{...p?.fontColor?{"--dark-1":p?.fontColor,"--dark-3":`${p?.fontColor}99`}:{}},children:[(0,n.jsxs)("div",{className:"max-w-[690px] text-center mx-auto mb-0 has-[div]:mb-8 has-[h2]:mb-8",children:[(p?.[`name${x}`]==void 0||p?.[`name${x}`]!=""&&p?.[`name${x}`]!="\n")&&(0,n.jsx)(a.p$,{children:p?.[`name${x}`]??p?.nameFr??"PARTENAIRES"}),(p?.[`title${x}`]==void 0||p?.[`title${x}`]!=""&&p?.[`title${x}`]!="\n")&&(0,n.jsx)(a.H2,{className:"mb-2.5 !text-2xl",children:p?.[`title${x}`]??p?.titleFr??"Nous avons travaill\xe9 avec de grandes entreprises"}),(p?.[`description${x}`]==void 0||p?.[`description${x}`]!=""&&p?.[`description${x}`]!="\n")&&(0,n.jsx)("div",{className:"sun-editor-editable !p-0 !text-dark1 !bg-transparent !text-base",dangerouslySetInnerHTML:{__html:p?.[`description${x}`]??p?.descriptionFr??"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}})]}),(0,n.jsx)("div",{className:"m-auto",children:(0,n.jsx)("div",{className:"grid grid-cols-2 gap-5 justify-center",children:h.map((e,t)=>(0,n.jsx)(b,{data:e,isMobile:F,imageObjectType:p?.imageObject},`pc-${t}`))})})]}):(0,n.jsxs)("div",{className:(0,l.cn)("w-full",!(p?.visibility==void 0||p?.visibility)&&"opacity-50"),style:{...p?.fontColor?{"--dark-1":p?.fontColor,"--dark-3":`${p?.fontColor}99`}:{}},children:[(0,n.jsxs)("div",{className:"max-w-[690px] text-center mx-auto mb-0 has-[div]:mb-8 has-[h2]:mb-8",children:[(p?.[`name${x}`]==void 0||""!=(p?.[`name${x}`]??"").trim()&&p?.[`name${x}`]!="\n")&&(0,n.jsx)(a.p$,{children:p?.[`name${x}`]??p?.nameFr??"PARTENAIRES"}),(p?.[`title${x}`]==void 0||""!=(p?.[`title${x}`]??"").trim()&&p?.[`title${x}`]!="\n")&&(0,n.jsx)(a.H2,{className:"mb-2.5",children:p?.[`title${x}`]??p?.titleFr??"Nous avons travaill\xe9 avec de grandes entreprises"}),(p?.[`description${x}`]==void 0||""!=(p?.[`description${x}`]??"").trim()&&p?.[`description${x}`]!="\n")&&(0,n.jsx)("div",{className:"sun-editor-editable !p-0 !text-dark1 !bg-transparent !text-base",dangerouslySetInnerHTML:{__html:p?.[`description${x}`]??p?.descriptionFr??"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}})]}),(0,n.jsx)("div",{className:"m-auto",children:(0,n.jsx)("div",{className:"flex flex-wrap gap-7 justify-center",children:h.map((e,t)=>(0,n.jsx)(b,{data:e,imageObjectType:p?.imageObject},`pc-${t}`))})})]})}},27941:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>x});var n=i(95155),s=i(12115),l=i(51012),a=i(59434),r=i(16225),o=i(2485),c=i(35918),d=i(67613),u=i(34477);let m=(0,u.createServerReference)("783fb81ef4dae0cec98c7e789dae8061f679e8558c",u.callServer,void 0,u.findSourceMapURL,"getBlogOrgArticlesAction"),x=({data:e=null,lng:t="fr",edit:i=!1,save:u,cancel:x,visibility:p,updateBlockContent:f})=>{let h=l.n.use.access_token(),g=l.n.use.public_token(),b=l.n.use.user(),v=l.n.use.navCommunity(),[j,N]=(0,s.useState)(null),[w,y]=(0,s.useState)(e?.content),[k,C]=(0,s.useState)(),[S,$]=(0,s.useState)(!0);return((0,s.useEffect)(()=>{(0,c.T)(t).then(e=>{N(e)})},[t]),(0,s.useEffect)(()=>{let e=!1;async function i(n=null){$(!0);try{let e=await m(n??v?.id??0,t,1,0),i=e?.data?.data;i&&(C(i[0]),$(!1))}catch(t){t.status&&404===t.status&&!e?(e=!0,i(9)):$(!1)}}i()},[t]),(0,s.useEffect)(()=>{y(e?.content)},[e]),(0,s.useEffect)(()=>{u&&f&&f(e?.uuid??"",w)},[u,f]),(0,s.useEffect)(()=>{x&&y(e?.content)},[x]),(0,s.useEffect)(()=>{void 0!=p&&(w?.visibility??!0)!=p&&f&&f(e?.uuid??"",{...w,visibility:p})},[p]),j)?i?(0,n.jsx)("div",{className:"container group !max-w-full",style:{...w?.fontColor?{"--dark-1":w?.fontColor,"--dark-3":`${w?.fontColor}99`}:{}},children:k&&(0,n.jsx)("div",{className:"w-auto h-auto",children:(0,n.jsx)(o.n,{article:k,size:"large",type:"type7",env:r.Gu,user:b,token:h??g,i18n:j})})}):(0,n.jsxs)("div",{className:(0,a.cn)("group !w-full",!(w?.visibility==void 0||w?.visibility)&&"opacity-50"),style:{...w?.fontColor?{"--dark-1":w?.fontColor,"--dark-3":`${w?.fontColor}99`}:{}},children:[S&&(0,n.jsx)("div",{className:"w-full flex justify-center items-center",children:(0,n.jsx)(d.A,{size:20,color:"#29394d",loading:!0})}),k&&(0,n.jsx)("div",{className:"w-auto h-auto",children:(0,n.jsx)(o.n,{article:k,size:"large",type:"type7",env:r.Gu,user:b,token:h??g,i18n:j})})]}):null}},28095:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>l});let n=e=>new Promise((t,i)=>{let n=new Image;n.addEventListener("load",()=>t(n)),n.addEventListener("error",e=>i(e)),n.setAttribute("crossOrigin","anonymous"),n.src=e});function s(e){return e*Math.PI/180}async function l(e,t,i=0,a={horizontal:!1,vertical:!1}){let r=await n(e),o=document.createElement("canvas"),c=o.getContext("2d");if(!c)return null;let d=s(i),{width:u,height:m}=function(e,t,i){let n=s(i);return{width:Math.abs(Math.cos(n)*e)+Math.abs(Math.sin(n)*t),height:Math.abs(Math.sin(n)*e)+Math.abs(Math.cos(n)*t)}}(r.width,r.height,i);o.width=u,o.height=m,c.translate(u/2,m/2),c.rotate(d),c.scale(a.horizontal?-1:1,a.vertical?-1:1),c.translate(-r.width/2,-r.height/2),c.drawImage(r,0,0,r.width,r.height);let x=document.createElement("canvas"),p=x.getContext("2d");return p?(x.width=t.width,x.height=t.height,p.fillStyle="white",p.fillRect(0,0,t.width,t.height),p.drawImage(o,t.x,t.y,t.width,t.height,0,0,t.width,t.height),new Promise(e=>{x.toBlob(t=>{e(t)},"image/jpeg")})):null}},28844:(e,t,i)=>{"use strict";i.d(t,{S:()=>d});var n=i(95155),s=i(30285),l=i(54165),a=i(54416),r=i(4229),o=i(25618),c=i(15452);function d({isOpen:e,cancel:t,setIsOpen:i,handleConfirm:d}){return(0,n.jsx)(l.lG,{open:e,children:(0,n.jsxs)(l.Cf,{className:"max-w-[600px] p-8",children:[(0,n.jsx)(c.HM,{onClick:t,className:"absolute !bg-white right-3 top-3 z-10",children:(0,n.jsx)(a.A,{})}),(0,n.jsx)(l.L3,{}),(0,n.jsx)(l.rr,{}),(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,n.jsx)("div",{className:"flex h-20 w-20 items-center justify-center rounded-[200px] border border-solid border-slate-500 text-[28px]",children:(0,n.jsx)(r.A,{size:"32",className:"text-slate-900"})}),(0,n.jsx)(o.H2,{className:"mb-8 mt-4 max-w-[360px] text-center",children:"Vous avez effectu\xe9 des changements sur la page. Voulez-vous enregistrer les modifications avant de la quitter ?"})]}),(0,n.jsx)(l.Es,{className:"justify-start",children:(0,n.jsxs)("div",{className:"flex w-full gap-5",children:[(0,n.jsx)(s.$,{className:"flex-1 p-6",type:"button",variant:"secondary",onClick:i,children:"Non"}),(0,n.jsx)(s.$,{variant:"default",className:"flex-1 p-6",onClick:d,children:"Oui, enregistrer"})]})})]})})}},29532:(e,t,i)=>{"use strict";i.d(t,{E:()=>o});var n=i(95155);i(12115);var s=i(30285),l=i(54165),a=i(62525),r=i(25618);function o({isOpen:e,setIsOpen:t,handleConfirm:i}){return(0,n.jsx)(l.lG,{open:e,children:(0,n.jsxs)(l.Cf,{className:"max-w-[600px] p-8",children:[(0,n.jsx)(l.L3,{}),(0,n.jsx)(l.rr,{}),(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,n.jsx)(l.HM,{onClick:()=>t(!1)}),(0,n.jsx)("div",{className:"flex h-20 w-20 items-center justify-center rounded-[200px] border border-solid border-[#F7585A] text-[28px]",children:(0,n.jsx)(a.A,{size:"32",className:"text-customRed"})}),(0,n.jsx)(r.H2,{className:"mb-8 mt-4 max-w-[360px] text-center text-lg",children:"Cette page sera supprimer avec tous ses blocs, \xeates-vous s\xfbr de vouloir la supprimer?"})]}),(0,n.jsx)(l.Es,{className:"justify-start",children:(0,n.jsxs)("div",{className:"flex w-full gap-5",children:[(0,n.jsx)(s.$,{className:"flex-1 p-6",type:"button",variant:"secondary",onClick:()=>t(!1),children:"Annuler"}),(0,n.jsx)(s.$,{variant:"destructive",className:"flex-1 p-6",onClick:i,children:"Oui, supprimer"})]})})]})})}},30329:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>u});var n=i(95155),s=i(55028),l=i(16225);let a=(0,s.default)(()=>Promise.all([i.e(2881),i.e(8595),i.e(7980),i.e(2782),i.e(5795),i.e(6639),i.e(7841),i.e(4612),i.e(5073),i.e(1984)]).then(i.bind(i,91984)),{loadableGenerated:{webpack:()=>[91984]},ssr:!1}),r=(0,s.default)(()=>i.e(7103).then(i.bind(i,57103)),{loadableGenerated:{webpack:()=>[57103]},ssr:!1}),o=(0,s.default)(()=>i.e(8401).then(i.bind(i,38401)),{loadableGenerated:{webpack:()=>[38401]},ssr:!1}),c=(0,s.default)(()=>Promise.all([i.e(8595),i.e(3355)]).then(i.bind(i,83355)),{loadableGenerated:{webpack:()=>[83355]},ssr:!1}),d=(0,s.default)(()=>i.e(143).then(i.bind(i,30143)),{loadableGenerated:{webpack:()=>[30143]},ssr:!1}),u=({slug:e,lng:t="fr"})=>(l.vk.find(t=>t.slugEn==e||t.slugFr==e||t.slugNl==e)?.slugEn??"")=="ai"?(0,n.jsx)(r,{lng:t}):(l.vk.find(t=>t.slugEn==e||t.slugFr==e||t.slugNl==e)?.slugEn??"")=="contributions"?(0,n.jsx)(a,{lng:t}):(l.vk.find(t=>t.slugEn==e||t.slugFr==e||t.slugNl==e)?.slugEn??"")=="news"?(0,n.jsx)(o,{lng:t}):(l.vk.find(t=>t.slugEn==e||t.slugFr==e||t.slugNl==e)?.slugEn??"")=="booksList"?(0,n.jsx)(c,{lng:t}):(l.vk.find(t=>t.slugEn==e||t.slugFr==e||t.slugNl==e)?.slugEn??"")=="fiduciaryList"?(0,n.jsx)(d,{lng:t}):null},30356:(e,t,i)=>{"use strict";i.d(t,{C:()=>o,z:()=>r});var n=i(95155);i(12115);var s=i(54059),l=i(9428),a=i(59434);function r({className:e,...t}){return(0,n.jsx)(s.bL,{"data-slot":"radio-group",className:(0,a.cn)("grid gap-3",e),...t})}function o({className:e,...t}){return(0,n.jsx)(s.q7,{"data-slot":"radio-group-item",className:(0,a.cn)("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:(0,n.jsx)(s.C1,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:(0,n.jsx)(l.A,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}},33646:e=>{e.exports={componentsSelector:"componentsSelector_componentsSelector__yO_Pu",componentsSelectorBody:"componentsSelector_componentsSelectorBody__5f3xl",slide:"componentsSelector_slide__QCNnK",header:"componentsSelector_header__K3qor",subHeader:"componentsSelector_subHeader__gVhAl",tabContainer:"componentsSelector_tabContainer__3GcK7",tabHeader:"componentsSelector_tabHeader__FAyos",bluredTab:"componentsSelector_bluredTab__1jNKF",tabBody:"componentsSelector_tabBody__N1_Lk",componentsSelectorList:"componentsSelector_componentsSelectorList__b_P_W",componentsSelectorListElement:"componentsSelector_componentsSelectorListElement__E9zjD",componentsSelectorListElementDiv:"componentsSelector_componentsSelectorListElementDiv__NlrcI",componentsSelectorListElementSpan:"componentsSelector_componentsSelectorListElementSpan__6nSEU",formCreator:"componentsSelector_formCreator__U_D2M",languageOptions:"componentsSelector_languageOptions__NnnZx",languageOption:"componentsSelector_languageOption__Pa0dc",formCreatorBody:"componentsSelector_formCreatorBody__O0Q7K",formName:"componentsSelector_formName__T5bZZ",inputWraper:"componentsSelector_inputWraper__fgwJG",inputLabel:"componentsSelector_inputLabel___wKbW",input:"componentsSelector_input__iyEiZ",textArea:"componentsSelector_textArea__Niwyc",languageSelector:"componentsSelector_languageSelector__2NXIV",formCreatorBodyFields:"componentsSelector_formCreatorBodyFields__FA3Kn",formCreatorBodyField:"componentsSelector_formCreatorBodyField__3jGvj",button:"componentsSelector_button__M2VM3",requiredCheckbox:"componentsSelector_requiredCheckbox__67hE8",checkbox:"componentsSelector_checkbox__5C9Uu",options:"componentsSelector_options__WyqUu",list:"componentsSelector_list__lICaA",listContent:"componentsSelector_listContent__4E6U0",emptyTag:"componentsSelector_emptyTag__7uM6W",formCreatorFooter:"componentsSelector_formCreatorFooter__CsVDX"}},33978:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>m});var n=i(95155),s=i(59434),l=i(12115),a=i(25618),r=i(49345),o=i(74749),c=i(502),d=i(60377),u=i(27213);let m=({data:e=null,lng:t="fr",edit:i=!1,save:m,cancel:x,visibility:p,updateBlockContent:f})=>{let h=(0,l.useRef)((0,s.ZH)(t)),[g,b]=(0,l.useState)((0,s.ZH)(t)),v=e=>{h.current=e,b(e)},[j,N]=(0,l.useState)(e?.content),w=(0,l.useRef)(null),y=e=>{w.current=e,N(e)},[k,C]=(0,l.useState)(),[S,$]=(0,l.useState)(!1);(0,l.useEffect)(()=>{j?.backgroundImage===k||j?.backgroundImage instanceof File||C(j?.backgroundImage)},[j]);let{isMobile:A}=(0,o.default)(),I=(0,l.useRef)(null);
9function F({newTitle:e=null,newDescription:t=null,newBackgroundImage:i}){y({...w.current,...e&&{[`title${h.current}`]:e},...t&&{[`description${h.current}`]:t},...void 0!==i&&{backgroundImage:i}})}return(0,l.useEffect)(()=>{y(e?.content)},[e]),(0,l.useEffect)(()=>{m&&f&&f(e?.uuid??"",{...j})},[m,f]),(0,l.useEffect)(()=>{x&&y(e?.content)},[x]),(0,l.useEffect)(()=>{void 0!=p&&(j?.visibility??!0)!=p&&f&&f(e?.uuid??"",{...j,visibility:p})},[p]),(0,l.useEffect)(()=>{t!=g.toLowerCase()&&v((0,s.ZH)(t))},[t]),i?(0,n.jsxs)("div",{className:"relative flex flex-col gap-6 py-16 !max-w-full",style:{...j?.fontColor?{"--dark-1":j?.fontColor,"--dark-3":`${j?.fontColor}99`}:{},...k?{backgroundImage:`url(${k})`,backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"cover"}:{}},children:[k&&(0,n.jsx)("div",{className:"absolute inset-0 z-[1] bg-black/50"}),(0,n.jsx)("div",{className:"absolute inset-0 z-[2] flex items-start justify-end p-4",onClick:()=>$(!0),children:(0,n.jsxs)("div",{className:"flex gap-2",children:[k&&(0,n.jsx)("div",{className:"flex h-8 w-8 cursor-pointer items-center justify-center rounded-full bg-red-500 text-white text-xs",onClick:e=>{e.stopPropagation(),F({newBackgroundImage:null}),C(void 0)},title:"Supprimer l'image de fond",children:"â"}),(0,n.jsx)("div",{className:"flex h-8 w-8 cursor-pointer items-center justify-center rounded-full bg-blue-500 text-white text-xs",onClick:e=>{e.stopPropagation(),$(!0)},title:"Ajouter une image de fond",children:(0,n.jsx)(u.A,{size:16})})]})}),(0,n.jsxs)("div",{className:"relative z-[3] flex flex-col items-center gap-4",children:[(0,n.jsx)(a.H2,{className:(0,s.cn)("text-[3.25rem] border-[1px] border mb-2.5 min-w-[10ch] text-center",k&&"!text-white"),contentEditable:!0,ref:I,onBlur:function(){F({newTitle:I.current.innerText})},children:j?.[`title${g}`]??"Titre de page"}),(0,n.jsx)(r.A,{disable:!1,value:j?.[`description${g}`]??"Lorem Ipsum is simply dummy text of the printing and typesetting industry.",onChange:function(e){F({newDescription:e})}})]}),(0,n.jsx)(c.A,{title:"Charger une image de fond",isOpen:S,setIsOpen:$,children:(0,n.jsx)(d.A,{canBeVideo:!1,setImageUrl:e=>{C(e),F({newBackgroundImage:e})},setOpen:$})})]}):(0,n.jsxs)("div",{className:(0,s.cn)("relative flex flex-col items-center gap-6 w-full py-16 text-center",!(j?.visibility==void 0||j?.visibility)&&"opacity-50"),style:{...j?.fontColor?{"--dark-1":j?.fontColor,"--dark-3":`${j?.fontColor}99`}:{},...k?{backgroundImage:`url(${k})`,backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"cover"}:{}},children:[k&&(0,n.jsx)("div",{className:"absolute z-1 inset-0 bg-black/50"}),(0,n.jsxs)("div",{className:"relative z-2 w-full flex flex-col items-center gap-6",children:[(j?.[`title${g}`]==void 0||""!=(j?.[`title${g}`]??"").trim())&&(0,n.jsx)(a.H2,{className:(0,s.cn)("text-center text-[3.25rem]",A&&"text-[2rem]",k&&"!text-white"),children:j?.[`title${g}`]??j?.titleFr??"Titre de page"}),(j?.[`description${g}`]==void 0||j?.[`description${g}`]!=""&&j?.[`description${g}`]!="\n"&&j?.[`description${g}`]!="<p><br></p>")&&(0,n.jsx)("div",{className:(0,s.cn)("sun-editor-editable !p-0 !text-dark1 !bg-transparent !text-base w-3/5 !text-center",A&&"w-full",k&&"!text-white"),dangerouslySetInnerHTML:{__html:j?.[`description${g}`]??j?.descriptionFr??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s."}})]})]})}},34547:e=>{e.exports={formComponent:"formComponent_formComponent__vXTxN",header:"formComponent_header__T2KPm",subTitle:"formComponent_subTitle__a52En",title:"formComponent_title__IqW4B",description:"formComponent_description__36jsD",content:"formComponent_content__6_e9S",selectField:"formComponent_selectField__9gfQo",option:"formComponent_option__8k6DN",selectedOption:"formComponent_selectedOption__X1cW0",radio:"formComponent_radio__2QTRQ",label:"formComponent_label__jK4FK",radioButton:"formComponent_radioButton__iOXaT",textArea:"formComponent_textArea__XdIgj",input:"formComponent_input__ShFda",inputWraper:"formComponent_inputWraper__9tBQ8",inputLabel:"formComponent_inputLabel__DCAyc",submitButton:"formComponent_submitButton__jg1ML",mobile:"formComponent_mobile__hsyAW"}},35092:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>B});var n=i(95155),s=i(40424),l=i(57674),a=i(76203),r=i(11867),o=i(30285),c=i(47262),d=i(62523),u=i(12115),m=i(84766),x=i(59434);function p({segment:e,state:t}){let i=(0,u.useRef)(null),{segmentProps:{...s}}=(0,m.V)(e,t,i);return(0,n.jsx)("div",{...s,ref:i,className:(0,x.cn)("focus:rounded-[2px] focus:bg-accent focus:text-accent-foreground focus:outline-none","literal"!==e.type?"px-[1px]":"",e.isPlaceholder?"text-muted-foreground":""),children:e.text})}var f=i(48e3),h=i(67198),g=i(62044);function b(e){let t=(0,u.useRef)(null),{locale:i}=(0,f.Y)(),s=(0,g.y)({...e,locale:i}),{fieldProps:{...l}}=(0,h.pr)(e,s,t);return(0,n.jsx)("div",{...l,ref:t,className:(0,x.cn)("inline-flex h-10 w-full flex-1 rounded-md border border-input bg-transparent px-3 py-2 text-sm r
9ing-offset-background focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e.isDisabled?"cursor-not-allowed opacity-50":""),children:s.segments.map((e,t)=>(0,n.jsx)(p,{segment:e,state:s},t))})}let v=u.forwardRef((e,t)=>(0,n.jsx)(b,{...e}));v.displayName="TimePicker";var j=i(22346),N=i(74749),w=i(35918),y=i(16225),k=i(51012),C=i(13644),S=i(54416),$=i(28883),A=i(92657),I=i(78749),F=i(19420),_=i(4516),E=i(51148),L=i(56287),z=i(51368);let B=({data:e=null,lng:t="fr",edit:i=!1,save:m,cancel:p,visibility:f,updateBlockContent:h,organization:g})=>{let b=(0,x.ZH)(t),B=k.n.use.siteInfo(),[T,P]=(0,u.useState)(null),[R,M]=(0,u.useState)(e?.content??B?.config?.sameBlocksContent?.infos),[D,O]=(0,u.useState)(!!e?.content?.mainBlock),[U,V]=(0,u.useState)(!!B?.config?.duplicatedBlocks?.infos),[q,H]=(0,u.useState)(null),[Z,J]=(0,u.useState)(!1),{isMobile:G,isTablet:W}=(0,N.default)(),Q=(0,u.useRef)(null),K=(0,u.useRef)(null),Y=(0,u.useRef)(null),X=(0,u.useRef)(null),ee=(0,u.useRef)(null),et=(0,u.useRef)(null),ei=(0,r.A)(!0);(0,u.useEffect)(()=>{(0,w.T)(t).then(e=>{P(e)})},[t]);let en=t=>{if(B?.id){let i={...B?.config??{},infos:{email:"",telephone:"",address:""}},n={...t};if((D||e?.content?.mainBlock&&e?.content?.mainBlock!=D||U!=B?.config?.duplicatedBlocks?.infos)&&(D||U?(delete n.mainBlock,i.sameBlocksContent={...i.sameBlocksContent??{},infos:n}):i.sameBlocksContent?.infos&&delete i.sameBlocksContent?.infos,U?i.duplicatedBlocks={...i.duplicatedBlocks??{},infos:U}:i.duplicatedBlocks?.infos&&delete i.duplicatedBlocks?.infos),""!=(n.email??"").trim()||""!=(n?.[`descriptionEmail${b}`]??"").trim()){let e=""!=(n.email??"").trim()?(n.email??"").trim():(n?.[`descriptionEmail${b}`]??"").trim(),t=e.split("\n");i.infos.email=t.length>0?t[0]:e}if(""!=(n.phone??"").trim()||""!=(n?.[`descriptionPhone${b}`]??"").trim()){let e=""!=(n.phone??"").trim()?(n.phone??"").trim():(n?.[`descriptionPhone${b}`]??"").trim(),t=e.split("\n");i.infos.telephone=t.length>0?t[0]:e}if(""!=(n?.[`address${b}`]??"").trim()||""!=(n?.[`descriptionAddress${b}`]??"").trim()){let e=""!=(n?.[`address${b}`]??"").trim()?(n?.[`address${b}`]??"").trim():(n?.[`descriptionAddress${b}`]??"").trim(),t=e.split("\n");i.infos.address=t.length>0?t[0]:e}i.addressEn=n.addressEn,i.addressFr=n.addressFr,i.addressNl=n.addressNl,i.schedule=n.schedule,ei.mutate({siteId:B?.id??0,data:{config:i}})}},es=async e=>{if(B?.id){let{data:t}=await (0,s.q)(Number(B?.id??0));for(let i of t)if(!y.vk.map(e=>e.slugEn).includes(i?.slugEn??"")&&(i?.externalLink??"")==""){let t=await (0,l.i)(i.id??0),n=!1;for(let e of t)"infos"==e.siteBlock.identifier&&(n=!0);n&&el(t.map(t=>"infos"==t.siteBlock.identifier?{...t.siteBlock,blockId:t.id,blockParentId:t.blockParentId,content:e,uuid:(0,z.A)()}:{...t.siteBlock,blockId:t.id,blockParentId:t.blockParentId,content:t.content,uuid:(0,z.A)()}),i)}}};async function el(e,t){let i=e.map((e,t)=>({siteBlock:e,order:t+1,content:e.content}));await (0,a.s)(i,t)}function ea({newDescriptionEmail:e=null,newDescriptionPhone:t=null,newDescriptionAddress:i=null,newEmail:n=null,newPhone:s=null,newAddress:l=null,newSchedule:a=null,newVisibility:r=null,newMainBlock:o=null,newEmailVisibility:c=null,newPhoneVisibility:d=null,newAddressVisibility:u=null,newHoursVisibility:m=null,newDescriptionFontSize:x=null,newContentFontSize:p=null}){M({...R,...e&&{[`descriptionEmail${b}`]:e},...t&&{[`descriptionPhone${b}`]:t},...i&&{[`descriptionAddress${b}`]:i},...n&&{email:n},...s&&{phone:s},...l&&{[`address${b}`]:l},...a&&{schedule:a},...r&&{visibility:r},...null!=o&&{mainBlock:o},...null!=c&&{emailVisibility:c},...null!=d&&{phoneVisibility:d},...null!=u&&{addressVisibility:u},...null!=m&&{hoursVisibility:m},...null!=x&&{descriptionFontSize:x},...null!=p&&{contentFontSize:p}})}function er(e,t,i,n){if(e){let s=e.hour.toString().padStart(2,"0")+":"+e.minute.toString().padStart(2,"0");if(q){let e={...q},l=e[t]??y.Q8[t];if(l){let a=l[i];e[t]={...l,[i]:{...a,[n]:s}},H(e)}}}}function eo(){if(q){let e=q?.MON,t={...q};for(let i of Object.keys(q))"MON"!=i&&(t[i]=e);H(t)}}function ec(e,t,i){if(q&&e){let e={...q},n=e[t]??y.Q8[t];n&&(e[t]={...n,[i]:{FROM:"NO_WORK",TO:"NO_WORK"}},H(e))}else if(q&&!e){let e=q?.MON,n={...q},s=n[t]??y.Q8[t];s&&(n[t]={...s,[i]:{FROM:e[i].FROM,TO:e[i].TO}},H(n))}}function ed(e,t){if(q&&e){let e={...q},i=e[t]??y.Q8[t];i&&(e[t]={...i,continue:!0},H(e))}else if(q&&!e){let e={...q},i=e[t]??y.Q8[t];i&&(e[t]={...i,continue:!1},H(e))}}(0,u.useEffect)(()=>{M(e?.content??B?.config?.sameBlocksContent?.infos)},[e]),(0,u.useEffect)(()=>{R?.schedule?H(R?.schedule):g&&g?.hubPreferences?.portals.public.config?H((g?.hubPreferences.portals.public.config).contact.schedule):H(y.Q8)},[R,g]),(0,u.useEffect)(()=>{m&&h&&(h(e?.uuid??"",R),en(R),es(R))},[m,h]),(0,u.useEffect)(()=>{p&&(M(e?.content??B?.config?.sameBlocksContent?.infos),O(!!e?.content?.mainBlock),V(!!B?.config?.duplicatedBlocks?.infos))},[p]),(0,u.useEffect)(()=>{void 0!=f&&(R?.visibility??!0)!=f&&h&&h(e?.uuid??"",{...R,visibility:f})},[f]);let eu=(0,u.useCallback)(()=>(0,n.jsxs)("div",{className:(0,x.cn)("absolute z-10 bg-white w-[75%] h-[calc(100%_+_40px)] -right-5 -top-5 transition-all duration-500 overflow-x-hidden overflow-y-auto",Z?"max-w-[75%]":"max-w-[0]"),children:[(0,n.jsxs)("div",{className:"flex justify-between items-center p-5 pb-4",children:[(0,n.jsx)("span",{className:"text-xl font-semibold text-dark1",children:"Modifier les horaires"}),(0,n.jsx)("span",{className:"cursor-pointer",onClick:()=>{J(!1)},children:(0,n.jsx)(S.A,{size:28})})]}),(0,n.jsx)(j.w,{className:"w-auto mx-5 mb-4 bg-dark1"}),(0,n.jsxs)("div",{className:"flex flex-col gap-5 px-5 pt-0 pb-5",children:[(0,n.jsxs)("div",{className:"flex gap-5",children:[(0,n.jsx)("span",{className:"w-10 text-md font-medium text-dark1 visibility"}),(0,n.jsxs)("div",{className:"flex-1 flex gap-5",children:[(0,n.jsx)("div",{className:"flex-1",children:(0,n.jsx)("span",{className:"text-lg font-semibold text-dark1",children:"Matin"})}),(0,n.jsx)("div",{className:"flex-1",children:(0,n.jsx)("span",{className:"text-lg font-semibold text-dark1",children:"Apr\xe8s-mi
9di"})}),(0,n.jsx)("div",{className:"min-w-[163px] flex flex-col justify-between items-end"})]})]}),q&&Object.keys(y.Q8).map((e,t)=>{let i=q[e]??y.Q8[e],s=i?.MORNING,l=i?.AFTERNOON,a=i?.continue??!1;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex gap-5",children:[(0,n.jsx)("span",{className:"w-10 text-md font-medium text-dark1",children:e}),(0,n.jsxs)("div",{className:"flex-1 flex gap-5",children:[(0,n.jsxs)("div",{className:"flex-1 flex gap-5",children:[(0,n.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,n.jsx)("span",{className:"text-sm font-normal text-dark1",children:"de"}),(0,n.jsx)(v,{"aria-label":`${e}-morning-from`,value:new C.gX(Number(s?.FROM.split(":")[0]),Number(s?.FROM.split(":")[1])),onChange:t=>er(t,e,"MORNING","FROM")}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(c.S,{checked:s?.FROM=="NO_WORK",onCheckedChange:t=>ec(!!t.valueOf(),e,"MORNING")}),(0,n.jsx)("span",{className:"text-sm font-normal text-dark1",children:"Pas de travail"})]})]}),(0,n.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,n.jsx)("span",{className:"text-sm font-normal text-dark1",children:"\xe0"}),(0,n.jsx)(v,{"aria-label":`${e}-morning-to`,value:new C.gX(Number(s?.TO.split(":")[0]),Number(s?.TO.split(":")[1])),onChange:t=>er(t,e,"MORNING","TO")}),(0,n.jsx)("div",{className:"flex-1"})]})]}),!a&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(j.w,{orientation:"vertical",className:"h-full"}),(0,n.jsxs)("div",{className:"flex-1 flex gap-5",children:[(0,n.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,n.jsx)("span",{className:"text-sm font-normal text-dark1",children:"de"}),(0,n.jsx)(v,{"aria-label":`${e}-afternoon-from`,value:new C.gX(Number(l?.FROM.split(":")[0]),Number(l?.FROM.split(":")[1])),onChange:t=>er(t,e,"AFTERNOON","FROM")}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(c.S,{checked:l?.FROM=="NO_WORK",onCheckedChange:t=>{ec(!!t.valueOf(),e,"AFTERNOON")}}),(0,n.jsx)("span",{className:"text-sm font-normal text-dark1",children:"Pas de travail"})]})]}),(0,n.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,n.jsx)("span",{className:"text-sm font-normal text-dark1",children:"\xe0"}),(0,n.jsx)(v,{"aria-label":`${e}-afternoon-to`,value:new C.gX(Number(l?.TO.split(":")[0]),Number(l?.TO.split(":")[1])),onChange:t=>er(t,e,"AFTERNOON","TO")}),(0,n.jsx)("div",{className:"flex-1"})]})]})]}),0===t?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(j.w,{orientation:"vertical",className:"h-full"}),(0,n.jsxs)("div",{className:"min-w-[149px] flex flex-col gap-4 justify-center items-end",children:[(0,n.jsx)(o.$,{variant:"outline",onClick:eo,className:"text-xs font-semibold",children:"Appliquer pour tous"}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(c.S,{checked:a,onCheckedChange:t=>ed(!!t.valueOf(),e)}),(0,n.jsx)("span",{className:"text-sm font-normal text-dark1",children:"Horaire continu"})]})]})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(j.w,{orientation:"vertical",className:"h-full"}),(0,n.jsx)("div",{className:"min-w-[149px] flex flex-col justify-between items-end",children:(0,n.jsxs)("div",{className:"flex items-center gap-2 my-auto",children:[(0,n.jsx)(c.S,{checked:a,onCheckedChange:t=>ed(!!t.valueOf(),e)}),(0,n.jsx)("span",{className:"text-sm font-normal text-dark1",children:"Horaire continu"})]})})]})]})]},t),(0,n.jsx)(j.w,{className:"w-full"})]})})]}),(0,n.jsx)("div",{className:"sticky bottom-0 left-0 w-full bg-white flex justify-end px-4 py-3 border-t border-t-slate-300",children:(0,n.jsx)(o.$,{onClick:()=>{J(!1),ea({newSchedule:q})},children:"Enregistrer"})})]}),[q,Z]);return i?(0,n.jsxs)("div",{id:"infos",className:"flex flex-col items-center",style:{...R?.fontColor?{"--dark-1":R?.fontColor,"--dark-3":`${R?.fontColor}99`}:{}},children:[(0,n.jsxs)("div",{className:"w-full flex gap-6 justify-center items-start",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"text-sm font-medium text-slate-900",children:"Taille description (px):"}),(0,n.jsx)(d.p,{type:"number",className:"w-20 bg-white",value:R?.descriptionFontSize??14,onChange:e=>ea({newDescriptionFontSize:Number(e.target.value)})})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"text-sm font-medium text-slate-900",children:"Taille contenu (px):"}),(0,n.jsx)(d.p,{type:"number",className:"w-20 bg-white",value:R?.contentFontSize??14,onChange:e=>ea({newContentFontSize:Number(e.target.value)})})]})]}),(0,n.jsxs)("div",{className:"relative flex gap-5 py-12",children:[!B?.isSAP&&(0,n.jsxs)("div",{className:"flex flex-col gap-4 justify-start absolute bottom-4 left-4 ",children:[(!B?.config?.sameBlocksContent?.infos||e?.content?.mainBlock)&&!U&&(0,n.jsxs)("div",{className:"flex gap-2.5 items-center",children:[(0,n.jsx)(c.S,{id:(e?.uuid??"infos-origin")+"-1",checked:D,onCheckedChange:e=>{O(!!e.valueOf()),ea({newMainBlock:!!e.valueOf()})}}),(0,n.jsx)("label",{htmlFor:(e?.uuid??"infos-")+"-1",className:"cursor-pointer text-sm font-medium text-slate-900",children:"Appliquer les modifs pour toutes les pages"})]}),(0,n.jsxs)("div",{className:"flex gap-2.5 items-center",children:[(0,n.jsx)(c.S,{id:(e?.uuid??"infos-duplicate")+"-2",checked:U,onCheckedChange:e=>{V(!!e.valueOf())}}),(0,n.jsx)("label",{htmlFor:(e?.uuid??"infos-duplicate")+"-2",className:"cursor-pointer text-sm font-medium text-slate-900",children:"Ajouter le bloc aux prochaines pages ajout\xe9es"})]})]}),(0,n.jsxs)("div",{className:(0,x.cn)("flex-1 flex flex-col items-center gap-6 relative border border-dashed border-slate-900 h-fit",!(R?.emailVisibility==void 0||R?.emailVisibility)&&"opacity-50"),children:[(0,n.jsx)($.A,{className:"w-12 h-12 text-dark1"}),(0,n.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,n.jsx)("span",{className:"text-2xl text-dark1 font-semibold capitalize",children:T?.email??"Email"}),(0,n.jsx)("span",{className:"text-sm text-dark1 font-normal text-center border-[1px] border-dark1",contentEditable:"plaintext-only",ref:Q,onBlur:function(){let e=Q.current.innerText;e!==(R?.[`descriptionEmail${b}`]??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in ero.")&&ea({newDescriptionEmail
9:e})},style:{fontSize:R?.descriptionFontSize?`${R.descriptionFontSize}px`:void 0},children:R?.[`descriptionEmail${b}`]??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in ero."})]}),(0,n.jsx)("span",{className:"text-sm text-dark1 font-normal border-[1px] border-dark1 min-w-full text-center",contentEditable:"plaintext-only",ref:K,onBlur:function(){let e=K.current.innerText;e!==(R?.email??"[email protected]")&&ea({newEmail:e})},style:{fontSize:R?.contentFontSize?`${R.contentFontSize}px`:void 0},children:R?.email??(g&&g?.hubPreferences?.portals.public.config?g?.hubPreferences.portals.public.config.contact.email:"[email protected]")}),(0,n.jsx)("li",{className:"absolute left-4 top-4 flex h-8 w-8 cursor-pointer items-center justify-center rounded-sm bg-slate-900 p-0 text-white",onClick:()=>ea({newEmailVisibility:R?.emailVisibility!=void 0&&!R?.emailVisibility}),children:R?.emailVisibility==void 0||R?.emailVisibility?(0,n.jsx)(A.A,{size:20}):(0,n.jsx)(I.A,{size:20})})]}),(0,n.jsxs)("div",{className:(0,x.cn)("flex-1 flex flex-col items-center gap-6 relative border border-dashed border-slate-900 h-fit",!(R?.phoneVisibility==void 0||R?.phoneVisibility)&&"opacity-50"),children:[(0,n.jsx)(F.A,{className:"w-12 h-12 text-dark1"}),(0,n.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,n.jsx)("span",{className:"text-2xl text-dark1 font-semibold capitalize",children:T?.phone??"T\xe9l\xe9phone"}),(0,n.jsx)("span",{className:"text-sm text-dark1 font-normal text-center border-[1px] border-dark1",contentEditable:"plaintext-only",ref:Y,onBlur:function(){let e=Y.current.innerText;e!==(R?.[`descriptionPhone${b}`]??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in ero.")&&ea({newDescriptionPhone:e})},style:{fontSize:R?.descriptionFontSize?`${R.descriptionFontSize}px`:void 0},children:R?.[`descriptionPhone${b}`]??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in ero."})]}),(0,n.jsx)("span",{className:"text-sm text-dark1 font-normal border-[1px] border-dark1 min-w-full text-center",contentEditable:"plaintext-only",ref:X,onBlur:function(){let e=X.current.innerText;e!==(R?.phone??"+ 32 0 000 00 00")&&ea({newPhone:e})},style:{fontSize:R?.contentFontSize?`${R.contentFontSize}px`:void 0},children:R?.phone??(g&&g?.hubPreferences?.portals.public.config?g?.hubPreferences.portals.public.config.contact.phone:"+ 32 0 000 00 00")}),(0,n.jsx)("li",{className:"absolute left-4 top-4 flex h-8 w-8 cursor-pointer items-center justify-center rounded-sm bg-slate-900 p-0 text-white",onClick:()=>ea({newPhoneVisibility:R?.phoneVisibility!=void 0&&!R?.phoneVisibility}),children:R?.phoneVisibility==void 0||R?.phoneVisibility?(0,n.jsx)(A.A,{size:20}):(0,n.jsx)(I.A,{size:20})})]}),(0,n.jsxs)("div",{className:(0,x.cn)("flex-1 flex flex-col items-center gap-6 relative border border-dashed border-slate-900 h-fit",!(R?.addressVisibility==void 0||R?.addressVisibility)&&"opacity-50"),children:[(0,n.jsx)(_.A,{className:"w-12 h-12 text-dark1"}),(0,n.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,n.jsx)("span",{className:"text-2xl text-dark1 font-semibold capitalize",children:T?.address??"Adresse"}),(0,n.jsx)("span",{className:"text-sm text-dark1 font-normal text-center border-[1px] border-dark1",contentEditable:"plaintext-only",ref:ee,onBlur:function(){let e=ee.current.innerHTML;e!==(R?.[`descriptionAddress${b}`]??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in ero.")&&ea({newDescriptionAddress:e})},style:{fontSize:R?.descriptionFontSize?`${R.descriptionFontSize}px`:void 0},children:R?.[`descriptionAddress${b}`]??R?.descriptionAddressFr??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in ero."})]}),(0,n.jsx)("span",{className:"text-sm text-dark1 font-normal border-[1px] border-dark1 min-w-full text-center",contentEditable:"plaintext-only",ref:et,onBlur:function(){let e=et.current.innerText;e!==(R?.address??"123 Sample St, 0000 City")&&ea({newAddress:e})},style:{fontSize:R?.contentFontSize?`${R.contentFontSize}px`:void 0},children:R?.[`address${b}`]??R?.addressFr??(g?`${g?.address1!=""?g?.address1:g?.address2}, ${g.zipCode} ${g?.city}`:"123 Sample St, 0000 City")}),(0,n.jsx)("li",{className:"absolute left-4 top-4 flex h-8 w-8 cursor-pointer items-center justify-center rounded-sm bg-slate-900 p-0 text-white",onClick:()=>ea({newAddressVisibility:R?.addressVisibility!=void 0&&!R?.addressVisibility}),children:R?.addressVisibility==void 0||R?.addressVisibility?(0,n.jsx)(A.A,{size:20}):(0,n.jsx)(I.A,{size:20})})]}),(0,n.jsxs)("div",{className:(0,x.cn)("flex-1 flex flex-col items-center gap-6 relative border border-dashed border-slate-900 h-fit",!(R?.hoursVisibility==void 0||R?.hoursVisibility)&&"opacity-50"),children:[(0,n.jsx)(E.A,{className:"w-12 h-12 text-dark1"}),(0,n.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,n.jsx)("span",{className:"text-2xl text-dark1 font-semibold",children:T?.opening_time??"Horaires"}),(0,n.jsxs)("div",{className:"relative flex gap-5 py-2 border-[1px] border-dark1",children:[(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)("span",{className:"text-sm font-semibold text-dark1 text-right",children:T?.MON??"LUN"}),(0,n.jsx)("span",{className:"text-sm font-semibold text-dark1 text-right",children:T?.TUE??"MAR"}),(0,n.jsx)("span",{className:"text-sm font-semibold text-dark1 text-right",children:T?.WED??"MER"}),(0,n.jsx)("span",{className:"text-sm font-semibold text-dark1 text-right",children:T?.TUR??"JEU"}),(0,n.jsx)("span",{className:"text-sm font-semibold text-dark1 text-right",children:T?.FRI??"VEN"}),(0,n.jsx)("span",{className:"text-sm font-semibold text-dark1 text-right",children:T?.SAT??"SAM"}),(0,n.jsx)("span",{className:"text-sm font-semibold text-dark1 text-right",children:T?.SUN??"DIM"})]}
9),(0,n.jsx)("div",{className:"flex flex-col",children:q&&Object.keys(q).map((e,t)=>{let i=q[e]?.MORNING.FROM??"",s=q[e]?.MORNING.TO??"";return"NO_WORK"===i?(0,n.jsx)("span",{className:"text-sm font-normal text-dark1 opacity-80",children:T?.closed_office??"Bureau ferm\xe9"},t):(0,n.jsx)("span",{className:"text-sm font-normal text-dark1",children:`${i} > ${s}`},t)})}),(0,n.jsx)("div",{className:"flex flex-col",children:q&&Object.keys(q).map((e,t)=>{if(q[e]?.continue)return(0,n.jsx)("span",{className:"text-sm font-normal text-dark1 opacity-0",children:"|"},t);let i=q[e]?.AFTERNOON?.FROM??"",s=q[e]?.AFTERNOON?.TO??"";return"NO_WORK"===i?(0,n.jsx)("span",{className:"text-sm font-normal text-dark1 opacity-80",children:T?.closed_office??"Bureau ferm\xe9"},t):""===i||""===s?null:(0,n.jsx)("span",{className:"text-sm font-normal text-dark1",children:`${i} > ${s}`},t)})}),(0,n.jsx)("ul",{className:"absolute left-2 -top-9 z-[1] flex flex-col gap-2",children:(0,n.jsx)("li",{title:"Edit",onClick:()=>J(!0),className:"flex h-7 w-7 cursor-pointer items-center justify-center rounded-sm bg-dark1 p-0 text-white",children:(0,n.jsx)(L.A,{size:16})})})]})]}),(0,n.jsx)("li",{className:"absolute left-4 top-4 flex h-8 w-8 cursor-pointer items-center justify-center rounded-sm bg-slate-900 p-0 text-white",onClick:()=>ea({newHoursVisibility:R?.hoursVisibility!=void 0&&!R?.hoursVisibility}),children:R?.hoursVisibility==void 0||R?.hoursVisibility?(0,n.jsx)(A.A,{size:20}):(0,n.jsx)(I.A,{size:20})})]}),eu()]})]}):G||W?(0,n.jsxs)("div",{id:"infos",className:(0,x.cn)("flex flex-col gap-4 w-full",!(R?.visibility==void 0||R?.visibility)&&"opacity-50",W&&"grid grid-cols-2 gap-6"),style:{...R?.fontColor?{"--dark-1":R?.fontColor,"--dark-3":`${R?.fontColor}99`}:{}},children:[(R?.emailVisibility==void 0||R?.emailVisibility)&&(0,n.jsxs)("div",{className:"flex flex-col items-center gap-2.5 text-center",children:[(0,n.jsx)($.A,{className:"w-8 h-8 text-dark1"}),(0,n.jsxs)("div",{className:"flex flex-col items-center gap-2.5",children:[(0,n.jsx)("span",{className:"text-base text-dark1 font-semibold capitalize",children:T?.email??"Email"}),(0,n.jsx)("span",{className:"text-sm text-dark1 font-normal text-center whitespace-pre-line",style:{fontSize:R?.descriptionFontSize?`${R.descriptionFontSize}px`:void 0},children:R?.[`descriptionEmail${b}`]??R?.descriptionEmailFr??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in ero."})]}),(0,n.jsx)("span",{className:"text-sm text-dark1 font-normal",style:{fontSize:R?.contentFontSize?`${R.contentFontSize}px`:void 0},children:R?.email??(g&&g?.hubPreferences?.portals.public.config?g?.hubPreferences.portals.public.config.contact.email:"[email protected]")})]}),(R?.phoneVisibility==void 0||R?.phoneVisibility)&&(0,n.jsxs)("div",{className:"flex flex-col items-center gap-2.5 text-center",children:[(0,n.jsx)(F.A,{className:"w-8 h-8 text-dark1"}),(0,n.jsxs)("div",{className:"flex flex-col items-center gap-2.5",children:[(0,n.jsx)("span",{className:"text-base text-dark1 font-semibold capitalize",children:T?.phone??"T\xe9l\xe9phone"}),(0,n.jsx)("span",{className:"text-sm text-dark1 font-normal text-center whitespace-pre-line",style:{fontSize:R?.descriptionFontSize?`${R.descriptionFontSize}px`:void 0},children:R?.[`descriptionPhone${b}`]??R?.descriptionPhoneFr??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in ero."})]}),(0,n.jsx)("span",{className:"text-sm text-dark1 font-normal whitespace-pre-line",style:{fontSize:R?.contentFontSize?`${R.contentFontSize}px`:void 0},children:R?.phone??(g&&g?.hubPreferences?.portals.public.config?g?.hubPreferences.portals.public.config.contact.phone:"+ 32 0 000 00 00")})]}),(R?.addressphoneVisibility==void 0||R?.addressVisibility)&&(0,n.jsxs)("div",{className:"flex flex-col items-center gap-2.5 text-center",children:[(0,n.jsx)(_.A,{className:"w-8 h-8 text-dark1"}),(0,n.jsxs)("div",{className:"flex flex-col items-center gap-2.5",children:[(0,n.jsx)("span",{className:"text-base text-dark1 font-semibold capitalize",children:T?.address??"Adresse"}),(0,n.jsx)("span",{className:"text-sm text-dark1 font-normal text-center whitespace-pre-line",style:{fontSize:R?.descriptionFontSize?`${R.descriptionFontSize}px`:void 0},children:R?.[`descriptionAddress${b}`]??R?.descriptionAddressFr??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in ero."})]}),(0,n.jsx)("span",{className:"text-sm text-dark1 font-normal",style:{fontSize:R?.contentFontSize?`${R.contentFontSize}px`:void 0},children:R?.[`address${b}`]??R?.addressFr??(g?`${g?.address1!=""?g?.address1:g?.address2}, ${g.zipCode} ${g?.city}`:"123 Sample St, 0000 City")})]}),(R?.hoursVisibility==void 0||R?.hoursVisibility)&&(0,n.jsxs)("div",{className:"flex flex-col items-center gap-2.5 text-center",children:[(0,n.jsx)(E.A,{className:"w-8 h-8 text-dark1"}),(0,n.jsxs)("div",{className:"flex flex-col items-center gap-2.5",children:[(0,n.jsx)("span",{className:"text-base text-dark1 font-semibold",children:T?.opening_time??"Horaires"}),(0,n.jsxs)("div",{className:"flex gap-5",children:[(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)("span",{className:"text-sm font-semibold text-dark1 text-right",children:T?.MON??"LUN"}),(0,n.jsx)("span",{className:"text-sm font-semibold text-dark1 text-right",children:T?.TUE??"MAR"}),(0,n.jsx)("span",{className:"text-sm font-semibold text-dark1 text-right",children:T?.WED??"MER"}),(0,n.jsx)("span",{className:"text-sm font-semibold text-dark1 text-right",children:T?.TUR??"JEU"}),(0,n.jsx)("span",{className:"text-sm font-semibold text-dark1 text-right",children:T?.FRI??"VEN"}),(0,n.jsx)("span",{className:"text-sm font-semibold text-dark1 text-right",children:T?.SAT??"SAM"}),(0,n.jsx)("span",{className:"text-sm font-semibold text-dark1 text-right",children:T?.SUN??"DIM"})]}
9),(0,n.jsx)("div",{className:"flex flex-col",children:q&&Object.keys(q).map((e,t)=>{let i=q[e]?.MORNING.FROM??"",s=q[e]?.MORNING.TO??"";return"NO_WORK"===i?(0,n.jsx)("span",{className:"text-sm font-normal text-dark1 opacity-80",children:T?.closed_office??"Bureau ferm\xe9"},t):(0,n.jsx)("span",{className:"text-sm font-normal text-dark1",children:`${i} - ${s}`},t)})}),(0,n.jsx)("div",{className:"flex flex-col",children:q&&Object.keys(q).map((e,t)=>{if(q[e]?.continue)return(0,n.jsx)("span",{className:"text-sm font-normal text-dark1 opacity-0",children:"|"},t);let i=q[e]?.AFTERNOON?.FROM??"",s=q[e]?.AFTERNOON?.TO??"";return"NO_WORK"===i?(0,n.jsx)("span",{className:"text-sm font-normal text-dark1 opacity-80",children:T?.closed_office??"Bureau ferm\xe9"},t):""===i||""===s?null:(0,n.jsx)("span",{className:"text-sm font-normal text-dark1",children:`${i} - ${s}`},t)})})]})]})]})]}):(0,n.jsxs)("div",{id:"infos",className:(0,x.cn)("flex gap-5 py-12 w-full",!(R?.visibility==void 0||R?.visibility)&&"opacity-50"),style:{...R?.fontColor?{"--dark-1":R?.fontColor,"--dark-3":`${R?.fontColor}99`}:{}},children:[(R?.emailVisibility==void 0||R?.emailVisibility)&&(0,n.jsxs)("div",{className:"flex-1 flex flex-col items-center gap-6 text-center",children:[(0,n.jsx)($.A,{className:"w-12 h-12 text-dark1"}),(0,n.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,n.jsx)("span",{className:"text-2xl text-dark1 font-semibold capitalize",children:T?.email??"Email"}),(0,n.jsx)("span",{className:"text-sm text-dark1 font-normal text-center whitespace-pre-line",style:{fontSize:R?.descriptionFontSize?`${R.descriptionFontSize}px`:void 0},children:R?.[`descriptionEmail${b}`]??R?.descriptionEmailFr??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in ero."})]}),(0,n.jsx)("span",{className:"text-sm text-dark1 font-normal",style:{fontSize:R?.contentFontSize?`${R.contentFontSize}px`:void 0},children:R?.email??(g&&g?.hubPreferences?.portals.public.config?g?.hubPreferences.portals.public.config.contact.email:"[email protected]")})]}),(R?.phoneVisibility==void 0||R?.phoneVisibility)&&(0,n.jsxs)("div",{className:"flex-1 flex flex-col items-center gap-6 text-center",children:[(0,n.jsx)(F.A,{className:"w-12 h-12 text-dark1"}),(0,n.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,n.jsx)("span",{className:"text-2xl text-dark1 font-semibold capitalize",children:T?.phone??"T\xe9l\xe9phone"}),(0,n.jsx)("span",{className:"text-sm text-dark1 font-normal text-center whitespace-pre-line",style:{fontSize:R?.descriptionFontSize?`${R.descriptionFontSize}px`:void 0},children:R?.[`descriptionPhone${b}`]??R?.descriptionPhoneFr??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in ero."})]}),(0,n.jsx)("span",{className:"text-sm text-dark1 font-normal",style:{fontSize:R?.contentFontSize?`${R.contentFontSize}px`:void 0},children:R?.phone??(g&&g?.hubPreferences?.portals.public.config?g?.hubPreferences.portals.public.config.contact.phone:"+ 32 0 000 00 00")})]}),(R?.addressphoneVisibility==void 0||R?.addressVisibility)&&(0,n.jsxs)("div",{className:"flex-1 flex flex-col items-center gap-6 text-center",children:[(0,n.jsx)(_.A,{className:"w-12 h-12 text-dark1"}),(0,n.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,n.jsx)("span",{className:"text-2xl text-dark1 font-semibold capitalize",children:T?.address??"Adresse"}),(0,n.jsx)("span",{className:"text-sm text-dark1 font-normal text-center whitespace-pre-line",style:{fontSize:R?.descriptionFontSize?`${R.descriptionFontSize}px`:void 0},children:R?.[`descriptionAddress${b}`]??R?.descriptionAddressFr??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in ero."})]}),(0,n.jsx)("span",{className:"text-sm text-dark1 font-normal",style:{fontSize:R?.contentFontSize?`${R.contentFontSize}px`:void 0},children:R?.[`address${b}`]??R?.addressFr??(g?`${g?.address1!=""?g?.address1:g?.address2}, ${g.zipCode} ${g?.city}`:"123 Sample St, 0000 City")})]}),(R?.hoursVisibility==void 0||R?.hoursVisibility)&&(0,n.jsxs)("div",{className:"flex-1 flex flex-col items-center gap-6 text-center",children:[(0,n.jsx)(E.A,{className:"w-12 h-12 text-dark1"}),(0,n.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,n.jsx)("span",{className:"text-2xl text-dark1 font-semibold",children:T?.opening_time??"Horaires"}),(0,n.jsxs)("div",{className:"flex gap-5",children:[(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)("span",{className:"text-sm font-semibold text-dark1 text-right",children:T?.MON??"LUN"}),(0,n.jsx)("span",{className:"text-sm font-semibold text-dark1 text-right",children:T?.TUE??"MAR"}),(0,n.jsx)("span",{className:"text-sm font-semibold text-dark1 text-right",children:T?.WED??"MER"}),(0,n.jsx)("span",{className:"text-sm font-semibold text-dark1 text-right",children:T?.TUR??"JEU"}),(0,n.jsx)("span",{className:"text-sm font-semibold text-dark1 text-right",children:T?.FRI??"VEN"}),(0,n.jsx)("span",{className:"text-sm font-semibold text-dark1 text-right",children:T?.SAT??"SAM"}),(0,n.jsx)("span",{className:"text-sm font-semibold text-dark1 text-right",children:T?.SUN??"DIM"})]}
9),(0,n.jsx)("div",{className:"flex flex-col",children:q&&Object.keys(q).map((e,t)=>{let i=q[e]?.MORNING.FROM??"",s=q[e]?.MORNING.TO??"";return"NO_WORK"===i?(0,n.jsx)("span",{className:"text-sm font-normal text-dark1 opacity-80",children:T?.closed_office??"Bureau ferm\xe9"},t):(0,n.jsx)("span",{className:"text-sm font-normal text-dark1",children:`${i} - ${s}`},t)})}),(0,n.jsx)("div",{className:"flex flex-col",children:q&&Object.keys(q).map((e,t)=>{if(q[e]?.continue)return(0,n.jsx)("span",{className:"text-sm font-normal text-dark1 opacity-0",children:"|"},t);let i=q[e]?.AFTERNOON?.FROM??"",s=q[e]?.AFTERNOON?.TO??"";return"NO_WORK"===i?(0,n.jsx)("span",{className:"text-sm font-normal text-dark1 opacity-80",children:T?.closed_office??"Bureau ferm\xe9"},t):""===i||""===s?null:(0,n.jsx)("span",{className:"text-sm font-normal text-dark1",children:`${i} - ${s}`},t)})})]})]})]})]})}},35649:(e,t,i)=>{"use strict";i.d(t,{default:()=>x});var n=i(95155),s=i(30285),l=i(59434),a=i(62525),r=i(12115),o=i(28095),c=i(47368),d=i(3055),u=i(36136),m=i(8117);let x=({cardPosition:e,data:t=null,lng:i="fr",edit:x=!1,cancel:p=!1,imageObjectType:f,updateElementList:h,deleteCard:g})=>{let b=(0,l.ZH)(i),[v,j]=(0,r.useState)(t),N=(0,r.useRef)(null),w=(0,r.useRef)(null),[y,k]=(0,r.useState)(),[C,S]=(0,r.useState)(),[$,A]=(0,r.useState)(),[I,F]=(0,r.useState)();(0,r.useEffect)(()=>{v?.croppedArea&&($?.x!==v?.croppedArea?.x||$?.y!==v?.croppedArea?.y)&&A(v?.croppedArea),v?.image===y||v?.image instanceof File||(k(v?.image),v?.croppedArea||S(v?.image)),v?.pdf===I||v?.pdf instanceof File||F(v?.pdf)},[v]),(0,r.useEffect)(()=>{t&&j(t)},[t]),(0,r.useEffect)(()=>{N.current&&(N.current.innerText=v?.[`title${b}`]??"card"),w.current&&(w.current.innerText=v?.[`description${b}`]??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla.")},[i]),(0,r.useEffect)(()=>{p&&j(t)},[p]),(0,r.useEffect)(()=>{$&&y&&(0,o.Ay)(y,$,0).then(e=>{e&&(E({newCroppedArea:$}),S(URL.createObjectURL(e)))})},[$]);let _=(0,r.useMemo)(()=>{if(v?.iconOriginalSize&&v?.iconSize){let e=Number(v?.iconOriginalSize.replace("px",""));return Math.round(Number(v?.iconSize.replace("px",""))/e*100)}return null},[v?.iconOriginalSize,v?.iconSize]);function E({newTitle:t=null,newDescription:i=null,newIconName:n=null,newImage:s=null,newCroppedArea:l=null,newLink:a=null,newButtonText:r=null,newPdf:o=null,newIconColor:c=null,newIconSize:d=null,newIconBgColor:u=null,newIconVerticalAlign:m=null,newIconHorizontalAlign:x=null,newIconOriginalSize:p=null}){let f={...v,...t&&{[`title${b}`]:t},...i&&{[`description${b}`]:i},...s&&{image:s,croppedArea:null,iconName:null,iconSize:null,...o?{}:{pdf:null}},...n&&{image:null,croppedArea:null,iconName:n,pdf:null},...l&&{croppedArea:l},...o&&{pdf:o,iconName:null,...s?{image:s}:{image:null}},...null!=a&&{[`link${b}`]:a},...null!=r&&{[`buttonText${b}`]:r},...c&&{iconColor:c},...d&&{iconSize:d},...u&&{iconBgColor:u},...m&&{iconVerticalAlign:m},...x&&{iconHorizontalAlign:x},...p&&{iconOriginalSize:p}};h&&void 0!=e&&h(e,f)}return x?(0,n.jsxs)("div",{className:"relative max-w-[600px]",children:[g&&void 0!=e&&(0,n.jsx)("div",{className:"absolute top-2 left-2 z-[2]",children:(0,n.jsxs)(s.$,{variant:"destructive",className:"!px-2 h-auto",onClick:()=>g(e),children:[(0,n.jsx)(a.A,{size:30}),"Supprimer la carte"]})}),(0,n.jsx)(d.A,{labelClassname:"block relative w-full h-[220px] mb-[1.875em]",iconClassname:"text-[220px] w-full h-full flex items-center justify-center",imageUrl:y,setImageUrl:k,croppedImageUrl:C,setCroppedImageUrl:S,setCroppedArea:A,canbeVideo:!1,canbePdf:!0,iconName:v.iconName,iconColor:v.iconColor,iconFinalSize:v?.iconSize,iconBgColor:v?.iconBgColor,iconVerticalAlign:v?.iconVerticalAlign,iconHorizontalAlign:v?.iconHorizontalAlign,iconOriginalSize:v?.iconOriginalSize,pdfUrl:I,setPdfUrl:F,updateElement:E,removeImage:()=>h(e,{...v,image:null,croppedArea:null,iconName:null,pdf:null})}),(0,n.jsx)("h3",{className:"text-2xl text-dark1 font-semibold leading-[120%] mb-4 border-[1px] border-dark1",contentEditable:"plaintext-only",ref:N,onBlur:function(){E({newTitle:N.current.innerText})},children:v?.[`title${b}`]??"card"}),(0,n.jsx)("p",{className:"line-clamp-6 mb-5 text-dark1 border-[1px] border-dark1",contentEditable:"plaintext-only",ref:w,onBlur:function(){E({newDescription:w.current.innerText})},children:v?.[`description${b}`]??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla."})]}):(0,n.jsx)("div",{className:"max-w-[600px]",children:(0,n.jsxs)("div",{className:"group relative h-[220px]",children:[(0,n.jsxs)("div",{className:"relative bg-gray-200 h-[220px] w-full flex items-end justify-center py-12 px-4 transition-all duration-700 rounded-lg rotate-x-0 group-hover:rotate-x-180 backface-hidden",children:[(0,n.jsxs)("div",{className:(0,l.cn)("bg-gray-200 h-full rounded-lg absolute top-1/2 -translate-y-1/2 w-full z-[1] over after:content-[''] after:absolute after:bottom-0 after:right-0 after:bg-[linear-gradient(0deg,#475569_0,#47556977_50%,transparent)] after:w-full after:h-1/2 after:z-[5] after:rounded-lg"),style:{...v?.iconName&&v?.iconBgColor&&{background:v?.iconBgColor??""},height:_?`${_}%`:""},children:[!v.iconName&&I&&""!==I?(0,n.jsx)(m.PdfViewer,{pdfUrl:I,thumbnailUrl:C,className:"!rounded-xl",style:{objectFit:f??"cover"},sizes:"600px"}):!v.iconName&&C&&""!==C?(0,n.jsx)(u.ImageViewer,{imageUrl:C,className:"!rounded-xl",enableTheMaximizer:!1,style:{objectFit:f??"cover"},sizes:"600px"}):null,v.iconName&&(0,n.jsx)(c.IconRenderer,{name:v.iconName,className:"text-[220px] w-full h-full flex items-center justify-center",color:v.iconColor,style:{fontSize:v?.iconSize??"",justifyContent:v?.iconHorizontalAlign??"center",alignItems:v?.iconVerticalAlign??"center",height:"100%",width:"100%"}})]}),(v?.[`title${b}`]==void 0||""!=(v?.[`title${b}`]??"").trim())&&(0,n.jsx)("h3",{className:"relative text-3xl text-white text-center font-semibold z-[2]",children:v?.[`title${b}`]??"card"})]}),(0,n.jsxs)("div",{className:"absolute top-0 left-0 h-[220px] w-full flex flex-col gap-4 items-center justify-end py-10 px-4 transition-all duration-700 rounded-lg rotate-x-180 group-hover:rotate-x-0 bg-slate-600 backface-hidden overflow-auto",children:[(v?.[`title${b}`]==void 0||""!=(v?.[`title${b}`]??"").trim())&&(0,n.jsx)("h3",{className:"relative text-3xl text-white text-center font-semibold",children:v?.[`title${b}`]??"card"}),(v?.[`description${b}`]==void 0||""!=(v?.[`description${b}`]??"").trim())&&(0,n.jsx)("p",{className:"line-clamp-6 text-white whitespace-pre-line text-center",children:v?.[`description${b}`]??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla."})]})]})})}},35918:(e,t,i)=>{"use strict";i.d(t,{T:()=>l,t:()=>s});let n={fr:()=>i.e(4687).then(i.t.bind(i,94687,19)).then(e=>e.default),en:()=>i.e(1476).then(i.t.bind(i,1476,19)).then(e=>e.default),nl:()=>i.e(4537).then(i.t.bind(i,64537,19)).then(e=>e.default)},s=e=>(t,i)=>{let n=t.split(".").reduce((e,t)=>
9e&&e[t],e);return n?(i&&Object.entries(i).length&&Object.entries(i).forEach(([e,t])=>{n=n.replace(`{{${e}}}`,String(t))}),n):t},l=e=>["fr","en","nl"].includes(e)?n[e]():[]},36136:(e,t,i)=>{"use strict";i.d(t,{ImageViewer:()=>u});var n=i(95155),s=i(12115),l=i(57918),a=i(66766),r=i(59434),o=i(54165),c=i(74749),d=i(28095);let u=({imageUrl:e,className:t,enableTheMaximizer:i=!0,style:u,croppedArea:m,priority:x=!1,sizes:p="100vw",quality:f})=>{let[h,g]=(0,s.useState)(!1),[b,v]=(0,s.useState)(null),{isMobile:j}=(0,c.default)();(0,s.useEffect)(()=>{let t=!1;return m&&m?.x&&m?.y&&(async()=>{let i=await (0,d.Ay)(e,m,0);i&&!t&&v(URL.createObjectURL(i))})(),()=>{t=!0}},[e,m]);let N=m&&m?.x&&m?.y?b??e:e;return(0,n.jsxs)("div",{className:"relative w-full h-full group",children:[(0,n.jsx)(a.default,{src:N,alt:"Uploaded",className:(0,r.cn)("w-full h-full object-cover rounded-2xl",t),style:u,fill:!0,sizes:p,priority:x,quality:f}),i&&!j&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"absolute top-5 right-5 cursor-pointer p-2 bg-[#00000099] rounded-md hidden group-hover:flex",onClick:()=>g(!0),children:(0,n.jsx)(l.A,{size:18,color:"white"})}),(0,n.jsx)(o.lG,{open:h,onOpenChange:e=>{g(e)},children:(0,n.jsx)(o.Cf,{className:"max-w-[90%] h-[90%] md:max-w-[80%] md:h-[95%] bg-slate-900 border-none [&>button]:bg-white [&>button]:opacity-100 [&>button]:p-1 [&>button]:rounded-sm",children:(0,n.jsx)(a.default,{src:N,alt:"Uploaded",className:(0,r.cn)("w-full h-full object-cover"),fill:!0})})})]})]})}},37936:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CustomLink:()=>c});var n=i(95155),s=i(59434),l=i(51012),a=i(6874),r=i.n(a),o=i(12115);let c=({url:e,className:t,children:i})=>{let a=l.n.use.siteMenu(),c=l.n.use.access_token(),d=l.n.use.setAdminAccess(),u=(0,o.useMemo)(()=>{if(e.includes("https")||e.includes("www"))for(let l of a){if(l.externalLink===e&&l.needsLogin)if(!c)return(0,n.jsx)("div",{onClick:()=>d(!0),className:(0,s.cn)(t,"cursor-pointer"),children:i});else return(0,n.jsx)(r(),{href:`${e}?token=${c}`,target:e.includes("http")||e.includes("www")?"_blank":"_self",className:t,children:i});for(let a of l.children??[])if(a.externalLink===e&&a.needsLogin)if(!c)return(0,n.jsx)("div",{onClick:()=>d(!0),className:(0,s.cn)(t,"cursor-pointer"),children:i});else return(0,n.jsx)(r(),{href:`${e}?token=${c}`,target:e.includes("http")||e.includes("www")?"_blank":"_self",className:t,children:i})}return(0,n.jsx)(r(),{href:e,target:e.includes("http")||e.includes("www")?"_blank":"_self",className:t,children:i})},[a,c,e]);return(0,n.jsx)(n.Fragment,{children:u})}},40424:(e,t,i)=>{"use strict";i.d(t,{q:()=>s});var n=i(34477);let s=(0,n.createServerReference)("7fb50cf6de81c27ec3c282d4c217440ca21219e7d6",n.callServer,void 0,n.findSourceMapURL,"getSitePagesCachedAction")},41583:(e,t,i)=>{"use strict";i.d(t,{G:()=>s});var n=i(34477);let s=(0,n.createServerReference)("7f4524c830432190dd276b669a007724e6e9e3345e",n.callServer,void 0,n.findSourceMapURL,"getDefaultBlocksCachedAction")},43110:e=>{e.exports={avatarContainer:"Avatar_avatarContainer__8HG85",avatar_bg:"Avatar_avatar_bg__A_6zn",avatar:"Avatar_avatar__y4ZXm",avatar_nomargin:"Avatar_avatar_nomargin__5TX6k",avatar_large:"Avatar_avatar_large__9aFK9",avatarSvg:"Avatar_avatarSvg__R1Pmm",emptyAvatar:"Avatar_emptyAvatar__TEy2C",avatarInfo:"Avatar_avatarInfo__YpsA6",avatarName:"Avatar_avatarName__KQ4ER",avatarSignature:"Avatar_avatarSignature__BMtf_"}},44632:(e,t,i)=>{"use strict";i.d(t,{k:()=>s});var n=i(34477);let s=(0,n.createServerReference)("40d39e85021f49d53106d41a3ca936f4e06b27a5e0",n.callServer,void 0,n.findSourceMapURL,"saveMediaAction")},44720:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>$});var n=i(95155),s=i(25618),l=i(60379),a=i(62523),r=i(85057),o=i(59434),c=i(51012),d=i(51154),u=i(74311),m=i(91981),x=i(12115),p=i(11867),f=i(74749),h=i(28095),g=i(49345),b=i(3055),v=i(47368),j=i(46102),N=i(36136),w=i(78055),y=i(37936),k=i(44632),C=i(8117),S=i(35918);let $=({data:e=null,lng:t="fr",edit:i=!1,save:$,cancel:A,visibility:I,updateBlockContent:F,priority:_=!1})=>{let E=c.n.use.navCommunity(),L=c.n.use.siteInfo(),[z,B]=(0,x.useState)((0,o.ZH)(t)),T=(0,x.useRef)((0,o.ZH)(t)),P=e=>{T.current=e,B(e)},[R,M]=(0,x.useState)(e?.content),D=(0,x.useRef)(null),O=e=>{D.current=e,M(e)},[U,V]=(0,x.useState)(),[q,H]=(0,x.useState)(),[Z,J]=(0,x.useState)(),[G,W]=(0,x.useState)(),[Q,K]=(0,x.useState)(null),[Y,X]=(0,x.useState)(),ee=(0,x.useRef)(null),et=(0,x.useRef)(null),[ei,en]=(0,x.useState)(!1),{isMobile:es,isTablet:el}=(0,f.default)(),ea=(0,p.A)(!0);(0,x.useEffect)(()=>{O(e?.content)},[e]),(0,x.useEffect)(()=>{(0,S.T)(t).then(e=>K(e))},[t]),(0,x.useEffect)(()=>{P((0,o.ZH)(t))},[t]),(0,x.useEffect)(()=>{R?.croppedArea&&(Y?.x!==R?.croppedArea?.x||Y?.y!==R?.croppedArea?.y)&&X(R?.croppedArea),R?.image===U||R?.image instanceof File||(V(R?.image),R?.croppedArea||H(R?.image)),R?.video===Z||R?.video instanceof File||J(R?.video),R?.pdf===G||R?.pdf instanceof File||W(R?.pdf)},[R]),(0,x.useEffect)(()=>{$&&F&&(R?.image&&R?.image instanceof File?(en(!0),R?.video&&R?.video instanceof File?(0,k.k)({community:E,file:R.video}).then(t=>{let i={...R};i.video=t.data.data.fullMediaUrl,(0,k.k)({community:E,file:R.image}).then(t=>{i.image=t.data.data.fullMediaUrl,en(!1),F(e?.uuid??"",i)})}):R?.pdf&&R?.pdf instanceof File?(0,k.k)({community:E,file:R.pdf}).then(t=>{let i={...R};i.pdf=t.data.data.fullMediaUrl,(0,k.k)({community:E,file:R.image}).then(t=>{i.image=t.data.data.fullMediaUrl,en(!1),F(e?.uuid??"",i)})}):(0,k.k)({community:E,file:R.image}).then(t=>{let i={...R};i.image=t.data.data.fullMediaUrl,en(!1),F(e?.uuid??"",i);let n=L?.config?.imagesLibrary??[];ea.mutate({siteId:L?.id??0,data:{config:{...L?.config,imagesLibrary:[...n,t.data.data.fullMediaUrl]}}})})):R?.pdf&&R?.pdf instanceof File?(en(!0),(0,k.k)({community:E,file:R.pdf}).then(t=>{let i={...R};i.pdf=t.data.data.fullMediaUrl,en(!1),F(e?.uuid??"",i)})):F(e?.uuid??"",R))},[$,F]),(0,x.useEffect)(()=>{A&&O(e?.content)},[A]),(0,x.useEffect)(()=>{void 0!=I&&(R?.visibility??!0)!=I&&F&&F(e?.uuid??"",{...R,visibility:I})},[I]),(0,x.useEffect)(()=>{Y&&U&&(0,h.Ay)(U,Y,0).then(e=>{e&&(eo({newCroppedArea:Y}),H(URL.createObjectURL(e)))})},[Y]);let er=(0,x.useMemo)(()=>
9{if(R?.iconOriginalSize&&R?.iconSize){let e=Number(R?.iconOriginalSize.replace("px",""));return Math.round(Number(R?.iconSize.replace("px",""))/e*100)}return null},[R?.iconOriginalSize,R?.iconSize]);function eo({newName:e=null,newTitle:t=null,newDescription:i=null,newLink:n=null,newImage:s=null,newCroppedArea:l=null,newButtonText:a=null,newVideo:r=null,newPdf:o=null,reversed:c=null,newIconName:d=null,newIconColor:u=null,newIconSize:m=null,newIconBgColor:x=null,newIconVerticalAlign:p=null,newIconHorizontalAlign:f=null,maximized:h=null,newIconOriginalSize:g=null,newHideImage:b=null},v=!1){O({...D.current,...s&&{image:s,croppedArea:null,iconName:null,iconSize:null,video:null,...o?{}:{pdf:null}},...l&&{croppedArea:l},...r&&{video:r,iconName:null,image:null,pdf:null},...o&&{pdf:o,iconName:null,video:null,...s?{image:s}:{image:null}},...e&&{[`name${T.current}`]:e},...t&&{[`title${T.current}`]:t},...i&&{[`description${T.current}`]:i},...null!=n&&{[`link${v?"Secondary":""}${T.current}`]:n},...null!=a&&{[`buttonText${v?"Secondary":""}${T.current}`]:a},...d&&{video:null,image:null,pdf:null,croppedArea:null,iconName:d},...u&&{iconColor:u},...m&&{iconSize:m},...x&&{iconBgColor:x},...p&&{iconVerticalAlign:p},...f&&{iconHorizontalAlign:f},...null!=c&&{reversed:c},...null!=h&&{maximized:h},...g&&{iconOriginalSize:g},...null!=b&&{hideImage:b}})}return i?(0,n.jsxs)("div",{id:"cta",className:"flex flex-col w-full items-center relative",children:[(0,n.jsx)(s.p$,{className:"border-[1px] border-dark1 uppercase text-center w-full",contentEditable:!0,ref:ee,onBlur:function(){eo({newName:ee.current.innerText})},children:R?.[`name${z}`]??"CTA SECTION"}),(0,n.jsx)(s.H2,{className:"mb-[1.25rem] border-[1px] border-dark1 text-center w-full",contentEditable:!0,ref:et,onBlur:function(){eo({newTitle:et.current.innerText})},children:R?.[`title${z}`]??"D\xe9crivez nos offres"}),(0,n.jsx)(g.A,{disable:!1,value:R?.[`description${z}`]??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",onChange:function(e){eo({newDescription:e})},className:"w-3/5"}),(0,n.jsxs)("div",{className:(0,o.cn)("flex flex-col w-full items-center relative mt-10 gap-10",R?.reversed&&"flex-col-reverse"),children:[(0,n.jsx)("div",{className:"flex flex-col w-full items-center relative gap-5",children:[1,2].map(e=>{let t=1==e?"principal":"secondaire",i=1==e?"":"Secondary";return(0,n.jsxs)("div",{className:"flex items-end gap-4 w-full",children:[(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsxs)(r.J,{children:["Texte du bouton ",t]}),(0,n.jsx)(a.p,{value:R?.[`buttonText${i}${z}`],className:"bg-white mt-2.5",onChange:t=>eo({newButtonText:t.target.value},2==e)})]}),(0,n.jsxs)("div",{className:"w-1/3",children:[(0,n.jsxs)(r.J,{children:["Lien du bouton ",t]}),(0,n.jsx)(a.p,{value:R?.[`link${i}${z}`],className:"bg-white mt-2.5",onChange:t=>eo({newLink:t.target.value},2==e)})]}),(0,n.jsx)("div",{className:"text-slate-900 text-sm h-9 flex items-center",children:" - OU - "}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)(r.J,{children:"S\xe9lectionner l'url \xe0 partir d'une page"}),(0,n.jsx)(w.B,{link:R?.[`link${i}${z}`],pageId:void 0,setLink:t=>eo({newLink:t},2==e),selectorClassname:"mt-2.5"})]})]},e)})}),(0,n.jsx)("div",{className:(0,o.cn)("relative flex w-fit h-fit",R?.maximized&&"relative w-full aspect-video"),children:(0,n.jsx)(b.A,{labelClassname:(0,o.cn)("w-[600px] h-[468px] rounded-2xl",R?.maximized&&"block relative w-full h-full [&>div>div>div[data-action='image-delete']]:right-[calc(50%_-_2.5rem)] [&>div>div>div[data-action='image-crop']]:right-[calc(50%_+_0.5rem)] [&>div>div>div[data-action='image-crop']]:top-4 [&>div>div>div[data-action='image-delete']]:top-4 [&>div>div>div[data-action='icons-picker']]:bottom-4 [&>div>div>div[data-action='icons-picker']]:left-4 [&>div>div>div[data-action='icons-color-picker']]:bottom-4 [&>div>div>div[data-action='icons-color-picker']]:left-16"),iconClassname:"text-[468px] w-full h-full flex items-center justify-center",imageUrl:U,setImageUrl:V,croppedImageUrl:q,setCroppedImageUrl:H,setCroppedArea:X,canbeVideo:!0,canbePdf:!0,iconName:R?.iconName,iconColor:R?.iconColor,iconFinalSize:R?.iconSize,iconBgColor:R?.iconBgColor,iconVerticalAlign:R?.iconVerticalAlign,iconHorizontalAlign:R?.iconHorizontalAlign,iconOriginalSize:R?.iconOriginalSize,hideImage:R?.hideImage!=void 0&&R?.hideImage,videoUrl:Z,setVideoUrl:J,pdfUrl:G,setPdfUrl:W,updateElement:eo,removeImage:()=>O({...D.current,image:null,video:null,pdf:null,croppedArea:null,iconName:null})})})]}),ei&&(0,n.jsx)("div",{className:"z-10 absolute w-full h-full bg-[#00000088] top-[50%] left-[50%] flex flex-col gap-2 justify-center items-center text-white -translate-x-[50%] -translate-y-[50%] cursor-pointer",children:(0,n.jsx)(d.A,{className:"h-[100px] w-[100px] animate-spin text-white"})}),(0,n.jsxs)("ul",{className:"absolute left-[-62px] top-[40%] z-[1] flex flex-col gap-2",children:[(0,n.jsxs)(j.m_,{children:[(0,n.jsx)(j.k$,{className:"flex h-8 w-8 gap-0.5 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",asChild:!0,children:(0,n.jsxs)("li",{className:(0,o.cn)("flex flex-col h-8 w-8 gap-0 cursor-pointer items-center justify-center border border-blue-400 rounded-sm bg-blue-400 text-white",!R?.reversed&&"bg-white"),onPointerDown:()=>eo({reversed:!1}),children:[(0,n.jsx)("div",{className:(0,o.cn)("w-4 h-1.5 rounded-xs bg-white",!R?.reversed&&"bg-blue-400")}),(0,n.jsxs)("div",{className:"flex gap-1",children:[(0,n.jsx)("div",{className:(0,o.cn)("w-1.5 h-1 rounded-xs bg-white",!R?.reversed&&"bg-blue-400")}),(0,n.jsx)("div",{className:(0,o.cn)("w-1.5 h-1 rounded-xs bg-white",!R?.reversed&&"bg-blue-400")})]}),(0,n.jsx)("div",{className:(0,o.cn)("w-3 h-2 rounded-xs bg-white",!R?.reversed&&"bg-blue-400")})]})}),(0,n.jsx)(j.ZI,{children:"Switch"})]}),(0,n.jsxs)(j.m_,{children:[(0,n.jsx)(j.k$,{className:"flex h-8 w-8 gap-0.5 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",asChild:!0,children:(0,n.jsxs)("li",{className:(0,o.cn)("flex flex-col h-8 w-8 gap-0 cursor-pointer items-center justify-center border border-blue-400 rounded-sm bg-blue-400 text-white",!!R?.reversed&&"bg-white"),onPointerDown:()=>eo({reversed:!0}),children:[(0,n.jsx)("div",{className:(0,o.cn)("w-4 h-1.5 rounded-xs bg-white",!!R?.reversed&&"bg-blue-400")}),(0,n.jsx)("div",{className:(0,o.cn)("w-3 h-2 rounded-xs bg-white",!!R?.reversed&&"bg-blue-400")}),(0,n.jsxs)("div",{className:"flex gap-1",children:[(0,n.jsx)("div",{className:(0,o.cn)("w-1.5 h-1 rounded-xs bg-white",!!R?.reversed&&"bg-blue-400")}),(0,n.jsx)("div",{className:(0,o.cn)("w-1.5 h-1 rounded-xs bg-white",!!R?.reversed&&"bg-blue-400")})]})]})}),(0,n.jsx)(j.ZI,{children:"Switch"})]}),(0,n.jsxs)(j.m_,{children:[(0,n.jsx)(j.k$,{className:"flex h-8 w-8 gap-0.5 cursor-pointer items-center justify-center rounded-sm p-1 bg-blue-400 text-white",asChild:!0,children:(0,n.jsx)("div",{onClick:()=>eo({maximized:!R?.maximized}),children:R?.maximized?(0,n.jsx)(u.A,{}):(0,n.jsx)(m.A,{})})}),(0,n.jsx)(j.ZI,{children:R?.maximized?"R\xe9duire la taille de l'image":"Agrandir la taille de l'image"})]})]})]}):es||el?(0,n.jsxs)("div",{id:"cta",className:(0,o.cn)("flex flex-col items-center w-full",!(R?.visibility==void 0||R?.visibility)&&"opacity-50"),style:{...R?.fontColor?{"--dark-1":R?.fontColor,"--dark-3":`${R?.fontColor}99`}:{}},children:[(R?.[`name${z}`]==void 0||R?.[`name${z}`]!=""&&R?.[`name${z}`]!="\n")&&(0,n.jsx)(s.p$,{className:"uppercase !text-center",children:R?.[`name${z}`]??R?.nameFr??"\xc0 PROPOS"}),(R?.[`title${z}`]==void 0||R?.[`title${z}`]!=""&&R?.[`title${z}`]!="\n")&&(0,n.jsx)(s.H2,{className:"mb-[1rem] !text-2xl !text-center",children:R?.[`title${z}`]??R?.titleFr??"D\xe9crivez ce qui diff\xe9rencie votre entreprise de ses concurrents"}),(R?.[`description${z}`]==void 0||R?.[`description${z}`]!=""&&R?.[`description${z}`]!="\n"&&R?.[`description${z}`]!="<p><br></p>")&&(0,n.jsx)("div",{className:"sun-editor-editable !p-0 text-dark1 !bg-transparent !text-base !text-center",dangerouslySetInnerHTML:{__html:R?.[`description${z}`]??R?.descriptionFr??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. <br/><br/> It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged."}}),(0,n.jsxs)("div",{className:(0,o.cn)("flex flex-col w-full items-center relative gap-5 mt-5",R?.reversed&&"flex-col-reverse"),children:[(0,n.jsxs)("div",{className:(0,o.cn)("flex flex-wrap gap-4 items-center my-5",el&&"!flex-row"),children:[(R?.[`link${z}`]??"")!==""&&(R?.[`buttonText${z}`]??"")!==""&&(0,n.jsx)(y.CustomLink,{url:R?.[`link${z}`],className:"w-full uppercase border rounded-lg shadow-md font-semibold inline-flex items-center justify-center px-6 py-3 border-input bg-background hover:bg-accent hover:text-accent-foreground",children:R?.[`buttonText${z}`]}),(R?.[`linkSecondary${z}`]??"")!==""&&(R?.[`buttonTextSecondary${z}`]??"")!==""&&(0,n.jsx)(y.CustomLink,{url:R?.[`linkSecondary${z}`],className:"w-full uppercase border rounded-lg shadow-md font-semibold inline-flex items-center justify-center px-6 py-3 border-input bg-slate-900 text-white hover:bg-slate-700 hover:text-white",children:R?.[`buttonTextSecondary${z}`]})]}),!R?.hideImage&&(0,n.jsx)("div",{className:"relative w-[calc(100vw_-_40px)] h-[calc((100vw_-_40px)_*_9/16)] rounded-2xl shrink-0",style:{height:er?`${er}%`:""},children:(0,n.jsxs)("div",{className:(0,o.cn)("bg-gray-200 h-full rounded-2xl absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-full z-[1]"),style:{...R?.iconName&&R?.iconBgColor&&{background:R?.iconBgColor??"transparent"}},children:[!R?.iconName&&(Z&&""!=Z?(0,n.jsx)(l.default,{video:Z,thumbnail:U??""}):G&&""!=G?(0,n.jsx)(C.PdfViewer,{pdfUrl:G,thumbnailUrl:U,viewLabel:Q?.view_document}):(0,n.jsx)(n.Fragment,{children:q&&""!==q&&(0,n.jsx)(N.ImageViewer,{imageUrl:q,className:"!rounded-md",style:{objectFit:R?.imageObject??"cover"},priority:_,sizes:"calc(100vw - 40px)"})})),R?.iconName&&(0,n.jsx)(v.IconRenderer,{name:R?.iconName,className:"text-[calc((100vw_-_40px)_*_9/16)] w-full h-full flex items-center justify-center",color:R?.iconColor,style:{fontSize:R?.iconSize??"",justifyContent:R?.iconHorizontalAlign??"center",alignItems:R?.iconVerticalAlign??"center"}})]})})]})]}):(0,n.jsxs)("div",{id:"cta",className:(0,o.cn)("flex flex-col items-center w-full gap-0",!(R?.visibility==void 0||R?.visibility)&&"opacity-50"),style:{...R?.fontColor?{"--dark-1":R?.fontColor,"--dark-3":`${R?.fontColor}99`}:{}},children:[(0,n.jsxs)("div",{className:"flex flex-col items-center w-full has-[div]:mb-4 has-[h2]:mb-4 has-[p]:mb-4",children:[(R?.[`name${z}`]==void 0||R?.[`name${z}`]!=""&&R?.[`name${z}`]!="\n")&&(0,n.jsx)(s.p$,{className:"uppercase !text-center",children:R?.[`name${z}`]??R?.nameFr??"\xc0 PROPOS"}),(R?.[`title${z}`]==void 0||R?.[`title${z}`]!=""&&R?.[`title${z}`]!="\n")&&(0,n.jsx)(s.H2,{className:"mb-[1.25rem] !text-center",children:R?.[`title${z}`]??R?.titleFr??"D\xe9crivez ce qui diff\xe9rencie votre entreprise de ses concurrents"}),(R?.[`description${z}`]==void 0||R?.[`description${z}`]!=""&&R?.[`description${z}`]!="\n"&&R?.[`description${z}`]!="<p><br></p>")&&(0,n.jsx)("div",{className:"sun-editor-editable !p-0 !text-dark1 !bg-transparent !text-base !text-center w-3/5",dangerouslySetInnerHTML:{__html:R?.[`description${z}`]??R?.descriptionFr??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. <br/><br/> It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged."}})]}),(0,n.jsxs)("div",{className:(0,o.cn)("flex flex-col w-full items-center relative gap-0",R?.reversed&&"flex-col-reverse",((R?.[`link${z}`]??"")!==""&&(R?.[`buttonText${z}`]??"")!==""||(R?.[`linkSecondary${z}`]??"")!==""&&(R?.[`buttonTextSecondary${z}`]??"")!=="")&&"gap-12"),children:[(0,n.jsxs)("div",{className:"flex gap-4 items-center",children:[(R?.[`link${z}`]??"")!==""&&(R?.[`buttonText${z}`]??"")!==""&&(0,n.jsx)(y.CustomLink,{url:R?.[`link${z}`],className:"mt-0 uppercase border rounded-lg shadow-md font-semibold inline-flex items-center justify-center px-6 py-3 border-input bg-background hover:bg-accent hover:text-accent-foreground",children:R?.[`buttonText${z}`]}),(R?.[`linkSecondary${z}`]??"")!==""&&(R?.[`buttonTextSecondary${z}`]??"")!==""&&(0,n.jsx)(y.CustomLink,{url:R?.[`linkSecondary${z}`],className:"mt-0 uppercase border rounded-lg shadow-md font-semibold inline-flex items-center justify-center px-6 py-3 border-input bg-slate-900 text-white hover:bg-slate-700 hover:text-white",children:R?.[`buttonTextSecondary${z}`]})]}),!R?.hideImage&&(0,n.jsx)("div",{className:(0,o.cn)("relative w-[600px] h-[468px] rounded-2xl shrink-0",R?.maximized&&"w-full h-auto aspect-video"),style:{height:er?`${468*er/100}px`:""},children:(0,n.jsxs)("div",{className:(0,o.cn)("bg-gray-200 h-full rounded-2xl absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-full z-[1]",q&&""!==q&&"bg-white"),style:{...R?.iconName&&R?.iconBgColor&&{background:R?.iconBgColor??""}},children:[!R?.iconName&&(Z&&""!=Z?(0,n.jsx)(l.default,{video:Z,thumbnail:U??"",sizes:R?.maximized?"100vw":"600px"}):G&&""!=G?(0,n.jsx)(C.PdfViewer,{pdfUrl:G,thumbnailUrl:U,viewLabel:Q?.view_document,sizes:R?.maximized?"100vw":"600px"}):(0,n.jsx)(n.Fragment,{children:q&&""!==q&&(0,n.jsx)(N.ImageViewer,{imageUrl:q,className:"!rounded-md",style:{objectFit:R?.imageObject??"cover"},priority:_,sizes:R?.maximized?"100vw":"600px"})})),R?.iconName&&(0,n.jsx)(v.IconRenderer,{name:R?.iconName,className:"text-[468px] w-full h-full flex items-center justify-center",color:R?.iconColor,style:{fontSize:R?.iconSize??"",justifyContent:R?.iconHorizontalAlign??"center",alignItems:R?.iconVerticalAlign??"center"}})]})})]})]})}},45158:(e,t,i)=>{"use strict";i.d(t,{t:()=>s});var n=i(34477);let s=(0,n.createServerReference)("60049cd83d5e340c77b7190eb7cd377f8f8a0cf41a",n.callServer,void 0,n.findSourceMapURL,"putMenuAction")},45419:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>A});
9var n=i(95155),s=i(12115),l=i(46120),a=i.n(l),r=i(85805),o=i(91091),c=i(30285),d=i(62525),u=i(28095),m=i(3055),x=i(47368),p=i(36136),f=i(8117);let h=({cardPosition:e,data:t=null,edit:i=!1,isMobile:l=!1,imageObjectType:a,updateElementList:r,deleteSlide:o,priority:h=!1})=>{let[g,b]=(0,s.useState)(t),v=(0,s.useRef)(null),j=e=>{v.current=e,b(e)},[N,w]=(0,s.useState)(),[y,k]=(0,s.useState)(),[C,S]=(0,s.useState)(),[$,A]=(0,s.useState)();function I({newImage:t=null,newCroppedArea:i=null,newIconName:n=null,newIconColor:s=null,newIconSize:l=null,newIconBgColor:a=null,newIconVerticalAlign:o=null,newIconHorizontalAlign:c=null,newPdf:d=null}){let u={...g,...t&&{image:t,croppedArea:null,iconName:null,...d?{}:{pdf:null}},...i&&{croppedArea:i},...n&&{image:null,croppedArea:null,iconName:n,pdf:null},...d&&{pdf:d,iconName:null,...t?{image:t}:{image:null}},...s&&{iconColor:s},...l&&{iconSize:l},...a&&{iconBgColor:a},...o&&{iconVerticalAlign:o},...c&&{iconHorizontalAlign:c}};r&&void 0!=e&&r(e,u)}return((0,s.useEffect)(()=>{g?.croppedArea&&($?.x!==g?.croppedArea?.x||$?.y!==g?.croppedArea?.y)&&A(g?.croppedArea),g?.image===N||g?.image instanceof File||w(g?.image),g?.pdf===C||g?.pdf instanceof File||S(g?.pdf),g?.croppedArea||g?.image===y||k(g?.image)},[g]),(0,s.useEffect)(()=>{t&&j(t)},[t]),(0,s.useEffect)(()=>{$&&N&&(0,u.Ay)(N,$,0).then(e=>{e&&(I({newCroppedArea:$}),k(URL.createObjectURL(e)))})},[$]),i)?(0,n.jsxs)("div",{className:"relative w-full max-h-[600px] aspect-video",children:[(0,n.jsx)("div",{className:"absolute top-0 left-0 z-[30] bg-white px-5 py-2.5 border-r-[3px] border-b-[3px] border-slate-900 rounded-br-lg",children:(0,n.jsx)("span",{className:"text-3xl text-slate-900 font-extrabold",children:(e??0)+1})}),o&&void 0!=e&&(0,n.jsx)("div",{className:"absolute top-5 right-5 z-[30]",children:(0,n.jsx)(c.$,{variant:"destructive",className:"text-white w-9 h-9 flex justify-center items-center",onClick:()=>o(e),children:(0,n.jsx)(d.A,{className:"size-5"})})}),(0,n.jsx)(m.A,{labelClassname:"block relative h-full [&>div>div>div[data-action='image-delete']]:right-[calc(50%_-_2.5rem)] [&>div>div>div[data-action='image-crop']]:right-[calc(50%_+_0.5rem)] [&>div>div>div[data-action='image-crop']]:top-4 [&>div>div>div[data-action='image-delete']]:top-4 [&>div>div>div[data-action='icons-picker']]:bottom-4 [&>div>div>div[data-action='icons-picker']]:left-4 [&>div>div>div[data-action='icons-color-picker']]:bottom-4 [&>div>div>div[data-action='icons-color-picker']]:left-16",iconClassname:"text-[600px] flex items-center justify-center",imageUrl:N,setImageUrl:w,croppedImageUrl:y,setCroppedImageUrl:k,setCroppedArea:A,canbePdf:!0,iconName:g?.iconName,iconColor:g?.iconColor,iconFinalSize:g?.iconSize,iconBgColor:g?.iconBgColor,iconVerticalAlign:g?.iconVerticalAlign,iconHorizontalAlign:g?.iconHorizontalAlign,pdfUrl:C,setPdfUrl:S,updateElement:I,removeImage:()=>j({...v.current,image:null,video:null,pdf:null,croppedArea:null,iconName:null})})]}):(0,n.jsx)("div",{className:"relative w-full h-full max-h-[800px] aspect-video",children:(0,n.jsx)("div",{className:"relative h-full",children:(0,n.jsxs)("div",{className:"bg-gray-200 h-full absolute w-full z-[1] over",style:{...g?.iconName&&g?.iconBgColor&&{background:g?.iconBgColor??""}},children:[!g?.iconName&&C&&""!==C?(0,n.jsx)(f.PdfViewer,{pdfUrl:C,thumbnailUrl:y,className:"!rounded-md",style:{objectFit:a??"cover"}}):!g?.iconName&&y?(0,n.jsx)(p.ImageViewer,{imageUrl:y,className:"!rounded-md",style:{objectFit:a??"cover"},priority:h}):null,g?.iconName&&(0,n.jsx)(x.IconRenderer,{name:g?.iconName,className:"text-[600px] w-full h-full flex items-center justify-center",color:g?.iconColor,style:{fontSize:g?.iconSize??"",justifyContent:g?.iconHorizontalAlign??"center",alignItems:g?.iconVerticalAlign??"center",height:"100%",width:"100%"}})]})})})};var g=i(51012),b=i(84616),v=i(51154),j=i(59434),N=i(11867),w=i(74749),y=i(25618),k=i(49345),C=i(80333),S=i(44632);let $={image:""},A=({data:e=null,lng:t="fr",edit:i=!1,save:l,cancel:d,visibility:u,updateBlockContent:m,priority:x=!1})=>{let p=g.n.use.navCommunity(),f=g.n.use.siteInfo(),[A,I]=(0,s.use
9State)((0,j.ZH)(t)),F=(0,s.useRef)((0,j.ZH)(t)),_=e=>{F.current=e,I(e)},E=(0,s.useRef)(null),[L,z]=(0,s.useState)(e?.content),B=(0,s.useRef)(null),T=e=>{B.current=e,z(e)},[P,R]=(0,s.useState)(e?.content?.list&&e?.content?.list.length>0?e?.content?.list:[$,$,$]),[M,D]=(0,s.useState)(!1),[O,U]=(0,s.useState)(!1),[V,q]=(0,s.useState)(null),{isMobile:H}=(0,w.default)(),Z=(0,s.useRef)(null),J=(0,N.A)(!0);function G(e,t){Q({newList:P.map((i,n)=>n===e?t:i)})}function W(e){let t=[...P];t.splice(e,1),Q({newList:t})}function Q({newTitle:e=null,newDescription:t=null,newList:i=null,newAutoPlay:n=null}){T({...B.current,...e&&{[`title${F.current}`]:e},...t&&{[`description${F.current}`]:t},...null!=i&&{list:i},...null!=n&&{autoPlay:n}})}return(0,s.useEffect)(()=>{T(e?.content)},[e]),(0,s.useEffect)(()=>{_((0,j.ZH)(t))},[t]),(0,s.useEffect)(()=>{let e=L?.list&&L?.list.length>0?L?.list:[$,$,$];R(e),O&&V&&V.scrollSnapList().length<e.length&&setTimeout(()=>{V&&(V.scrollTo(e.length-1),U(!1))},1e3)},[L,O]),(0,s.useEffect)(()=>{async function t(){let t=L.list??[],i=f?.config?.imagesLibrary??[],n=!1;for(let e=0;e<(L.list??[]).length;e++){let s=L.list[e];if(s.image&&s.image instanceof File){D(!0);let l=await (0,S.k)({community:p,file:s.image});t[e].image=l.data.data.fullMediaUrl,i.push(l.data.data.fullMediaUrl),n=!0}}D(!1),m(e?.uuid??"",{...L,list:t}),n&&J.mutate({siteId:f?.id??0,data:{config:{...f?.config,imagesLibrary:i}}})}l&&m&&t()},[l]),(0,s.useEffect)(()=>{d&&T(a()(e?.content))},[d]),(0,s.useEffect)(()=>{void 0!=u&&(L?.visibility??!0)!=u&&m&&m(e?.uuid??"",{...L,visibility:u})},[u]),i?(0,n.jsxs)("div",{className:"relative h-auto w-full flex flex-col",children:[(0,n.jsx)(y.H2,{className:"mb-[1.25rem] border-[1px] border-dark1 text-center",contentEditable:!0,ref:E,onBlur:function(){Q({newTitle:E.current.innerText})},children:L?.[`title${A}`]??"D\xe9crivez nos offres"}),(0,n.jsx)(k.A,{disable:!1,value:L?.[`description${A}`]??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",onChange:function(e){Q({newDescription:e})},className:"w-3/5"}),(0,n.jsxs)("div",{className:"relative mt-3",children:[(0,n.jsx)("div",{className:"absolute -top-1 right-5 z-[20]",children:(0,n.jsxs)(c.$,{variant:"outline",className:"h-9 cursor-pointer flex justify-center items-center",onClick:function(){let e=[...P];e.push($),Q({newList:e}),U(!0)},disabled:O,children:[(0,n.jsx)(b.A,{className:"size-5"})," Nouvelle diapositive"]})}),(0,n.jsxs)("div",{className:"absolute bottom-0 right-0 z-[20] bg-white flex items-center gap-2.5 p-5 rounded-br-xl rounded-tl-xl",children:[(0,n.jsx)(C.d,{checked:L?.autoPlay||L?.autoPlay==void 0,onCheckedChange:e=>{Q({newAutoPlay:e.valueOf()})}}),(0,n.jsx)("span",{className:"text-sm text-slate-900 font-medium",children:"Slider automatique"})]}),(0,n.jsxs)(o.FN,{setApi:q,opts:{loop:!0},className:"relative w-full max-w-full h-auto mt-10",children:[(0,n.jsx)(o.Wk,{children:P.map((e,t)=>(0,n.jsx)(o.A7,{children:(0,n.jsx)(h,{data:e,cardPosition:t,edit:i,updateElementList:G,deleteSlide:P.length>0?W:void 0},`slide-${t}`)},t))}),(0,n.jsx)(o.Q8,{className:"left-5"}),(0,n.jsx)(o.Oj,{className:"right-5"})]})]}),M&&(0,n.jsx)("div",{className:"z-10 absolute w-full h-full bg-[#00000088] top-[50%] left-[50%] flex flex-col gap-2 justify-center items-center text-white -translate-x-[50%] -translate-y-[50%] cursor-pointer",children:(0,n.jsx)(v.A,{className:"h-[100px] w-[100px] animate-spin text-white"})})]}):H?(0,n.jsxs)("div",{ref:Z,className:(0,j.cn)("relative h-auto w-full flex flex-col",!(L?.visibility==void 0||L?.visibility)&&"opacity-50"),style:{...L?.fontColor?{"--dark-1":L?.fontColor,"--dark-3":`${L?.fontColor}99`}:{}},children:[(L?.[`title${A}`]==void 0||""!=(L?.[`title${A}`]??"").trim())&&(0,n.jsx)(y.H2,{className:"mb-[1.25rem]",children:L?.[`title${A}`]??L?.titleFr??"D\xe9crivez nos offres"}),(L?.[`description${A}`]==void 0||L?.[`description${A}`]!=""&&L?.[`description${A}`]!="\n"&&L?.[`description${A}`]!="<p><br></p>")&&(0,n.jsx)("div",{className:"sun-editor-editable !p-0 text-dark1 !bg-transparent !text-base !text-center w-3/5",dangerouslySetInnerHTML:{__html:L?.[`description${A}`]??L?.descriptionFr??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book."}}),(0,n.jsxs)(o.FN,{opts:{loop:!0},plugins:L?.autoPlay||L?.autoPlay==void 0?[(0,r.A)({delay:6e3})]:[],className:(0,j.cn)("w-full max-w-full [&>div]:h-full mt-10"),children:[(0,n.jsx)(o.Wk,{className:"h-full",children:P.map((e,t)=>(0,n.jsx)(o.A7,{className:"h-full",children:(0,n.jsx)(h,{data:e,cardPosition:t,isMobile:H,imageObjectType:L?.imageObject,priority:0===t&&x},`slide-${t}`)},t))}),(0,n.jsx)(o.Q8,{className:"left-5"}),(0,n.jsx)(o.Oj,{className:"right-5"})]})]}):(0,n.jsxs)("div",{ref:Z,className:(0,j.cn)("relative h-auto w-full flex flex-col items-center",!(L?.visibility==void 0||L?.visibility)&&"opacity-50"),style:{...L?.fontColor?{"--dark-1":L?.fontColor,"--dark-3":`${L?.fontColor}99`}:{}},children:[(0,n.jsxs)("div",{className:"w-full flex flex-col items-center mb-0 has-[div]:!mb-10 has-[h2]:!mb-10",children:[(L?.[`title${A}`]==void 0||""!=(L?.[`title${A}`]??"").trim())&&(0,n.jsx)(y.H2,{className:"mb-[1.25rem]",children:L?.[`title${A}`]??L?.titleFr??"D\xe9crivez nos offres"}),(L?.[`description${A}`]==void 0||L?.[`description${A}`]!=""&&L?.[`description${A}`]!="\n"&&L?.[`description${A}`]!="<p><br></p>")&&(0,n.jsx)("div",{className:"sun-editor-editable !p-0 text-dark1 !bg-transparent !text-base !text-center w-3/5",dangerouslySetInnerHTML:{__html:L?.[`description${A}`]??L?.descriptionFr??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book."}})]}),(0,n.jsxs)(o.FN,{opts:{loop:!0},plugins:L?.autoPlay||L?.autoPlay==void 0?[(0,r.A)({delay:6e3})]:[],className:(0,j.cn)("w-full max-w-full [&>div]:h-full"),children:[(0,n.jsx)(o.Wk,{className:"h-full",children:P.map((e,t)=>(0,n.jsx)(o.A7,{className:"h-full",children:(0,n.jsx)(h,{data:e,cardPosition:t,imageObjectType:L?.imageObject,priority:0===t&&x},`slide-${t}`)},t))}),(0,n.jsx)(o.Q8,{className:"left-5"}),(0,n.jsx)(o.Oj,{className:"right-5"})]})]})}},46102:(e,t,i)=>{"use strict";i.d(t,{Bc:()=>a,ZI:()=>c,k$:()=>o,m_:()=>r});var n=i(95155);i(12115);var s=i(89613),l=i(59434);function a({delayDuration:e=0,...t}){return(0,n.jsx)(s.Kq,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function r({...e}){return(0,n.jsx)(a,{children:(0,n.jsx)(s.bL,{"data-slot":"tooltip",...e})})}function o({...e}){return(0,n.jsx)(s.l9,{"data-slot":"tooltip-trigger",...e})}function c({className:e,sideOffset:t=0,children:i,...a}){return(0,n.jsx)(s.ZL,{children:(0,n.jsxs)(s.UC,{"data-slot":"tooltip-content",sideOffset:t,className:(0,l.cn)("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
9de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...a,children:[i,(0,n.jsx)(s.i3,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}},46981:(e,t,i)=>{"use strict";i.d(t,{default:()=>r});var n=i(95155),s=i(12115),l=i(59434),a=i(22912);function r({menuStructure:e,lang:t}){let{goToBlock:i,isActive:r}=(0,a.A)({menuStructure:e,lang:t,scrollOnMount:!0});return(0,n.jsx)(n.Fragment,{children:e.map((e,a)=>(0,n.jsx)(s.Fragment,{children:e.hide?null:(0,n.jsx)("li",{onClick:()=>i(e.blockId),"aria-current":r(e.blockId)?"true":void 0,className:(0,l.cn)("flex items-center !text-dark1 font-semibold text-sm cursor-pointer",r(e.blockId)&&"!text-[#18a0fb] font-semibold"),children:(e?.[`label${(0,l.ZH)(t)}`]).toUpperCase()})},a))})}},47203:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>L});var n=i(95155),s=i(12115),l=i(46120),a=i.n(l),r=i(85805),o=i(91091),c=i(49345),d=i(30285),u=i(62523),m=i(85057),x=i(59434),p=i(62525),f=i(84616),h=i(28095),g=i(3055),b=i(47368),v=i(36136),j=i(78055),N=i(37936);let w=({cardPosition:e,data:t=null,lng:i="fr",edit:l=!1,isMobile:a=!1,imageObjectType:r,updateElementList:o,deleteSlide:w,priority:y=!1})=>{let[k,C]=(0,s.useState)((0,x.ZH)(i)),S=(0,s.useRef)((0,x.ZH)(i)),$=e=>{S.current=e,C(e)}
9,[A,I]=(0,s.useState)(t),F=(0,s.useRef)(null),_=e=>{F.current=e,I(e)},E=(0,s.useRef)(null),[L,z]=(0,s.useState)(),[B,T]=(0,s.useState)(),[P,R]=(0,s.useState)();function M({newTitle:t=null,newDescription:i=null,newImage:n=null,newCroppedArea:s=null,newActions:l=null,newIconName:a=null,newIconColor:r=null,newIconSize:c=null,newIconBgColor:d=null,newIconVerticalAlign:u=null,newIconHorizontalAlign:m=null}){let x={...F.current,...t&&{[`title${S.current}`]:t},...i&&{[`description${S.current}`]:i},...n&&{image:n,croppedArea:null,iconName:null},...s&&{croppedArea:s},...l&&{actions:l},...a&&{image:null,croppedArea:null,iconName:a},...r&&{iconColor:r},...c&&{iconSize:c},...d&&{iconBgColor:d},...u&&{iconVerticalAlign:u},...m&&{iconHorizontalAlign:m}};o&&void 0!=e&&o(e,x)}function D(){let e=A?.actions??[];e.push({}),M({newActions:e})}(0,s.useEffect)(()=>{A?.croppedArea&&(P?.x!==A?.croppedArea?.x||P?.y!==A?.croppedArea?.y)&&R(A?.croppedArea),A?.image===L||A?.image instanceof File||z(A?.image),A?.croppedArea||A?.image===B||T(A?.image)},[A]),(0,s.useEffect)(()=>{t&&_(t)},[t]),(0,s.useEffect)(()=>{$((0,x.ZH)(i))},[i]),(0,s.useEffect)(()=>{E.current&&(E.current.innerText=A?.[`title${k}`]??`Le Lorem Ipsum est simplement du faux texte ${(e??0)+1}`)},[i,A]),(0,s.useEffect)(()=>{P&&L&&(0,h.Ay)(L,P,0).then(e=>{e&&(M({newCroppedArea:P}),T(URL.createObjectURL(e)))})},[P]);let O=e=>e?.[`buttonText${k}`]??e?.buttonTextFr,U=e=>e?.[`link${k}`]??e?.linkFr;function V(e,{newLink:t=null,newButtonText:i=null}){M({newActions:(A?.actions??[]).map((n,s)=>s==e?{...n,...null!=t&&{[`link${S.current}`]:t},...null!=i&&{[`buttonText${S.current}`]:i}}:n)})}return l?(0,n.jsxs)("div",{className:"relative w-full max-h-[600px] aspect-video",children:[(0,n.jsx)("div",{className:"absolute top-0 left-0 z-[30] bg-white px-5 py-2.5 border-r-[3px] border-b-[3px] border-slate-900 rounded-br-lg",children:(0,n.jsx)("span",{className:"text-3xl text-slate-900 font-extrabold",children:(e??0)+1})}),w&&void 0!=e&&(0,n.jsx)("div",{className:"absolute top-1 left-1/2 translate-x-2 z-[30]",children:(0,n.jsxs)(d.$,{variant:"destructive",className:"text-white h-9 flex justify-center items-center",onClick:()=>w(e),children:[(0,n.jsx)(p.A,{className:"size-5"}),"Supprimer le slide"]})}),(0,n.jsx)(g.A,{labelClassname:"block relative h-full [&>div>div>div[data-action='image-delete']]:right-[calc(50%_-_2.5rem)] [&>div>div>div[data-action='image-crop']]:right-[calc(50%_+_0.5rem)] [&>div>div>div[data-action='image-crop']]:top-4 [&>div>div>div[data-action='image-delete']]:top-4 [&>div>div>div[data-action='icons-picker']]:bottom-4 [&>div>div>div[data-action='icons-picker']]:left-4 [&>div>div>div[data-action='icons-color-picker']]:bottom-4 [&>div>div>div[data-action='icons-color-picker']]:left-16",iconClassname:"text-[600px] flex items-center justify-center",imageUrl:L,setImageUrl:z,croppedImageUrl:B,setCroppedImageUrl:T,setCroppedArea:R,iconName:A?.iconName,iconColor:A?.iconColor,iconFinalSize:A?.iconSize,iconBgColor:A?.iconBgColor,iconVerticalAlign:A?.iconVerticalAlign,iconHorizontalAlign:A?.iconHorizontalAlign,noIconPicker:!0,updateElement:M,removeImage:()=>_({...F.current,image:null,video:null,croppedArea:null,iconName:null})}),(0,n.jsxs)("div",{className:"absolute left-[50%] top-[50%] flex flex-col items-center justify-center bg-[#00000055] -translate-x-[50%] -translate-y-[50%] z-10 p-5 w-4/5 min-h-3/4",children:[(0,n.jsx)("h3",{className:"text-5xl text-white font-bold leading-[120%] mb-4 text-center min-w-[200px] w-[100%] max-w-[600px] border-[1px] border-white",contentEditable:"plaintext-only",ref:E,onBlur:function(){let t=E.current.innerText;t!==(A?.[`title${k}`]??`Le Lorem Ipsum est simplement du faux texte ${(e??0)+1}`)&&M({newTitle:t})},children:A?.[`title${k}`]??`Le Lorem Ipsum est simplement du faux texte ${(e??0)+1}`}),(0,n.jsx)(c.A,{disable:!1,value:A?.[`description${k}`]??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. <br/><br/> It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.",onChange:function(e){e!==(F.current?.[`description${S.current}`]??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla.")&&M({newDescription:e})}}),0==(A?.actions??[]).length&&(0,n.jsxs)(d.$,{variant:"outline",className:"!px-2 h-auto cursor-pointer flex justify-start items-center mt-4",onClick:D,children:[(0,n.jsx)(f.A,{size:30}),(0,n.jsx)("span",{className:"text-sm font-medium text-slate-900",children:"Ajouter un bouton"})]}),(A?.actions??[]).length>0&&(0,n.jsx)("div",{className:"flex flex-col gap-4 items-center mt-4 w-full",children:(A?.actions??[]).map((e,t)=>(0,n.jsxs)("div",{className:"flex items-end gap-2 w-full",children:[(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)(m.J,{className:"text-white",children:"Texte du bouton"}),(0,n.jsx)(u.p,{value:e?.[`buttonText${k}`],className:"bg-white mt-2.5",onChange:e=>V(t,{newButtonText:e.target.value})})]}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)(m.J,{className:"text-white",children:"Lien du bouton"}),(0,n.jsx)(u.p,{value:e?.[`link${k}`],className:"bg-white mt-2.5",onChange:e=>V(t,{newLink:e.target.value})})]}),(0,n.jsx)("div",{className:"text-white text-sm h-9 flex items-center",children:" - OU - "}),(0,n.jsxs)("div",{className:"flex-1 flex flex-col gap-2.5",children:[(0,n.jsx)(m.J,{className:"text-white",children:"S\xe9lectionner l'url \xe0 partir d'une page"}),(0,n.jsx)(j.B,{link:e?.[`link${k}`],pageId:void 0,setLink:e=>V(t,{newLink:e}),selectorClassname:"bg-white"})]}),(0,n.jsx)(d.$,{variant:"outline",className:"h-9 w-9 text-red-500 flex justify-center items-center",onClick:()=>(function(e){let t=A?.actions??[];t.splice(e,1),M({newActions:t})})(t),children:(0,n.jsx)(p.A,{size:30})}),(A?.actions??[]).length<2&&(0,n.jsx)(d.$,{variant:"outline",className:"h-9 w-9 flex justify-center items-center",onClick:D,children:(0,n.jsx)(f.A,{size:30})})]},t))})]})]}):a?(0,n.jsxs)("div",{className:"relative w-full h-full max-h-[1200px] aspect-video",children:[(0,n.jsx)("div",{className:"relative h-full",children:(0,n.jsxs)("div",{className:"bg-gray-200 h-full absolute w-full z-[1] over",style:{...A?.iconName&&A?.iconBgColor&&{background:A?.iconBgColor??""}},children:[!A?.iconName&&B&&(0,n.jsx)(v.ImageViewer,{imageUrl:B,className:"!rounded-none",style:{objectFit:r??"cover"},priority:y,quality:y?70:void 0}),A?.iconName&&(0,n.jsx)(b.IconRenderer,{name:A?.iconName,className:"text-[calc((100vw_-_40px)_*_9/16)] w-full h-full flex items-center justify-center",color:A?.iconColor,style:{fontSize:A?.iconSize??"",justifyContent:A?.iconHorizontalAlign??"center",alignItems:A?.iconVerticalAlign??"center",height:"100%",width:"100%"}})]})}),(0,n.jsx)("div",{className:"absolute w-full h-full flex flex-col items-center justify-end bottom-0 z-10 p-5 pb-[9.5rem] bg-[#00000055]",children:(0,n.jsxs)("div",{className:"absolute flex flex-col items-center justify-center top-[35%] left-1/2 -translate-x-1/2 w-full",children:[(0,n.jsx)("h3",{className:"text-2xl text-white font-bold leading-[120%] mb-3 text-center min-w-[200px] w-[75%] max-w-[600px] shrink-0",onMouseDown:e=>{e.stopPropagation()},children:A?.[`title${k}`]??`Le Lorem Ipsum est simplement du faux texte ${(e??0)+1}`}),(0,n.jsx)("div",{className:"!bg-transparent leading-[120%] !text-white !text-center !text-base font-medium min-w-[200px] w-[70%] max-w-[1000px] line-clamp-4 overflow-hidden",dangerouslySetInnerHTML:{__html:A?.[`description${k}`]??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. <br/><br/> It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged."},onMouseDown:e=>{e.stopPropagation()}}),(A?.actions??[]).length>0&&(0,n.jsxs)("div",{className:"flex flex-col gap-2.5 w-[calc(100%_-_80px)] mt-5 shrink-0",children:[(O((A?.actions??[])[0])??"")!=""&&(U((A?.actions??[])[0])??"")!=""&&(0,n.jsx)(N.CustomLink,{url:U((A?.actions??[])[0]),className:"w-full rounded-md shadow-md font-semibold inline-flex items-center text-dark1 justify-center px-12 py-2.5 text-base bg-button-2",children:O((A?.actions??[])[0])}),(A?.actions??[]).length>1&&(O((A?.actions??[])[1])??"")!=""&&(U((A?.actions??[])[1])??"")!=""&&(0,n.jsx)(N.CustomLink,{url:U((A?.actions??[])[1]),className:"w-full rounded-md shadow-md font-semibold inline-flex items-center justify-center px-12 py-2.5 text-base bg-button-1 text-white",children:O((A?.actions??[])[1])})]})]})})]}):(0,n.jsxs)("div",{className:"relative w-full h-full max-h-[1200px] aspect-video",children:[(0,n.jsx)("div",{className:"relative h-full",children:(0,n.jsxs)("div",{className:"bg-gray-200 h-full absolute w-full z-[1] over",style:{...A?.iconName&&A?.iconBgColor&&{background:A?.iconBgColor??""}},children:[!A?.iconName&&B&&(0,n.jsx)(v.ImageViewer,{imageUrl:B,className:"!rounded-none",style:{objectFit:r??"cover"},enableTheMaximizer:!1,priority:y,quality:y?70:void 0}),A?.iconName&&(0,n.jsx)(b.IconRenderer,{name:A?.iconName,className:"text-[600px] w-full h-full flex items-center justify-center",color:A?.iconColor,style:{fontSize:A?.iconSize??"",justifyContent:A?.iconHorizontalAlign??"center",alignItems:A?.iconVerticalAlign??"center",height:"100%",width:"100%"}})]})}),(0,n.jsx)("div",{className:"absolute w-full h-full flex flex-col items-center justify-center bottom-0 z-10 p-5 bg-[#00000055]",children:(0,n.jsxs)("div",{className:"absolute flex flex-col items-center justify-center top-1/3 left-1/2 -translate-x-1/2 w-full",children:[(0,n.jsx)("h3",{className:"text-5xl text-white font-bold leading-[120%] mb-5 text-center min-w-[200px] w-[50%] max-w-[600px]",onMouseDown:e=>{e.stopPropagation()},children:A?.[`title${k}`]??`Le Lorem Ipsum est simplement du faux texte ${(e??0)+1}`}),(0,n.jsx)("div",{className:"!bg-transparent mb-5 leading-[120%] !text-white !text-center !text-xl font-medium min-w-[200px] w-[70%] max-w-[1000px]",dangerouslySetInnerHTML:{__html:A?.[`description${k}`]??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. <br/><br/> It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged."},onMouseDown:e=>{e.stopPropagation()}}),(A?.actions??[]).length>0&&(0,n.jsxs)(n.Fragment,{children:[(O((A?.actions??[])[0])??"")!=""&&(U((A?.actions??[])[0])??"")!=""&&(0,n.jsx)(N.CustomLink,{url:U((A?.actions??[])[0]),className:(0,x.cn)("absolute top-full right-1/2 -translate-x-2 mt-5 rounded-md shadow-md font-semibold inline-flex items-center text-dark1 justify-center px-12 py-2.5 text-base bg-button-2",1==(A?.actions??[]).length&&"translate-x-1/2"),children:O((A?.actions??[])[0])}),(A?.actions??[]).length>1&&(O((A?.actions??[])[1])??"")!=""&&(U((A?.actions??[])[1])??"")!=""&&(0,n.jsx)(N.CustomLink,{url:U((A?.actions??[])[1]),className:(0,x.cn)("absolute top-full left-1/2 translate-x-2 mt-5 rounded-md shadow-md font-semibold inline-flex items-center justify-center px-12 py-2.5 text-base bg-button-1 text-white"),children:O((A?.actions??[])[1])})]})]})})]})};var y=i(51012),k=i(51154),C=i(87775),S=i(66766),$=i(47262),A=i(35918),I=i(11867),F=i(74749),_=i(44632);let E={titleFr:"Le Lorem Ipsum est simplement du faux texte",titleEn:"Le Lorem Ipsum est simplement du faux texte",titleNl:"Le Lorem Ipsum est simplement du faux texte",descriptionFr:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla.",descriptionEn:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla.",descriptionNl:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla.",image:""},L=({data:e=null,lng:t="fr",edit:i=!1,save:l,cancel:c,visibility:u,updateBlockContent:m})=>{y.n.use.getToken()();let p=y.n.use.navCommunity(),h=y.n.use.siteInfo(),g=y.n.use.user(),[b,v]=(0,s.use
9State)(e?.content),[j,N]=(0,s.useState)(e?.content?.list&&e?.content?.list.length>0?e?.content?.list:[E,E,E]),L=(0,s.useRef)(j),[z,B]=(0,s.useState)(!1),[T,P]=(0,s.useState)(!1),[R,M]=(0,s.useState)(null),[D,O]=(0,s.useState)(null),{isMobile:U}=(0,F.default)(),V=(0,s.useRef)(null),q=(0,I.A)(!0);function H(e,t){let i=L.current.map((i,n)=>n===e?t:i);v(e=>({...e,list:i}))}function Z(e){let t=[...j];t.splice(e,1),v({...b,list:t})}function J(){if(V.current){let e=V.current.parentElement?.nextSibling;e&&e.scrollIntoView({behavior:"smooth"})}}return(0,s.useEffect)(()=>{(0,A.T)(t).then(e=>O(e))},[t]),(0,s.useEffect)(()=>{v(e?.content)},[e]),(0,s.useEffect)(()=>{let e=b?.list&&b?.list.length>0?b?.list:[E,E,E];N(e),L.current=e,T&&R&&R.scrollSnapList().length<e.length&&setTimeout(()=>{R&&(R.scrollTo(e.length-1),P(!1))},1e3)},[b,T]),(0,s.useEffect)(()=>{async function t(){let t=b.list??[],i=h?.config?.imagesLibrary??[],n=!1;for(let e=0;e<(b.list??[]).length;e++){let s=b.list[e];if(s.image&&s.image instanceof File){B(!0);let l=await (0,_.k)({community:p,file:s.image});t[e].image=l.data.data.fullMediaUrl,i.push(l.data.data.fullMediaUrl),n=!0}}B(!1),m(e?.uuid??"",{...b,list:t}),n&&q.mutate({siteId:h?.id??0,data:{config:{...h?.config,imagesLibrary:i}}})}l&&m&&t()},[l]),(0,s.useEffect)(()=>{c&&v(a()(e?.content))},[c]),(0,s.useEffect)(()=>{void 0!=u&&(b?.visibility??!0)!=u&&m&&m(e?.uuid??"",{...b,visibility:u})},[u]),i?(0,n.jsxs)("div",{className:"relative h-auto w-full flex flex-col gap-[1.875em]",children:[(0,n.jsx)("div",{className:"absolute top-1 right-1/2 -translate-x-2 z-[20]",children:(0,n.jsxs)(d.$,{variant:"outline",className:"h-9 cursor-pointer flex justify-center items-center",onClick:function(){let e=[...j];e.push(E),v({...b,list:e}),P(!0)},disabled:T,children:[(0,n.jsx)(f.A,{className:"size-5"}),"Nouveau slide"]})}),(0,n.jsxs)(o.FN,{setApi:M,opts:{loop:!0},className:"relative w-full max-w-full h-auto",children:[(0,n.jsx)(o.Wk,{children:j.map((e,s)=>(0,n.jsx)(o.A7,{children:(0,n.jsx)(w,{data:e,lng:t,cardPosition:s,edit:i,updateElementList:H,deleteSlide:j.length>0?Z:void 0},`slide-${s}`)},s))}),(0,n.jsx)(o.Q8,{className:"left-5"}),(0,n.jsx)(o.Oj,{className:"right-5"})]}),(0,n.jsxs)("div",{className:"absolute -right-5 -bottom-5 flex gap-2.5 items-center p-3 rounded-sm bg-slate-600",children:[(0,n.jsx)($.S,{id:"showOrder",checked:b?.showOrdreBanner==void 0||b?.showOrdreBanner,onCheckedChange:e=>v({...b,showOrdreBanner:!!e.valueOf()})}),(0,n.jsx)("label",{className:"text-sm text-white font-medium",htmlFor:"showOrder",children:"Afficher le banner de l'ordre"})]}),z&&(0,n.jsx)("div",{className:"z-10 absolute w-full h-full bg-[#00000088] top-[50%] left-[50%] flex flex-col gap-2 justify-center items-center text-white -translate-x-[50%] -translate-y-[50%] cursor-pointer",children:(0,n.jsx)(k.A,{className:"h-[100px] w-[100px] animate-spin text-white"})})]}):U?(0,n.jsxs)("div",{ref:V,className:(0,x.cn)("relative h-auto w-full flex flex-col gap-[1.875em]",!(b?.visibility==void 0||b?.visibility)&&"opacity-50"),style:{...b?.fontColor?{"--dark-1":b?.fontColor,"--dark-3":`${b?.fontColor}99`}:{}},children:[(0,n.jsxs)(o.FN,{opts:{loop:!0},plugins:[(0,r.A)({delay:1e4})],className:(0,x.cn)("w-full max-w-full max-h-[1000px] h-[100vh] [&>div]:h-full"),children:[(0,n.jsx)(o.Wk,{className:"h-full",children:j.map((e,i)=>(0,n.jsx)(o.A7,{className:"h-full",children:(0,n.jsx)(w,{data:e,lng:t,cardPosition:i,isMobile:U,imageObjectType:b?.imageObject,priority:0===i},`slide-${i}`)},i))}),(0,n.jsx)(o.Q8,{className:"left-5"}),(0,n.jsx)(o.Oj,{className:"right-5"})]}),(b?.showOrdreBanner==void 0||b?.showOrdreBanner)&&(0,n.jsxs)("div",{className:"absolute right-5 bottom-24 flex gap-4 p-3 rounded-lg bg-white items-center",children:[(0,n.jsxs)("div",{className:"flex flex-col items-end w-[13rem]",children:[(0,n.jsx)("span",{className:"text-sm font-semibold text-[#0080c9] uppercase",children:D?.member_of??"MEMBRE DE :"}),(0,n.jsx)("span",{className:"text-xs font-medium text-[#29394D] text-end",children:D?.oeccbb_order_name??"Ordre des Experts Comptables et Comptables Brevet\xe9s de Belgique"})]}),(0,n.jsx)(S.default,{src:"/images/oeccbb.png",alt:"",className:"w-12 h-12",width:48,height:48})]}),(0,n.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 bottom-8 text-white",children:(0,n.jsx)(C.A,{size:50,className:"cursor-pointer",onClick:J})})]}):(0,n.jsxs)("div",{ref:V,className:(0,x.cn)("relative h-auto w-full flex flex-col gap-[1.875em]",!(b?.visibility==void 0||b?.visibility)&&"opacity-50"),style:{...b?.fontColor?{"--dark-1":b?.fontColor,"--dark-3":`${b?.fontColor}99`}:{}},children:[(0,n.jsxs)(o.FN,{opts:{loop:!0},plugins:[(0,r.A)({delay:1e4})],className:(0,x.cn)("w-full max-w-full max-h-[1000px] h-[calc(100vh_-_64px)] [&>div]:h-full",h?.config?.showHeader&&(h?.config?.email||h?.config?.phone||h?.config?.phone||h?.config?.showYoutube||h?.config?.showFacebook||h?.config?.showLinkedIn||h?.config?.showLoginButton!==void 0&&h?.config?.showLoginButton||g)&&"h-[calc(100vh_-_64px_-_40px)]"),children:[(0,n.jsx)(o.Wk,{className:"h-full",children:j.map((e,i)=>(0,n.jsx)(o.A7,{className:"h-full",children:(0,n.jsx)(w,{data:e,lng:t,cardPosition:i,imageObjectType:b?.imageObject,priority:0===i},`slide-${i}`)},i))}),(0,n.jsx)(o.Q8,{className:"left-5"}),(0,n.jsx)(o.Oj,{className:"right-5"})]}),(b?.showOrdreBanner==void 0||b?.showOrdreBanner)&&(0,n.jsxs)("div",{className:"absolute right-5 bottom-5 flex gap-4 p-3 rounded-lg bg-white items-center",children:[(0,n.jsxs)("div",{className:"flex flex-col items-end w-[13rem]",children:[(0,n.jsx)("span",{className:"text-sm font-semibold text-[#0080c9] uppercase",children:D?.member_of??"MEMBRE DE :"}),(0,n.jsx)("span",{className:"text-xs font-medium text-[#29394D] text-end",children:D?.oeccbb_order_name??"Ordre des Experts Comptables et Comptables Brevet\xe9s de Belgique"})]}),(0,n.jsx)(S.default,{src:"/images/oeccbb.png",alt:"",className:"w-12 h-12",width:48,height:48})]}),(0,n.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 bottom-5 text-white",children:(0,n.jsx)(C.A,{size:50,className:"cursor-pointer",onClick:J})})]})}},47262:(e,t,i)=>{"use strict";i.d(t,{S:()=>r});var n=i(95155);i(12115);var s=i(76981),l=i(5196),a=i(59434);function r({className:e,...t}){return(0,n.jsx)(s.bL,{"data-slot":"checkbox",className:(0,a.cn)("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:(0,n.jsx)(s.C1,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:(0,n.jsx)(l.A,{className:"size-3.5"})})})}},47368:(e,t,i)=>{"use strict";i.r(t),i.d(t,{IconPicker:()=>m,IconRenderer:()=>x});
9var n=i(95155),s=i(12115),l=i(84616),a=i(59434),r=i(62523),o=i(30285),c=i(54165),d=i(34477);let u=(0,d.createServerReference)("7fbc6e45765ab63a5e0141534630a3c6bd6d13a76a",d.callServer,void 0,d.findSourceMapURL,"getWebtoolsIconsCachedAction"),m=s.forwardRef(({preselectedIcon:e,customButton:t,onSelect:i},d)=>{let[m,p]=(0,s.useState)(""),[f,h]=(0,s.useState)([]);(0,s.useEffect)(()=>{u().then(h)},[]);let g=(0,s.useMemo)(()=>f.filter(({label:e})=>e.toLowerCase().includes(m.toLowerCase())),[m,f]);return(0,n.jsxs)(c.lG,{children:[(0,n.jsx)(c.zM,{onClick:e=>{if(e.target!==e.currentTarget)return void e.stopPropagation()},asChild:!0,children:(0,n.jsxs)(o.$,{type:"button",variant:"outline",className:(0,a.cn)("bg-white cursor-pointer w-10 h-10 rounded-md flex justify-center items-center hover:bg-accent",(e||t)&&"border-dashed border-slate-900 !p-0",!e&&!t&&"!w-9 !h-9 rounded-full absolute bottom-4 left-2 z-[5]"),children:[e&&(0,n.jsx)(x,{name:e,className:"text-4xl w-full h-full flex items-center justify-center"}),!e&&t&&(0,n.jsx)(l.A,{}),!e&&!t&&(0,n.jsx)("span",{className:"text-slate-900 text-[11px]",children:"Ic\xf4ne"})]})}),(0,n.jsx)(c.Cf,{className:"sm:max-w-[768px] md:max-w-[1000px] pt-10 overflow-auto max-h-[640px]","aria-describedby":"icon-picker",children:(0,n.jsxs)("div",{className:"flex flex-col gap-5",ref:d,children:[(0,n.jsx)(r.p,{type:"text",placeholder:`Rechercher ${(f??[]).length} icons...`,value:m,onChange:e=>p(e.target.value)}),(0,n.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(54px, 1fr))",gap:"10px"},children:(g??[]).map(e=>(0,n.jsx)(c.HM,{asChild:!0,children:(0,n.jsxs)(o.$,{onClick:()=>i(e.label),title:e.label,className:"w-auto h-auto border border-slate-300 flex flex-col gap-2 !p-2 hover:bg-slate-200",variant:"ghost",children:[(0,n.jsx)("div",{className:(0,a.cn)(`icon webtool-${e.label}`,"text-4xl text-slate-500")}),(0,n.jsx)("span",{title:e.label,className:"text-xs font-semibold text-slate-700 text-ellipsis overflow-hidden w-full",children:e.label})]})},e.label))})]})})]})}),x=s.forwardRef(({name:e,className:t,color:i,style:s},l)=>(0,n.jsx)("div",{ref:l,className:(0,a.cn)(`icon webtool-${e}`,t),style:{...s??{},color:`${i??"#000000"}`}}))},49345:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});let n=(0,i(55028).default)(()=>Promise.all([i.e(3842),i.e(5466),i.e(5423)]).then(i.bind(i,69305)),{loadableGenerated:{webpack:()=>[69305]},ssr:!1})},53189:(e,t,i)=>{"use strict";i.d(t,{A:()=>B});var n=i(95155),s=i(12115),l=i(62177),a=i(66766),r=i(35562),o=i(30285),c=i(18950),d=i(80333),u=i(66424),m=i(14436),x=i(63560),p=i(17759),f=i(62523),h=i(85057),g=i(51012),b=i(11867),v=i(16225),j=i(59434),N=i(44632),w=i(73096),y=i(17313),k=i(88539),C=i(59959),S=i(84616),$=i(74126),A=i(47262);let I=({site:e,setIsOpen:t})=>{let[i,a]=(0,s.useState)(!1),r=(0,l.mN)({resolver:(0,x.u)(m.C0),defaultValues:{siteBgColor:e?.config?.siteBgColor??"#f1f5f9",headerBgColor:e?.config?.headerBgColor??"#f1f5f9",navbarAndFooterBgColor:e?.config?.navbarAndFooterBgColor??"#fff",blockBgColors:e?.config?.blockBgColors??["#ffffff00",...v.u0].reduce((e,t,i)=>[...e,{color:t,isDefault:1==i}],[]),blockBoxColors:e?.config?.blockBoxColors??v.u0.reduce((e,t,i)=>[...e,{color:t,isDefault:1==i}],[]),blockPadding:e?.config?.blockPadding??68,textDefaultColor:e?.config?.textDefaultColor??"#29394D",textSecondaryColor:e?.config?.textSecondaryColor??"#6d7f92",buttonPrimaryColor:e?.config?.buttonPrimaryColor??"#0f172a",buttonSecondaryColor:e?.config?.buttonSecondaryColor??"#fff"}}),d=(0,b.A)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"m-4",children:(0,n.jsx)(p.lV,{...r,children:(0,n.jsxs)("form",{className:"space-y-4",children:[(0,n.jsx)(p.zB,{control:r.control,name:"siteBgColor",render:({field:e})=>(0,n.jsxs)(p.eI,{className:"flex items-center justify-between",children:[(0,n.jsx)(p.lR,{className:"text-sm font-semibold",children:"Couleur de l'arri\xe8re-plan du site"}),(0,n.jsx)(p.MJ,{children:(0,n.jsx)(C.s,{onChange:e=>r.setValue("siteBgColor",e),className:(0,j.cn)("relative rounded-md border-[2px] border-slate-900 w-16 h-8 !mt-0"),"aria-describedby":"
9color-picker",value:e.value})})]})}),(0,n.jsx)("div",{className:"w-full h-px bg-slate-400"}),(0,n.jsx)(p.zB,{control:r.control,name:"headerBgColor",render:({field:e})=>(0,n.jsxs)(p.eI,{className:"flex items-center justify-between",children:[(0,n.jsx)(p.lR,{className:"text-sm font-semibold",children:"Couleur de l'en-t\xeate"}),(0,n.jsx)(p.MJ,{children:(0,n.jsx)(C.s,{onChange:e=>r.setValue("headerBgColor",e),className:(0,j.cn)("relative rounded-md border-[2px] border-slate-900 w-16 h-8 !mt-0"),"aria-describedby":"color-picker",value:e.value})})]})}),(0,n.jsx)("div",{className:"w-full h-px bg-slate-400"}),(0,n.jsx)(p.zB,{control:r.control,name:"navbarAndFooterBgColor",render:({field:e})=>(0,n.jsxs)(p.eI,{className:"flex items-center justify-between",children:[(0,n.jsx)(p.lR,{className:"text-sm font-semibold",children:"Couleur de menu et de footer"}),(0,n.jsx)(p.MJ,{children:(0,n.jsx)(C.s,{onChange:e=>r.setValue("navbarAndFooterBgColor",e),className:(0,j.cn)("relative rounded-md border-[2px] border-slate-900 w-16 h-8 !mt-0"),"aria-describedby":"color-picker",value:e.value})})]})}),(0,n.jsx)("div",{className:"w-full h-px bg-slate-400"}),(0,n.jsx)(p.zB,{control:r.control,name:"blockBoxColors",render:({field:e})=>(0,n.jsxs)(p.eI,{className:"flex flex-col gap-4",children:[(0,n.jsx)(p.lR,{className:"text-sm font-semibold",children:(0,n.jsxs)("div",{className:"flex w-full justify-between items-center",children:[(0,n.jsx)("span",{className:"text-sm font-semibold text-slate-900",children:"Couleurs de l'arri\xe8re-plan des blocks"}),(0,n.jsx)("span",{className:"text-xs font-medium text-slate-800",children:"Par d\xe9faut"})]})}),(0,n.jsx)(p.MJ,{children:(0,n.jsx)("div",{className:"flex w-full flex-col gap-2.5",children:e.value.map((t,i)=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex w-full justify-between items-center",children:[(0,n.jsxs)("div",{className:"flex w-full gap-4 items-center",children:[(0,n.jsxs)("div",{className:"flex gap-2.5 items-center",children:[i===e.value.length-1?(0,n.jsx)(o.$,{type:"button",variant:"outline",className:"w-8 h-8",onClick:()=>r.setValue("blockBoxColors",[...e.value,{color:"#fff",isDefault:!1}]),children:(0,n.jsx)(S.A,{})}):(0,n.jsx)("div",{className:"w-8 h-8"}),e.value.length>3&&(0,n.jsx)(o.$,{type:"button",variant:"destructive",className:"w-8 h-8",onClick:()=>r.setValue("blockBoxColors",e.value.filter((e,t)=>t!==i)),children:(0,n.jsx)($.A,{})})]}),(0,n.jsx)(C.s,{onChange:t=>r.setValue("blockBoxColors",e.value.map((e,n)=>({...e,color:i==n?t:e.color}))),className:(0,j.cn)("relative rounded-md border-[2px] border-slate-900 w-16 h-8 !mt-0"),"aria-describedby":"color-picker",value:t.color})]}),(0,n.jsx)(A.S,{checked:t.isDefault,onCheckedChange:()=>r.setValue("blockBoxColors",e.value.map((e,t)=>({...e,isDefault:i==t})))})]}),i!=e.value.length-1&&(0,n.jsx)("div",{className:"w-full h-px bg-slate-200"})]}))})})]})}),(0,n.jsx)("div",{className:"w-full h-px bg-slate-400"}),(0,n.jsx)(p.zB,{control:r.control,name:"blockBgColors",render:({field:e})=>(0,n.jsxs)(p.eI,{className:"flex flex-col gap-4",children:[(0,n.jsx)(p.lR,{className:"text-sm font-semibold",children:(0,n.jsxs)("div",{className:"flex w-full justify-between items-center",children:[(0,n.jsx)("span",{className:"text-sm font-semibold text-slate-900",children:"Couleurs de fond des blocks"}),(0,n.jsx)("span",{className:"text-xs font-medium text-slate-800",children:"Par d\xe9faut"})]})}),(0,n.jsx)(p.MJ,{children:(0,n.jsx)("div",{className:"flex w-full flex-col gap-2.5",children:e.value.map((t,i)=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex w-full justify-between items-center",children:[(0,n.jsxs)("div",{className:"flex w-full gap-4 items-center",children:[(0,n.jsxs)("div",{className:"flex gap-2.5 items-center",children:[i===e.value.length-1?(0,n.jsx)(o.$,{type:"button",variant:"outline",className:"w-8 h-8",onClick:()=>r.setValue("blockBgColors",[...e.value,{color:"#fff",isDefault:!1}]),children:(0,n.jsx)(S.A,{})}):(0,n.jsx)("div",{className:"w-8 h-8"}),e.value.length>3&&(0,n.jsx)(o.$,{type:"button",variant:"destructive",className:"w-8 h-8",onClick:()=>r.setValue("blockBgColors",e.value.filter((e,t)=>
9t!==i)),children:(0,n.jsx)($.A,{})})]}),(0,n.jsx)(C.s,{onChange:t=>r.setValue("blockBgColors",e.value.map((e,n)=>({...e,color:i==n?t:e.color}))),className:(0,j.cn)("relative rounded-md border-[2px] border-slate-900 w-16 h-8 !mt-0"),"aria-describedby":"color-picker",value:t.color})]}),(0,n.jsx)(A.S,{checked:t.isDefault,onCheckedChange:()=>r.setValue("blockBgColors",e.value.map((e,t)=>({...e,isDefault:i==t})))})]}),i!=e.value.length-1&&(0,n.jsx)("div",{className:"w-full h-px bg-slate-200"})]}))})})]})}),(0,n.jsx)("div",{className:"w-full h-px bg-slate-400"}),(0,n.jsx)(p.zB,{control:r.control,name:"blockPadding",render:({field:e})=>(0,n.jsxs)(p.eI,{className:"flex items-center justify-between",children:[(0,n.jsx)(p.lR,{className:"text-sm font-semibold",children:"Padding vertical des blocs (px)"}),(0,n.jsx)(p.MJ,{children:(0,n.jsx)(f.p,{type:"number",min:0,className:"w-20 text-center",value:e.value??68,onChange:e=>r.setValue("blockPadding",Number(e.target.value))})})]})}),(0,n.jsx)("div",{className:"w-full h-px bg-slate-400"}),(0,n.jsx)(p.zB,{control:r.control,name:"textDefaultColor",render:({field:e})=>(0,n.jsxs)(p.eI,{className:"flex items-center justify-between",children:[(0,n.jsx)(p.lR,{className:"text-sm font-semibold",children:"Couleur principal du texte"}),(0,n.jsx)(p.MJ,{children:(0,n.jsx)(C.s,{onChange:e=>r.setValue("textDefaultColor",e),className:(0,j.cn)("relative rounded-md border-[2px] border-slate-900 w-16 h-8 !mt-0"),"aria-describedby":"color-picker",value:e.value})})]})}),(0,n.jsx)("div",{className:"w-full h-px bg-slate-400"}),(0,n.jsx)(p.zB,{control:r.control,name:"textSecondaryColor",render:({field:e})=>(0,n.jsxs)(p.eI,{className:"flex items-center justify-between",children:[(0,n.jsx)(p.lR,{className:"text-sm font-semibold",children:"Couleur secondaire du texte"}),(0,n.jsx)(p.MJ,{children:(0,n.jsx)(C.s,{onChange:e=>r.setValue("textSecondaryColor",e),className:(0,j.cn)("relative rounded-md border-[2px] border-slate-900 w-16 h-8 !mt-0"),"aria-describedby":"color-picker",value:e.value})})]})}),(0,n.jsx)("div",{className:"w-full h-px bg-slate-400"}),(0,n.jsx)(p.zB,{control:r.control,name:"buttonPrimaryColor",render:({field:e})=>(0,n.jsxs)(p.eI,{className:"flex items-center justify-between",children:[(0,n.jsx)(p.lR,{className:"text-sm font-semibold",children:"Couleur des boutons principaux"}),(0,n.jsx)(p.MJ,{children:(0,n.jsx)(C.s,{onChange:e=>r.setValue("buttonPrimaryColor",e),className:(0,j.cn)("relative rounded-md border-[2px] border-slate-900 w-16 h-8 !mt-0"),"aria-describedby":"color-picker",value:e.value})})]})}),(0,n.jsx)("div",{className:"w-full h-px bg-slate-400"}),(0,n.jsx)(p.zB,{control:r.control,name:"buttonSecondaryColor",render:({field:e})=>(0,n.jsxs)(p.eI,{className:"flex items-center justify-between",children:[(0,n.jsx)(p.lR,{className:"text-sm font-semibold",children:"Couleur des boutons secondaires"}),(0,n.jsx)(p.MJ,{children:(0,n.jsx)(C.s,{onChange:e=>r.setValue("buttonSecondaryColor",e),className:(0,j.cn)("relative rounded-md border-[2px] border-slate-900 w-16 h-8 !mt-0"),"aria-describedby":"color-picker",value:e.value})})]})})]})})}),(0,n.jsx)(c.tb,{className:"border-t border-t-slate-500 w-full border-gray-200 bg-gray-100 bottom-0",children:(0,n.jsx)("div",{className:"flex justify-end",children:i?(0,n.jsx)(w.N,{}):(0,n.jsx)(o.$,{type:"button",onClick:r.handleSubmit(i=>{e?.id&&(a(!0),d.mutate({siteId:e?.id??0,data:{config:{...e?.config,...i}}}),a(!1),t(!1))}),children:"Enregister"})})})]})};var F=i(49345);let _={fr:`<p>La pr\xe9sente politique de confidentialit\xe9 explique comment les donn\xe9es \xe0 caract\xe8re personnel sont trait\xe9es dans le cadre du Site Builder exploit\xe9 par <strong>Tax & Management Editions (SPRL), Rue Waelhem 68, 1030 Schaerbeek, BE0466.248.514, [email protected]</strong>, une solution permettant notamment \xe0 des fiduciaires, experts-comptables, ind\xe9pendants et PME de cr\xe9er et g\xe9rer un site web.</p><h3>1. Responsable du traitement</h3><p>Le responsable du traitement est <strong>Tax & Management Editions (SPRL), Rue Waelhem 68, 1030 Schaerbeek, BE0466.248.514, [email protected]</strong>. Pour toute question relative \xe0 la protection des donn\xe9es, vous pouvez nous contacter \xe0 cette m\xeame adresse e-mail.</p><h3>2. Donn\xe9es trait\xe9es</h3><p>Selon votre utilisation du service, nous pouvons traiter des donn\xe9es de compte, telles que votre nom, votre adresse e-mail professionnelle, le nom de votre entreprise, vos identifiants de connexion et les informations n\xe9cessaires \xe0 la gestion de votre compte. Nous pouvons \xe9galement traiter les donn\xe9es que vous nous communiquez lorsque vous nous contactez, ainsi que le contenu de vos messages.</p><p>Si vous utilisez un formulaire de contact sur un site cr\xe9\xe9 via le Site Builder, des donn\xe9es telles que le nom, lâadresse e-mail, le num\xe9ro de t\xe9l\xe9phone et le contenu du message peuvent \xeatre collect\xe9es aupr\xe8s des visiteurs de ce site, selon la configuration choisie.</p><p>En cas dâoption payante ou dâupgrade, nous pouvons traiter des donn\xe9es de facturation et de suivi administratif, telles que lâadresse de facturation, le num\xe9ro de TVA, lâoffre souscrite et les informations n\xe9cessaires au traitement des paiements et des factures.</p><p>Nous pouvons enfin traiter certaines donn\xe9es techniques, telles que lâadresse IP, les dates et heures de connexion, les journaux dâacc\xe8s ou de s\xe9curit\xe9, ainsi que des informations sur lâappareil ou le navigateur utilis\xe9, lorsque cela est n\xe9cessaire \xe0 lâh\xe9bergement, \xe0 la maintenance, \xe0 la s\xe9curit\xe9 et au bon fonctionnement du service.</p><h3>3. Finalit\xe9s et bases juridiques</h3><p>Nous traitons ces donn\xe9es pour fournir le service, permettre la cr\xe9ation et la gestion des comptes, h\xe9berger et maintenir les sites cr\xe9\xe9s, r\xe9pondre aux demandes de contact et de support, g\xe9rer la relation contractuelle et administrative, traiter les options payantes, assurer la s\xe9curit\xe9 du service et respecter nos obligations l\xe9gales.</p><p>Selon les cas, les traitements reposent sur lâex\xe9cution du contrat, le respect dâobligations l\xe9gales, notre int\xe9r\xeat l\xe9gitime \xe0 assurer le fonctionnement, la s\xe9curit\xe9 et lâam\xe9lioration raisonnable du service, ou le consentement lorsque celui-ci est requis.</p><h3>4. Destinataires</h3><p>Les donn\xe9es peuvent \xeatre communiqu\xe9es \xe0 notre personnel autoris\xe9 et \xe0 nos prestataires intervenant pour lâh\xe9bergement, la maintenance, la s\xe9curit\xe9, lâauthentification, lâenvoi dâe-mails, le support ou la facturation. Elles peuvent \xe9galement \xeatre communiqu\xe9es \xe0 nos conseillers ou aux autorit\xe9s comp\xe9tentes lorsque la loi lâexige ou le permet. La liste d\xe9taill\xe9e des sous-traitants nâest pas publi\xe9e \xe0 ce jour.</p><h3>5. Sites cr\xe9\xe9s par les utilisateurs</h3><p>Le Site Builder permet \xe0 chaque utilisateur de cr\xe9er son propre site. Lorsquâun utilisateur publie un site, active un formulaire de contact ou collecte des donn\xe9es aupr\xe8s de ses visiteurs, il lui appartient de v\xe9rifier ses propres obligations dâinformation et de conformit\xe9. Sauf stipulation contraire, nous intervenons en principe comme fournisseur de la solution technique.</p><h3>6. Transferts et conservation</h3><p>Les donn\xe9es sont en principe trait\xe9es dans lâEspace \xe9conomique europ\xe9en. Si un transfert hors EEE a lieu, il sera encadr\xe9 conform\xe9ment aux r\xe8gles applicables.</p><p>Les donn\xe9es ne sont pas conserv\xe9es plus longtemps que n\xe9cessaire au regard des finalit\xe9s poursuivies, des obligations l\xe9gales et des besoins de preuve ou de d\xe9fense. Les dur\xe9es de conservation exactes ne sont pas d\xe9taill\xe9es \xe0 ce jour et sont d\xe9termin\xe9es selon la nature des donn\xe9es, la relation contractuelle, les obligations l\xe9gales applicables et les n\xe9cessit\xe9s administratives, comptables ou de s\xe9curit\xe9.</p><h3>
97. Vos droits</h3><p>Sous r\xe9serve des conditions pr\xe9vues par la r\xe9glementation applicable, vous pouvez demander lâacc\xe8s \xe0 vos donn\xe9es, leur rectification, leur effacement, la limitation du traitement, vous opposer \xe0 certains traitements, demander la portabilit\xe9 de vos donn\xe9es lorsque ce droit existe, et retirer votre consentement lorsque le traitement repose sur celui-ci. Pour exercer vos droits, contactez-nous \xe0 <strong>[email protected]</strong>.</p><h3>8. R\xe9clamation</h3><p>Si vous estimez que le traitement de vos donn\xe9es nâest pas conforme \xe0 la r\xe9glementation applicable, vous pouvez introduire une r\xe9clamation aupr\xe8s de lâAutorit\xe9 de protection des donn\xe9es en Belgique.</p><h3>9. Mise \xe0 jour</h3><p>Nous pouvons modifier la pr\xe9sente politique pour tenir compte dâ\xe9volutions l\xe9gales, techniques ou organisationnelles. Derni\xe8re mise \xe0 jour : <strong>11-03-2026</strong>.</p>`,en:"<p>This Privacy Policy explains how personal data is processed in connection with the Site Builder operated by <strong>Tax & Management Editions (SPRL), Rue Waelhem 68, 1030 Schaerbeek, BE0466.248.514, [email protected]</strong>, a solution that allows, among others, accounting firms, accountants, self-employed professionals and SMEs to create and manage a website.</p><h3>1. Data controller</h3><p>The data controller is <strong>Tax & Management Editions (SPRL), Rue Waelhem 68, 1030 Schaerbeek, BE0466.248.514, [email protected]</strong>. For any question regarding data protection, you may contact us at that e-mail address.</p><h3>2. Data processed</h3><p>Depending on how you use the service, we may process account data such as your name, professional e-mail address, company name, login details and information required to manage your account. We may also process the data you provide when contacting us, including the content of your messages.</p><p>If you use a contact form on a website created through the Site Builder, data such as name, e-mail address, telephone number and message content may be collected from visitors to that website, depending on the selected configuration.</p><p>If you subscribe to a paid option or upgrade, we may process billing and administrative data such as billing address, VAT number, subscribed plan and information required to handle payments and invoices.</p><p>We may also process certain technical data, such as IP address, login dates and times, access or security logs, and information about the device or browser used, where necessary for hosting, maintenance, security and the proper operation of the service.</p><h3>3. Purposes and legal bases</h3><p>We process this data in order to provide the service, allow account creation and management, host and maintain created websites, respond to contact and support requests, manage the contractual and administrative relationship, handle paid options, ensure service security and comply with legal obligations.</p><p>Depending on the case, processing is based on the performance of a contract, compliance with legal obligations, our legitimate interest in ensuring the operation, security and reasonable improvement of the service, or consent where required.</p><h3>4. Recipients</h3><p>Data may be disclosed to our authorised staff and to service providers acting for hosting, maintenance, security, authentication, e-mail delivery, support or billing. It may al
9so be disclosed to advisers or competent authorities where required or permitted by law. A detailed list of processors is not currently published.</p><h3>5. Websites created by users</h3><p>The Site Builder allows each user to create their own website. When a user publishes a website, activates a contact form or collects data from visitors, that user is responsible for checking their own information and compliance obligations. Unless otherwise agreed, we act in principle as the provider of the technical solution.</p><h3>6. Transfers and retention</h3><p>Data is in principle processed within the European Economic Area. If a transfer outside the EEA takes place, it will be subject to the safeguards required by applicable rules.</p><p>Data is not kept longer than necessary in light of the purposes pursued, applicable legal obligations and evidentiary or defence needs. Exact retention periods are not currently detailed and are determined according to the nature of the data, the contractual relationship, applicable legal obligations and administrative, accounting or security needs.</p><h3>7. Your rights</h3><p>Subject to the conditions laid down by applicable law, you may request access to your data, rectification, erasure, restriction of processing, object to certain processing, request data portability where applicable, and withdraw consent where processing is based on consent. To exercise your rights, contact us at <strong>[email protected]</strong>.</p><h3>8. Complaint</h3><p>If you believe that the processing of your data does not comply with applicable law, you may lodge a complaint with the Belgian Data Protection Authority.</p><h3>9. Updates</h3><p>We may amend this Policy to reflect legal, technical or organisational developments. Last update: <strong>11-03-2026</strong>.</p>",nl:`<p>Dit privacybeleid legt uit hoe persoonsgegevens worden verwerkt in het kader van de Site Builder die wordt uitgebaat door <strong>Tax & Management Editions (SPRL), Rue Waelhem 68, 1030 Schaerbeek, BE0466.248.514, [email protected]</strong>, een oplossing waarmee onder meer fiduciaires, accountants, zelfstandigen en kmoâs een website kunnen aanmaken en beheren.</p><h3>1. Verwerkingsverantwoordelijke</h3><p>De verwerkingsverantwoordelijke is <strong>Tax & Management Editions (SPRL), Rue Waelhem 68, 1030 Schaerbeek, BE0466.248.514, [email protected]</strong>. Voor vragen over gegevensbescherming kunt u contact met ons opnemen via dat e-mailadres.</p><h3>2. Verwerkte gegevens</h3><p>Afhankelijk van uw gebruik van de dienst kunnen wij accountgegevens verwerken, zoals uw naam, professioneel e-mailadres, bedrijfsnaam, inloggegevens en informatie die nodig is om uw account te beheren. Wij kunnen ook de gegevens verwerken die u verstrekt wanneer u contact met ons opneemt, waaronder de inhoud van uw berichten.</p><p>Als u een contactformulier gebruikt op een website die via de Site Builder werd aangemaakt, kunnen gegevens zoals naam, e-mailadres, telefoonnummer en de inhoud van het bericht worden verzameld van bezoekers van die website, afhankelijk van de gekozen configuratie.</p><p>Als u intekent op een betalende optie of upgrade, kunnen wij facturatie- en administratieve gegevens verwerken, zoals facturatieadres, btw-nummer, gekozen formule en informatie die nodig is om betalingen en facturen te verwerken.</p><p>Wij kunnen ook bepaalde technische gegevens verwerken, zoals IP-adres, data en tijdstippen van aanmelding, toegangs- of veiligheidslogs en informatie over het gebruikte toestel of de gebruikte browser, wanneer dat nodig is voor hosting, onderhoud, beveiliging en de goede werking van de dienst.</p><h3>3. Doeleinden en rechtsgronden</h3><p>Wij verwerken deze gegevens om de dienst te leveren, accounts aan te maken en te beheren, aangemaakte websites te hosten en te onderhouden, contact- en supportverzoeken te behandelen, de contractuele en administratieve relatie te beheren, betalende opties te verwerken, de veiligheid van de dienst te verzekeren en wettelijke verplichtingen na te leven.</p><p>Naargelang het geval steunt de verwerking op de uitvoering van een overeenkomst, de naleving van wettelijke verplichtingen, ons gerechtvaardigd belang om de werking, veiligheid en redelijke verbetering van de dienst te verzekeren, of toestemming wanneer die vereist is.</p><h3>4. Ontvangers</h3><p>Gegevens kunnen worden meegedeeld aan onze gemachtigde medewerkers en aan dienstverleners die instaan voor hosting, onderhoud, beveiliging, authenticatie, e-mailverzending, support of facturatie. Zij kunnen ook worden meegedeeld aan adviseurs of bevoegde autoriteiten wanneer de wet dit vereist of toelaat. Een gedetailleerde lijst van verwerkers wordt momenteel niet gepubliceerd.</p><h3>5. Door gebruikers aangemaakte websites</h3><p>Met de Site Builder kan iedere gebruiker een eigen website aanmaken. Wanneer een gebruiker een website publiceert, een contactformulier activeert of gegevens van bezoekers verzamelt, is die gebruiker zelf verantwoordelijk om zijn informatie- en conformiteitsverplichtingen na te gaan. Tenzij anders overeengekomen, treden wij in beginsel op als aanbieder van de technische oplossing.</p><h3>6. Doorgiften en bewaartermijnen</h3><p>Gegevens worden in beginsel verwerkt binnen de Europese Economische Ruimte. Als een doorgifte buiten de EER plaatsvindt, wordt die omkaderd volgens de toepasselijke regels.</p><p>Gegevens worden niet langer bewaard dan nodig in het licht van de nagestreefde doeleinden, toepasselijke wettelijke verplichtingen en behoeften inzake bewijs of verdediging. De exacte bewaartermijnen worden momenteel niet afzonderlijk vermeld en worden bepaald volgens de aard van de gegevens, de contractuele relatie, de toepasselijke wettelijke verplichtingen en administratieve, boekhoudkundige of veiligheidsnoden.</p><h3>7. Uw rechten</h3><p>Onder de voorwaarden van de toepasselijke regelgeving kunt u verzoeken om toegang tot uw gegevens, rectificatie, wissing, beperking van de verwerking, bezwaar tegen bepaalde verwerkingen, overdraagbaarheid van gegevens waar van toepassing en intrekking van toestemming wanneer de verwerking daarop berust. Om uw rechten uit te oefenen, kunt u contact opnemen via <strong>[email protected]</strong>.</p><h3>8. Klacht</h3><p>Als u meent dat de verwerking van uw gegevens niet in overeenstemming is met de toepasselijke regelgeving, kunt u een klacht indienen bij de Gegevensbeschermingsautoriteit in Belgi\xeb.</p><h3>9. Updates</h3><p>Wij kunnen dit beleid wijzigen om rekening te houden met juridische, technische of organisatorische ontwikkelingen. Laatste update: <strong>11-03-2026</strong>.</p>`},E={fr:`<p>Les pr\xe9sentes conditions dâutilisation encadrent lâacc\xe8s et lâusage du Site Builder exploit\xe9 par <strong>Tax & Management Editions (SPRL), Rue Waelhem 68, 1030 Schaerbeek, BE0466.248.514, [email protected]</strong>.</p><h3>1. Objet du service</h3><p>Le Site Builder est une solution technique permettant \xe0 des utilisateurs autoris\xe9s de cr\xe9er, configurer, publier et administrer un site web. Le service peut inclure la cr\xe9ation dâun compte, lâacc\xe8s \xe0 un \xe9diteur ou g\xe9n\xe9rateur de site, lâh\xe9bergement te
9chnique du site, un formulaire de contact et, selon lâoffre choisie, certaines options compl\xe9mentaires.</p><h3>2. Acc\xe8s et compte utilisateur</h3><p>Lâacc\xe8s au service peut n\xe9cessiter la cr\xe9ation dâun compte. Lâutilisateur sâengage \xe0 fournir des informations exactes, \xe0 jour et compl\xe8tes, \xe0 pr\xe9server la confidentialit\xe9 de ses identifiants et \xe0 signaler sans d\xe9lai tout usage non autoris\xe9 de son compte. Lâutilisateur reste responsable des activit\xe9s r\xe9alis\xe9es via son compte, sauf faute qui nous serait imputable.</p><h3>3. Usage autoris\xe9</h3><p>Le service est destin\xe9 principalement \xe0 des fiduciaires, experts-comptables, ind\xe9pendants, PME et autres utilisateurs professionnels. Lâutilisateur sâengage \xe0 utiliser le service conform\xe9ment aux pr\xe9sentes conditions, aux lois applicables, aux droits des tiers ainsi quâaux r\xe8gles professionnelles ou d\xe9ontologiques qui lui sont applicables.</p><h3>4. Usage interdit</h3><p>Il est interdit dâutiliser le service \xe0 des fins illicites, frauduleuses, trompeuses ou abusives, de porter atteinte \xe0 la s\xe9curit\xe9 ou \xe0 la disponibilit\xe9 du service, de contourner ses limitations techniques ou commerciales, dây introduire des \xe9l\xe9ments malveillants, ou de publier des contenus contraires \xe0 la loi ou aux droits de tiers.</p><h3>5. Contenu de lâutilisateur</h3><p>Lâutilisateur reste seul responsable du contenu quâil publie via son site, des informations fournies \xe0 ses visiteurs, de ses formulaires, mentions l\xe9gales, politiques de confidentialit\xe9 et de cookies, ainsi que du respect des obligations l\xe9gales, r\xe9glementaires ou d\xe9ontologiques applicables \xe0 son activit\xe9. Il garantit disposer des droits et autorisations n\xe9cessaires sur les contenus int\xe9gr\xe9s \xe0 son site.</p><h3>6. Offre gratuite OECCBB</h3><p>Sous r\xe9serve des conditions dâ\xe9ligibilit\xe9 applicables, les membres de lâOrdre des Experts-comptables et Comptables brevet\xe9s de Belgique Soci\xe9t\xe9 Royale (OECCBB) peuvent b\xe9n\xe9ficier gratuitement dâun site one-page cr\xe9\xe9 via le Site Builder. Les modalit\xe9s pr\xe9cises de cette offre, notamment son p\xe9rim\xe8tre, sa dur\xe9e, ses limitations \xe9ventuelles et les modalit\xe9s de v\xe9rification de lâ\xe9ligibilit\xe9, sont pr\xe9cis\xe9es sur <strong>la page de configuration de Site Builder</strong>.</p><h3>7. Options payantes</h3><p>Certaines fonctionnalit\xe9s ou capacit\xe9s peuvent \xeatre propos\xe9es \xe0 titre payant. Les prix, modalit\xe9s de facturation, conditions de paiement, de renouvellement, de r\xe9siliation et les \xe9ventuelles limitations sont pr\xe9cis\xe9s sur <strong>la page de gestion de vos abonnements</strong>.</p><h3>8. Disponibilit\xe9 et maintenance</h3><p>Nous faisons des efforts raisonnables pour assurer la disponibilit\xe9 du service, sans garantir une disponibilit\xe9 ininterrompue ni une absence totale dâerreur. Le service peut \xeatre suspendu, ralenti ou temporairement indisponible en raison dâop\xe9rations de maintenance, de mises \xe0 jour, dâincidents techniques, de contraintes de s\xe9curit\xe9, de d\xe9faillances de prestataires tiers ou de force majeure.</p><h3>9. Propri\xe9t\xe9 intellectuelle</h3><p>Le Site Builder, ses interfaces, son code, sa structure, sa documentation, ses \xe9l\xe9ments graphiques et, plus g\xe9n\xe9ralement, les \xe9l\xe9ments mis \xe0 disposition par nous sont prot\xe9g\xe9s par les droits de propri\xe9t\xe9 intellectuelle et demeurent notre propri\xe9t\xe9 ou celle de nos conc\xe9dants. Lâutilisateur b\xe9n\xe9ficie uniquement dâun droit dâusage limit\xe9, non exclusif et non transf\xe9rable, conform\xe9ment \xe0 lâoffre souscrite.</p><h3>10. Responsabilit\xe9</h3><p>Nous r\xe9pondons des dommages directs qui nous sont imputables en cas de faute prouv\xe9e, dans les limites autoris\xe9es par le droit applicable. Sauf disposition imp\xe9rative contraire, nous ne r\xe9pondons pas des dommages indirects, des pertes de chiffre dâaffaires, de client\xe8le, dâopportunit\xe9s, de donn\xe9es ou dâimage, ni des dommages r\xe9sultant dâun usage non conforme du service, du contenu publi\xe9 par lâutilisateur, de services tiers ou de causes externes raisonnablement ind\xe9pendantes de notre volont\xe9.</p><h3>11. Suspension ou suppression</h3><p>Nous pouvons suspendre, restreindre ou supprimer lâacc\xe8s au service en cas de violation des pr\xe9sentes conditions, dâusage abusif ou illicite, de risque de s\xe9curit\xe9, de non-paiement ou dâobligation l\xe9gale. Sauf urgence ou impossibilit\xe9, lâutilisateur en sera inform\xe9 dans une mesure raisonnable.</p><h3>12. Modification des conditions</h3><p>Nous pouvons modifier les pr\xe9sentes conditions pour tenir compte de lâ\xe9volution du service, du cadre l\xe9gal ou de notre organisation. La version applicable est celle publi\xe9e sur la plateforme ou communiqu\xe9e \xe0 lâutilisateur.</p><h3>13. Droit applicable et juridiction comp\xe9tente</h3><p>Les pr\xe9sentes conditions sont r\xe9gies par le droit belge. Tout litige relatif \xe0 leur validit\xe9, leur interpr\xe9tation, leur ex\xe9cution ou leur cessation rel\xe8ve de la comp\xe9tence des <strong>tribunaux comp\xe9tents de Bruxelles</strong>.</p><h3>14. Mise \xe0 jour</h3><p>Derni\xe8re mise \xe0 jour : <strong>11-03-2026</strong>.</p>`,en:`<p>These Terms of Use govern access to and use of the Site Builder operated by <strong>Tax & Management Editions (SPRL), Rue Waelhem 68, 1030 Schaerbeek, BE0466.248.514, [email protected]</strong>.</p><h3>1. Purpose of the service</h3><p>The Site Builder is a technical solution allowing authorised users to create, configure, publish and manage a website. The service may include account creation, access to a website editor or generator, technical hosting, a contact form and, depending on the selected offer, additional options.
9</p><h3>2. Access and user account</h3><p>Access to the service may require the creation of an account. The user undertakes to provide accurate, up-to-date and complete information, keep credentials confidential and report without delay any unauthorised use of the account. The user remains responsible for activities carried out through the account, except where caused by our fault.</p><h3>3. Permitted use</h3><p>The service is mainly intended for accounting firms, accountants, self-employed professionals, SMEs and other professional users. The user undertakes to use the service in compliance with these Terms, applicable law, third-party rights and any professional or ethical rules applicable to their activity.</p><h3>4. Prohibited use</h3><p>It is prohibited to use the service for unlawful, fraudulent, misleading or abusive purposes, to interfere with the security or availability of the service, to circumvent its technical or commercial limits, to introduce malicious elements or to publish content that is unlawful or infringes third-party rights.</p><h3>5. User content</h3><p>The user remains solely responsible for the content published through their website, the information provided to visitors, their forms, legal notices, privacy and cookie notices, and compliance with the legal, regulatory or professional obligations applicable to their activity. The user warrants that they hold the rights and authorisations required for the content integrated into their website.</p><h3>6. Free offer for OECCBB members</h3><p>Subject to the applicable eligibility conditions, members of the Ordre des Experts-comptables et Comptables brevet\xe9s de Belgique Soci\xe9t\xe9 Royale (OECCBB) may benefit from a free one-page website created through the Site Builder. The exact terms of this offer, including its scope, duration, any limitations and the way eligibility is verified, are set out on <strong>the Site Builder configuration page</strong>.</p><h3>7. Paid options</h3><p>Certain features or capacities may be offered for a fee. Prices, billing arrangements, payment terms, renewal rules, termination terms and any limitations are set out on <strong>the subscription management page</strong>.</p><h3>8. Availability and maintenance</h3><p>We make reasonable efforts to ensure service availability, without guaranteeing uninterrupted availability or the total absence of errors. The service may be suspended, slowed down or temporarily unavailable because of maintenance, updates, technical incidents, security constraints, failures affecting third-party providers or force majeure.</p><h3>9. Intellectual property</h3><p>The Site Builder, its interfaces, code, structure, documentation, graphic elements and, more generally, all elements made available by us are protected by intellectual property rights and remain our property or that of our licensors. The user only receives a limited, non-exclusive and non-transferable right of use in accordance with the subscribed offer.</p><h3>10. Liability</h3><p>We are liable for direct damage attributable to us in the event of proven fault, within the limits permitted by applicable law. Unless mandatory law provides otherwise, we are not liable for indirect damage, loss of turnover,
9customers, opportunities, data or reputation, or for damage resulting from non-compliant use of the service, content published by the user, third-party services or external causes reasonably beyond our control.</p><h3>11. Suspension or deletion</h3><p>We may suspend, restrict or delete access to the service in the event of a breach of these Terms, abusive or unlawful use, a security risk, non-payment or a legal obligation. Except in urgent cases or where impossible, the user will be informed to a reasonable extent.</p><h3>12. Changes to the Terms</h3><p>We may amend these Terms to reflect changes in the service, the legal framework or our organisation. The applicable version is the version published on the platform or otherwise communicated to the user.</p><h3>13. Governing law and jurisdiction</h3><p>These Terms are governed by Belgian law. Any dispute relating to their validity, interpretation, performance or termination falls within the jurisdiction of the <strong>competent courts of Brussels</strong>.</p><h3>14. Updates</h3><p>Last update: <strong>11-03-2026</strong>.</p>`,nl:`<p>Deze gebruiksvoorwaarden regelen de toegang tot en het gebruik van de Site Builder die wordt uitgebaat door <strong>Tax & Management Editions (SPRL), Rue Waelhem 68, 1030 Schaerbeek, BE0466.248.514, [email protected]</strong>.</p><h3>1. Voorwerp van de dienst</h3><p>De Site Builder is een technische oplossing waarmee gemachtigde gebruikers een website kunnen aanmaken, configureren, publiceren en beheren. De dienst kan accountcreatie, toegang tot een website-editor of generator, technische hosting, een contactformulier en, afhankelijk van het gekozen aanbod, bijkomende opties omvatten.</p><h3>2. Toegang en gebruikersaccount</h3><p>Voor toegang tot de dienst kan het aanmaken van een account vereist zijn. De gebruiker verbindt zich ertoe correcte, actuele en volledige informatie te verstrekken, zijn inloggegevens vertrouwelijk te houden en elk ongeoorloofd gebruik van het account onverwijld te melden. De gebruiker blijft verantwoordelijk voor activiteiten die via het account worden uitgevoerd, behalve in geval van een fout van onze kant.</p><h3>3. Toegelaten gebruik</h3><p>De dienst is hoofdzakelijk bedoeld voor fiduciaires, accountants, zelfstandigen, kmoâs en andere professionele gebruikers. De gebruiker verbindt zich ertoe de dienst te gebruiken in overeenstemming met deze voorwaarden, de toepasselijke wetgeving, rechten van derden en eventuele professionele of deontologische regels die op zijn activiteit van toepassing zijn.</p><h3>4. Verboden gebruik</h3><p>Het is verboden de dienst te gebruiken voor onwettige, frauduleuze, misleidende of abusieve doeleinden, de veiligheid of beschikbaarheid van de dienst te verstoren, de technische of commerci\xeble beperkingen ervan te omzeilen, kwaadaardige elementen in te voeren of inhoud te publiceren die onwettig is of rechten van derden schendt.</p><h3>5. Inhoud van de gebruiker</h3><p>De gebruiker blijft als enige verantwoordelijk voor de inhoud die via zijn website wordt gepubliceerd, de informatie die aan bezoekers wordt verstrekt, zijn formulieren, juridische vermeldingen, privacy- en cookieverklaringen en de naleving van de wettelijke, reglementaire of professionele verplichtingen die op zijn activiteit van toepassing zijn. De gebruiker waarborgt dat hij beschikt over de nodige rechten en toestemmingen voor de inhoud die in zijn website wordt ge\xefntegreerd.</p><h3>6. Gratis aanbod voor OECCBB-leden</h3><p>Onder voorbehoud van de toepasselijke voorwaarden inzake geschiktheid kunnen leden van de Ordre des Experts-comptables et Comptables brevet\xe9s de Belgique Soci\xe9t\xe9 Royale (OECCBB) genieten van een gratis one-page website die via de Site Builder wordt aangemaakt. De precieze voorwaarden van dit aanbod, waaronder de scope, de duur, eventuele beperkingen en de wijze waarop de geschiktheid wordt gecontroleerd, worden uiteengezet op <strong>de configuratiepagina van de Site Builder</strong>.</p><h3>7. Betalende opties</h3><p>Bepaalde functies of capaciteiten kunnen tegen betaling worden aangeboden. De prijzen, facturatieregels, betalingsvoorwaarden, verlengingsregels, be\xebindigingsvoorwaarden en eventuele beperkingen worden uiteengezet op <strong>de pagina voor het beheer van uw abonnementen</strong>.</p><h3>8. Beschikbaarheid en onderhoud</h3><p>Wij leveren redelijke inspanningen om de beschikbaarheid van de dienst te verzekeren, zonder ononderbroken beschikbaarheid of volledige foutloosheid te garanderen. De dienst kan worden opgeschort, vertraagd of tijdelijk onbeschikbaar zijn wegens onderhoud, updates, technische incidenten, veiligheidsbeperkingen, storingen bij derden of overmacht.</p><h3>9. Intellectuele eigendom</h3><p>De Site Builder, de interfaces, de code, de structuur, de documentatie, de grafische elementen en, meer algemeen, alle door ons ter beschikking gestelde elementen zijn beschermd door intellectuele eigendomsrechten en blijven onze eigendom of die van onze licentiegevers. De gebruiker krijgt uitsluitend een beperkt, niet-exclusief en niet-overdraagbaar gebruiksrecht overeenkomstig het onderschreven aanbod.</p><h3>10. Aansprakelijkheid</h3><p>Wij zijn aansprakelijk voor rechtstreekse schade die aan ons toerekenbaar is in geval van bewezen fout, binnen de grenzen die het toepasselijke recht toelaat. Behoudens dwingend recht zijn wij niet aansprakelijk voor onrechtstreekse schade, verlies van omzet, cli\xebnteel, opportuniteiten, gegevens of reputatie, noch voor scha
9de die voortvloeit uit een niet-conform gebruik van de dienst, door de gebruiker gepubliceerde inhoud, diensten van derden of externe oorzaken die redelijkerwijs buiten onze controle liggen.</p><h3>11. Opschorting of verwijdering</h3><p>Wij kunnen de toegang tot de dienst opschorten, beperken of verwijderen in geval van schending van deze voorwaarden, misbruik of onrechtmatig gebruik, een veiligheidsrisico, niet-betaling of een wettelijke verplichting. Behalve in dringende gevallen of wanneer dit onmogelijk is, wordt de gebruiker daarvan in redelijke mate op de hoogte gebracht.</p><h3>12. Wijziging van de voorwaarden</h3><p>Wij kunnen deze voorwaarden wijzigen om rekening te houden met de evolutie van de dienst, het wettelijke kader of onze organisatie. De toepasselijke versie is de versie die op het platform wordt gepubliceerd of op een andere manier aan de gebruiker wordt meegedeeld.</p><h3>13. Toepasselijk recht en bevoegde rechtbank</h3><p>Deze voorwaarden worden beheerst door het Belgisch recht. Elk geschil met betrekking tot hun geldigheid, interpretatie, uitvoering of be\xebindiging valt onder de bevoegdheid van de <strong>bevoegde rechtbanken van Brussel</strong>.</p><h3>14. Updates</h3><p>Laatste update: <strong>11-03-2026</strong>.</p>`},L={fr:`<p>La pr\xe9sente politique de cookies explique comment des cookies et technologies similaires peuvent \xeatre utilis\xe9s sur le site et, le cas \xe9ch\xe9ant, dans lâenvironnement du Site Builder.</p><h3>1. Quâest-ce quâun cookie ?</h3><p>Un cookie est un petit fichier enregistr\xe9 sur votre appareil lors de la consultation dâun site ou de lâutilisation dâun service en ligne. Il peut servir \xe0 assurer le fonctionnement technique du site, m\xe9moriser certains choix, mesurer lâaudience ou activer certaines fonctionnalit\xe9s. Des technologies similaires peuvent \xe9galement \xeatre utilis\xe9es.</p><h3>2. Cat\xe9gories de cookies</h3><p>Des cookies strictement n\xe9cessaires peuvent \xeatre utilis\xe9s pour assurer la s\xe9curit\xe9, la gestion de session, lâauthentification, lâ\xe9quilibrage technique ou la m\xe9morisation de vos pr\xe9f\xe9rences en mati\xe8re de cookies. Ces cookies sont utilis\xe9s dans la mesure o\xf9 ils sont n\xe9cessaires au fonctionnement du service demand\xe9.</p><p>Des cookies analytiques ou de mesure dâaudience peuvent \xeatre utilis\xe9s pour comprendre lâutilisation du site ou du service et am\xe9liorer ses performances. Des cookies fonctionnels peuvent aussi \xeatre utilis\xe9s pour activer des fonctions non essentielles ou m\xe9moriser certaines pr\xe9f\xe9rences. Les cookies marketing ou publicitaires ne sont pas activ\xe9s \xe0 ce jour.</p><h3>3. Consentement</h3><p>Les cookies qui ne sont pas strictement n\xe9cessaires ne sont d\xe9pos\xe9s quâavec votre consentement pr\xe9alable. Vous pouvez accepter, refuser ou retirer ce consentement \xe0 tout moment via les param\xe8tres de votre navigateur, \xe9tant pr\xe9cis\xe9 quâaucun m\xe9canisme d\xe9di\xe9 de gestion des cookies nâest actuellement mis \xe0 disposition.</p><h3>4. Gestion des pr\xe9f\xe9rences</h3><p>En lâabsence de centre de pr\xe9f\xe9rences d\xe9di\xe9, vous pouvez g\xe9rer les cookies via les param\xe8tres de votre navigateur. Le blocage ou la suppression de certains cookies peut toutefois affecter certaines fonctionnalit\xe9s du site ou du service.</p><h3>5. Liste des cookies</h3><p>Aucun tableau d\xe9taill\xe9 des cookies nâest publi\xe9 \xe0 ce jour. Une telle liste pourra \xeatre ajout\xe9e ult\xe9rieurement si n\xe9cessaire.</p><h3>6. Pr\xe9cision sur les cookies marketing</h3><p>Aucun cookie marketing nâest activ\xe9 \xe0 la date de la pr\xe9sente politique.</p><h3>7. Mise \xe0 jour</h3><p>La pr\xe9sente politique peut \xeatre modifi\xe9e pour refl\xe9ter lâ\xe9volution des outils utilis\xe9s ou du cadre l\xe9gal. Derni\xe8re mise \xe0 jour : <strong>11-03-2026</strong>.</p>`,en:"<p>This Cookie Policy explains how cookies and similar technologies may be used on the website and, where applicable, within the Site Builder environment.</p><h3>1. What is a cookie?</h3><p>A cookie is a small file stored on your device when you visit a website or use an online service. It may be used to ensure technical functioning, remember certain choices, measure audience or enable certain features. Similar technologies may also be used.<
9/p><h3>2. Categories of cookies</h3><p>Strictly necessary cookies may be used to ensure security, session management, authentication, technical load balancing or the storage of your cookie preferences. These cookies are used insofar as they are necessary for the operation of the requested service.</p><p>Analytics or audience measurement cookies may be used to understand how the website or service is used and to improve performance. Functional cookies may also be used to enable non-essential features or remember preferences. Marketing or advertising cookies are not enabled at this time.</p><h3>3. Consent</h3><p>Cookies that are not strictly necessary are only placed with your prior consent. You may accept, refuse or withdraw that consent at any time through your browser settings, it being understood that no dedicated cookie management mechanism is currently provided.</p><h3>4. Managing preferences</h3><p>In the absence of a dedicated preference centre, you can manage cookies through your browser settings. Blocking or deleting certain cookies may, however, affect some website or service features.</p><h3>5. Cookie list</h3><p>No detailed cookie table is currently published. Such a list may be added later if necessary.</p><h3>6. Clarification on marketing cookies</h3><p>No marketing cookies are enabled as of the date of this Policy.</p><h3>7. Updates</h3><p>This Policy may be amended to reflect changes in the tools used or in the legal framework. Last update: <strong>11-03-2026</strong>.</p>",nl:`<p>Dit cookiebeleid legt uit hoe cookies en gelijkaardige technologie\xebn kunnen worden gebruikt op de website en, waar van toepassing, binnen de omgeving van de Site Builder.</p><h3>1. Wat is een cookie?</h3><p>Een cookie is een klein bestand dat op uw toestel wordt opgeslagen wanneer u een website bezoekt of een onlinedie
9nst gebruikt. Het kan worden gebruikt om de technische werking te verzekeren, bepaalde keuzes te onthouden, het publiek te meten of bepaalde functies te activeren. Ook gelijkaardige technologie\xebn kunnen worden gebruikt.</p><h3>2. Categorie\xebn cookies</h3><p>Strikt noodzakelijke cookies kunnen worden gebruikt om de beveiliging, het sessiebeheer, de authenticatie, de technische load balancing of de opslag van uw cookievoorkeuren te verzekeren. Deze cookies worden gebruikt voor zover zij noodzakelijk zijn voor de werking van de gevraagde dienst.</p><p>Analytische of audience measurement cookies kunnen worden gebruikt om te begrijpen hoe de website of dienst wordt gebruikt en om de prestaties te verbeteren. Functionele cookies kunnen ook worden gebruikt om niet-essenti\xeble functies te activeren of voorkeuren te onthouden. Marketing- of advertentiecookies zijn momenteel niet geactiveerd.</p><h3>3. Toestemming</h3><p>Cookies die niet strikt noodzakelijk zijn, worden alleen geplaatst met uw voorafgaande toestemming. U kunt die toestemming op elk moment aanvaarden, weigeren of intrekken via de instellingen van uw browser, met dien verstande dat er momenteel geen afzonderlijk mechanisme voor cookiebeheer beschikbaar is.</p><h3>4. Beheer van voorkeuren</h3><p>Bij gebrek aan een afzonderlijk voorkeurencentrum kunt u cookies beheren via de instellingen van uw browser. Het blokkeren of verwijderen van bepaalde cookies kan evenwel sommige functies van de website of dienst be\xefnvloeden.</p><h3>5. Cookielijst</h3><p>Er wordt momenteel geen gedetailleerde cookietabel gepubliceerd. Zoân lijst kan later worden toegevoegd indien nodig.</p><h3>6. Verduidelijking over marketingcookies</h3><p>Er zijn op de datum van dit beleid geen marketingcookies geactiveerd.</p><h3>7. Updates</h3><p>Dit beleid kan worden gewijzigd om rekening te houden met veranderingen in de gebruikte tools of in het wettelijke kader. Laatste update: <strong>11-03-2026</strong>.</p>`},z=({site:e,setIsOpen:t})=>{let[i,a]=(0,s.useState)(!1),r=(0,s.useMemo)(()=>({privacy:"Confidentialit\xe9",cookies:"Cookies",userCondition:"Conditions d'utilisation"}),[]),d=(0,b.A)(),f=(0,s.useMemo)(()=>({privacy:{fr:_.fr,en:_.en,nl:_.nl},cookies:{fr:L.fr,en:L.en,nl:L.nl},userCondition:{fr:E.fr,en:E.en,nl:E.nl}}),[]),h=(0,l.mN)({resolver:(0,x.u)(m.ij),defaultValues:{privacyMsgFr:e?.config?.privacyMsgFr??"",privacyMsgEn:e?.config?.privacyMsgEn??"",privacyMsgNl:e?.config?.privacyMsgNl??"",cookiesMsgFr:e?.config?.cookiesMsgFr??"",cookiesMsgEn:e?.config?.cookiesMsgEn??"",cookiesMsgNl:e?.config?.cookiesMsgNl??"",userConditionMsgFr:e?.config?.userConditionMsgFr??"",userConditionMsgEn:e?.config?.userConditionMsgEn??"",userConditionMsgNl:e?.config?.userConditionMsgNl??""}});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.F,{className:"h-full",children:(0,n.jsx)("div",{className:"m-4",children:(0,n.jsx)("div",{children:(0,n.jsx)(p.lV,{...h,children:(0,n.jsx)("form",{className:"space-y-6",children:(0,n.jsx)("div",{className:"relative rounded px-2.5 pt-2.5 pb-2.5",children:(0,n.jsxs)(y.tU,{defaultValue:"cookies",className:"w-full",children:[(0,n.jsx)(y.j7,{className:"w-[calc(100%_-_2em)] mt-3 mb-6 mx-4 bg-slate-200 gap-1 h-12",children:Object.keys(r).map((e,t)=>(0,n.jsx)(y.Xi,{className:"cursor-pointer flex-1 bg-transparent text-slate-900 hover:bg-[#FFFFFF22] data-[state=active]:bg-white data-[state=active]:text-slate-900",value:e,children:r[e]},t))}),Object.keys(r).map((t,i)=>(0,n.jsx)(y.av,{value:t,children:(0,n.jsxs)(y.tU,{defaultValue:"fr",className:"!gap-0 relative",children:[(0,n.jsx)(y.j7,{className:"ml-auto bg-white !rounded-none !p-0 gap-0.5",children:v.e.map((t,i)=>("En"!=t||e?.config?.hasEnLng)&&("Nl"!=t||e?.config?.hasNlLng)?(0,n.jsx)(y.Xi,{value:t.toLowerCase(),className:"text-sm rounded-[4px_4px_0_0] bg-white border border-slate-900 text-slate-900 cursor-pointer !px-2.5 !py-2 !shadow-none data-[state=active]:bg-slate-900 data-[state=active]:text-white",children:(0,j.ZH)(v.tN.fr[t])},i):null)}),v.e.map((e,i)=>(0,n.jsx)(y.av,{value:e.toLowerCase(),children:(0,n.jsx)("div",{className:"relative -top-[1px] flex flex-col gap-5 bg-white px-2.5 py-5 border border-slate-900 rounded-[4px_0_4px_4px]",children:(0,n.jsx)(p.zB,{control:h.control,name:`${t}Msg${e}`,render:({field:i})=>{let s=(i.value??"")==="",l=f[t]?.[e.toLowerCase()]??"";return(0,n.jsx)(p.eI,{className:(0,j.cn)("flex flex-col h-full [&>
9.ttp-helpeditor>.sun-editor>.se-container>.se-wrapper]:border-x [&>.ttp-helpeditor>.sun-editor>.se-container>.se-wrapper]:border-b",s&&"editor-is-default"),children:(0,n.jsx)(p.MJ,{children:(0,n.jsx)(F.A,{disable:!1,value:s?l:i.value,onChange:i.onChange,minHeight:"270px"})})})}})})},i))]})},i))]})})})})})})}),(0,n.jsx)(c.tb,{className:"border-t border-t-slate-500 sticky w-full border-gray-200 bg-gray-100 bottom-0 z-10",children:(0,n.jsx)("div",{className:"flex justify-end",children:i?(0,n.jsx)(w.N,{}):(0,n.jsx)(o.$,{type:"button",onClick:h.handleSubmit(i=>{e?.id&&(a(!0),d.mutate({siteId:e?.id??0,data:{config:{...e?.config,...i}}}),a(!1),t(!1))}),children:"Enregister"})})})]})},B=({site:e,setIsOpen:t,footerDataOnly:i})=>{let C=g.n.use.siteInfo(),S=g.n.use.navCommunity(),$=(0,l.mN)({resolver:(0,x.u)(m.Iv),defaultValues:{favicon:null,showHeader:e?.config?.showHeader===void 0||e?.config?.showHeader,showLoginButton:e?.config?.showLoginButton!==void 0&&e?.config?.showLoginButton,email:e?.config?.email??"",showEmail:e?.config?.showEmail??!1,phone:e?.config?.phone??"",showPhone:e?.config?.showPhone??!1,facebook:e?.config?.facebook??"",showFacebook:e?.config?.showFacebook??!1,instagram:e?.config?.instagram??"",showInstagram:e?.config?.showInstagram??!1,twitter:e?.config?.twitter??"",showTwitter:e?.config?.showTwitter??!1,linkedIn:e?.config?.linkedIn??"",showLinkedIn:e?.config?.showLinkedIn??!1,youtube:e?.config?.youtube??"",showYoutube:e?.config?.showYoutube??!1,hasEnLng:e?.config?.hasEnLng??!1,hasNlLng:e?.config?.hasNlLng??!1,metaTitleFr:e?.config?.metaTitleFr??"",metaTitleEn:e?.config?.metaTitleEn??"",metaTitleNl:e?.config?.metaTitleNl??"",metaDescriptionFr:e?.config?.metaDescriptionFr??"",metaDescriptionEn:e?.config?.metaDescriptionEn??"",metaDescriptionNl:e?.config?.metaDescriptionNl??""}}),[A,F]=(0,s.useState)(!1),[_,E]=(0,s.useState)(e?.config?.favicon??void 0),L=(0,b.A)(),B=e=>{let t=new FileReader;$.setValue("favicon",e),t.readAsDataURL(e),t.onload=e=>{E(e.target?.result)}};return(0,n.jsxs)(y.tU,{defaultValue:"data",className:"w-full h-full",children:[(0,n.jsxs)(y.j7,{className:"w-[calc(100%_-_2em)] mt-4 mx-4 bg-slate-900 gap-1",children:[(0,n.jsx)(y.Xi,{className:"cursor-pointer flex-1 bg-transparent text-white hover:bg-[#FFFFFF22] data-[state=active]:bg-white data-[state=active]:text-slate-900",value:"data",children:"Donn\xe9es de site"}),C?.tag!="v2"&&(0,n.jsx)(y.Xi,{className:"cursor-pointer flex-1 bg-transparent text-white hover:bg-[#FFFFFF22] data-[state=active]:bg-white data-[state=active]:text-slate-900",value:"colors",children:"Couleurs et Th\xe8mes"}),(0,n.jsx)(y.Xi,{className:"cursor-pointer flex-1 bg-transparent text-white hover:bg-[#FFFFFF22] data-[state=active]:bg-white data-[state=active]:text-slate-900",value:"cookies",children:"G\xe9rer les cookies"})]}),(0,n.jsxs)(y.av,{value:"data",children:[(0,n.jsx)(u.F,{children:(0,n.jsx)("div",{className:"m-4",children:(0,n.jsx)("div",{children:(0,n.jsx)(p.lV,{...$,children:(0,n.jsxs)("form",{className:"space-y-6",children:[!i&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:(0,j.cn)("flex flex-col gap-2.5 mb-2",$.watch("showHeader")&&"border-l border-l-stone-900 pl-2.5"),children:[(0,n.jsx)(p.zB,{control:$.control,name:"showHeader",render:({field:e})=>(0,n.jsxs)(p.eI,{className:"flex items-center justify-between",children:[(0,n.jsx)(p.lR,{className:"text-base",children:"Afficher l'en-t\xeate"}),(0,n.jsx)(p.Rr,{}),(0,n.jsx)(p.MJ,{children:(0,n.jsx)(d.d,{checked:e.value,onCheckedChange:e.onChange})})]})}),$.watch("showHeader")&&(0,n.jsx)(p.zB,{control:$.control,name:"showLoginButton",render:({field:e})=>(0,n.jsxs)(p.eI,{className:"flex items-center justify-between",children:[(0,n.jsx)(p.lR,{className:"text-base",children:"Afficher le bouton de connexion"}),(0,n.jsx)(p.Rr,{}),(0,n.jsx)(p.MJ,{children:(0,n.jsx)(d.d,{checked:e.value,onCheckedChange:e.onChange})})]})})]}),(0,n.jsx)(p.zB,{control:$.control,name:"favicon",render:()=>(0,n.jsxs)(p.eI,{className:"flex gap-2 justify-between items-center w-full",children:[(0,n.jsx)("label",{className:"font-semibold inline-flex",children:"Favicon"}),(0,n.jsx)(p.MJ,{children:(0,n.jsxs)("label",{htmlFor:"image",className:"h-11 flex justify-center items-center p-4 rounded-sm border border-dashed border-slate-900 cursor-pointer",children:[_&&""!=_?(0,n.jsx)(a.default,{src:_,alt:"favicon",className:"!h-[3rem] !w-auto max-w-[6rem] object-contain rounded-xl !relative",fill:!0}):(0,n.jsx)("div",{className:"!h-[3rem] !w-auto max-w-[6rem] object-contain rounded-xl !relative",children:(0,n.jsx)(r.A,{className:"w-12 h-12 text-slate-200 mb-[1.125em]"})}),(0,n.jsx)(f.p,{id:"image",type:"file",accept:"image/png,image/jpg,image/jpeg,image/webp",style:{display:"none"},onChange:e=>{e.target.files&&B(e.target.files[0])}})]})}),(0,n.jsx)(p.C5,{})]})}),(0,n.jsxs)("div",{className:"border border-slate-900 rounded px-2.5 pt-2.5 pb-2.5",children:[(0,n.jsx)("label",{className:"font-semibold inline-flex mb-5",children:"Languages"}),(0,n.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,n.jsx)(h.J,{children:"Fran\xe7ais"}),(0,n.jsx)(d.d,{checked:!0,disabled:!0})]}),(0,n.jsx)(p.zB,{control:$.control,name:"hasEnLng",render:({field:e})=>(0,n.jsxs)(p.eI,{className:"flex items-center justify-between mb-2",children:[(0,n.jsx)(p.lR,{className:"",children:"Anglais"}),(0,n.jsx)(p.Rr,{}),(0,n.jsx)(p.MJ,{children:(0,n.jsx)(d.d,{checked:e.value,onCheckedChange:e.onChange})})]})}),(0,n.jsx)(p.zB,{control:$.control,name:"hasNlLng",render:({field:e})=>(0,n.jsxs)(p.eI,{className:"flex items-center justify-between mb-2",children:[(0,n.jsx)(p.lR,{className:"",children:"N\xe9erlandais"}),(0,n.jsx)(p.Rr,{}),(0,n.jsx)(p.MJ,{children:(0,n.jsx)(d.d,{checked:e.value,onCheckedChange:e.onChange})})]})})]}),(0,n.jsx)("div",{className:"relative border border-slate-900 rounded px-2.5 pt-2.5 pb-2.5",children:(0,n.jsxs)(y.tU,{defaultValue:"fr",className:"!gap-0 relative",children:[(0,n.jsx)("label",{className:"absolute font-semibold inline-flex top-0.5",children:"M\xe9tadonn\xe9es"}
9),(0,n.jsx)(y.j7,{className:"ml-auto bg-white !rounded-none !p-0 gap-0.5",children:v.e.map((e,t)=>("En"!=e||$.watch("hasEnLng"))&&("Nl"!=e||$.watch("hasNlLng"))?(0,n.jsx)(y.Xi,{value:e.toLowerCase(),className:"text-sm rounded-[4px_4px_0_0] bg-white border border-slate-900 text-slate-900 cursor-pointer !px-2.5 !py-2 !shadow-none data-[state=active]:bg-slate-900 data-[state=active]:text-white",children:(0,j.ZH)(v.tN.fr[e])},t):null)}),v.e.map((e,t)=>(0,n.jsx)(y.av,{value:e.toLowerCase(),children:(0,n.jsxs)("div",{className:"relative -top-[1px] flex flex-col gap-5 bg-white px-2.5 py-5 border border-slate-900 rounded-[4px_0_4px_4px]",children:[(0,n.jsx)(p.zB,{control:$.control,name:`metaTitle${e}`,render:({field:e})=>(0,n.jsxs)(p.eI,{className:"flex flex-col",children:[(0,n.jsx)(p.lR,{className:"",children:"Titre"}),(0,n.jsx)(p.MJ,{children:(0,n.jsx)(f.p,{...e,value:e.value?.toString(),className:"outline-none outline-0 bg-white"})})]})}),(0,n.jsx)(p.zB,{control:$.control,name:`metaDescription${e}`,render:({field:e})=>(0,n.jsxs)(p.eI,{className:"flex flex-col",children:[(0,n.jsx)(p.lR,{className:"",children:"Description"}),(0,n.jsx)(p.MJ,{children:(0,n.jsx)(k.T,{...e,value:e.value?.toString(),className:"outline-none outline-0 bg-white"})})]})})]})},t))]})})]}),(0,n.jsxs)("div",{className:"border border-slate-900 rounded px-2.5 pt-2.5 pb-5",children:[(0,n.jsx)(p.zB,{control:$.control,name:"showEmail",render:({field:e})=>(0,n.jsxs)(p.eI,{className:"flex flex-row items-center justify-between mb-2",children:[(0,n.jsx)(p.lR,{className:"",children:"Email"}),(0,n.jsx)(p.Rr,{}),(0,n.jsx)(p.MJ,{children:(0,n.jsx)(d.d,{checked:e.value,onCheckedChange:e.onChange})})]})}),(0,n.jsx)(p.zB,{control:$.control,name:"email",render:({field:e})=>(0,n.jsxs)(p.eI,{children:[(0,n.jsx)(p.MJ,{children:(0,n.jsx)(f.p,{className:"outline-none outline-0",...e})}),(0,n.jsx)(p.C5,{})]})})]}),(0,n.jsxs)("div",{className:"border border-slate-900 rounded px-2.5 pt-2.5 pb-5",children:[(0,n.jsx)(p.zB,{control:$.control,name:"showPhone",render:({field:e})=>(0,n.jsxs)(p.eI,{className:"flex flex-row items-center justify-between mb-2",children:[(0,n.jsx)(p.lR,{className:"",children:"Phone"}),(0,n.jsx)(p.Rr,{}),(0,n.jsx)(p.MJ,{children:(0,n.jsx)(d.d,{checked:e.value,onCheckedChange:e.onChange})})]})}),(0,n.jsx)(p.zB,{control:$.control,name:"phone",render:({field:e})=>(0,n.jsxs)(p.eI,{children:[(0,n.jsx)(p.MJ,{children:(0,n.jsx)(f.p,{className:"outline-none outline-0",...e})}),(0,n.jsx)(p.C5,{})]})})]}),(0,n.jsxs)("div",{className:"border border-slate-900 rounded px-2.5 pt-2.5 pb-5",children:[(0,n.jsx)(p.zB,{control:$.control,name:"showFacebook",render:({field:e})=>(0,n.jsxs)(p.eI,{className:"flex flex-row items-center justify-between mb-2",children:[(0,n.jsx)(p.lR,{className:"",children:"Facebook"}),(0,n.jsx)(p.Rr,{}),(0,n.jsx)(p.MJ,{children:(0,n.jsx)(d.d,{checked:e.value,onCheckedChange:e.onChange})})]})}),(0,n.jsx)(p.zB,{control:$.control,name:"facebook",render:({field:e})=>(0,n.jsxs)(p.eI,{children:[(0,n.jsx)(p.MJ,{children:(0,n.jsx)(f.p,{className:"outline-none outline-0",...e})}),(0,n.jsx)(p.C5,{})]})})]}),(0,n.jsxs)("div",{className:"border border-slate-900 rounded px-2.5 pt-2.5 pb-5",children:[(0,n.jsx)(p.zB,{control:$.control,name:"showInstagram",render:({field:e})=>(0,n.jsxs)(p.eI,{className:"flex flex-row items-center justify-between mb-2",children:[(0,n.jsx)(p.lR,{className:"",children:"Instagram"}),(0,n.jsx)(p.Rr,{}),(0,n.jsx)(p.MJ,{children:(0,n.jsx)(d.d,{checked:e.value,onCheckedChange:e.onChange})})]})}),(0,n.jsx)(p.zB,{control:$.control,name:"instagram",render:({field:e})=>(0,n.jsxs)(p.eI,{children:[(0,n.jsx)(p.MJ,{children:(0,n.jsx)(f.p,{className:"outline-none outline-0",...e})}),(0,n.jsx)(p.C5,{})]})})]}),(0,n.jsxs)("div",{className:"border border-slate-900 rounded px-2.5 pt-2.5 pb-5",children:[(0,n.jsx)(p.zB,{control:$.control,name:"showTwitter",render:({field:e})=>(0,n.jsxs)(p.eI,{className:"flex flex-row items-center justify-between mb-2",children:[(0,n.jsx)(p.lR,{className:"",children:"Twitter X"}),(0,n.jsx)(p.Rr,{}),(0,n.jsx)(p.MJ,{children:(0,n.jsx)(d.d,{checked:e.value,onCheckedChange:e.onChange})})]})}),(0,n.jsx)(p.zB,{control:$.control,name:"twitter",render:({field:e})=>(0,n.jsxs)(p.eI,{children:[(0,n.jsx)(p.MJ,{children:(0,n.jsx)(f.p,{className:"outline-none outline-0",...e})}),(0,n.jsx)(p.C5,{})]})})]}),(0,n.jsxs)("div",{className:"border border-slate-900 rounded px-2.5 pt-2.5 pb-5",children:[(0,n.jsx)(p.zB,{control:$.control,name:"showLinkedIn",render:({field:e})=>(0,n.jsxs)(p.eI,{className:"flex flex-row items-center justify-between mb-2",children:[(0,n.jsx)(p.lR,{className:"",children:"LinkedIn"}),(0,n.jsx)(p.Rr,{}),(0,n.jsx)(p.MJ,{children:(0,n.jsx)(d.d,{checked:e.value,onCheckedChange:e.onChange})})]})}),(0,n.jsx)(p.zB,{control:$.control,name:"linkedIn",render:({field:e})=>(0,n.jsxs)(p.eI,{children:[(0,n.jsx)(p.MJ,{children:(0,n.jsx)(f.p,{className:"outline-none outline-0",...e})}),(0,n.jsx)(p.C5,{})]})})]}),(0,n.jsxs)("div",{className:"border border-slate-900 rounded px-2.5 pt-2.5 pb-5",children:[(0,n.jsx)(p.zB,{control:$.control,name:"showYoutube",render:({field:e})=>(0,n.jsxs)(p.eI,{className:"flex flex-row items-center justify-between mb-2",children:[(0,n.jsx)(p.lR,{className:"",children:"Youtube"}),(0,n.jsx)(p.Rr,{}),(0,n.jsx)(p.MJ,{children:(0,n.jsx)(d.d,{checked:e.value,onCheckedChange:e.onChange})})]})}),(0,n.jsx)(p.zB,{control:$.control,name:"youtube",render:({field:e})=>(0,n.jsxs)(p.eI,{children:[(0,n.jsx)(p.MJ,{children:(0,n.jsx)(f.p,{className:"outline-none outline-0",...e})}),(0,n.jsx)(p.C5,{})]})})]})]})})})})}),(0,n.jsx)(c.tb,{className:"border-t border-t-slate-500 sticky w-full border-gray-200 bg-gray-100 bottom-0",children:(0,n.jsx)("div",{className:"flex justify-end",children:A?(0,n.jsx)(w.N,{}):(0,n.jsx)(o.$,{type:"button",onClick:$.handleSubmit(i=>{e?.id&&(F(!0),null!==i.favicon?(0,N.k)({community:S,file:i.favicon}).then(t=>{let n=t.data.data.fullMediaUrl;L.mutate({siteId:e?.id??0,data:{config:{...e?.config,...i,favicon:n}}})}):(delete i.favicon,L.mutate({siteId:e?.id??0,data:{config:{...e?.config,...i}}})),F(!1),t(!1))}),children:"Enregister"})})})]}),C?.tag!="v2"&&(0,n.jsx)(y.av,{value:"colors",children:(0,n.jsx)(I,{site:e,setIsOpen:t})}),(0,n.jsx)(y.av,{value:"cookies",children:(0,n.jsx)(z,{site:e,setIsOpen:t})})]})}},54165:(e,t,i)=>{"use strict";i.d(t,{Cf:()=>m,Es:()=>p,HM:()=>d,L3:()=>f,c7:()=>x,lG:()=>r,rr:()=>h,zM:()=>o});var n=i(95155);i(12115);var s=i(15452),l=i(54416),a=i(59434);function r({...e}){return(0,n.jsx)(s.bL,{"data-slot":"dialog",...e})}function o({...e}){return(0,n.jsx)(s.l9,{"data-slot":"dialog-trigger",...e})}function c({...e}){return(0,n.jsx)(s.ZL,{"data-slot":"dialog-portal",...e})}function d({...e}){return(0,n.jsx)(s.bm,{"data-slot":"dialog-close",...e})}function u({className:e,...t}){return(0,n.jsx)(s.hJ,{"data-slot":"dialog-overlay",className:(0,a.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function m({className:e,children:t,...i}){return(0,n.jsxs)(c,{"data-slot":"dialog-portal",children:[(0,n.jsx)(u,{}),(0,n.jsxs)(s.UC,{"data-slot":"dialog-content",className:(0,a.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 roun
9ded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...i,children:[t,(0,n.jsxs)(s.bm,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,n.jsx)(l.A,{}),(0,n.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function x({className:e,...t}){return(0,n.jsx)("div",{"data-slot":"dialog-header",className:(0,a.cn)("flex flex-col gap-2 text-center sm:text-left",e),...t})}function p({className:e,...t}){return(0,n.jsx)("div",{"data-slot":"dialog-footer",className:(0,a.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function f({className:e,...t}){return(0,n.jsx)(s.hE,{"data-slot":"dialog-title",className:(0,a.cn)("text-lg leading-none font-semibold",e),...t})}function h({className:e,...t}){return(0,n.jsx)(s.VY,{"data-slot":"dialog-description",className:(0,a.cn)("text-muted-foreground text-sm",e),...t})}},54324:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(95155);function s({width:e="25",height:t="24",fill:i="currentColor"}){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:"0 0 25 24",fill:"none",children:(0,n.jsx)("path",{d:"M21.9263 7.20301C21.8124 6.78041 21.5898 6.39501 21.2807 6.08518C20.9715 5.77534 20.5866 5.55187 20.1643 5.43701C18.5983 5.00701 12.3333 5.00001 12.3333 5.00001C12.3333 5.00001 6.06931 4.99301 4.50231 5.40401C4.08023 5.52415 3.69613 5.75078 3.38687 6.06214C3.07762 6.3735 2.85359 6.75913 2.73631 7.18201C2.32331 8.74801 2.31931 11.996 2.31931 11.996C2.31931 11.996 2.31531 15.26 2.72531 16.81C2.95531 17.667 3.63031 18.344 4.48831 18.575C6.07031 19.005 12.3183 19.012 12.3183 19.012C12.3183 19.012 18.5833 19.019 20.1493 18.609C20.5718 18.4943 20.9571 18.2714 21.267 17.9622C21.5769 17.653 21.8007 17.2682 21.9163 16.846C22.3303 15.281 22.3333 12.034 22.3333 12.034C22.3333 12.034 22.3533 8.76901 21.9263 7.20301ZM10.3293 15.005L10.3343 9.00501L15.5413 12.01L10.3293 15.005Z",fill:i})})}},55946:(e,t,i)=>{"use strict";i.d(t,{BooksSlider:()=>c,CycleList:()=>a,EventCards:()=>s,EventsSlide:()=>r,Packs:()=>o,TagsCards:()=>l,Trainings:()=>d});var n=i(55028);let s=(0,n.default)(()=>Promise.all([i.e(1833),i.e(8595),i.e(3252)]).then(i.bind(i,33252)),{loadableGenerated:{webpack:()=>[33252]},ssr:!1}),l=(0,n.default)(()=>Promise.all([i.e(682),i.e(8595),i.e(6978)]).then(i.bind(i,46978)),{loadableGenerated:{webpack:()=>[46978]},ssr:!1}),a=(0,n.default)(()=>Promise.all([i.e(6537),i.e(8595),i.e(9775),i.e(7532)]).then(i.bind(i,37532)),{loadableGenerated:{webpack:()=>[37532]},ssr:!1}),r=(0,n.default)(()=>Promise.all([i.e(8595),i.e(9775),i.e(1939)]).then(i.bind(i,21939)),{loadableGenerated:{webpack:()=>[21939]},ssr:!1}),o=(0,n.default)(()=>Promise.all([i.e(8595),i.e(756)]).then(i.bind(i,80756)),{loadableGenerated:{webpack:()=>[80756]},ssr:!1}),c=(0,n.default)(()=>Promise.all([i.e(8595),i.e(2615)]).then(i.bind(i,82615)),{loadableGenerated:{webpack:()=>[82615]},ssr:!1}),d=(0,n.default)(()=>Promise.all([i.e(7039),i.e(8595),i.e(2782),i.e(4289)]).then(i.bind(i,24289)),{loadableGenerated:{webpack:()=>[24289]},ssr:!1})},57161:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>f});var n=i(95155),s=i(12115),l=i(51154),a=i(60379),r=i(59434),o=i(74749),c=i(3055),d=i(47368),u=i(36136),m=i(8117),x=i(35918),p=i(28095);let f=({data:e=null,edit:t=!1,save:i,cancel:f,visibility:h,lng:g="fr",updateBlockContent:b})=>{let v=(0,s.useRef)((0,r.ZH)(g)),[j,N]=(0,s.useState)((0,r.ZH)(g)),w=e=>{v.current=e,N(e)},[y,k]=(0,s.useState)(e?.content),C=(0,s.useRef)(null),S=e=>{C.current=e,k(e)}
9,[$,A]=(0,s.useState)(),[I,F]=(0,s.useState)(),[_,E]=(0,s.useState)(),[L,z]=(0,s.useState)(),[B,T]=(0,s.useState)(null),[P,R]=(0,s.useState)(),[M,D]=(0,s.useState)(!1),{isMobile:O,isTablet:U}=(0,o.default)();(0,s.useEffect)(()=>{w((0,r.ZH)(g))},[g]),(0,s.useEffect)(()=>{(0,x.T)(g).then(e=>T(e))},[g]);let V=e=>e?.[`image${j}`]||e?.imageFr||e?.image||"",q=e=>e?.[`video${j}`]||e?.videoFr||e?.video||"",H=e=>e?.[`pdf${j}`]||e?.pdfFr||e?.pdf||"",Z=e=>e?.[`croppedArea${j}`]||e?.croppedAreaFr||e?.croppedArea;function J({newImage:e=null,newCroppedArea:t=null,newVideo:i=null,newPdf:n=null,newIconName:s=null,newIconColor:l=null,newIconSize:a=null,newIconBgColor:r=null,newIconVerticalAlign:o=null,newIconHorizontalAlign:c=null}){S({...C.current,...e&&{[`image${v.current}`]:e,[`croppedArea${v.current}`]:null,[`video${v.current}`]:null,[`pdf${v.current}`]:null,image:null,croppedArea:null,video:null,pdf:null},...t&&{[`croppedArea${v.current}`]:t},...i&&{[`video${v.current}`]:i,[`image${v.current}`]:null,[`pdf${v.current}`]:null,image:null,pdf:null},...n&&{[`pdf${v.current}`]:n,[`image${v.current}`]:null,[`video${v.current}`]:null,image:null,video:null},...s&&{[`video${v.current}`]:null,[`image${v.current}`]:null,[`pdf${v.current}`]:null,[`croppedArea${v.current}`]:null,video:null,image:null,pdf:null,croppedArea:null,iconName:s},...l&&{iconColor:l},...a&&{iconSize:a},...r&&{iconBgColor:r},...o&&{iconVerticalAlign:o},...c&&{iconHorizontalAlign:c}})}return((0,s.useEffect)(()=>{Z(y)&&(P?.x!==Z(y)?.x||P?.y!==Z(y)?.y)&&R(Z(y));let e=V(y);e===$||e instanceof File||(A(e),Z(y)||F(e));let t=q(y);t===_||t instanceof File||E(t);let i=H(y);i===L||i instanceof File||z(i)},[y,j]),(0,s.useEffect)(()=>{i&&b&&b(e?.uuid??"",y)},[i,b]),(0,s.useEffect)(()=>{f&&S(e?.content)},[f]),(0,s.useEffect)(()=>{void 0!=h&&(y?.visibility??!0)!=h&&b&&b(e?.uuid??"",{...y,visibility:h})},[h]),(0,s.useEffect)(()=>{P&&$&&(0,p.Ay)($,P,0).then(e=>{e&&(J({newCroppedArea:P}),F(URL.createObjectURL(e)))})},[P]),t)?(0,n.jsxs)("div",{id:"image-video",className:"flex flex-col w-full h-full items-center relative max-h-[1200px] aspect-video",children:[(0,n.jsx)(c.A,{labelClassname:"w-full h-full",iconClassname:"text-[600px] w-full h-full flex items-center justify-center",imageUrl:$,setImageUrl:A,croppedImageUrl:I,setCroppedImageUrl:F,setCroppedArea:R,canbeVideo:!0,canbePdf:!0,iconName:y?.iconName,iconColor:y?.iconColor,iconFinalSize:y?.iconSize,iconBgColor:y?.iconBgColor,iconVerticalAlign:y?.iconVerticalAlign,iconHorizontalAlign:y?.iconHorizontalAlign,videoUrl:_,setVideoUrl:E,pdfUrl:L,setPdfUrl:z,updateElement:J,removeImage:()=>S({...C.current,[`image${j}`]:null,[`video${j}`]:null,[`pdf${j}`]:null,[`croppedArea${j}`]:null,image:null,video:null,pdf:null,croppedArea:null,iconName:null})}),M&&(0,n.jsx)("div",{className:"z-10 absolute w-full h-full bg-[#00000088] top-[50%] left-[50%] flex flex-col gap-2 justify-center items-center text-white -translate-x-[50%] -translate-y-[50%] cursor-pointer",children:(0,n.jsx)(l.A,{className:"h-[100px] w-[100px] animate-spin text-white"})})]}):O||U?(0,n.jsx)("div",{id:"image-video",className:(0,r.cn)("flex flex-col items-center w-full gap-5",!(y?.visibility==void 0||y?.visibility)&&"opacity-50"),children:(0,n.jsx)("div",{className:"relative my-4 bg-gray-200 w-[calc(100vw_-_40px)] h-[calc((100vw_-_40px)_*_9/16)] rounded-2xl shrink-0",style:{...y?.iconName&&y?.iconBgColor&&{background:y?.iconBgColor??""}},children:(0,n.jsxs)("div",{className:(0,r.cn)("bg-gray-200 h-full rounded-2xl absolute w-full z-[1]",I&&""!==I&&"bg-white"),style:{...y?.iconName&&y?.iconBgColor&&{background:y?.iconBgColor??""}},children:[!y?.iconName&&(_&&""!=_?(0,n.jsx)(a.default,{video:_,thumbnail:$??""}):L&&""!=L?(0,n.jsx)(m.PdfViewer,{pdfUrl:L,thumbnailUrl:$,viewLabel:B?.view_document}):(0,n.jsx)(n.Fragment,{children:I&&""!==I&&(0,n.jsx)(u.ImageViewer,{imageUrl:I,sizes:"calc(100vw - 40px)"})})),y?.iconName&&(0,n.jsx)(d.IconRenderer,{name:y?.iconName,className:"text-[calc((100vw_-_40px)_*_9/16)] w-full h-full flex items-center justify-center",style:{fontSize:y?.iconSize??"",justifyContent:y?.iconHorizontalAlign??"center",alignItems:y?.iconVerticalAlign??"center"},color:y.iconColor})]})})}):(0,n.jsx)("div",{id:"image-video",className:(0,r.cn)("flex flex-col items-center w-full gap-0",!(y?.visibility==void 0||y?.visibility)&&"opacity-50"),children:(0,n.jsx)("div",{className:"relative bg-gray-200 rounded-2xl shrink-0 w-full h-full max-h-[1200px] aspect-video",style:{...y?.iconName&&y?.iconBgColor&&{background:y?.iconBgColor??""}},children:(0,n.jsxs)("div",{className:(0,r.cn)("bg-gray-200 h-full rounded-2xl absolute w-full z-[1]",I&&""!==I&&"bg-white"),style:{...y?.iconName&&y?.iconBgColor&&{background:y?.iconBgColor??""}},children:[!y?.iconName&&(_&&""!=_?(0,n.jsx)(a.default,{video:_,thumbnail:$??""}):L&&""!=L?(0,n.jsx)(m.PdfViewer,{pdfUrl:L,thumbnailUrl:$,viewLabel:B?.view_document}):(0,n.jsx)(n.Fragment,{children:I&&""!==I&&(0,n.jsx)(u.ImageViewer,{imageUrl:I})})),y?.iconName&&(0,n.jsx)(d.IconRenderer,{name:y?.iconName,className:"text-[600px] w-full h-full flex items-center justify-center",style:{fontSize:y?.iconSize??"",justifyContent:y?.iconHorizontalAlign??"center",alignItems:y?.iconVerticalAlign??"center"}})]})})})}},57674:(e,t,i)=>{"use strict";i.d(t,{i:()=>s});var n=i(34477);let s=(0,n.createServerReference)("7fd8bb5e16d3dfa0f14c74ab1b64b58b1eaa59c0b4",n.callServer,void 0,n.findSourceMapURL,"getSitePageBlockCachedAction")},57775:e=>{e.exports={article:"Article_article__OC7Bg",fetching_content:"Article_fetching_content__Yzjmo",content:"Article_content__NI7KT",category:"Article_category___fbBO",title:"Article_title__Zjqhw",meta:"Article_meta__54Pat",community:"Article_community__f_wwI",default:"Article_default__0oiqJ",authorsContainer:"Article_authorsContainer__BPZqr",actionsContainer:"Article_actionsContainer__wdY5u",actions:"Article_actions__CrDHI",large:"Article_large__uWtDQ",status:"Article_status__RY9KB",published:"Article_published__UDQt_",ready:"Article_ready__2Uc6_",scheduled:"Article_scheduled__Beq1B",buttons:"Article_buttons__mzzxT","btn-delete":"Article_btn-delete__nzhlh",fetching_img:"Article_fetching_img__karWe",fetching_category:"Article_fetching_category__Ge8Rm",fetching_avatar:"Article_fetching_avatar__yhsZH",publishedAt:"Article_publishedAt__3lhUX",stat:"Article_stat__ZUVr5",sharePopup:"Article_sharePopup__kyvaS",action:"Article_action__B0Xhx",activeAction:"Article_activeAction__VeImD",actionCount:"Article_actionCount__pHv2c",isExternal:"Article_isExternal__X1S13",authorsContainer_width:"Article_authorsContainer_width__vGl14",smallBH:"Article_smallBH__ISLSx",medium:"Article_medium__8y5l6",articleTemplate5:"Article_articleTemplate5__EEypK",contentImg:"Article_contentImg__wLH4A",publishedAtReadTime:"Article_publishedAtReadTime__Jsjpv",bottomAction:"Article_bottomAction__N5Ot3",categoryChannel:"Article_categoryChannel__EukN_",channel:"Article_channel__JEBUh",readTime:"Article_readTime__Y3Nfx",dot:"Article_dot__nt3ET",userActions:"Article_userActions__spy1_",likesActive:"Article_likesActive__PY6_p",likes:"Article_likes__9jpze",comments:"Article_comments__cdR9S",share:"Article_share__wBebk",articleTemplate7:"Article_articleTemplate7__Mdf_Z",avatarContainer:"Article_avatarContainer__IlOkY",avatarInfo:"Article_avatarInfo__E3LPw",avatarName:"Article_avatarName__UgQxd",fff_lib:"Article_fff_lib__nnJX9"}},58571:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(95155);function s({width:e="25",height:t="25",fill:i="currentColor"}){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:"0 0 25 25",fill:"none",children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.83203 3.39062C4.0036 3.39062 3.33203 4.0622 3.33203 4.89062V19.8906C3.33203 20.719 4.0036 21.3906 4.83203 21.3906H19.832C20.6604 21.3906 21.332 20.719 21.332 19.8906V4.89062C21.332 4.0622 20.6604 3.39062 19.832 3.39062H4.83203ZM8.85279 7.39334C8.85842 8.3496 8.14264 8.93882 7.29326 8.9346C6.4931 8.93038 5.7956 8.29334 5.79982 7.39475C5.80404 6.54959 6.47201 5.87038 7.33967 5.89007C8.21998 5.90976 8.85842 6.55522 8.85279 7.39334ZM12.6117 10.
91524H10.0917H10.0903V18.7122H12.7537V18.5125C12.7537 18.1326 12.7534 17.7526 12.7531 17.3725C12.7523 16.3587 12.7514 15.3438 12.7566 14.3303C12.758 14.0842 12.7692 13.8283 12.8325 13.5934C13.0701 12.7159 13.8591 12.1492 14.7394 12.2885C15.3047 12.377 15.6787 12.7047 15.8362 13.2377C15.9333 13.5709 15.9769 13.9295 15.9811 14.2769C15.9925 15.3245 15.9909 16.3721 15.9893 17.4198C15.9887 17.7896 15.9881 18.1596 15.9881 18.5294V18.7108H18.66V18.5055C18.66 18.0535 18.6598 17.6016 18.6595 17.1497C18.659 16.0202 18.6584 14.8907 18.6614 13.7608C18.6628 13.2503 18.608 12.7469 18.4828 12.2533C18.2958 11.5192 17.9091 10.9117 17.2805 10.473C16.8347 10.1608 16.3453 9.95973 15.7983 9.93723C15.736 9.93464 15.6732 9.93125 15.6101 9.92784C15.3304 9.91272 15.0461 9.89736 14.7787 9.95129C14.0137 10.1046 13.3416 10.4547 12.8339 11.072C12.7749 11.1428 12.7172 11.2147 12.6311 11.322L12.6117 11.3463V10.1524ZM6.01367 18.715H8.66445V10.158H6.01367V18.715Z",fill:i})})}},58610:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>b});var n=i(95155),s=i(25618),l=i(13052),a=i(16225),r=i(59434),o=i(94870);let c=({data:e,setIsOpen:t,setIframeSrc:i,token:s,user:l,lng:c})=>{let d=()=>{let t=[];return s&&t.push("token="+s),l&&t.push("userId="+l.id),t.push("without_header=1"),t.push("organization_id=1256"),t.push("source="+encodeURIComponent("MY_LIBRARY,FFF_LIBRARY,COLLEAGUE")),`${a.fB}/${c}/rubricframe/${e.id}?params=${(0,r.r9)(t.join())}`};return(0,n.jsxs)("div",{className:"relative hover-parent cursor-pointer min-w-[196px] h-[236px] border flex flex-col items-start relative p-3.5 rounded-[5px] border-solid border-[#29394d] bg-[linear-gradient(170deg,_#fff_80%,_rgba(46,_137,_199,_0.4))] hover:bg-[linear-gradient(170deg,_#29394d_80%,_rgba(46,_137,_199,_0.4))] hover:text-white",onClick:()=>{i(d()),t(!0)},children:[(0,n.jsx)("div",{className:"text-sm text-primary-color uppercase mb-1.5",children:e?.type}),(0,n.jsx)("div",{className:"leading-4 mb-2 hover-white",children:e?.titleFr}),(0,n.jsx)("div",{className:"px-1 py-0 border-l-2 border-l-[#18a0fb] border-solid text-xs hover-white",children:e?.organization?.abbreviation}),(0,n.jsx)("div",{className:"absolute text-white right-3.5 bottom-3.5 hover-child",children:(0,n.jsx)(o.A,{})})]})};var d=i(2706),u=i(66474),m=i(12115),x=i(35918);let p=({token:e,limit:t,lng:i="fr"})=>{let[s,l]=(0,m.useState)(null),[a,r]=(0,m.useState)(0),[o,p]=(0,m.useState)([]),[f,h]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{(0,x.T)(i).then(e=>{l(e)})},[i]),(0,m.useEffect)(()=>{let i=async()=>{try{h(!0);let i=await (0,d.RI)({token:e,limit:t,start:t*(a-1)});h(!1),i?.data&&p(e=>[...e,...i.data])}catch(e){h(!1),console.error("Error fetching data:",e)}};a>0&&i()},[a,e]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-
95 mb-5",children:o.map((e,t)=>(0,n.jsx)(c,{data:e,lng:i}))}),(0,n.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,n.jsx)("hr",{className:"w-full"}),(0,n.jsx)("div",{className:"text-sm items-center w-96 mx-8 py-3 justify-center uppercase flex gap-2 border rounded-[50px] border-solid shadow-[0px_4px_10px_0px_rgba(41,57,77,0.10)]",onClick:()=>r(a+1),children:f?(0,n.jsx)("span",{children:"Loading ..."}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{children:s?.seeMore??"Voir plus"}),(0,n.jsx)(u.A,{})]})}),(0,n.jsx)("hr",{className:"w-full"})]})]})};var f=i(54165);function h({iframeSrc:e,isOpen:t,setIsOpen:i}){return(0,n.jsx)(f.lG,{open:t,onOpenChange:e=>{i(e)},children:(0,n.jsx)(f.Cf,{className:"max-w-[90%] h-[90%] md:max-w-[65%] md:h-[95%]",onInteractOutside:e=>{e.preventDefault()},children:(0,n.jsx)("iframe",{id:"offfcourse-iframe",className:"w-full h-full shadow-none border-[none]",src:e,allow:"camera;microphone;autoplay;fullscreen"})})})}var g=i(51012);let b=({data:e=null,lng:t="fr",visibility:i,updateBlockContent:o})=>{let u=g.n.use.access_token(),x=g.n.use.public_token(),f=g.n.use.siteInfo(),b=g.n.use.user(),v=(0,m.useRef)(u??x??"");v.current=u??x??"";let[j,N]=(0,m.useState)(!1),[w,y]=(0,m.useState)(""),[k,C]=(0,m.useState)([]),[S,$]=(0,m.useState)(!1);return((0,m.useEffect)(()=>{!async function(){let{data:e}=await (0,d.RI)({token:v.current,limit:8});C(e)}()},[]),(0,m.useEffect)(()=>{b&&f&&$(!!(b.roles??[]).find(e=>a.wF.includes(e.type)&&e.organization.id===f?.organization?.id))},[b,f]),(0,m.useEffect)(()=>{void 0!=i&&(e?.content?.visibility??!0)!=i&&o&&o(e?.uuid??"",{...e?.content,visibility:i})},[i]),Array.isArray(k)&&0===k.length)?null:(0,n.jsxs)("div",{className:(0,r.cn)("container",!(e?.content?.visibility==void 0||e?.content?.visibility)&&"opacity-50"),style:{...e?.content?.fontColor?{"--dark-1":e?.content?.fontColor,"--dark-3":`${e?.content?.fontColor}99`}:{}},children:[(0,n.jsx)(h,{iframeSrc:w,isOpen:j,setIsOpen:N}),(0,n.jsx)(s.p$,{children:"FAQ"}),(0,n.jsxs)("div",{className:"flex items-center mb-5 gap-5 ",children:[(0,n.jsx)(s.H2,{className:"leading-[100%]",children:"Questions fr\xe9quemment pos\xe9es"}),(0,n.jsxs)("a",{className:"cursor-pointer flex gap-2 font-medium text-secondary-color",target:"_blank",href:a.fB,children:[(0,n.jsx)("span",{children:"voir tout"}),(0,n.jsx)(l.A,{})]})]}),Array.isArray(k)&&k.length>0&&(0,n.jsx)("div",{className:(0,r.cn)("grid grid-cols-1 sm:grid-cols-2 gap-5 mb-5",S||a.wk.includes(b?.type??"")?"lg:grid-cols-4":"lg:grid-cols-5"),children:k.map((e,i)=>(0,n.jsx)(m.Fragment,{children:(0,n.jsx)(c,{setIframeSrc:y,setIsOpen:N,data:e,user:void 0,token:u??x,lng:t})},i))}),!(S||a.wk.includes(b?.type??""))&&(0,n.jsx)(p,{token:u??x,lng:t,limit:10})]})}},59409:(e,t,i)=>{"use strict";i.d(t,{bq:()=>u,eb:()=>x,gC:()=>m,l6:()=>c,yv:()=>d});var n=i(95155);i(12115);var s=i(31992),l=i(66474),a=i(5196),r=i(47863),o=i(59434);function c({...e}){return(0,n.jsx)(s.bL,{"data-slot":"select",...e})}function d({...e}){return(0,n.jsx)(s.WT,{"data-slot":"select-value",...e})}function u({className:e,size:t="default",children:i,...a}){return(0,n.jsxs)(s.l9,{"data-slot":"select-trigger","data-size":t,className:(0,o.cn)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...a,children:[i,(0,n.jsx)(s.In,{asChild:!0,children:(0,n.jsx)(l.A,{className:"size-4 opacity-50"})})]})}function m({className:e,children:t,position:i="popper",...l}){return(0,n.jsx)(s.ZL,{children:(0,n.jsxs)(s.UC,{"data-slot":"select-content",className:(0,o.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
9de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md","popper"===i&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:i,...l,children:[(0,n.jsx)(p,{}),(0,n.jsx)(s.LM,{className:(0,o.cn)("p-1","popper"===i&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),(0,n.jsx)(f,{})]})})}function x({className:e,children:t,...i}){return(0,n.jsxs)(s.q7,{"data-slot":"select-item",className:(0,o.cn)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...i,children:[(0,n.jsx)("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,n.jsx)(s.VF,{children:(0,n.jsx)(a.A,{className:"size-4"})})}),(0,n.jsx)(s.p4,{children:t})]})}function p({className:e,...t}){return(0,n.jsx)(s.PP,{"data-slot":"select-scroll-up-button",className:(0,o.cn)("flex cursor-default items-center justify-center py-1",e),...t,children:(0,n.jsx)(r.A,{className:"size-4"})})}function f({className:e,...t}){return(0,n.jsx)(s.wn,{"data-slot":"select-scroll-down-button",className:(0,o.cn)("flex cursor-default items-center justify-center py-1",e),...t,children:(0,n.jsx)(l.A,{className:"size-4"})})}},59649:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>A});var n=i(95155),s=i(25618),l=i(59434),a=i(84616),r=i(51154),o=i(76356),c=i(12115),d=i(54416);let u=({elementPosition:e,data:t=null,lng:i="fr",edit:s=!1,cancel:a=!1,updateElementList:r,onDelete:o})=>{let u=(0,l.ZH)(i),[m,x]=(0,c.useState)(t),p=(0,c.useRef)(null),f=(0,c.useRef)(null);function h({newTitle:t=null,newDescription:i=null}){let n={...m,...t&&{[`title${u}`]:t},...i&&{[`description${u}`]:i}};r&&void 0!=e&&r(e,n)}return(0,c.useEffect)(()=>{t&&x(t)},[t]),(0,c.useEffect)(()=>{p.current&&(p.current.innerText=m?.[`title${u}`]??"10x"),f.current&&(f.current.innerText=m?.[`description${u}`]??"Augmentation de la productivit\xe9")},[i]),s?(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("div",{ref:p,onBlur:function(){h({newTitle:p.current.innerText})},className:"text-center sm:text-left text-3xl font-semibold leading-[120%] tracking-[-0.3px] mb-2 border-[1px] border-dark1",contentEditable:"plaintext-only",children:m?.[`title${u}`]??"10x"}),(0,n.jsx)("p",{ref:f,onBlur:function(){h({newDescription:f.current.innerText})},className:"text-center sm:text-left border-[1px] border-dark1",contentEditable:"plaintext-only",children:m?.[`description${u}`]??"Augmentation de la productivit\xe9"}),o&&void 0!=e&&(0,n.jsx)("button",{type:"button",onClick:()=>o(e),className:"absolute -top-2 -right-2 flex h-6 w-6 items-center justify-center rounded-full bg-red-500 text-white hover:bg-red-600 transition-colors",children:(0,n.jsx)(d.A,{size:14})})]}):(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-center sm:text-left text-3xl text-dark1 font-semibold leading-[120%] tracking-[-0.3px] mb-2",children:m?.[`title${u}`]??"10x"}),(0,n.jsx)("p",{className:"text-center sm:text-left text-dark1",children:m?.[`description${u}`]??"Augmentation de la productivit\xe9"})]})};var m=i(46120),x=i.n(m),p=i(51012),f=i(60379),h=i(28095),g=i(11867),b=i(74749),v=i(3055),j=i(46102),N=i(47368),w=i(36136),y=i(49345),k=i(44632),C=i(8117),S=i(35918);let $={titleFr:"10x",titleEn:"10x",titleNl:"10x",descriptionFr:"Augmentation de la productivit\xe9",descriptionEn:"Augmentation de la productivit\xe9",descriptionNl:"Augmentation de la productivit\xe9"},A=({data:e=null,lng:t="fr",edit:i=!1,save:d,cancel:m,visibility:A,updateBlockContent:I,reversed:F=!1})=>{let _=p.n.use.navCommunity(),E=p.n.use.siteInfo(),L=(0,c.useRef)((0,l.ZH)(t)),[z,B]=(0,c.useState)((0,l.ZH)(t)),T=e=>{L.current=e,B(e)},[P,R]=(0,c.useState)(e?.content),M=(0,c.useRef)(null),D=e=>{M.current=e,R(e)},[O,U]=(0,c.useState)(e?.content?.list&&e?.content?.list.length>0?e?.content?.list:[$,$,$,$]),[V,q]=(0,c.useState)(),[H,Z]=(0,c.useState)(),[J,G]=(0,c.useState)(),[W,Q]=(0,c.useState)(),[
9K,Y]=(0,c.useState)(),[X,ee]=(0,c.useState)(null),[et,ei]=(0,c.useState)(!1),{isMobile:en,isTablet:es}=(0,b.default)(),el=(0,g.A)(!0),ea=(0,c.useRef)(null),er=(0,c.useRef)(null);(0,c.useEffect)(()=>{t!=z.toLowerCase()&&T((0,l.ZH)(t))},[t]),(0,c.useEffect)(()=>{(0,S.T)(t).then(e=>ee(e))},[t]),(0,c.useEffect)(()=>{D(e?.content)},[e]),(0,c.useEffect)(()=>{P?.croppedArea&&(J?.x!==P?.croppedArea?.x||J?.y!==P?.croppedArea?.y)&&G(P?.croppedArea),P?.image===V||P?.image instanceof File||(q(P?.image),P?.croppedArea||Z(P?.image)),P?.video===W||P?.video instanceof File||Q(P?.video),P?.pdf===K||P?.pdf instanceof File||Y(P?.pdf),U(x()(P?.list&&P?.list.length>0?P?.list:[$,$,$,$]))},[P]),(0,c.useEffect)(()=>{d&&I&&(P?.image&&P?.image instanceof File?(ei(!0),P?.video&&P?.video instanceof File?(0,k.k)({community:_,file:P.video}).then(t=>{let i={...P};i.video=t.data.data.fullMediaUrl,(0,k.k)({community:_,file:P.image}).then(t=>{i.image=t.data.data.fullMediaUrl,ei(!1),I(e?.uuid??"",i)})}):P?.pdf&&P?.pdf instanceof File?(0,k.k)({community:_,file:P.pdf}).then(t=>{let i={...P};i.pdf=t.data.data.fullMediaUrl,(0,k.k)({community:_,file:P.image}).then(t=>{i.image=t.data.data.fullMediaUrl,ei(!1),I(e?.uuid??"",i)})}):(0,k.k)({community:_,file:P.image}).then(t=>{let i={...P};i.image=t.data.data.fullMediaUrl,ei(!1),I(e?.uuid??"",i);let n=E?.config?.imagesLibrary??[];el.mutate({siteId:E?.id??0,data:{config:{...E?.config,imagesLibrary:[...n,t.data.data.fullMediaUrl]}}})})):P?.pdf&&P?.pdf instanceof File?(ei(!0),(0,k.k)({community:_,file:P.pdf}).then(t=>{let i={...P};i.pdf=t.data.data.fullMediaUrl,ei(!1),I(e?.uuid??"",i)})):I(e?.uuid??"",P))},[d,I]),(0,c.useEffect)(()=>{m&&D(x()(e?.content))},[m]),(0,c.useEffect)(()=>{void 0!=A&&(P?.visibility??!0)!=A&&I&&I(e?.uuid??"",{...M.current,visibility:A})},[A]),(0,c.useEffect)(()=>{J&&V&&(0,h.Ay)(V,J,0).then(e=>{e&&(ec({newCroppedArea:J}),Z(URL.createObjectURL(e)))})},[J]);let eo=(0,c.useMemo)(()=>{if(P?.iconOriginalSize&&P?.iconSize){let e=Number(P?.iconOriginalSize.replace("px",""));return Math.round(Number(P?.iconSize.replace("px",""))/e*100)}return null},[P?.iconOriginalSize,P?.iconSize]);function ec({newName:e=null,newTitle:t=null,newDescription:i=null,newImage:n=null,newCroppedArea:s=null,newVideo:l=null,newPdf:a=null,reversed:r=null,newIconName:o=null,newVisibility:c,newIconColor:d=null,newIconSize:u=null,newIconBgColor:m=null,newIconVerticalAlign:x=null,newIconHorizontalAlign:p=null,newIconOriginalSize:f=null,newHideImage:h=null}){D({...M.current,...e&&{[`name${L.current}`]:e},...t&&{[`title${L.current}`]:t},...i&&{[`description${L.current}`]:i},...n&&{image:n,croppedArea:null,iconName:null,iconSize:null,video:null,...a?{}:{pdf:null}},...s&&{croppedArea:s},...l&&{video:l,image:null,pdf:null},...a&&{pdf:a,video:null,...n?{image:n}:{image:null}},...c&&{video:c},...o&&{video:null,image:null,pdf:null,croppedArea:null,iconName:o},...d&&{iconColor:d},...u&&{iconSize:u},...m&&{iconBgColor:m},...x&&{iconVerticalAlign:x},...p&&{iconHorizontalAlign:p},...null!=r&&{reversed:r},...f&&{iconOriginalSize:f},...null!=h&&{hideImage:h}})}function ed(e,t){let i=O.map((i,n)=>n===e?t:i);D({...M.current,list:i})}function eu(e){let t=O.filter((t,i)=>i!==e);D({...M.current,list:t})}return i?(0,n.jsxs)("div",{className:(0,l.cn)("relative flex flex-col md:flex-row justify-between items-center !max-w-full gap-10 md:gap-28",(P?.reversed!=void 0?P?.reversed:F)&&"flex-col-reverse md:flex-row-reverse"),children:[(0,n.jsx)(v.A,{labelClassname:"block relative bg-gray-200 w-full max-w-[540px] md:w-[540px] aspect-[27/21] rounded-2xl md:mr-10",iconClassname:"text-[min(420px,70vw)] w-full h-full flex items-center justify-center",imageUrl:V,setImageUrl:q,croppedImageUrl:H,setCroppedImageUrl:Z,setCroppedArea:G,canbeVideo:!0,canbePdf:!0,iconName:P?.iconName,iconColor:P?.iconColor,iconFinalSize:P?.iconSize,iconBgColor:P?.iconBgColor,iconVerticalAlign:P?.iconVerticalAlign,iconHorizontalAlign:P?.iconHorizontalAlign,iconOriginalSize:P?.iconOriginalSize,hideImage:P?.hideImage!=void 0&&P?.hideImage,videoUrl:W,setVideoUrl:Q,pdfUrl:K,setPdfUrl:Y,updateElement:ec,removeImage:()=>D({...M.current,image:null,video:null,pdf:null,croppedArea:null,iconName:null})}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)(s.p$,{className:"border-[1px] border-dark1",contentEditable:!0,ref:ea,onBlur:function(){ec({newName:ea.
9current.innerText})},children:P?.[`name${z}`]??"EN QUELQUES CHIFFRES"}),(0,n.jsxs)("div",{className:"flex flex-col gap-[1.2rem]",children:[(0,n.jsx)(s.H2,{className:"border-[1px] border-dark1",contentEditable:!0,ref:er,onBlur:function(){ec({newTitle:er.current.innerText})},children:P?.[`title${(0,l.ZH)(t)}`]??"Titre mettant en valeur les r\xe9sultats des clients"}),(0,n.jsx)(y.A,{disable:!1,value:P?.[`description${z}`]??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. <br/><br/> It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.",onChange:function(e){ec({newDescription:e})}}),(0,n.jsxs)("div",{className:"grid sm:grid-cols-2 gap-6",children:[O.slice(0,6).map((e,s)=>(0,n.jsx)(u,{data:e,lng:t,edit:i,cancel:m,elementPosition:s,updateElementList:ed,onDelete:eu},`service-${s}`)),O.length<6&&(0,n.jsx)("button",{type:"button",onClick:function(){let e=[...O,{...$}];D({...M.current,list:e})},className:"flex items-center justify-center rounded-md border-2 border-dashed border-gray-300 p-8 text-gray-400 hover:border-gray-400 hover:text-gray-600 transition-colors",children:(0,n.jsx)(a.A,{size:32})})]})]})]}),et&&(0,n.jsx)("div",{className:"z-10 absolute w-full h-full bg-[#00000088] top-[50%] left-[50%] flex flex-col gap-2 justify-center items-center text-white -translate-x-[50%] -translate-y-[50%] cursor-pointer",children:(0,n.jsx)(r.A,{className:"h-[100px] w-[100px] animate-spin text-white"})}),(0,n.jsx)("ul",{className:"absolute left-[-62px] top-[40%] z-[1] flex flex-col gap-2",children:(0,n.jsxs)(j.m_,{children:[(0,n.jsx)(j.k$,{className:"flex h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",asChild:!0,children:(0,n.jsx)("li",{className:"flex h-8 w-8 gap-1 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",onPointerDown:()=>ec({reversed:!(P?.reversed!=void 0?P?.reversed:F)}),children:(0,n.jsx)(o.A,{size:20})})}),(0,n.jsx)(j.ZI,{children:"Switch"})]})})]}):en||es?(0,n.jsxs)("div",{className:(0,l.cn)("flex flex-col justify-between items-center w-full gap-5",!(P?.visibility==void 0||P?.visibility)&&"opacity-50"),style:{...P?.fontColor?{"--dark-1":P?.fontColor,"--dark-3":`${P?.fontColor}99`}:{}},children:[!P?.hideImage&&(0,n.jsx)("div",{className:"relative my-4 w-[calc(100vw_-_40px)] h-[calc((100vw_-_40px)_*_9/16)] rounded-2xl shrink-0",children:(0,n.jsxs)("div",{className:(0,l.cn)("bg-gray-200 h-full rounded-2xl absolute w-full z-[1]",H&&""!==H&&"bg-white"),style:{...P?.iconName&&P?.iconBgColor&&{background:P?.iconBgColor??"transparent"},height:eo?`${eo}%`:""},children:[!P?.iconName&&(W&&""!=W?(0,n.jsx)(f.default,{video:W,thumbnail:V??""}):K&&""!=K?(0,n.jsx)(C.PdfViewer,{pdfUrl:K,thumbnailUrl:V,viewLabel:X?.view_document}):(0,n.jsx)(n.Fragment,{children:H&&""!==H&&(0,n.jsx)(w.ImageViewer,{imageUrl:H,style:{objectFit:P?.imageObject??"cover"},sizes:"calc(100vw - 40px)"})})),P?.iconName&&(0,n.jsx)(N.IconRenderer,{name:P?.iconName,className:"text-[calc((100vw_-_40px)_*_9/16)] w-full h-full flex items-center justify-center",style:{fontSize:P?.iconSize??"",justifyContent:P?.iconHorizontalAlign??"center",alignItems:P?.iconVerticalAlign??"center"},color:P.iconColor})]})}),(0,n.jsxs)("div",{className:"w-full",children:[(P?.[`name${z}`]==void 0||""!=(P?.[`name${z}`]??"").trim())&&(0,n.jsx)(s.p$,{className:"!mb-1",children:P?.[`name${z}`]??P?.nameFr??"EN QUELQUES CHIFFRES"}),(0,n.jsxs)("div",{className:"flex flex-col gap-[1.2rem]",children:[(P?.[`title${z}`]==void 0||""!=(P?.[`title${z}`]??"").trim())&&(0,n.jsx)(s.H2,{className:"!text-2xl",children:P?.[`title${(0,l.ZH)(t)}`]??P?.titleFr??"Titre mettant en valeur les r\xe9sultats des clients"}),(P?.[`description${z}`]==void 0||P?.[`description${z}`]!=""&&P?.[`description${z}`]!="\n"&&P?.[`description${z}`]!="<p><br></p>")&&(0,n.jsx)("div",{className:"sun-editor-editable !p-0 !text-dark1 !bg-transparent !text-base",dangerouslySetInnerHTML:{__html:P?.[`description${(0,l.ZH)(t)}`]??P?.descriptionFr??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat."}}),(0,n.jsx)("div",{className:"grid grid-cols-2 gap-6",children:O.filter((e,t)=>
9t<6).map((e,i)=>(0,n.jsx)(u,{data:e,lng:t},`service-${i}`))})]})]})]}):(0,n.jsxs)("div",{className:(0,l.cn)("flex flex-col md:flex-row justify-between items-center w-full gap-10 md:gap-28",!(P?.visibility==void 0||P?.visibility)&&"opacity-50",(P?.reversed!=void 0?P?.reversed:F)&&"flex-col-reverse md:flex-row-reverse"),style:{...P?.fontColor?{"--dark-1":P?.fontColor,"--dark-3":`${P?.fontColor}99`}:{}},children:[!P?.hideImage&&(0,n.jsxs)("div",{className:(0,l.cn)("block relative bg-gray-200 w-full max-w-[540px] md:w-[540px] aspect-[27/21] rounded-2xl md:shrink-0",H&&""!==H&&"bg-white"),style:{...P?.iconName&&P?.iconBgColor&&{background:P?.iconBgColor??"transparent"},aspectRatio:eo?540/(420*eo/100):void 0},children:[!P?.iconName&&(W&&""!=W?(0,n.jsx)(f.default,{video:W,thumbnail:V??"",sizes:"(max-width: 767px) 90vw, 540px"}):K&&""!=K?(0,n.jsx)(C.PdfViewer,{pdfUrl:K,thumbnailUrl:V,viewLabel:X?.view_document,sizes:"(max-width: 767px) 90vw, 540px"}):(0,n.jsx)(n.Fragment,{children:H&&""!==H&&(0,n.jsx)(w.ImageViewer,{imageUrl:H,style:{objectFit:P?.imageObject??"cover"},sizes:"(max-width: 767px) 90vw, 540px"})})),P?.iconName&&(0,n.jsx)(N.IconRenderer,{name:P?.iconName,className:"text-[min(420px,70vw)] w-full h-full flex items-center justify-center",color:P.iconColor,style:{fontSize:P?.iconSize??"",justifyContent:P?.iconHorizontalAlign??"center",alignItems:P?.iconVerticalAlign??"center"}})]}),(0,n.jsxs)("div",{className:"flex-1",children:[(P?.[`name${z}`]==void 0||""!=(P?.[`name${z}`]??"").trim())&&(0,n.jsx)(s.p$,{children:P?.[`name${z}`]??P?.nameFr??"EN QUELQUES CHIFFRES"}),(0,n.jsxs)("div",{className:"flex flex-col gap-[1.2rem]",children:[(P?.[`name${z}`]==void 0||""!=(P?.[`name${z}`]??"").trim())&&(0,n.jsx)(s.H2,{children:P?.[`title${(0,l.ZH)(t)}`]??P?.titleFr??"Titre mettant en valeur les r\xe9sultats des clients"}),(P?.[`description${z}`]==void 0||P?.[`description${z}`]!=""&&P?.[`description${z}`]!="\n"&&P?.[`description${z}`]!="<p><br></p>")&&(0,n.jsx)("div",{className:"sun-editor-editable !p-0 !text-dark1 !bg-transparent !text-base",dangerouslySetInnerHTML:{__html:P?.[`description${(0,l.ZH)(t)}`]??P?.descriptionFr??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat."}}),(0,n.jsx)("div",{className:"grid sm:grid-cols-2 gap-6",children:O.filter((e,t)=>t<6).map((e,i)=>(0,n.jsx)(u,{data:e,lng:t},`service-${i}`))})]})]})]})}},59959:(e,t,i)=>{"use strict";i.d(t,{s:()=>d});var n=i(95155),s=i(12115),l=i(6670),a=i(59434),r=i(30285),o=i(14636),c=i(62523);let d=(0,s.forwardRef)(({disabled:e,value:t,onChange:i,onOpenChange:d,onBlur:u,name:m,className:x,...p},f)=>{let h=function(e){let t=s.useRef(null);return s.useEffect(()=>{e&&("function"==typeof e?e(t.current):e.current=t.current)}),t}(f),[g,b]=(0,s.useState)(!1),v=(0,s.useMemo)(()=>t||"#FFFFFF",[t]);return(0,n.jsxs)(o.AM,{onOpenChange:function(e){b(e),d?.(e)},open:g,children:[(0,n.jsx)(o.Wv,{asChild:!0,disabled:e,onBlur:u,children:(0,n.jsx)(r.$,{...p,className:(0,a.cn)("block w-full",x),name:m,onClick:()=>{b(!0)},size:"icon",style:{backgroundColor:v},variant:"outline",children:(0,n.jsx)("div",{})})}),(0,n.jsxs)(o.hl,{className:"w-full","aria-describedby":"color-picker-popover",children:[(0,n.jsx)(l.dp,{color:v,onChange:i}),(0,n.jsx)(c.p,{className:"mt-2 w-full",maxLength:7,onChange:e=>{i(e?.currentTarget?.value)},ref:h,value:v})]})]})});d.displayName="ColorPicker"},60377:(e,t,i)=>{"use strict";i.d(t,{A:()=>A});var n=i(95155),s=i(12115),l=i(66424),a=i(74126),r=i(85690),o=i(57434),c=i(35562),d=i(58009);let u=(e,t=1)=>new Promise((i,n)=>{try{let s=document.createElement("video");s.setAttribute("src",e),s.crossOrigin="Anonymous",s.load(),s.addEventListener("error",e=>{n(`error when loading video file ${e}`)}),s.addEventListener("loadedmetadata",()=>{if(s.duration<t)return void n("video is too short.");setTimeout(()=>{s.currentTime=t},200),s.addEventListener("seeked",()=>{let e=document.createElement("canvas");e.width=s.videoWidth,e.height=s.videoHeight;let t=e.getContext("2d");t&&(t.drawImage(s,0,0,e.width,e.height),t.canvas.toBlob(e=>{if(e){let t=new FileReader;
9t.readAsDataURL(e),t.onloadend=function(){let n=t.result;i({blob:e,base64data:n,duration:s.duration})}}},"image/jpeg",1))})})}catch(e){n(e)}});var m=i(51012),x=i(66766),p=i(30285),f=i(11867),h=i(41046),g=i(18950),b=i(73096),v=i(56671),j=i(59434),N=i(67613),w=i(54165),y=i(22346);let k=({save:e})=>{let[t,i]=(0,s.useState)(""),[l,a]=(0,s.useState)(null),[r,o]=(0,s.useState)(""),[c,d]=(0,s.useState)(null),u=e=>{for(let t of[/(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([^&\n?#]+)/,/youtube\.com\/shorts\/([^&\n?#]+)/]){let i=e.match(t);if(i)return i[1]}return null},m=e=>{for(let t of[/vimeo\.com\/(?:video\/)?(\d+)/,/player\.vimeo\.com\/video\/(\d+)/]){let i=e.match(t);if(i)return i[1]}return null};return(0,s.useEffect)(()=>{let e=setTimeout(async()=>{if(!t.trim()){a(null),o("");return}let e=u(t);if(e){a(`https://img.youtube.com/vi/${e}/0.jpg`),d(`https://www.youtube.com/embed/${e}`),o("");return}let i=m(t);if(i)try{let e=await fetch(`https://vimeo.com/api/v2/video/${i}.json`);if(e.ok){let t=await e.json();a(t[0].thumbnail_large),d(`https://player.vimeo.com/video/${i}`),o("");return}}catch(e){o("Url de vimeo invalid"),a(null),d(null);return}o("Veuillez entre un url de Youtube ou Vimeo valide"),a(null),d(null)},500);return()=>clearTimeout(e)},[t]),(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Collez lâURL dâune vid\xe9o YouTube ou Vimeo"}),(0,n.jsx)("input",{type:"text",value:t,onChange:e=>i(e.target.value),placeholder:"https://www.youtube.com/watch?v=...",className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent outline-none transition"})]}),r&&(0,n.jsx)("div",{className:"mb-6 p-4 bg-red-50 border border-red-200 rounded-lg",children:(0,n.jsx)("p",{className:"text-red-600 text-sm",children:r})}),l&&(0,n.jsxs)("div",{className:"w-full flex justify-between items-end",children:[(0,n.jsx)("div",{className:"rounded-lg w-[224px] overflow-hidden shadow-lg",children:(0,n.jsx)("img",{src:l,alt:"Video thumbnail",className:"w-full aspect-video",onError:()=>{o("Erreur de chargement de la vid\xe9o"),a(null)}})}),(0,n.jsx)("div",{className:"flex justify-end",children:(0,n.jsx)(p.$,{type:"button",onClick:function(){e({video:t,thumbnail:l,embedUrl:c}),i(""),a(null),d(null),o("")},children:"Enregister"})})]}),!l&&!r&&t&&(0,n.jsx)("div",{className:"text-center py-12 text-gray-400",children:"Chargement de la vid\xe9o..."})]})};var C=i(2706),S=i(8117);async function $(e,t=2){let n=await i.e(2084).then(i.bind(i,13824));n.GlobalWorkerOptions.workerSrc="/pdf.worker.min.mjs";let s=await e.arrayBuffer(),l=await n.getDocument({data:s}).promise,a=await l.getPage(1),r=a.getViewport({scale:t}),o=document.createElement("canvas");o.width=r.width,o.height=r.height,await a.render({canvas:o,viewport:r}).promise;let c=o.toDataURL("image/jpeg",.85),d=await new Promise((e,t)=>{o.toBlob(i=>i?e(i):t(Error("Failed to create blob")),"image/jpeg",.85)});return o.width=0,o.height=0,{blob:d,dataUrl:c}}let A=({canBeVideo:e=!1,canBePdf:t=!1,setImageUrl:i,setVideoUrl:A,setPdfUrl:I,setCroppedImageUrl:F,updateElement:_,setOpen:E})=>{let L=m.n.use.access_token(),z=m.n.use.siteInfo(),B=m.n.use.navCommunity(),[T,P]=(0,s.useState)(1),[R,M]=(0,s.useState)(!1),[D,O]=(0,s.useState)(null),[U,V]=(0,s.useState)(""),[q,H]=(0,s.useState)(!1),[Z,J]=(0,s.useState)(!1),[G,W]=(0,s.useState)([]),[Q,K]=(0,s.useState)([]),[Y,X]=(0,s.useState)([]),[ee,et]=(0,s.useState)([]),[ei,en]=(0,s.useState)([]),[es,el]=(0,s.useState)([]),ea=(0,f.A)(!0),er=(0,s.useCallback)(e=>{J(!0),W([]);let t=[],i=[],n=[];for(let s=0;s<e.length;s++){let l=e[s];if(l.type.toLowerCase().includes("image/")){t.push(l);let e=new FileReader;e.readAsDataURL(l),e.onload=e=>{W(t=>[e.target?.result,...t]),J(!1)}}else if(l.type.toLowerCase().includes("video/")){let e=new FileReader;e.readAsDataURL(l),e.onload=e=>{u(e.target?.result).then(e=>{let{base64data:t,blob:n}=e,s=new File([n],l.name.split(".")[0]+"-thumbnail.jpeg",{type:"image/jpeg"});i.push({video:l,image:s}),K(e=>[t,...e]),J(!1)})}}else l.type.toLowerCase().includes("application/pdf")&&$(l).then(({blob:e,dataUrl:t})=>{let i=new File([e],l.name.split(".")[0]+"-thumbnail.jpeg",{type:"image/jpeg"});n.push({pdf:l,image:i}),X(e=>[t,...e]),J(!1)}).catch(e=>{console.error("Failed to generate PDF thumbnail:",e);let t=document.createElement("canvas");t.width=200,t.height=260;let i=t.getContext("2d");i&&(i.fillStyle="#f1f5f9",i.fillRect(0,0,200,260),i.fillStyle="#64748b",i.font="bold 16px sans-serif",i.textAlign="center",i.fillText("PDF",100,135),i.font="10px sans-serif",i.fillText(l.name.length>20?l.name.substring(0,20)+"...":l.name,100,155)),t.toBlob(e=>{if(e){let t=new FileReader;
9t.readAsDataURL(e),t.onloadend=function(){let i=t.result,s=new File([e],l.name.split(".")[0]+"-thumbnail.jpeg",{type:"image/jpeg"});n.push({pdf:l,image:s}),X(e=>[i,...e]),J(!1)}}},"image/jpeg",.8)})}et(t),en(i),el(n)},[]),{getRootProps:eo,getInputProps:ec}=(0,h.VB)({onDrop:er});function ed(e,t=!1,n,s=!1){if((ee.length>0||ei.length>0||es.length>0)&&!t){M(!0),V(e);return}_&&(s?_({newPdf:e,newImage:n}):1==T?_({newImage:e}):_({newVideo:e,newImage:n})),I&&s?(I(e),i(n)):i&&A&&1!=T?(A(e),i(n)):i&&1==T&&i(e),F&&1==T&&!s&&F(e),E(!1)}async function eu(){H(!0);try{let e=[];for(let t=0;t<ee.length;t++){let i=ee[t],n=(await (0,C.Se)({token:L,community:B,file:i})).data.data.fullMediaUrl;e.push(n)}let t=[];for(let e=0;e<ei.length;e++){let{video:i,image:n}=ei[e],s=(await (0,C.Se)({token:L,community:B,file:n})).data.data.fullMediaUrl,l=(await (0,C.Se)({token:L,community:B,file:i})).data.data.fullMediaUrl;t.push({video:l,thumbnail:s})}let i=[];for(let e=0;e<es.length;e++){let{pdf:t,image:n}=es[e],s=(await (0,C.Se)({token:L,community:B,file:n})).data.data.fullMediaUrl,l=(await (0,C.Se)({token:L,community:B,file:t})).data.data.fullMediaUrl;i.push({pdf:l,thumbnail:s})}let n=z?.config?.imagesLibrary??[],s=z?.config?.videosLibrary??[],l=z?.config?.pdfsLibrary??[];ea.mutate({siteId:z?.id??0,data:{config:{...z?.config,imagesLibrary:[...e,...n],videosLibrary:[...t,...s],pdfsLibrary:[...i,...l]}}}),v.o.success("Succ\xe8s",{description:"Les images/videos/PDFs sont bien enregistr\xe9s"}),W([]),K([]),X([]),et([]),en([]),el([])}catch(e){console.error(e),v.o.error("Erreur",{description:"Une erreur s'est produite lors de l'enregistrement"})}finally{H(!1),R&&""!=U&&(M(!1),ed(U,!0))}}async function em(e){let t=z?.config?.mediasLibrary??[];ea.mutate({siteId:z?.id??0,data:{config:{...z?.config,mediasLibrary:[...t,e]}}}),v.o.success("Succ\xe8s",{description:"La vid\xe9o int\xe9gr\xe9 est bien enregistr\xe9e"})}return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.F,{className:"h-full",children:(0,n.jsxs)("div",{className:"flex flex-col h-full",children:[(0,n.jsxs)("div",{className:"relative m-5",children:[(0,n.jsxs)("div",{className:(0,j.cn)("flex flex-col gap-1 items-center border border-dashed border-slate-500 rounded-lg px-5 py-10 cursor-pointer",(G.length>0||Y.length>0)&&!i&&"py-5"),...eo(),children:[(0,n.jsx)("input",{...ec(),accept:e?t?"image/*, video/*, application/pdf":"image/*, video/*":"image/*"}),G.length>0||Q.length>0||Y.length>0?(0,n.jsxs)("div",{className:"flex flex-wrap gap-2.5 w-full justify-start items-center",children:[G.map((e,t)=>(0,n.jsxs)("div",{className:"relative rounded-md flex-1 min-w-[calc(33%_-_10px)] max-w-[calc(33%_-_10px)] aspect-video bg-slate-900",children:[(0,n.jsx)(x.default,{alt:"",src:e,className:"rounded-md object-contain",fill:!0}),(0,n.jsx)(p.$,{variant:"destructive",className:"w-8 h-8 absolute right-2.5 top-2.5",onClick:e=>{e.stopPropagation(),e.preventDefault(),W(e=>e.filter((e,i)=>i!=t)),et(e=>e.filter((e,i)=>i!=t))},children:(0,n.jsx)(a.A,{})})]},t)),Q.map((e,t)=>(0,n.jsxs)("div",{className:"relative rounded-md flex-1 min-w-[calc(33%_-_10px)] max-w-[calc(33%_-_10px)] aspect-video bg-slate-900",children:[(0,n.jsx)(x.default,{alt:"",src:e,className:"rounded-md object-contain",fill:!0}),(0,n.jsx)(p.$,{variant:"destructive",className:"w-8 h-8 absolute right-2.5 top-2.5",onClick:e=>{e.stopPropagation(),e.preventDefault(),K(e=>e.filter((e,i)=>i!=t)),en(e=>e.filter((e,i)=>i!=t))},children:(0,n.jsx)(a.A,{})}),(0,n.jsx)(r.A,{size:30,className:"absolute top-[50%] left-[50%] -translate-x-[50%] -translate-y-[50%] text-white fill-white"})]},t)),Y.map((e,t)=>(0,n.jsxs)("div",{className:"relative rounded-md flex-1 min-w-[calc(33%_-_10px)] max-w-[calc(33%_-_10px)] aspect-video bg-slate-100",children:[(0,n.jsx)(x.default,{alt:"",src:e,className:"rounded-md object-contain",fill:!0}),(0,n.jsx)(p.$,{variant:"destructive",className:"w-8 h-8 absolute right-2.5 top-2.5",onClick:e=>{e.stopPropagation(),e.preventDefault(),X(e=>e.filter((e,i)=>i!=t)),el(e=>e.filter((e,i)=>i!=t))},children:(0,n.jsx)(a.A,{})}),(0,n.jsx)(o.A,{size:30,className:"absolute top-[50%] left-[50%] -translate-x-[50%] -translate-y-[50%] text-slate-700"})]},t))]}):(0,n.jsx)(n.Fragment,{children:Z?(0,n.jsx)("div",{className:"w-full flex justify-center items-center",children:(0,n.jsx)(N.A,{size:32,color:"#29394d",loading:!0})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.A,{size:52,className:"text-slate-700 mb-2"}),(0,n.jsx)("span",{className:"text-base font-medium text-slate-900",children:A||I||!i?"D\xe9posez vos images/videos/PDFs ici":"D\xe9posez vos images ici"}),(0,n.jsx)("span",{className:"text-sm font-medium text-slate-500",children:A||I||!i?"Cliquez ou faites glisser et d\xe9posez vos images/videos/PDFs ici":"Cliquez ou faites glisser et d\xe9posez vos images ici"})]})})]}),(0,n.jsx)("span",{className:"absolute bottom-O left-1/2 w-9 h-9 -translate-x-1/2 -translate-y-1/2 flex items-center justify-center bg-white text-sm font-medium text-slate-900 rounded-full after:absolute after:w-9 after:h-9 after:top-0 after:left-0 after:border after:border-dashed after:border-slate-500 after:border-b-transparent after:border-l-transparent after:rounded-full after:rotate-[-45deg]",children:"OU"})]}),(G.length>0||Q.length>0||Y.length>0)&&(0,n.jsx)("div",{className:"flex justify-end px-5",children:q?(0,n.jsx)(b.N,{}):(0,n.jsx)(p.$,{type:"button",onClick:eu,children:"Enregister"})}),(0,n.jsxs)("div",{className:(0,j.cn)("flex flex-col gap-1 mx-5 flex-1",(G.length>0||Q.length>0||Y.length>0)&&"mt-2.5"),children:[(0,n.jsx)("span",{className:"text-lg font-medium text-slate-900",children:I||A||!i?"Biblioth\xe8que d'images/videos/PDFs":"Biblioth\xe8que d'images"}),(0,n.jsx)("span",{className:"text-sm font-medium text-slate-500",children:I||A||!i?"La liste des images/videos/PDFs enregistr\xe9s dans la biblioth\xe8que":"La liste des images enregistr\xe9es dans la biblioth\xe8que"}),(0,n.jsxs)("div",{className:"flex items-center gap-2.5 my-2",children:[(0,n.jsx)("span",{className:(0,j.cn)("text-sm font-semibold text-slate-500 py-2 cursor-pointer",1==T&&"text-blue-400 border-b border-b-[2px] border-b-blue-400"),onClick:()=>P(1),children:"Images"}),(A||!i)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(y.w,{orientation:"vertical",className:"w-px !h-6 bg-slate-300"}),(0,n.jsx)("span",{className:(0,j.cn)("text-sm font-semibold text-slate-500 py-2 cursor-pointer",2==T&&"text-blue-400 border-b border-b-[2px] border-b-blue-400"),onClick:()=>P(2),children:"Vid\xe9os import\xe9es"}),(0,n.jsx)(y.w,{orientation:"vertical",className:"w-px !h-6 bg-slate-300"}),(0,n.jsx)("span",{className:(0,j.cn)("text-sm font-semibold text-slate-500 py-2 cursor-pointer",3==T&&"text-blue-400 border-b border-b-[2px] border-b-blue-400"),onClick:()=>P(3),children:"Vid\xe9os int\xe9gr\xe9es"})]}),(I||t)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(y.w,{orientation:"vertical",className:"w-px !h-6 bg-slate-300"}),(0,n.jsx)("span",{className:(0,j.cn)("text-sm font-semibold text-slate-500 py-2 cursor-pointer",4==T&&"text-blue-400 border-b border-b-[2px] border-b-blue-400"),onClick:()=>P(4),children:"PDFs"})]})]}),1==T&&(0,n.jsxs)(n.Fragment,{children:[0==(z?.config?.imagesLibrary??[]).length&&(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1.5 mx-auto text-center mt-2.5 border border-slate-500
9w-full p-8 rounded-sm flex-1",children:[(0,n.jsx)(d.A,{size:24,className:"text-slate-900"}),(0,n.jsx)("span",{className:"text-sm font-medium text-slate-700",children:"Biblioth\xe8que vide"})]}),(0,n.jsx)("div",{className:"flex flex-wrap gap-2.5 w-full justify-start items-center my-2.5",children:(z?.config?.imagesLibrary??[]).map((e,t)=>(0,n.jsxs)("div",{className:(0,j.cn)("relative rounded-md flex-1 min-w-[calc(33%_-_10px)] max-w-[calc(33%_-_10px)] aspect-video bg-slate-900 cursor-pointer",!i&&"cursor-default"),onClick:i?()=>ed(e):void 0,children:[(0,n.jsx)(x.default,{alt:"",src:e,className:"rounded-md object-contain",fill:!0}),(0,n.jsx)(p.$,{variant:"destructive",className:"w-8 h-8 absolute right-2.5 top-2.5",onClick:e=>{e.stopPropagation(),e.preventDefault(),O(t)},children:(0,n.jsx)(a.A,{})})]},t))})]}),2==T&&(0,n.jsxs)(n.Fragment,{children:[0==(z?.config?.videosLibrary??[]).length&&(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1.5 mx-auto text-center mt-2.5 border border-slate-500 w-full p-8 rounded-sm flex-1",children:[(0,n.jsx)(d.A,{size:20,className:"text-slate-900"}),(0,n.jsx)("span",{className:"text-sm font-medium text-slate-700",children:"Biblioth\xe8que vide"})]}),(0,n.jsx)("div",{className:"flex flex-wrap gap-2.5 w-full justify-start items-center my-2.5",children:(z?.config?.videosLibrary??[]).map(({video:e,thumbnail:t},i)=>(0,n.jsxs)("div",{className:(0,j.cn)("relative rounded-md flex-1 min-w-[calc(33%_-_10px)] max-w-[calc(33%_-_10px)] aspect-video bg-slate-900 cursor-pointer",!A&&"cursor-default"),onClick:A?()=>ed(e,!1,t):void 0,children:[(0,n.jsx)(x.default,{alt:"",src:t,className:"rounded-md object-contain",fill:!0}),(0,n.jsx)(p.$,{variant:"destructive",className:"w-8 h-8 absolute right-2.5 top-2.5",onClick:e=>{e.stopPropagation(),e.preventDefault(),O(i)},children:(0,n.jsx)(a.A,{})})]},i))})]}),3==T&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(k,{save:em}),0==(z?.config?.mediasLibrary??[]).length&&(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1.5 mx-auto text-center mt-2.5 border border-slate-500 w-full p-8 rounded-sm flex-1",children:[(0,n.jsx)(d.A,{size:20,className:"text-slate-900"}),(0,n.jsx)("span",{className:"text-sm font-medium text-slate-700",children:"Biblioth\xe8que vide"})]}),(0,n.jsx)("div",{className:"flex flex-wrap gap-2.5 w-full justify-start items-center my-2.5 py-1",children:(z?.config?.mediasLibrary??[]).map(({video:e,thumbnail:t,embedUrl:i},s)=>(0,n.jsxs)("div",{className:(0,j.cn)("relative rounded-md flex-1 min-w-[calc(33%_-_10px)] max-w-[calc(33%_-_10px)] aspect-video bg-slate-900 cursor-pointer",!A&&"cursor-default"),onClick:A?()=>ed(i??e,!1,t):void 0,children:[(0,n.jsx)(x.default,{alt:"",src:t,className:"rounded-md object-contain border border-slate-200",fill:!0}),(0,n.jsx)(p.$,{variant:"destructive",className:"w-8 h-8 absolute right-2.5 top-2.5",onClick:e=>{e.stopPropagation(),e.preventDefault(),O(s)},children:(0,n.jsx)(a.A,{})})]},s))})]}),4==T&&(0,n.jsxs)(n.Fragment,{children:[0==(z?.config?.pdfsLibrary??[]).length&&(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1.5 mx-auto text-center mt-2.5 border border-slate-500 w-full p-8 rounded-sm flex-1",children:[(0,n.jsx)(o.A,{size:20,className:"text-slate-900"}),(0,n.jsx)("span",{className:"text-sm font-medium text-slate-700",children:"Biblioth\xe8que vide"})]}),(0,n.jsx)("div",{className:"flex flex-wrap gap-2.5 w-full justify-start items-center my-2.5 py-1",children:(z?.config?.pdfsLibrary??[]).map(({pdf:e,thumbnail:t},i)=>(0,n.jsxs)("div",{className:(0,j.cn)("relative rounded-md flex-1 min-w-[calc(33%_-_10px)] max-w-[calc(33%_-_10px)] aspect-video bg-slate-100 cursor-pointer",!I&&"cursor-default"),onClick:I?()=>ed(e,!1,t,!0):void 0,children:[(0,n.jsx)(S.PdfViewer,{pdfUrl:e,thumbnailUrl:t,className:"rounded-md"}),(0,n.jsx)(p.$,{variant:"destructive",className:"w-8 h-8 absolute right-2.5 top-2.5",onClick:e=>{e.stopPropagation(),e.preventDefault(),O(i)},children:(0,n.jsx)(a.A,{})})]},i))})]})]})]})}),(G.length>0||Q.length>0||Y.length>0)&&(0,n.jsx)(g.tb,{className:"border-t border-t-slate-50 sticky bottom-0 left-0 bg-white",children:(0,n.jsx)("div",{className:"flex justify-start",children:(0,n.jsx)(p.$,{variant:"ghost",type:"button",onClick:()=>E(!1),children:"Annuler"})})}),R&&(0,n.jsx)(w.lG,{defaultOpen:!0,children:(0,n.jsxs)(w.Cf,{"aria-describedby":"need-action-to-save",children:[(0,n.jsx)(w.L3,{children:"Fichiers \xe0 enregistr\xe9s"}),(0,n.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,n.jsx)("span",{className:"text-sm text-slate-900",children:"Vous avez import\xe9 des fichiers qui nâont pas encore \xe9t\xe9 enregistr\xe9s dans la biblioth\xe8que. Avant dâappliquer la modification sur le bloc, souhaitez-vous les enregistrer?"}),(0,n.jsxs)(w.Es,{className:"mt-2.5",children:[(0,n.jsx)(w.HM,{asChild:!0,children:(0,n.jsx)(p.$,{variant:"outline",disabled:q,onClick:()=>{M(!1),ed(U,!0)},children:"Non"})}),(0,n.jsx)(w.HM,{asChild:!0,children:(0,n.jsx)(p.$,{type:"submit",disabled:q,onClick:eu,children:"Oui, enregistrer"})})]})]})]})}),null!=D&&(0,n.jsx)(w.lG,{defaultOpen:!0,children:(0,n.jsxs)(w.Cf,{"aria-describedby":"need-action-to-save",children:[(0,n.jsxs)(w.L3,{children:["Suppression ",1==T?"d'image":4==T?"de PDF":"de vid\xe9o"]}),(0,n.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,n.jsx)("span",{className:"text-sm text-slate-900",children:`Souhaitez-vous vraiment supprimer ${1==T?"l'image":4==T?"le PDF":"la vid\xe9o"} s\xe9lectionn\xe9e?`}),(0,n.jsxs)(w.Es,{className:"mt-2.5",children:[(0,n.jsx)(p.$,{variant:"outline",disabled:q,onClick:()=>{O(null)},children:"Non"}),(0,n.jsx)(p.$,{variant:"destructive",disabled:q,onClick:()=>{H(!0),1==T?function(e){let t=z?.config?.imagesLibrary??[];ea.mutate({siteId:z?.id??0,data:{config:{...z?.config,imagesLibrary:t.filter((t,i)=>i!=e)}}})}(D):2==T?function(e){let t=z?.config?.videosLibrary??[];ea.mutate({siteId:z?.id??0,data:{config:{...z?.config,videosLibrary:t.filter((t,i)=>i!=e)}}})}(D):4==T?function(e){let t=z?.config?.pdfsLibrary??[];ea.mutate({siteId:z?.id??0,data:{config:{...z?.config,pdfsLibrary:t.filter((t,i)=>i!=e)}}})}(D):function(e){let t=z?.config?.mediasLibrary??[];ea.mutate({siteId:z?.id??0,data:{config:{...z?.config,mediasLibrary:t.filter((t,i)=>i!=e)}}})}(D),setTimeout(()=>{O(null),H(!1)},1e3)},children:"Oui, supprimer"})]})]})]})})]})}},60379:(e,t,i)=>{"use strict";i.d(t,{default:()=>d});var n=i(95155),s=i(82178),l=i(85690),a=i(66766),r=i(12115),o=i(11155),c=i.n(o);let d=({video:e,thumbnail:t,sizes:i="100vw"})=>{let[o,d]=(0,r.useState)(!1),[u,m]=(0,r.useState)(!1),[x,p]=(0,r.useState)(!1),[f,h]=(0,r.useState)(!1),g=(0,r.useRef)(null),b=(0,r.useRef)(null);function v(){o?d(!1):(d(!0),u||m(!0),x||p(!0))}function j(){h(!0),clearTimeout(b.current),b.current=setTimeout(()=>{h(!1)},3e3)}return(0,n.jsxs)("div",{ref:g,className:"relative w-full h-full rounded-2xl [&>div>video]:rounded-2xl",onMouseEnter:j,onMouseMove:j,onMouseLeave:()=>h(!1),onClick:()=>
9h(!f),children:[(e.includes("youtube")||e.includes("vimeo"))&&(0,n.jsx)("iframe",{src:e,title:"vid\xe9o int\xe9gr\xe9e",className:"w-full h-full rounded-2xl",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}),!e.includes("youtube")&&!e.includes("vimeo")&&(0,n.jsx)(c(),{url:e,playing:o,controls:!0,volume:+!!x,width:"100%",height:"100%",config:{file:{attributes:{controlsList:"nodownload",disablePictureInPicture:"true"}}},style:{borderRadius:"1rem"},onPlay:()=>d(!0),onPause:()=>d(!1)}),!e.includes("youtube")&&!e.includes("vimeo")&&!u&&(0,n.jsxs)("div",{className:"absolute rounded-2xl w-full h-full top-[0] left-[0]",children:[!o&&(0,n.jsx)(a.default,{src:t,alt:"",className:"w-full h-full object-cover rounded-2xl",fill:!0,sizes:i}),(0,n.jsx)("div",{className:"cursor-pointer absolute top-[50%] left-[50%] -translate-x-[50%] -translate-y-[50%] bg-[#00000066] p-5 rounded-full",children:o?(0,n.jsx)(n.Fragment,{children:f&&(0,n.jsx)(s.A,{size:80,onClick:v,className:"text-white fill-white"})}):(0,n.jsx)(l.A,{size:80,onClick:v,className:"text-white fill-white"})})]})]})}},62977:(e,t,i)=>{"use strict";i.d(t,{bO:()=>f,i0:()=>p,ab:()=>m,Fu:()=>x});var n=i(26715),s=i(5041),l=i(56671),a=i(34477);let r=(0,a.createServerReference)("60841d92efdd8c550d0cd268c85a65d13d69e7683d",a.callServer,void 0,a.findSourceMapURL,"postPageAction");var o=i(5580),c=i(76203),d=i(45158);let u=(0,a.createServerReference)("40281dfc4cfb37b584953ff996dc093891133ca320",a.callServer,void 0,a.findSourceMapURL,"deletePageAction"),m=e=>{let t=(0,n.jE)();return(0,s.n)({mutationFn:({siteId:e,data:t})=>r(e,t),onSuccess:i=>{t.invalidateQueries({queryKey:["site-pages"]}),l.o.success("Succ\xe8s",{description:"Page bien enregistr\xe9e"}),e&&e(i.data.data)},onError:e=>{console.error(e),l.o.error("Erreur",{description:"Une erreur s'est produite lors de l'enregistrement de page"})}})},x=e=>{let t=(0,n.jE)();return(0,s.n)({mutationFn:({pageId:e,data:t})=>(0,o.R)(e,t),onSuccess:i=>{t.invalidateQueries({queryKey:["site-pages"]}),l.o.success("Succ\xe8s",{description:"Donn\xe9es du page bien enregistr\xe9s"}),e&&e(i.data.data)},onError:e=>{console.error(e),l.o.error("Erreur",{description:"Une erreur s'est produite lors de l'enregistrement des donn\xe9es"})}})},p=(e,t)=>{let i=(0,n.jE)();return(0,s.n)({mutationFn:({blocks:e,page:t})=>(0,c.s)(e,t),onSuccess:t=>{i.invalidateQueries({queryKey:["site-pages"]}),l.o.success("Succ\xe8s",{description:"Blocs bien enregistr\xe9s"}),e&&e(t?.data?.data?.pageBlocks)},onError:e=>{console.error(e),l.o.error("Erreur",{description:"Une erreur s'est produite lors de l'enregistrement des blocs"}),t&&t()}})},f=e=>{let t=(0,n.jE)();return(0,s.n)({mutationFn:async({page:e,menuId:t,menuStructure:i,noBlocks:n})=>(await (0,d.t)(t,i),n||await (0,c.s)([],e),u(e.id??0)),onSuccess:()=>{e&&e(),t.invalidateQueries({queryKey:["site-pages"]}),l.o.success("Succ\xe8s",{description:"Page bien supprim\xe9e"})},onError:e=>{console.error(e),l.o.error("Erreur",{description:"Erreur lors de la suppression de la page"})}})}},66424:(e,t,i)=>{"use strict";i.d(t,{F:()=>a});var n=i(95155);i(12115);var s=i(47655),l=i(59434);function a({className:e,children:t,...i}){return(0,n.jsxs)(s.bL,{"data-slot":"scroll-area",className:(0,l.cn)("relative",e),...i,children:[(0,n.jsx)(s.LM,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&>div]:h-full",children:t}),(0,n.jsx)(r,{}),(0,n.jsx)(s.OK,{})]})}function r({className:e,orientation:t="vertical",...i}){return(0,n.jsx)(s.VM,{"data-slot":"scroll-area-scrollbar",orientation:t,className:(0,l.cn)("flex touch-none p-px transition-colors select-none","vertical"===t&&"h-full w-2.5 border-l border-l-transparent","horizontal"===t&&"h-2.5 flex-col border-t border-t-transparent",e),...i,children:(0,n.jsx)(s.lr,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}},66461:(e,t,i)=>{"use strict";i.d(t,{A:()=>O});var n=i(95155),s=i(16225),l=i(59434),a=i(51012),r=i(16242),o=i(80119),c=i(71690),d=i(
956287),u=i(92657),m=i(78749),x=i(62525),p=i(5196),f=i(54416),h=i(12115),g=i(54165),b=i(30285),v=i(24357),j=i(10081),N=i(56671),w=i(51368),y=i(17313),k=i(47262),C=i(14636),S=i(17972),$=i(26715),A=i(40424),I=i(57674),F=i(76203);function _({currentPageBlocks:e,block:t,blockPosition:i,currentPageId:s}){let r=a.n.use.siteInfo(),o=a.n.use.siteMenu(),c=a.n.use.siteBlocks(),d=a.n.use.reload(),u=a.n.use.setReload(),m=(0,$.jE)(),[x,p]=(0,h.useState)([]),[_,E]=(0,h.useState)(!1),[L,z]=(0,h.useState)(!0),[B,T]=(0,h.useState)(!0),[P,R]=(0,h.useState)(!1);async function M(){E(!0);try{let{data:e}=await (0,A.q)(Number(r?.id??0));for(let i of x){let n=e.find(e=>Number(e.id)===Number(i));if(n){let e=await (0,I.i)(Number(i)??0),s=(0,w.A)(),l=[...e.map(e=>({...e.siteBlock,blockId:e.id,blockParentId:e.blockParentId,content:e.content,uuid:(0,w.A)()})),{...t,uuid:s}];await O(l,n)}}N.o.success("Succ\xe8s",{description:"Le bloc a bien \xe9t\xe9 ajout\xe9 \xe0 les pages s\xe9l\xe9ctionn\xe9es"})}catch(e){console.error(e),N.o.error("Erreur",{description:"Une erreur est survenue, re-essayer plus tard"}),E(!1)}}async function D(){if(s){E(!0);try{let{data:n}=await (0,A.q)(Number(r?.id??0)),l=n.find(e=>Number(e.id)===Number(s));if(l){let n=(0,w.A)(),s=[...e],a=c.find(e=>e.identifier==t.identifier);s.splice(B?i+1:i,0,{...L?{...t,uuid:n}:{...a,uuid:n}}),await O(s,l),N.o.success("Succ\xe8s",{description:`Le bloc a bien \xe9t\xe9 ajout\xe9 \xe0 la page "${l.nameFr}"`}),m.invalidateQueries({queryKey:["getSitePages","site-info","sites"]}),u(!d)}}catch(e){console.error(e),N.o.success("Erreur",{description:"Une erreur est survenue, re-essayer plus tard"})}finally{E(!1)}}}async function O(e,t){let i=e.map((e,t)=>({siteBlock:e,order:t+1,content:e.content}));await (0,F.s)(i,t)}let U=e=>{p(x.filter(t=>e!==t))},V=e=>{for(let t of o){if(t.pageId===e)return t.labelFr;if((t.children??[]).length>0){for(let i of t.children??[])if(i.pageId===e)return`${t.labelFr} | ${i.labelFr}`}}};return(0,n.jsxs)(g.lG,{children:[(0,n.jsx)(g.zM,{asChild:!0,children:(0,n.jsx)("li",{title:"Duplicate",className:"flex h-8 w-8 cursor-pointer items-center justify-center rounded-sm bg-blue-400 p-0 text-white",children:(0,n.jsx)(v.A,{size:20})})}),(0,n.jsxs)(g.Cf,{"aria-describedby":"block-duplicater",children:[(0,n.jsx)(g.L3,{children:"Dupliquer le bloc"}),(0,n.jsx)("div",{className:"flex flex-col gap-3 mb-3",children:(0,n.jsxs)(y.tU,{defaultValue:"same_page",className:"flex flex-col w-full h-full",children:[(0,n.jsxs)(y.j7,{className:"w-full mb-4 h-auto bg-slate-900 gap-1",children:[(0,n.jsx)(y.Xi,{className:"cursor-pointer flex-1 flex gap-2 py-2 h-auto text-basis bg-transparent text-white hover:bg-[#FFFFFF22] data-[state=active]:bg-white data-[state=active]:text-slate-900",value:"same_page",children:"M\xeame page"}),(0,n.jsx)(y.Xi,{className:"cursor-pointer flex-1 flex gap-2 py-2 h-auto text-basis bg-transparent text-white hover:bg-[#FFFFFF22] data-[state=active]:bg-white data-[state=active]:text-slate-900",value:"other_page",children:"Autres pages"})]}),(0,n.jsxs)(y.av,{value:"same_page",className:"flex-1 flex flex-col gap-4",children:[(0,n.jsxs)("div",{className:"flex justify-between items-center w-full",children:[(0,n.jsx)("label",{htmlFor:"keep-content",className:"cursor-pointer text-sm text-slate-900",children:"Dupliquer en gardent le m\xeame contenu"}),(0,n.jsx)(k.S,{id:"keep-content",checked:L,onCheckedChange:e=>z(!!e.valueOf())})]}),(0,n.jsxs)("div",{className:"self-stretch inline-flex justify-start items-center gap-5",children:[(0,n.jsx)("div",{className:(0,l.cn)("flex-1 p-2.5 bg-gray-100 rounded-lg outline outline-1 outline-offset-[-0.50px] outline-gray-300 flex justify-center items-center gap-2.5 cursor-pointer",B&&"!bg-white shadow-[0px_4px_4px_0px_rgba(0,0,0,0.25)] outline outline-1 outline-offset-[-0.50px] outline-slate-900"),onClick:()=>T(!0),children:(0,n.jsxs)("div",{className:"flex-1 inline-flex flex-col justify-center items-start gap-2.5",children:[(0,n.jsxs)("div",{className:"self-stretch inline-flex justify-between items-start",children:[(0,n.jsx)("div",{className:"w-5 h-5 flex justify-center items-center rounded-full border-2 border-slate-900 bg-white",children:B&&(0,n.jsx)("div",{className:"w-2.5 h-2.5 bg-slate-900 rounded-full"})}),(0,n.jsx)("div",{className:"w-24 inline-flex flex-col justify-start items-end gap-[3px]",children:(0,n.jsxs)("div",{className:"flex flex-col justify-start items-start gap-[3px]",children:[(0,n.jsx)("div",{className:"inline-flex justify-start items-center gap-[3px]",children:(0,n.jsx)("div",{className:"w-8 h-5 relative opacity-20 bg-slate-500 rounded-[5px]"})}),(0,n.jsx)("div",{className:"w-8 h-5 relative bg-slate-900 rounded-[5px]"})]})})]}),(0,n.jsx)("div",{className:"self-stretch flex flex-col justify-end items-start gap-2.5",children:(0,n.jsx)("div",{className:"self-stretch flex flex-col justify-start items-start gap-1.5",children:(0,n.jsx)("div",{className:"self-stretch flex flex-col justify-start items-start",children:(0,n.jsx)("div",{className:"self-stretch justify-start",children:(0,n.jsx)("span",{className:"text-slate-900 text-base font-semibold leading-snug",children:"En dessous"})})})})})]})}),(0,n.jsx)("div",{className:(0,l.cn)("flex-1 p-2.5 bg-gray-100 rounded-lg outline outline-1 outline-offset-[-0.50px] outline-gray-300 flex justify-center items-center gap-2.5 cursor-pointer",!B&&"!bg-white shadow-[0px_4px_4px_0px_rgba(0,0,0,0.25)] outline outline-1 outline-offset-[-0.50px] outline-slate-900"),onClick:()=>T(!1),children:(0,n.jsxs)("div",{className:"flex-1 inline-flex flex-col justify-center items-start gap-2.5",children:[(0,n.jsxs)("div",{className:"self-stretch inline-flex justify-between items-start",children:[(0,n.jsx)("div",{className:"w-5 h-5 flex justify-center items-center rounded-full border-2 border-slate-900 bg-white",children:!B&&(0,n.jsx)("div",{className:"w-2.5 h-2.5 bg-slate-900 rounded-full"})}),(0,n.jsx)("div",{className:"w-24 inline-flex flex-col justify-start items-end gap-[3px]",children:(0,n.jsxs)("div",{className:"flex flex-col justify-start items-start gap-[3px]",children:[(0,n.jsx)("div",{className:"w-8 h-5 relative bg-slate-900 rounded-[5px]"}),(0,n.jsx)("div",{className:"inline-flex justify-start items-center gap-[3px]",children:(0,n.jsx)("div",{className:"w-8 h-5 relative opacity-20 bg-slate-500 rounded-[5px]"})})]})})]}),(0,n.jsx)("div",{className:"self-stretch flex flex-col justify-end items-start gap-2.5",children:(0,n.jsx)("div",{className:"self-stretch flex flex-col justify-start items-start gap-1.5",children:(0,n.jsx)("div",{className:"self-stretch flex flex-col justify-start items-start",children:(0,n.jsx)("div",{className:"self-stretch justify-start text-slate-900 text-base font-semibold leading-snug",children:"Au dessus"})})})})]})})]}),(0,n.jsxs)(g.Es,{className:"mt-2.5",children:[(0,n.jsx)(g.HM,{asChild:!0,children:(0,n.jsx)(b.$,{variant:"outline",disabled:_,children:"Annuler"})}),(0,n.jsx)(g.HM,{asChild:!0,children:(0,n.jsx)(b.$,{type:"submit",disabled:_,onClick:D,children:"Dupliquer"})})]})]}),(0,n.jsxs)(y.av,{value:"other_page",className:"flex-1 flex flex-col gap-4",children:[(0,n.jsx)("span",{className:"cursor-pointer text-sm text-slate-900",children:"Veuillez choisir les pages sur lequels vous souhaitez dupliquer le bloc:"}),(0,n.jsxs)(C.AM,{open:P,onOpenChange:R,children:[(0,n.jsx)(C.Wv,{asChild:!0,children:(0,n.jsxs)(b.$,{variant:"outline",role:"combobox","aria-expanded":P,className:"w-full justify-between px-3 py-2 h-auto hover:bg-transparent",children:[x.length>0?(0,n.jsx)("div",{className:"flex gap-1.5 flex-wrap",children:x.map(e=>(0,n.jsxs)("div",{className:"cursor-pointer flex py-1.5 px-2.5 gap-1.5 items-center rounded-md p-[1.25rem_1rem_1rem_1rem] border border-1px border-slate-200",onClick:()=>U(e),children:[(0,n.jsx)("span",{className:"font-medium text-xs text-slate-500",children:V(e)}),(0,n.jsx)(f.A,{className:"w-2.5 h-2.5 text-slate-500"})]},e))}):"S\xe9lectionner les pages",(0,n.jsx)(j.A,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,n.jsx)(C.hl,{className:"w-[var(--radix-popover-trigger-width)] p-0","aria-describedby":"manage-products-popover",children:(0,n.jsx)(S.uB,{children:(0,n.jsxs)(S.oI,{className:"max-w-full",children:[o.filter(e=>!e.externalLink&&"PAGE"===e.type).map((e,t)=>(0,n.jsxs)(S.h_,{value:e.pageId?.toString()??"",children:[(0,n.jsx)(k.S,{checked:x.includes(e.pageId?.toString()??""),onCheckedChange:t=>{t.valueOf()&&p(t=>[...t,e.pageId?.toString()??""])}}),e.labelFr,e.needsLogin&&(0,n.jsx)("span",{className:"ml-auto text-xs text-slate-500",children:"Besoin d'authentification"})]},t)),o.filter(e=>e.children).map((e,t)=>{let i=[];for(let t of e.children??[])"PAGE"!==t.type||t.externalLink||i.push(t);return(0,n.jsx)(h.Fragment,{children:i.map((i,s)=>(0,n.jsxs)(S.h_,{value:i.pageId?.toString()??"",children:[(0,n.jsx)(k.S,{checked:x.includes(i.pageId?.toString()??""),onCheckedChange:e=>{e.valueOf()&&p(e=>[...e,i.pageId?.toString()??""])}}),e.labelFr,"\xa0|\xa0",i.labelFr]},`${t}-${s}`))},t)})]})})})]}),(0,n.jsxs)(g.Es,{className:"mt-2.5",children:[(0,n.jsx)(g.HM,{asChild:!0,children:(0,n.jsx)(b.$,{variant:"outline",disabled:_,children:"Annuler"})}),(0,n.jsx)(g.HM,{asChild:!0,children:(0,n.jsx)(b.$,{type:"submit",disabled:_,onClick:M,children:"Dupliquer"})})]})]})]})})]})]})}var E=i(5953),L=i(91064),z=i(73553),B=i(18497),T=i(26258),P=i(59959);let R=({showImageObject:e,setShowColorSelect:t,setBoxColor:i,setBgColor:r,setImageObject:o,setFontColor:c,showColorsSelect:d,boxColor:u,bgColor:m,imageObject:x,fontColor:p})=>{let g=a.n.use.siteInfo();(0,T.x)(()=>t(!1));let[b,v]=(0,h.useState)(p),[j,N]=(0,h.useState)(u),[w,y]=(0,h.useState)(m);return(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("li",{title:"bg-modifier",className:"flex h-8 w-8 cursor-pointer items-center justify-center rounded-sm bg-blue-400 p-1 text-white",onClick:()=>t(!d),children:d?(0,n.jsx)(f.A,{size:20}):(0,n.jsx)(E.A,{size:20})}),(0,n.jsxs)("div",{className:(0,l.cn)("absolute top-1/2 left-9 -translate-y-1/2 bg-white shadow-lg p-0 rounded-sm gap-4 flex flex-col items-start w-auto max-w-0 overflow-hidden box-content",d&&"max-w-[256px] w-[224px] py-4 px-5 transition-all border border-slate-400"),children:[(0,n.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,n.jsxs)("div",{className:"relative flex gap-3 justify-between items-center w-full",children:[(0,n.jsx)("span",{className:"text-xs text-slate-900 font-semibold",children:"⺠Couleur de la box"}),(0,n.jsx)(P.s,{onChange:e=>N(e),className:(0,l.cn)("relative rounded-full border-slate-400 w-8 h-8 !mt-0",j==u&&!(g?.config?.blockBoxColors?.reduce((e,t)=>
9[...e,t.color],[])??s.u0).includes(j??g?.config?.blockBoxColors?.find(e=>e.isDefault)?.color??"#F1F5F9")&&"border border-[2px] border-slate-700"),"aria-describedby":"color-picker",value:j??g?.config?.blockBoxColors?.find(e=>e.isDefault)?.color??"#F1F5F9",onOpenChange:function(e){e||(j??g?.config?.blockBoxColors?.find(e=>e.isDefault)?.color??"#F1F5F9")==(u??g?.config?.blockBoxColors?.find(e=>e.isDefault)?.color??"#F1F5F9")||i(j)},onClick:e=>e.stopPropagation()})]}),(0,n.jsx)("div",{className:"gap-2 flex items-start flex-wrap w-full",children:(g?.config?.blockBoxColors?.reduce((e,t)=>[...e,t.color],[])??s.u0).map((e,t)=>(0,n.jsxs)("div",{className:"w-[calc(33%_-_8px)] flex flex-col gap-1.5 items-center min-w-[60px]",children:[(0,n.jsx)("div",{title:e,className:(0,l.cn)("flex w-8 h-8 cursor-pointer items-center justify-center rounded-sm border border-[2px] border-slate-200",(u??g?.config?.blockBoxColors?.find(e=>e.isDefault)?.color??"#F1F5F9")==e&&"border-[3px] border-slate-700"),style:{background:e},onClick:()=>{i(e)}}),(0,n.jsxs)("span",{className:"text-[11px] font-medium text-slate-900 text-center",children:[e,g?.config?.blockBoxColors?.find(t=>t.color==e)?.isDefault&&(0,n.jsxs)("em",{className:"not-italic text-[10px] whitespace-nowrap",children:[(0,n.jsx)("br",{}),"(Par d\xe9faut)"]})]})]},t))})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,n.jsxs)("div",{className:"relative flex gap-3 justify-between items-center w-full",children:[(0,n.jsx)("span",{className:"text-xs text-slate-900 font-semibold",children:"⺠Couleur du fond"}),(0,n.jsx)(P.s,{onChange:e=>y(e),className:(0,l.cn)("relative rounded-full border-slate-400 w-8 h-8 !mt-0",w==m&&!(g?.config?.blockBgColors?.reduce((e,t)=>[...e,t.color],[])??s.u0).includes(w??g?.config?.blockBgColors?.find(e=>e.isDefault)?.color??"#F1F5F9")&&"border border-[2px] border-slate-700"),"aria-describedby":"color-picker",value:w??g?.config?.blockBgColors?.find(e=>e.isDefault)?.color??"#F1F5F9",onOpenChange:function(e){e||(w??g?.config?.blockBgColors?.find(e=>e.isDefault)?.color??"#F1F5F9")==(m??g?.config?.blockBgColors?.find(e=>e.isDefault)?.color??"#F1F5F9")||r(w)},onClick:e=>e.stopPropagation()})]}),(0,n.jsx)("div",{className:"gap-2 flex items-start flex-wrap",children:(g?.config?.blockBgColors?.reduce((e,t)=>[...e,t.color],[])??s.u0).map((e,t)=>(0,n.jsxs)("div",{className:"flex flex-col gap-1.5 items-center min-w-[60px]",children:[(0,n.jsx)("div",{title:e,className:(0,l.cn)("flex w-8 h-8 cursor-pointer items-center justify-center rounded-sm border border-[2px] border-slate-200",(m??g?.config?.blockBgColors?.find(e=>e.isDefault)?.color??"#F1F5F9")==e&&"border-[3px] border-slate-700"),style:{background:e},onClick:()=>{r(e)}}),(0,n.jsxs)("span",{className:"text-[11px] font-medium text-slate-900 text-center",children:[e,g?.config?.blockBgColors?.find(t=>t.color==e)?.isDefault&&(0,n.jsxs)("em",{className:"not-italic text-[10px] whitespace-nowrap",children:[(0,n.jsx)("br",{}),"(Par d\xe9faut)"]})]})]},t))})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-1 w-full",children:[(0,n.jsxs)("div",{className:"relative flex gap-3 justify-between items-center w-full",children:[(0,n.jsx)("span",{className:"text-xs text-slate-900 font-semibold",children:"⺠Couleur de texte"}),(0,n.jsx)(P.s,{onChange:e=>v(e),className:"relative rounded-full border-slate-400 w-8 h-8 !mt-0","aria-describedby":"color-picker",value:b??g?.config?.textDefaultColor??"#29394D",onOpenChange:function(e){e||(b??g?.config?.textDefaultColor??"#29394D")==(p??g?.config?.textDefaultColor??"#29394D")||c(b)},onClick:e=>e.stopPropagation()})]}),(0,n.jsx)("span",{className:"text-xs text-slate-900 font-semibold underline cursor-pointer",onClick:()=>c(null),children:"R\xe9initialiser \xe0 la valeur par d\xe9faut"})]}),e&&(0,n.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,n.jsx)("span",{className:"text-xs text-slate-900 font-semibold",children:"⺠Mode de rendu des images de la box"}),(0,n.jsxs)("div",{className:"gap-2 flex items-start",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-1.5 items-center min-w-[60px]",children:[(0,n.jsx)("div",{title:"Image fill the container",className:(0,l.cn)("flex w-8 h-8 cursor-pointer items-center justify-center rounded-xs rounded-sm bg-white border border-[2px] border-slate-200",(x??"cover")=="fill"&&"border-[3px] border-slate-700"),onClick:()=>{o("fill")},children:(0,n.jsx)(L.A,{size:20})}),(0,n.jsx)("span",{className:"text-[11px] font-medium text-slate-900 text-center",children:"Fill"})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-1.5 items-center min-w-[60px]",children:[(0,n.jsx)("div",{title:"The container contains the image",className:(0,l.cn)("flex w-8 h-8 cursor-pointer items-center justify-center rounded-xs rounded-sm bg-white border border-[2px] border-slate-200",(x??"cover")=="contain"&&"border-[3px] border-slate-700"),onClick:()=>{o("contain")},children:(0,n.jsx)(z.A,{size:20})}),(0,n.jsx)("span",{className:"text-[11px] font-medium text-slate-900 text-center",children:"Contain"})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-1.5 items-center min-w-[60px]",children:[(0,n.jsx)("div",{title:"The image covers the container",className:(0,l.cn)("flex w-8 h-8 cursor-pointer items-center justify-center rounded-xs rounded-sm bg-white border border-[2px] border-slate-200",(x??"cover")=="cover"&&"border-[3px] border-slate-700"),onClick:()=>{o("cover")},children:(0,n.jsx)(B.A,{size:20})}),(0,n.jsx)("span",{className:"text-[11px] font-medium text-slate-900 text-center",children:"Cover"})]})]})]})]})]})};var M=i(75376);let D=["fr","nl","en"],O=({children:e,block:t,blockPosition:i,currentPageId:g,parentId:b,editable:v,editTheBlock:j,needToSaveBlock:N,blockLanguage:w,blocksVisibility:y,isEventsSlider:k,currentPageBlocks:C,setEditTheBlock:S,setSaveTheBlock:$,setCancelBlockChanges:A,setVisibility:I,setBlockLanguage:F,onDelete:E,updateBlockContent:L,disabled:z=!1})=>{let B=(0,r.m)(),T=a.n.use.user(),P=a.n.use.siteInfo(),[O,U]=(0,h.useState)(!1);return(0,n.jsx)(o.N,{value:t.uuid,dragListener:!1,dragControls:B,children:(0,n.jsxs)("div",{"data-id":t.uuid,"data-blockid":b&&0!=b?b:t.blockId??t.id,className:"group/section w-full !px-0 relative select-none",children:[(0,n.jsxs)("ul",{className:(0,l.cn)("group-hover/section:flex absolute left-[max(calc((100%_-_1400px)/2_-_42px),24px)] top-0 z-[2] flex-col gap-2 hidden",v&&(j[t.uuid]||O)&&!k&&"!flex",z&&!j[t.uuid]&&"!hidden"),children:[(!j[t.uuid]||!v||k)&&
9(0,n.jsxs)(n.Fragment,{children:[(s.wk.includes(T?.type??"")||P&&"PERSONALIZED"==P.type)&&(0,n.jsx)("li",{title:"drag",className:"flex h-8 w-8 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",onPointerDown:e=>B.start(e),children:(0,n.jsx)(c.A,{size:20,className:"ml-1"})}),v&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("li",{title:"Edit",className:"flex h-8 w-8 cursor-pointer items-center justify-center rounded-sm bg-blue-400 p-0 text-white",onClick:function(){A({...j,[t.uuid]:!1}),S({...j,[t.uuid]:!j[t.uuid]}),j[t.uuid]||F({...w,[t.uuid]:"fr"})},children:(0,n.jsx)(d.A,{size:20})})}),I&&(0,n.jsx)("li",{className:"flex h-8 w-8 cursor-pointer items-center justify-center rounded-sm bg-blue-400 p-0 text-white",title:void 0==y[t.uuid]||y[t.uuid]?"Hide":"Show",onClick:()=>I({...y,[t.uuid]:!(void 0==y[t.uuid]||y[t.uuid])}),children:void 0==y[t.uuid]||y[t.uuid]?(0,n.jsx)(u.A,{size:20}):(0,n.jsx)(m.A,{size:20})}),(s.wk.includes(T?.type??"")||P&&"PERSONALIZED"==P.type)&&(0,n.jsx)(n.Fragment,{children:E&&(0,n.jsx)("li",{title:"Delete",className:"flex h-8 w-8 cursor-pointer items-center justify-center rounded-sm bg-blue-400 p-0 text-white",onClick:()=>E(),children:(0,n.jsx)(x.A,{size:20})})}),(s.wk.includes(T?.type??"")||P&&"PERSONALIZED"==P.type)&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(_,{currentPageBlocks:C,block:t,blockPosition:i,currentPageId:g})}),(s.wk.includes(T?.type??"")||P&&"PERSONALIZED"==P.type)&&!k&&v&&!["footer","carousel","events-slide"].includes(t.identifier)&&L&&(0,n.jsx)(R,{showImageObject:["about","services","flipping-cards","partners","numbers","team","cta","slider"].includes(t?.identifier??""),showColorsSelect:O,setShowColorSelect:U,boxColor:t?.content?.currentColor,setBoxColor:e=>L(t?.uuid??"",{...t?.content,currentColor:e}),bgColor:t?.content?.bgColor,setBgColor:e=>L(t?.uuid??"",{...t?.content,bgColor:e}),imageObject:t?.content?.imageObject,setImageObject:e=>L(t?.uuid??"",{...t?.content,imageObject:e}),fontColor:t?.content?.fontColor,setFontColor:e=>L(t?.uuid??"",{...t?.content,fontColor:e})})]}),v&&j[t.uuid]&&!k&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("li",{title:"save",className:"relative flex h-8 w-8 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",onClick:()=>$({...j,[t.uuid]:!0}),children:[(0,n.jsx)(p.A,{size:20}),N[t.uuid]&&(0,n.jsx)("div",{className:"absolute left-9 bg-white p-4 w-[300px] rounded-sm shadow-lg pointer-events-none border border-[1px] border-slate-200",children:(0,n.jsx)("span",{className:"text-sm font-normal text-dark1",children:"Voulez-vous enregistrer les modifications effectu\xe9es sur ce bloc ?"})})]}),(0,n.jsx)("li",{title:"cancel",className:"flex h-8 w-8 cursor-pointer items-center justify-center rounded-sm bg-blue-400 text-white",onClick:function(){A({...j,[t.uuid]:!0}),S({...j,[t.uuid]:!1}),F({...w,[t.uuid]:"fr"})},children:(0,n.jsx)(f.A,{size:20})}),D.map((e,i)=>("en"!=e||P?.config?.hasEnLng)&&("nl"!=e||P?.config?.hasNlLng)?(0,n.jsx)("li",{title:e,tabIndex:0,className:(0,l.cn)("flex h-8 w-8 cursor-pointer items-center justify-center rounded-sm bg-blue-400 p-0 text-white",w[t.uuid]===e.toLowerCase()&&"border-[1px] border-blue-400 bg-white text-blue-400",0===i&&"mt-10"),onClick:()=>F({...w,[t.uuid]:e.toLowerCase()}),children:e.toUpperCase()},e):null)]})]}),(0,n.jsx)("div",{className:(0,l.cn)("mb-5 container w-[calc(100%_-_8rem)] mx-auto rounded border border-dashed border-sky-500 p-5"),style:{background:`${t?.content?.currentColor??P?.config?.blockBoxColors?.find(e=>e.isDefault)?.color??"#F1F5F9"}`},children:(0,n.jsx)(M.H,{initValue:{content:t},children:e})})]})},t.uuid)}},66629:(e,t,i)=>{"use strict";i.d(t,{default:()=>eP});var n=i(95155),s=i(12115),l=i(90506),a=i(51012),r=i(74783),o=i(47863),c=i(66474),d=i(51154),u=i(15804),m=i(59434),x=i(22912),p=i(16225),f=i(47203),h=i(35092),g=i(88900),b=i(18609),v=i(58610),j=i(12271),N=i(30329),w=i(66766),y=i(6874),k=i.n(y),C=i(35695),S=i(62977),$=i(11867),A=i(14436),I=i(63560),F=i(95882),_=i(99128),E=i(65796),L=i(40850),z=i(13717),B=i(74126),T=i(84616),P=i(381),R=i(62177),M=i(51368),D=i(30285),O=i(18199),U=i(66461),V=i(73096),q=i(502),H=i(17313),Z=i(17759),J=i(18950),G=i(62523),W=i(47262),Q=i(53189),K=i(14332),Y=i(29532),X=i(28844),ee=i(27502),et=i(22346),ei=i(97585),en=i(15548),es=i(60377),el=i(1473),ea=i(85892),er=i(45419),eo=i(44720),ec=i(57161),ed=i(27941),eu=i(70490),em=i(84311),ex=i(33978),ep=i(685),ef=i(56671),eh=i(47368),eg=i(41583),eb=i(10810),ev=i(57674),ej=i(45158),eN=i(76532),ew=i(5580),ey=i(26004),ek=i(2320),eC=i(91241),eS=i(55946);let e$=({logosUrl:e,setLogosUrl:t,organizationInfo:i,currentPage:l,setCurrentPage:r,currentPageId:o,setCurrentPageId:y,currentBlockId:k,setCurrentBlockId:C,blocks:e$,setBlocks:eA,isPageLoading:eI,setIsPageLoading:eF,menuStructure:e_,setMenuStructure:eE,pages:eL,initialBlocks:ez})=>
9{let eB=a.n.use.siteInfo(),eT=a.n.use.siteBlocks(),eP=a.n.use.user(),eR=a.n.use.navCommunity(),eM=a.n.use.reload(),eD=a.n.use.checkForUnsave(),eO=a.n.use.setSiteBlocks(),eU=a.n.use.setReload(),eV=a.n.use.setCheckForUnsave(),eq=a.n.use.setEditMode(),{goToBlock:eH}=(0,x.A)({menuStructure:e_}),[eZ,eJ]=(0,s.useState)(null),[eG,eW]=(0,s.useState)(!1),[eQ,eK]=(0,s.useState)(!1),[eY,eX]=(0,s.useState)(!1),[e0,e1]=(0,s.useState)(null),[e2,e5]=(0,s.useState)(null),[e3,e4]=(0,s.useState)(null),[e9,e6]=(0,s.useState)(!1),[e8,e7]=(0,s.useState)(!1),[te,tt]=(0,s.useState)(!1),[ti,tn]=(0,s.useState)(!1),[ts,tl]=(0,s.useState)({}),[ta,tr]=(0,s.useState)({}),[to,tc]=(0,s.useState)({}),[td,tu]=(0,s.useState)({}),[tm,tx]=(0,s.useState)({}),[tp,tf]=(0,s.useState)({}),[th,tg]=(0,s.useState)(null),tb=(0,s.useRef)(!1),tv=(0,s.useRef)(!1),tj=(0,s.useRef)(null),[tN,tw]=(0,s.useState)(void 0),[ty,tk]=(0,s.useState)(!1),[tC,tS]=(0,s.useState)(!1),[t$,tA]=(0,s.useState)(1),[tI,tF]=(0,s.useState)(null),[t_,tE]=(0,s.useState)(!1),[tL,tz]=(0,s.use
9State)(!1),[tB,tT]=(0,s.useState)(!1);(0,s.useEffect)(()=>{(0,eg.G)().then(eO)},[]),(0,s.useEffect)(()=>{let e=e=>{if(tL)return e.preventDefault(),e.returnValue="",""};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}},[tL]),(0,s.useEffect)(()=>{if(eD)if(tL)return void tg(l);else eV(!1),eq(!1)},[eD]),(0,s.useEffect)(()=>{let e=async()=>{try{await (0,eb.T)(Number(eB?.id??0)).then(e=>{e&&e?.structure&&eE(e.structure),tF(e?.id??null)}).catch(e=>{console.error("Error fetching menu:",e)})}catch(e){eF(!1),console.error("Error fetching data:",e)}};eB&&e()},[eB,eM]),(0,s.useEffect)(()=>{let e=()=>{if(null===k&&e_&&e_.length>0&&e_[0].blockId){let e=document.querySelector(`[data-blockid="${e_[0].blockId}"]`);e&&e.scrollIntoView({behavior:"smooth"}),C(Number(e_[0].blockId))}},t=async()=>{try{let t=(await (0,ev.i)(o)).map(e=>{let t=e$.find(t=>t.blockId===e.id);return{...e.siteBlock,blockId:e.id,blockParentId:e.blockParentId,content:e.content,uuid:t?.uuid??(0,M.A)()}});t.length>0&&e();let i=tj.current===Number(o);if(!i||!tb.current){eA(t);let e={};for(let i of t)e[i.uuid]=i?.content?.visibility==void 0||i?.content?.visibility;tx(e)}i||(tb.current=!1),tj.current=Number(o)}catch(e){console.error("Error fetching data:",e),eA([]),tx({})}finally{eF(!1)}};if(o&&(!p.vk.map(e=>e.slugEn).includes(l?.slugEn??"")||(l?.slugEn??"")=="trainings")){if(!tv.current){tv.current=!0;let t=e_.find(e=>void 0!=e.pageId),i=t?Number(t.pageId):null;if(null!=i&&i===Number(o)&&e$.length>0){tj.current=Number(o),e();return}}eF(!0),t()}},[o,eM]),(0,s.useEffect)(()=>{if(eL&&eL.data.length>0&&null==o){let e=e_.find(e=>void 0!=e.pageId);if(e){let t=eL.data.find(t=>t.id==e.pageId||t.nameFr==e.labelFr);r(t),y(t.id.toString())}else r(eL.data[0]),y(eL.data[0].id.toString())}},[eL,e_]);let tP=(0,R.mN)({resolver:(0,I.u)(A.ci),defaultValues:{type:"page",nameFr:"",nameEn:"",nameNl:"",slugFr:"",slugEn:"",slugNl:"",metaTitleFr:"",metaTitleEn:"",metaTitleNl:"",metaDescriptionFr:"",metaDescriptionEn:"",metaDescriptionNl:"",externalLink:"",duplicatePage:void 0,needsLogin:!1,openInNewTab:!1,dynamicPage:!1,hide:!1}}),tR=(0,R.mN)({resolver:(0,I.u)(A.bP),defaultValues:{labelFr:"",labelEn:"",labelNl:"",hide:!1}}),tM=(0,$.A)(),tD=(0,S.bO)(()=>{let e=e_.find(e=>void 0!=e.pageId);e&&(r(eL.data.find(t=>t.id==e.pageId)),y(Number(e.pageId)),e5(null),e4(null),tn(!1),tl({}))}),tO=(0,S.ab)(e=>{let t=e_;if(!t.find(e=>"Accueil"===e.labelFr)){let e={labelFr:"Accueil",labelEn:"Home",labelNl:"Home",type:"PAGE",pageId:eL.data[0]?eL.data[0].id?.toString():"0",uid:(0,M.A)()};t=(0,m.ic)(e_,e)}if("page"===tP.getValues("type")&&eB?.id){let i={labelFr:e.nameFr,labelEn:e.nameEn,labelNl:e.nameNl,pageId:e.id?.toString(),type:"PAGE",hide:tP.watch("hide"),...e.externalLink&&{externalLink:e.externalLink,needsLogin:!!e.needsLogin&&(!e.needsLogin||"0"!=e.needsLogin),openInNewTab:!!e.openInNewTab&&(!e.openInNewTab||"0"!=e.openInNewTab)},uid:(0,M.A)()};eE(t=(0,m.ic)(t,i)),tI?(0,ej.t)(tI,t):eB?.id&&(0,eN.e)(String(eB?.id??0),t).then(e=>{tF(e.data.data.id??null)})}else if("subpage"===tP.getValues("type")&&"page"===tP.getValues("subPageType")){let i=t.find(e=>Number(e.pageId)===Number(tP.getValues("parent")));if(void 0!=i){let n={labelFr:e.nameFr,labelEn:e.nameEn,labelNl:e.nameNl,pageId:e.id?.toString(),type:"PAGE",hide:tP.watch("hide"),...e.externalLink&&{externalLink:e.externalLink,needsLogin:!!e.needsLogin&&(!e.needsLogin||"0"!=e.needsLogin),openInNewTab:!!e.openInNewTab&&(!e.openInNewTab||"0"!=e.openInNewTab)},uid:(0,M.A)()};i={...i,children:[...i?.children??[],n]};let s=(0,m.Rw)(t,i?.uid??"",i);eE(s),(0,ej.t)(tI,s)}}else if("subpage"===tP.getValues("type")&&"menu"===tP.getValues("subPageType")){let i=t.find(e=>e.labelFr===tP.getValues("menuFr")),n={labelFr:e.nameFr,labelEn:e.nameEn,labelNl:e.nameNl,pageId:e.id?.toString(),type:"PAGE",hide:tP.watch("hide"),...e.externalLink&&{externalLink:e.externalLink,needsLogin:!!e.needsLogin&&(!e.needsLogin||"0"!=e.needsLogin),openInNewTab:!!e.openInNewTab&&(!e.openInNewTab||"0"!=e.openInNewTab)},uid:(0,M.A)()};if(void 0!=i){i={...i,children:[...i?.children??[],n]};let e=(0,m.Rw)(t,i?.uid??"",i);eE(e),(0,ej.t)(tI,e)}else{let e={labelFr:tP.getValues("menuFr")??"",labelEn:tP.getValues("menuEn")??"",labelNl:tP.getValues("menuNl")??"",pageId:void 0,type:"MENU",uid:(0,M.A)()};e={...e,children:[n]};let i=(0,m.ic)(t,e);eE(i),tI?(0,ej.t)(tI,i):eB?.id&&(0,eN.e)(String(eB?.id??0),i).then(e=>{tF(e.data.data.id??null)})}}r(e),y(Number(e.id)),e5(null),e4(null),tl({}),e7(!1),e6(!1),tP.watch("duplicatePage")?(0,ev.i)(Number(tP.watch("duplicatePage"))).then(t=>{let i=t.map(e=>({...e.siteBlock,blockId:e.id,blockParentId:e.blockParentId,content:e.content,uuid:(0,M.A)()}));eA(i);let n={};for(let e of i)n[e.uuid]=e?.content?.visibility==void 0||e?.content?.visibility;tx(n),tG(i,e),tP.reset()}):setTimeout(()=>{if(eB?.config?.duplicatedBlocks){let t=eT.filter(e=>"infos"==e.identifier?(eB?.config?.duplicatedBlocks??{}).infos:"footer"==e.identifier&&(eB?.config?.duplicatedBlocks??{}).footer);if(t.length>0){eA(t.map(e=>({...e,uuid:(0,M.A)()})));let i={};for(let e of t)i[e.uuid]=e?.content?.visibility==void 0||e?.content?.visibility;tx(i),tG(t,e)}}else eU(!eM);tP.reset()},500)}),tU=(0,S.Fu)(e=>{if("page"===tP.getValues("type")&&eB?.id)if(null===e2){let t=e_;if(e3){let i=e_.find(e=>!!p.e.find(t=>e[`label${t}`]===e3));if(null!=i){let n=i?.children??[];n=n.filter(t=>t.pageId!=e.id?.toString()),i={...i,children:n}
9,t=(0,m.Rw)(e_,i?.uid??"",i)}}let i=e_.find(t=>Number(t.pageId)===Number(e.id));if(void 0!=i){let n={...i,labelFr:e.nameFr,labelEn:e.nameEn,labelNl:e.nameNl,hide:tP.watch("hide"),...e.externalLink&&{externalLink:e.externalLink,needsLogin:!!e.needsLogin&&(!e.needsLogin||"0"!=e.needsLogin),openInNewTab:!!e.openInNewTab&&(!e.openInNewTab||"0"!=e.openInNewTab)}};t=(0,m.Rw)(e_,i?.uid??"",n)}else{let i={labelFr:e.nameFr,labelEn:e.nameEn,labelNl:e.nameNl,pageId:e.id?.toString(),type:"PAGE",hide:tP.watch("hide"),...e.externalLink&&{externalLink:e.externalLink,needsLogin:!!e.needsLogin&&(!e.needsLogin||"0"!=e.needsLogin),openInNewTab:!!e.openInNewTab&&(!e.openInNewTab||"0"!=e.openInNewTab)},uid:(0,M.A)()};t=(0,m.ic)(t,i)}eE(t),(0,ej.t)(tI,t)}else{let t=e_.find(e=>Number(e.pageId)===Number(e2));if(void 0!=t){let i=t?.children??[],n=[];for(let t of i)t.pageId!==e.id?.toString()&&n.push(t);t={...t,children:n};let s=(0,m.Rw)(e_,t?.uid??"",t),l={labelFr:e.nameFr,labelEn:e.nameEn,labelNl:e.nameNl,pageId:e.id?.toString(),type:"PAGE",hide:tP.watch("hide"),...e.externalLink&&{externalLink:e.externalLink,needsLogin:!!e.needsLogin&&(!e.needsLogin||"0"!=e.needsLogin),openInNewTab:!!e.openInNewTab&&(!e.openInNewTab||"0"!=e.openInNewTab)},uid:(0,M.A)()};eE(s=(0,m.ic)(s,l)),(0,ej.t)(tI,s)}}else if("subpage"===tP.getValues("type")&&"page"===tP.getValues("subPageType")){let t=e_.find(e=>Number(e.pageId)===Number(tP.getValues("parent")));if(void 0!=t){let i;for(let n of t?.children??[])n.pageId===e.id?.toString()&&(i=n);if(void 0!=i){let i=(t?.children??[]).map(t=>t.pageId===e.id?.toString()?{...t,labelFr:e.nameFr,labelEn:e.nameEn,labelNl:e.nameNl,hide:tP.watch("hide"),...e.externalLink&&{externalLink:e.externalLink,needsLogin:!!e.needsLogin&&(!e.needsLogin||"0"!=e.needsLogin),openInNewTab:!!e.openInNewTab&&(!e.openInNewTab||"0"!=e.openInNewTab)}}:t);t={...t,children:i}}else{let i={labelFr:e.nameFr,labelEn:e.nameEn,labelNl:e.nameNl,pageId:e.id?.toString(),type:"PAGE",hide:tP.watch("hide"),...e.externalLink&&{externalLink:e.externalLink,needsLogin:!!e.needsLogin&&(!e.needsLogin||"0"!=e.needsLogin),openInNewTab:!!e.openInNewTab&&(!e.openInNewTab||"0"!=e.openInNewTab)},uid:(0,M.A)()};t={...t,children:[...t?.children??[],i]}}let n=(0,m.Rw)(e_,t?.uid??"",t);eE(n=n.filter(t=>t.pageId!=e.id?.toString())),(0,ej.t)(tI,n)}}else if("subpage"===tP.getValues("type")&&"menu"===tP.getValues("subPageType")){let t=e_;if(null!=e_.find(t=>Number(t.pageId)===Number(e.id)))t=t.filter(t=>Number(t.pageId)!=Number(e.id));else if(e2){let i=e_.find(e=>Number(e.pageId)===Number(e2));if(null!=i){let n=i?.children??[];n=n.filter(t=>Number(t.pageId)!=Number(e.id)),i={...i,children:n},t=(0,m.Rw)(e_,i?.uid??"",i)}}let i=e_.find(e=>!!(e.children??[]).find(e=>Number(e.pageId)===Number(tP.getValues("id")??0))),n=e_.find(e=>!!p.e.find(t=>""!=e[`label${t}`]&&e[`label${t}`]===tP.getValues(`menu${t}`)));if(void 0!=i){let n={...(i.children??[]).find(e=>Number(e.pageId)===Number(tP.getValues("id")??0)),labelFr:e.nameFr,labelEn:e.nameEn,labelNl:e.nameNl,hide:tP.watch("hide"),...(e?.externalLink??"")!=""&&{externalLink:e?.externalLink,needsLogin:!(!e?.needsLogin||e?.needsLogin&&e?.needsLogin!="1"),openInNewTab:!!e.openInNewTab&&(!e.openInNewTab||"0"!=e.openInNewTab)}};if(p.e.find(e=>""!=i[`label${e}`]&&i[`label${e}`]!=tP.getValues(`menu${e}`)))for(let e of(i.children??[]).filter(e=>e.pageId?.toString()!==(tP.getValues("id")??0).toString())){let t=eL.data.find(t=>Number(t.id)===Number(e.pageId));for(let e of p.e){let i=t[`slug${e}`];if(""!=i){let n=i?.split("/")??[];n?.length>1?t[`slug${e}`]=(0,m.z9)(tP.getValues(`menu${e}`))+"/"+n[1]:t[`slug${e}`]=(0,m.z9)(tP.getValues(`menu${e}`))+"/"+i}}(0,ew.R)(t.id,t)}i={...i,labelFr:tP.getValues("menuFr")??"",labelEn:tP.getValues("menuEn")??"",labelNl:tP.getValues("menuNl")??""};let s=(i?.children??[]).map(e=>e.pageId?.toString()===(tP.getValues("id")??0).toString()?n:e);i={...i,children:s},t=(0,m.Rw)(t,i?.uid??"",i)}else if(void 0!=n){let i={labelFr:e.nameFr,labelEn:e.nameEn,labelNl:e.nameNl,pageId:e.id?.toString(),hide:tP.watch("hide"),...(e?.externalLink??"")!=""&&{externalLink:e?.externalLink,needsLogin:!(!e?.needsLogin||e?.needsLogin&&e?.needsLogin!="1"),openInNewTab:!!e.openInNewTab&&(!e.openInNewTab||"0"!=e.openInNewTab)},type:"PAGE",uid:(0,M.A)()};n={...n,children:[...n?.children??[],i]},t=(0,m.Rw)(t,n?.uid??"",n)}else{let i={labelFr:tP.getValues("menuFr")??"",labelEn:tP.getValues("menuEn")??"",labelNl:tP.getValues("menuNl")??"",pageId:void 0,type:"MENU",uid:(0,M.A)()},n={labelFr:e.nameFr,labelEn:e.nameEn,labelNl:e.nameNl,pageId:e.id?.toString(),hide:tP.watch("hide"),type:"PAGE",uid:(0,M.A)()};i={...i,children:[n]},t=(0,m.ic)(t,i)}eE(t),(0,ej.t)(tI,t)}r(e),e7(!1),e6(!1),tP.reset()}),tV=(0,S.i0)(e=>{if(eB?.isSAP&&tR.getValues("labelFr")&&""!==tR.getValues("labelFr")){let t=e.filter(e=>
9!e$.find(t=>t?.labelFr===e?.siteBlock.labelFr));if(t.length>0){let i=e.map(e=>({...e.siteBlock,blockId:e.id,content:e.content,uuid:(0,M.A)()}));eA(i);let n={};for(let e of i)n[e.uuid]=e?.content?.visibility==void 0||e?.content?.visibility;tx(n);let s=e_;for(let t of e$){let i=e_.find(e=>e.blockId?.toString()===t.blockId?.toString()||e.blockId?.toString()===t.blockParentId?.toString());if(i){let n=e.find(e=>t?.labelFr===e?.siteBlock.labelFr);n&&(i={...i,blockId:n.id},s=(0,m.Rw)(s,i?.uid??"",i))}}let l=tR.getValues("blockId"),a={labelFr:tR.getValues("labelFr")??"",labelEn:tR.getValues("labelEn")??"",labelNl:tR.getValues("labelNl")??"",hide:tR.getValues("hide")??!1,blockId:t[0].id,type:"BLOCK",uid:(0,M.A)()};if(l){let e=e_.find(e=>Number(e.blockId)===l);void 0!=e&&(a={...e,blockId:t[0].id,hide:tR.getValues("hide")??!1,labelFr:tR.getValues("labelFr")??"",labelEn:tR.getValues("labelEn")??"",labelNl:tR.getValues("labelNl")??""},s=(0,m.Rw)(e_,e?.uid??"",a))}else s=(0,m.ic)(e_,a);eE(s),tI?(0,ej.t)(tI,s):eB?.id&&(0,eN.e)(String(eB?.id??0),s).then(e=>{tF(e.data.data.id??null)}),setTimeout(()=>{let e=document.querySelector(`[data-blockid="${a.blockId}"]`);e&&e.scrollIntoView({behavior:"smooth",block:"start"})},500)}else{let t=e_,i=tR.getValues("blockId");if(i){let e=e_.find(e=>Number(e.blockId)===i);if(void 0!=e){let i={...e,hide:tR.getValues("hide")??!1,labelFr:tR.getValues("labelFr")??"",labelEn:tR.getValues("labelEn")??"",labelNl:tR.getValues("labelNl")??""};eE(t=(0,m.Rw)(e_,e?.uid??"",i)),(0,ej.t)(tI,t)}}else if(e.length>e$.length){let t=e.slice(-1),i=e.map(e=>({...e.siteBlock,blockId:e.id,content:e.content,uuid:(0,M.A)()}));eA(i);let n={};for(let e of i)n[e.uuid]=e?.content?.visibility==void 0||e?.content?.visibility;tx(n);let s=e_;for(let t of e$){let i=e_.find(e=>e.blockId?.toString()===t.blockId?.toString()||e.blockId?.toString()===t.blockParentId?.toString());if(i){let n=e.slice(0,e.length-1).find(e=>t?.labelFr===e?.siteBlock.labelFr);n&&(i={...i,blockId:n.id},s=(0,m.Rw)(s,i?.uid??"",i))}}let l={labelFr:tR.getValues("labelFr")??"",labelEn:tR.getValues("labelEn")??"",labelNl:tR.getValues("labelNl")??"",hide:tR.getValues("hide")??!1,blockId:t[0].id,type:"BLOCK",uid:(0,M.A)()};eE(s=(0,m.ic)(e_,l)),tI?(0,ej.t)(tI,s):eB?.id&&(0,eN.e)(String(eB?.id??""),s).then(e=>{tF(e.data.data.id??null)})}}}else if(eB?.isSAP){let t=e_,i={};for(let n of e$){let s=1,l=t.find(e=>e.blockId?.toString()===n.blockId?.toString()||e.blockId?.toString()===n.blockParentId?.toString());if(null!=l){let a=e.find(e=>{if(n?.labelFr===e?.siteBlock.labelFr)if(!i[n?.labelFr])return i[n?.labelFr]=1,!0;else{if(i[n?.labelFr]!=s)return i[n?.labelFr]=s,!0;s++}return!1});l={...l,blockId:a.id},t=(0,m.Rw)(t,l?.uid??"",l)}}eE(t),tI?(0,ej.t)(tI,t):eB?.id&&(0,eN.e)(String(eB?.id??0),t).then(e=>{tF(e.data.data.id??null)})}else tI&&(0,ej.t)(tI,e_);tk(!1),tz(!1),tT(!1),tb.current=!1,tR.reset(),tA(1),setTimeout(()=>{eU(!eM)},500)},()=>{tk(!1)});function tq(e,t){let i=e$.find(t=>t.uuid==e);i.blockId?(0,ey.l)(i.blockId,t).then(e=>{e.success&&ef.o.success("Succ\xe8s",{description:"Les modifications sont enregistr\xe9s automatiquement"})}).catch(e=>{ef.o.error("Erreur",{description:"Une erreur s'est produite lors de l'enregistrement des modifications"})}).finally(()=>{tb.current=!0,eA(i=>i.map((i,n)=>{if(i.uuid===e){if(eB?.isSAP&&Object.keys(t).includes("visibility")){let e=e_[n];e&&eE((0,m.Rw)(e_,e.uid,{...e,hide:!t.visibility}))}return{...i,content:t}}return i})),tc({...to,[e]:!1}),tl({...ts,[e]:!1}),tu({...td,[e]:!1}),tr({...ta,[e]:"fr"})}):(tb.current=!0,eA(i=>i.map((i,n)=>{if(i.uuid===e){if(eB?.isSAP&&Object.keys(t).includes("visibility")){let e=e_[n];e&&eE((0,m.Rw)(e_,e.uid,{...e,hide:!t.visibility}))}return{...i,content:t}}return i})),tc({...to,[e]:!1}),tl({...ts,[e]:!1}),tu({...td,[e]:!1}),tr({...ta,[e]:"fr"}))}let tH=async e=>{if(ts&&!e){for(let e of Object.keys(ts))if(ts[e]){tf({...tp,[e]:!0});let t=document.querySelector(`[data-id="${e}"]`);t&&t.scrollIntoView({behavior:"smooth",block:"start"});return}}let t=e$.map((e,t)=>({siteBlock:e,order:t+1,content:e.content}));tk(!0),l&&tV.mutate({blocks:t,page:l})};async function tZ(){let e=e_,t=tR.getValues("blockId");if(t){tk(!0);let i=e_.find(e=>Number(e.blockId)===t);if(void 0!=i){let t={...i,hide:tR.getValues("hide")??!1,labelFr:tR.getValues("labelFr")??"",labelEn:tR.getValues("labelEn")??"",labelNl:tR.getValues("labelNl")??""};
9eE(e=(0,m.Rw)(e_,i?.uid??"",t)),await (0,ej.t)(tI,e),tk(!1),tT(!1),tS(!1),tR.reset(),tA(1),setTimeout(()=>{eU(!eM)},500)}}}async function tJ(){tA(2)}async function tG(e,t){if(tk(!0),t??l){let i=e.map((e,t)=>({siteBlock:e,order:t+1,content:e.content}));tV.mutate({blocks:i,page:t??l})}}return eB?(0,n.jsxs)("div",{className:"relative max-w-full h-full mx-auto bg-white",children:[(0,n.jsx)("div",{className:"relative mx-auto container",children:(0,n.jsx)("div",{className:(0,m.cn)("absolute -top-[2.4rem] right-[max(7%,56px)] flex gap-4",[1256].includes(eB?.organization?.id??0)&&" -top-[2.3rem] right-[50%] translate-x-[50%]"),children:!(eB?.isDefault??!0)&&(0,n.jsx)(D.$,{variant:"default",type:"button",className:"h-8 rounded-2xl uppercase text-xs font-bold",onClick:()=>eW(!0),children:"Pr\xe9f\xe9rences"})})}),(0,n.jsxs)("div",{className:"py-4 mx-auto flex flex-col-reverse items-center justify-center container gap-5 min-w-[80rem] w-fit",children:[(0,n.jsxs)("div",{className:"flex gap-5 items-center",children:[eI&&(0,n.jsx)(d.A,{className:"mr-2 h-4 w-4 animate-spin"}),(p.wk.includes(eP?.type??"")||eB&&"PERSONALIZED"==eB.type)&&(0,n.jsx)(n.Fragment,{children:eB?.isSAP?(0,n.jsxs)("div",{className:"fixed right-0 top-[40%] z-[40] flex flex-col gap-2 items-end",children:[(0,n.jsx)("div",{className:"max-w-12 hover:max-w-full transition-all ease-in",children:(0,n.jsxs)(D.$,{onClick:()=>tS(!0),size:"lg",className:"flex !px-4 py-4 !gap-2 h-auto rounded-[32px_0_0_32px]",children:[(0,n.jsx)(L.A,{className:"!w-6 !h-6"}),"Ajouter un bloc"]})}),k&&(0,n.jsx)("div",{className:"max-w-12 hover:max-w-full transition-all ease-in",children:(0,n.jsxs)(D.$,{onClick:()=>{let e=e_.find(e=>e.blockId==k?.toString());e&&(tR.setValue("blockId",k??0),tR.setValue("labelFr",e.labelFr),tR.setValue("labelNl",e.labelNl),tR.setValue("labelEn",e.labelEn),tR.setValue("hide",e.hide),tS(!0))},size:"lg",className:"flex !px-4 py-4 !gap-2 h-auto rounded-[32px_0_0_32px]",children:[(0,n.jsx)(z.A,{className:"!w-6 !h-6"}),"Modifier le bloc sur le menu"]})})]}):(0,n.jsxs)("div",{className:"fixed right-0 top-[30%] z-[40] flex flex-col gap-2 items-end",children:[(0,n.jsx)("div",{className:"max-w-12 hover:max-w-full transition-all ease-in",children:(0,n.jsxs)(D.$,{size:"lg",onClick:()=>e6(!0),className:"flex !px-4 py-4 !gap-2 h-auto rounded-[32px_0_0_32px]",children:[(0,n.jsx)(F.A,{className:"!w-6 !h-6"}),"Ajouter une page"]})}),(0,n.jsx)("div",{className:"max-w-12 hover:max-w-full transition-all ease-in",children:(0,n.jsxs)(D.$,{onClick:()=>{e6(!0);let e=null;for(let t of e_)if(t.pageId&&Number(t.pageId)==o){e=t;break}else for(let i of t.children??[])if(i.pageId&&Number(i.pageId)==o){e=t;break}if(tP.setValue("id",l?.id??0),e?.pageId?.toString()===o?.toString())tP.setValue("type","page");else if(e?.pageId?.toString()!==o?.toString()){for(let t of(tP.setValue("type","subpage"),e?.children??[]))if(t.pageId&&Number(t.pageId)==o){e?.type==="PAGE"?(tP.setValue("subPageType","page"),tP.setValue("parent",e?.pageId?.toString()),e5(e?.pageId??"")):(tP.setValue("subPageType","menu"),tP.setValue("menuFr",e?.labelFr),tP.setValue("menuNl",e?.labelNl),tP.setValue("menuEn",e?.labelEn),e4(e?.labelFr??""));break}}tP.setValue("nameFr",l?.nameFr??""),tP.setValue("nameNl",l?.nameNl??""),tP.setValue("nameEn",l?.nameEn??""),tP.setValue("slugFr",l?.slugFr??""),tP.setValue("slugNl",l?.slugNl??""),tP.setValue("slugEn",l?.slugEn??""),tP.setValue("metaTitleFr",l?.metaTitleFr??""),tP.setValue("metaTitleNl",l?.metaTitleNl??""),tP.setValue("metaTitleEn",l?.metaTitleEn??""),tP.setValue("metaDescriptionFr",l?.metaDescriptionFr??""),tP.setValue("metaDescriptionNl",l?.metaDescriptionNl??""),tP.setValue("externalLink",l?.externalLink??""),tP.setValue("hide",e?.hide??!1),tP.setValue("metaDescriptionEn",l?.metaDescriptionEn??""),tP.setValue("dynamicPage",p.vk.map(e=>e.slugEn).includes(l?.slugEn??"")),tP.setValue("needsLogin",!(!l?.needsLogin||l?.needsLogin&&l?.needsLogin=="0")),tP.setValue("openInNewTab",!(!l?.openInNewTab||l?.openInNewTab&&l?.openInNewTab=="0")),(l?.externalLink??"")!=""&&tw(!0)},size:"lg",className:"flex !px-4 py-4 !gap-2 h-auto rounded-[32px_0_0_32px]",children:[(0,n.jsx)(_.A,{className:"!w-6 !h-6"}),"Modifier la page"]})}),(e_??[]).length>1&&(0,n.jsx)("div",{className:"max-w-12 hover:max-w-full transition-all ease-in",children:(0,n.jsxs)(D.$,{variant:"destructive",size:"lg",onClick:()=>tn(!0),className:"flex !px-4 py-4 !gap-2 h-auto rounded-[32px_0_0_32px] text-white",children:[(0,n.jsx)(E.A,{className:"!w-6 !h-6"}),"Supprimer la page"]})}),!eB?.isSAP&&(l?.externalLink??"")==""&&(!p.vk.map(e=>e.slugEn).includes(l?.slugEn??"")||(l?.slugEn??"")==="trainings")&&(0,n.jsx)("div",{className:"max-w-12 hover:max-w-full transition-all ease-in",children:(0,n.jsxs)(D.$,{onClick:()=>tt(!0),size:"lg",className:"flex !px-4 py-4 !gap-2 h-auto rounded-[32px_0_0_32px]",children:[(0,n.jsx)(L.A,{className:"!w-6 !h-6"}),(0,n.jsx)("span",{className:"text-sm",children:"Ajouter un bloc"})]})})]})})]}),(0,n.jsx)("div",{className:"w-full flex-1 flex items-center min-w-[600px] gap-5 rounded-xl border px-5 py-3",children:(0,n.jsxs)("div",{className:"flex flex-wrap justify-between items-center gap-4 w-full",children:[(0,n.jsxs)("div",{className:"flex items-center w-full gap-4",children:[eB?.isDefault??!0?(0,n.jsx)("span",{className:"text-2xl font-bold text-dark1 mr-auto",children:"LOGO"}):(0,n.jsx)("div",{className:"flex items-center gap-4 mr-auto",children:e.map((i,l)=>(0,n.jsx)(s.Fragment,{children:(0,n.jsx)("label",{className:"mr-auto h-11 flex justify-center items-center p-4 rounded-sm border border-dashed border-slate-900 cursor-pointer",onClick:e=>{eJ(l),e.preventDefault()},children:""!==i||(eR?.avatarUrl??"")!=""&&0==l?(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)(w.default,{src:""!=i?i:eR?.avatarUrl??"",alt:"Uploaded",className:"!h-[3rem] !w-auto max-w-[6rem] object-contain rounded-xl !relative",fill:!0}),1==l&&(0,n.jsx)(D.$,{className:"w-8 h-8 absolute -right-2.5 top-1/2 -translate-y-1/2",onClick:i=>{i.stopPropagation(),i.preventDefault(),t([e[0],""]),tM.mutate({siteId:eB?.id??0,data:{config:{...eB?.config,logoSecondary:""}}})},children:(0,n.jsx)(B.A,{})})]}):(0,n.jsx)(n.Fragment,{children:0==l?(0,n.jsx)("span",{className:"text-2xl font-bold text-dark1 mr-auto",children:"LOGO"}):(0,n.jsx)(T.A,{className:"!size-5"})})})},l))}),0==(eB?.config?.actions??[]).filter(e=>(e?.buttonTextFr??"")!="").length?(0,n.jsx)(n.Fragment,{children:(p.wk.includes(eP?.type??"")||eB&&"PERSONALIZED"==eB.type)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(et.w,{orientation:"vertical",className:"!h-6 bg-slate-900"}),(0,n.jsxs)(D.$,{variant:"default",className:"!px-3 !py-2.5 h-auto cursor-pointer flex justify-start items-center rounded-full",onClick:()=>eK(!0),children:[(0,n.jsx)(P.A,{className:"size-4"}),(0,n.jsx)("span",{className:"uppercase text-xs font-bold",children:"configuration"})]})]})}):(0,n.jsxs)("div",{className:"relative flex flex-col items-center gap-2.5 ml-auto",children:[(eB?.config?.actions??[]).filter(e=>(e?.buttonTextFr??"")!="").map((e,t)=>(0,n.jsx)("a",{href:e.linkFr,target:"_blank",className:(0,m.cn)("whitespace-nowrap rounded-sm uppercase shadow-md font-semibold inline-flex items-center justify-center px-[1.625rem] py-2.5 text-sm bg-button-1 text-white",0==t&&"py-[9px] px-6 bg-button-2 text-dark1"),children:e?.buttonTextFr},t)),(p.wk.includes(eP?.type??"")||eB&&"PERSONALIZED"==eB.type)&&(0,n.jsx)(D.$,{variant:"default",className:"absolute left-full translate-x-8 !px-2.5 !py-2.5 h-auto cursor-pointer flex justify-start items-center rounded-full",onClick:()=>eK(!0),children:(0,n.jsx)(P.A,{className:"size-4"})})]})]}),e_.length>0?(0,n.jsx)("div",{className:"flex gap-2.5",children:e_.filter(e=>!("MENU"===e.type&&(!e.children||0===e.children.length))).map((e,t)=>(0,n.jsxs)("div",{className:(0,m.cn)("group relative list-none p-2 whitespace-nowrap",e.hide&&"opacity-50"),children:[(0,n.jsxs)("a",{onClick:()=>
9{if("PAGE"===e.type){if(tL)return void tg(eL.data.find(t=>t.id==e.pageId));tP.reset(),r(eL.data.find(t=>t.id==e.pageId)),y(Number(e.pageId)),e5(null),e4(null),tl({})}"BLOCK"===e.type&&(eH(e.blockId),C(Number(e.blockId)))},className:(0,m.cn)("flex items-center !text-slate-900 font-semibold text-sm","MENU"!==e.type&&"cursor-pointer",o==Number(e.pageId)||e.blockId&&k==Number(e.blockId)||e?.children?.find(e=>o?.toString()===e?.pageId)?"!text-[#18a0fb] font-semibold":""),children:[e.labelFr.toUpperCase(),e.children&&e.children.length>0&&(0,n.jsx)(c.A,{className:"ml-1 h-4 w-4"})]}),e.children&&e.children.length>0&&(0,n.jsx)("ul",{className:"invisible z-10 absolute -left-2 top-full min-w-48 w-fit rounded-lg border bg-white py-2 opacity-0 shadow-lg transition-all duration-300 group-hover:visible group-hover:opacity-100",children:e.children.map((e,i)=>(0,n.jsx)("li",{children:(0,n.jsx)("a",{onClick:()=>{if("PAGE"===e.type){if(tL)return void tg(eL.data.find(t=>t.id==e.pageId));tP.reset(),r(eL.data.find(t=>t.id==e.pageId)),y(Number(e.pageId)),e5(null),e4(null),tl({})}},className:(0,m.cn)("block px-4 py-2 font-semibold text-sm uppercase !text-slate-900 hover:bg-[#00000033] cursor-pointer",o==Number(e.pageId)?"!text-[#18a0fb]":""),children:e.labelFr})},`${t}-${i}`))})]},t))}):(0,n.jsx)("div",{})]})})]}),(l?.externalLink??"")!=""?(0,n.jsx)(ee.A,{src:l?.externalLink??"",needsLogin:!(!l?.needsLogin||l?.needsLogin&&l?.needsLogin=="0")}):p.vk.map(e=>e.slugEn).includes(l?.slugEn??"")?(0,n.jsx)("div",{className:"mb-4 mt-5 container mx-auto",children:(0,n.jsx)(N.default,{slug:l?.slugEn??""})}):(0,n.jsx)("div",{className:"mb-20 mt-10 mx-auto",children:(0,n.jsx)(O.x,{axis:"y",values:e$.map(e=>e.uuid),onReorder:e=>{tb.current=!0;let t=e$.sort((t,i)=>e.indexOf(t.uuid)-e.indexOf(i.uuid));if(eA([...t]),eB?.isSAP){let e=[...t].map(e=>e_.find(t=>t.blockId?.toString()===e.blockId?.toString()||t.blockId?.toString()===e.blockParentId?.toString()));e&&eE([...e.filter(e=>e)])}tz(!0)},style:{display:"flex",flexDirection:"column",gap:"20px"},children:e$.map((e,t)=>(0,n.jsxs)(U.A,{block:e,blockPosition:t,currentPageId:o??0,parentId:e.blockParentId??0,editable:!["faq"].includes(e.identifier),disabled:eI,editTheBlock:ts,needToSaveBlock:tp,blockLanguage:ta,blocksVisibility:tm,currentPageBlocks:e$,setEditTheBlock:tl,setSaveTheBlock:tc,setCancelBlockChanges:tu,setBlockLanguage:tr,isEventsSlider:["events-slide"].includes(e.identifier),setVisibility:tx,onDelete:()=>{e1(e.uuid),eX(!0)},updateBlockContent:tq,children:["about"===e.identifier&&(0,n.jsx)(u.nr,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq}),"about-reversed"===e.identifier&&(0,n.jsx)(u.nr,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq,reversed:!0}),"services"===e.identifier&&(0,n.jsx)(u.e,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq}),"flipping-cards"===e.identifier&&(0,n.jsx)(ep.A,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq}),"accordion"===e.identifier&&(0,n.jsx)(eu.default,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq}),"pricing-packages"===e.identifier&&(0,n.jsx)(em.default,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq}),"page-title"===e.identifier&&(0,n.jsx)(ex.default,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq}),"partners"===e.identifier&&(0,n.jsx)(u.Ln,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq}),"numbers"===e.identifier&&(0,n.jsx)(u.mQ,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq}),"numbers-reversed"===e.identifier&&(0,n.jsx)(u.mQ,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,s
9ave:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq,reversed:!0}),"carousel"===e.identifier&&(0,n.jsx)(f.default,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq}),"team"===e.identifier&&(0,n.jsx)(u.xF,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq}),"testimonials"===e.identifier&&(0,n.jsx)(u.lO,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq}),"infos"===e.identifier&&(0,n.jsx)(h.default,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,organization:i,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq}),"events"===e.identifier&&(0,n.jsx)(eS.EventCards,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq}),"events-by-tag"===e.identifier&&(0,n.jsx)(eS.TagsCards,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq}),"articles"===e.identifier&&(0,n.jsx)(g.default,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq}),"title-description"===e.identifier&&(0,n.jsx)(j.default,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq}),"cycles"===e.identifier&&(0,n.jsx)(eS.CycleList,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq}),"form"===e.identifier&&(0,n.jsx)(en.default,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq}),"footer"===e.identifier&&(0,n.jsx)(b.default,{data:e,edit:ts[e.uuid],save:to[e.uuid],updateBlockContent:tq,visibility:tm[e.uuid],siteConfig:eB?.config,menuStructure:e_,currentBlockId:k,currentPageId:o,pages:eL?.data??[],setCurrentPageId:y,setCurrentPage:r,setCurrentBlockId:C}),"events-slide"===e.identifier&&(0,n.jsx)(eS.EventsSlide,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq,uuid:e.uuid,editTheBlock:ts,setEditTheBlock:tl}),"faq"===e.identifier&&(0,n.jsx)(v.default,{data:e,lng:ta[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq}),"pack"===e.identifier&&(0,n.jsx)(eS.Packs,{lng:ta[e.uuid]}),"cta"===e.identifier&&(0,n.jsx)(eo.default,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq}),"slider"===e.identifier&&(0,n.jsx)(er.default,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq}),"image-video"===e.identifier&&(0,n.jsx)(ec.default,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq}),"last-article"===e.identifier&&(0,n.jsx)(ed.default,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq}),"embedded"===e.identifier&&(0,n.jsx)(ek.default,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq}),"training-search"===e.identifier&&(0,n.jsx)(eS.Trainings,{lng:ta[e.uuid],data:e}),"books-slider"===e.identifier&&(0,n.jsx)(eS.BooksSlider,{lng:ta[e.uuid]}),"ai-product"===e.identifier&&(0,n.jsx)(eC.default,{edit:ts[e.uuid],lng:ta[e.uuid],data:e,save:to[e.uuid],cancel:td[e.uuid],visibility:tm[e.uuid],updateBlockContent:tq})]},e.uuid))})}),eB.config?.floatingButton&&(eB.config?.floatingButton.buttonTextFr||eB.config?.floatingButton.icon)&&eB.config?.floatingButton.linkFr&&(0,n.jsxs)("a",{href:eB.config?.floatingButton.linkFr,className:(0,m.cn)("fixed bottom-6 right-6 z-50 flex-1 rounded-full uppercase shadow-md font-semibold flex items-center justify-center gap-3 py-4 px-4 text-lg bg-button-1 text-white hover:bg-slate-800 hover:text-white",eB.config?.floatingButton.buttonTextFr&&"px-5"),children:[eB.config?.floatingButton.icon&&(0,n.jsx)(eh.IconRenderer,{name:eB.config?.floatingButton.icon,className:"text-[20px] !text-white"}),eB.config?.floatingButton.buttonTextFr]}),(tL||tB)&&(0,n.jsx)("div",{className:"fixed bottom-0 left-0 z-10 w-full border-t border-gray-200 bg-white shadow-md",children:(0,n.jsxs)("div",{className:"container mx-auto flex items-center justify-between px-4 py-3",children:[(0,n.jsx)(D.$,{variant:"secondary",className:"px-4 py-2",onClick:()=>eV(!0),children:"Annuler"}),ty?(0,n.jsx)(V.N,{}):(0,n.jsx)(D.$,{variant:"default",className:"px-4 py-2",onClick:()=>tH(),children:"Enregistrer"})]})}),(0,n.jsx)(q.A,{title:void 0!=tP.getValues("id")?"Modifier la page":"Ajouter une page",isOpen:e9,setIsOpen:e=>{e6(e),tP.reset(),tE(!1),tw(void 0)},children:(0,n.jsx)(ea.r,{form:tP,pages:eL,menuStructure:e_,isSaving:e8,showMenuInputs:t_,isExternalPage:tN,postPageMutation:tO,putPageMutation:tU,setIsSaving:e7,setShowMenuInputs:tE,setIsExternalPage:tw})}),(0,n.jsx)(ei.A,{siteInfo:eB,isSideBarOpen:te,sitesBlocks:eT,blocks:e$,setIsSideBarOpen:tt,setBlocks:eA,setBlocksVisibility:tx,setNeedsToSave:tz}),(0,n.jsx)(q.A,{title:tR.getValues("blockId")?"Modifier le bloc sur le menu":"Ajouter un bloc",isOpen:tC,setIsOpen:e=>{tS(e),tR.reset(),tA(1)},children:2===t$?(0,n.jsxs)(H.tU,{defaultValue:"static",className:"w-full",children:[(0,n.jsxs)(H.j7,{className:"w-[calc(100%_-_2em)] mt-4 mx-4 bg-slate-900 gap-1",children:[(0,n.jsx)(H.Xi,{className:"cursor-pointer flex-1 bg-transparent text-white hover:bg-[#FFFFFF22] data-[state=active]:bg-white data-[state=active]:text-slate-900",value:"static",children:"Statique"}),(0,n.jsx)(H.Xi,{className:"cursor-pointer flex-1 bg-transparent text-white hover:bg-[#FFFFFF22] data-[state=active]:bg-white data-[state=active]:text-slate-900",value:"dynamic",children:"Dynamique"})]}),(0,n.jsx)(H.av,{value:"static",children:(0,n.jsx)("div",{className:"flex flex-col gap-5 p-4",children:eT?.length>0&&eT.filter(e=>![...p.mQ,"form","subscribe-newsletter"].includes(e.identifier)).map((e,t)=>(0,n.jsx)("div",{className:"bg-gay-100",children:(0,n.jsxs)("div",{onClick:()=>{let t=(0,M.A)(),i=tR.getValues("blockId"),n=[];n=i?e$.map(n=>n.blockId!==i?n:{...e,uuid:t}):[...e$,{...e,uuid:t}];let s={};for(let e of n)s[e.uuid]=e?.content?.visibility==void 0||e?.content?.visibility;tx(s),tG(n),tS(!1),tA(1)},className:(0,m.cn)("relative flex min-h-32 cursor-pointer flex-col items-center justify-center rounded-lg border p-2",t%2==0?"bg-gray-100":"bg-gray-50"),children:[(0,n.jsx)(w.default,{src:`/images/sections/${e.identifier}.png`,alt:"",className:"!relative",fill:!0}),(0,n.jsx)("div",{className:"mt-2 text-center",children:e.labelFr})]},`sBlock-${t}`)},t))})}),(0,n.jsx)(H.av,{value:"dynamic",children:(0,n.jsx)("div",{className:"flex flex-col gap-5 p-4",children:eT?.length>0&&eT.filter(e=>p.mQ.includes(e.identifier)).filter(e=>"v2"!=eB.tag||["articles","last-article"].includes(e.identifier)).filter(e=>!["ai-product","books-slider"].includes(e.identifier)||eB.organization?.id==4442).map((e,t)=>(0,n.jsx)("div",{className:"bg-gay-100",children:(0,n.jsxs)("div",{onClick:()=>{let t=(0,M.A)(),i=tR.getValues("blockId"),n=[];n=i?e$.map(n=>n.blockId!==i?n:{...e,uuid:t}):[...e$,{...e,uuid:t}];let s={};for(let e of n)s[e.uuid]=e?.content?.visibility==void 0||e?.content?.visibility;tx(s),tG(n),tS(!1),tA(1)},className:(0,m.cn)("relative flex min-h-32 cursor-pointer flex-col items-center justify-center rounded-lg border p-2",t%2==0?"bg-gray-100":"bg-gray-50"),children:[(0,n.jsx)(w.default,{src:`/images/sections/${e.identifier}.png`,alt:"",className:"!relative",fill:!0}),(0,n.jsx)("div",{className:"mt-2 text-center",children:e.labelFr})]},`sBlock-${t}`)},t))})})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"flex flex-col p-4",children:(0,n.jsx)(Z.lV,{...tR,children:(0,n.jsxs)("form",{className:"space-y-5",children:[(0,n.jsx)(Z.zB,{name:"labelFr",control:tR.control,render:({field:e})=>(0,n.jsxs)(Z.eI,{children:[(0,n.jsx)(Z.lR,{className:"font-semibold",children:"Label Fr"}),(0,n.jsx)(Z.MJ,{children:(0,n.jsx)(G.p,{...e})}),(0,n.jsx)(Z.C5,{})]})}),(0,n.jsx)(Z.zB,{name:"labelEn",control:tR.control,render:({field:e})=>(0,n.jsxs)(Z.eI,{children:[(0,n.jsx)(Z.lR,{className:"font-semibold",children:"Label En"}),(0,n.jsx)(Z.MJ,{children:(0,n.jsx)(G.p,{...e})}),(0,n.jsx)(Z.C5,{})]})}),(0,n.jsx)(Z.zB,{name:"labelNl",control:tR.control,render:({field:e})=>(0,n.jsxs)(Z.eI,{children:[(0,n.jsx)(Z.lR,{className:"font-semibold",children:"Label Nl"}),(0,n.jsx)(Z.MJ,{children:(0,n.jsx)(G.p,{...e})}),(0,n.jsx)(Z.C5,{})]})}),(0,n.jsx)(Z.zB,{name:"hide",control:tR.control,render:({field:e})=>(0,n.jsxs)(Z.eI,{children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)(Z.lR,{className:"font-semibold",children:"Ne pas afficher le bloc dans l'en-t\xeate."}),(0,n.jsx)(Z.MJ,{children:(0,n.jsx)(W.S,{checked:e.value,onCheckedChange:e=>tR.setValue("hide",!!e.valueOf())})})]}),(0,n.jsx)(Z.C5,{})]})})]})})}),(0,n.jsx)(J.tb,{children:(0,n.jsxs)("div",{className:"flex gap-4 justify-end",children:[tR.getValues("blockId")&&(0,n.jsx)(n.Fragment,{children:e8?(0,n.jsx)(V.N,{}):(0,n.jsx)(D.$,{variant:"outline",onClick:tR.handleSubmit(tZ),children:"Modifier uniquement le menu"})}),e8?(0,n.jsx)(V.N,{}):(0,n.jsx)(D.$,{onClick:tR.handleSubmit(tJ,e=>{console.log("===",e)}),children:"Suivant"})]})})]})}),(0,n.jsx)(q.A,{title:"Pr\xe9f\xe9rences",isOpen:eG,setIsOpen:e=>{eW(e)},children:(0,n.jsx)(Q.A,{site:eB,setIsOpen:eW})}),(0,n.jsx)(q.A,{title:"Configuration",isOpen:eQ,setIsOpen:e=>{eK(e)},children:(0,n.jsx)(el.A,{site:eB,blocks:e$,menuId:tI,setBlocks:eA,setIsOpen:eK})}),(0,n.jsx)(K.u,{isOpen:eY,setIsOpen:eX,handleConfirm:function(){tb.current=!0;let e=e$.find(e=>e.uuid===e0);if(eB?.isSAP){let t=e_.find(t=>t.blockId==e?.blockId);t&&eE((0,m.B)(e_,t?.uid))}let t=[...e$].filter(e=>e.uuid!==e0);eA(t);let i={};for(let e of t)i[e.uuid]=e?.content?.visibility==void 0||e?.content?.visibility;tx(i),e1(null),eX(!1),tz(!0)}}),(0,n.jsx)(Y.E,{isOpen:ti,setIsOpen:tn,handleConfirm:function(){if(tI&&l){let e=[];for(let t of e_)if(t.pageId!=o?.toString()){if(t.children&&t.children.length>0){let i=(t.children??[]).filter(e=>e.pageId!=o?.toString());if(0==i.length&&"PAGE"!==t.type)continue;e.push({...t,children:i});continue}e.push(t)}eE(e),tD.mutate({page:l,menuId:tI,menuStructure:e,noBlocks:0==e$.length})}}}),(0,n.jsx)(X.S,{isOpen:null!=th,cancel:()=>tg(null),setIsOpen:()=>{tg(null),tz(!1),eD&&(eV(!1),eq(!1),eA(ez)),th&&(tP.reset(),r(th),y(Number(th.id)),e5(null),e4(null))},handleConfirm:()=>{tH().then(()=>{tg(null),tz(!1),eD&&(eV(!1),eq(!1)),th&&(tP.reset(),r(th),y(Number(th.id)),e5(null),e4(null))})}}),(0,n.jsx)(q.A,{title:"Charger une image ou une vid\xe9o",isOpen:null!=eZ,setIsOpen:e=>eJ(e?0:null),children:(0,n.jsx)(es.A,{canBeVideo:!1,setImageUrl:function(e){null!=eZ&&(t(t=>t.map((t,i)=>i==eZ?e:t)),tM.mutate({siteId:eB?.id??0,data:{config:{...eB?.config,...0===eZ?{logo:e}:{logoSecondary:e}}}}))},setOpen:e=>eJ(e?0:null)})})]}):(0,n.jsx)("div",{className:"w-[100vw] min-h-[100vh] flex items-center justify-center",children:(0,n.jsx)(d.A,{className:"h-[100px] w-[100px] animate-spin text-gray-500"})})};var eA=i(74749),eI=i(26258),eF=i(37936),e_=i(75376),eE=i(75613);let eL=()=>{let{preferences:{language:e}}=(0,eE.g)();return e};var ez=i(89543);let eB=({siteInfo:e,siteMenu:t,organizationInfo:i,pages:l,siteBlocks:y})=>{let{slug:S}=(0,C.useParams)(),$=(0,C.useRouter)(),A=eL(),I=(0,m.ZH)(A),{goToBlock:F}=(0,x.A)({menuStructure:t?.structure,lang:A}),_=a.n.use.access_token(),E=a.n.use.navCommunity(),L=a.n.use.editMode(),z=a.n.use.setNavCommunity(),B=a.n.use.setSiteMenu(),T=a.n.use.setAdminAccess(),[P,R]=(0,s.use
9State)(["",""]),[M,D]=(0,s.useState)(null),[O,U]=(0,s.useState)(null),[V,q]=(0,s.useState)(null),[H,Z]=(0,s.useState)(y),[J,G]=(0,s.useState)(!1),[W,Q]=(0,s.useState)(t?.structure??[]),[K,Y]=(0,s.useState)(!1),[X,ee]=(0,s.useState)({}),et=(0,eI.x)(()=>Y(!1)),{isMobile:ei,isTablet:es}=(0,eA.default)(),el=W.filter(e=>!(e.hide||"MENU"===e.type&&(!e.children||0===e.children.length)||e.externalLink&&e?.needsLogin&&!_||(e.children??[]).length>0&&(e.children??[]).every(e=>e.externalLink&&e.needsLogin&&!_))),ea=(e?.config?.actions??[]).filter(e=>(e?.buttonTextFr??"")!="").length,ef=el.length>=7&&ea>=2;(0,s.useEffect)(()=>{t&&B(t.structure)},[t]),(0,s.useEffect)(()=>{if(e){let t=[...P];if(S&&S.length>0&&Array.isArray(S)){let e=decodeURIComponent(S.join("/"));(0,m.$$)(e)&&(t[0]="/images/nacnai.svg")}(e.config?.logo??"")!==""&&""==t[0]&&(t[0]=e.config?.logo??""),(e.config?.logoSecondary??"")!==""&&""==t[1]&&(t[1]=e.config?.logoSecondary??""),R(t),e?.organization&&e?.organization.id&&z(e?.organization)}},[e]),(0,s.useEffect)(()=>{if(ei)if(K){for(let e=0;e<W.length;e++)if((W[e].children??[]).find(e=>e.pageId==O?.toString())){ee({[`${e}`]:!0});break}}else ee({})},[K,ei]),(0,s.useEffect)(()=>{if(l&&l.data.length>0&&null==O)if(S&&S.length>0){let e=null;if(Array.isArray(S)){let t=decodeURIComponent(S.join("/"));e=l.data.find(e=>[e.slugFr,e.slugEn,e.slugNl].includes(t))}else{let t=decodeURIComponent(S);e=l.data.find(e=>[e.slugFr,e.slugEn,e.slugNl].includes(t))}e?(D(e),U(e?.id??0)):(S.includes("admin")&&T(!0),$.push("/"))}else{let e=W.find(e=>void 0!=e.pageId);if(e){let t=l.data.find(t=>t.id==e.pageId||t.nameFr==e?.[`label${I}`]);D(t),U(t.id.toString())}else D(l.data[0]),U(l.data[0].id.toString())}},[l,W]);let eg=(0,s.useCallback)(t=>(0,n.jsxs)(n.Fragment,{children:["about"===t.identifier&&(0,n.jsx)(u.nr,{data:t,lng:A}),"about-reversed"===t.identifier&&(0,n.jsx)(u.nr,{data:t,reversed:!0,lng:A}),"services"===t.identifier&&(0,n.jsx)(u.e,{data:t,lng:A}),"flipping-cards"===t.identifier&&(0,n.jsx)(ep.A,{data:t,lng:A}),"accordion"===t.identifier&&(0,n.jsx)(eu.default,{data:t,lng:A}),"pricing-packages"===t.identifier&&(0,n.jsx)(em.default,{data:t,lng:A}),"page-title"===t.identifier&&(0,n.jsx)(ex.default,{data:t,lng:A}),"partners"===t.identifier&&(0,n.jsx)(u.Ln,{data:t,lng:A}),"numbers"===t.identifier&&(0,n.jsx)(u.mQ,{data:t,lng:A}),"numbers-reversed"===t.identifier&&(0,n.jsx)(u.mQ,{data:t,reversed:!0,lng:A}),"carousel"===t.identifier&&(0,n.jsx)(f.default,{data:t,lng:A}),"team"===t.identifier&&(0,n.jsx)(u.xF,{data:t,lng:A}),"testimonials"===t.identifier&&(0,n.jsx)(u.lO,{data:t,lng:A}),"infos"===t.identifier&&(0,n.jsx)(h.default,{data:t,organization:i,lng:A}),"events"===t.identifier&&(0,n.jsx)(eS.EventCards,{data:t,lng:A}),"events-by-tag"===t.identifier&&(0,n.jsx)(eS.TagsCards,{data:t,lng:A}),"articles"===t.identifier&&(0,n.jsx)(g.default,{data:t,lng:A}),"title-description"===t.identifier&&(0,n.jsx)(j.default,{data:t,lng:A}),"cycles"===t.identifier&&(0,n.jsx)(eS.CycleList,{data:t,lng:A}),"form"===t.identifier&&(0,n.jsx)(en.default,{data:t,lng:A}),"footer"===t.identifier&&(0,n.jsx)(b.default,{siteConfig:e?.config,menuStructure:W,currentBlockId:V,currentPageId:O,pages:l?.data??[],setCurrentPageId:U,setCurrentPage:D,setCurrentBlockId:q,lng:A}),"events-slide"===t.identifier&&(0,n.jsx)(eS.EventsSlide,{data:t,lng:A}),"faq"===t.identifier&&(0,n.jsx)(v.default,{lng:A}),"pack"===t.identifier&&(0,n.jsx)(eS.Packs,{lng:A}),"cta"===t.identifier&&(0,n.jsx)(eo.default,{data:t,lng:A}),"slider"===t.identifier&&(0,n.jsx)(er.default,{data:t,lng:A}),"image-video"===t.identifier&&(0,n.jsx)(ec.default,{data:t,lng:A}),"last-article"===t.identifier&&(0,n.jsx)(ed.default,{data:t,lng:A}),"embedded"===t.identifier&&(0,n.jsx)(ek.default,{data:t,lng:A}),"training-search"===t.identifier&&(0,n.jsx)(eS.Trainings,{data:t,lng:A}),"books-slider"===t.identifier&&(0,n.jsx)(eS.BooksSlider,{lng:A}),"ai-product"===t.identifier&&(0,n.jsx)(eC.default,{data:t,lng:A})]}),[A]);return L?(0,n.jsx)(e$,{logosUrl:P,setLogosUrl:R,organizationInfo:i,currentPage:M,setCurrentPage:D,currentPageId:O,setCurrentPageId:U,currentBlockId:V,setCurrentBlockId:q,blocks:H,setBlocks:Z,isPageLoading:J,setIsPageLoading:G,menuStructure:W,setMenuStructure:e=>{Q(e),B(e)},pages:l,initialBlocks:y}):ei||es?(0,n.jsx)("div",{className:"relative max-w-full mx-auto bg-navbar-footer",children:(0,n.jsxs)("div",{className:"relative w-[100vw] min-h-[100vh] flex flex-col items-center bg-site-bg",children:[(0,n.jsx)("div",{className:"w-full p-4 sticky top-0 left-0 z-10 backdrop-blur-[4px]",children:(0,n.jsxs)("div",{ref:et,className:"w-[calc(100vw_-_32px)] bg-navbar-footer rounded-xl shadow-[0px_4px_54px_0px_rgba(0,0,0,0.05)] outline outline-1 outline-offset-[-1px] outline-slate-200 backdrop-blur-[1.50px]",children:[(0,n.jsxs)("div",{className:(0,m.cn)("container flex items-center gap-8 py-2 px-5 w-full mx-auto",K&&"border-b border-b-slate-200"),onClick:()=>Y(!K),children:[(0,n.jsx)("div",{className:"flex gap-4 items-center mr-auto",children:P.map((t,i)=>{if(""==t&&1==i)return null;let s="/";return 1==i&&e.config?.secondaryLogoUrl&&(s=e.config?.secondaryLogoUrl.linkFr??"/"),(0,n.jsx)(eF.CustomLink,{url:s,className:"",children:""!==t||(E?.avatarUrl??"")!=""?(0,n.jsx)(w.default,{src:""!=t?t:E?.avatarUrl??"",alt:"Uploaded",className:"!h-[3rem] !w-auto max-w-[6rem] object-contain rounded-xl !relative",fill:!0}):(0,n.jsx)("span",{className:"h-[3rem] flex items-center text-2xl font-bold text-dark1",children:"LOGO"})},i)})}),(0,n.jsx)(r.A,{className:"text-dark1"})]}),K&&(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("ul",{className:(0,m.cn)("relative list-none flex flex-col p-5 gap-5 items-start max-h-[450px] overflow-x-hidden overflow-y-auto",(e?.config?.actions??[]).filter(e=>(e?.buttonTextFr??"")!="").length>0&&"pb-0",es&&"!max-h-[550px]"),children:[e?.isSAP&&W.map((e,t)=>(0,n.jsx)(s.Fragment,{children:e.hide?null:(0,n.jsx)("li",{onClick:()=>{q(Number(e.blockId)),Y(!1),setTimeout(()=>{F(e.blockId)},0)},className:(0,m.cn)("flex items-center !text-dark1 font-semibold text-sm cursor-pointer w-full",e.blockId&&V==Number(e.blockId)&&"!text-[#18a0fb] font-semibold"),children:(e?.[`label${I}`]).toUpperCase()})},t)),!e?.isSAP&&W.map((e,t)=>(0,n.jsx)(s.Fragment,{children:e.hide||"MENU"===e.type&&(!e.children||0===e.children.length)||e.externalLink&&e?.needsLogin&&!_||(e.children??[]).length>0&&(e.children??[]).every(e=>e.externalLink&&e.needsLogin&&!_)?null:(0,n.jsxs)("li",{className:"relative w-full",children:["MENU"!=e.type?(0,n.jsxs)(k(),{href:e.externalLink?`${e.externalLink}${e.needsLogin&&_?`?token=${_}`:""}`:"/"+((l?.data??[]).find(t=>
9t.id==e.pageId)?.[`slug${I}`]??""),className:(0,m.cn)("cursor-pointer flex items-center !text-dark1 font-semibold text-sm",(O==Number(e.pageId)||e?.children?.find(e=>O?.toString()===e?.pageId))&&"!text-[#18a0fb] font-semibold"),target:e.externalLink&&e.openInNewTab?"_blank":"_self",rel:"noopener noreferrer",children:[(e?.[`label${I}`]).toUpperCase(),(e.children??[]).length>0&&(0,n.jsx)("span",{onClick:e=>{e.preventDefault(),ee({[`${t}`]:!X[`${t}`]})},children:X[`${t}`]?(0,n.jsx)(o.A,{className:"ml-1 h-4 w-4"}):(0,n.jsx)(c.A,{className:"ml-1 h-4 w-4"})})]}):(0,n.jsxs)("span",{onClick:e=>{e.preventDefault(),ee({[`${t}`]:!X[`${t}`]})},className:(0,m.cn)("flex items-center !text-dark1 font-semibold text-sm cursor-pointer",e?.children?.find(e=>O?.toString()===e?.pageId)?"!text-[#18a0fb] font-semibold":""),children:[(e?.[`label${I}`]).toUpperCase(),(e.children??[]).length>0&&(0,n.jsx)("span",{children:X[`${t}`]?(0,n.jsx)(o.A,{className:"ml-1 h-4 w-4"}):(0,n.jsx)(c.A,{className:"ml-1 h-4 w-4"})})]}),e.children&&e.children.length>0&&(0,n.jsx)("ul",{className:(0,m.cn)("w-fit flex flex-col gap-5 max-h-0 overflow-hidden",X[`${t}`]&&"max-h-full mt-5"),children:e.children.map((e,t)=>e.externalLink&&e.needsLogin&&!_?null:(0,n.jsx)("li",{children:(0,n.jsx)(k(),{href:e.externalLink?`${e.externalLink}${e.needsLogin&&_?`?token=${_}`:""}`:"/"+((l?.data??[]).find(t=>t.id==e.pageId)?.[`slug${I}`]??""),className:(0,m.cn)("whitespace-nowrap block pl-5 font-semibold text-sm !text-dark1 hover:bg-[#00000033] cursor-pointer uppercase",O?.toString()==e.pageId?"!text-[#18a0fb]":""),target:e.externalLink&&e.openInNewTab?"_blank":"_self",rel:"noopener noreferrer",children:(0,m.ZH)(e?.[`label${I}`])})},t))})]})},t)),(e?.config?.actions??[]).filter(e=>(e?.buttonTextFr??"")!="").length>0&&(0,n.jsx)("div",{className:"sticky left-0 bottom-0 flex items-center gap-2.5 w-full bg-navbar-footer py-5 backdrop-blur-[2px]",children:(e?.config?.actions??[]).filter(e=>(e?.buttonTextFr??"")!="").map((e,t)=>(0,n.jsx)("a",{href:e.linkFr,target:"_blank",className:(0,m.cn)("flex-1 rounded-sm uppercase shadow-md font-semibold inline-flex items-center justify-center px-[1.625rem] py-2.5 text-sm bg-button-1 text-white",0==t&&"py-[9px] px-4 bg-button-2 text-dark1"),children:e.buttonTextFr},t))}),(0,n.jsx)(ez.LanguageSelector,{hasEnLng:e.config?.hasEnLng??!1,hasNlLng:e.config?.hasNlLng??!1})]})})]})}),(0,n.jsxs)("div",{className:(0,m.cn)("w-full h-full flex-1 flex flex-col items-center"),children:[J||(M?.slugEn??"")==""?(0,n.jsx)("div",{className:"mt-16 w-full h-full flex items-center justify-center",children:(0,n.jsx)(d.A,{className:"h-[60px] w-[60px] animate-spin text-gray-500"})}):p.vk.map(e=>e.slugEn).includes(M?.slugEn??"")?(0,n.jsx)(N.default,{slug:M?.slugEn??"",lng:A}):(0,n.jsx)("div",{className:(0,m.cn)("w-full h-full flex-1 flex flex-col items-center pt-6 bg-site-bg",(H??[]).length>0&&["carousel"].includes(H[0].identifier)&&"!pt-0 [&>div:nth-child(2)]:mt-[min(100vh,1000px)]",(H??[]).length>0&&["page-title"].includes(H[0].identifier)&&"!pt-0"),children:H.map((t,i)=>(0,n.jsx)(s.Fragment,{children:(t?.content?.visibility==void 0||t?.content?.visibility)&&(0,n.jsx)("div",{"data-blockid":t.blockParentId&&0!=t.blockParentId?t.blockParentId:t.blockId,className:(0,m.cn)("flex justify-center items-center p-5 w-full","footer"===t.identifier&&"bg-white !px-[0px] !py-[0px] w-full",("carousel"===t.identifier||"form"==t.identifier)&&"w-full px-[0px] !py-0","carousel"===t.identifier&&"absolute top-0"),style:{background:`${t?.content?.currentColor??e.config?.blockBoxColors?.find(e=>e.isDefault)?.color??"#F1F5F9"}`},children:(0,n.jsx)(e_.H,{initValue:{content:t},children:eg(t)})},t.blockId)},i))}),e.config?.floatingButton&&(e.config?.floatingButton.buttonTextFr||e.config?.floatingButton.icon)&&e.config?.floatingButton.linkFr&&(0,n.jsxs)("a",{href:e.config?.floatingButton.linkFr,className:(0,m.cn)("fixed bottom-6 right-6 z-50 flex-1 rounded-full uppercase shadow-md font-semibold flex items-center justify-center gap-3 py-4 px-4 text-lg bg-button-1 text-white hover:bg-slate-800 hover:text-white",!e.config?.floatingButton.icon&&e.config?.floatingButton.buttonTextFr&&"px-5"),children:[e.config?.floatingButton.icon&&(0,n.jsx)(eh.IconRenderer,{name:e.config?.floatingButton.icon,className:"text-[20px] !text-white"}),!e.config?.floatingButton.icon&&e.config?.floatingButton.buttonTextFr]})]})]})}):(0,n.jsx)("div",{className:"relative max-w-full mx-auto bg-site-bg",children:(0,n.jsxs)("div",{className:"relative w-[100vw] min-h-[100vh] flex flex-col items-center bg-site-bg",children:[(0,n.jsx)("div",{className:"w-full bg-navbar-footer sticky top-0 left-0 z-10",children:(0,n.jsxs)("div",{className:(0,m.cn)("container flex items-center gap-8 py-2 mx-auto",ef?"max-w-full justify-around":"justify-end"),children:[(0,n.jsx)("div",{className:(0,m.cn)("flex gap-4 items-center",!ef&&"mr-auto"),children:P.map((t,i)=>{if(""==t&&1==i)return null;let s="/";return 1==i&&e.config?.secondaryLogoUrl&&(s=e.config?.secondaryLogoUrl.linkFr??"/"),(0,n.jsx)(eF.CustomLink,{url:s,className:"",children:""!==t||(E?.avatarUrl??"")!=""?(0,n.jsx)(w.default,{src:""!=t?t:E?.avatarUrl??"",alt:"Uploaded",className:"!h-[3rem] !w-auto max-w-[9rem] object-contain rounded-xl !relative",fill:!0}):(0,n.jsx)("span",{className:"h-[3rem] flex items-center text-2xl font-bold text-dark1",children:"LOGO"})},i)})}),(0,n.jsxs)("ul",{className:"relative list-none flex gap-5 items-center",children:[e?.isSAP&&W.map((e,t)=>(0,n.jsx)(s.Fragment,{children:e.hide?null:(0,n.jsx)("li",{onClick:()=>{F(e.blockId),q(Number(e.blockId))},className:(0,m.cn)("flex items-center !text-dark1 font-semibold text-sm cursor-pointer",e.blockId&&V==Number(e.blockId)&&"!text-[#18a0fb] font-semibold"),children:(e?.[`label${I}`]).toUpperCase()})},t)),!e?.isSAP&&W.map((e,t)=>{let i=(l?.data??[]).find(t=>
9t.id==e.pageId)?.[`slug${I}`]??"";return(0,n.jsx)(s.Fragment,{children:e.hide||"MENU"===e.type&&(!e.children||0===e.children.length)||e.externalLink&&e?.needsLogin&&!_||(e.children??[]).length>0&&(e.children??[]).every(e=>e.externalLink&&e.needsLogin&&!_)?null:(0,n.jsxs)("li",{className:"relative group",children:["MENU"!=e.type?(0,n.jsxs)(k(),{href:e.externalLink?`${e.externalLink}${e.needsLogin&&_?`?token=${_}`:""}`:"/"+i,className:(0,m.cn)("cursor-pointer flex items-center !text-dark1 font-semibold text-sm",(0,m.$$)(i)&&"bg-[#18a0fb] py-0.5 px-3 rounded-md !text-white hover:bg-[#1978D2]",(O==Number(e.pageId)||e?.children?.find(e=>O?.toString()===e?.pageId))&&((0,m.$$)(i)?"!bg-[#1978D2]":"!text-[#18a0fb] font-semibold")),target:e.externalLink&&e.openInNewTab?"_blank":"_self",rel:"noopener noreferrer",children:[(e?.[`label${I}`]??"").toUpperCase(),(e.children??[]).length>0&&(0,n.jsx)(c.A,{className:"ml-1 h-4 w-4"})]}):(0,n.jsxs)("span",{className:(0,m.cn)("flex items-center !text-dark1 font-semibold text-sm cursor-pointer",e?.children?.find(e=>O?.toString()===e?.pageId)?"!text-[#18a0fb] font-semibold":""),children:[(e?.[`label${I}`]??"").toUpperCase(),(e.children??[]).length>0&&(0,n.jsx)(c.A,{className:"ml-1 h-4 w-4"})]}),e.children&&e.children.length>0&&(0,n.jsx)("ul",{className:"invisible z-10 absolute -left-2 top-full mt-3 min-w-48 w-fit rounded-lg border bg-navbar-footer py-2 opacity-0 shadow-lg transition-all duration-300 group-hover:visible group-hover:opacity-100",children:e.children.map((e,t)=>e.externalLink&&e.needsLogin&&!_?null:(0,n.jsx)("li",{children:(0,n.jsx)(k(),{href:e.externalLink?`${e.externalLink}${e.needsLogin&&_?`?token=${_}`:""}`:"/"+((l?.data??[]).find(t=>t.id==e.pageId)?.[`slug${I}`]??""),className:(0,m.cn)("whitespace-nowrap block pl-5 pr-12 py-2.5 font-semibold text-sm !text-dark1 hover:bg-[#00000033] cursor-pointer uppercase",O==Number(e.pageId)?"text-[#18a0fb]":""),target:e.externalLink&&e.openInNewTab?"_blank":"_self",rel:"noopener noreferrer",children:(0,m.ZH)(e?.[`label${I}`])})},t))})]})},t)})]}),(0,n.jsx)(ez.LanguageSelector,{hasEnLng:e.config?.hasEnLng??!1,hasNlLng:e.config?.hasNlLng??!1}),(e?.config?.actions??[]).filter(e=>(e?.buttonTextFr??"")!="").length>0&&(0,n.jsx)("div",{className:"flex items-center gap-3 ml-1",children:(e?.config?.actions??[]).filter(e=>(e?.buttonTextFr??"")!="").map((e,t)=>(0,n.jsx)(eF.CustomLink,{url:e.linkFr,className:(0,m.cn)("rounded-sm uppercase shadow-md font-semibold inline-flex items-center justify-center px-[1.625rem] py-2.5 text-sm bg-button-1 text-white",0==t&&"py-[9px] px-6 bg-button-2 text-dark1"),children:e?.buttonTextFr},t))})]})}),(0,n.jsxs)("div",{className:"w-full h-full flex-1 flex flex-col items-center",children:[J||(M?.slugEn??"")==""?(0,n.jsx)("div",{className:"mt-16 w-full h-full flex items-center justify-center",children:(0,n.jsx)(d.A,{className:"h-[60px] w-[60px] animate-spin text-gray-500"})}):p.vk.map(e=>e.slugEn).includes(M?.slugEn??"")?(0,n.jsx)(N.default,{slug:M?.slugEn??"",lng:A}):(0,n.jsx)("div",{className:(0,m.cn)("w-full h-full flex-1 flex flex-col items-center pt-6 bg-site-bg",(H??[]).length>0&&["carousel","page-title"].includes(H[0].identifier)&&"!pt-0"),children:H.map((t,i)=>(0,n.jsx)(s.Fragment,{children:(t?.content?.visibility==void 0||t?.content?.visibility)&&(0,n.jsx)("div",{"data-blockid":t.blockParentId&&0!=t.blockParentId?t.blockParentId:t.blockId,className:(0,m.cn)("container flex justify-center items-center py-8","footer"===t.identifier&&"max-w-full px-[0px] !pt-0 mt-[68px] mb-[0px] !bg-navbar-footer","carousel"===t.identifier&&"max-w-full px-[0px] !py-0","pack"===t.identifier&&"!px-0",!["footer","carousel","events-slide"].includes(t.identifier)&&"!w-full !max-w-none [&>div]:container [&>div]:py-8 [&>div]:rounded-2xl",!["footer","carousel","events-slide"].includes(t.identifier)&&"bg-[var(--custom-bg)] [&>div]:bg-[var(--custom-box)]"),style:{"--custom-box":`${t?.content?.currentColor??e.config?.blockBoxColors?.find(e=>e.isDefault)?.color??"#F1F5F9"}`,"--custom-bg":`${t?.content?.bgColor??e.config?.blockBgColors?.find(e=>e.isDefault)?.color??"transparent"}`,..."footer"!==t.identifier&&"carousel"!==t.identifier&&"events-slide"!==t.identifier&&{paddingTop:`${e.config?.blockPadding??68}px`,paddingBottom:`${e.config?.blockPadding??68}px`}},children:(0,n.jsx)(e_.H,{initValue:{content:t},children:eg(t)})},t.blockId)},i))}),e.config?.floatingButton&&(e.config?.floatingButton.buttonTextFr||e.config?.floatingButton.icon)&&e.config?.floatingButton.linkFr&&(0,n.jsxs)("a",{href:e.config?.floatingButton.linkFr,className:(0,m.cn)("fixed bottom-6 right-6 z-50 flex-1 rounded-full uppercase shadow-md font-semibold flex items-center justify-center gap-3 py-4 px-4 text-lg bg-button-1 text-white hover:bg-slate-800 hover:text-white",e.config?.floatingButton.buttonTextFr&&"px-5",!e.config?.floatingButton.icon&&"px-6 py-3"),children:[e.config?.floatingButton.icon&&(0,n.jsx)(eh.IconRenderer,{name:e.config?.floatingButton.icon,className:"text-[20px] !text-white"}),e.config?.floatingButton.buttonTextFr]})]})]})})};var eT=i(11062);let eP=({siteInfo:e,siteMenu:t,organizationInfo:i,pages:r,siteBlocks:o})=>{let c=a.n.use.setAuth();return(0,s.useEffect)(()=>{(async()=>{try{let e=await (0,l.G)();if(null!=e){let{user:t,token:i,expiresIn:n,createdAt:s}=e;c({access_token:i,user:(0,m.RP)(t,eT.d),expires_in:n,createdAt:s})}}catch(e){console.error("Error fetching data:",e)}})()},[]),(0,n.jsx)("div",{className:"w-full h-full",style:{"--site-bg":e.config?.siteBgColor??"#f1f5f9","--dark-1":e.config?.textDefaultColor??"#29394d","--dark-3":e.config?.textSecondaryColor??"#6d7f92","--button-1":e.config?.buttonPrimaryColor??"#0f172a","--button-2":e.config?.buttonSecondaryColor??"#ffffff","--header":e.config?.headerBgColor??"#f1f5f9","--navbar-footer":e.config?.navbarAndFooterBgColor??"#ffffff"},children:(0,n.jsx)(eB,{siteInfo:e,siteMenu:t,organizationInfo:i,pages:r,siteBlocks:o})})}},70490:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>h});
9var n=i(95155),s=i(12115),l=i(84616),a=i(56671),r=i(59434),o=i(30285),c=i(25618),d=i(49345),u=i(35918),m=i(62525),x=i(13052);let p=({cardPosition:e,data:t=null,lng:i="Fr",edit:l=!1,cancel:a=!1,openedIndex:c,updateElementList:u,deleteElement:p,setOpenedIndex:f})=>{let h=(0,s.useRef)(i),[g,b]=(0,s.useState)(i),v=e=>{h.current=e,b(e)},j=(0,s.useRef)(t),[N,w]=(0,s.useState)(t),y=e=>{j.current=e,w(e)},k=(0,s.useRef)(null);function C({newTitle:t=null,newDescription:i=null}){let n={...j.current,...t&&{[`title${h.current}`]:t},...i&&{[`description${h.current}`]:i}};u&&void 0!=e&&u(e,n)}return(0,s.useEffect)(()=>{i!=g.toLowerCase()&&v(i)},[i]),(0,s.useEffect)(()=>{t&&y(t)},[t]),(0,s.useEffect)(()=>{a&&y(t)},[a]),l?(0,n.jsxs)("div",{className:"flex gap-5",children:[(0,n.jsxs)("div",{className:"w-full bg-white rounded-xl p-6",children:[(0,n.jsx)("h2",{className:"text-xl text-[#29394D] font-semibold leading-[120%] mb-4 border-[1px] border-dark1",contentEditable:"plaintext-only",ref:k,onBlur:function(){C({newTitle:k.current.innerText})},children:N?.[`title${g}`]??"Service"}),(0,n.jsx)("div",{className:"border border-slate-500",children:(0,n.jsx)(d.A,{disable:!1,value:N?.[`description${g}`]??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla.",onChange:function(e){C({newDescription:e})}})})]}),p&&void 0!=e&&(0,n.jsx)("div",{children:(0,n.jsx)(o.$,{variant:"destructive",className:"!px-2 h-auto",onClick:()=>p(e),children:(0,n.jsx)(m.A,{size:30})})})]}):(0,n.jsxs)("div",{className:(0,r.cn)("bg-white p-0 flex flex-col rounded-md cursor-pointer max-h-[76px] overflow-hidden transition-all duration-500 hover:bg-sky-50",c==e&&"max-h-[400px]"),onClick:()=>f(e??0),children:[(0,n.jsxs)("div",{className:"flex justify-between items-center p-6",children:[(0,n.jsx)("h2",{className:"text-xl text-[#29394D] font-bold",children:N?.[`title${g}`]??"Service"}),(0,n.jsx)(x.A,{className:(0,r.cn)("size-7",c==e&&"rotate-90 transition-all text-blue-500")})]}),(0,n.jsx)("div",{className:"sun-editor-editable !text-[#29394D] !bg-transparent !text-base font-normal !p-6 !pt-0 [&>p]:!mb-0 [&>*]:!mb-0",dangerouslySetInnerHTML:{__html:N?.[`description${g}`]??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla."}})]})},f={titleFr:"Accord\xe9on - Titre",titleEn:"Accord\xe9on - Titre",titleNl:"Accord\xe9on - Titre",descriptionFr:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book",descriptionEn:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book",descriptionNl:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book"},h=({data:e=null,lng:t="fr",edit:i=!1,save:m,cancel:x,visibility:h,updateBlockContent:g})=>{let b=(0,s.useRef)((0,r.ZH)(t)),[v,j]=(0,s.useState)((0,r.ZH)(t)),N=e=>{b.current=e,j(e)},[w,y]=(0,s.useState)(e?.content),k=(0,s.useRef)(null),C=e=>{k.current=e,y(e)},[S,$]=(0,s.useState)(e?.content?.list&&e?.content?.list.length>
90?e?.content?.list:[f,f,f]),[A,I]=(0,s.useState)(0),[F,_]=(0,s.useState)(null),E=(0,s.useRef)(null),L=(0,s.useRef)(null);function z({newName:e=null,newTitle:t=null,newDescription:i=null}){C({...k.current,...e&&{[`name${b.current}`]:e},...t&&{[`title${b.current}`]:t},...i&&{[`description${b.current}`]:i}})}function B(e,t){let i=(k.current?.list&&k.current?.list.length>0?k.current?.list:[f,f,f]).map((i,n)=>n===e?t:i);C({...k.current,list:i})}function T(e){let t=[...k.current?.list&&k.current?.list.length>0?k.current?.list:[f,f,f]];t.splice(e,1),C({...k.current,list:t}),a.o.success("Succ\xe8s",{description:"\xc9l\xe9ment bien supprim\xe9 de la liste"})}return(0,s.useEffect)(()=>{t!=v.toLowerCase()&&N((0,r.ZH)(t)),(0,u.T)(t).then(e=>{_(e)})},[t]),(0,s.useEffect)(()=>{C(e?.content)},[e]),(0,s.useEffect)(()=>{m&&g&&g(e?.uuid??"",{...k.current,list:w.list??[]})},[m,g]),(0,s.useEffect)(()=>{x&&C(e?.content)},[x]),(0,s.useEffect)(()=>{void 0!=h&&(w?.visibility??!0)!=h&&g&&g(e?.uuid??"",{...k.current,visibility:h})},[h]),i?(0,n.jsxs)("div",{className:"relative flex flex-col gap-5 !max-w-full",style:{...w?.fontColor?{"--dark-1":w?.fontColor,"--dark-3":`${w?.fontColor}99`}:{}},children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(c.p$,{className:"border-[1px] border-dark1",contentEditable:!0,ref:E,onBlur:function(){z({newName:E.current.innerText})},children:w?.[`name${v}`]??"Titre"}),(0,n.jsx)(c.H2,{className:"border-[1px] border-dark1 mb-2.5",contentEditable:!0,ref:L,onBlur:function(){z({newTitle:L.current.innerText})},children:w?.[`title${(0,r.ZH)(t)}`]??"Sous-titre"}),(0,n.jsx)(d.A,{disable:!1,value:w?.[`description${v}`]??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. <br/> It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.",onChange:function(e){z({newDescription:e})}})]}),(0,n.jsxs)(o.$,{variant:"outline",className:"!px-2 h-auto self-end",onClick:function(){let e=[...k.current?.list&&k.current?.list.length>0?k.current?.list:[f,f,f]];e.push(f),C({...k.current,list:e}),a.o.success("Succ\xe8s",{description:"Nouveau \xe9l\xe9ment bien ajout\xe9 \xe0 la fin de la liste"})},children:[(0,n.jsx)(l.A,{size:30}),"Ajouter un nouveau \xe9l\xe9ment"]}),(w?.list&&w?.list.length>0?w?.list:[f,f,f]).map((e,t)=>(0,n.jsx)(p,{data:e,lng:v,edit:i,cancel:x,cardPosition:t,openedIndex:A,updateElementList:
9B,deleteElement:(w?.list&&w?.list.length>0?w?.list:[f,f,f]).length>1?T:void 0,setOpenedIndex:I},`element-${t}`))]}):(0,n.jsxs)("div",{className:(0,r.cn)("flex flex-col gap-2.5 w-full",!(w?.visibility==void 0||w?.visibility)&&"opacity-50"),style:{...w?.fontColor?{"--dark-1":w?.fontColor,"--dark-3":`${w?.fontColor}99`}:{}},children:[(0,n.jsxs)("div",{className:(0,r.cn)("flex flex-col items-center gap-2.5 mb-[0]",(w?.[`name${v}`]==void 0||""!=(w?.[`name${v}`]??"").trim()||w?.[`title${v}`]==void 0||(w?.[`title${v}`]??"")!=""||w?.[`description${v}`]==void 0||w?.[`description${v}`]!=""&&w?.[`description${v}`]!="\n"&&w?.[`description${v}`]!="<p><br></p>")&&"!mb-[30px]"),children:[(w?.[`name${v}`]==void 0||""!=(w?.[`name${v}`]??"").trim())&&(0,n.jsx)(c.p$,{className:"!mb-0 text-center",children:w?.[`name${v}`]??w?.nameFr??F?.question_section??"QUESTIONS"}),(w?.[`title${v}`]==void 0||(w?.[`title${v}`]??"")!="")&&(0,n.jsx)(c.H2,{className:"text-center",children:w?.[`title${(0,r.ZH)(t)}`]??w?.titleFr??"Questions fr\xe9quemment pos\xe9es"}),(w?.[`description${v}`]==void 0||w?.[`description${v}`]!=""&&w?.[`description${v}`]!="\n"&&w?.[`description${v}`]!="<p><br></p>")&&(0,n.jsx)("div",{className:"sun-editor-editable !p-0 !text-dark1 !bg-transparent !text-base w-3/5 text-center",dangerouslySetInnerHTML:{__html:w?.[`description${(0,r.ZH)(t)}`]??w?.descriptionFr??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book."}})]}),(w?.list&&w?.list.length>0?w?.list:[f,f,f]).map((e,t)=>(0,n.jsx)(p,{data:e,lng:v,cardPosition:t,openedIndex:A,setOpenedIndex:I},`element-${t}`))]})}},74749:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ResponsiveContext:()=>r,ResponsiveProvider:()=>u,default:()=>m});var n=i(95155),s=i(12115),l=i(16225),a=i(78296);let r=(0,s.createContext)(null),o={maxWidth:l.Rp.MEDIUM},c={minWidth:l.Rp.MEDIUM+.1,maxWidth:l.Rp.LARGE-.1},d={minWidth:l.Rp.LARGE},u=({isMobile:e,children:t})=>{let i=(0,s.useMemo)(()=>({isMobile:!!e,isTablet:!1,isDesktop:!e}),[e]),[a,o]=(0,s.useState)(i);return(0,s.useEffect)(()=>{let e=window.matchMedia(`(max-width: ${l.Rp.MEDIUM}px)`),t=window.matchMedia(`(min-width: ${l.Rp.MEDIUM+.1}px) and (max-width: ${l.Rp.LARGE-.1}px)`),i=()=>{let i={isMobile:e.matches,isTablet:t.matches,isDesktop:!e.matches&&!t.matches};o(e=>e.isMobile===i.isMobile&&e.isTablet===i.isTablet&&e.isDesktop===i.isDesktop?e:i)};return i(),e.addEventListener("change",i),t.addEventListener("change",i),()=>{e.removeEventListener("change",i),t.removeEventListener("change",i)}},[]),(0,n.jsx)(r.Provider,{value:a,children:t})},m=function(){let e=(0,s.useContext)(r),t=(0,a.Ub)(o),i=(0,a.Ub)(c),n=(0,a.Ub)(d);return e??{isMobile:t,isTablet:i,isDesktop:n}}},75376:(e,t,i)=>{"use strict";i.d(t,{H:()=>r,_:()=>o});var n=i(95155);class s{constructor(){this.items=[],this.itemsBackup=[],this.activateBackward=!1,this.activateForward=!1}dequeue(){!this.isEmpty()&&(this.items.shift(),(this.isEmpty()||1==this.items.length)&&(this.activateBackward=!1,this.activateForward=!1))}enqueue(e){(0==this.items.length||Object.keys(e).length!=Object.keys(this.items.slice(-1)[0]).length||!Object.keys(e).every(t=>"object"==typeof e[t]?JSON.stringify(e[t])==JSON.stringify(this.items.slice(-1)[0][t]):e[t]==this.items.slice(-1)[0][t]))&&(this.resetListStartingFromActiveIdx(),10==this.items.length&&this.dequeue(),this.items.push(e),this.items.length>1&&(this.activateBackward=!0))}isEmpty(){return 0==this.items.length}goBackward(){let e;return void 0!=this.activeIndex&&0!=this.activeIndex?(this.activeIndex-=1,e=this.items[this.activeIndex]):void 0!=this.activeIndex||this.isEmpty()||(this.activeIndex=this.items.length-2,e=this.items[this.activeIndex]),0==this.activeIndex&&(this.activateBackward=!1),this.activateForward=!0,e}goForward(){let e;return void 0!=this.activeIndex&&this.activeIndex!=this.items.length-1&&(this.activeIndex+=1,e=this.items[this.activeIndex],this.activeIndex==this.items.length-1&&(this.activateForward=!1)),this.activateBackward=!0,e}resetListStartingFromActiveIdx(){void 0!=this.activeIndex&&(this.items.splice(this.activeIndex+1,this.items.length-1),this.activateForward=!1,this.activeIndex=void 0)}createABackUp(){let e=[...this.items].filter((e,t)=>
9void 0==this.activeIndex||t<=this.activeIndex);this.itemsBackup=[...e],this.items=[...e],this.activeIndex=void 0,this.activateBackward=e.length>1,this.activateForward=!1}resetToBackup(){this.items=[...this.itemsBackup],this.activateForward=!1,this.activeIndex=void 0,this.itemsBackup.length<=1?this.activateBackward=!1:(this.activateBackward=!0,this.activateForward=!0)}}var l=i(12115);let a=(0,l.createContext)(void 0);function r({initValue:e,children:t}){let[i,r]=(0,l.useState)(e.content),o=(0,l.useRef)(null),c=(0,l.useRef)(new s),[,d]=(0,l.useState)(new Date),u=(e,t=!1,i=!1,n=!1)=>{var s;o.current=e,r(e),!e||t||i||(!n||0!=c.current.items.length)&&n||(s=e,c.current.enqueue(s),d(new Date)),i&&(c.current.resetToBackup(),d(new Date))};return(0,n.jsx)(a.Provider,{value:{content:i,contentRef:o,backwardActive:c.current.activateBackward,forwardActive:c.current.activateForward,setContent:u,goBackward:function(){let e=c.current.goBackward();e&&u(e,!0),d(new Date)},goForward:function(){let e=c.current.goForward();e&&u(e,!0),d(new Date)},saveHistory:function(){c.current.createABackUp(),d(new Date)}},children:t})}let o=()=>{let e=(0,l.useContext)(a);if(!e)throw Error("useContent must be used within an ReservationProvider");return e}},75613:(e,t,i)=>{"use strict";i.d(t,{g:()=>o,w:()=>r});var n=i(95155),s=i(12115),l=i(19146);let a=(0,s.createContext)(void 0);function r({initValue:e,children:t}){let[i,r]=(0,s.useState)(e);return(0,n.jsx)(a.Provider,{value:{preferences:i,setLanguage:function(e){r({...i,language:e}),l.Ay.save("preferences",{...i,language:e},{path:"/",maxAge:2592e3})},setPreferences:r},children:t})}let o=()=>{let e=(0,s.useContext)(a);if(!e)throw Error("usePreferences must be used within an PreferencesProvider");return e}},76203:(e,t,i)=>{"use strict";i.d(t,{s:()=>s});var n=i(34477);let s=(0,n.createServerReference)("6070d00fdfa3bba4d69aee7d56546822562d85732c",n.callServer,void 0,n.findSourceMapURL,"postPageBlocksAction")},76532:(e,t,i)=>{"use strict";i.d(t,{e:()=>s});var n=i(34477);let s=(0,n.createServerReference)("60c98e36cd4ef2d1bcc86554cdfa318c0422781564",n.callServer,void 0,n.findSourceMapURL,"postMenuAction")},78055:(e,t,i)=>{"use strict";i.d(t,{B:()=>o});var n=i(95155),s=i(12115),l=i(51012),a=i(59409),r=i(59434);let o=({link:e,setLink:t,pageId:i,setPageId:o,selectorClassname:c})=>{let d=l.n.use.siteMenu();return(0,s.useEffect)(()=>{if((e??"")!=""&&o){if(e.includes("http"))e:for(let t of d){if(t.externalLink===e){o(t.pageId);break}for(let i of t.children??[])if(i.externalLink===e){o(i.pageId);break e}}else if("/"==e[0]){let t=e.split("/");if(t.length>2){for(let e of d)if((e.children??[]).length>0){for(let i of e.children??[])if((0,r.z9)(i.labelFr)===t.slice(-1)[0]){o(i.pageId);break}}}else if(2==t.length){for(let e of d)if((0,r.z9)(e.labelFr)===t.slice(-1)[0]){o(e.pageId);break}}}}},[e,d]),(0,n.jsxs)(a.l6,{onValueChange:function(e){e:for(let i of d){if(i.pageId===e){(i.externalLink??"")!=""?t(i.externalLink):t("/"+(0,r.z9)(i.labelFr)),o&&o(e);break}if((i.children??[]).length>0){for(let n of i.children??[])if(n.pageId===e){(n.externalLink??"")!=""?t(n.externalLink):t("/"+(0,r.z9)(i.labelFr)+"/"+(0,r.z9)(n.labelFr)),o&&o(e);break e}}}},value:i??void 0,children:[(0,n.jsx)(a.bq,{className:(0,r.cn)("w-full bg-white [&>span]:flex [&>span]:items-center [&>span]:justify-between [&>span]:w-full",c),children:(0,n.jsx)(a.yv,{placeholder:"S\xe9lectionner une page"})}),(0,n.jsxs)(a.gC,{className:"max-h-[400px] overflow-auto",children:[d.filter(e=>!e.children).filter(e=>"PAGE"===e.type).map((e,t)=>(0,n.jsxs)(a.eb,{value:e.pageId?.toString()??"",className:(0,r.cn)("[&>span:nth-child(2)]:w-full [&>span:nth-child(2)]:flex [&>span:nth-child(2)]:justify-between [&>span:nth-child(2)]:items-center"),children:[e.labelFr,(e.externalLink??"")!=""&&(0,n.jsxs)("span",{className:"ml-auto text-xs text-slate-500",children:["Externe ",e.needsLogin&&"| Besoin d'authentification"]})]},t)),d.filter(e=>e.children).map((e,t)=>{let i=[];for(let t of e.children??[])"PAGE"===t.type&&i.push(t);return(0,n.jsx)(n.Fragment,{children:i.map((i,s)=>(0,n.jsxs)(a.eb,{value:i.pageId?.toString()??"",className:(0,r.cn)("[&>span:nth-child(2)]:w-full [&>span:nth-child(2)]:flex [&>span:nth-child(2)]:justify-between [&>span:nth-child(2)]:items-center"),children:[e.labelFr,"\xa0|\xa0",i.labelFr,(i.externalLink??"")!=""&&(0,n.jsxs)("span",{className:"ml-auto text-xs text-slate-500",children:["Externe ",i.needsLogin&&"| Besoin d'authentification"]})]},`${t}-${s}`))})})]})]})}},80333:(e,t,i)=>{"use strict";i.d(t,{d:()=>a});var n=i(95155);i(12115);var s=i(4884),l=i(59434);function a({className:e,...t}){return(0,n.jsx)(s.bL,{"data-slot":"switch",className:(0,l.cn)("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:(0,n.jsx)(s.zi,{"data-slot":"switch-thumb",className:(0,l.cn)("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}},82917:e=>
9{e.exports={inputFile:"inputFile_inputFile__zT3rV",inputLabel:"inputFile_inputLabel__HcIbr",uploadZone:"inputFile_uploadZone__BIpO6"}},84311:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>F});var n=i(95155),s=i(12115),l=i(84616),a=i(62525),r=i(56671),o=i(59434),c=i(30285),d=i(47262),u=i(62523),m=i(25618),x=i(49345),p=i(74749),f=i(35918),h=i(37936),g=i(78055),b=i(17313),v=i(5196),j=i(54416),N=i(81284);let w={pricePerMonth:{Fr:"mois",En:"month(s)",Nl:"month(s)"},pricePerYear:{Fr:"ann\xe9e",En:"year",Nl:"year"},pricePerFixed:{Fr:"",En:"",Nl:""}},y=({cardPosition:e,packsWidth:t,data:i=null,lang:r="Fr",edit:m=!1,cancel:x=!1,allPricesAreSet:f,showYearPrices:y,headerHeight:k,headerRef:C,dict:S,updateElementList:$,deleteElement:A,duplicateOptions:I,togglePackRecommandedPlan:F})=>{let[_,E]=(0,s.useState)(i),L=(0,s.useRef)(null),z=e=>{L.current=e,E(e)},{isMobile:B}=(0,p.default)(),T=(0,s.useRef)(null),P=(0,s.useRef)(null);function R({newPlanName:t=null,newPlanDescription:i=null,newRecommandedPlan:n=null,newPricePerMonth:s=null,newPricePerYear:l=null,newPricePerMonthLabel:a=null,newPricePerYearLabel:o=null,newPriceFixed:c=null,newPriceFixedLabel:d=null,newButtonName:u=null,newButtonLink:m=null,newOptions:x=null}){let p={...L.current,...t&&{[`planName${r}`]:t},...i&&{[`planDescription${r}`]:i},...null!=n&&{recommandedPlan:n},...s&&{pricePerMonth:s},...l&&{pricePerYear:l},...null!=a&&{[`pricePerMonthLabel${r}`]:a},...null!=o&&{[`pricePerYearLabel${r}`]:o},...c&&{priceFixed:c},...null!=d&&{priceFixedLabel:d},...null!=u&&{[`buttonName${r}`]:u},...null!=m&&{[`buttonLink${r}`]:m},...x&&{options:x}};$&&void 0!=e&&$(e,p)}(0,s.useEffect)(()=>{i&&z(i)},[i]),(0,s.useEffect)(()=>{T.current&&(T.current.innerText=_?.[`planName${r}`]??"plan"),P.current&&(P.current.innerText=_?.[`planDescription${r}`]??"Lorem Ipsum is simply dummy text of the printing and typesetting industry.")},[r]),(0,s.useEffect)(()=>{x&&z(i)},[x]);let M=(0,s.useMemo)(()=>{let e=_?.priceFixed;
9if(e&&"0.00"!==e.price&&0!==e.quantity){let t=_?.priceFixedLabel||"Starting from";return(0,n.jsx)("div",{className:"flex flex-col gap-2 items-start",children:(0,n.jsxs)("span",{className:"text-3xl font-bold text-dark1",children:[t," ",e.price," â¬"]})})}let t=["pricePerMonth","pricePerYear"],i=e=>_?.[e],s=e=>{let t=_?.[`${e}Label${r}`];return t?.trim()?t:"Starting from"},l=(e,t)=>`${1==t.quantity?"":`${t.quantity} `}${w[e][r]}`,a=t.find(e=>(i(e)?.quantity??0)!=0&&i(e)?.price!="0.00");if(!a)return null;let o=t.find(e=>e!=a&&(i(e)?.quantity??0)!=0&&i(e)?.price!="0.00"),c=y&&f&&!!o,d=c?o:a,u=c?i(o):i(a),m=!c&&o?i(o):null;return(0,n.jsxs)("div",{className:"flex flex-col gap-2 items-start relative w-full",children:[(0,n.jsxs)("span",{className:"text-3xl font-bold text-dark1",children:[s(d)," ",u.price,(0,n.jsxs)("em",{className:"not-italic !text-xl",children:["/",l(d,u)]})]}),m&&(0,n.jsxs)("span",{className:"text-dark1 text-base font-normal absolute right-0 -bottom-[55%]",children:["ou ",s(o)," ",m.price,"/",l(o,m)]})]})},[_,f,y,r]);function D(e){R({newOptions:e})}function O(e,t){D((_?.options??[]).map((i,n)=>n==e?t:i))}function U(){let e=[..._?.options??[]];e.push({optionNameFr:"Nouvelle option",optionNameEn:"Nouvelle option",optionNameNl:"Nouvelle option",included:!1}),D(e)}return m?(0,n.jsxs)("div",{className:(0,o.cn)("relative bg-white p-6 gap-6 flex flex-col rounded-sm border border-slate-900 flex-1 min-w-[25rem] max-h-[700px] overflow-auto"),style:{maxWidth:`${t}px`},children:[A&&void 0!=e&&(0,n.jsx)("div",{children:(0,n.jsxs)(c.$,{variant:"destructive",className:"absolute top-0 left-0 !px-2 h-auto !rounded-sm",onClick:()=>A(e),children:[(0,n.jsx)(a.A,{size:30}),"Supprimer le pack"]})}),(0,n.jsxs)("div",{className:"flex justify-between items-center",children:[(0,n.jsx)("span",{children:"Pack le plus populaire"}),(0,n.jsx)(d.S,{checked:_?.recommandedPlan,onCheckedChange:F})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-1 items-start",children:[(0,n.jsx)("h2",{className:"w-full text-xl font-semibold leading-[120%] border-[1px]",contentEditable:"plaintext-only",ref:T,onBlur:function(){R({newPlanName:T.current.innerText})},children:_?.[`planName${r}`]}),(0,n.jsx)("div",{className:"w-full !bg-transparent !text-base font-normal !p-0 !pt-0 [&>p]:!mb-0 [&>*]:!mb-0 border-[1px]",contentEditable:"plaintext-only",ref:P,onBlur:function(){R({newPlanDescription:P.current.innerText})},dangerouslySetInnerHTML:{__html:_?.[`planDescription${r}`]}})]}),(0,n.jsxs)(b.tU,{defaultValue:"month",className:"!gap-0 relative",children:[(0,n.jsx)("div",{className:"absolute top-[2px] flex gap-2 items-center",children:(0,n.jsx)("span",{className:"font-semibold",children:"Tarif par"})}),(0,n.jsx)(b.j7,{className:"ml-auto bg-white !rounded-none !p-0 gap-0.5",children:["Month","Year","Fix"].map((e,t)=>(0,n.jsx)(b.Xi,{value:e.toLowerCase(),className:"text-sm rounded-[4px_4px_0_0] bg-white border border-slate-900 text-slate-900 cursor-pointer !px-2.5 !py-2 !shadow-none data-[state=active]:bg-slate-900 data-[state=active]:text-white capitalize",children:(w[`pricePer${e}`]?.[r]??e).replace("(s)","")},t))}),["Month","Year"].map((e,t)=>{let i=_?.[`pricePer${e}`];return(0,n.jsx)(b.av,{value:e.toLowerCase(),children:(0,n.jsxs)("div",{className:"relative -top-[1px] flex flex-col gap-2.5 bg-white px-2.5 py-5 border border-slate-900 rounded-[4px_0_4px_4px]",children:[(0,n.jsxs)("div",{className:"flex flex-col items-start gap-2.5",children:[(0,n.jsx)("span",{className:"text-xs",children:"Texte avant le prix"}),(0,n.jsx)(u.p,{type:"text",placeholder:"Starting from",value:_?.[`pricePer${e}Label${r}`]??"",className:"bg-white w-full",onChange:t=>R({[`newPricePer${e}Label`]:t.target.value})})]}),(0,n.jsxs)("div",{className:"flex flex-col items-start gap-2.5",children:[(0,n.jsx)("span",{className:"text-xs",children:"Montant en â¬"}),(0,n.jsx)(u.p,{type:"number",placeholder:"Montant",value:Number(i?.price??"0").toString(),className:"bg-white w-full",onChange:t=>R({[`newPricePer${e}`]:{...i??{price:"0.00",quantity:1},price:Number(t.target.value).toFixed(2)}})})]}),(0,n.jsxs)("div",{className:"flex flex-col items-start gap-2.5",children:[(0,n.jsxs)("span",{className:"text-xs",children:["Nombre de ",w[`pricePer${e}`]?.[r]]}),(0,n.jsx)(u.p,{type:"number",placeholder:`Nombre de ${w[`pricePer${e}`]?.[r]}`,value:(i?.quantity??0).toString(),className:"bg-white w-full",onCh
9ange:t=>R({[`newPricePer${e}`]:{...i??{price:"0.00",quantity:1},quantity:Number(t.target.value)}})})]})]},t)},t)}),(0,n.jsx)(b.av,{value:"fix",children:(0,n.jsxs)("div",{className:"relative -top-[1px] flex flex-col gap-2.5 bg-white px-2.5 py-5 border border-slate-900 rounded-[4px_0_4px_4px]",children:[(0,n.jsxs)("div",{className:"flex flex-col items-start gap-2.5",children:[(0,n.jsx)("span",{className:"text-xs",children:"Texte avant le prix"}),(0,n.jsx)(u.p,{type:"text",placeholder:"Starting from",value:_?.priceFixedLabel??"",className:"bg-white w-full",onChange:e=>R({newPriceFixedLabel:e.target.value})})]}),(0,n.jsxs)("div",{className:"flex flex-col items-start gap-2.5",children:[(0,n.jsx)("span",{className:"text-xs",children:"Montant en â¬"}),(0,n.jsx)(u.p,{type:"number",placeholder:"Montant",value:Number(_?.priceFixed?.price??"0").toString(),className:"bg-white w-full",onChange:e=>R({newPriceFixed:{..._?.priceFixed??{price:"0.00",quantity:1},price:e.target.value}})})]})]})})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,n.jsx)("span",{className:"text-slate-900 font-semibold pb-2.5 border-b border-b-slate-900",children:"Bouton"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("span",{className:"text-xs",children:"Texte du bouton"}),(0,n.jsx)(u.p,{value:_?.[`buttonName${r}`],className:"bg-white",onChange:e=>R({newButtonName:e.target.value})})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("span",{className:"text-xs",children:"Lien du bouton"}),(0,n.jsx)(u.p,{value:_?.[`buttonLink${r}`],className:"bg-white",onChange:e=>R({newButtonLink:e.target.value})})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("span",{className:"text-xs",children:"S\xe9lectionner l'url \xe0 partir d'une page"}),(0,n.jsx)(g.B,{link:_?.[`buttonLink${r}`],pageId:void 0,setLink:e=>R({newButtonLink:e})})]})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,n.jsxs)("div",{className:"flex justify-between items-center pb-2.5 border-b border-b-slate-900",children:[(0,n.jsx)("span",{className:"text-slate-900 font-semibold",children:"Options"}),I&&(0,n.jsx)(c.$,{onClick:()=>I(_?.options??[]),children:"Appliquer aux packs suivants"})]}),(_?.options??[]).map((e,t)=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("span",{className:"text-xs",children:"Label"}),(0,n.jsxs)("div",{className:"flex gap-2.5 items-center",children:[(0,n.jsx)(u.p,{value:e?.[`optionName${r}`],className:"bg-white",onChange:i=>O(t,{...e,[`optionName${r}`]:i.target.value})}),(0,n.jsx)(c.$,{variant:"destructive",className:"!px-2 h-auto",onClick:()=>{D((_?.options??[]).filter((e,i)=>i!=t))},children:(0,n.jsx)(a.A,{size:30})})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("span",{className:"text-xs",children:"Information"}),(0,n.jsx)(u.p,{value:e?.[`optionInfo${r}`],className:"bg-white",onChange:i=>O(t,{...e,[`optionInfo${r}`]:i.target.value})})]}),(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("span",{className:"text-xs",children:"Inclus"}),(0,n.jsx)(d.S,{checked:e.included,onCheckedChange:i=>O(t,{...e,included:!!i.valueOf()})})]})]},t),t!=(_?.options??[]).length-1?(0,n.jsx)("div",{className:"w-full h-px bg-slate-400"}):(0,n.jsxs)("div",{className:"flex justify-end items-center gap-2.5 mt-2.5 cursor-pointer",onClick:U,children:[(0,n.jsx)(l.A,{size:16}),(0,n.jsx)("span",{className:"text-sm text-slate-900",children:"Ajouter une nouvelle option"})]})]}))]})]}):(0,n.jsxs)("div",{className:(0,o.cn)("relative bg-white p-8 gap-6 flex flex-col rounded-sm border border-dark1 flex-1 min-w-[20rem]",B&&"min-w-none w-full"),children:[(0,n.jsxs)("div",{className:"flex flex-col gap-1 items-start",ref:C,style:k?{minHeight:k}:void 0,children:[(0,n.jsx)("h2",{className:"text-xl text-dark1 font-bold",children:_?.[`planName${r}`]}),(0,n.jsx)("div",{className:"text-dark1 !bg-transparent !text-base font-normal !p-0 !pt-0 [&>p]:!mb-0 [&>*]:!mb-0",dangerouslySetInnerHTML:{__html:_?.[`planDescription${r}`]}})]}),(0,n.jsx)("div",{className:"w-full h-px bg-dark1"}),M&&(0,n.jsx)("div",{className:"flex flex-col gap-2 items-start text-dark1",children:M}),(_?.[`buttonName${r}`]??"")!==""&&(0,n.jsx)(h.CustomLink,{url:_?.[`buttonLink${r}`]??"",className:"uppercase border rounded-lg shadow-md font-semibold inline-flex items-center justify-center px-6 py-3 border-input bg-dark1 text-white hover:bg-dark3 hover:text-white",children:_?.[`buttonName${r}`]??""}),(0,n.jsx)("div",{className:"w-full h-px bg-dark1"}),(0,n.jsx)("div",{className:"flex flex-col gap-4 items-start",children:(_?.options??[]).map((e,t)=>(0,n.jsxs)("div",{className:(0,o.cn)("flex gap-4 items-center w-full"),children:[(0,n.jsx)("span",{className:(0,o.cn)("text-dark1",!e.included&&"opacity-50"),children:e.included?(0,n.jsx)(v.A,{size:20,className:"text-green-500"}):(0,n.jsx)(j.A,{size:20,className:"text-red-500"})}),(0,n.jsxs)("div",{className:"flex flex-1 justify-between items-center gap-2.5",children:[(0,n.jsx)("span",{className:(0,o.cn)("text-base font-normal text-dark1",!e.included&&"opacity-50"),children:e?.[`optionName${r}`]}),(e?.[`optionInfo${r}`]??"")!=""&&(0,n.jsxs)("div",{className:(0,o.cn)("relative group/option"),children:[(0,n.jsx)(N.A,{size:16,className:"cursor-pointer text-dark1"}),(0,n.jsx)("div",{className:(0,o.cn)("absolute bottom-5 text-center -right-2.5 bg-white p-2.5 border border-slate-400 rounded-lg w-[300px] text-sm text-dark1 shadow","group-hover/option:block hidden"),children:e?.[`optionInfo${r}`]}
9)]})]})]},t))}),_?.recommandedPlan&&(0,n.jsx)("div",{className:"absolute -top-10 left-1/2 -translate-x-1/2 w-[50%] py-2 bg-dark1 rounded-t-md flex justify-center",children:(0,n.jsx)("span",{className:"text-base font-semibold text-white",children:S?.most_popular??"Le plus populaire"})})]})};var k=i(22346);let C={planNameFr:"Basic",planNameEn:"Basic",planNameNl:"Basic",planDescriptionFr:"Lorem ipsum dolor sit amet",planDescriptionEn:"Lorem ipsum dolor sit amet",planDescriptionNl:"Lorem ipsum dolor sit amet",pricePerMonth:{price:"19.99",quantity:1},pricePerYear:{price:"149.99",quantity:1},priceFixed:{price:"0.00",quantity:1},priceFixedLabel:"",contactSupportPlan:!1,recommandedPlan:!1,buttonNameFr:"Contactez-nous",buttonNameEn:"Contactez-nous",buttonNameNl:"Contactez-nous",buttonLinkFr:"",buttonLinkEn:"",buttonLinkNl:"",options:[{optionNameFr:"Option 1 Fr",optionNameEn:"Option 1 En",optionNameNl:"Option 1 Nl",included:!0},{optionNameFr:"Option 2 Fr",optionNameEn:"Option 2 En",optionNameNl:"Option 2 Nl",included:!0},{optionNameFr:"Option 3 Fr",optionNameEn:"Option 3 En",optionNameNl:"Option 3 Nl",included:!1},{optionNameFr:"Option 4 Fr",optionNameEn:"Option 4 En",optionNameNl:"Option 4 Nl",included:!1}]},S=()=>[C,C,C],$=()=>`public-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,7)}`,A=e=>({...e,pricePerMonth:e.pricePerMonthEnterprise??e.pricePerMonth,pricePerYear:e.pricePerYearEnterprise??e.pricePerYear,priceFixed:e.priceFixedEnterprise??{price:"0.00",quantity:0},priceFixedLabel:e.priceFixedLabelEnterprise??"",options:e.optionsEnterprise??e.options}),I=e=>Array.isArray(e?.publics)?e.publics.map((e,t)=>({...e,id:e.id??`public-${t}`,enabled:e.enabled??!0,list:Array.isArray(e.list)?e.list:S()})):e?.list!=null||e?.individualEnabled!=null||e?.enterpriseEnabled!=null?[{id:"individuals",labelFr:"Individuel",labelEn:"Individual",labelNl:"Particulier",enabled:e?.individualEnabled??!0,list:e?.list?.length?e.list:S()},{id:"enterprises",labelFr:"Entreprise",labelEn:"Enterprise",labelNl:"Bedrijf",enabled:e?.enterpriseEnabled??!1,list:e?.listEnterprise!=null?e.listEnterprise:e?.list?.length?e.list.map(A):S().map(A)}]:[{id:"individuals",labelFr:"Individuel",labelEn:"Individual",labelNl:"Particulier",enabled:!0,list:S()}],F=({data:e=null,lng:t="fr",edit:i=!1,save:h,cancel:g,visibility:b,updateBlockContent:v})=>{let j=(0,s.useRef)((0,o.ZH)(t)),[N,w]=(0,s.useState)((0,o.ZH)(t)),A=e=>{j.current=e,w(e)},[F,_]=(0,s.useState)(e?.content),E=(0,s.useRef)(null),L=e=>{E.current=e,_(e)}
9,[z,B]=(0,s.useState)(null),[T,P]=(0,s.useState)(()=>I(e?.content)),[R,M]=(0,s.useState)(()=>I(e?.content)?.[0]?.id??""),[D,O]=(0,s.useState)(()=>I(e?.content)?.[0]?.id??""),[U,V]=(0,s.useState)(!1),[q,H]=(0,s.useState)(0),Z=(0,s.useRef)([]),J=(0,s.useRef)([]),[G,W]=(0,s.useState)(0),{isMobile:Q}=(0,p.default)(),K=(0,s.useRef)(null),Y=(0,s.useRef)(null),X=e=>e?.[`label${N}`]||e.labelFr||"Public",ee=T.find(e=>e.id===R)??T[0],et=ee?.list??[],ei=T.filter(e=>e.enabled),en=ei.find(e=>e.id===D)??ei[0],es=en?.list??[],el=i?et:es,ea=e=>{let t=e??{price:"0.00",quantity:0};return 0!=t.quantity&&"0.00"!=t.price},er=es.every(e=>ea(e.pricePerMonth)&&ea(e.pricePerYear))&&!es.some(e=>{let t=e.priceFixed;return t?.price!=null&&t?.price!="0.00"&&(t?.quantity??0)!=0});function eo({newTitle:e=null,newDescription:t=null}){L({...E.current,...e&&{[`title${j.current}`]:e},...t&&{[`description${j.current}`]:t}})}function ec(e,t){L({...E.current,publics:T.map(i=>i.id===e?{...i,...t}:i)})}function ed(e,t){L({...E.current,publics:T.map(i=>i.id===e?{...i,list:t}:i)})}function eu(e,t){if(!ee)return;let i=et.map((i,n)=>n===e?t:i);ed(ee.id,i)}function em(e){if(!ee)return;let t=[...et];t.splice(e,1),ed(ee.id,t),r.o.success("Succ\xe8s",{description:"\xc9l\xe9ment bien supprim\xe9 de la liste"})}return(0,s.useEffect)(()=>{t!=N.toLowerCase()&&A((0,o.ZH)(t)),(0,f.T)(t).then(e=>{B(e)})},[t]),(0,s.useEffect)(()=>{L(e?.content)},[e]),(0,s.useEffect)(()=>{P(I(F))},[F]),(0,s.useEffect)(()=>{h&&v&&v(e?.uuid??"",{...E.current,publics:T})},[h,v]),(0,s.useEffect)(()=>{g&&L(e?.content)},[g]),(0,s.useEffect)(()=>{void 0!=b&&(F?.visibility??!0)!=b&&v&&v(e?.uuid??"",{...E.current,visibility:b})},[b]),(0,s.useEffect)(()=>{let e=()=>{if(Y.current){let e=Y.current.getBoundingClientRect().width-32*(el.length>1?2:1),t=e/el.length,i=0;for(;t<400&&i<el.length;)i+=1,t=e/(el.length-i);W(t<500?Math.round(t):500)}};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[Y,el]),(0,s.useEffect)(()=>{if(i||Q)return void H(0);let e=()=>{let e=Z.current.filter(Boolean);0!==e.length&&H(Math.max(...e.map(e=>e.offsetHeight)))};return e(),Z.current.filter(Boolean).forEach(t=>{let i=new ResizeObserver(e);i.observe(t),J.current.push(i)}),()=>{J.current.forEach(e=>e.disconnect()),J.current=[]}},[es,i,Q,N]),i?(0,n.jsxs)("div",{className:"relative flex flex-col gap-5 !max-w-full",style:{...F?.fontColor?{"--dark-1":F?.fontColor,"--dark-3":`${F?.fontColor}99`}:{}},children:[(0,n.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,n.jsx)(m.H2,{className:"border-[1px] border-slate-900 mb-2.5 min-w-[10ch] text-center",contentEditable:!0,ref:K,onBlur:function(){eo({newTitle:K.current.innerText})},children:F?.[`title${N}`]??z?.pack_section??"Nos Packs"}),(0,n.jsx)("div",{className:"border border-slate-300",children:(0,n.jsx)(x.A,{disable:!1,value:F?.[`description${N}`]??"Lorem Ipsum is simply dummy text of the printing and typesetting industry.",onChange:function(e){eo({newDescription:e})}})})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-3 border border-slate-300 rounded-sm p-3",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)("span",{className:"text-sm font-medium text-slate-900",children:"Publics cibles"}),T.map(e=>(0,n.jsx)("button",{type:"button",className:(0,o.cn)("px-3 py-1.5 rounded-full border text-sm font-medium capitalize transition-colors cursor-pointer",e.id===ee?.id?"bg-slate-900 text-white border-slate-900":"bg-white text-slate-900 border-slate-300 hover:border-slate-900",!e.enabled&&e.id!==ee?.id&&"opacity-40"),onClick:()=>M(e.id),children:X(e)},e.id)),(0,n.jsx)(c.$,{variant:"outline",className:"!px-2 h-auto",onClick:function(){let e={id:$(),labelFr:"Public "+(T.length+1),labelEn:"Public "+(T.length+1),labelNl:"Publiek "+(T.length+1),enabled:!0,list:S()};L({...E.current,publics:[...T,e]}),M(e.id),r.o.success("Succ\xe8s",{description:"Nouveau public bien ajout\xe9"})},children:(0,n.jsx)(l.A,{size:18})})]}),ee&&(0,n.jsxs)("div",{className:"flex flex-wrap items-end gap-3 border-t border-slate-300 pt-3",children:[["Fr","En","Nl"].map(e=>(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,n.jsxs)("span",{className:"text-xs text-slate-900",children:["Label ",e.toUpperCase()]}),(0,n.jsx)(u.p,{value:ee[`label${e}`]??"",className:"bg-white w-40",onChange:t=>ec(ee.id,{[`label${e}`]:t.target.value})})]},e)),(0,n.jsxs)("div",{className:"flex items-center gap-2 pb-1",children:[(0,n.jsx)(d.S,{checked:ee.enabled,onCheckedChange:e=>ec(ee.id,{enabled:!!e.valueOf()})}),(0,n.jsx)("span",{className:"text-sm text-slate-900",children:"Actif"})]}),T.length>1&&(0,n.jsx)(c.$,{variant:"destructive",className:"!px-2 h-auto",onClick:()=>(function(e){if(T.length<=1)return;let t=T.filter(t=>t.id!==e);
9L({...E.current,publics:t}),R===e&&M(t[0]?.id??""),D===e&&O(t[0]?.id??""),r.o.success("Succ\xe8s",{description:"Public bien supprim\xe9"})})(ee.id),children:(0,n.jsx)(a.A,{size:16})})]})]}),(0,n.jsx)("div",{className:"flex justify-end",children:(0,n.jsxs)(c.$,{variant:"outline",className:"!px-2 h-auto self-end",onClick:function(){if(!ee)return;let e=[...et];e.push(C),ed(ee.id,e),r.o.success("Succ\xe8s",{description:"Nouveau \xe9l\xe9ment bien ajout\xe9 \xe0 la fin de la liste"})},children:[(0,n.jsx)(l.A,{size:30}),"Ajouter un nouveau pack"]})}),(0,n.jsx)("div",{className:"flex gap-8 flex-wrap justify-center",ref:Y,children:et.map((e,t)=>(0,n.jsx)(y,{data:e,lang:N,edit:i,cancel:g,cardPosition:t,packsWidth:G,updateElementList:eu,deleteElement:et.length>1?em:void 0,duplicateOptions:t!=et.length-1?e=>(function(e,t){if(!ee)return;let i=et.map((i,n)=>n>e?{...i,options:t.map(e=>{let t=(i.options??[]).find(t=>t.optionNameFr==e.optionNameFr);return t?{...e,...t.included&&{included:!0}}:e})}:i);ed(ee.id,i),r.o.success("Succ\xe8s",{description:"Les options sont bien dupliqu\xe9es"})})(t,e):void 0,togglePackRecommandedPlan:()=>(function(e){if(!ee)return;let t=et.map((t,i)=>i==e?{...t,recommandedPlan:!t.recommandedPlan}:{...t,recommandedPlan:!1});ed(ee.id,t)})(t),dict:z},`element-${t}`))})]}):(0,n.jsxs)("div",{className:(0,o.cn)("flex flex-col gap-6 w-full",!(F?.visibility==void 0||F?.visibility)&&"opacity-50"),style:{...F?.fontColor?{"--dark-1":F?.fontColor,"--dark-3":`${F?.fontColor}99`}:{}},children:[(F?.[`title${N}`]==void 0||""!=(F?.[`title${N}`]??"").trim()||F?.[`description${N}`]==void 0||F?.[`description${N}`]!=""&&F?.[`description${N}`]!="\n"&&F?.[`description${N}`]!="<p><br></p>")&&(0,n.jsxs)("div",{className:(0,o.cn)("flex flex-col items-center gap-6 mb-[30px]"),children:[(F?.[`title${N}`]==void 0||""!=(F?.[`title${N}`]??"").trim())&&(0,n.jsx)(m.H2,{className:"text-center text-4xl",children:F?.[`title${N}`]??F?.titleFr??z?.pack_section??"Nos Packs"}),(F?.[`description${N}`]==void 0||F?.[`description${N}`]!=""&&F?.[`description${N}`]!="\n"&&F?.[`description${N}`]!="<p><br></p>")&&(0,n.jsx)("div",{className:"sun-editor-editable !p-0 !text-dark1 !bg-transparent !text-base w-3/5 text-center",dangerouslySetInnerHTML:{__html:F?.[`description${N}`]??F?.descriptionFr??"Lorem Ipsum is simply dummy text of the printing and typesetting industry."}})]}),(ei.length>1||er)&&(0,n.jsxs)("div",{className:(0,o.cn)("w-full flex flex-col gap-[30px] mb-[30px]",ei.length>1&&er&&"mx-auto w-fit flex-row items-center rounded-full gap-4 p-2 bg-[rgb(from_var(--dark-1)_r_g_b_/_0.02)] border border-[var(--dark-1)]"),children:[ei.length>1&&(0,n.jsx)("div",{className:"relative flex rounded-full p-1 mx-auto bg-white border border-[var(--dark-1)]",children:ei.map(e=>(0,n.jsx)("span",{className:(0,o.cn)("flex items-center text-dark1 justify-center px-6 h-12 rounded-full cursor-pointer text-[14px] capitalize font-semibold",en?.id===e.id&&"bg-dark1 text-white"),onClick:()=>O(e.id),children:X(e)},e.id))}),er&&(0,n.jsxs)(n.Fragment,{children:[ei.length>1&&(0,n.jsx)(k.w,{orientation:"vertical",className:"bg-[var(--dark-1)] !h-9 opacity-50"}),(0,n.jsxs)("div",{className:"relative flex rounded-full p-1 mx-auto bg-white border border-[var(--dark-1)]",children:[(0,n.jsx)("div",{className:(0,o.cn)("absolute w-[calc(50%_-_4px)] h-12 rounded-full bg-dark1 left-1 z-[1] transition-all",U&&"translate-x-full")}),(0,n.jsx)("span",{className:(0,o.cn)("flex items-center text-dark1 justify-center w-[16ch] h-12 rounded-full cursor-pointer text-[14px] capitalize font-semibold z-[2]",!U&&"text-white"),onClick:()=>V(!1),children:z?.monthly??"mensuel"}),(0,n.jsx)("span",{className:(0,o.cn)("flex items-center text-dark1 justify-center w-[16ch] h-12 rounded-full cursor-pointer text-[14px] capitalize font-semibold z-[2]",U&&"text-white"),onClick:()=>V(!0),children:z?.yearly??"annuel"})]})]})]}),(0,n.jsx)("div",{className:(0,o.cn)("flex gap-4 flex-wrap justify-center",es.find(e=>!!e.recommandedPlan)&&!Q&&"mt-10",Q&&"gap-12 flex-col [&>div]:!max-w-full"),ref:Y,children:es.map((e,t)=>(0,n.jsx)(y,{data:e,lang:N,cardPosition:t,packsWidth:G,allPricesAreSet:er,showYearPrice
9s:U,headerHeight:q,headerRef:e=>Z.current[t]=e,dict:z},`element-${t}`))})]})}},85450:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n=i(12115),s=i(19146),l=i(51012),a=i(16225);let r=({siteInfo:e,siteMenu:t})=>{let i=l.n.use.setNavCommunity(),r=l.n.use.setSiteInfo(),o=l.n.use.setSiteMenu(),c=l.n.use.setPublicToken();return(0,n.useEffect)(()=>{e&&(e?.organization?.id&&i(e.organization),r(e))},[e,i,r]),(0,n.useEffect)(()=>{t&&o(t.structure)},[t,o]),(0,n.useEffect)(()=>{try{let e=s.Ay.load(a.t);if(e){let t="string"==typeof e?JSON.parse(e):e;t?.token&&c({access_token:t.token})}}catch{}},[c]),null}},85511:(e,t,i)=>{"use strict";i.d(t,{V:()=>m});var n=i(95155),s=i(12115),l=i(42355),a=i(13052),r=i(66474),o=i(50713),c=i(91032),d=i(59434),u=i(30285);function m({className:e,classNames:t,showOutsideDays:i=!0,captionLayout:s="label",buttonVariant:m="ghost",formatters:p,components:f,...h}){let g=(0,o.a)();return(0,n.jsx)(c.h,{showOutsideDays:i,className:(0,d.cn)("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:s,formatters:{formatMonthDropdown:e=>e.toLocaleString("default",{month:"short"}),...p},classNames:{root:(0,d.cn)("w-fit",g.root),months:(0,d.cn)("flex gap-4 flex-col md:flex-row relative",g.months),month:(0,d.cn)("flex flex-col w-full gap-4",g.month),nav:(0,d.cn)("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",g.nav),button_previous:(0,d.cn)((0,u.r)({variant:m}),"size-[var(--cell-size)] aria-disabled:opacity-50 p-0 select-none",g.button_previous),button_next:(0,d.cn)((0,u.r)({variant:m}),"size-[var(--cell-size)] aria-disabled:opacity-50 p-0 select-none",g.button_next),month_caption:(0,d.cn)("flex items-center justify-center h-[var(--cell-size)] w-full px-[var(--cell-size)]",g.month_caption),dropdowns:(0,d.cn)("w-full flex items-center text-sm font-medium justify-center h-[var(--cell-size)] gap-1.5",g.dropdowns),dropdown_root:(0,d.cn)("relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",g.dropdown_root),dropdown:(0,d.cn)("absolute bg-popover inset-0 opacity-0",g.dropdown),caption_label:(0,d.cn)("select-none font-medium","label"===s?"text-sm":"rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",g.caption_label),table:"w-full border-collapse",weekdays:(0,d.cn)("flex",g.weekdays),weekday:(0,d.cn)("text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",g.weekday),week:(0,d.cn)("flex w-full mt-2",g.week),week_number_header:(0,d.cn)("select-none w-[var(--cell-size)]",g.week_number_header),week_number:(0,d.cn)("text-[0.8rem] select-none text-muted-foreground",g.week_number),day:(0,d.cn)("relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",g.day),range_start:(0,d.cn)("rounded-l-md bg-accent",g.range_start),range_middle:(0,d.cn)("rounded-none",g.range_middle),range_end:(0,d.cn)("rounded-r-md bg-accent",g.range_end),today:(0,d.cn)("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",g.today),outside:(0,d.cn)("text-muted-foreground aria-selected:text-muted-foreground",g.outside),disabled:(0,d.cn)("text-muted-foreground opacity-50",g.disabled),hidden:(0,d.cn)("invisible",g.hidden),...t},components:{Root:({className:e,rootRef:t,...i})=>(0,n.jsx)("div",{"data-slot":"calendar",ref:t,className:(0,d.cn)(e),...i}),Chevron:({className:e,orientation:t,...i})=>"left"===t?(0,n.jsx)(l.A,{className:(0,d.cn)("size-4",e),...i}):"right"===t?(0,n.jsx)(a.A,{className:(0,d.cn)("size-4",e),...i}):(0,n.jsx)(r.A,{className:(0,d.cn)("size-4",e),...i}),DayButton:x,WeekNumber:({children:e,...t})=>(0,n.jsx)("td",{...t,children:(0,n.jsx)("div",{className:"flex size-[var(--cell-size)] items-center justify-center text-center",children:e})}),...f},...h})}function x({className:e,day:t,modifiers:i,...l}){let a=(0,o.a)(),r=s.useRef(null);return s.useEffect(()=>{i.focused&&r.current?.focus()},[i.focused]),(0,n.jsx)(u.$,{ref:r,variant:"ghost",size:"icon","data-day":t.date.toLocaleDateString(),"data-selected-single":i.selected&&!i.range_start&&!i.range_end&&!i.range_middle,"data-range-start":i.range_start,"data-range-end":i.range_end,"data-range-middle":i.range_middle,className:(0,d.cn)("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-[var(--cell-size)] flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",a.day,e),...l})}},85892:(e,t,i)=>{"use strict";i.d(t,{r:()=>j});var n=i(95155),s=i(59434),l=i(95882),a=i(57434),r=i(30285),o=i(16225),c=i(66766),d=i(73096),u=i(17313),m=i(17759),x=i(30356),p=i(18950),f=i(59409),h=i(62523),g=i(47262),b=i(88539),v=i(51012);let j=({form:e,pages:t,menuStructure:i,isSaving:j,showMenuInputs:N,isExternalPage:w,postPageMutation:y,putPageMutation:k,setIsSaving:C,setShowMenuInputs:S,setIsExternalPage:$})=>{let A=v.n.use.siteInfo(),I=v.n.use.siteMenu(),F=t=>{if("page"==t){if(S(!1),e.getValues("parent")&&""!=e.getValues("parent")||e.getValues("menuFr")&&""!=e.getValues("menuFr"))for(let t of o.e){let i=e.getValues(`slug${t}`),n=i?.split("/")??[];n?.length>1?e.setValue(`slug${t}`,n.slice(1,n.length).join("/")):e.setValue(`slug${t}`,i)}e.setValue("parent",void 0),e.setValue("subPageType",void 0),e.setValue("menuFr",void 0),e.setValue("menuNl",void 0),e.setValue("menuEn",void 0)}},_=i=>{if("page"==i){for(let t of(S(!1),o.e)){let i=e.getValues(`menu${t}`);if(i&&""!=i){let n=e.getValues(`slug${t}`).replace(`${(0,s.z9)(i)}`,"");"/"===n[0]&&(n=n.slice(1,n.length)),e.setValue(`slug${t}`,n)}}e.setValue("menuFr",void 0),e.setValue("menuNl",void 0),e.setValue("menuEn",void 0)}else{let i=e.getValues("parent");
9if(i&&""!=i){let n=t.data.find(e=>e.id===Number(i));if(n)for(let t of o.e){let i=n[`slug${t}`],s=e.getValues(`slug${t}`);e.setValue(`slug${t}`,s.replace(`${i}/`,""))}}e.setValue("parent",void 0)}e.setValue("subPageType",i)},E=i=>{let n=t.data.find(e=>e.id===Number(i)),s=e.getValues("parent"),l=0;for(let t of(""!=s&&(l=1),o.e)){let i=n[`slug${t}`],s=e.getValues(`slug${t}`),a=s?.split("/")??[];a?.length>1?e.setValue(`slug${t}`,i+"/"+a.slice(l,a.length).join("/")):e.setValue(`slug${t}`,i+"/"+s)}e.setValue("parent",i)},L=t=>{S(!1);let n=i.find(e=>e.labelFr===t);if(n)for(let t of o.e){let i=n[`label${t}`],l=e.getValues(`slug${t}`),a=l?.split("/")??[];a?.length>1?e.setValue(`slug${t}`,(0,s.z9)(i)+"/"+a.slice(1,a.length).join("/")):e.setValue(`slug${t}`,(0,s.z9)(i)+"/"+l),e.setValue(`menu${t}`,i)}},z=()=>{N||(e.setValue("menuFr",""),e.setValue("menuNl",""),e.setValue("menuEn","")),S(!N)},B=(t,i)=>{let n=e.getValues(`slug${i}`),l=n?.split("/")??[];l?.length>1?e.setValue(`slug${i}`,(0,s.z9)(t)+"/"+l[1]):e.setValue(`slug${i}`,(0,s.z9)(t)+"/"+n),e.setValue(`menu${i}`,t)},T=(t,i)=>{if(!e.watch("dynamicPage")){let n=e.getValues(`slug${i}`);if((0,s.z9)(t)!=n){let l=n?.split("/")??[];l?.length>1?e.setValue(`slug${i}`,l[0]+"/"+(0,s.z9)(t)):""!=n&&"subpage"==e.watch("type")?e.setValue(`slug${i}`,n+"/"+(0,s.z9)(t)):e.setValue(`slug${i}`,(0,s.z9)(t))}else e.setValue(`slug${i}`,(0,s.z9)(t))}e.setValue(`name${i}`,t)};async function P(t){try{let i=e.getValues("id");void 0===i?y.mutate({siteId:A?.id?A?.id?.toString():"",data:t}):k.mutate({pageId:i,data:t})}catch(e){console.error(e),C(!1)}}async function R(t){try{C(!0),e.setValue("type","page"),e.setValue("nameFr",t.nameFr),e.setValue("nameNl",t.nameNl),e.setValue("nameEn",t.nameEn),e.setValue("slugFr",t.slugFr),e.setValue("slugNl",t.slugNl),e.setValue("slugEn",t.slugEn),setTimeout(()=>{y.mutate({siteId:A?.id?A?.id?.toString():"",data:t})},500)}catch(e){console.error(e),C(!1)}}return(0,n.jsx)("div",{className:"flex flex-col p-4 overflow-[hidden_auto] h-full",children:(0,n.jsxs)(u.tU,{defaultValue:"blank",className:"flex flex-col w-full h-full",children:[void 0==e.getValues("id")&&(0,n.jsxs)(u.j7,{className:"w-full mb-4 h-auto bg-slate-900 gap-1",children:[(0,n.jsxs)(u.Xi,{className:"cursor-pointer flex-1 flex gap-2 py-2 h-auto text-basis bg-transparent text-white hover:bg-[#FFFFFF22] data-[state=active]:bg-white data-[state=active]:text-slate-900",value:"blank",children:[(0,n.jsx)(l.A,{size:18}),"Page vide"]}),A?.tag!="v2"&&(0,n.jsxs)(u.Xi,{className:"cursor-pointer flex-1 flex gap-2 py-2 h-auto text-basis bg-transparent text-white hover:bg-[#FFFFFF22] data-[state=active]:bg-white data-[state=active]:text-slate-900",value:"filled",children:[(0,n.jsx)(a.A,{size:18}),"Page personnalis\xe9e"]})]}),(0,n.jsxs)(u.av,{value:"blank",className:"flex-1 flex flex-col data-[state=inactive]:hidden",children:[(0,n.jsx)(m.lV,{...e,children:(0,n.jsxs)("form",{className:"space-y-5",children:[(0,n.jsx)(m.zB,{name:"type",control:e.control,render:({field:e})=>(0,n.jsxs)(m.eI,{className:"flex gap-6 items-center",children:[(0,n.jsx)(m.lR,{className:"font-semibold",children:"Type de page"}),(0,n.jsx)(m.MJ,{className:"!mt-0",children:(0,n.jsxs)(x.z,{onValueChange:t=>{e.onChange(t),F(t)},defaultValue:e.value,className:"flex gap-4",children:[(0,n.jsxs)(m.eI,{className:"flex gap-2 items-center",children:[(0,n.jsx)(m.MJ,{children:(0,n.jsx)(x.C,{value:"page"})}),(0,n.jsx)(m.lR,{className:"font-normal !mt-0",children:"Page"})]}),(0,n.jsxs)(m.eI,{className:"flex gap-2 items-center",children:[(0,n.jsx)(m.MJ,{children:(0,n.jsx)(x.C,{value:"subpage"})}),(0,n.jsx)(m.lR,{className:"font-normal !mt-0",children:"Sous-page"})]})]})}),(0,n.jsx)(m.C5,{})]})}),"subpage"===e.watch("type")&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m.zB,{name:"subPageType",control:e.control,render:({field:e})=>(0,n.jsxs)(m.eI,{className:"flex gap-6 items-center",children:[(0,n.jsx)(m.lR,{className:"font-semibold",children:"Type de sous-page"}),(0,n.jsx)(m.MJ,{className:"!mt-0",children:(0,n.jsxs)(x.z,{onValueChange:e=>{_(e)},defaultValue:e.value,className:"flex gap-4",children:[(0,n.jsxs)(m.eI,{className:"flex gap-2 items-center",children:[(0,n.jsx)(m.MJ,{children:(0,n.jsx)(x.C,{value:"page"})}
9),(0,n.jsx)(m.lR,{className:"font-normal !mt-0",children:"Page"})]}),(0,n.jsxs)(m.eI,{className:"flex gap-2 items-center",children:[(0,n.jsx)(m.MJ,{children:(0,n.jsx)(x.C,{value:"menu"})}),(0,n.jsx)(m.lR,{className:"font-normal !mt-0",children:"Menu"})]})]})}),(0,n.jsx)(m.C5,{})]})}),"page"===e.watch("subPageType")&&(0,n.jsx)(m.zB,{name:"parent",control:e.control,render:({field:e})=>(0,n.jsxs)(m.eI,{className:"flex flex-col w-full",children:[(0,n.jsx)(m.lR,{children:"Page"}),(0,n.jsx)(m.MJ,{className:"!mt-0",children:(0,n.jsxs)(f.l6,{onValueChange:E,value:e.value,children:[(0,n.jsx)(f.bq,{className:"w-full",children:(0,n.jsx)(f.yv,{placeholder:"S\xe9lectionner une page"})}),(0,n.jsx)(f.gC,{children:i.filter(e=>"PAGE"===e.type).map((e,t)=>(0,n.jsx)(f.eb,{value:e.pageId?.toString()??"",children:e.labelFr},t))})]})}),(0,n.jsx)(m.C5,{})]})}),"menu"===e.watch("subPageType")&&(0,n.jsxs)("div",{className:"flex gap-4 items-end",children:[!N&&(0,n.jsx)(m.zB,{name:"menuFr",control:e.control,render:({field:e})=>(0,n.jsxs)(m.eI,{className:"flex flex-col w-full",children:[(0,n.jsx)(m.lR,{children:"Menu"}),(0,n.jsx)(m.MJ,{className:"!mt-0",children:(0,n.jsxs)(f.l6,{onValueChange:L,value:e.value,children:[(0,n.jsx)(f.bq,{className:"w-full",children:(0,n.jsx)(f.yv,{placeholder:"S\xe9lectionner un menu"})}),(0,n.jsx)(f.gC,{children:i.filter(e=>"MENU"===e.type).map((e,t)=>(0,n.jsx)(f.eb,{value:e.labelFr,children:e.labelFr},t))})]})}),(0,n.jsx)(m.C5,{})]})}),N&&(0,n.jsx)("div",{className:"flex gap-4 items-center",children:o.e.map((t,i)=>("En"!=t||A?.config?.hasEnLng)&&("Nl"!=t||A?.config?.hasNlLng)?(0,n.jsx)(m.zB,{name:`menu${t}`,control:e.control,render:({field:e})=>(0,n.jsxs)(m.eI,{children:[(0,n.jsxs)(m.lR,{children:["Menu ",t]}),(0,n.jsx)(m.MJ,{children:(0,n.jsx)(h.p,{...e,value:e.value?.toString(),onChange:e=>{B(e.target.value,t)}})}),(0,n.jsx)(m.C5,{})]})},i):null)}),(0,n.jsx)(r.$,{onClick:()=>z(),type:"button",children:N?"Annuler":"Cr\xe9er un menu"})]})]}),!e.watch("id")&&!w&&(0,n.jsx)(m.zB,{control:e.control,name:"duplicatePage",render:({field:t})=>(0,n.jsxs)(m.eI,{className:"flex flex-col",children:[(0,n.jsx)(m.lR,{className:"",children:"Dupliquer des blocs depuis une page existante."}),(0,n.jsx)(m.MJ,{children:(0,n.jsxs)(f.l6,{onValueChange:t=>e.setValue("duplicatePage",t),value:t.value??void 0,children:[(0,n.jsx)(f.bq,{className:"w-full",children:(0,n.jsx)(f.yv,{placeholder:"S\xe9lectionner une page"})}),(0,n.jsxs)(f.gC,{className:"max-h-[400px] overflow-auto",children:[I.filter(e=>"PAGE"===e.type&&!e.externalLink).map((e,t)=>(0,n.jsx)(f.eb,{value:e.pageId?.toString()??"",children:e.labelFr},t)),I.filter(e=>e.children).map((e,t)=>{let i=[];for(let t of e.children??[])"PAGE"!==t.type||t.externalLink||i.push(t);return(0,n.jsx)(n.Fragment,{children:i.map((i,s)=>(0,n.jsxs)(f.eb,{value:i.pageId?.toString()??"",children:[e.labelFr,"\xa0|\xa0",i.labelFr]},`${t}-${s}`))})})]})]})})]})}),(0,n.jsxs)(u.tU,{defaultValue:"fr",className:"!gap-0 relative",children:[(0,n.jsx)("label",{className:"absolute font-semibold inline-flex top-0.5",children:"Donn\xe9es de la page"}),(0,n.jsx)(u.j7,{className:"ml-auto bg-white !rounded-none !p-0 gap-0.5",children:o.e.map((e,t)=>("En"!=e||A?.config?.hasEnLng)&&("Nl"!=e||A?.config?.hasNlLng)?(0,n.jsx)(u.Xi,{value:e.toLowerCase(),className:"text-sm rounded-[4px_4px_0_0] bg-white border border-slate-500 text-slate-500 cursor-pointer !px-2.5 !py-2 !shadow-none data-[state=active]:bg-slate-900 data-[state=active]:text-white",children:(0,s.ZH)(o.tN.fr[e])},t):null)}),o.e.map((t,i)=>(0,n.jsx)(u.av,{value:t.toLowerCase(),children:(0,n.jsxs)("div",{className:"relative -top-[1px] flex flex-col gap-5 bg-white px-4 py-5 border border-slate-500 rounded-[4px_0_4px_4px]",children:[(0,n.jsx)(m.zB,{name:`name${t}`,control:e.control,render:({field:e})=>(0,n.jsxs)(m.eI,{children:[(0,n.jsx)(m.lR,{children:"Label *"}),(0,n.jsx)(m.MJ,{children:(0,n.jsx)(h.p,{...e,value:e.value?.toString(),onChange:e=>{T(e.target.value,t)},className:"outline-none outline-0 bg-white"})}),(0,n.jsx)(m.C5,{})]})}),(0,n.jsxs)("div",{className:"flex flex-col gap-5 px-4 py-5 border border-slate-500 rounded-[4px]",children:[(0,n.jsx)(m.zB,{name:`slug${t}`,control:e.control,render:({field:t})=>(0,n.jsxs)(m.eI,{className:(0,s.cn)((void 0!=w&&w||e.watch("dynamicPage"))&&"opacity-50"),children:[(0,n.jsx)(m.lR,{children:"Slug *"}),(0,n.jsx)(m.MJ,{children:(0,n.jsx)(h.p,{...t,value:t.value?.toString(),onChange:e=>
9{t.onChange(e),$(!1)},className:"outline-none outline-0 bg-white",disabled:e.watch("dynamicPage")})}),(0,n.jsx)(m.C5,{})]})}),(0,n.jsx)(m.zB,{control:e.control,name:`metaTitle${t}`,render:({field:e})=>(0,n.jsxs)(m.eI,{className:(0,s.cn)(void 0!=w&&w&&"opacity-50"),children:[(0,n.jsx)(m.lR,{className:"",children:"M\xe9tadonn\xe9e Titre"}),(0,n.jsx)(m.MJ,{children:(0,n.jsx)(h.p,{...e,value:e.value?.toString(),onChange:t=>{e.onChange(t),$(!1)},className:"outline-none outline-0 bg-white"})})]})}),(0,n.jsx)(m.zB,{control:e.control,name:`metaDescription${t}`,render:({field:e})=>(0,n.jsxs)(m.eI,{className:(0,s.cn)(void 0!=w&&w&&"opacity-50"),children:[(0,n.jsx)(m.lR,{className:"",children:"M\xe9tadonn\xe9e Description"}),(0,n.jsx)(m.MJ,{children:(0,n.jsx)(b.T,{...e,value:e.value?.toString(),onChange:t=>{e.onChange(t),$(!1)},className:"outline-none outline-0 bg-white"})})]})}),(0,n.jsx)(m.zB,{name:"hide",control:e.control,render:({field:t})=>(0,n.jsxs)(m.eI,{children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)(m.lR,{className:"font-semibold",children:"Ne pas afficher la page dans l'en-t\xeate."}),(0,n.jsx)(m.MJ,{children:(0,n.jsx)(g.S,{checked:t.value,onCheckedChange:t=>e.setValue("hide",!!t.valueOf())})})]}),(0,n.jsx)(m.C5,{})]})}),!e.watch("dynamicPage")&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"relative border !my-2",children:(0,n.jsx)("span",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-white px-5 text-slate-500",children:"OU"})}),(0,n.jsx)("div",{className:"flex flex-col gap-4",children:(0,n.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,n.jsx)(m.zB,{control:e.control,name:"externalLink",render:({field:t})=>(0,n.jsxs)(m.eI,{className:(0,s.cn)("flex flex-col",void 0!=w&&!w&&"opacity-50"),children:[(0,n.jsx)("div",{className:"flex justify-between items-center",children:(0,n.jsx)(m.lR,{className:"",children:"Page externe"})}),(0,n.jsx)(m.MJ,{children:(0,n.jsx)(h.p,{...t,value:t.value?.toString(),onChange:i=>{t.onChange(i),$(""!=i.target.value),e.setValue("duplicatePage",void 0)},className:"outline-none outline-0 bg-white",placeholder:"URL de la page: https://exemple.com/..."})})]})}),(0,n.jsxs)("div",{className:"flex justify-between items-center",children:[(0,n.jsx)(m.zB,{name:"needsLogin",control:e.control,render:({field:t})=>(0,n.jsxs)(m.eI,{children:[(0,n.jsxs)("div",{className:(0,s.cn)("flex gap-2.5 items-center",void 0!=w&&!w&&"opacity-50"),children:[(0,n.jsx)(m.MJ,{children:(0,n.jsx)(g.S,{checked:t.value,onCheckedChange:t=>e.setValue("needsLogin",!!t.valueOf())})}),(0,n.jsx)(m.lR,{className:"",children:"N\xe9cessite un auto-login"})]}),(0,n.jsx)(m.C5,{})]})}),(0,n.jsx)(m.zB,{name:"openInNewTab",control:e.control,render:({field:t})=>(0,n.jsxs)(m.eI,{children:[(0,n.jsxs)("div",{className:(0,s.cn)("flex gap-2.5 items-center",void 0!=w&&!w&&"opacity-50"),children:[(0,n.jsx)(m.MJ,{children:(0,n.jsx)(g.S,{checked:t.value,onCheckedChange:t=>e.setValue("openInNewTab",!!t.valueOf())})}),(0,n.jsx)(m.lR,{className:"",children:"Ouvrir dans un nouvel onglet"})]}),(0,n.jsx)(m.C5,{})]})})]})]})})]})]})]})},i))]})]})}),(0,n.jsx)(p.tb,{className:"mt-auto px-0",children:(0,n.jsx)("div",{className:"flex justify-end",children:j?(0,n.jsx)(d.N,{}):(0,n.jsx)(r.$,{onClick:e.handleSubmit(P),children:"Enregistrer"})})})]}),A?.tag!="v2"&&(0,n.jsx)(u.av,{value:"filled",className:"mt-0 pb-5 data-[state=inactive]:hidden",children:(0,n.jsx)("div",{className:"flex flex-col gap-5",children:o.vk.filter(e=>A?.tag!="v3"||"news"===e.slugEn).filter(e=>!["fiduciaryList","contributions"].includes(e.slugEn??"")||A?.organization?.id==1256).filter(e=>"booksList"!==e.slugEn||A?.organization?.id==4442).map((e,t)=>(0,n.jsx)("div",{className:"bg-gay-100",onClick:()=>R(e),children:(0,n.jsxs)("div",{className:"relative flex min-h-32 cursor-pointer flex-col items-center justify-center rounded-lg border p-2 bg-gray-100",children:[(0,n.jsx)(c.default,{src:`/images/pages/${e.slugEn}.png`,alt:"",className:"!relative",fill:!0}),(0,n.jsx)("div",{className:"mt-2 text-center uppercase",children:e.nameFr})]})},t))})})]})})}},88539:(e,t,i)=>{"use strict";i.d(t,{T:()=>l});var n=i(95155);i(12115);var s=i(59434);function l({className:e,...t}){return(0,n.jsx)("textarea",{"data-slot":"textarea",className:(0,s.cn)("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}},88900:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>p});var n=i(95155),s=i(12115),l=i(51012),a=i(2706),r=i(25618),o=i(59434),c=i(16225),d=i(2485);i(98472);var u=i(35918),m=i(67613),x=i(66474);let p=({data:e=null,lng:t="fr",edit:i=!1,save:p,cancel:f,visibility:h,updateBlockContent:g})=>{let b=(0,o.ZH)(t),v=l.n.use.access_token(),j=l.n.use.public_token(),N=l.n.use.siteInfo(),w=l.n.use.user(),y=l.n.use.navCommunity(),k=(0,s.useRef)(v??j);k.current=v??j;
9let[C,S]=(0,s.useState)(null),[$,A]=(0,s.useState)(e?.content),I=(0,s.useRef)(null),F=(0,s.useRef)(null),[_,E]=(0,s.useState)([]),[L,z]=(0,s.useState)(1),[B,T]=(0,s.useState)(0),[P,R]=(0,s.useState)(!0);function M({newName:e=null,newTitle:t=null}){A({...$,...e&&{[`name${b}`]:e},...t&&{[`title${b}`]:t}})}return(0,s.useEffect)(()=>{(0,u.T)(t).then(e=>{S(e)})},[t]),(0,s.useEffect)(()=>{async function e(i=null){R(!0);try{let e=await (0,a.Ou)(k.current,i??y?.id??0,t,1===L?6:4,1===L?0:6+(L-2)*4),n=e?.data?.data,s=e.data.nbResult;n&&(1!==L?E([..._].concat(n)):E(n),T(s),R(!1))}catch(t){t.status&&404===t.status?e(9):R(!1)}}k.current&&N&&e()},[L,N]),(0,s.useEffect)(()=>{A(e?.content)},[e]),(0,s.useEffect)(()=>{p&&g&&g(e?.uuid??"",$)},[p,g]),(0,s.useEffect)(()=>{f&&A(e?.content)},[f]),(0,s.useEffect)(()=>{void 0!=h&&($?.visibility??!0)!=h&&g&&g(e?.uuid??"",{...$,visibility:h})},[h]),C?i?(0,n.jsxs)("div",{className:"container group !max-w-full",style:{...$?.fontColor?{"--dark-1":$?.fontColor,"--dark-3":`${$?.fontColor}99`}:{}},children:[(0,n.jsx)(r.p$,{className:"border-[1px] border-dark1",contentEditable:!0,ref:I,onBlur:function(){M({newName:I.current.innerText})},children:$?.[`name${b}`]??C.News??"ACTUALIT\xc9S"}),(0,n.jsx)(r.H2,{className:"mb-[30px] border-[1px] border-dark1",contentEditable:!0,ref:F,onBlur:function(){M({newTitle:F.current.innerText})},children:$?.[`title${b}`]??C.latest_articles}),_.length>0&&(0,n.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:[(0,n.jsx)("div",{className:"sm:col-span-2 lg:col-span-3",children:(0,n.jsx)(d.n,{article:_[0],type:"type7",env:c.Gu,user:w,token:v??j,i18n:C})}),_.map((e,t)=>t>=1?(0,n.jsx)(d.n,{article:e,type:"type5",env:c.Gu,user:w,token:v??j,i18n:C},`art-${t}`):null)]})]}):(0,n.jsxs)("div",{className:(0,o.cn)("group !w-full",!($?.visibility==void 0||$?.visibility)&&"opacity-50"),style:{...$?.fontColor?{"--dark-1":$?.fontColor,"--dark-3":`${$?.fontColor}99`}:{}},children:[($?.[`name${b}`]==void 0||$?.[`name${b}`]!=""&&$?.[`name${b}`]!="\n")&&(0,n.jsx)(r.p$,{children:$?.[`name${b}`]??$?.nameFr??C.News??"ACTUALIT\xc9S"}),($?.[`title${b}`]==void 0||$?.[`title${b}`]!=""&&$?.[`title${b}`]!="\n")&&(0,n.jsx)(r.H2,{className:"mb-[30px]",children:$?.[`title${b}`]??$?.titleFr??C.latest_articles}),P&&(0,n.jsx)("div",{className:"w-full flex justify-center items-center",children:(0,n.jsx)(m.A,{size:20,color:"#29394d",loading:!0})}),_.length>0&&(0,n.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:[(0,n.jsx)("div",{className:"sm:col-span-2 lg:col-span-3",children:(0,n.jsx)(d.n,{article:_[0],type:"type7",env:c.Gu,user:w,token:v??j,i18n:C})}),_.map((e,t)=>t>=1?(0,n.jsx)(d.n,{article:e,type:"type5",env:c.Gu,user:w,token:v??j,i18n:C},`art-${t}`):null)]}),_.length<B&&(0,n.jsx)("div",{className:(0,o.cn)("seeMoreButton","mt-10"),children:(0,n.jsx)("button",{onClick:()=>{R(!0),!P&&B&&_.length<B&&z(e=>e+1)},disabled:P,children:P?(0,n.jsx)(m.A,{size:15,color:"#29394d",loading:!0}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{children:C?.seeMore??"Voir plus"}),(0,n.jsx)(x.A,{})]})})})]}):null}},89543:(e,t,i)=>{"use strict";i.d(t,{LanguageSelector:()=>m});var n=i(95155),s=i(12115),l=i(35695),a=i(34869),r=i(75613),o=i(74749),c=i(59409),d=i(2714),u=i.n(d);function m({hasEnLng:e,hasNlLng:t}){let{preferences:{language:i},setLanguage:d}=(0,r.g)(),m=(0,l.useRouter)(),x=(0,l.usePathname)(),{isMobile:p}=(0,o.default)(),f=(0,s.useMemo)(()=>{let i=["fr"];return t&&i.push("nl"),e&&i.push("en"),i},[e,t]);function h(e){d(e);let t=x.split("/");t[1]=e,m.replace(t.join("/"))}return f.length<=1?null:p?(0,n.jsx)("div",{className:u().languageOptions,children:f.map((e,t)=>(0,n.jsx)("div",{className:i===e?u().currentLang:void 0,onClick:()=>h(e),children:e.toUpperCase()},t))}):(0,n.jsxs)(c.l6,{value:i,onValueChange:e=>h(e),children:[(0,n.jsxs)(c.bq,{className:"h-auto uppercase !bg-transparent !outline-none !border-none !p-0 font-semibold text-dark1 [&>svg]:!text-dark1 flex items-center !gap-0 [&>span]:ml-1 [&>span]:mr-2",children:[(0,n.jsx)(a.A,{size:16}),(0,n.jsx)(c.yv,{placeholder:"dd"})]}),(0,n.jsx)(c.gC,{className:"overflow-visible left-0 before:content-[''] before:absolute before:-top-1.5 before:left-[3.25rem] before:w-5 before:h-5 before:bg-white before:rotate-45",children:f.map((e,t)=>(0,n.jsx)(c.eb,{value:e,className:"uppercase cursor-pointer font-semibold",children:e},t))})]})}},90042:e=>{e.exports={titleAndDescription:"title-description_titleAndDescription__nlCI6",switch:"title-description_switch__tRjtZ",upDown:"title-description_upDown__zIGJ6",upDownDuplicate:"title-description_upDownDuplicate__jePue",upDuplicateDownDuplicate:"title-description_upDuplicateDownDuplicate__mCLgh",decreaseFirstHalf:"title-description_decreaseFirstHalf__L4REb",decreaseSecondHalf:"title-description_decreaseSecondHalf__y1F0S",decreaseMoreFirstHalf:"title-description_decreaseMoreFirstHalf__PFzYq",mobile:"title-description_mobile__EeytU",tablet:"title-description_tablet__hPgam",edit:"title-description_edit__eGo3P"}},90506:(e,t,i)=>{"use strict";i.d(t,{G:()=>s});var n=i(34477);let s=(0,n.createServerReference)("00fb46ce326aa2d8289e3c0d2c9a99b20c93f0ae44",n.callServer,void 0,n.findSourceMapURL,"getTTPUserFromCookieAction")},90555:(e,t,i)=>{"use strict";i.d(t,{A:()=>E});var n=i(95155),s=i(12115),l=i(29300),a=i.n(l),r=i(33646),o=i.n(r);let c=(e,t)=>{let{type:i,payload:n}=t;switch(i){case"FORM_UPDATE":return{...e,[n.propertyName]:n.value};case"FORMFIELD_ADD":return{...e,fields:[...e.fields,n.field]};
9case"FORMFIELD_DELETE":let s=[...e.fields];return s.splice(n.fieldIdx,1),{...e,fields:s};default:return e}};var d=i(62523),u=i(59409),m=i(47262),x=i(74126),p=i(84616),f=i(54416),h=i(59434),g=i(16242),b=i(80119);let v=["string","number","select","textarea","date picker","checkbox","radio","file"],j=["Images","Documents","Videos","Audios"];function N({formFieldIdx:e,formField:t,selectedLang:i,updateFormField:l,updateTypeFormField:a,deleteFormField:r,addNewFormField:c,deleteOption:N,toggleFileType:w}){let y="label"+i,[k,C]=(0,s.useState)(""),S=(0,g.m)();return(0,s.useEffect)(()=>{let e=t["label"+i];e!==k&&C(e)},[i,t]),(0,n.jsxs)(b.N,{value:t.name,dragListener:!1,dragControls:S,children:[(0,n.jsxs)("div",{className:o().formCreatorBodyField,children:[(0,n.jsx)("div",{children:(0,n.jsx)("div",{className:(0,h.cn)(o().button,"bg-slate-100 text-slate-900 border border-input"),onPointerDown:e=>S.start(e),children:e+1})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("span",{children:"\xc9tiquette"}),(0,n.jsx)(d.p,{name:"label",value:k,className:(0,h.cn)(o().input,"h-10"),placeholder:"\xc9tiquette du champ",onChange:({target:e})=>C(e.value),onBlur:({target:t})=>l(e,y,t.value)})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("span",{children:"Type"}),(0,n.jsxs)(u.l6,{value:t.type,onValueChange:t=>a(e,t),children:[(0,n.jsx)(u.bq,{className:"w-full h-10 capitalize",children:(0,n.jsx)(u.yv,{placeholder:"S\xe9lectionner un type"})}),(0,n.jsx)(u.gC,{children:v.map((e,t)=>(0,n.jsx)(u.eb,{value:e,className:"capitalize",children:e},t))})]})]}),(0,n.jsx)("div",{children:(0,n.jsx)("div",{className:(0,h.cn)(o().button,"text-red-500 border border-input hover:bg-slate-100"),onClick:()=>r(e),children:(0,n.jsx)(x.A,{size:18})})}),(0,n.jsx)("div",{children:(0,n.jsx)("div",{className:(0,h.cn)(o().button,"text-slate-900 border border-input hover:bg-slate-100"),onClick:()=>c(e+1),children:(0,n.jsx)(p.A,{size:18})})}),(0,n.jsxs)("div",{className:o().requiredCheckbox,children:[(0,n.jsx)("span",{children:"Obligatoire"}),(0,n.jsx)("span",{children:(0,n.jsx)(m.S,{checked:t.required,onCheckedChange:t=>l(e,"required",!!t.valueOf())})})]})]}),null!=t.options&&(0,n.jsxs)("div",{className:o().options,children:[(0,n.jsx)("div",{className:(0,h.cn)(o().subHeader,"text-slate-900"),children:"Entrer les diff\xe9rents options de ce champ"}),(0,n.jsxs)("div",{className:o().list,children:[t.options.map((t,i)=>(0,n.jsxs)("span",{className:o().listContent,onClick:()=>N(e,i),children:[t,(0,n.jsx)(f.A,{width:"16px",height:"16px",viewBox:"0 -1 24 24"})]},t+i)),(0,n.jsx)("span",{contentEditable:!0,className:o().emptyTag,onKeyDown:i=>(function(e,i){if("Enter"===e.key){let n=e.target,s=n.textContent;if(s&&""!=s.trim()){let e=[...t.options??[]];e.push(s),n.innerHTML="",l(i,"options",e)}e.preventDefault()}})(i,e)})]})]}),"file"===t.type&&(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-4",children:[(0,n.jsx)("div",{className:"font-bold",children:"Fichiers \xe0 accepter :"}),(0,n.jsx)("div",{className:"flex items-center gap-4",children:j.map((i,s)=>(0,n.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,n.jsx)("span",{className:"text-sm text-slate-900",children:i}),(0,n.jsx)(m.S,{checked:t.acceptedFile===i,onCheckedChange:t=>w(e,!!t.valueOf(),i)})]},s))})]})]})}var w=i(38543),y=i(88539),k=i(30285),C=i(18199),S=i(16225),$=i(51012);let A={fr:{Fr:"fran\xe7ais",Nl:"n\xe9erlandais",En:"anglais"}},I={name:"field_1",labelFr:"",labelNl:"",labelEn:"",type:"",required:!0},F={name:"",status:"PENDING",email:"",titleFr:"",titleNl:"",titleEn:"",subTitleFr:"",subTitleNl:"",subTitleEn:"",descriptionFr:"",descriptionNl:"",descriptionEn:"",fields:[{name:"field_1",labelFr:"Nom",labelNl:"Name",labelEn:"Name",type:"string",required:!0},{name:"field_2",labelFr:"Email",labelNl:"Email",labelEn:"Email",type:"string",required:!0},{name:"field_3",labelFr:"T\xe9l.",labelNl:"Tel.",labelEn:"Tel.",type:"string",required:!0},{name:"field_4",labelFr:"Message",labelNl:"Message",labelEn:"Message",type:"string",required:!0}],submitUrl:""},_=["title","subTitle","description"];function E({formData:e,createForm:t,updateComponentForm:i}
9){let l=$.n.use.siteInfo(),[r,u]=(0,s.useState)(!1),[m,x]=(0,s.useState)("Fr"),[p,f]=(0,s.useReducer)(c,e||F);function h(e,t,i){b("fields",p.fields.map((n,s)=>s===e?{...n,[t]:i}:n))}function g(e,t){return["checkbox","select","radio"].includes(t)?void b("fields",p.fields.map((i,n)=>n===e?{...i,type:t,options:[],acceptedFiles:void 0}:i)):"file"===t?void b("fields",p.fields.map((i,n)=>n===e?{...i,type:t,options:void 0,acceptedFiles:[]}:i)):void b("fields",p.fields.map((i,n)=>n===e?{...i,type:t}:i))}function b(e,t){f({type:"FORM_UPDATE",payload:{propertyName:e,value:t}})}function v(e){let t=[...p.fields.slice(0,e),I,...p.fields.slice(e)];b("fields",t=t.map((e,t)=>({...e,name:`field_${t}`})))}function j(e){f({type:"FORMFIELD_DELETE",payload:{fieldIdx:e}})}function E(e,t){if(0!=e){let i=[...p.fields[e].options??[]];i.splice(t,1),h(e,"options",i)}}function L(e,t,i){t&&h(e,"acceptedFile",i)}async function z(){u(!0);try{null===e&&t?t(p):i&&i(p),u(!1)}catch(e){e instanceof Error&&w.oR.error(e.message),u(!1)}}return(0,n.jsxs)("div",{id:o().formCreator,children:[(0,n.jsxs)("div",{id:o().formCreatorBody,children:[(0,n.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,n.jsxs)("div",{className:a()("flex flex-col gap-2 w-full"),children:[(0,n.jsx)("span",{className:"text-slate-900",children:"Nom du formulaire"}),(0,n.jsx)(d.p,{name:"name",value:p.name,className:"h-10",placeholder:"Exemple: Inscription",onChange:({target:e})=>b("name",e.value)})]}),(0,n.jsxs)("div",{className:"relative flex flex-col gap-2 w-full",children:[(0,n.jsx)("span",{className:"text-slate-900",children:"Adresse e-mail de destination du formulaire"}),(0,n.jsx)(d.p,{name:"email",value:p.email,className:"h-10",placeholder:"Exemple: [email protected]",onChange:({target:e})=>b("email",e.value)})]})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-3 relative p-5 mt-12 border-[1px] border-[var(--Content-Primary)] rounded-md",children:[(0,n.jsx)("div",{className:"absolute right-2.5 -top-10 flex gap-1 pl-6 z-[10]",children:S.e.map((e,t)=>("En"!=e||l?.config?.hasEnLng)&&("Nl"!=e||l?.config?.hasNlLng)?(0,n.jsx)("span",{className:a()("cursor-default px-2.5 capitalize h-[40px] bg-slate-900 hover:bg-slate-600 text-white flex items-center justify-center gap-[6px] font-medium text-sm rounded-t-[6px] border border-slate-900",m!=e&&"cursor-pointer bg-white !text-slate-900"),onClick:()=>x(e),children:A.fr[e]},t):null)}),_.map((e,t)=>"description"===e?(0,n.jsxs)("div",{className:"flex gap-2.5 items-start",children:[(0,n.jsx)("span",{className:"text-sm text-slate-900 w-1/4 capitalize",children:e}),(0,n.jsx)(y.T,{name:e,value:p[`${e}${m}`],minLength:5,className:"w-3/4",onChange:({target:t})=>b(`${e}${m}`,t.value)})]},t):(0,n.jsxs)("div",{className:"flex gap-2.5 items-center",children:[(0,n.jsx)("span",{className:"text-sm text-slate-900 w-1/4 capitalize",children:"subTitle"===e?"sous-titre":"titre"}),(0,n.jsx)(d.p,{name:e,value:p[`${e}${m}`],className:"w-3/4 h-10",onChange:({target:t})=>b(`${e}${m}`,t.value)})]},t)),(0,n.jsxs)("div",{id:o().formCreatorBodyFields,children:[(0,n.jsx)("h1",{children:"Les champs du formulaire :"}),(0,n.jsx)(C.x,{axis:"y",values:p.fields.map(e=>e.name),onReorder:function(e){let t=[...p.fields];b("fields",t=t.sort((t,i)=>e.indexOf(t.name??"")-e.indexOf(i.name??"")))},className:"flex flex-col gap-2.5",children:p.fields.map((e,t)=>(0,n.jsx)(N,{formFieldIdx:t,formField:e,selectedLang:m,updateFormField:h,updateTypeFormField:g,deleteFormField:j,addNewFormField:v,deleteOption:E,toggleFileType:L},e.name))})]})]})]}),(0,n.jsx)("div",{id:o().formCreatorFooter,children:(0,n.jsx)(k.$,{type:"button",onClick:z,disabled:r||!function(){let t=A.fr,i=!0;for(let e of _)for(let n of Object.keys(t))("En"!=n||l?.config?.hasEnLng)&&("Nl"!=n||l?.config?.hasNlLng)&&""===p[e+n]&&"subTitle"!=e&&"description"!=e&&"title"!=e&&(i=!1);return e&&e?.status!=p.status&&(i=!0),i}(),children:i?"Modifier":"Ajouter"})})]})}},90985:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(95155);function s({width:e="25",height:t="25",fill:i="currentColor"}){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:"0 0 25 25",fill:"none",children:(0,n.jsx)("path",{d:"M22.332 12.4517C22.332 6.89513 17.8549 2.39
9062 12.332 2.39062C6.80918 2.39062 2.33203 6.89513 2.33203 12.4517C2.33203 17.4734 5.98887 21.6358 10.7695 22.3906V15.36H8.23047V12.4517H10.7695V10.2351C10.7695 7.71358 12.2625 6.32074 14.5466 6.32074C15.6408 6.32074 16.7851 6.51725 16.7851 6.51725V8.99323H15.5242C14.282 8.99323 13.8945 9.76884 13.8945 10.5645V12.4517H16.6679L16.2246 15.36H13.8945V22.3906C18.6752 21.6358 22.332 17.4736 22.332 12.4517Z",fill:i})})}},91091:(e,t,i)=>{"use strict";i.d(t,{A7:()=>p,FN:()=>m,Oj:()=>h,Q8:()=>f,Wk:()=>x});var n=i(95155),s=i(12115),l=i(85005),a=i(35169),r=i(92138),o=i(59434),c=i(30285);let d=s.createContext(null);function u(){let e=s.useContext(d);if(!e)throw Error("useCarousel must be used within a <Carousel />");return e}function m({orientation:e="horizontal",opts:t,setApi:i,plugins:a,className:r,children:c,...u}){let[m,x]=(0,l.A)({...t,axis:"horizontal"===e?"x":"y"},a),[p,f]=s.useState(!1),[h,g]=s.useState(!1),b=s.useCallback(e=>{e&&(f(e.canScrollPrev()),g(e.canScrollNext()))},[]),v=s.useCallback(()=>{x?.scrollPrev()},[x]),j=s.useCallback(()=>{x?.scrollNext()},[x]),N=s.useCallback(e=>{"ArrowLeft"===e.key?(e.preventDefault(),v()):"ArrowRight"===e.key&&(e.preventDefault(),j())},[v,j]);return s.useEffect(()=>{x&&i&&i(x)},[x,i]),s.useEffect(()=>{if(x)return b(x),x.on("reInit",b),x.on("select",b),()=>{x?.off("select",b)}},[x,b]),(0,n.jsx)(d.Provider,{value:{carouselRef:m,api:x,opts:t,orientation:e||(t?.axis==="y"?"vertical":"horizontal"),scrollPrev:v,scrollNext:j,canScrollPrev:p,canScrollNext:h},children:(0,n.jsx)("div",{onKeyDownCapture:N,className:(0,o.cn)("relative",r),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...u,children:c})})}function x({className:e,...t}){let{carouselRef:i,orientation:s}=u();return(0,n.jsx)("div",{ref:i,className:"overflow-hidden","data-slot":"carousel-content",children:(0,n.jsx)("div",{className:(0,o.cn)("flex","horizontal"===s?"-ml-4":"-mt-4 flex-col",e),...t})})}function p({className:e,...t}){let{orientation:i}=u();return(0,n.jsx)("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:(0,o.cn)("min-w-0 shrink-0 grow-0 basis-full","horizontal"===i?"pl-4":"pt-4",e),...t})}function f({className:e,variant:t="outline",size:i="icon",...s}){let{orientation:l,scrollPrev:r,canScrollPrev:d}=u();return(0,n.jsxs)(c.$,{"data-slot":"carousel-previous",variant:t,size:i,className:(0,o.cn)("absolute size-8 rounded-full","horizontal"===l?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!d,onClick:r,...s,children:[(0,n.jsx)(a.A,{}),(0,n.jsx)("span",{className:"sr-only",children:"Previous slide"})]})}function h({className:e,variant:t="outline",size:i="icon",...s}){let{orientation:l,scrollNext:a,canScrollNext:d}=u();return(0,n.jsxs)(c.$,{"data-slot":"carousel-next",variant:t,size:i,className:(0,o.cn)("absolute size-8 rounded-full","horizontal"===l?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!d,onClick:a,...s,children:[(0,n.jsx)(r.A,{}),(0,n.jsx)("span",{className:"sr-only",children:"Next slide"})]})}},91241:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>b});var n=i(95155),s=i(12115),l=i(59434),a=i(35918),r=i(34477);let o=(0,r.createServerReference)("7f1795baefdf69f341ae1664e547e92019133752c4",r.callServer,void 0,r.findSourceMapURL,"getProductsAction");var c=i(67613),d=i(27213),u=i(10081),m=i(30285),x=i(14636),p=i(17972),f=i(37936),h=i(502),g=i(60377);let b=({data:e=null,lng:t="fr",edit:i=!1,save:r,cancel:b,visibility:v,updateBlockContent:j})=>{let[N,w]=(0,s.useState)(null),[y,k]=(0,s.useState)(e?.content),C=(0,s.useRef)(null),S=e=>{C.current=e,k(e)}
9,[$,A]=(0,s.useState)(),[I,F]=(0,s.useState)(!1),[_,E]=(0,s.useState)([]),[L,z]=(0,s.useState)(null),[B,T]=(0,s.useState)(!0),[P,R]=(0,s.useState)(!1);function M({newProductId:e=null,newBackgroundImage:t=null}){S({...C.current,...null!==e&&{productId:e},...null!==t&&{backgroundImage:t}})}return((0,s.useEffect)(()=>{(0,a.T)(t).then(e=>w(e))},[t]),(0,s.useEffect)(()=>{y?.backgroundImage===$||y?.backgroundImage instanceof File||A(y?.backgroundImage)},[y]),(0,s.useEffect)(()=>{S(e?.content)},[e]),(0,s.useEffect)(()=>{r&&j&&j(e?.uuid??"",y)},[r,j]),(0,s.useEffect)(()=>{b&&S(e?.content)},[b]),(0,s.useEffect)(()=>{void 0!=v&&(y?.visibility??!0)!=v&&j&&j(e?.uuid??"",{...y,visibility:v})},[v]),(0,s.useEffect)(()=>{y?.productId&&!L?(T(!0),o().then(e=>{let t=e?.find(e=>e.id===y.productId);t&&z(t),T(!1)})):y?.productId||T(!1)},[y?.productId]),(0,s.useEffect)(()=>{i&&0===_.length&&o().then(e=>{E(e?.filter(e=>e.enabled)??[])})},[i]),B)?(0,n.jsx)("div",{className:"flex justify-center items-center w-full py-20",children:(0,n.jsx)(c.A,{size:30,color:"#29394d"})}):(0,n.jsxs)("div",{className:(0,l.cn)("relative w-full group min-h-[345px]",!(y?.visibility==void 0||y?.visibility)&&"opacity-50"),children:[L?(0,n.jsxs)("div",{className:"relative min-h-[380px] flex items-end",children:[i&&(0,n.jsx)("div",{className:"absolute bottom-0 right-0 z-[12] flex items-start justify-end p-4",onClick:()=>F(!0),children:(0,n.jsxs)("div",{className:"flex gap-2",children:[$&&(0,n.jsx)("div",{className:"flex h-8 w-8 cursor-pointer items-center justify-center rounded-full bg-red-500 text-white text-xs",onClick:e=>{e.stopPropagation(),M({newBackgroundImage:null}),A(void 0)},title:"Supprimer l'image de fond",children:"â"}),(0,n.jsx)("div",{className:"flex h-8 w-8 cursor-pointer items-center justify-center rounded-full bg-blue-500 text-white text-xs",onClick:e=>{e.stopPropagation(),F(!0)},title:"Ajouter une image de fond",children:(0,n.jsx)(d.A,{size:16})})]})}),(0,n.jsxs)("div",{className:"relative w-full py-16 px-8 min-h-[345px]",style:{...$??L?.thumbnail?{backgroundImage:`url(${$??L?.thumbnail})`,backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"cover"}:{background:"#f1f5f9"}},children:[($??L?.thumbnail)&&(0,n.jsx)("div",{className:"absolute inset-0 bg-black/50"}),(0,n.jsxs)("div",{className:"relative z-2 w-2/3 mx-auto flex items-end gap-14",children:[(0,n.jsxs)("div",{className:"flex-1 space-y-8",children:[(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsx)("span",{className:"inline-block text-white text-lg font-bold",children:N?.new??"NOUVEAUT\xc9"}),(0,n.jsx)("div",{className:"w-[36px] border-[1px] border-solid border-[#ededed]"})]}),(0,n.jsx)("h1",{className:(0,l.cn)("text-3xl font-semibold",$??L.thumbnail?"text-white":"text-slate-900"),children:L.title}),L.selling_url&&(0,n.jsx)(f.CustomLink,{url:L.selling_url,className:"inline-block border border-white text-xs !text-white font-semibold px-6 py-3 !rounded-full hover:border-dashed",children:N?.buyAccess??"ACHETER L'ACC\xc8S AU LIVRE - FORMAT NUM\xc9RIQUE IA"})]}),(0,n.jsx)("div",{className:"shrink-0 flex flex-col items-center w-1/3",children:L.thumbnail&&(0,n.jsx)("img",{src:L.thumbnail,alt:L.title,className:"h-[300px] object-cover shadow-lg absolute bottom-0"})})]})]})]}):(0,n.jsx)("div",{className:"flex items-center justify-center w-full py-20 bg-gray-100 rounded-lg min-h-[345px]",children:(0,n.jsx)("span",{className:"text-lg font-medium text-gray-500",children:N?.noBookSelected??"Aucun livre s\xe9lectionn\xe9"})}),i&&(0,n.jsx)("div",{className:"absolute top-0 right-0 z-10 w-full h-full bg-[#00000022] p-0.5",children:(0,n.jsxs)("div",{className:"flex flex-col gap-3 ml-auto w-[400px] p-5 h-full bg-white",children:[(0,n.jsx)("span",{className:"text-base text-slate-900 font-medium",children:N?.selectBook??"S\xe9lectionner un livre"}),(0,n.jsxs)(x.AM,{open:P,onOpenChange:R,children:[(0,n.jsx)(x.Wv,{asChild:!0,children:(0,n.jsxs)(m.$,{variant:"outline",role:"combobox","aria-expanded":P,className:"w-full justify-between px-3 py-2 h-auto text-base overflow-hidden text-ellipsis whitespace-pre-wrap",children:[L?(0,n.jsx)("span",{className:"font-medium text-base text-slate-500",children:L.title}):N?.selectABook??"S\xe9lectionnez un livre",(0,n.jsx)(u.A,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,n.jsx)(x.hl,{className:"w-[var(--radix-popover-trigger-width)] p-0",children:(0,n.jsxs)(p.uB,{children:[(0,n.jsx)(p.G7,{placeholder:N?.searchBook??"Cherchez un livre...",className:"outline-none"}),(0,n.jsxs)(p.oI,{className:"max-w-[400px]",children:[(0,n.jsx)(p.xL,{children:N?.noBookFound??"Aucun livre trouv\xe9"}),(0,n.jsx)(p.L$,{className:"max-w-none w-full",children:_.map(e=>(0,n.jsx)(p.h_,{value:String(e.id),onSelect:()=>(function(e){let t=parseInt(e,10),i=_.find(e=>e.id===t);i&&(z(i),M({newProductId:t}),R(!1))})(String(e.id)),className:"text-base",children:e.title},e.id))})]})]})})]})]})}),(0,n.jsx)(h.A,{title:"Charger une image de fond",isOpen:I,setIsOpen:F,children:(0,n.jsx)(g.A,{canBeVideo:!1,setImageUrl:e=>
9{A(e),M({newBackgroundImage:e})},setOpen:F})})]})}},96738:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CustomKnob:()=>S,default:()=>$});var n=i(95155),s=i(59434),l=i(46120),a=i.n(l),r=i(30285),o=i(62525),c=i(12115),d=i(28095),u=i(3055),m=i(66766),x=i(47368),p=i(49345),f=i(8117);let h=({cardPosition:e,data:t=null,lng:i="fr",edit:l=!1,cancel:a,isMobile:h,imageObjectType:g,updateElementList:b,deleteMember:v})=>{let j=(0,c.useRef)((0,s.ZH)(i)),[N,w]=(0,c.useState)((0,s.ZH)(i)),y=e=>{j.current=e,w(e)},[k,C]=(0,c.useState)(t),S=(0,c.useRef)(t??null),$=e=>{S.current=e,C(e)},A=(0,c.useRef)(null),I=(0,c.useRef)(null),[F,_]=(0,c.useState)(),[E,L]=(0,c.useState)(),[z,B]=(0,c.useState)(),[T,P]=(0,c.useState)(),R=(0,c.useRef)(null);function M({newFullname:t=null,newFunction:i=null,newDescription:n=null,newImage:s=null,newCroppedArea:l=null,newPdf:a=null,newIconName:r=null,newIconColor:o=null,newIconSize:c=null,newIconBgColor:d=null,newIconVerticalAlign:u=null,newIconHorizontalAlign:m=null}){let x={...S.current,...t&&{fullName:t},...i&&{[`function${j.current}`]:i},...null!==n&&{[`description${j.current}`]:n},...s&&{image:s,croppedArea:null,iconName:null,...a?{}:{pdf:null}},...l&&{croppedArea:l},...a&&{pdf:a,iconName:null,...s?{image:s}:{image:null}},...r&&{image:null,croppedArea:null,iconName:r,pdf:null},...o&&{iconColor:o},...c&&{iconSize:c},...d&&{iconBgColor:d},...u&&{iconVerticalAlign:u},...m&&{iconHorizontalAlign:m}};b&&void 0!=e&&b(e,x)}return(0,c.useEffect)(()=>{k?.croppedArea&&(z?.x!==k?.croppedArea?.x||z?.y!==k?.croppedArea?.y)&&B(k?.croppedArea),k?.image===F||k?.image instanceof File||(_(k?.image),k?.croppedArea||L(k?.image)),k?.pdf===T||k?.pdf instanceof File||P(k?.pdf)},[k]),(0,c.useEffect)(()=>{t&&$(t)},[t]),(0,c.useEffect)(()=>{i!=N.toLowerCase()&&y((0,s.ZH)(i))},[i]),(0,c.useEffect)(()=>{I.current&&(I.current.innerText=k?.[`function${N}`]??"Function")},[i]),(0,c.useEffect)(()=>{a&&$(t)},[a]),(0,c.useEffect)(()=>{z&&F&&(0,d.Ay)(F,z,0).then(e=>{e&&(M({newCroppedArea:z}),L(URL.createObjectURL(e)))})},[z]),l?(0,n.jsxs)("div",{className:"relative w-[13.5rem] flex gap-5 flex-col items-center justify-center",children:[v&&void 0!=e&&(0,n.jsx)("div",{className:"absolute top-[12.5rem] right-2 z-[2]",children:(0,n.jsxs)(r.$,{variant:"destructive",className:"!px-2 h-auto",onClick:()=>v(e),children:[(0,n.jsx)(o.A,{size:30}),"Supp. membre"]})}),(0,n.jsx)(u.A,{labelClassname:"block relative h-[15.25rem] w-[13.5rem] rounded bg-gray-200 z-[1]",iconClassname:"text-[15.25rem] w-full h-full flex items-center justify-center",imageUrl:F,setImageUrl:_,croppedImageUrl:E,setCroppedImageUrl:L,setCroppedArea:B,canbeVideo:!1,canbePdf:!0,iconName:k?.iconName,iconColor:k?.iconColor,iconFinalSize:k?.iconSize,iconBgColor:k?.iconBgColor,iconVerticalAlign:k?.iconVerticalAlign,iconHorizontalAlign:k?.iconHorizontalAlign,pdfUrl:T,setPdfUrl:P,updateElement:M,removeImage:()=>b(e,{...S.current,image:null,croppedArea:null,iconName:null,pdf:null})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-base font-semibold text-dark1 leading-[140%] border-[1px] border-dark1 text-center",contentEditable:"plaintext-only",ref:A,onBlur:function(){let e=A.current.innerText;e!==(S.current?.fullName??"Firstname Lastname")&&M({newFullname:e})},children:k?.fullName??"Firstname Lastname"}),(0,n.jsx)("div",{className:"mb-4 text-sm font-normal text-dark1 leading-[140%] border-[1px] border-dark1 text-center",contentEditable:"plaintext-only",ref:I,onBlur:function(){let e=I.current.innerText;e!==(S.current?.[`function${j.current}`]??"Function")&&M({newFunction:e})},children:k?.[`function${N}`]??"Function"}),(0,n.jsx)(p.A,{disable:!1,value:k?.[`description${N}`]??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. <br/><br/> It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.",onChange:function(e){e!==S.current?.[`description${j.current}`]&&(R.current&&clearTimeout(R.current),R.current=setTimeout(()=>{M({newDescription:e})},300))}})]})]}):(0,n.jsxs)("div",{className:(0,s.cn)("w-[13.5rem] flex gap-5 flex-col items-center justify-center",h&&"w-full"),children:[(0,n.jsxs)("div",{className:(0,s.cn)("relative h-[15.25rem] w-[13.5rem] rounded-xl",E?"bg-white":"bg-gray-200",h&&"h-[10rem] w-full"),style:{...k?.iconName&&k?.iconBgColor&&{background:k?.iconBgColor??""}},children:[!k?.iconName&&T&&""!==T?(0,n.jsx)(f.PdfViewer,{pdfUrl:T,thumbnailUrl:E,className:"!rounded-xl",style:{objectFit:g??"cover"},sizes:h?"100vw":"216px"}):!k?.iconName&&E&&""!==E?(0,n.jsx)(m.default,{src:E,alt:"service",className:"w-full h-full object-cover rounded-xl",style:{objectFit:g??"cover"},fill:!0,sizes:h?"100vw":"216px"}):null,k?.iconName&&(0,n.jsx)(x.IconRenderer,{name:k?.iconName,className:"text-[15.25rem] w-full h-full flex items-center justify-center",color:k?.iconColor,style:{fontSize:k?.iconSize??"",justifyContent:k?.iconHorizontalAlign??"center",alignItems:k?.iconVerticalAlign??"center",height:"100%",width:"100%"}})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-base font-semibold text-dark1 leading-[140%] text-center",children:k?.fullName??"Firstname Lastname"}),(0,n.jsx)("div",{className:(0,s.cn)("text-sm font-normal text-center text-dark1 leading-[140%]",(k?.[`description${N}`]==void 0||k?.[`description${N}`]!=""&&k?.[`description${N}`]!="\n"&&k?.[`description${N}`]!="<p><br></p>")&&"mb-2.5"),children:k?.[`function${N}`]??"Function"}),(k?.[`description${N}`]==void 0||k?.[`description${N}`]!=""&&k?.[`description${N}`]!="\n"&&k?.[`description${N}`]!="<p><br></p>")&&(0,n.jsx)("div",{className:"sun-editor-editable !text-dark1 !p-0 [&>h3]:!m-1 [&>p]:!m-1 [&>h2]:!m-1 [&>h4]:!m-1 [&>h1]:!m-1 [&>h5]:!m-1 [&>h6]:!m-1",dangerouslySetInnerHTML:{__html:k?.[`description${N}`]??"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. <br/><br/> It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged."}})]})]})};var g=i(25618),b=i(71690),v=i(84616),j=i(74749),N=i(66773),w=i(67977
9),y=i.n(w),k=i(35918);let C={fullName:"Firstname Lastname",functionFr:"Function",functionEn:"Function",functionNl:"Function",descriptionFr:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.",descriptionEn:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.",descriptionNl:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.",image:""},S=(0,c.forwardRef)((e,t)=>(0,n.jsx)("div",{ref:t,className:"absolute z-[9] top-2 left-2 flex items-center justify-center gap-2 border bg-background shadow-xs px-1.5 py-1.5 rounded-md h-auto cursor-grab",children:(0,n.jsx)(b.A,{size:20,viewBox:"-2 0 24 24"})})),$=({data:e=null,lng:t="fr",edit:i=!1,save:l,cancel:o,visibility:d,updateBlockContent:u})=>{let m=(0,c.useRef)((0,s.ZH)(t)),[x,f]=(0,c.useState)((0,s.ZH)(t)),b=e=>{m.current=e,f(e)},w=e?.content??{list:[C,C,C,C]},[$,A]=(0,c.useState)(w),I=(0,c.useRef)(w),F=e=>{I.current=e,A(e)},_=$?.list&&$?.list.length>0?$.list:[C,C,C,C],[E,L]=(0,c.useState)(null),z=(0,c.useRef)(null),B=(0,c.useRef)(null),{isMobile:T,isTablet:P}=(0,j.default)();function R({newName:e=null,newTitle:t=null,newDescription:i=null,newVisibility:n=null}){F({...I.current,...e&&{[`name${m.current}`]:e},...t&&{[`title${m.current}`]:t},...null!==i&&{[`description${m.current}`]:i},...n&&{visibility:n}})}function M(e,t){let i=I.current.list.map((i,n)=>n===e?t:i);F({...I.current,list:i})}function D(e){let t=[..._];t.splice(e,1),F({...I.current,list:t})}return(0,c.useEffect)(()=>{t!=x.toLowerCase()&&b((0,s.ZH)(t)),(0,k.T)(t).then(e=>{L(e)})},[t]),(0,c.useEffect)(()=>{e?.content&&F(e?.content)},[e]),(0,c.useEffect)(()=>{l&&u&&u(e?.uuid??"",I.current)},[l,u]),(0,c.useEffect)(()=>{o&&F(a()(e?.content))},[o]),(0,c.useEffect)(()=>{void 0!=d&&(I.current?.visibility??!0)!=d&&u&&u(e?.uuid??"",{...I.current,visibility:d})},[d]),i?(0,n.jsx)("div",{className:"relative !max-w-full",style:{...$?.fontColor?{"--dark-1":$?.fontColor,"--dark-3":`${$?.fontColor}99`}:{}},children:(0,n.jsxs)("div",{className:"flex flex-col sm:flex-row flex-wrap gap-8 [&_.ttp-helpeditor]:h-auto",children:[(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)(g.p$,{className:"border-[1px] border-dark1",contentEditable:!0,ref:z,onBlur:function(){let e=z.current.innerText;e!==(I.current?.[`name${m.current}`]??E?.Team??"\xc9QUIPE")&&R({newName:e})},children:$?.[`name${x}`]??E?.Team??"\xc9QUIPE"}),(0,n.jsx)(g.H2,{className:"mb-2.5 border-[1px] border-dark1",contentEditable:!0,ref:B,onBlur:function(){let e=B.current.innerText;e!==(I.current?.[`title${m.current}`]??"Notre \xe9quipe")&&R({newTitle:e})},children:$?.[`title${x}`]??"Notre \xe9quipe"}),(0,n.jsx)(p.A,{disable:!1,value:$?.[`description${x}`]??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.",onChange:function(e){e!==I.current?.[`description${m.current}`]&&R({newDescription:e})}})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,n.jsx)("div",{className:"ml-auto",children:(0,n.jsx)(r.$,{variant:"outline",className:"!px-2 h-auto",onClick:function(){let e=[..._];e.push(C),F({...I.current,list:e})},children:(0,n.jsx)(v.A,{size:30})})}),(0,n.jsx)("div",{className:"[&>.list]:grid [&>.list]:grid-cols-1 [&>.list]:gap-[1.875em] [&>.list]:place-items-start [&>.list]:md:grid-cols-4",children:(0,n.jsx)(N.Ay,{onSortEnd:(e,t)=>{let i=[..._];i=y()(i,e,t),F({...I.current,list:i})},className:"list",children:_.map((e,t)=>t).map(s=>(0,n.jsx)(N.Uq,{children:(0,n.jsxs)("div",{className:"select-none relative",children:[(0,n.jsx)(N.$B,{children:(0,n.jsx)(S,{})}),(0,n.jsx)(h,{data:_[s],lng:t,cancel:o,edit:i,uuid:e?.uuid??"",cardPosition:s,updateElementList:M,deleteMember:_.length>0?D:void 0})]})},s))})})]})]})}):(0,n.jsx)("div",{className:(0,s.cn)("w-full",!($?.visibility==void 0||$?.visibility)&&"opacity-50"),style:{...$?.fontColor?{"--dark-1":$?.fontColor,"--dark-3":`${$?.fontColor}99`}:{}},children:(0,n.jsxs)("div",{className:(0,s.cn)("flex flex-col sm:flex-row flex-wrap gap-8",(T||P)&&"gap-6 !flex-col"),children:[(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)(g.p$,{children:$?.[`name${x}`]??$?.nameFr??E?.Team??"\xc9QUIPE"}),(0,n.jsx)(g.H2,{className:"mb-2.5",children:$?.[`title${x}`]??$?.titleFr??"Notre \xe9quipe"}),(0,n.jsx)("div",{className:(0,s.cn)("sun-editor-editable !p-0 !text-dark1 !bg-transparent !text-base",(T||P)&&"[&>p]:!mb-0"),dangerouslySetInnerHTML:{__html:$?.[`description${x}
9`]??$?.descriptionFr??"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique."}})]}),(0,n.jsx)("div",{children:(0,n.jsx)("div",{className:(0,s.cn)("grid grid-cols-1 gap-[1.875em] place-items-start","md:grid-cols-4",(T||P)&&"gap-[1.25em] grid-cols-2"),children:_.map((e,i)=>(0,n.jsx)(h,{data:e,lng:t,isMobile:T||P,imageObjectType:$?.imageObject},`tc-${i}`))})})]})})}},97585:(e,t,i)=>{"use strict";i.d(t,{A:()=>u});var n=i(95155),s=i(502),l=i(90555),a=i(17313),r=i(16225),o=i(59434),c=i(66766);i(12115);var d=i(51368);let u=({siteInfo:e,isSideBarOpen:t,sitesBlocks:i,blocks:u,setIsSideBarOpen:m,setBlocks:x,setBlocksVisibility:p,setNeedsToSave:f})=>(0,n.jsx)(s.A,{title:"Liste des blocs",isOpen:t,setIsOpen:m,children:(0,n.jsxs)(a.tU,{defaultValue:"static",className:"w-full",children:[(0,n.jsxs)(a.j7,{className:"w-[calc(100%_-_2em)] bg-slate-900 mt-4 mx-4 gap-1",children:[(0,n.jsx)(a.Xi,{className:"cursor-pointer flex-1 bg-transparent text-white hover:bg-[#FFFFFF22] data-[state=active]:bg-white data-[state=active]:text-slate-900",value:"static",children:"Statique"}),(0,n.jsx)(a.Xi,{className:"cursor-pointer flex-1 bg-transparent text-white hover:bg-[#FFFFFF22] data-[state=active]:bg-white data-[state=active]:text-slate-900",value:"dynamic",children:"Dynamique"}),(0,n.jsx)(a.Xi,{className:"cursor-pointer flex-1 bg-transparent text-white hover:bg-[#FFFFFF22] data-[state=active]:bg-white data-[state=active]:text-slate-900",value:"form",children:"Formulaire"})]}),(0,n.jsx)(a.av,{value:"static",children:(0,n.jsx)("div",{className:"flex flex-col gap-4 p-4",children:i?.length>0&&i.filter(e=>![...r.mQ,"form","subscribe-newsletter"].includes(e.identifier)).map((e,t)=>(0,n.jsx)("div",{className:"bg-gay-100",children:(0,n.jsxs)("div",{onClick:()=>{let t=(0,d.A)(),i=[...u,{...e,uuid:t}],n=i.findIndex(e=>"footer"===e.identifier);if(n>-1){let[e]=i.splice(n,1);i.push(e)}setTimeout(()=>{x(i);let e={};for(let t of i)e[t.uuid]=t?.content?.visibility==void 0||t?.content?.visibility;p(e),f(!0),m(!1),setTimeout(()=>{let e=document.querySelector(`[data-id="${t}"]`);e&&e.scrollIntoView({behavior:"smooth"})},250)},100)},className:(0,o.cn)("relative flex min-h-32 cursor-pointer flex-col items-center justify-center rounded-lg border p-2",t%2==0?"bg-gray-100":"bg-gray-50"),children:[(0,n.jsx)(c.default,{src:`/images/sections/${e.identifier}.png`,alt:"",className:"!relative",fill:!0}),(0,n.jsx)("div",{className:"mt-2 text-center",children:e.labelFr})]},`sBlock-${t}`)},t))})}),(0,n.jsx)(a.av,{value:"dynamic",children:(0,n.jsx)("div",{className:"flex flex-col gap-5 p-4",children:i?.length>0&&i.filter(e=>r.mQ.includes(e.identifier)).filter(t=>"v2"!=e.tag||["articles","last-article"].includes(t.identifier)).filter(t=>!["ai-product","books-slider"].includes(t.identifier)||e.organization?.id==4442).map((e,t)=>(0,n.jsx)("div",{className:"bg-gay-100",children:(0,n.jsxs)("div",{onClick:()=>{let t=(0,d.A)(),i=[...u,{...e,uuid:t}];x(i);let n={};for(let e of i)n[e.uuid]=e?.content?.visibility==void 0||e?.content?.visibility;p(n),f(!0),m(!1),setTimeout(()=>{let e=document.querySelector(`[data-id="${t}"]`);e&&e.scrollIntoView({behavior:"smooth"})},250)},className:(0,o.cn)("relative flex min-h-32 cursor-pointer flex-col items-center justify-center rounded-lg border p-2",t%2==0?"bg-gray-100":"bg-gray-50"),children:[(0,n.jsx)(c.default,{src:`/images/sections/${e.identifier}.png`,alt:"",className:"!relative",fill:!0}),(0,n.jsx)("div",{className:"mt-2 text-center",children:e.labelFr})]},`sBlock-${t}`)},t))})}),(0,n.jsx)(a.av,{value:"form",children:(0,n.jsx)(l.A,{formData:null,createForm:e=>{let t=i.find(e=>"form"===e.identifier);if(t){let i=(0,d.A)(),n=[...u,{...t,content:e,uuid:i}];x(n);let s={};for(let e of n)s[e.uuid]=e?.content?.visibility==void 0||e?.content?.visibility;p(s),f(!0),m(!1),setTimeout(()=>{let e=document.querySelector(`[data-id="${i}"]`);e&&e.scrollIntoView({behavior:"smooth"})},250)}},updateComponentForm:void 0})})]})})},98472:()=>{}}]);
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.