1"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[604],{4662:(e,t,o)=>{o.d(t,{Ab:()=>u,Dq:()=>m,GI:()=>c,LZ:()=>f,O:()=>g,Tb:()=>h,US:()=>i,XB:()=>r,cM:()=>d,fi:()=>l,ps:()=>p,ty:()=>a,vp:()=>s});const n=()=>{},s=n,a=n,r=n,i=n,l=n,c=n,d=n,u=n,m=n,p=n,g=n,h=n,f=n},80604:(e,t,o)=>{o.r(t),o.d(t,{default:()=>Tn});var n=o(89379),s=o(53986),a=o(65043),r=o(91357),i=o(79722),l=o(44978),c=o(72449);const d=()=>Math.random().toString(36).substr(2,9),u=[{id:"wellness-modern",name:"Modern",description:"Clean and calming wellness design",category:"wellness",style:"modern",sections:[{id:d(),type:"hero",order:0,headline:{id:d(),content:{en:"Discover Your Inner Balance",fr:"D\xe9couvrez votre \xe9quilibre int\xe9rieur"},fontFamily:"Inter",fontSize:"48px",color:"#0f766e",tag:"h1"},subheadline:{id:d(),content:{en:"Transform your mind, body, and spirit through holistic wellness",fr:"Transformez votre esprit, votre corps et votre \xe2me gr\xe2ce au bien-\xeatre holistique"},fontFamily:"Inter",fontSize:"20px",color:"#14b8a6",tag:"p"},buttons:[{id:d(),text:{en:"Book a Session",fr:"R\xe9server une s\xe9ance"},url:"#",fontFamily:"Inter",backgroundColor:"#14b8a6",textColor:"#ffffff",size:"large"}],backgroundImage:{id:d(),url:"/static/category-images/healthcare_wellness/wellness_woman-lotus-yoga-position-mat-park-sunlight.jpg",alt:"Yoga and meditation wellness"},backgroundColor:"#ccfbf1",heroStyle:"image-right"},{id:d(),type:"services",order:1,sectionTitle:{id:d(),content:{en:"Our Services",fr:"Nos Services"},fontFamily:"Inter",fontSize:"36px",color:"#0f766e",tag:"h2"},services:[{id:d(),image:{id:d(),url:"/static/category-images/healthcare_wellness/wellness_stacked-zen-stones-sand-background-art-balance-concept.jpg",alt:"Yoga & Meditation"},title:{id:d(),content:{en:"Yoga & Meditation",fr:"Yoga et m\xe9ditation"},fontFamily:"Inter",fontSize:"24px",color:"#0f766e",tag:"h3"},description:{id:d(),content:{en:"Find peace and flexibility through guided yoga and meditation sessions",fr:"Trouvez la paix et la flexibilit\xe9 gr\xe2ce \xe0 des s\xe9ances guid\xe9es de yoga et de m\xe9ditation"},fontFamily:"Inter",fontSize:"16px",color:"#14b8a6",tag:"p"}},{id:d(),image:{id:d(),url:"/static/category-images/healthcare_wellness/wellness_work-masseur.jpg",alt:"Massage Therapy"},title:{id:d(),content:{en:"Massage Therapy",fr:"Th\xe9rapie par massage"},fontFamily:"Inter",fontSize:"24px",color:"#0f766e",tag:"h3"},description:{id:d(),content:{en:"Relax and rejuvenate with our therapeutic massage treatments",fr:"D\xe9tendez-vous et rajeunissez avec nos soins de massage th\xe9rapeutique"},fontFamily:"Inter",fontSize:"16px",color:"#14b8a6",tag:"p"}},{id:d(),image:{id:d(),url:"/static/category-images/healthcare_wellness/wellness_beautiful-african-woman-smiling-enjoying-massage-with-closed-eyes-spa-salon.jpg",alt:"Fitness Training"},title:{id:d(),content:{en:"Fitness Training",fr:"Entra\xeenement physique"},fontFamily:"Inter",fontSize:"24px",color:"#0f766e",tag:"h3"},description:{id:d(),content:{en:"Build strength and vitality with personalized fitness programs",fr:"D\xe9veloppez force et vitalit\xe9 avec des programmes de conditionnement personnalis\xe9s"},fontFamily:"Inter",fontSize:"16px",color:"#14b8a6",tag:"p"}}],backgroundColor:"#ffffff"},{id:d(),type:"testimonials",order:2,sectionTitle:{id:d(),content:{en:"What Our Clients Say",fr:"Ce que disent nos clients"},fontFamily:"Inter",fontSize:"36px",color:"#0f766e",tag:"h2"},testimonials:[{id:d(),quote:{id:d(),content:{en:"This wellness center has transformed my life. I feel more balanced and energized than ever!",fr:"Ce centre de bien-\xeatre a transform\xe9 ma vie. Je me sens plus \xe9quilibr\xe9 et \xe9nergis\xe9 que jamais!"},fontFamily:"Inter",fontSize:"18px",color:"#115e59",tag:"p"},author:{id:d(),content:{en:"Emma Thompson",fr:"Emma Thompson"},fontFamily:"Inter",fontSize:"20px",color:"#0f766e",tag:"p"},role:{id:d(),content:{en:"Yoga Member",fr:"Membre Yoga"},fontFamily:"Inter",fontSize:"16px",color:"#14b8a6",tag:"p"}},{id:d(),quote:{id:d(),content:{en:"The massage therapy here is incredible. Truly a sanctuary for mind and body wellness.",fr:"La th\xe9rapie par massage ici est incroyable. Vraiment un sanctuaire pour le bien-\xeatre du corps et de l'esprit."},fontFamily:"Inter",fontSize:"18px",color:"#115e59",tag:"p"},author:{id:d(),content:{en:"David Miller",fr:"David Miller"},fontFamily:"Inter",fontSize:"20px",color:"#0f766e",tag:"p"},role:{id:d(),content:{en:"Wellness Client",fr:"Client Bien-\xeatre"},fontFamily:"Inter",fontSize:"16px",color:"#14b8a6",tag:"p"}}],backgroundColor:"#f0fdfa"},{id:d(),type:"reservation-calendar",order:3,sectionTitle:{id:d(),content:{en:"Book an Appointment",fr:"R\xe9servez un Rendez-vous"},fontFamily:"Inter",fontSize:"36px",color:"#0f766e",tag:"h2"},description:{id:d(),content:{en:"Select a date and time that works best for you",fr:"Choisissez une date et une heure qui vous conviennent"},fontFamily:"Inter",fontSize:"18px",color:"#14b8a6",tag:"p"},timeSlots:[{id:d(),time:"09:00",duration:60},{id:d(),time:"10:00",duration:60},{id:d(),time:"11:00",duration:60},{id:d(),time:"14:00",duration:60},{id:d(),time:"15:00",duration:60},{id:d(),time:"16:00",duration:60},{id:d(),time:"17:00",duration:60}
1],slotDuration:60,backgroundColor:"#f0fdfa",calendarBackgroundColor:"#ffffff",timeSlotBackgroundColor:"#ccfbf1",timeSlotTextColor:"#0f766e",headerTextColor:"#0f766e"}]},{id:"wellness-classic",name:"Classic",description:"Elegant and serene wellness design",category:"wellness",style:"classic",sections:[{id:d(),type:"hero",order:0,headline:{id:d(),content:{en:"Restore Your Natural Harmony",fr:"Restaurez votre harmonie naturelle"},fontFamily:"Playfair Display",fontSize:"52px",color:"#3f6212",tag:"h1"},subheadline:{id:d(),content:{en:"Experience timeless wellness through ancient healing traditions",fr:"D\xe9couvrez le bien-\xeatre intemporel gr\xe2ce aux traditions de gu\xe9rison ancestrales"},fontFamily:"Lora",fontSize:"22px",color:"#65a30d",tag:"p"},buttons:[{id:d(),text:{en:"Explore Services",fr:"Explorer les services"},url:"#",fontFamily:"Lora",backgroundColor:"#84cc16",textColor:"#ffffff",size:"large"}],backgroundImage:{id:d(),url:"/static/category-images/healthcare_wellness/wellness_stacked-white-towels.jpg",alt:"Spa relaxation in nature"},backgroundColor:"#f7fee7",heroStyle:"image-right"},{id:d(),type:"services",order:1,sectionTitle:{id:d(),content:{en:"Healing Experiences",fr:"Exp\xe9riences de gu\xe9rison"},fontFamily:"Playfair Display",fontSize:"40px",color:"#3f6212",tag:"h2"},services:[{id:d(),image:{id:d(),url:"/static/category-images/healthcare_wellness/wellness_woman-lotus-yoga-position-mat-park-sunlight.jpg",alt:"Mindfulness Practice"},title:{id:d(),content:{en:"Mindfulness Practice",fr:"Pratique de la pleine conscience"},fontFamily:"Playfair Display",fontSize:"28px",color:"#3f6212",tag:"h3"},description:{id:d(),content:{en:"Cultivate inner peace through guided meditation and breath work",fr:"Cultivez la paix int\xe9rieure par la m\xe9ditation guid\xe9e et le travail respiratoire"},fontFamily:"Lora",fontSize:"16px",color:"#65a30d",tag:"p"},button:{id:d(),text:{en:"Discover More",fr:"D\xe9couvrir plus"},url:"#",fontFamily:"Lora",backgroundColor:"#3f6212",textColor:"#ffffff",size:"medium"}},{id:d(),image:{id:d(),url:"/static/category-images/healthcare_wellness/wellness_patient-getting-cbd-treatment.jpg",alt:"Holistic Therapy"},title:{id:d(),content:{en:"Holistic Therapy",fr:"Th\xe9rapie holistique"},fontFamily:"Playfair Display",fontSize:"28px",color:"#3f6212",tag:"h3"},description:{id:d(),content:{en:"Restorative treatments that honor the connection of mind and body",fr:"Soins r\xe9parateurs qui honorent la connexion entre l'esprit et le corps"},fontFamily:"Lora",fontSize:"16px",color:"#65a30d",tag:"p"},button:{id:d(),text:{en:"Discover More",fr:"D\xe9couvrir plus"},url:"#",fontFamily:"Lora",backgroundColor:"#3f6212",textColor:"#ffffff",size:"medium"}}],backgroundColor:"#ffffff"},{id:d(),type:"reservation-calendar",order:2,sectionTitle:{id:d(),content:{en:"Book an Appointment",fr:"R\xe9servez un Rendez-vous"},fontFamily:"Playfair Display",fontSize:"40px",color:"#3f6212",tag:"h2"},description:{id:d(),content:{en:"Take the first step toward a more balanced life",fr:"Faites le premier pas vers une vie plus \xe9quilibr\xe9e"},fontFamily:"Lora",fontSize:"20px",color:"#65a30d",tag:"p"},timeSlots:[{id:d(),time:"09:00",duration:60},{id:d(),time:"10:00",duration:60},{id:d(),time:"11:00",duration:60},{id:d(),time:"14:00",duration:60},{id:d(),time:"15:00",duration:60},{id:d(),time:"16:00",duration:60}
1],slotDuration:60,backgroundColor:"#f7fee7",calendarBackgroundColor:"#ffffff",timeSlotBackgroundColor:"#ecfccb",timeSlotTextColor:"#3f6212",headerTextColor:"#3f6212"}]},{id:"wellness-bold",name:"Bold",description:"Energetic and vibrant wellness design",category:"wellness",style:"bold",sections:[{id:d(),type:"hero",order:0,headline:{id:d(),content:{en:"Unleash Your Full Potential",fr:"Lib\xe9rez votre plein potentiel"},fontFamily:"Montserrat",fontSize:"56px",color:"#15803d",tag:"h1"},subheadline:{id:d(),content:{en:"High-energy wellness programs designed to transform your life",fr:"Programmes de bien-\xeatre haute \xe9nergie con\xe7us pour transformer votre vie"},fontFamily:"Open Sans",fontSize:"24px",color:"#16a34a",tag:"p"},buttons:[{id:d(),text:{en:"Start Training",fr:"Commencer l'entra\xeenement"},url:"#",fontFamily:"Montserrat",backgroundColor:"#22c55e",textColor:"#ffffff",size:"large"}],backgroundImage:{id:d(),url:"/static/category-images/healthcare_wellness/wellness_stacked-zen-stones-sand-background-art-balance-concept.jpg",alt:"Fitness training energy"},backgroundColor:"#dcfce7",heroStyle:"image-right"},{id:d(),type:"services",order:1,sectionTitle:{id:d(),content:{en:"Power Programs",fr:"Programmes \xe9nerg\xe9tiques"},fontFamily:"Montserrat",fontSize:"42px",color:"#ffffff",tag:"h2"},services:[{id:d(),image:{id:d(),url:"/static/category-images/healthcare_wellness/wellness_work-masseur.jpg",alt:"HIIT Training"},title:{id:d(),content:{en:"HIIT Training",fr:"Entra\xeenement HIIT"},fontFamily:"Montserrat",fontSize:"26px",color:"#ffffff",tag:"h3"},description:{id:d(),content:{en:"Intense workouts that deliver maximum results in minimum time",fr:"Entra\xeenements intenses qui offrent des r\xe9sultats maximaux en un minimum de temps"},fontFamily:"Open Sans",fontSize:"16px",color:"#e5e5e5",tag:"p"},button:{id:d(),text:{en:"Join Now",fr:"Rejoindre maintenant"},url:"#",fontFamily:"Montserrat",backgroundColor:"#22c55e",textColor:"#ffffff",size:"medium"}},{id:d(),image:{id:d(),url:"/static/category-images/healthcare_wellness/wellness_woman-lotus-yoga-position-mat-park-sunlight.jpg",alt:"Power Yoga"},title:{id:d(),content:{en:"Power Yoga",fr:"Yoga dynamique"},fontFamily:"Montserrat",fontSize:"26px",color:"#ffffff",tag:"h3"},description:{id:d(),content:{en:"Dynamic flow sequences that build strength and flexibility",fr:"S\xe9quences dynamiques qui d\xe9veloppent force et flexibilit\xe9"},fontFamily:"Open Sans",fontSize:"16px",color:"#e5e5e5",tag:"p"},button:{id:d(),text:{en:"Join Now",fr:"Rejoindre maintenant"},url:"#",fontFamily:"Montserrat",backgroundColor:"#22c55e",textColor:"#ffffff",size:"medium"}}],backgroundColor:"#1a1a1a"},{id:d(),type:"reservation-calendar",order:2,sectionTitle:{id:d(),content:{en:"Book Your Session",fr:"R\xe9servez votre session"},fontFamily:"Montserrat",fontSize:"44px",color:"#1a1a1a",tag:"h2"},description:{id:d(),content:{en:"Join our community and start your transformation",fr:"Rejoignez notre communaut\xe9 et commencez votre transformation"},fontFamily:"Open Sans",fontSize:"20px",color:"#15803d",tag:"p"},timeSlots:[{id:d(),time:"08:00",duration:60},{id:d(),time:"09:00",duration:60},{id:d(),time:"10:00",duration:60},{id:d(),time:"14:00",duration:60},{id:d(),time:"15:00",duration:60},{id:d(),time:"16:00",duration:60},{id:d(),time:"17:00",duration:60}
1],slotDuration:60,backgroundColor:"#dcfce7",calendarBackgroundColor:"#ffffff",timeSlotBackgroundColor:"#bbf7d0",timeSlotTextColor:"#15803d",headerTextColor:"#15803d"}]},{id:"business-modern",name:"Modern",description:"Professional corporate design",category:"business",style:"modern",sections:[{id:d(),type:"hero",order:0,headline:{id:d(),content:{en:"Innovative Solutions for Modern Business",fr:"Solutions innovantes pour l'entreprise moderne"},fontFamily:"Inter",fontSize:"48px",color:"#1e293b",tag:"h1"},subheadline:{id:d(),content:{en:"Drive growth and efficiency with cutting-edge strategies",fr:"Stimulez la croissance et l'efficacit\xe9 avec des strat\xe9gies de pointe"},fontFamily:"Inter",fontSize:"20px",color:"#475569",tag:"p"},buttons:[{id:d(),text:{en:"Get Consultation",fr:"Obtenir une consultation"},url:"#",fontFamily:"Inter",backgroundColor:"#3b82f6",textColor:"#ffffff",size:"large"},{id:d(),text:{en:"View Services",fr:"Voir les services"},url:"#",fontFamily:"Inter",backgroundColor:"#ffffff",textColor:"#3b82f6",size:"large"}],backgroundImage:{id:d(),url:"https://images.unsplash.com/photo-1758630737900-a28682c5aa69?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxtb2Rlcm4lMjBvZmZpY2UlMjBidXNpbmVzc3xlbnwxfHx8fDE3NjI2MzI5MzF8MA&ixlib=rb-4.1.0&q=80&w=1080",alt:"Modern office business"},backgroundColor:"#f8fafc",heroStyle:"image-right"},{id:d(),type:"business-team",order:1,sectionTitle:{id:d(),content:{en:"Meet Our Expert Team",fr:"Rencontrez notre \xe9quipe d'experts"},fontFamily:"Inter",fontSize:"36px",color:"#1e293b",tag:"h2"},description:{id:d(),content:{en:"Industry leaders dedicated to your success",fr:"Leaders de l'industrie d\xe9di\xe9s \xe0 votre succ\xe8s"},fontFamily:"Inter",fontSize:"18px",color:"#475569",tag:"p"},members:[{id:d(),image:{id:d(),url:"https://images.unsplash.com/photo-1737574821698-862e77f044c1?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxwcm9mZXNzaW9uYWwlMjBleGVjdXRpdmUlMjBwb3J0cmFpdHxlbnwxfHx8fDE3NjI2NzQ3MDR8MA&ixlib=rb-4.1.0&q=80&w=1080",alt:"CEO"},name:{id:d(),content:{en:"Sarah Johnson",fr:"Sarah Johnson"},fontFamily:"Inter",fontSize:"24px",color:"#1e293b",tag:"h3"},role:{id:d(),content:{en:"Chief Executive Officer",fr:"Directrice g\xe9n\xe9rale"},fontFamily:"Inter",fontSize:"16px",color:"#3b82f6",tag:"p"},bio:{id:d(),content:{en:"15+ years leading digital transformation initiatives",fr:"15+ ann\xe9es \xe0 diriger des initiatives de transformation num\xe9rique"},fontFamily:"Inter",fontSize:"14px",color:"#64748b",tag:"p"}},{id:d(),image:{id:d(),url:"https://images.unsplash.com/photo-1574085727801-3992ff7ab11b?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxidXNpbmVzcyUyMHRlYW0lMjBvZmZpY2V8ZW58MXx8fHwxNzYyNjgyNDMwfDA&ixlib=rb-4.1.0&q=80&w=1080",alt:"CTO"},name:{id:d(),content:{en:"Michael Chen",fr:"Michael Chen"},fontFamily:"Inter",fontSize:"24px",color:"#1e293b",tag:"h3"},role:{id:d(),content:{en:"Chief Technology Officer",fr:"Directeur de la technologie"},fontFamily:"Inter",fontSize:"16px",color:"#3b82f6",tag:"p"},bio:{id:d(),content:{en:"Tech innovator with expertise in scalable solutions",fr:"Innovateur technologique expert en solutions \xe9volutives"},fontFamily:"Inter",fontSize:"14px",color:"#64748b",tag:"p"}},{id:d(),image:{id:d(),url:"https://images.unsplash.com/photo-1630487656049-6db93a53a7e9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxjb3Jwb3JhdGUlMjBtZWV0aW5nJTIwdGVhbXdvcmt8ZW58MXx8fHwxNzYyNjk5Nzk0fDA&ixlib=rb-4.1.0&q=80&w=1080",alt:"Director"},name:{id:d(),content:{en:"Emily Rodriguez",fr:"Emily Rodriguez"},fontFamily:"Inter",fontSize:"24px",color:"#1e293b",tag:"h3"},role:{id:d(),content:{en:"Director of Operations",fr:"Directrice des op\xe9rations"},fontFamily:"Inter",fontSize:"16px",color:"#3b82f6",tag:"p"},bio:{id:d(),content:{en:"Operational excellence and process optimization expert",fr:"Experte en excellence op\xe9rationnelle et optimisation des processus"},fontFamily:"Inter",fontSize:"14px",color:"#64748b",tag:"p"}}],backgroundColor:"#ffffff"},{id:d(),type:"pricing",order:2,sectionTitle:{id:d(),content:{en:"Business Solutions",fr:"Solutions d'affaires"},fontFamily:"Inter",fontSize:"36px",color:"#1e293b",tag:"h2"},description:{id:d(),content:"Flexible plans designed for businesses of all sizes",fontFamily:"Inter",fontSize:"18px",color:"#475569",tag:"p"},tiers:[{id:d(),name:{id:d(),content:{en:"Starter",fr:"D\xe9marrage"},fontFamily:"Inter",fontSize:"24px",color:"#1e293b",tag:"h3"}
1,price:{id:d(),content:{en:"$299/mo",fr:"$299/mois"},fontFamily:"Inter",fontSize:"32px",color:"#1e293b",tag:"p"},features:[{id:d(),content:"Up to 10 users",fontFamily:"Inter",fontSize:"16px",color:"#475569",tag:"p"},{id:d(),content:{en:"Basic analytics",fr:"Analyses de base"},fontFamily:"Inter",fontSize:"16px",color:"#475569",tag:"p"},{id:d(),content:{en:"Email support",fr:"Support par e-mail"},fontFamily:"Inter",fontSize:"16px",color:"#475569",tag:"p"}],button:{id:d(),text:{en:"Get Started",fr:"Commencer"},url:"#",fontFamily:"Inter",backgroundColor:"#3b82f6",textColor:"#ffffff",size:"medium"},highlighted:!1},{id:d(),name:{id:d(),content:{en:"Enterprise",fr:"Entreprise"},fontFamily:"Inter",fontSize:"24px",color:"#1e293b",tag:"h3"},price:{id:d(),content:{en:"$999/mo",fr:"$999/mois"},fontFamily:"Inter",fontSize:"32px",color:"#1e293b",tag:"p"},features:[{id:d(),content:"Unlimited users",fontFamily:"Inter",fontSize:"16px",color:"#475569",tag:"p"},{id:d(),content:{en:"Advanced analytics",fr:"Analyses avanc\xe9es"},fontFamily:"Inter",fontSize:"16px",color:"#475569",tag:"p"},{id:d(),content:{en:"Priority support",fr:"Support prioritaire"},fontFamily:"Inter",fontSize:"16px",color:"#475569",tag:"p"},{id:d(),content:"Custom integrations",fontFamily:"Inter",fontSize:"16px",color:"#475569",tag:"p"}],button:{id:d(),text:{en:"Contact Sales",fr:"Contacter les ventes"},url:"#",fontFamily:"Inter",backgroundColor:"#1e293b",textColor:"#ffffff",size:"medium"},highlighted:!0}],backgroundColor:"#f8fafc"},{id:d(),type:"reservation-calendar",order:3,sectionTitle:{id:d(),content:"Book a Consultation",fontFamily:"Inter",fontSize:"36px",color:"#1e293b",tag:"h2"},description:{id:d(),content:"Let's discuss how we can help you achieve your goals",fontFamily:"Inter",fontSize:"18px",color:"#475569",tag:"p"},timeSlots:[{id:d(),time:"09:00",duration:60},{id:d(),time:"10:00",duration:60},{id:d(),time:"11:00",duration:60},{id:d(),time:"14:00",duration:60},{id:d(),time:"15:00",duration:60},{id:d(),time:"16:00",duration:60}
1],slotDuration:60,backgroundColor:"#f8fafc",calendarBackgroundColor:"#ffffff",timeSlotBackgroundColor:"#dbeafe",timeSlotTextColor:"#1e40af",headerTextColor:"#1e293b"}]},{id:"business-classic",name:"Classic",description:"Traditional professional business design",category:"business",style:"classic",sections:[{id:d(),type:"hero",order:0,headline:{id:d(),content:"Excellence in Business Services",fontFamily:"Playfair Display",fontSize:"52px",color:"#1c1917",tag:"h1"},subheadline:{id:d(),content:"Trusted expertise for sustainable growth and success",fontFamily:"Lora",fontSize:"22px",color:"#44403c",tag:"p"},buttons:[{id:d(),text:"Our Services",url:"#",fontFamily:"Lora",backgroundColor:"#78716c",textColor:"#ffffff",size:"large"}],backgroundImage:{id:d(),url:"https://images.unsplash.com/photo-1760611656007-f767a8082758?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxjb3Jwb3JhdGUlMjB0ZWFtJTIwd29ya3NwYWNlfGVufDF8fHx8MTc2MjcwMTAyMXww&ixlib=rb-4.1.0&q=80&w=1080",alt:"Corporate team workspace"},backgroundColor:"#fafaf9",heroStyle:"image-right"},{id:d(),type:"services",order:1,sectionTitle:{id:d(),content:"Professional Services",fontFamily:"Playfair Display",fontSize:"40px",color:"#1c1917",tag:"h2"},services:[{id:d(),image:{id:d(),url:"https://images.unsplash.com/photo-1574085727801-3992ff7ab11b?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxidXNpbmVzcyUyMHRlYW0lMjBvZmZpY2V8ZW58MXx8fHwxNzYyNjgyNDMwfDA&ixlib=rb-4.1.0&q=80&w=1080",alt:"Consulting"},title:{id:d(),content:"Strategy Consulting",fontFamily:"Playfair Display",fontSize:"28px",color:"#1c1917",tag:"h3"}
1,description:{id:d(),content:"Strategic guidance to navigate complex business challenges",fontFamily:"Lora",fontSize:"16px",color:"#44403c",tag:"p"},button:{id:d(),text:{en:"Learn More",fr:"En savoir plus"},url:"#",fontFamily:"Lora",backgroundColor:"#78716c",textColor:"#ffffff",size:"medium"}},{id:d(),image:{id:d(),url:"https://images.unsplash.com/photo-1630487656049-6db93a53a7e9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxjb3Jwb3JhdGUlMjBtZWV0aW5nJTIwdGVhbXdvcmt8ZW58MXx8fHwxNzYyNjk5Nzk0fDA&ixlib=rb-4.1.0&q=80&w=1080",alt:"Advisory"},title:{id:d(),content:{en:"Business Advisory",fr:"Conseil aux entreprises"},fontFamily:"Playfair Display",fontSize:"28px",color:"#1c1917",tag:"h3"},description:{id:d(),content:"Expert advice tailored to your unique business needs",fontFamily:"Lora",fontSize:"16px",color:"#44403c",tag:"p"},button:{id:d(),text:{en:"Learn More",fr:"En savoir plus"},url:"#",fontFamily:"Lora",backgroundColor:"#78716c",textColor:"#ffffff",size:"medium"}}],backgroundColor:"#ffffff"},{id:d(),type:"reservation-calendar",order:2,sectionTitle:{id:d(),content:"Schedule a Meeting",fontFamily:"Playfair Display",fontSize:"40px",color:"#44403c",tag:"h2"},description:{id:d(),content:"Discover how our expertise can benefit your organization",fontFamily:"Lora",fontSize:"20px",color:"#78716c",tag:"p"},timeSlots:[{id:d(),time:"09:00",duration:60},{id:d(),time:"10:00",duration:60},{id:d(),time:"11:00",duration:60},{id:d(),time:"14:00",duration:60},{id:d(),time:"15:00",duration:60}
1],slotDuration:60,backgroundColor:"#fafaf9",calendarBackgroundColor:"#ffffff",timeSlotBackgroundColor:"#f5f5f4",timeSlotTextColor:"#44403c",headerTextColor:"#44403c"}]},{id:"business-bold",name:"Bold",description:"Powerful and confident business design",category:"business",style:"bold",sections:[{id:d(),type:"hero",order:0,headline:{id:d(),content:"Dominate Your Market",fontFamily:"Montserrat",fontSize:"56px",color:"#1a1a1a",tag:"h1"},subheadline:{id:d(),content:{en:"Bold strategies that deliver exceptional results",fr:"Strat\xe9gies audacieuses qui donnent des r\xe9sultats exceptionnels"},fontFamily:"Open Sans",fontSize:"24px",color:"#4a4a4a",tag:"p"},buttons:[{id:d(),text:"Let's Talk",url:"#",fontFamily:"Montserrat",backgroundColor:"#dc2626",textColor:"#ffffff",size:"large"}],backgroundImage:{id:d(),url:"https://images.unsplash.com/photo-1758599543118-538bba233399?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxidXNpbmVzcyUyMHN1Y2Nlc3MlMjBjaXR5fGVufDF8fHx8MTc2MjcwMTAyMnww&ixlib=rb-4.1.0&q=80&w=1080",alt:"Business success city"},backgroundColor:"#fecaca",heroStyle:"image-right"},{id:d(),type:"features",order:1,sectionTitle:{id:d(),content:"Why We Win",fontFamily:"Montserrat",fontSize:"42px",color:"#ffffff",tag:"h2"},features:[{id:d(),icon:{id:d(),url:"https://images.unsplash.com/photo-1574085727801-3992ff7ab11b?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxidXNpbmVzcyUyMHRlYW0lMjBvZmZpY2V8ZW58MXx8fHwxNzYyNjgyNDMwfDA&ixlib=rb-4.1.0&q=80&w=1080",alt:"Results Driven"},title:{id:d(),content:"Results-Driven",fontFamily:"Montserrat",fontSize:"26px",color:"#ffffff",tag:"h3"},description:{id:d(),content:"We focus on measurable outcomes that impact your bottom line",fontFamily:"Open Sans",fontSize:"16px",color:"#e5e5e5",tag:"p"}},{id:d(),icon:{id:d(),url:"https://images.unsplash.com/photo-1630487656049-6db93a53a7e9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxjb3Jwb3JhdGUlMjBtZWV0aW5nJTIwdGVhbXdvcmt8ZW58MXx8fHwxNzYyNjk5Nzk0fDA&ixlib=rb-4.1.0&q=80&w=1080",alt:"Expert Team"},title:{id:d(),content:"Expert Team",fontFamily:"Montserrat",fontSize:"26px",color:"#ffffff",tag:"h3"},description:{id:d(),content:"Top industry professionals with proven track records",fontFamily:"Open Sans",fontSize:"16px",color:"#e5e5e5",tag:"p"}},{id:d(),icon:{id:d(),url:"https://images.unsplash.com/photo-1737574821698-862e77f044c1?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxwcm9mZXNzaW9uYWwlMjBleGVjdXRpdmUlMjBwb3J0cmFpdHxlbnwxfHx8fDE3NjI2NzQ3MDR8MA&ixlib=rb-4.1.0&q=80&w=1080",alt:"Innovation"},title:{id:d(),content:"Innovative Approach",fontFamily:"Montserrat",fontSize:"26px",color:"#ffffff",tag:"h3"},description:{id:d(),content:"Cutting-edge solutions that keep you ahead of competition",fontFamily:"Open Sans",fontSize:"16px",color:"#e5e5e5",tag:"p"}}],backgroundColor:"#1a1a1a"},{id:d(),type:"reservation-calendar",order:2,sectionTitle:{id:d(),content:"Book Your Session",fontFamily:"Montserrat",fontSize:"44px",color:"#1a1a1a",tag:"h2"},description:{id:d(),content:"Take decisive action today",fontFamily:"Open Sans",fontSize:"20px",color:"#4a4a4a",tag:"p"},timeSlots:[{id:d(),time:"08:00",duration:60},{id:d(),time:"09:00",duration:60},{id:d(),time:"10:00",duration:60},{id:d(),time:"14:00",duration:60},{id:d(),time:"15:00",duration:60},{id:d(),time:"16:00",duration:60}
1],slotDuration:60,backgroundColor:"#fef2f2",calendarBackgroundColor:"#ffffff",timeSlotBackgroundColor:"#fecaca",timeSlotTextColor:"#991b1b",headerTextColor:"#1a1a1a"}]},{id:"coaching-modern",name:"Modern",description:"Inspiring personal development design",category:"coaching",style:"modern",sections:[{id:d(),type:"hero",order:0,headline:{id:d(),content:"Unlock Your True Potential",fontFamily:"Inter",fontSize:"48px",color:"#581c87",tag:"h1"},subheadline:{id:d(),content:"Transform your life with personalized coaching programs",fontFamily:"Inter",fontSize:"20px",color:"#7e22ce",tag:"p"},buttons:[{id:d(),text:"Start Your Journey",url:"#",fontFamily:"Inter",backgroundColor:"#a855f7",textColor:"#ffffff",size:"large"}],backgroundImage:{id:d(),url:"https://images.unsplash.com/photo-1617175379644-ba4238718eca?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxsaWZlJTIwY29hY2glMjBtb3RpdmF0aW9ufGVufDF8fHx8MTc2MjcwMTAyMnww&ixlib=rb-4.1.0&q=80&w=1080",alt:"Life coach motivation"},backgroundColor:"#fae8ff",heroStyle:"image-right"},{id:d(),type:"coaching-packages",order:1,sectionTitle:{id:d(),content:{en:"Coaching Packages",fr:"Forfaits de coaching"},fontFamily:"Inter",fontSize:"36px",color:"#581c87",tag:"h2"},description:{id:d(),content:{en:"Choose the program that fits your goals",fr:"Choisissez le programme qui correspond \xe0 vos objectifs"},fontFamily:"Inter",fontSize:"18px",color:"#7e22ce",tag:"p"},packages:[{id:d(),name:{id:d(),content:"Discovery",fontFamily:"Inter",fontSize:"24px",color:"#581c87",tag:"h3"},description:{id:d(),content:"Perfect for exploring your potential",fontFamily:"Inter",fontSize:"16px",color:"#7e22ce",tag:"p"},sessions:{id:d(),content:{en:"4 Sessions",fr:"4 s\xe9ances"},fontFamily:"Inter",fontSize:"18px",color:"#581c87",tag:"p"},price:{id:d(),content:{en:"$497",fr:"$497"},fontFamily:"Inter",fontSize:"32px",color:"#581c87",tag:"p"},features:[{id:d(),content:"One-on-one sessions",fontFamily:"Inter",fontSize:"16px",color:"#7e22ce",tag:"p"},{id:d(),content:"Goal setting framework",fontFamily:"Inter",fontSize:"16px",color:"#7e22ce",tag:"p"},{id:d(),content:{en:"Email support",fr:"Support par e-mail"},fontFamily:"Inter",fontSize:"16px",color:"#7e22ce",tag:"p"}],button:{id:d(),text:{en:"Get Started",fr:"Commencer"},url:"#",fontFamily:"Inter",backgroundColor:"#a855f7",textColor:"#ffffff",size:"medium"},highlighted:!1},{id:d(),name:{id:d(),content:{en:"Transformation",fr:"Transformation"},fontFamily:"Inter",fontSize:"24px",color:"#581c87",tag:"h3"},description:{id:d(),content:"Deep dive into lasting change",fontFamily:"Inter",fontSize:"16px",color:"#7e22ce",tag:"p"},sessions:{id:d(),content:{en:"12 Sessions",fr:"12 s\xe9ances"},fontFamily:"Inter",fontSize:"18px",color:"#581c87",tag:"p"},price:{id:d(),content:{en:"$1,297",fr:"$1,297"},fontFamily:"Inter",fontSize:"32px",color:"#581c87",tag:"p"},features:[{id:d(),content:"Weekly one-on-one sessions",fontFamily:"Inter",fontSize:"16px",color:"#7e22ce",tag:"p"},{id:d(),content:"Custom action plans",fontFamily:"Inter",fontSize:"16px",color:"#7e22ce",tag:"p"},{id:d(),content:"Unlimited messaging",fontFamily:"Inter",fontSize:"16px",color:"#7e22ce",tag:"p"},{id:d(),content:"Resource library",fontFamily:"Inter",fontSize:"16px",color:"#7e22ce",tag:"p"}],button:{id:d(),text:"Transform Now",url:"#",fontFamily:"Inter",backgroundColor:"#581c87",textColor:"#ffffff",size:"medium"},highlighted:!0}],backgroundColor:"#ffffff"},{id:d(),type:"testimonials",order:2,sectionTitle:{id:d(),content:"Success Stories",fontFamily:"Inter",fontSize:"36px",color:"#581c87",tag:"h2"},testimonials:[{id:d(),quote:{id:d(),content:"This coaching program changed my entire perspective on life and career. Truly transformative!",fontFamily:"Inter",fontSize:"18px",color:"#581c87",tag:"p"},author:{id:d(),content:"Jennifer Adams",fontFamily:"Inter",fontSize:"20px",color:"#581c87",tag:"p"},role:{id:d(),content:"Executive Leader",fontFamily:"Inter",fontSize:"16px",color:"#a855f7",tag:"p"}}],backgroundColor:"#fae8ff"},{id:d(),type:"reservation-calendar",order:3,sectionTitle:{id:d(),content:{en:"Book a Discovery Call",fr:"R\xe9servez un appel d\xe9couverte"},fontFamily:"Inter",fontSize:"36px",color:"#581c87",tag:"h2"},description:{id:d(),content:{en:"Book your complimentary discovery session today",fr:"R\xe9servez votre s\xe9ance d\xe9couverte gratuite aujourd'hui"},fontFamily:"Inter",fontSize:"18px",color:"#7e22ce",tag:"p"},timeSlots:[{id:d(),time:"09:00",duration:60},{id:d(),time:"10:00",duration:60},{id:d(),time:"11:00",duration:60},{id:d(),time:"14:00",duration:60},{id:d(),time:"15:00",duration:60},{id:d(),time:"16:00",duration:60}
1],slotDuration:60,backgroundColor:"#faf5ff",calendarBackgroundColor:"#ffffff",timeSlotBackgroundColor:"#f3e8ff",timeSlotTextColor:"#7e22ce",headerTextColor:"#581c87"}]},{id:"coaching-classic",name:"Classic",description:"Professional mentorship design",category:"coaching",style:"classic",sections:[{id:d(),type:"hero",order:0,headline:{id:d(),content:"Guiding You to Excellence",fontFamily:"Playfair Display",fontSize:"52px",color:"#713f12",tag:"h1"},subheadline:{id:d(),content:"Professional coaching rooted in proven methodologies",fontFamily:"Lora",fontSize:"22px",color:"#92400e",tag:"p"},buttons:[{id:d(),text:"Explore Programs",url:"#",fontFamily:"Lora",backgroundColor:"#b45309",textColor:"#ffffff",size:"large"}],backgroundImage:{id:d(),url:"https://images.unsplash.com/photo-1745970347703-687874c5ddbc?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxjb2FjaGluZyUyMGluc3BpcmF0aW9uJTIwZ3Jvd3RofGVufDF8fHx8MTc2MjcwMTAyMnww&ixlib=rb-4.1.0&q=80&w=1080",alt:"Coaching inspiration growth"},backgroundColor:"#fef3c7",heroStyle:"image-right"},{id:d(),type:"coaching-packages",order:1,sectionTitle:{id:d(),content:"Mentorship Programs",fontFamily:"Playfair Display",fontSize:"40px",color:"#713f12",tag:"h2"},description:{id:d(),content:"Tailored guidance for your professional journey",fontFamily:"Lora",fontSize:"18px",color:"#92400e",tag:"p"},packages:[{id:d(),name:{id:d(),content:{en:"Professional",fr:"Professionnel"},fontFamily:"Playfair Display",fontSize:"24px",color:"#713f12",tag:"h3"},description:{id:d(),content:{en:"Career advancement coaching",fr:"Coaching d'avancement de carri\xe8re"},fontFamily:"Lora",fontSize:"16px",color:"#92400e",tag:"p"},sessions:{id:d(),content:{en:"8 Sessions",fr:"8 s\xe9ances"},fontFamily:"Lora",fontSize:"18px",color:"#713f12",tag:"p"},price:{id:d(),content:{en:"$897",fr:"$897"},fontFamily:"Playfair Display",fontSize:"32px",color:"#713f12",tag:"p"},features:[{id:d(),content:{en:"Bi-weekly sessions",fr:"S\xe9ances bihebdomadaires"},fontFamily:"Lora",fontSize:"16px",color:"#92400e",tag:"p"},{id:d(),content:{en:"Career strategy planning",fr:"Planification de strat\xe9gie de carri\xe8re"},fontFamily:"Lora",fontSize:"16px",color:"#92400e",tag:"p"},{id:d(),content:"Professional assessments",fontFamily:"Lora",fontSize:"16px",color:"#92400e",tag:"p"}],button:{id:d(),text:"Enroll Now",url:"#",fontFamily:"Lora",backgroundColor:"#b45309",textColor:"#ffffff",size:"medium"},highlighted:!0}],backgroundColor:"#ffffff"},{id:d(),type:"reservation-calendar",order:2,sectionTitle:{id:d(),content:{en:"Book a Consultation",fr:"R\xe9servez une consultation"},fontFamily:"Playfair Display",fontSize:"40px",color:"#78350f",tag:"h2"},description:{id:d(),content:"Schedule a consultation to discuss your goals",fontFamily:"Lora",fontSize:"20px",color:"#92400e",tag:"p"},timeSlots:[{id:d(),time:"09:00",duration:60},{id:d(),time:"10:00",duration:60},{id:d(),time:"11:00",duration:60},{id:d(),time:"14:00",duration:60},{id:d(),time:"15:00",duration:60}
1],slotDuration:60,backgroundColor:"#fffbeb",calendarBackgroundColor:"#ffffff",timeSlotBackgroundColor:"#fef3c7",timeSlotTextColor:"#92400e",headerTextColor:"#78350f"}]},{id:"coaching-bold",name:"Bold",description:"Motivational transformation design",category:"coaching",style:"bold",sections:[{id:d(),type:"hero",order:0,headline:{id:d(),content:{en:"Break Through Your Limits",fr:"D\xe9passez vos limites"},fontFamily:"Montserrat",fontSize:"56px",color:"#be123c",tag:"h1"},subheadline:{id:d(),content:"Powerful coaching that creates unstoppable momentum",fontFamily:"Open Sans",fontSize:"24px",color:"#e11d48",tag:"p"},buttons:[{id:d(),text:"Transform Now",url:"#",fontFamily:"Montserrat",backgroundColor:"#f43f5e",textColor:"#ffffff",size:"large"}],backgroundImage:{id:d(),url:"https://images.unsplash.com/photo-1724445044107-61074c27d7e1?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxwZXJzb25hbCUyMGRldmVsb3BtZW50JTIwam91cm5leXxlbnwxfHx8fDE3NjI2NzE5ODJ8MA&ixlib=rb-4.1.0&q=80&w=1080",alt:"Personal development journey"},backgroundColor:"#ffe4e6",heroStyle:"image-right"},{id:d(),type:"coaching-packages",order:1,sectionTitle:{id:d(),content:{en:"Power Programs",fr:"Programmes \xe9nerg\xe9tiques"},fontFamily:"Montserrat",fontSize:"42px",color:"#be123c",tag:"h2"},description:{id:d(),content:"Intensive coaching for rapid transformation",fontFamily:"Open Sans",fontSize:"18px",color:"#e11d48",tag:"p"},packages:[{id:d(),name:{id:d(),content:{en:"Breakthrough",fr:"Perc\xe9e"},fontFamily:"Montserrat",fontSize:"24px",color:"#be123c",tag:"h3"},description:{id:d(),content:"Rapid transformation program",fontFamily:"Open Sans",fontSize:"16px",color:"#e11d48",tag:"p"},sessions:{id:d(),content:{en:"6 Intensive Sessions",fr:"6 s\xe9ances intensives"},fontFamily:"Open Sans",fontSize:"18px",color:"#be123c",tag:"p"},price:{id:d(),content:{en:"$1,997",fr:"$1,997"},fontFamily:"Montserrat",fontSize:"32px",color:"#be123c",tag:"p"},features:[{id:d(),content:"High-intensity coaching",fontFamily:"Open Sans",fontSize:"16px",color:"#e11d48",tag:"p"},{id:d(),content:{en:"24/7 coach access",fr:"Acc\xe8s coach 24/7"},fontFamily:"Open Sans",fontSize:"16px",color:"#e11d48",tag:"p"},{id:d(),content:{en:"Breakthrough strategies",fr:"Strat\xe9gies de perc\xe9e"},fontFamily:"Open Sans",fontSize:"16px",color:"#e11d48",tag:"p"}],button:{id:d(),text:"Start Now",url:"#",fontFamily:"Montserrat",backgroundColor:"#f43f5e",textColor:"#ffffff",size:"medium"},highlighted:!0}],backgroundColor:"#1a1a1a"},{id:d(),type:"reservation-calendar",order:2,sectionTitle:{id:d(),content:"Book Your Session",fontFamily:"Montserrat",fontSize:"44px",color:"#1a1a1a",tag:"h2"},description:{id:d(),content:"Don't wait. Your transformation starts today.",fontFamily:"Open Sans",fontSize:"20px",color:"#be123c",tag:"p"},timeSlots:[{id:d(),time:"08:00",duration:60},{id:d(),time:"09:00",duration:60},{id:d(),time:"10:00",duration:60},{id:d(),time:"14:00",duration:60},{id:d(),time:"15:00",duration:60},{id:d(),time:"16:00",duration:60}
1],slotDuration:60,backgroundColor:"#fff1f2",calendarBackgroundColor:"#ffffff",timeSlotBackgroundColor:"#fecdd3",timeSlotTextColor:"#be123c",headerTextColor:"#1a1a1a"}]},{id:"association-modern",name:"Modern",description:"Community-focused design",category:"association",style:"modern",sections:[{id:d(),type:"hero",order:0,headline:{id:d(),content:"Join Our Thriving Community",fontFamily:"Inter",fontSize:"48px",color:"#0f766e",tag:"h1"},subheadline:{id:d(),content:{en:"Connect, grow, and make a difference together",fr:"Connectez-vous, grandissez et faites la diff\xe9rence ensemble"},fontFamily:"Inter",fontSize:"20px",color:"#14b8a6",tag:"p"},buttons:[{id:d(),text:{en:"Become a Member",fr:"Devenir membre"},url:"#",fontFamily:"Inter",backgroundColor:"#14b8a6",textColor:"#ffffff",size:"large"}],backgroundColor:"#ccfbf1"},{id:d(),type:"member-benefits",order:1,sectionTitle:{id:d(),content:"Member Benefits",fontFamily:"Inter",fontSize:"36px",color:"#0f766e",tag:"h2"},description:{id:d(),content:"Discover what membership can do for you",fontFamily:"Inter",fontSize:"18px",color:"#14b8a6",tag:"p"},benefits:[{id:d(),icon:{id:d(),url:"https://images.unsplash.com/photo-1580849279061-0179c4ebf14e?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxjb21tdW5pdHklMjBncm91cCUyMHBlb3BsZXxlbnwxfHx8fDE3NjI2OTM3NTF8MA&ixlib=rb-4.1.0&q=80&w=1080",alt:"Network"},title:{id:d(),content:{en:"Networking",fr:"R\xe9seautage"},fontFamily:"Inter",fontSize:"24px",color:"#0f766e",tag:"h3"},description:{id:d(),content:{en:"Connect with like-minded professionals",fr:"Connectez-vous avec des professionnels partageant les m\xeames id\xe9es"},fontFamily:"Inter",fontSize:"16px",color:"#14b8a6",tag:"p"}},{id:d(),icon:{id:d(),url:"https://images.unsplash.com/photo-1760992003928-e2ed759fa846?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxub25wcm9maXQlMjB2b2x1bnRlZXIlMjBjb21tdW5pdHl8ZW58MXx8fHwxNzYyNjk5Nzk2fDA&ixlib=rb-4.1.0&q=80&w=1080",alt:"Events"},title:{id:d(),content:{en:"Exclusive Events",fr:"\xc9v\xe9nements exclusifs"},fontFamily:"Inter",fontSize:"24px",color:"#0f766e",tag:"h3"},description:{id:d(),content:{en:"Access members-only gatherings and conferences",fr:"Acc\xe9dez \xe0 des rassemblements et conf\xe9rences r\xe9serv\xe9s aux membres"},fontFamily:"Inter",fontSize:"16px",color:"#14b8a6",tag:"p"}},{id:d(),icon:{id:d(),url:"https://images.unsplash.com/photo-1580849279061-0179c4ebf14e?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxjb21tdW5pdHklMjBncm91cCUyMHBlb3BsZXxlbnwxfHx8fDE3NjI2OTM3NTF8MA&ixlib=rb-4.1.0&q=80&w=1080",alt:"Resources"},title:{id:d(),content:"Resources",fontFamily:"Inter",fontSize:"24px",color:"#0f766e",tag:"h3"},description:{id:d(),content:"Exclusive tools, guides, and training materials",fontFamily:"Inter",fontSize:"16px",color:"#14b8a6",tag:"p"}},{id:d(),icon:{id:d(),url:"https://images.unsplash.com/photo-1760992003928-e2ed759fa846?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxub25wcm9maXQlMjB2b2x1bnRlZXIlMjBjb21tdW5pdHl8ZW58MXx8fHwxNzYyNjk5Nzk2fDA&ixlib=rb-4.1.0&q=80&w=1080",alt:"Support"},title:{id:d(),content:{en:"Community Support",fr:"Soutien communautaire"},fontFamily:"Inter",fontSize:"24px",color:"#0f766e",tag:"h3"},description:{id:d(),content:"Get help and support from fellow members",fontFamily:"Inter",fontSize:"16px",color:"#14b8a6",tag:"p"}}],backgroundColor:"#ffffff"},{id:d(),type:"pricing",order:2,sectionTitle:{id:d(),content:{en:"Membership Tiers",fr:"Niveaux d'adh\xe9sion"},fontFamily:"Inter",fontSize:"36px",color:"#0f766e",tag:"h2"},description:{id:d(),content:"Find the membership level that's right for you",fontFamily:"Inter",fontSize:"18px",color:"#14b8a6",tag:"p"},tiers:[{id:d(),name:{id:d(),content:"Individual",fontFamily:"Inter",fontSize:"24px",color:"#0f766e",tag:"h3"},price:{id:d(),content:{en:"$99/year",fr:"$99/an"},fontFamily:"Inter",fontSize:"32px",color:"#0f766e",tag:"p"},features:[{id:d(),content:{en:"Access to all events",fr:"Acc\xe8s \xe0 tous les \xe9v\xe9nements"},fontFamily:"Inter",fontSize:"16px",color:"#14b8a6",tag:"p"},{id:d(),content:"Member directory",fontFamily:"Inter",fontSize:"16px",color:"#14b8a6",tag:"p"},{id:d(),content:"Monthly newsletter",fontFamily:"Inter",fontSize:"16px",color:"#14b8a6",tag:"p"}],button:{id:d(),text:{en:"Join Now",fr:"Rejoindre maintenant"},url:"#",fontFamily:"Inter",backgroundColor:"#14b8a6",textColor:"#ffffff",size:"medium"},highlighted:!0}],backgroundColor:"#ccfbf1"},{id:d(),type:"reservation-calendar",order:3,sectionTitle:{id:d(),content:{en:"Book an Appointment",fr:"R\xe9servez un rendez-vous"},fontFamily:"Inter",fontSize:"36px",color:"#0f766e",tag:"h2"},description:{id:d(),content:"Join our community today and start making connections",fontFamily:"Inter",fontSize:"18px",color:"#14b8a6",tag:"p"},timeSlots:[{id:d(),time:"09:00",duration:60},{id:d(),time:"10:00",duration:60},{id:d(),time:"11:00",duration:60},{id:d(),time:"14:00",duration:60},{id:d(),time:"15:00",duration:60}
1],slotDuration:60,backgroundColor:"#f0fdfa",calendarBackgroundColor:"#ffffff",timeSlotBackgroundColor:"#ccfbf1",timeSlotTextColor:"#0f766e",headerTextColor:"#0f766e"}]},{id:"association-classic",name:"Classic",description:"Traditional membership design",category:"association",style:"classic",sections:[{id:d(),type:"hero",order:0,headline:{id:d(),content:{en:"A Legacy of Excellence",fr:"Un h\xe9ritage d'excellence"},fontFamily:"Playfair Display",fontSize:"52px",color:"#1e40af",tag:"h1"},subheadline:{id:d(),content:"Serving our members with distinction since 1985",fontFamily:"Lora",fontSize:"22px",color:"#3b82f6",tag:"p"},buttons:[{id:d(),text:"Learn About Membership",url:"#",fontFamily:"Lora",backgroundColor:"#2563eb",textColor:"#ffffff",size:"large"}],backgroundColor:"#dbeafe"},{id:d(),type:"member-benefits",order:1,sectionTitle:{id:d(),content:"Membership Privileges",fontFamily:"Playfair Display",fontSize:"40px",color:"#1e40af",tag:"h2"},description:{id:d(),content:"Time-honored benefits for our valued members",fontFamily:"Lora",fontSize:"18px",color:"#3b82f6",tag:"p"},benefits:[{id:d(),icon:{id:d(),url:"https://images.unsplash.com/photo-1580849279061-0179c4ebf14e?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxjb21tdW5pdHklMjBncm91cCUyMHBlb3BsZXxlbnwxfHx8fDE3NjI2OTM3NTF8MA&ixlib=rb-4.1.0&q=80&w=1080",alt:"Tradition"},title:{id:d(),content:"Rich Traditions",fontFamily:"Playfair Display",fontSize:"24px",color:"#1e40af",tag:"h3"},description:{id:d(),content:{en:"Be part of a storied history of excellence",fr:"Faites partie d'une histoire d'excellence"},fontFamily:"Lora",fontSize:"16px",color:"#3b82f6",tag:"p"}},{id:d(),icon:{id:d(),url:"https://images.unsplash.com/photo-1760992003928-e2ed759fa846?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxub25wcm9maXQlMjB2b2x1bnRlZXIlMjBjb21tdW5pdHl8ZW58MXx8fHwxNzYyNjk5Nzk2fDA&ixlib=rb-4.1.0&q=80&w=1080",alt:"Network"},title:{id:d(),content:"Distinguished Network",fontFamily:"Playfair Display",fontSize:"24px",color:"#1e40af",tag:"h3"},description:{id:d(),content:{en:"Connect with accomplished professionals",fr:"Connectez-vous avec des professionnels accomplis"},fontFamily:"Lora",fontSize:"16px",color:"#3b82f6",tag:"p"}}],backgroundColor:"#ffffff"},{id:d(),type:"reservation-calendar",order:2,sectionTitle:{id:d(),content:{en:"Book an Appointment",fr:"R\xe9servez un rendez-vous"},fontFamily:"Playfair Display",fontSize:"40px",color:"#1e40af",tag:"h2"},description:{id:d(),content:{en:"Apply for membership today",fr:"Postulez pour l'adh\xe9sion aujourd'hui"},fontFamily:"Lora",fontSize:"20px",color:"#3b82f6",tag:"p"},timeSlots:[{id:d(),time:"09:00",duration:60},{id:d(),time:"10:00",duration:60},{id:d(),time:"11:00",duration:60},{id:d(),time:"14:00",duration:60},{id:d(),time:"15:00",duration:60}
1],slotDuration:60,backgroundColor:"#eff6ff",calendarBackgroundColor:"#ffffff",timeSlotBackgroundColor:"#dbeafe",timeSlotTextColor:"#1e40af",headerTextColor:"#1e40af"}]},{id:"association-bold",name:"Bold",description:"Strong community identity design",category:"association",style:"bold",sections:[{id:d(),type:"hero",order:0,headline:{id:d(),content:"United We Stand",fontFamily:"Montserrat",fontSize:"56px",color:"#1a1a1a",tag:"h1"},subheadline:{id:d(),content:{en:"Building a powerful community that makes an impact",fr:"Construire une communaut\xe9 puissante qui a un impact"},fontFamily:"Open Sans",fontSize:"24px",color:"#4a4a4a",tag:"p"},buttons:[{id:d(),text:"Join the Movement",url:"#",fontFamily:"Montserrat",backgroundColor:"#eab308",textColor:"#1a1a1a",size:"large"}],backgroundColor:"#fef9c3"},{id:d(),type:"member-benefits",order:1,sectionTitle:{id:d(),content:"Why Join Us",fontFamily:"Montserrat",fontSize:"42px",color:"#ffffff",tag:"h2"},description:{id:d(),content:{en:"Benefits that empower you to make a difference",fr:"Des avantages qui vous permettent de faire la diff\xe9rence"},fontFamily:"Open Sans",fontSize:"18px",color:"#e5e5e5",tag:"p"},benefits:[{id:d(),icon:{id:d(),url:"https://images.unsplash.com/photo-1580849279061-0179c4ebf14e?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxjb21tdW5pdHklMjBncm91cCUyMHBlb3BsZXxlbnwxfHx8fDE3NjI2OTM3NTF8MA&ixlib=rb-4.1.0&q=80&w=1080",alt:"Power"},title:{id:d(),content:{en:"Collective Power",fr:"Pouvoir collectif"},fontFamily:"Montserrat",fontSize:"26px",color:"#ffffff",tag:"h3"},description:{id:d(),content:"Your voice amplified through our community",fontFamily:"Open Sans",fontSize:"16px",color:"#e5e5e5",tag:"p"}},{id:d(),icon:{id:d(),url:"https://images.unsplash.com/photo-1760992003928-e2ed759fa846?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxub25wcm9maXQlMjB2b2x1bnRlZXIlMjBjb21tdW5pdHl8ZW58MXx8fHwxNzYyNjk5Nzk2fDA&ixlib=rb-4.1.0&q=80&w=1080",alt:"Impact"},title:{id:d(),content:"Real Impact",fontFamily:"Montserrat",fontSize:"26px",color:"#ffffff",tag:"h3"},description:{id:d(),content:"Make meaningful change in your community",fontFamily:"Open Sans",fontSize:"16px",color:"#e5e5e5",tag:"p"}},{id:d(),icon:{id:d(),url:"https://images.unsplash.com/photo-1580849279061-0179c4ebf14e?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxjb21tdW5pdHklMjBncm91cCUyMHBlb3BsZXxlbnwxfHx8fDE3NjI2OTM3NTF8MA&ixlib=rb-4.1.0&q=80&w=1080",alt:"Connection"},title:{id:d(),content:"Strong Connections",fontFamily:"Montserrat",fontSize:"26px",color:"#ffffff",tag:"h3"},description:{id:d(),content:{en:"Build relationships that last",fr:"Construisez des relations durables"},fontFamily:"Open Sans",fontSize:"16px",color:"#e5e5e5",tag:"p"}},{id:d(),icon:{id:d(),url:"https://images.unsplash.com/photo-1760992003928-e2ed759fa846?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxub25wcm9maXQlMjB2b2x1bnRlZXIlMjBjb21tdW5pdHl8ZW58MXx8fHwxNzYyNjk5Nzk2fDA&ixlib=rb-4.1.0&q=80&w=1080",alt:"Support"},title:{id:d(),content:"Unwavering Support",fontFamily:"Montserrat",fontSize:"26px",color:"#ffffff",tag:"h3"},description:{id:d(),content:{en:"A community that has your back",fr:"Une communaut\xe9 qui vous soutient"},fontFamily:"Open Sans",fontSize:"16px",color:"#e5e5e5",tag:"p"}}],backgroundColor:"#1a1a1a"},{id:d(),type:"reservation-calendar",order:2,sectionTitle:{id:d(),content:{en:"Book an Appointment",fr:"R\xe9servez un rendez-vous"},fontFamily:"Montserrat",fontSize:"44px",color:"#1a1a1a",tag:"h2"},description:{id:d(),content:"Together we are stronger",fontFamily:"Open Sans",fontSize:"20px",color:"#4a4a4a",tag:"p"},timeSlots:[{id:d(),time:"09:00",duration:60},{id:d(),time:"10:00",duration:60},{id:d(),time:"11:00",duration:60},{id:d(),time:"14:00",duration:60},{id:d(),time:"15:00",duration:60}
1],slotDuration:60,backgroundColor:"#fefce8",calendarBackgroundColor:"#ffffff",timeSlotBackgroundColor:"#fef9c3",timeSlotTextColor:"#854d0e",headerTextColor:"#1a1a1a"}]},{id:"blank",name:"Blank",description:"Start with a clean slate",category:"blank",style:"modern",sections:[{id:d(),type:"hero",order:0,headline:{id:d(),content:"Your Headline Here",fontFamily:"Inter",fontSize:"48px",color:"#1a1a1a",tag:"h1"},subheadline:{id:d(),content:{en:"Add your subheadline text here",fr:"Ajoutez votre sous-titre ici"},fontFamily:"Inter",fontSize:"20px",color:"#666666",tag:"p"},buttons:[{id:d(),text:{en:"Get Started",fr:"Commencer"},url:"#",fontFamily:"Inter",backgroundColor:"#3b82f6",textColor:"#ffffff",size:"large"}],backgroundColor:"#ffffff"}]}],m=e=>u.find(t=>t.id===e);var p=o(19157),g=o(71360),h=o(84259),f=o(72313),x=o(75686),b=o(35087),y=o(94651),v=o(85692),j=o(64280),N=o(9855),w=o(57555),C=o(11575),S=o(70579);function A(e){var t;let{sections:o,onAddSection:n,onRemoveSection:s,onReorderSection:r,onMoveSection:i,onCloneSection:l,onToggleSectionHidden:d,selectedSectionId:u,onSectionSelect:m,currentCategory:p,onOpenLibrary:A,pages:k,currentPageId:I,onMoveSectionToPage:T,onCloneSectionToPage:z}=e;const{t:F,language:M}=(0,c.o)(),{contentLanguage:P}=(0,w.X)(),[B,E]=(0,a.useState)("category"),[D,L]=(0,a.useState)(null),[H,R]=(0,a.useState)(null),[O,_]=(0,a.useState)(null),[U,q]=(0,a.useState)("main"),V=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(!O)return;const e=e=>{V.current&&!V.current.contains(e.target)&&(_(null),q("main"))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[O]);const W=e=>{const t=M||"fr";return"string"===typeof e.name?e.name:e.name&&"object"===typeof e.name?e.name[t]||e.name.fr||e.name.en||e.slug||e.id:e.slug||e.id},G=(k||[]).filter(e=>e.id!==I),J=!!(k&&k.length>1&&T&&z),X=[{type:"hero",label:F("sections.types.hero"),categories:"all"},{type:"features",label:F("sections.types.features"),categories:"all"},{type:"services",label:F("sections.types.services"),categories:"all"},{type:"testimonials",label:F("sections.types.testimonials"),categories:"all"},{type:"pricing",label:F("sections.types.pricing"),categories:"all"},{type:"contact",label:F("sections.types.contact"),categories:"all"},{type:"reservation-calendar",label:F("sections.types.reservationCalendar"),categories:"all"},{type:"wellness-programs",label:F("sections.types.wellnessPrograms"),categories:["wellness"]},{type:"business-team",label:F("sections.types.team"),categories:["business"]},{type:"coaching-packages",label:F("sections.types.coachingPackages"),categories:["coaching"]},{type:"member-benefits",label:F("sections.types.memberBenefits"),categories:["association"]},{type:"slider",label:F("sections.types.slider"),categories:"all"},{type:"portfolio",label:F("sections.types.portfolio"),categories:"all"},{type:"blog",label:F("sections.types.blog"),categories:"all"},{type:"video",label:F("sections.types.video"),categories:"all"},{type:"reviews",label:F("sections.types.reviews"),categories:"all"},{type:"newsletter",label:F("sections.types.newsletter"),categories:"all"},{type:"benefits",label:F("sections.types.benefits"),categories:"all"},{type:"iframe",label:F("sections.types.iframe"),categories:"all"},{type:"custom-html",label:F("sections.types.customHtml"),categories:"all"},{type:"sponsors",label:F("sections.types.sponsors"),categories:"all"}],Y="true"===localStorage.getItem("isFechamUser")||window.location.href.toLowerCase().includes("fecham")||(null===(t=localStorage.getItem("userType"))||void 0===t?void 0:t.toLowerCase().includes("fecham")),Z=["newsletter","blog","reservation-calendar"],$=((()=>{let e=X;Y&&(e=e.filter(e=>!Z.includes(e.type))),"all"===B||(p?e.filter(e=>"all"===e.categories||e.categories.includes(p)):e.filter(e=>"all"===e.categories))})(),[...o].sort((e,t)=>e.order-t.order)),Q=e=>{e.target.style.opacity="1",L(null),R(null)},K=e=>{e.preventDefault();let t=H;null!==D&&null!==t&&i&&(D<t&&(t-=1),D!==t&&i(D,t)),L(null),R(null)},ee=()=>(0,S.jsx)("div",{className:"h-1 bg-gray-900 rounded-full mx-1 my-1",style:{boxShadow:"0 0 4px rgba(0, 0, 0, 0.3)"}});return(0,S.jsxs)("div",{className:"p-4 border-b",children:[(0,S.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,S.jsx)("h3",{children:F("sections.title")}),A&&(0,S.jsx)("button",{onClick:A,className:"w-8 h-8 flex items-center justify-center bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors",title:F("sections.addSection"),children:(0,S.jsx)(g.A,{className:"w-5 h-5"})})]}),(0,S.jsx)("div",{className:"space-y-1",onDragLeave:e=>{const t=e.currentTarget.getBoundingClientRect();(e.clientX<t.left||e.clientX>
1t.right||e.clientY<t.top||e.clientY>t.bottom)&&R(null)},children:$.map((e,t)=>{var o;return(0,S.jsxs)("div",{children:[H===t&&null!==D&&D!==t&&(0,S.jsx)(ee,{}),(0,S.jsx)("div",{draggable:!0,onDragStart:e=>((e,t)=>{L(t),e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",t.toString()),setTimeout(()=>{e.target.style.opacity="0.5"},0)})(e,t),onDragEnd:Q,onDragOver:e=>((e,t)=>{if(e.preventDefault(),e.dataTransfer.dropEffect="move",null===D||D===t)return;const o=e.currentTarget.getBoundingClientRect(),n=o.top+o.height/2;e.clientY<n?R(t):R(t+1)})(e,t),onDrop:K,className:"p-3 rounded-lg border cursor-pointer transition-all ".concat(u===e.id?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"," ").concat(e.hidden?"opacity-60 bg-gray-50":""," ").concat(D===t?"opacity-50":""),onClick:()=>m(e.id),children:(0,S.jsxs)("div",{className:"flex items-center justify-between",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)("div",{className:"cursor-grab active:cursor-grabbing p-1 -ml-1 hover:bg-gray-100 rounded",onMouseDown:e=>e.stopPropagation(),children:(0,S.jsx)(h.A,{className:"w-4 h-4 text-gray-400"})}),(0,S.jsxs)("div",{className:"flex flex-col",children:[(0,S.jsxs)("span",{className:"capitalize text-sm flex items-center gap-2",children:[(null===(o=X.find(t=>t.type===e.type))||void 0===o?void 0:o.label)||e.type,e.hidden&&(0,S.jsx)("span",{className:"normal-case text-[11px] px-1.5 py-0.5 rounded bg-gray-200 text-gray-600","data-testid":"badge-section-masquee",children:F("sectionList.hiddenBadge")})]}),(()=>{const t=e.badge,o=e.sectionTitle,n=e.headline,s=null!==t&&void 0!==t&&t.content?(0,C._A)(t.content,P):null!==o&&void 0!==o&&o.content?(0,C._A)(o.content,P):null!==n&&void 0!==n&&n.content?(0,C._A)(n.content,P):null;return s&&s.length>0&&s.length<=40?(0,S.jsx)("span",{className:"text-xs text-gray-400 truncate max-w-[140px]",children:s}):null})()]})]}),(0,S.jsxs)("div",{className:"flex items-center gap-1",children:[(0,S.jsx)("button",{onClick:t=>{t.stopPropagation(),l(e.id)},className:"p-1 hover:bg-blue-100 text-blue-600 rounded",title:F("sectionList.cloneSection"),children:(0,S.jsx)(f.A,{className:"w-4 h-4"})}),(J||!!d)&&(0,S.jsxs)("div",{className:"relative",children:[(0,S.jsx)("button",{onClick:t=>{t.stopPropagation(),O===e.id?(_(null),q("main")):(_(e.id),q("main"))},className:"p-1 hover:bg-gray-200 text-gray-700 rounded",title:F("sectionList.moreOptions"),children:(0,S.jsx)(x.A,{className:"w-4 h-4"})}),O===e.id&&(0,S.jsxs)("div",{ref:V,className:"absolute right-0 top-full mt-1 z-50 min-w-[220px] bg-white border border-gray-200 rounded-lg shadow-lg py-1",onClick:e=>e.stopPropagation(),children:["main"===U&&(0,S.jsxs)(S.Fragment,{children:[d&&(0,S.jsxs)("button",{"data-testid":"menu-masquer-afficher",className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50",onClick:()=>{d(e.id),_(null),q("main")},children:[e.hidden?(0,S.jsx)(b.A,{className:"w-4 h-4 text-gray-600"}):(0,S.jsx)(y.A,{className:"w-4 h-4 text-gray-600"}),(0,S.jsx)("span",{className:"flex-1 text-left",children:e.hidden?F("sectionList.showSection"):F("sectionList.hideSection")})]}),J&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)("button",{className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50",onClick:()=>q("move"),children:[(0,S.jsx)(v.A,{className:"w-4 h-4 text-blue-600"}),(0,S.jsx)("span",{className:"flex-1 text-left",children:F("sectionList.moveToPage")}),(0,S.jsx)("span",{className:"text-gray-400",children:"\u203a"})]}),(0,S.jsxs)("button",{className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50",onClick:()=>q("copy"),children:[(0,S.jsx)(j.A,{className:"w-4 h-4 text-emerald-600"}),(0,S.jsx)("span",{className:"flex-1 text-left",children:F("sectionList.copyToPage")}),(0,S.jsx)("span",{className:"text-gray-400",children:"\u203a"})]})]})]}),("move"===U||"copy"===U)&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("div",{className:"px-3 py-1 text-xs font-semibold text-gray-500 uppercase tracking-wide border-b",children:F("move"===U?"sectionList.moveToPageHeader":"sectionList.copyToPageHeader")}),0===G.length?(0,S.jsx)("div",{className:"px-3 py-2 text-xs text-gray-400 italic",children:F("sectionList.noOtherPage")}):G.map(t=>(0,S.jsx)("button",{className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50",onClick:()=>
1{"move"===U&&T?T(e.id,t.id):"copy"===U&&z&&z(e.id,t.id),_(null),q("main")},children:(0,S.jsx)("span",{className:"flex-1 text-left truncate",children:W(t)})},t.id)),(0,S.jsx)("button",{className:"w-full px-3 py-2 text-xs text-gray-500 hover:bg-gray-50 border-t text-left",onClick:()=>q("main"),children:F("sectionList.backToMenu")})]})]})]}),(0,S.jsx)("button",{onClick:t=>{t.stopPropagation(),s(e.id)},className:"p-1 hover:bg-red-100 text-red-600 rounded",title:F("sectionList.deleteSection"),children:(0,S.jsx)(N.A,{className:"w-4 h-4"})})]})]})}),t===$.length-1&&H===$.length&&null!==D&&D!==$.length-1&&(0,S.jsx)(ee,{})]},e.id)})})]})}var k=o(90563),I=o(22024),T=o(7104),z=o(55731),F=o(58487),M=o(70764),P=o(56099),B=o(29236),E=o(27673),D=o(14939),L=o(88306),H=o(28646),R=o(82054),O=o(76245),_=o(56174),U=o(1367),q=o(73728),V=o(22642),W=o(83149),G=o(1441),J=o(54348),X=o(52918),Y=o(72105),Z=o(37719),$=o(73062),Q=o(63944),K=o(92382),ee=o(84105),te=o(63331);const oe=()=>Math.random().toString(36).substr(2,9),ne={primaryColor:"#2563eb",secondaryColor:"#f3f4f6",accentColor:"#3b82f6"},se=e=>({primaryColor:(null===e||void 0===e?void 0:e.primaryColor)||ne.primaryColor,secondaryColor:(null===e||void 0===e?void 0:e.secondaryColor)||ne.secondaryColor,accentColor:(null===e||void 0===e?void 0:e.accentColor)||ne.accentColor}),ae=function(e){const t={"New Hero Headline":{en:"New Hero Headline",fr:"Nouveau titre h\xe9ro"},"Your subheadline goes here":{en:"Your subheadline goes here",fr:"Votre sous-titre ici"},"Get Started":{en:"Get Started",fr:"Commencer"},Features:{en:"Features",fr:"Fonctionnalit\xe9s"},"Feature 1":{en:"Feature 1",fr:"Fonctionnalit\xe9 1"},"Feature 2":{en:"Feature 2",fr:"Fonctionnalit\xe9 2"},"Feature 3":{en:"Feature 3",fr:"Fonctionnalit\xe9 3"},"Description of feature 1":{en:"Description of feature 1",fr:"Description de la fonctionnalit\xe9 1"},"Our Services":{en:"Our Services",fr:"Nos services"},"Service 1":{en:"Service 1",fr:"Service 1"},"Service description":{en:"Service description",fr:"Description du service"},"Learn More":{en:"Learn More",fr:"En savoir plus"},"What Our Clients Say":{en:"What Our Clients Say",fr:"Ce que disent nos clients"},"Client Name":{en:"Client Name",fr:"Nom du client"},"Client testimonial":{en:"Client testimonial",fr:"T\xe9moignage client"},Company:{en:"Company",fr:"Entreprise"},Pricing:{en:"Pricing",fr:"Tarifs"},"Choose the plan that works for you":{en:"Choose the plan that works for you",fr:"Choisissez le plan qui vous convient"},Basic:{en:"Basic",fr:"Basique"},Pro:{en:"Pro",fr:"Pro"},Enterprise:{en:"Enterprise",fr:"Entreprise"},"Get in Touch":{en:"Get in Touch",fr:"Contactez-nous"},"Contact us for more information":{en:"Contact us for more information",fr:"Contactez-nous pour plus d'informations"},"Send Message":{en:"Send Message",fr:"Envoyer le message"},"Our Benefits":{en:"Our Benefits",fr:"Nos avantages"},"Benefit 1":{en:"Benefit 1",fr:"Avantage 1"},"Benefit description":{en:"Benefit description",fr:"Description de l'avantage"},"Wellness Programs":{en:"Wellness Programs",fr:"Programmes de bien-\xeatre"},"Program 1":{en:"Program 1",fr:"Programme 1"},"Program description":{en:"Program description",fr:"Description du programme"},"Our Team":{en:"Our Team",fr:"Notre \xe9quipe"},"Team Member":{en:"Team Member",fr:"Membre de l'\xe9quipe"},Position:{en:"Position",fr:"Poste"},"Coaching Packages":{en:"Coaching Packages",fr:"Forfaits de coaching"},"Package 1":{en:"Package 1",fr:"Forfait 1"},"Package description":{en:"Package description",fr:"Description du forfait"},"Member Benefits":{en:"Member Benefits",fr:"Avantages membres"},"Book an Appointment":{en:"Book an Appointment",fr:"R\xe9server un rendez-vous"},"Description of service 1":{en:"Description of service 1",fr:"Description du service 1"},Testimonials:{en:"Testimonials",fr:"T\xe9moignages"},"This is an amazing product!":{en:"This is an amazing product!",fr:"C'est un produit incroyable !"},"John Doe":{en:"John Doe",fr:"Jean Dupont"},"CEO, Company":{en:"CEO, Company",fr:"PDG, Entreprise"},"Get In Touch":{en:"Get In Touch",fr:"Contactez-nous"},"We'd love to hear from you":{en:"We'd love to hear from you",fr:"Nous serions ravis de vous entendre"},"Discover the Benefits":{en:"Discover the Benefits",fr:"D\xe9couvrez les avantages"},"Experience the unique advantages of our approach and discover how we help you achieve your goals with proven methods and personalized support.":{en:"Experience the unique advantages of our approach and discover how we help you achieve your goals with proven methods and personalized support.",fr:"D\xe9couvrez les avantages uniques de notre approche et comment nous vous aidons \xe0 atteindre vos objectifs avec des m\xe9thodes \xe9prouv\xe9es et un s
1outien personnalis\xe9."},"Program Name":{en:"Program Name",fr:"Nom du programme"},"Meet our expert team members":{en:"Meet our expert team members",fr:"Rencontrez les membres de notre \xe9quipe"},"Brief bio":{en:"Brief bio",fr:"Br\xe8ve biographie"},"Choose the package that fits your goals":{en:"Choose the package that fits your goals",fr:"Choisissez le forfait qui correspond \xe0 vos objectifs"},"Package Name":{en:"Package Name",fr:"Nom du forfait"},"Discover what membership offers":{en:"Discover what membership offers",fr:"D\xe9couvrez ce qu'offre l'adh\xe9sion"},"Benefit Title":{en:"Benefit Title",fr:"Titre de l'avantage"},"Select a date and time for your appointment":{en:"Select a date and time for your appointment",fr:"S\xe9lectionnez une date et une heure pour votre rendez-vous"},"New testimonial quote":{en:"New testimonial quote",fr:"Nouveau t\xe9moignage"},"Author Name":{en:"Author Name",fr:"Nom de l'auteur"},"Job Title, Company":{en:"Job Title, Company",fr:"Titre du poste, Entreprise"},"What Our Customers Say":{en:"What Our Customers Say",fr:"Ce que disent nos clients"},"Read reviews from our satisfied customers":{en:"Read reviews from our satisfied customers",fr:"Lisez les avis de nos clients satisfaits"},"Stay Updated":{en:"Stay Updated",fr:"Restez inform\xe9"},"Subscribe to our newsletter for the latest updates and exclusive offers":{en:"Subscribe to our newsletter for the latest updates and exclusive offers",fr:"Abonnez-vous \xe0 notre infolettre pour les derni\xe8res mises \xe0 jour et offres exclusives"},Subscribe:{en:"Subscribe",fr:"S'inscrire"},"Watch Our Story":{en:"Watch Our Story",fr:"D\xe9couvrez Notre Histoire"},"Learn more about us through this video":{en:"Learn more about us through this video",fr:"Apprenez-en plus sur nous gr\xe2ce \xe0 cette vid\xe9o"},"Our Portfolio":{en:"Our Portfolio",fr:"Notre Portfolio"},"Explore our latest projects and work":{en:"Explore our latest projects and work",fr:"D\xe9couvrez nos derniers projets et r\xe9alisations"},"Project Title":{en:"Project Title",fr:"Titre du projet"},"Project description goes here":{en:"Project description goes here",fr:"Description du projet ici"},"View Project":{en:"View Project",fr:"Voir le projet"},Branding:{en:"Branding",fr:"Marque"},"Web Design":{en:"Web Design",fr:"Design Web"},Development:{en:"Development",fr:"D\xe9veloppement"},"Our Training Programs":{en:"Our Training Programs",fr:"Nos Formations"},"Explore our certified training programs":{en:"Explore our certified training programs",fr:"D\xe9couvrez nos programmes de formation certifi\xe9s"},"View All Programs":{en:"View All Programs",fr:"Voir toutes les formations"},"New Feature":{en:"New Feature",fr:"Nouvelle fonctionnalit\xe9"},"Feature description":{en:"Feature description",fr:"Description de la fonctionnalit\xe9"},"New Service":{en:"New Service",fr:"Nouveau service"},"Service description goes here":{en:"Service description goes here",fr:"Description du service ici"},"New Program":{en:"New Program",fr:"Nouveau programme"},"60 minutes":{en:"60 minutes",fr:"60 minutes"},"New Plan":{en:"New Plan",fr:"Nouveau plan"},"$19/mo":{en:"$19/mo",fr:"19$/mois"},"New Package":{en:"New Package",fr:"Nouveau forfait"},"4 Sessions":{en:"4 Sessions",fr:"4 s\xe9ances"},$497:{en:"$497",fr:"497$"},"New Benefit":{en:"New Benefit",fr:"Nouvel avantage"},"Our Sponsors":{en:"Our Sponsors",fr:"Nos Commanditaires"},"Thank you to our partners and sponsors":{en:"Thank you to our partners and sponsors",fr:"Merci \xe0 nos partenaires et commanditaires"},"Sponsor 1":{en:"Sponsor 1",fr:"Commanditaire 1"},"Sponsor 2":{en:"Sponsor 2",fr:"Commanditaire 2"},"Sponsor 3":{en:"Sponsor 3",fr:"Commanditaire 3"},"Sponsor 4":{en:"Sponsor 4",fr:"Commanditaire 4"},"New Sponsor":{en:"New Sponsor",fr:"Nouveau commanditaire"},"Our Products":{en:"Our Products",fr:"Nos Produits"},"Browse our collection":{en:"Browse our collection",fr:"D\xe9couvrez notre c
1ollection"},"View All Products":{en:"View All Products",fr:"Voir tous les produits"}}[e]||{en:e,fr:e};return console.log("[getNewSectionContent] Creating bilingual content:",{input:e,output:t,isBilingual:"object"===typeof t&&null!==t&&"en"in t&&"fr"in t}),t};function re(e,t){console.log("[cloneSection] INPUT section type:",e.type),console.log("[cloneSection] INPUT section:",JSON.stringify(e,null,2));const o=ie(e.type,t);console.log("[cloneSection] FRESH section (after createNewSection):",JSON.stringify(o,null,2));const n=le(e,o);return console.log("[cloneSection] FINAL section (after mapSectionContent):",JSON.stringify(n,null,2)),e.hidden&&(n.hidden=!0),n}function ie(e,t,o){const s=se(o),a={id:oe(),type:e,order:t};switch(e){case"hero":return(0,n.A)((0,n.A)({},a),{},{type:"hero",headline:{id:oe(),content:ae("New Hero Headline"),fontFamily:"Inter",fontSize:"48px",color:"#1a1a1a",tag:"h1"},subheadline:{id:oe(),content:ae("Your subheadline goes here"),fontFamily:"Inter",fontSize:"20px",color:"#666666",tag:"p"},buttons:[{id:oe(),text:ae("Get Started"),url:"#",fontFamily:"Inter",backgroundColor:s.primaryColor,textColor:"#ffffff",size:"large"}],backgroundImage:{id:oe(),url:"https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=800",alt:"Hero image"},backgroundColor:"#f8fafc",heroStyle:"image-right"});case"features":return(0,n.A)((0,n.A)({},a),{},{type:"features",sectionTitle:{id:oe(),content:ae("Features"),fontFamily:"Inter",fontSize:"36px",color:"#1a1a1a",tag:"h2"},features:[{id:oe(),icon:{id:oe(),url:"https://images.unsplash.com/photo-1551808525-51a94da548ce?w=400",alt:"Feature icon"},title:{id:oe(),content:ae("Feature 1"),fontFamily:"Inter",fontSize:"24px",color:"#1a1a1a",tag:"h3"},description:{id:oe(),content:ae("Description of feature 1"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"}}],backgroundColor:"#f0fdf4"});case"services":return(0,n.A)((0,n.A)({},a),{},{type:"services",sectionTitle:{id:oe(),content:ae("Our Services"),fontFamily:"Inter",fontSize:"36px",color:"#1a1a1a",tag:"h2"},services:[{id:oe(),image:{id:oe(),url:"https://images.unsplash.com/photo-1486312338219-ce68d2c6f44d?w=600",alt:"Service image"},title:{id:oe(),content:ae("Service 1"),fontFamily:"Inter",fontSize:"28px",color:"#1a1a1a",tag:"h3"},description:{id:oe(),content:ae("Description of service 1"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"}}],backgroundColor:"#ffffff"});case"testimonials":return(0,n.A)((0,n.A)({},a),{},{type:"testimonials",sectionTitle:{id:oe(),content:ae("Testimonials"),fontFamily:"Inter",fontSize:"36px",color:"#1a1a1a",tag:"h2"},testimonials:[{id:oe(),quote:{id:oe(),content:ae("This is an amazing product!"),fontFamily:"Inter",fontSize:"18px",color:"#1a1a1a",tag:"p"},author:{id:oe(),content:ae("John Doe"),fontFamily:"Inter",fontSize:"20px",color:"#1a1a1a",tag:"p"},role:{id:oe(),content:ae("CEO, Company"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"}}],backgroundColor:"#faf5ff"});case"pricing":return(0,n.A)((0,n.A)({},a),{},{type:"pricing",sectionTitle:{id:oe(),content:ae("Pricing"),fontFamily:"Inter",fontSize:"36px",color:"#1a1a1a",tag:"h2"},description:{id:oe(),content:ae("Choose the plan that works for you"),fontFamily:"Inter",fontSize:"18px",color:"#666666",tag:"p"},tiers:[{id:oe(),name:{id:oe(),content:ae("Starter"),fontFamily:"Inter",fontSize:"24px",color:"#1a1a1a",tag:"h3"},price:{id:oe(),content:"$29/mo",fontFamily:"Inter",fontSize:"32px",color:"#1a1a1a",tag:"p"},features:[{id:oe(),content:ae("Core features included"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"},{id:oe(),content:ae("Email support"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"},{id:oe(),content:ae("Monthly reports"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"}],button:{id:oe(),text:"Get Started",url:"#",fontFamily:"Inter",backgroundColor:"#f3f4f6",textColor:s.primaryColor,size:"medium",alignment:"center"},highlighted:!1},{id:oe(),name:{id:oe(),content:ae("Professional"),fontFamily:"Inter",fontSize:"24px",color:"#1a1a1a",tag:"h3"},price:{id:oe(),content:"$79/mo",fontFamily:"Inter",fontSize:"32px",color:"#1a1a1a",tag:"p"},features:[{id:oe(),content:ae("Everything in Starter"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"},{id:oe(),content:ae("Priority support"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"},{id:oe(),content:ae("Advanced analytics"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"},{id:oe(),content:ae("Custom integrations"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"}],button:{id:oe(),text:"Get Started",url:"#",fontFamily:"Inter",backgroundColor:s.primaryColor,textColor:"#ffffff",size:"medium",alignment:"center"},highlighted:!0},{id:oe(),name:{id:oe(),content:ae("Enterprise"),fontFamily:"Inter",fontSize:"24px",color:"#1a1a1a",tag:"h3"}
1,price:{id:oe(),content:"$199/mo",fontFamily:"Inter",fontSize:"32px",color:"#1a1a1a",tag:"p"},features:[{id:oe(),content:ae("Everything in Professional"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"},{id:oe(),content:ae("24/7 dedicated support"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"},{id:oe(),content:ae("White-glove service"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"},{id:oe(),content:ae("Unlimited access"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"},{id:oe(),content:ae("Custom solutions"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"}],button:{id:oe(),text:"Contact Sales",url:"#",fontFamily:"Inter",backgroundColor:"#f3f4f6",textColor:s.primaryColor,size:"medium",alignment:"center"},highlighted:!1}],backgroundColor:"#f8fafc"});case"contact":return(0,n.A)((0,n.A)({},a),{},{type:"contact",headline:{id:oe(),content:ae("Get In Touch"),fontFamily:"Inter",fontSize:"36px",color:"#1a1a1a",tag:"h2"},description:{id:oe(),content:ae("We'd love to hear from you"),fontFamily:"Inter",fontSize:"18px",color:"#666666",tag:"p"},buttons:[{id:oe(),text:"Contact Us",url:"#",fontFamily:"Inter",backgroundColor:s.primaryColor,textColor:"#ffffff",size:"large",alignment:"center"}],backgroundColor:"#f8fafc"});case"benefits":return(0,n.A)((0,n.A)({},a),{},{type:"benefits",headline:{id:oe(),content:ae("Discover the Benefits"),fontFamily:"Inter",fontSize:"36px",color:"#1f2937",tag:"h2"},description:{id:oe(),content:ae("Experience the unique advantages of our approach and discover how we help you achieve your goals with proven methods and personalized support."),fontFamily:"Inter",fontSize:"16px",color:"#4b5563",tag:"p"},button:{id:oe(),text:ae("Learn More"),url:"#",fontFamily:"Inter",backgroundColor:s.primaryColor,textColor:"#ffffff",size:"medium",alignment:"left"},buttonVisible:!0,image:{id:oe(),url:"https://images.unsplash.com/photo-1552664730-d307ca884978?w=800&q=80",alt:"Benefits illustration"},imagePosition:"right",backgroundColor:"#ffffff"});case"wellness-programs":return(0,n.A)((0,n.A)({},a),{},{type:"wellness-programs",sectionTitle:{id:oe(),content:ae("Wellness Programs"),fontFamily:"Inter",fontSize:"36px",color:"#1a1a1a",tag:"h2"},programs:[{id:oe(),image:{id:oe(),url:"https://images.unsplash.com/photo-1635545999375-057ee4013deb?w=600",alt:"Program"},title:{id:oe(),content:ae("Program Name"),fontFamily:"Inter",fontSize:"24px",color:"#1a1a1a",tag:"h3"},description:{id:oe(),content:ae("Program description"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"},duration:{id:oe(),content:"60 minutes",fontFamily:"Inter",fontSize:"14px",color:"#666666",tag:"p"},button:{id:oe(),text:ae("Learn More"),url:"#",fontFamily:"Inter",backgroundColor:s.primaryColor,textColor:"#ffffff",size:"medium",alignment:"left"},buttonVisible:!0}],backgroundColor:"#ffffff",columnsPerRow:3});case"business-team":return(0,n.A)((0,n.A)({},a),{},{type:"business-team",sectionTitle:{id:oe(),content:ae("Our Team"),fontFamily:"Inter",fontSize:"36px",color:"#1a1a1a",tag:"h2"},description:{id:oe(),content:ae("Meet our expert team members"),fontFamily:"Inter",fontSize:"18px",color:"#666666",tag:"p"},members:[{id:oe(),image:{id:oe(),url:"https://images.unsplash.com/photo-1574085727801-3992ff7ab11b?w=600",alt:"Team member"},name:{id:oe(),content:ae("Team Member"),fontFamily:"Inter",fontSize:"24px",color:"#1a1a1a",tag:"h3"},role:{id:oe(),content:ae("Position"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"},bio:{id:oe(),content:ae("Brief bio"),fontFamily:"Inter",fontSize:"14px",color:"#666666",tag:"p"}}],backgroundColor:"#ffffff"});case"coaching-packages":return(0,n.A)((0,n.A)({},a),{},{type:"coaching-packages",sectionTitle:{id:oe(),content:ae("Coaching Packages"),fontFamily:"Inter",fontSize:"36px",color:"#1a1a1a",tag:"h2"},description:{id:oe(),content:ae("Choose the package that fits your goals"),fontFamily:"Inter",fontSize:"18px",color:"#666666",tag:"p"},packages:[{id:oe(),name:{id:oe(),content:ae("Package Name"),fontFamily:"Inter",fontSize:"24px",color:"#1a1a1a",tag:"h3"},description:{id:oe(),content:ae("Package description"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"},sessions:{id:oe(),content:"4 Sessions",fontFamily:"Inter",fontSize:"18px",color:"#1a1a1a",tag:"p"}
1,price:{id:oe(),content:"$497",fontFamily:"Inter",fontSize:"32px",color:"#1a1a1a",tag:"p"},features:[{id:oe(),content:ae("Feature 1"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"}],button:{id:oe(),text:"Get Started",url:"#",fontFamily:"Inter",backgroundColor:s.primaryColor,textColor:"#ffffff",size:"medium"},highlighted:!1}],backgroundColor:"#ffffff"});case"member-benefits":return(0,n.A)((0,n.A)({},a),{},{type:"member-benefits",sectionTitle:{id:oe(),content:ae("Member Benefits"),fontFamily:"Inter",fontSize:"36px",color:"#1a1a1a",tag:"h2"},description:{id:oe(),content:ae("Discover what membership offers"),fontFamily:"Inter",fontSize:"18px",color:"#666666",tag:"p"},benefits:[{id:oe(),icon:{id:oe(),url:"https://images.unsplash.com/photo-1580849279061-0179c4ebf14e?w=400",alt:"Benefit"},title:{id:oe(),content:ae("Benefit Title"),fontFamily:"Inter",fontSize:"24px",color:"#1a1a1a",tag:"h3"},description:{id:oe(),content:ae("Benefit description"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"}}],backgroundColor:"#ffffff"});case"reservation-calendar":const t=[];for(let e=9;e<=17;e++)t.push({id:oe(),time:"".concat(e.toString().padStart(2,"0"),":00"),duration:60});return(0,n.A)((0,n.A)({},a),{},{type:"reservation-calendar",sectionTitle:{id:oe(),content:ae("Book an Appointment"),fontFamily:"Inter",fontSize:"36px",color:"#1a1a1a",tag:"h2"},description:{id:oe(),content:ae("Select a date and time for your appointment"),fontFamily:"Inter",fontSize:"18px",color:"#666666",tag:"p"},timeSlots:t,slotDuration:60,backgroundColor:"#f8fafc",calendarBackgroun
1dColor:"#ffffff",timeSlotBackgroundColor:"#f0f9ff",timeSlotTextColor:"#1e40af",headerTextColor:"#1a1a1a"});case"reviews":return(0,n.A)((0,n.A)({},a),{},{type:"reviews",title:{id:oe(),content:ae("What Our Customers Say"),fontFamily:"Inter",fontSize:"36px",color:"#1f2937",tag:"h2"},description:{id:oe(),content:ae("Read reviews from our satisfied customers"),fontFamily:"Inter",fontSize:"18px",color:"#6b7280",tag:"p"},module_id:"general",backgroundColor:"#ffffff",titleColor:"#1f2937",textColor:"#374151",buttonColor:"#2563eb",buttonTextColor:"#ffffff",layout:"cards"});case"newsletter":return(0,n.A)((0,n.A)({},a),{},{type:"newsletter",title:{id:oe(),content:ae("Stay Updated"),fontFamily:"Inter",fontSize:"36px",color:"#1f2937",tag:"h2"},description:{id:oe(),content:ae("Subscribe to our newsletter for the latest updates and exclusive offers"),fontFamily:"Inter",fontSize:"18px",color:"#6b7280",tag:"p"},submitButton:{id:oe(),text:ae("Subscribe"),url:"#",fontFamily:"Inter",backgroundColor:s.primaryColor,textColor:"#ffffff",size:"medium"},backgroundColor:"#f9fafb"});case"video":return(0,n.A)((0,n.A)({},a),{},{type:"video",sectionTitle:{id:oe(),content:ae("Watch Our Story"),fontFamily:"Inter",fontSize:"36px",color:"#1f2937",tag:"h2"},video:{id:oe(),sourceType:"none",autoplay:!1,muted:!0,loop:!1,controls:!0},description:{id:oe(),content:ae("Learn more about us through this video"),fontFamily:"Inter",fontSize:"18px",color:"#6b7280",tag:"p"},backgroundColor:"#ffffff",layout:"contained"});case"portfolio":return(0,n.A)((0,n.A)({},a),{},{type:"portfolio",sectionTitle:{id:oe(),content:ae("Our Portfolio"),fontFamily:"Inter",fontSize:"36px",color:"#1f2937",tag:"h2"},description:{id:oe(),content:ae("Explore our latest projects and work"),fontFamily:"Inter",fontSize:"18px",color:"#6b7280",tag:"p"},portfolioItems:[{id:oe(),image:{id:oe(),url:"https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=800",alt:"Portfolio project"},title:{id:oe(),content:ae("Project Title"),fontFamily:"Inter",fontSize:"20px",color:"#1f2937",tag:"h3"},description:{id:oe(),content:ae("Project description goes here"),fontFamily:"Inter",fontSize:"16px",color:"#6b7280",tag:"p"},category:{id:oe(),content:ae("Branding"),fontFamily:"Inter",fontSize:"12px",color:"#6b7280",tag:"span"},link:{id:oe(),text:ae("View Project"),url:"#",fontFamily:"Inter",backgroundColor:s.primaryColor,textColor:"#ffffff",size:"small"},linkVisible:!0}],backgroundColor:"#ffffff"});case"blog":return(0,n.A)((0,n.A)({},a),{},{type:"blog",sectionTitle:{id:oe(),content:{en:"Latest Blog Posts",fr:"Derniers articles"},fontFamily:"Inter",fontSize:"36px",color:"#1f2937",tag:"h2"},description:{id:oe(),content:{en:"Stay updated with our latest news and insights",fr:"Restez inform\xe9 avec nos derni\xe8res nouvelles et perspectives"},fontFamily:"Inter",fontSize:"18px",color:"#6b7280",tag:"p"},layout:"grid",postsToShow:6,showCategory:!0,showAuthor:!0,showReadTime:!0,showExcerpt:!0,viewAllButton:{id:oe(),text:{en:"View All Posts",fr:"Voir tous les articles"},url:"/blog",fontFamily:"Inter",backgroundColor:s.primaryColor,textColor:"#ffffff",size:"medium"},viewAllButtonVisible:!0,backgroundColor:"#ffffff"});case"shop":return(0,n.A)((0,n.A)({},a),{},{type:"shop",sectionTitle:{id:oe(),content:ae("Our Products"),fontFamily:"Inter",fontSize:"36px",color:"#1a1a1a",tag:"h2"},description:{id:oe(),content:ae("Browse our collection"),fontFamily:"Inter",fontSize:"18px",color:"#6b7280",tag:"p"},backgroundColor:"#ffffff",layout:"grid",columns:3,showFilters:!1,productsToShow:6,viewAllButton:{id:oe(),text:ae("View All Products"),url:"#",fontFamily:"Inter",backgroundColor:s.primaryColor,textColor:"#ffffff",size:"medium",alignment:"center"},viewAllButtonVisible:!0});case"slider":return(0,n.A)((0,n.A)({},a),{},{type:"slider",sectionTitle:{id:oe(),content:{en:"Our Gallery",fr:"Notre galerie"},fontFamily:"Inter",fontSize:"36px",color:"#1f2937",tag:"h2"},description:{id:oe(),content:{en:"Discover our work through these images",fr:"D\xe9couvrez notre travail \xe0 travers ces images"},fontFamily:"Inter",fontSize:"18px",color:"#6b7280",tag:"p"},slides:[{id:oe(),image:{id:oe(),url:"https://images.pexels.com/photos/3184291/pexels-photo-3184291.jpeg?auto=compress&cs=tinysrgb&w=1200",alt:"Slide image"},title:{id:oe(),content:{en:"Slide Title",fr:"Titre de la diapositive"},fontFamily:"Inter",fontSize:"32px",color:"#ffffff",tag:"h3"},description:{id:oe(),content:{en:"Slide description goes here",fr:"Description de la diapositive ici"},fontFamily:"Inter",fontSize:"18px",color:"#ffffff",tag:"p"}}],autoplay:!0,autoplayInterval:5e3,showNavigation:!0,showDots:!0,showCaptions:!0,transitionDuration:500,slideHeight:"500px",backgroundColor:"#ffffff"});case"iframe":return(0,n.A)((0,n.A)({},a),{},{type:"iframe",sectionTitle:{id:oe(),content:{en:"Embedded Content",fr:"Contenu int\xe9gr\xe9"},fontFamily:"Montserrat",fontSize:"2rem",color:"#1a1a2e",tag:"h2"},description:{id:oe(),content:{en:"Configure the URL in the properties panel to embed external
1content.",fr:"Configurez l'URL dans le panneau des propri\xe9t\xe9s pour int\xe9grer du contenu externe."},fontFamily:"Open Sans",fontSize:"1.125rem",color:"#6b7280",tag:"p"},iframeUrl:"",iframeHeight:"500px",iframeWidth:"100%",maxWidth:"1200px",allowFullscreen:!0,borderRadius:"8px",backgroundColor:"#ffffff"});case"custom-html":return(0,n.A)((0,n.A)({},a),{},{type:"custom-html",sectionTitle:void 0,htmlCode:"",containerMaxWidth:"1200px",containerPadding:"20px",backgroundColor:"#ffffff"});case"formations-catalogue":return(0,n.A)((0,n.A)({},a),{},{type:"formations-catalogue",sectionTitle:{id:oe(),content:ae("Our Training Programs"),fontFamily:"Inter",fontSize:"36px",color:"#1f2937",tag:"h2"},description:{id:oe(),content:ae("Explore our certified training programs"),fontFamily:"Inter",fontSize:"18px",color:"#6b7280",tag:"p"},maxFormations:6,showLevel:!0,showDuration:!0,showCertificate:!0,viewAllButton:{id:oe(),text:ae("View All Programs"),url:"/formations",fontFamily:"Inter",backgroundColor:s.primaryColor,textColor:"#ffffff",size:"medium"},viewAllButtonVisible:!0,backgroundColor:"#f9fafb",cardBackgroundColor:"#ffffff",titleColor:"#1f2937",textColor:"#6b7280"});case"sponsors":return(0,n.A)((0,n.A)({},a),{},{type:"sponsors",sectionTitle:{id:oe(),content:ae("Our Sponsors"),fontFamily:"Inter",fontSize:"36px",color:"#1f2937",tag:"h2"}
1,description:{id:oe(),content:ae("Thank you to our partners and sponsors"),fontFamily:"Inter",fontSize:"18px",color:"#6b7280",tag:"p"},sponsors:[{id:oe(),image:{id:oe(),url:"https://images.unsplash.com/photo-1599305445671-ac291c95aaa9?w=400&h=200&fit=crop",alt:"Sponsor logo"},name:{id:oe(),content:ae("Sponsor 1"),fontFamily:"Inter",fontSize:"14px",color:"#6b7280",tag:"span"},url:""},{id:oe(),image:{id:oe(),url:"https://images.unsplash.com/photo-1599305445671-ac291c95aaa9?w=400&h=200&fit=crop",alt:"Sponsor logo"},name:{id:oe(),content:ae("Sponsor 2"),fontFamily:"Inter",fontSize:"14px",color:"#6b7280",tag:"span"},url:""},{id:oe(),image:{id:oe(),url:"https://images.unsplash.com/photo-1599305445671-ac291c95aaa9?w=400&h=200&fit=crop",alt:"Sponsor logo"},name:{id:oe(),content:ae("Sponsor 3"),fontFamily:"Inter",fontSize:"14px",color:"#6b7280",tag:"span"},url:""},{id:oe(),image:{id:oe(),url:"https://images.unsplash.com/photo-1599305445671-ac291c95aaa9?w=400&h=200&fit=crop",alt:"Sponsor logo"},name:{id:oe(),content:ae("Sponsor 4"),fontFamily:"Inter",fontSize:"14px",color:"#6b7280",tag:"span"},url:""}],showNames:!0,columns:4,logoSize:80,grayscale:!1,backgroundColor:"#ffffff"});case"commandites":return(0,n.A)((0,n.A)({},a),{},{type:"commandites",sectionTitle:{id:oe(),content:{en:"Become a sponsor of our events",fr:"Devenez commanditaire de nos \xe9v\xe9nements"},fontFamily:"Inter",fontSize:"36px",color:"#143c4a",tag:"h2"},description:{id:oe(),content:{en:"Associate your business with the cooperative movement. Choose a visibility package and support our activities.",fr:"Associez votre entreprise au mouvement coop\xe9ratif. Choisissez un forfait de visibilit\xe9 et soutenez nos activit\xe9s."},fontFamily:"Inter",fontSize:"17px",color:"#64748b",tag:"p"},tenantSlug:"fecham",maxEvents:6,showWall:!0,showVideo:!0,ctaColor:"#e8852a",backgroundColor:"#f7fafb",cardBackgroundColor:"#ffffff",titleColor:"#143c4a",textColor:"#5b6b74"});case"agent-cadeaux":{const e="Fraunces",t=function(e,t,o,s,a){let r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return(0,n.A)({id:oe(),content:{fr:e,en:t},fontFamily:"Inter",fontSize:o,color:s,tag:a},r)},o=(e,o)=>t(e,o,"14px","#1E2B2A","span");return(0,n.A)((0,n.A)({},a),{},{type:"agent-cadeaux",variante:"complete",surtitre:t("Votre assistant cadeaux","Your gift assistant","13px","#8A3B16","span",{fontWeight:"600",textAlign:"center"}),sectionTitle:t("Pour qui cherchez-vous un cadeau ?","Who are you looking for a gift for?","56px","#1E2B2A","h1",{fontFamily:e,fontWeight:"600",textAlign:"center"}),intro:t("D\xe9crivez la personne en quelques mots. Je vous propose des id\xe9es trouv\xe9es chez des boutiques d'ici, avec leur vrai prix.","Describe the person in a few words. I suggest ideas found in local shops, with their real price.","18px","#45524F","p",{textAlign:"center"}),accueil:t("Bonjour ! Pour qui est le cadeau ? Dites-moi aussi votre budget et l'occasion si vous les connaissez.","Hello! Who is the gift for? Tell me your budget and the occasion too, if you know them.","16px","#1E2B2A","p"),champ:t("Ex. : ma s\u0153ur qui adore le th\xe9, environ 40 $","E.g.: my sister who loves tea, about $40","16px","#1E2B2A","span"),bouton:{id:oe(),text:{fr:"Trouver des id\xe9es",en:"Find ideas"},url:"",fontFamily:"Inter",backgroundColor:"#0F5F59",textColor:"#ffffff",size:"medium"},pourCommencer:t("Pour commencer :","To start:","14px","#55615F","span"),boutonsDepart:[o("Pour maman","For mom"),o("Pour papa","For dad"),o("Moins de 50 $","Under $50"),o("Fait au Qu\xe9bec","Made in Quebec"),o("Cadeau d'h\xf4tesse","Hostess gift")],confiance:t("L'assistant ne propose que des produits de notre catalogue, au prix affich\xe9 par le marchand.","The assistant only suggests products from our catalogue, at the price shown by the merchant.","13px","#55615F","p",{textAlign:"center"}),titreCompact:t("Pas trouv\xe9 ?","Not found?","28px","#ffffff","h2",{fontFamily:e,fontWeight:"600"}),introCompact:t("Demandez \xe0 notre assistant. D\xe9crivez la personne, il vous propose des id\xe9es du catalogue.","Ask our assistant. Describe the person, it suggests ideas from the catalogue.","16px","#D6EAE6","p"),champCompact:t("Ex. : il aime la p\xeache et les bons caf\xe9s","E.g.: he likes fishing and good coffee","16px","#1E2B2A","span"),boutonCompact:{id:oe(),text:{fr:"Demander",en:"Ask"},url:"",fontFamily:"Inter",backgroundColor:"#FBEFE4",textColor:"#7A3212",size:"medium"},accentColor:"#0F5F59",backgroundColor:"#F3EBDF"})}case"catalogue-produits":{const e="Fraunces";return(0,n.A)((0,n.A)({},a),{},{type:"catalogue-produits",sectionTitle:{id:oe(),content:{fr:"Coups de c\u0153ur",en:"Favourites"},fontFamily:e,fontSize:"36px",color:"#1E2B2A",tag:"h2",fontWeight:"600"},description:{id:oe(),content:{fr:"Choisis chez des artisans et des boutiques du Qu\xe9bec.",en:"Picked from Quebec artisans and shops."},fontFamily:"Inter",fontSize:"15px",color:"#55615F",tag:"p"},lienTout:{id:oe(),text:{fr:"Voir toutes les id\xe9es",en:"See all ideas"},url:"",fontFamily:"Inter",backgroundColor:"transparent",textColor:"#0F5F59",size:"medium"},piedDeSection:{id:oe(),content:{fr:"Liens affili\xe9s : {site} touche une commission sur certains achats, sans frais pour vous.",en:"Affiliate links: {site} earns a commission on some purchases, at no cost to you."},fontFamily:"Inter",fontSize:"13px",color:"#55615F",tag:"p"},source:"coups_de_coeur",nombreProduits:4,afficherPrix:!0,afficherCodePromo:!0,accentColor:"#0F5F59",backgroundColor:"#FBF7F1"})}case"boutiques-partenaires":{const e="Fraunces";return(0,n.A)((0,n.A)({},a),{},{type:"boutiques-partenaires",sectionTitle:{id:oe(),content:{fr:"Boutiques qu\xe9b\xe9coises",en:"Quebec shops"},fontFamily:e,fontSize:"36px",color:"#ffffff",tag:"h2",fontWeight:"600"},description:{id:oe(),content:{fr:"Chaque id\xe9e vient d'une boutique d'ici. Quand vous achetez, c'est elle que vous encouragez.",en:"Every idea comes from a local shop. When you buy, you support it."},fontFamily:"Inter",fontSize:"16px",color:"#D6EAE6",tag:"p"},bouton:{id:oe(),text:{fr:"D\xe9couvrir les boutiques",en:"Discover the shops"},url:"",fontFamily:"Inter",backgroundColor:"#ffffff",textColor:"#0F5F59",size:"medium"},backgroundColor:"#0F5F59"})}default:throw new Error("Section type not recognized: ".concat(e))}}function le(e,t){var o,s;if(e.type!==t.type)return t;const a=(0,n.A)({},t);switch(e.type){case"hero":const t=e,r=a;return r.headline=(0,n.A)((0,n.A)({},r.headline),{},{content:t.headline.content}),r.subheadline=(0,n.A)((0,n.A)({},r.subheadline),{},{content:t.subheadline.content}),t.backgroundImage&&r.backgroundImage&&(r.backgroundImage=(0,n.A)((0,n.A)({},r.backgroundImage),{},{url:t.backgroundImage.url,alt:t.backgroundImage.alt})),t.heroStyle&&(r.heroStyle=t.heroStyle),t.buttons.forEach((e,t)=>{r.buttons[t]&&(r.buttons[t]=(0,n.A)((0,n.A)({},r.buttons[t]),{},{text:e.text,url:e.url}))}),r;case"features":const i=e,l=a;return l.sectionTitle=(0,n.A)((0,n.A)({},l.sectionTitle),{},{content:i.sectionTitle.content}
1),i.features.forEach((e,t)=>{l.features[t]&&(l.features[t].title=(0,n.A)((0,n.A)({},l.features[t].title),{},{content:e.title.content}),l.features[t].description=(0,n.A)((0,n.A)({},l.features[t].description),{},{content:e.description.content}),l.features[t].icon=(0,n.A)((0,n.A)({},l.features[t].icon),{},{url:e.icon.url}))}),l;case"services":const c=e,d=a;return d.sectionTitle=(0,n.A)((0,n.A)({},d.sectionTitle),{},{content:c.sectionTitle.content}),c.services.forEach((e,t)=>{d.services[t]&&(d.services[t].title=(0,n.A)((0,n.A)({},d.services[t].title),{},{content:e.title.content}),d.services[t].description=(0,n.A)((0,n.A)({},d.services[t].description),{},{content:e.description.content}),d.services[t].image=(0,n.A)((0,n.A)({},d.services[t].image),{},{url:e.image.url}),e.button&&d.services[t].button&&(d.services[t].button=(0,n.A)((0,n.A)({},d.services[t].button),{},{text:e.button.text,url:e.button.url})))}),d;case"testimonials":const u=e,m=a;return m.sectionTitle=(0,n.A)((0,n.A)({},m.sectionTitle),{},{content:u.sectionTitle.content}),u.testimonials.forEach((e,t)=>{m.testimonials[t]&&(m.testimonials[t].quote=(0,n.A)((0,n.A)({},m.testimonials[t].quote),{},{content:e.quote.content}),m.testimonials[t].author=(0,n.A)((0,n.A)({},m.testimonials[t].author),{},{content:e.author.content}),m.testimonials[t].role=(0,n.A)((0,n.A)({},m.testimonials[t].role),{},{content:e.role.content}))}),m;case"pricing":const p=e,g=a;return g.sectionTitle=(0,n.A)((0,n.A)({},g.sectionTitle),{},{content:p.sectionTitle.content}),g.description=(0,n.A)((0,n.A)({},g.description),{},{content:p.description.content}),p.tiers.forEach((e,t)=>{g.tiers[t]&&(g.tiers[t].name=(0,n.A)((0,n.A)({},g.tiers[t].name),{},{content:e.name.content}),g.tiers[t].price=(0,n.A)((0,n.A)({},g.tiers[t].price),{},{content:e.price.content}),g.tiers[t].button=(0,n.A)((0,n.A)({},g.tiers[t].button),{},{text:e.button.text,url:e.button.url}))}),g;case"contact":const h=e,f=a;return f.headline=(0,n.A)((0,n.A)({},f.headline),{},{content:h.headline.content}),f.description=(0,n.A)((0,n.A)({},f.description),{},{content:h.description.content}),h.buttons.forEach((e,t)=>{f.buttons[t]&&(f.buttons[t]=(0,n.A)((0,n.A)({},f.buttons[t]),{},{text:e.text,url:e.url}))}),f;case"benefits":const x=e,b=a;return b.headline=(0,n.A)((0,n.A)({},b.headline),{},{content:x.headline.content}),b.description=(0,n.A)((0,n.A)({},b.description),{},{content:x.description.content}),x.image&&(b.image=(0,n.A)({},x.image)),x.button&&b.button&&(b.button=(0,n.A)((0,n.A)({},b.button),{},{text:x.button.text,url:x.button.url})),x.imagePosition&&(b.imagePosition=x.imagePosition),b;case"reviews":const y=e,v=a;return console.log("[mapSectionContent-reviews] Source title.content:",y.title.content),console.log("[mapSectionContent-reviews] Target title.content BEFORE:",v.title.content),v.title=(0,n.A)((0,n.A)({},v.title),{},{content:y.title.content}),v.description=(0,n.A)((0,n.A)({},v.description),{},{content:y.description.content}),console.log("[mapSectionContent-reviews] Target title.content AFTER:",v.title.content),v;case"newsletter":const j=e,N=a;return console.log("[mapSectionContent-newsletter] Source title.content:",j.title.content),console.log("[mapSectionContent-newsletter] Source description.content:",null===(o=j.description)||void 0===o?void 0:o.content),console.log("[mapSectionContent-newsletter] Source button.text:",j.submitButton.text),console.log("[mapSectionContent-newsletter] Target title.content BEFORE:",N.title.content),N.title=(0,n.A)((0,n.A)({},N.title),{},{content:j.title.content}),j.description&&N.description&&(N.description=(0,n.A)((0,n.A)({},N.description),{},{content:j.description.content})),N.submitButton=(0,n.A)((0,n.A)({},N.submitButton),{},{text:j.submitButton.text}),console.log("[mapSectionContent-newsletter] Target title.content AFTER:",N.title.content),console.log("[mapSectionContent-newsletter] Target description.content AFTER:",null===(s=N.description)||void 0===s?void 0:s.content),console.log("[mapSectionContent-newsletter] Target button.text AFTER:",N.submitButton.text),N;case"video":const w=e,C=a;return w.sectionTitle&&C.sectionTitle&&(C.sectionTitle=(0,n.A)((0,n.A)({},C.sectionTitle),{},{content:w.sectionTitle.content})),w.description&&C.description&&(C.description=(0,n.A)((0,n.A)({},C.description),{},{content:w.description.content})),C.video=(0,n.A)({},w.video),C.layout=w.layout,C.backgroundColor=w.backgroundColor,C;case"portfolio":const S=e,A=a;
1return A.sectionTitle=(0,n.A)((0,n.A)({},A.sectionTitle),{},{content:S.sectionTitle.content}),S.description&&A.description&&(A.description=(0,n.A)((0,n.A)({},A.description),{},{content:S.description.content})),S.portfolioItems.forEach((e,t)=>{A.portfolioItems[t]&&(A.portfolioItems[t].title=(0,n.A)((0,n.A)({},A.portfolioItems[t].title),{},{content:e.title.content}),A.portfolioItems[t].description=(0,n.A)((0,n.A)({},A.portfolioItems[t].description),{},{content:e.description.content}),A.portfolioItems[t].image=(0,n.A)((0,n.A)({},A.portfolioItems[t].image),{},{url:e.image.url,alt:e.image.alt}),e.category&&A.portfolioItems[t].category&&(A.portfolioItems[t].category=(0,n.A)((0,n.A)({},A.portfolioItems[t].category),{},{content:e.category.content})),e.link&&A.portfolioItems[t].link&&(A.portfolioItems[t].link=(0,n.A)((0,n.A)({},A.portfolioItems[t].link),{},{text:e.link.text,url:e.link.url})))}),A;case"blog":const k=e,I=a;return I.sectionTitle=(0,n.A)((0,n.A)({},I.sectionTitle),{},{content:k.sectionTitle.content}),k.description&&I.description&&(I.description=(0,n.A)((0,n.A)({},I.description),{},{content:k.description.content})),I.layout=k.layout,I.postsToShow=k.postsToShow,I.showCategory=k.showCategory,I.showAuthor=k.showAuthor,I.showReadTime=k.showReadTime,I.showExcerpt=k.showExcerpt,I.viewAllButtonVisible=k.viewAllButtonVisible,k.viewAllButton&&I.viewAllButton&&(I.viewAllButton=(0,n.A)((0,n.A)({},I.viewAllButton),{},{text:k.viewAllButton.text,url:k.viewAllButton.url})),I;case"shop":const T=e,z=a;return z.sectionTitle=(0,n.A)((0,n.A)({},z.sectionTitle),{},{content:T.sectionTitle.content}),T.description&&z.description&&(z.description=(0,n.A)((0,n.A)({},z.description),{},{content:T.description.content})),z.layout=T.layout,z.columns=T.columns,z.showFilters=T.showFilters,z.productsToShow=T.productsToShow,void 0!==T.viewAllButtonVisible&&(z.viewAllButtonVisible=T.viewAllButtonVisible),T.viewAllButton&&z.viewAllButton&&(z.viewAllButton=(0,n.A)((0,n.A)({},z.viewAllButton),{},{text:T.viewAllButton.text,url:T.viewAllButton.url})),z;case"agent-cadeaux":case"catalogue-produits":case"boutiques-partenaires":return function(e,t){const o=e=>e&&"object"===typeof e&&!Array.isArray(e)&&"string"===typeof e.id&&("content"in e||"text"in e),s=(0,n.A)({},t);return Object.keys(t).forEach(a=>{if("id"===a||"type"===a||"order"===a)return;const r=e?e[a]:void 0;if(void 0===r||null===r)return;const i=t[a];o(i)?o(r)&&(s[a]=(0,n.A)((0,n.A)((0,n.A)({},i),r),{},{id:i.id})):Array.isArray(i)?Array.isArray(r)&&(s[a]=r.filter(e=>o(e)).map(e=>(0,n.A)((0,n.A)((0,n.A)({},i[0]||{}),e),{},{id:oe()}))):typeof i===typeof r&&(s[a]=r)}),["categorie","categorieId","marchandId","marchandNom","menuLabel"].forEach(t=>{e&&void 0!==e[t]&&void 0===s[t]&&(s[t]=e[t])}),s}(e,a)}return a}function ce(e,t){var o,n;const s=e=>(null===e||void 0===e?void 0:e.id)===t?{element:e,type:"text"}:null,a=e=>(null===e||void 0===e?void 0:e.id)===t?{element:e,type:"button"}:null,r=e=>(null===e||void 0===e?void 0:e.id)===t?{element:e,type:"image"}:null;switch(e.type){case"hero":const t=e;return s(t.headline)||s(t.subheadline)||(null===(o=t.buttons)||void 0===o?void 0:o.map(a).find(e=>e))||(t.backgroundImage?r(t.backgroundImage):null)||null;case"features":const i=e,l=s(i.sectionTitle);if(l)return l;for(const e of i.features){const t=r(e.icon)||s(e.title)||s(e.description);if(t)return t}return null;case"services":const c=e,d=s(c.sectionTitle);if(d)return d;for(const e of c.services){const t=r(e.image)||s(e.title)||s(e.description)||(e.button?a(e.button):null);if(t)return t}return null;case"testimonials":const u=e,m=s(u.sectionTitle);if(m)return m;for(const e of u.testimonials){const t=s(e.quote)||s(e.author)||s(e.role)||(e.avatar?r(e.avatar):null);if(t)return t}return null;case"pricing":const p=e,g=s(p.sectionTitle)||s(p.description);if(g)return g;for(const e of p.tiers){const t=s(e.name)||s(e.price)||a(e.button);if(t)return t;for(const o of e.features){const e=s(o);if(e)return e}}return null;case"contact":const h=e;return s(h.headline)||s(h.sectionTitle)||s(h.description)||(null===(n=h.buttons)||void 0===n?void 0:n.map(a).find(e=>e))||null;case"benefits":const f=e;return s(f.headline)||s(f.description)||r(f.image)||(f.button?a(f.button):null)||null;
1case"wellness-programs":const x=e,b=s(x.sectionTitle);if(b)return b;for(const e of x.programs){const t=r(e.image)||s(e.title)||s(e.description)||s(e.duration)||(e.button?a(e.button):null);if(t)return t}return null;case"business-team":const y=e,v=s(y.sectionTitle)||s(y.description);if(v)return v;for(const e of y.members){const t=r(e.image)||s(e.name)||s(e.role)||s(e.bio);if(t)return t}return null;case"coaching-packages":const j=e,N=s(j.sectionTitle)||s(j.description);if(N)return N;for(const e of j.packages){const t=s(e.name)||s(e.description)||s(e.sessions)||s(e.price)||a(e.button);if(t)return t;for(const o of e.features){const e=s(o);if(e)return e}}return null;case"member-benefits":const w=e,C=s(w.sectionTitle)||s(w.description);if(C)return C;for(const e of w.benefits){const t=r(e.icon)||s(e.title)||s(e.description);if(t)return t}return null;case"reservation-calendar":const S=e;return s(S.sectionTitle)||s(S.description)||null;case"reviews":const A=e;return s(A.title)||s(A.description)||null;case"newsletter":const k=e;return s(k.title)||(k.description?s(k.description):null)||a(k.submitButton)||null;case"video":const I=e;return(I.sectionTitle?s(I.sectionTitle):null)||(I.description?s(I.description):null)||null;case"portfolio":const T=e,z=s(T.sectionTitle)||(T.description?s(T.description):null);if(z)return z;for(const e of T.portfolioItems){const t=r(e.image)||s(e.title)||s(e.description)||(e.category?s(e.category):null)||(e.link?a(e.link):null);if(t)return t}return null;case"blog":const F=e;return s(F.sectionTitle)||(F.description?s(F.description):null)||(F.viewAllButton?a(F.viewAllButton):null)||null;case"shop":const M=e;return s(M.sectionTitle)||(M.description?s(M.description):null)||(M.viewAllButton?a(M.viewAllButton):null)||null;case"slider":const P=e,B=(P.sectionTitle?s(P.sectionTitle):null)||(P.description?s(P.description):null);if(B)return B;for(const e of P.slides){const t=r(e.image)||(e.title?s(e.title):null)||(e.description?s(e.description):null)||(e.link?a(e.link):null);if(t)return t}return null;case"iframe":const E=e;return(E.sectionTitle?s(E.sectionTitle):null)||(E.description?s(E.description):null)||null;case"custom-html":const D=e;return(D.sectionTitle?s(D.sectionTitle):null)||null;case"formations-catalogue":const L=e;return s(L.sectionTitle)||(L.description?s(L.description):null)||(L.viewAllButton?a(L.viewAllButton):null)||null;case"sponsors":const H=e,R=s(H.sectionTitle)||(H.description?s(H.description):null);if(R)return R;for(const e of H.sponsors){const t=r(e.image)||s(e.name);if(t)return t}return null;case"commandites":{const t=e;return s(t.sectionTitle)||(t.description?s(t.description):null)||null}case"agent-cadeaux":{const t=e;return s(t.surtitre)||s(t.sectionTitle)||s(t.intro)||s(t.accueil)||s(t.champ)||a(t.bouton)||s(t.pourCommencer)||(t.boutonsDepart||[]).map(s).find(e=>e)||s(t.confiance)||s(t.titreCompact)||s(t.introCompact)||s(t.champCompact)||a(t.boutonCompact)||null}case"catalogue-produits":{const t=e;return s(t.sectionTitle)||s(t.description)||a(t.lienTout)||s(t.piedDeSection)||null}case"boutiques-partenaires":{const t=e;return s(t.sectionTitle)||s(t.description)||a(t.bouton)||null}}return null}function de(e,t){if(!t)return e;const o=["fontFamily","fontSize","color","tag","fontWeight","fontStyle","textAlign","textDecoration"],s=(0,n.A)({},e),a=t;for(const n of o)void 0!==a[n]&&null!==a[n]&&""!==a[n]&&(s[n]=a[n]);return s}function ue(e){switch(e.type){case"testimonials":return e.testimonials.length;case"pricing":return e.tiers.length;case"services":return e.services.length;case"wellness-programs":return e.programs.length;case"features":return e.features.length;case"business-team":return e.members.length;case"coaching-packages":return e.packages.length;case"member-benefits":return e.benefits.length;case"portfolio":return e.portfolioItems.length;case"slider":return e.slides.length;case"sponsors":return e.sponsors.length;default:return 0}}function me(e){return["testimonials","pricing","services","wellness-programs","features","business-team","coaching-packages","member-benefits","portfolio","slider","sponsors"].includes(e)}function pe(e){return{testimonials:"Testimonial",pricing:"Price Tier",services:"Service","wellness-
1programs":"Program",features:"Feature","business-team":"Team Member","coaching-packages":"Package","member-benefits":"Benefit",portfolio:"Portfolio Item",slider:"Slide",sponsors:"Sponsor"}[e]||"Item"}function ge(e,t){if("shop"!==e.type)return e;const o=e;if(o.viewAllButton)return o;const s=se(t);return(0,n.A)((0,n.A)({},o),{},{viewAllButton:{id:oe(),text:{en:"View All Products",fr:"Voir tous les produits"},url:"#",fontFamily:"Inter",backgroundColor:s.primaryColor,textColor:"#ffffff",size:"medium",alignment:"center"},viewAllButtonVisible:!1!==o.viewAllButtonVisible})}var he=o(20073),fe=o(42489),xe=o(14918),be=o(68236),ye=o(23165),ve=o(31130),je=o(56095),Ne=o(13190),we=o(44919),Ce=o(85347),Se=o(7118),Ae=o(33033),ke=o(75088),Ie=o(41680),Te=o(63172),ze=o(46963),Fe=o(81885),Me=o(33005),Pe=o(11827),Be=o(53512),Ee=o(7365),De=o(35327),Le=o(91286),He=o(42574),Re=o(19233),Oe=o(35746),_e=o(10629),Ue=o(7899),qe=o(30441),Ve=o(247),We=o(9333),Ge=o(70067),Je=o(19829),Xe=o(64830),Ye=o(43677),Ze=o(52414),$e=o(99757),Qe=o(51419),Ke=o(87095),et=o(81990),tt=o(23946),ot=o(29350),nt=o(44285),st=o(86376),at=o(87147),rt=o(73782),it=o(17186),lt=o(57922),ct=o(89476),dt=o(28006),ut=o(72782),mt=o(23658),pt=o(39292),gt=o(65727),ht=o(50797),ft=o(25040),xt=o(95258),bt=o(2580),yt=o(26533),vt=o(88693),jt=o(50516),Nt=o(87655),wt=o(36401),Ct=o(71482),St=o(22626),At=o(61161),kt=o(97666),It=o(27940),Tt=o(10562),zt=o(91720),Ft=o(85367),Mt=o(16784),Pt=o(56804),Bt=o(72494),Et=o(22754),Dt=o(25435),Lt=o(20254),Ht=o(75089);const Rt=["Popular","Business","Technology","Communication","Media","Shopping","Finance","Health","Travel","Other"],Ot=[{id:"zap",name:"Lightning",component:he.A,category:"Popular"},{id:"shield",name:"Shield",component:fe.A,category:"Popular"},{id:"heart",name:"Heart",component:xe.A,category:"Popular"},{id:"star",name:"Star",component:Q.A,category:"Popular"},{id:"sparkles",name:"Sparkles",component:P.A,category:"Popular"},{id:"rocket",name:"Rocket",component:be.A,category:"Popular"},{id:"target",name:"Target",component:ye.A,category:"Popular"},{id:"trophy",name:"Trophy",component:ve.A,category:"Popular"},{id:"check-circle",name:"Check Circle",component:R.A,category:"Popular"},{id:"thumbs-up",name:"Thumbs Up",component:je.A,category:"Popular"},{id:"briefcase",name:"Briefcase",component:Ne.A,category:"Business"},{id:"trending-up",name:"Trending Up",component:we.A,category:"Business"},{id:"award",name:"Award",component:Ce.A,category:"Business"},{id:"users",name:"Users",component:Se.A,category:"Business"},{id:"pie-chart",name:"Pie Chart",component:Ae.A,category:"Business"},{id:"calendar",name:"Calendar",component:H.A,category:"Business"},{id:"clock",name:"Clock",component:ke.A,category:"Business"},{id:"file-text",name:"File Text",component:Ie.A,category:"Business"},{id:"code",name:"Code",component:Y.A,category:"Technology"},{id:"monitor",name:"Monitor",component:Te.A,category:"Technology"},{id:"smartphone",name:"Smartphone",component:ze.A,category:"Technology"},{id:"wifi",name:"WiFi",component:Fe.A,category:"Technology"},{id:"database",name:"Database",component:Me.A,category:"Technology"},{id:"cloud",name:"Cloud",component:Pe.A,category:"Technology"},{id:"terminal",name:"Terminal",component:Be.A,category:"Technology"},{id:"settings",name:"Settings",component:Ee.A,category:"Technology"},{id:"mail",name:"Mail",component:De.A,category:"Communication"},{id:"phone",name:"Phone",component:Le.A,category:"Communication"},{id:"message-circle",name:"Message",component:He.A,category:"Communication"},{id:"bell",name:"Bell",component:Re.A,category:"Communication"},{id:"send",name:"Send",component:Oe.A,category:"Communication"},{id:"mic",name:"Microphone",component:_e.A,category:"Communication"},{id:"headphones",name:"Headphones",component:Ue.A,category:"Communication"},{id:"share",name:"Share",component:qe.A,category:"Communication"},{id:"camera",name:"Camera",component:Ve.A,category:"Media"},{id:"video",name:"Video",component:We.A,category:"Media"},{id:"image",name:"Image",component:Ge.A,category:"Media"},{id:"music",name:"Music",component:Je.A,category:"Media"},{id:"play",name:"Play",component:Xe.A,category:"Media"},{id:"volume",name:"Volume",component:Ye.A,category:"Media"},{id:"tv",name:"TV",component:Ze.A,category:"Media"},{id:"radio",name:"Radio",component:$e.A,category:"Media"},{id:"shopping-cart",name:"Shopping Cart",component:Qe.A,category:"Shopping"},{id:"shopping-bag",name:"Shopping Bag",component:Ke.A,category:"Shopping"},{id:"package",name:"Package",component:et.A,category:"Shopping"},{id:"gift",name:"Gift",component:tt.A,category:"Shopping"},{id:"tag",name:"Tag",component:ot.A,category:"Shopping"},{id:"truck",name:"Truck",component:nt.A,category:"Shopping"},{id:"dollar-sign",name:"Dollar",component:$.A,category:"Finance"},{id:"credit-card",name:"Credit Card",component:st.A,category:"Finance"},{id:"percent",name:"Percent",component:at.A,category:"Finance"},{id:"trending-down",name:"Trending Down",component:rt.A,category:"Finance"},{id:"life-buoy",name:"Life Buoy",component:it.A,category:"Health"},{id:"smile",name:"Smile",component:lt.A,category:"Health"},{id:"umbrella",name:"Umbrella",component:ct.A,category:"Health"},{id:"map-pin",name:"Map Pin",component:dt.A,category:"Travel"},{id:"globe",name:"Globe",component:z.A,category:"Travel"},{id:"compass",name:"Compass",component:ut.A,category:"Travel"},{id:"home",name:"Home",component:mt.A,category:"Other"},{id:"search",name:"Search",component:pt.A,category:"Other"},{id:"lock",name:"Lock",component:gt.A,category:"Other"}
1,{id:"unlock",name:"Unlock",component:gt.A,category:"Other"},{id:"eye",name:"Eye",component:b.A,category:"Other"},{id:"download",name:"Download",component:T.A,category:"Other"},{id:"upload",name:"Upload",component:ht.A,category:"Other"},{id:"link",name:"Link",component:ft.A,category:"Other"},{id:"layers",name:"Layers",component:xt.A,category:"Other"},{id:"filter",name:"Filter",component:bt.A,category:"Other"},{id:"edit",name:"Edit",component:yt.A,category:"Other"},{id:"save",name:"Save",component:vt.A,category:"Other"},{id:"refresh",name:"Refresh",component:jt.A,category:"Other"},{id:"power",name:"Power",component:Nt.A,category:"Other"},{id:"wrench",name:"Wrench",component:wt.A,category:"Other"},{id:"flag",name:"Flag",component:Ct.A,category:"Other"},{id:"book-open",name:"Book",component:St.A,category:"Other"},{id:"lightbulb",name:"Light Bulb",component:At.A,category:"Other"},{id:"help-circle",name:"Help",component:kt.A,category:"Other"},{id:"sun",name:"Sun",component:It.A,category:"Other"},{id:"wind",name:"Wind",component:Tt.A,category:"Other"},{id:"coffee",name:"Coffee",component:zt.A,category:"Other"},{id:"box",name:"Box",component:Ft.A,category:"Other"},{id:"folder",name:"Folder",component:Mt.A,category:"Other"},{id:"hash",name:"Hash",component:Pt.A,category:"Other"},{id:"paperclip",name:"Paperclip",component:Bt.A,category:"Other"},{id:"printer",name:"Printer",component:Et.A,category:"Other"},{id:"speaker",name:"Speaker",component:Dt.A,category:"Other"},{id:"user-check",name:"User Check",component:Lt.A,category:"Other"},{id:"watch",name:"Watch",component:Ht.A,category:"Other"}];var _t=o(56328),Ut=o(91048);function qt(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/\s+/g," ").trim()}function Vt(e){let{section:t,langueInterface:o,contentLanguage:s,onUpdate:r}=e;const l="fr"===o,c=t.source||"coups_de_coeur",[d,u]=(0,a.useState)(null),[m,p]=(0,a.useState)(!1);(0,a.useEffect)(()=>{if("marchand"!==c||null!==d)return;let e=!1,t=null;try{t=localStorage.getItem("token")}catch(o){t=null}return i.A.get("".concat(te.n,"/client/catalogue-affilies/marchands"),{headers:t?{Authorization:"Bearer ".concat(t)}:{}}).then(t=>{if(e)return;const o=t.data,n=Array.isArray(o)?o:Array.isArray(null===o||void 0===o?void 0:o.marchands)?o.marchands:[];u(n.filter(e=>e&&"string"===typeof e.id))}).catch(()=>{e||(p(!0),u([]))}),()=>{e=!0}},[c,d]);const[g,h]=(0,a.useState)(null);(0,a.useEffect)(()=>{if("categorie"!==c||null!==g)return;let e=!1,t=null;try{t=localStorage.getItem("token")}catch(o){t=null}return i.A.get("".concat(te.n,"/client/catalogue-affilies/categories"),{headers:t?{Authorization:"Bearer ".concat(t)}:{}}).then(t=>{var o;if(e)return;const n=Array.isArray(null===(o=t.data)||void 0===o?void 0:o.categories)?t.data.categories:[];h(n.filter(e=>e&&"string"===typeof e.id))}).catch(()=>{e||h([])}),()=>{e=!0}},[c,g]);const f=(()=>{if(t.categorieId)return t.categorieId;const e=t.categorie||"";if(!e||Ut.nY.includes(e))return e;for(const t of g||[]){if(qt(t.nom)===qt(e))return t.id;for(const o of t.sous_categories||[])if(qt(o.nom)===qt(e))return o.id}return e})(),x=t.sectionTitle,b=x?(0,Ut.QZ)((0,C._A)(x.content,s)||""):"",y=(e,t)=>(0,S.jsx)("button",{type:"button",onClick:()=>r({source:e}),className:"flex-1 px-2 py-2 rounded-lg border text-xs transition-colors ".concat(c===e?"border-blue-600 bg-blue-50 text-blue-700 border-2":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"),children:t});return(0,S.jsxs)("div",{className:"border-t pt-4 space-y-4",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,S.jsx)(ee.A,{className:"w-4 h-4 text-teal-700"}),(0,S.jsx)("h4",{className:"text-sm font-semibold",children:l?"Param\xe8tres des produits":"Product settings"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:l?"Titre de la section":"Section title"}),(0,S.jsx)("input",{type:"text",value:b,onChange:e=>(e=>{if(!x)return;const t="object"===typeof x.content&&x.content?x.content:{fr:"",en:""};r({sectionTitle:(0,n.A)((0,n.A)({},x),{},{content:(0,n.A)((0,n.A)({},t),{},{[s]:e})})})})(e.target.value),className:"w-full p-2 border rounded-lg text-sm"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:l?"Produits \xe0 montrer":"Products to show"}),(0,S.jsxs)("div",{className:"flex gap-2",children:[y("coups_de_coeur",l?"Coups de c\u0153ur":"Favourites"),y("categorie",l?"Une cat\xe9gorie":"A category"),y("marchand",l?"Un marchand":"A merchant")]})]}),"categorie"===c&&(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:l?"Cat\xe9gorie":"Category"}),(0,S.jsxs)("select",{value:f,disabled:null===g,onChange:e=>(e=>{if(Ut.nY.includes(e)||!e)return void r({categorieId:"",categorie:e});let t="";for(const o of g||[]){o.id===e&&(t=o.nom);for(const n of o.sous_categories||[])n.id===e&&(t=n.nom)}r({categorieId:e,categorie:t})})(e.target.value),className:"w-full border rounded-lg px-3 py-2 text-sm",children:[(0,S.jsx)("option",{value:"",children:l?"Choisissez une cat\xe9gorie":"Choose a category"}),(g||[]).map(e=>(0,S.jsxs)("optgroup",{label:e.nom,children:[(0,S.jsx)("option",{value:e.id,children:e.nom}),(e.sous_categories||[]).map(e=>(0,S.jsx)("option",{value:e.id,children:e.nom},e.id))]},e.id)),(0,S.jsx)("optgroup",{label:"Budget",children:Ut.nY.map(e=>(0,S.jsx)("option",{value:e,children:e},e))})]})]}),"marchand"===c&&(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:l?"Marchand":"Merchant"}),(0,S.jsxs)("select",{value:t.marchandId||"",disabled:null===d,onChange:e=>{const t=(d||[]).find(t=>
1t.id===e.target.value);r({marchandId:e.target.value,marchandNom:(null===t||void 0===t?void 0:t.nom)||""})},className:"w-full border rounded-lg px-3 py-2 text-sm",children:[(0,S.jsx)("option",{value:"",children:null===d?l?"Chargement des marchands\u2026":"Loading merchants\u2026":l?"Choisissez un marchand":"Choose a merchant"}),(d||[]).map(e=>(0,S.jsx)("option",{value:e.id,children:e.nom||e.id},e.id)),t.marchandId&&null!==d&&!(d||[]).some(e=>e.id===t.marchandId)&&(0,S.jsx)("option",{value:t.marchandId,children:t.marchandNom||t.marchandId})]}),null!==d&&0===d.length&&(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:m?l?"La liste des marchands ne se charge pas. R\xe9essayez plus tard.":"The merchant list could not be loaded. Try again later.":l?"Aucun marchand pour l\u2019instant : ajoutez-en un dans le portail, Catalogue Affili\xe9s, onglet Marchands.":"No merchant yet: add one in the portal, Affiliate Catalogue, Merchants tab."})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:l?"Nombre de produits":"Number of products"}),(0,S.jsx)("select",{value:t.nombreProduits||4,onChange:e=>r({nombreProduits:parseInt(e.target.value,10)}),className:"w-full border rounded-lg px-3 py-2 text-sm",children:[2,3,4,6,8,12].map(e=>(0,S.jsx)("option",{value:e,children:e},e))})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:l?"Options d'affichage":"Display options"}),(0,S.jsxs)("div",{className:"space-y-2",children:[(0,S.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:!1!==t.afficherPrix,onChange:e=>r({afficherPrix:e.target.checked}),className:"w-4 h-4 text-blue-600 rounded"}),(0,S.jsx)("span",{className:"text-sm",children:l?"Afficher le prix":"Show the price"})]}),(0,S.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:!1!==t.afficherCodePromo,onChange:e=>r({afficherCodePromo:e.target.checked}),className:"w-4 h-4 text-blue-600 rounded"}),(0,S.jsx)("span",{className:"text-sm",children:l?"Afficher le code promo":"Show the promo code"})]})]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:l?"Couleur du bouton \xab En savoir plus \xbb":'"Learn more" button color'}),(0,S.jsx)("input",{type:"color",value:t.buttonColor||t.accentColor||Ut.D2.sarcelle,onChange:e=>r({buttonColor:e.target.value}),className:"w-16 h-9 border rounded cursor-pointer"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:l?"Couleur du texte du bouton":"Button text color"}),(0,S.jsxs)("div",{className:"flex items-center gap-3",children:[(0,S.jsx)("input",{type:"color",value:t.buttonTextColor||(0,Ut.a$)(t.buttonColor||t.accentColor||Ut.D2.sarcelle),onChange:e=>r({buttonTextColor:e.target.value}),className:"w-16 h-9 border rounded cursor-pointer"}),t.buttonTextColor?(0,S.jsx)("button",{type:"button",onClick:()=>r({buttonTextColor:""}),className:"text-sm text-blue-600 underline",children:l?"Automatique":"Automatic"}):(0,S.jsx)("span",{className:"text-xs text-gray-500",children:l?"Automatique":"Automatic"})]})]}),(0,S.jsx)("div",{className:"rounded-lg p-3",style:{background:"#EEF7F3",border:"1px solid #CFE6DD"},children:(0,S.jsx)("p",{className:"text-xs",style:{color:"#1F4F48"},children:l?"Les produits affich\xe9s viennent automatiquement de votre Catalogue Affili\xe9s (produits publi\xe9s). Ajoutez ou retirez un produit dans le portail, cette section suit.":"The products shown come automatically from your Affiliate Catalogue (published products). Add or remove a product in the portal, this section follows."})})]})}function Wt(e){let{section:t,langueInterface:o,onUpdate:n}=e;const s="fr"===o;return(0,S.jsxs)("div",{className:"border-t pt-4 space-y-4",children:[(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:s?"Variante":"Variant"}),(0,S.jsxs)("select",{value:"compacte"===t.variante?"compacte":"complete",onChange:e=>n({variante:e.target.value}),className:"w-full border rounded-lg px-3 py-2 text-sm",children:[(0,S.jsx)("option",{value:"complete",children:s?"Compl\xe8te (haut de page)":"Full (top of page)"}),(0,S.jsx)("option",{value:"compacte",children:s?"Compacte (encadr\xe9 \xab Pas trouv\xe9 ? \xbb)":'Compact ("Not found?" box)'})]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:s?"Couleur des bulles de l'agent":"Agent bubble color"}),(0,S.jsx)("input",{type:"color",value:t.aiBubbleColor||Ut.D2.bulleAgent,onChange:e=>n({aiBubbleColor:e.target.value}),className:"w-16 h-9 border rounded cursor-pointer"})]})]})}var Gt=o(99961),Jt=o(79252);o(14657);const Xt=["button","buttonVisible"],Yt=["auto"],Zt=["button","buttonVisible"];function $t(e){if(!e)return"";return(new DOMParser).parseFromString(e,"text/html").body.textContent||""}const Qt={toolbar:[[{header:[1,2,3,!1]}],[{size:["small",!1,"large","huge"]}],["bold","italic","underline","strike"],[{list:"ordered"},{list:"bullet"}],["link"],[{align:[]}],["clean"]]},Kt=["header","size","bold","italic","underline","strike","list","bullet","link","align","color"];async function eo(e){const t=localStorage.getItem("token");try{const o=await i.A.post("/api/client/websites/upload-base64-image",{image:e},{headers:{Authorization:"Bearer ".concat(t)}});if(o.data.success&&o.data.url)return console.log("\ud83d\uddbc\ufe0f Image uploaded successfully:",o.data.url),o.data.url;throw new Error("Upload failed")}catch(o){return console.error("\u274c Failed to upload image:",o),e}}const to=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#3b82f6","#8b5cf6","#ec4899","#6b7280","#1f2937","#0ea5e9"];function oo(e){let{value:t,onChange:o,placeholder:n,defaultValue:s,resetLabel:a}=e;return(0,S.jsxs)("div",{className:"space-y-2",children:[(0,S.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,S.jsx)("input",{type:"color",value:t||s||"#000000",onChange:e=>o(e.target.value),className:"h-10 w-16 rounded cursor-pointer border"}),(0,S.jsx)("input",{type:"text",value:t||"",onChange:e=>o(e.target.value),placeholder:n,className:"flex-1 p-2 border rounded-lg text-sm"}),s&&a&&(0,S.jsx)("button",{type:"button",onClick:()=>o(s),className:"px-3 py-2 text-xs border rounded hover:bg-gray-50 transition-colors",children:a})]}),(0,S.jsx)("div",{className:"flex flex-wrap gap-1",children:to.map(e=>(0,S.jsx)("button",{type:"button",onClick:()=>o(e),className:"w-6 h-6 rounded border-2 hover:scale-110 transition-transform ".concat(t===e?"border-blue-500 ring-2 ring-blue-200":"border-gray-200"),style:{backgroundColor:e},title:e},e))})]})}function no(e){let{websiteId:t,selectedCategory:o,onChange:n,language:s}=e;const[r,i]=(0,a.useState)([]);return(0,a.useEffect)(()=>{t&&fetch("".concat(te.n,"/public/shop/").concat(t,"/categories?include_drafts=true")).then(e=>{if(!e.ok)throw new Error("Not found");return e.json()}).then(e=>{const t=e.categories;i(Array.isArray(t)?t:[])}).catch(()=>i([]))},[t]),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:"fr"===s?"Categorie":"Category"}),(0,S.jsxs)("select",{value:o,onChange:e=>n(e.target.value),className:"w-full p-2 border rounded-lg text-sm bg-white",children:[(0,S.jsx)("option",{value:"",children:"fr"===s?"Toutes les categories":"All categories"}),r.map(e=>(0,S.jsxs)("option",{value:e.name,children:[e.name," (",e.count,")"]},e.name))]})]})}function so(e){let{value:t,onChange:o,language:n}=e;const[s,r]=(0,a.useState)([]),[l,c]=(0,a.useState)(!0);(0,a.useEffect)(()=>{let e=!1;return(async()=>{try{var t;const o=localStorage.getItem("token")||sessionStorage.getItem("token"),n=await i.A.get("".concat(te.n,"/client/newsletters"),{headers:o?{Authorization:"Bearer ".concat(o)}:{}});if(e)return;const s=(null===(t=n.data)||void 0===t?void 0:t.newsletters)||n.data||[];r(s.map(e=>({id:e.id||e._id,subject:e.subject||e.title||"(sans titre)",status:e.status||"draft",language:e.language})))}catch(o){console.warn("[NewsletterAssignSelector] fetch error:",o)}finally{e||c(!1)}})(),()=>{e=!0}},[]);const d="fr"===n?"Infolettre \xe0 envoyer aux nouveaux abonn\xe9s":"Newsletter to send to new subscribers",u="fr"===n?"L'infolettre s\xe9lectionn\xe9e sera envoy\xe9e automatiquement par courriel \xe0 chaque visiteur qui s'abonne via cette section.":"The selected newsletter is automatically emailed to each visitor who subscribes via this
1section.",m="fr"===n?"Aucune (envoi manuel uniquement)":"None (manual sending only)",p="fr"===n?"Chargement\u2026":"Loading\u2026",g="fr"===n?"Aucune infolettre \u2014 cr\xe9ez-en une dans CRM \u203a Infolettres":"No newsletters \u2014 create one in CRM \u203a Newsletters",h={auto_send_template:0,draft:1,scheduled:2,sent:3},f=[...s].sort((e,t)=>{var o,n;return(null!==(o=h[e.status])&&void 0!==o?o:99)-(null!==(n=h[t.status])&&void 0!==n?n:99)});return(0,S.jsxs)("div",{className:"border-t pt-4 space-y-2",children:[(0,S.jsx)("label",{className:"block text-sm font-medium text-gray-700",children:d}),l?(0,S.jsx)("p",{className:"text-xs text-gray-500",children:p}):0===s.length?(0,S.jsx)("p",{className:"text-xs text-gray-500 italic",children:g}):(0,S.jsxs)("select",{value:t,onChange:e=>o(e.target.value),className:"w-full p-2 border rounded-lg text-sm bg-white",children:[(0,S.jsx)("option",{value:"",children:m}),f.map(e=>{return(0,S.jsxs)("option",{value:e.id,children:[e.subject," ",e.language?"[".concat(e.language.toUpperCase(),"]"):""," ",(t=e.status,"auto_send_template"===t?"fr"===n?"\ud83c\udf10 Pour souscription site":"\ud83c\udf10 Website signup":"sent"===t?"\u2713":"draft"===t?"fr"===n?"(brouillon)":"(draft)":"scheduled"===t?"fr"===n?"(planifi\xe9e)":"(scheduled)":"")]},e.id);var t})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500",children:u})]})}function ao(e){var t;let{selectedElement:o,selectedElementType:r,selectedSection:l,selectedSettingType:d,websiteSettings:u,pages:m=[],currentPageId:p="",currentPageSections:h=[],websiteId:f,contentLanguage:x="en",onUpdateElement:v,onDeleteElement:j,onUpdateSection:w,onUpdateSettings:A,onAddItemToSection:oe,onRemoveItemFromSection:ne,verificationMetaError:se=null}=e;const{t:ae,language:re}=(0,c.o)();(0,a.useEffect)(()=>{if(!se)return;const e=document.getElementById("verificationMetaText");e&&e.scrollIntoView({block:"center",behavior:"smooth"})},[se]),console.log("\ud83c\udfa8 PropertyPanel render:",{hasSelectedElement:!!o,selectedElementType:r,hasSelectedSection:!!l,selectedSectionType:null===l||void 0===l?void 0:l.type,selectedSectionId:null===l||void 0===l?void 0:l.id,selectedSettingType:d});const[ie,le]=(0,a.useState)(null),ce=m.some(e=>e.sections.some(e=>"reservation-calendar"===e.type)),de=k.kc,ge=e=>e&&!de.includes(e)?[e,...de]:de,he=["small","medium","large"],[fe,xe]=(0,a.useState)(!1),[be,ye]=(0,a.useState)(null),[ve,je]=(0,a.useState)(!1),[Ne,we]=(0,a.useState)(!1),[Ce,Se]=(0,a.useState)(!1),[Ae,ke]=(0,a.useState)([]),[Ie,Te]=(0,a.useState)(!1),[ze,Fe]=(0,a.useState)("external"),[Me,Pe]=(0,a.useState)([]),[Be,Ee]=(0,a.useState)(!1),[De,Le]=(0,a.useState)([]),[He,Re]=(0,a.useState)(!1),[Oe,_e]=(0,a.useState)([]),[Ue,qe]=(0,a.useState)(!1),[Ve,We]=(0,a.useState)(!1),[Ge,Je]=(0,a.useState)(!1),[Xe,Ye]=(0,a.useState)(0),[Ze,$e]=(0,a.useState)(null),[Qe,Ke]=(0,a.useState)(""),[et,tt]=(0,a.useState)(!1),[ot,nt]=(0,a.useState)(0),st=(0,a.useRef)(null),at=(0,a.useRef)(null),rt=(0,a.useRef)(null);(0,a.useEffect)(()=>{if("button"===r&&o&&!et){const e=o;Ke((0,C._A)(e.text,x))}},[o,r,x,et]),(0,a.useEffect)(()=>{(async()=>{Ee(!0);try{var e;const t=localStorage.getItem("token"),o=(null===(e=(await i.A.get("/api/chatbots",{headers:{Authorization:"Bearer ".concat(t)}})).data.chatbots)||void 0===e?void 0:e.map(e=>({id:e.id,name:e.name})))||[];Pe(o)}catch(t){console.error("Failed to load chatbots:",t)}finally{Ee(!1)}})()},[]),(0,a.useEffect)(()=>{if(He)return;if("true"!==localStorage.getItem("isFechamUser"))return void Re(!0);(async()=>{try{const e=localStorage.getItem("token"),t=await i.A.get("/api/client/team-users",{headers:{Authorization:"Bearer ".concat(e)}});Le(t.data.users||[])}catch(e){console.error("Failed to load team users:",e)}finally{Re(!0)}})()},[He]),(0,a.useEffect)(()=>{(async()=>{if(!f)return;if("true"===localStorage.getItem("isFechamUser"))le({name:"FEDE-PRO"});else try{const e=localStorage.getItem("token"),t=await i.A.get("/api/client/websites/".concat(f,"/usage"),{headers:{Authorization:"Bearer ".concat(e)}});le(t.data.plan)}catch(e){console.error("Failed to fetch plan:",e)}})()},[f]),(0,a.useEffect)(()=>
1{if("button"===r&&o){const e=o;e.url.startsWith("#")?Fe("section"):e.url.startsWith("/")?Fe("page"):Fe("external")}},[o,r]);const it=async()=>{je(!0);try{await new Promise(e=>setTimeout(e,1500));const e="string"===typeof u.businessName?u.businessName:u.businessName.en,t="string"===typeof u.tagline?u.tagline:u.tagline.en,o=["".concat(e," | ").concat(t),"".concat(e," - Professional Services & Solutions"),"".concat(e,": ").concat(t),"Best ".concat(e," - Expert ").concat(t),"".concat(e," - Your Trusted Partner")],n=["".concat(e," offers professional services focused on ").concat(t.toLowerCase(),". Contact us today to learn how we can help you achieve your goals."),"Discover ".concat(e,", where ").concat(t.toLowerCase(),". We provide expert solutions tailored to your needs with proven results."),"Looking for professional services? ".concat(e," specializes in delivering excellence. ").concat(t,". Get started today."),"".concat(e," is your trusted partner for success. ").concat(t,". Explore our services and see why clients choose us."),"Experience the difference with ".concat(e,". We're committed to ").concat(t.toLowerCase()," through innovative solutions and dedicated support.")],s=o[Math.floor(Math.random()*o.length)],a=n[Math.floor(Math.random()*n.length)];A({seoTitle:s,seoDescription:a})}catch(e){console.error("Auto-generate SEO error:",e)}finally{je(!1)}},lt=async(e,t,n)=>{xe(!0),ye(t+(n||""));try{const s=localStorage.getItem("token"),a={seoDescription:"seo_description",seoTitle:"seo_title",content:"improve"}[t]||"improve",i=await fetch("/api/client/blog/rephrase",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(s)},body:JSON.stringify({text:e,style:a,language:x})});if(!i.ok){const e=await i.json().catch(()=>({}));throw new Error(e.detail||"Failed to rephrase text")}const l=(await i.json()).rephrased_text;if(!l)throw new Error("No rephrased text received");if(n){if("text"===r&&o){const e=o;v(n,{content:(0,C.UE)(e.content,x,l)}),nt(e=>e+1)}else if("button"===r&&o){const e=o;v(n,{text:(0,C.UE)(e.text,x,l)}),Ke(l)}}else"seoTitle"===t?(A({seoTitle:l}),_t.oR.success("fr"===re?"Titre SEO reformul\xe9!":"SEO title rephrased!")):"seoDescription"===t&&(A({seoDescription:l}),_t.oR.success("fr"===re?"Description SEO reformul\xe9e!":"SEO description rephrased!"))}catch(s){console.error("Rephrase error:",s),_t.oR.error("fr"===re?"Erreur lors de la reformulation. Veuillez r\xe9essayer.":"Error while rephrasing. Please try again.")}finally{xe(!1),ye(null)}},ct=()=>{st.current&&(clearTimeout(st.current),st.current=null);const e=rt.current;if(!e)return;rt.current=null;const{value:t,elementId:o,currentValue:s}=e,a=localStorage.getItem("token"),r="object"===typeof s&&null!==s?(0,n.A)((0,n.A)({},s),{},{[x]:t}):{en:"en"===x?t:"",fr:"fr"===x?t:""};v(o,{content:r}),setTimeout(async()=>{try{const e=await(0,Gt.Gj)(t,x,r,a||void 0);v(o,{content:e})}catch(e){console.error("Auto-translation error:",e)}},1e3)},dt="true"===localStorage.getItem("isFechamUser")||window.location.href.toLowerCase().includes("fecham")||(null===(t=localStorage.getItem("userType"))||void 0===t?void 0:t.toLowerCase().includes("fecham")),ut=async()=>{if(!Ue){qe(!0);try{const e=localStorage.getItem("token"),t=((await i.A.get("".concat(te.n,"/fecham/commanditaires"),{headers:{Authorization:"Bearer ".concat(e),"X-Fecham-User":"true"}})).data.sponsors||[]).map(e=>({id:e.id,nom:e.nom,logo_url:e.logo_url,site_web:e.url_destination,type:e.niveau}));_e(t),We(!0)}catch(e){console.error("Error loading sponsors:",e),_t.oR.error("fr"===re?"Erreur lors du chargement des commanditaires.":"Error loading sponsors.")}finally{qe(!1)}}},mt=()=>{if(!l||"sponsors"!==l.type||!dt)return null;const e=(()=>{if(!o)return-1;return(l.sponsors||[]).findIndex(e=>{var t,n;return(null===(t=e.image)||void 0===t?void 0:t.id)===o.id||(null===(n=e.name)||void 0===n?void 0:n.id)===o.id})})();return(0,S.jsxs)("div",{className:"border-t pt-3",children:[(0,S.jsxs)("button",{onClick:ut,disabled:Ue,className:"w-full flex items-center justify-center gap-2 px-3 py-2 bg-orange-50 hover:bg-orange-100 border border-orange-200 rounded-lg text-sm text-orange-700 transition-colors disabled:opacity-50",children:[Ue?(0,S.jsx)(I.A,{className:"w-4 h-4 animate-spin"}):(0,S.jsx)(T.A,{className:"w-4 h-4"}),"fr"===re?"Liste commanditaires":"Sponsors List"]}),e>=0&&(0,S.jsx)("p",{className:"text-xs text-blue-600 mt-1",children:"fr"===re?"Remplacera le commanditaire #".concat(e+1):"Will replace sponsor #".concat(e+1)}),Ve&&Oe.length>0&&(0,S.jsxs)("div",{className:"mt-2 border rounded-lg bg-white max-h-64 overflow-y-auto",children:[(0,S.jsxs)("div",{className:"p-2 bg-gray-50 border-b flex justify-between items-center sticky top-0",children:[(0,S.jsxs)("span",{className:"text-xs font-medium text-gray-700",children:[Oe.length," ","fr"===re?"commanditaire(s)":"sponsor(s)"]}),(0,S.jsx)("button",{onClick:()=>We(!1),className:"text-xs text-gray-500 hover:text-gray-700",children:"\u2715"})]}),Oe.map(t=>(0,S.jsxs)("div",{className:"flex items-center gap-2 p-2 hover:bg-blue-50 border-b last:border-b-0 cursor-pointer transition-colors",onClick:()=>{const o=[...l.sponsors||[]];if(e>=0){const s=o[e];o[e]=(0,n.A)((0,n.A)({},s),{},{image:(0,n.A)((0,n.A)({},s.image),{},{url:t.logo_url||"",alt:t.nom}),name:(0,n.A)((0,n.A)({},s.name),{},{content:{en:t.nom,fr:t.nom}}),url:t.site_web||""}),w(l.id,{sponsors:o}),_t.oR.success("fr"===re?"Remplac\xe9 par ".concat(t.nom):"Replaced with ".concat(t.nom))}else{const e=()=>Math.random().toString(36).substr(2,9);if(o.some(e=>{var o;return("object"===typeof(null===(o=e.name)||void 0===o?void 0:o.content)?e.name.content.fr||e.name.content.en:"")===t.nom}))return void _t.oR.info("".concat(t.nom,"fr"===re?" est d\xe9j\xe0 dans la liste":" is already in the list"));o.push({id:e(),image:{id:e(),url:t.logo_url||"",alt:t.nom},name:{id:e(),content:{en:t.nom,fr:t.nom},fontFamily:"Inter",fontSize:"16px",color:"#374151",tag:"p"},url:t.site_web||""}),w(l.id,{sponsors:o}),_t.oR.success("".concat(t.nom,"fr"===re?" ajout\xe9":" added"))}We(!1)},children:[t.logo_url?(0,S.jsx)("img",{src:t.logo_url,alt:t.nom,className:"w-8 h-8 object-contain rounded border bg-white flex-shrink-0"}):(0,S.jsx)("div",{className:"w-8 h-8 bg-gray-200 rounded border flex items-center justify-center flex-shrink-0",children:(0,S.jsx)("span",{className:"text-xs text-gray-400",children:"\u2014"})}),(0,S.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,S.jsx)("p",{className:"text-sm font-medium truncate",children:t.nom}),t.type&&(0,S.jsx)("p",{className:"text-xs text-gray-500 capitalize",children:t.type})]}),e>=0?(0,S.jsx)("span",{className:"text-xs text-blue-600 flex-shrink-0",children:"fr"===re?"Remplacer":"Replace"}):(0,S.jsx)(g.A,{className:"w-4 h-4 text-blue-500 flex-shrink-0"})]},t.id))]}),Ve&&0===Oe.length&&!Ue&&(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-2 text-center",children:"fr"===re?"Aucun commanditaire approuv\xe9 trouv\xe9.":"No approved sponsors found."})]})};if(d){var pt,gt,ht,ft,xt;const e="string"===typeof u.businessName?{en:u.businessName,fr:u.businessName}:u.businessName,t="string"===typeof u.tagline?{en:u.tagline,fr:u.tagline}:u.tagline;return(0,S.jsxs)("div",{className:"p-4 space-y-6",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,S.jsx)(z.A,{className:"w-5 h-5 text-blue-600"}),(0,S.jsx)("h3",{children:ae("properties.websiteSettings")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.businessName")}),(0,S.jsxs)("div",{className:"space-y-2",children:[(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-xs text-gray-500 mb-0.5",children:"FR"}),(0,S.jsx)("input",{type:"text",value:null!==(pt=e.fr)&&void 0!==pt?pt:"",onChange:t=>{A({businessName:(0,n.A)((0,n.A)({},e),{},{fr:t.target.value})})},className:"w-full px-3 py-2 border rounded text-sm"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-xs text-gray-500 mb-0.5",children:"EN"}),(0,S.jsx)("input",{type:"text",value:null!==(gt=e.en)&&void 0!==gt?gt:"",onChange:t=>{A({businessName:(0,n.A)((0,n.A)({},e),{},{en:t.target.value})})},className:"w-full px-3 py-2 border rounded text-sm"})]})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.businessNameHelp")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.tagline")}),(0,S.jsxs)("div",{className:"space-y-2",children:[(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-xs text-gray-500 mb-0.5",children:"FR"}),(0,S.jsx)("input",{type:"text",value:null!==(ht=t.fr)&&void 0!==ht?ht:"",onChange:e=>{A({tagline:(0,n.A)((0,n.A)({},t),{},{fr:e.target.value})})},className:"w-full px-3 py-2 border rounded text-sm",placeholder:"fr"===re?"Laisser vide pour masquer":"Leave empty to hide"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-xs text-gray-500 mb-0.5",children:"EN"}),(0,S.jsx)("input",{type:"text",value:null!==(ft=t.en)&&void 0!==ft?ft:"",onChange:e=>{A({tagline:(0,n.A)((0,n.A)({},t),{},{en:e.target.value})})},className:"w-full px-3 py-2 border rounded text-sm",placeholder:"fr"===re?"Laisser vide pour masquer":"Leave empty to hide"})]})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.taglineHelp")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.logo")}),(0,S.jsx)("input",{type:"file",accept:"image/*",onChange:async e=>{var t;const o=null===(t=e.target.files)||void 0===t?void 0:t[0];if(o){const e=new FileReader;e.onloadend=async()=>{var t;const o=e.result,n=await eo(o);A({logo:{id:(null===(t=u.logo)||void 0===t?void 0:t.id)||"logo-1",url:n,alt:u.businessName+" Logo"}})}
1,e.readAsDataURL(o)}},className:"w-full px-3 py-2 border rounded text-sm file:mr-4 file:py-2 file:px-4 file:rounded file:border-0 file:text-sm file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100"}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.logoUploadHelp")}),(null===(xt=u.logo)||void 0===xt?void 0:xt.url)&&(0,S.jsxs)("div",{className:"mt-3 space-y-2",children:[(0,S.jsxs)("div",{className:"p-3 border rounded bg-gray-50",children:[(0,S.jsx)("p",{className:"text-xs text-gray-600 mb-2",children:ae("properties.logoPreview")}),(0,S.jsx)("img",{src:u.logo.url,alt:"Logo preview",style:{height:"".concat(u.logoHeight||40,"px")},className:"w-auto object-contain"})]}),(0,S.jsxs)("button",{onClick:()=>A({logo:void 0}),className:"text-xs text-red-600 hover:text-red-700 flex items-center gap-1",children:[(0,S.jsx)(N.A,{className:"w-3 h-3"}),ae("properties.removeLogo")]})]})]}),(0,S.jsxs)("div",{children:[(0,S.jsxs)("label",{className:"block text-sm mb-1",children:[ae("properties.logoHeight"),": ",u.logoHeight||40,"px"]}),(0,S.jsx)("input",{type:"range",min:"20",max:"250",step:"5",value:u.logoHeight||40,onChange:e=>A({logoHeight:parseInt(e.target.value)}),className:"w-full"}),(0,S.jsxs)("div",{className:"flex justify-between text-xs text-gray-500 mt-1",children:[(0,S.jsx)("span",{children:"20px"}),(0,S.jsx)("span",{children:"250px"})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.logoHeightHelp")})]}),(0,S.jsxs)("div",{className:"border-t pt-6",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,S.jsx)(F.A,{className:"w-5 h-5 text-purple-600"}),(0,S.jsx)("h3",{children:"fr"===re?"Liens menu personnalis\xe9s":"Custom Menu Links"})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"fr"===re?"Ajoutez des liens externes au menu de navigation du site.":"Add external links to the site navigation menu."}),(u.customMenuLinks||[]).map((e,t)=>{const o="object"===typeof e.label?e.label[x]||"":e.label||"";return(0,S.jsxs)("div",{className:"mb-3 p-3 border rounded-lg bg-gray-50",children:[(0,S.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,S.jsx)("span",{className:"text-xs font-medium text-gray-500",children:"fr"===re?"Lien ".concat(t+1):"Link ".concat(t+1)}),(0,S.jsx)("button",{onClick:()=>{const t=(u.customMenuLinks||[]).filter(t=>t.id!==e.id);A({customMenuLinks:t})},className:"text-red-400 hover:text-red-600 p-1",title:"fr"===re?"Supprimer":"Delete",children:(0,S.jsx)(N.A,{className:"w-3.5 h-3.5"})})]}),(0,S.jsx)("input",{type:"text",placeholder:"fr"===re?"Nom du lien":"Link label",value:o,onChange:t=>{const o=t.target.value,s=e.label,a="object"===typeof s?(0,n.A)((0,n.A)({},s),{},{[x]:o}):{en:"en"===x?o:String(s||""),fr:"fr"===x?o:String(s||"")},r=(u.customMenuLinks||[]).map(t=>t.id===e.id?(0,n.A)((0,n.A)({},t),{},{label:a}):t);A({customMenuLinks:r});const i=localStorage.getItem("token");setTimeout(async()=>{try{const t=await(0,Gt.Gj)(o,x,a,i||void 0),s=(u.customMenuLinks||[]).map(o=>o.id===e.id?(0,n.A)((0,n.A)({},o),{},{label:t}):o);A({customMenuLinks:s})}catch(t){}},800)},className:"w-full px-2 py-1.5 border rounded text-sm mb-2"}),(0,S.jsx)("input",{type:"url",placeholder:"https://...",value:e.url||"",onChange:t=>{const o=(u.customMenuLinks||[]).map(o=>o.id===e.id?(0,n.A)((0,n.A)({},o),{},{url:t.target.value}):o);A({customMenuLinks:o})},className:"w-full px-2 py-1.5 border rounded text-sm mb-2"}),(0,S.jsxs)("label",{className:"flex items-center gap-2 text-xs text-gray-600 cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:!1!==e.openInNewTab,onChange:t=>{const o=(u.customMenuLinks||[]).map(o=>o.id===e.id?(0,n.A)((0,n.A)({},o),{},{openInNewTab:t.target.checked}):o);A({customMenuLinks:o})},className:"rounded"}),(0,S.jsx)(M.A,{className:"w-3 h-3"}),"fr"===re?"Ouvrir dans un nouvel onglet":"Open in new tab"]})]},e.id)}),(0,S.jsxs)("button",{onClick:()=>{const e={id:Date.now().toString(),label:{en:"",fr:""},url:"",openInNewTab:!0},t=[...u.customMenuLinks||[],e];A({customMenuLinks:t})},className:"w-full px-3 py-2 border-2 border-dashed border-gray-300 rounded-lg text-sm text-gray-500 hover:border-purple-400 hover:text-purple-600 transition-colors flex items-center justify-center gap-1",children:[(0,S.jsx)(g.A,{className:"w-4 h-4"}),"fr"===re?"Ajouter un lien":"Add a link"]})]}),(0,S.jsxs)("div",{className:"border-t pt-6",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,S.jsx)(z.A,{className:"w-5 h-5 text-green-600"}),(0,S.jsx)("h3",{children:ae("properties.seoSettings")})]}),(0,S.jsx)("button",{onClick:it,disabled:ve,className:"w-full px-4 py-3 bg-gradient-to-r from-green-500 to-blue-500 text-white rounded-lg hover:from-green-600 hover:to-blue-600 transition-all flex items-center justify-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed shadow-md",children:ve?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(I.A,{className:"w-5 h-5 animate-spin"}),ae("properties.generatingSEO")]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(P.A,{className:"w-5 h-5"}),ae("properties.autoGenerateSEO")]})}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-2 text-center",children:ae("properties.aiSeoHelp")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.seoT
1itle")}),(0,S.jsxs)("div",{className:"space-y-2",children:[(0,S.jsx)("input",{type:"text",value:u.seoTitle||"",onChange:e=>A({seoTitle:e.target.value}),placeholder:"string"===typeof u.businessName?u.businessName:u.businessName.en,className:"w-full px-3 py-2 border rounded text-sm"}),(0,S.jsx)("button",{onClick:()=>{const e="string"===typeof u.businessName?u.businessName:u.businessName.en;lt(u.seoTitle||e,"seoTitle")},disabled:fe&&"seoTitle"===be,className:"w-full px-3 py-2 bg-purple-50 text-purple-700 rounded text-sm hover:bg-purple-100 transition-colors flex items-center justify-center gap-2 disabled:opacity-50",children:fe&&"seoTitle"===be?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(I.A,{className:"w-4 h-4 animate-spin"}),ae("properties.rephrasing")]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(B.A,{className:"w-4 h-4"}),ae("properties.aiRephrase")]})})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.seoTitleHelp")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.seoDescription")}),(0,S.jsxs)("div",{className:"space-y-2",children:[(0,S.jsx)("textarea",{value:u.seoDescription||"",onChange:e=>A({seoDescription:e.target.value}),placeholder:"string"===typeof u.tagline?u.tagline:u.tagline.en,rows:3,className:"w-full px-3 py-2 border rounded text-sm resize-none"}),(0,S.jsx)("button",{onClick:()=>{let e="";u.tagline&&(e="string"===typeof u.tagline?u.tagline:u.tagline.en||u.tagline.fr||"");const t=u.seoDescription||e;!t||t.trim().length<5?_t.oR.error("fr"===re?"Veuillez entrer une description SEO d'au moins 5 caract\xe8res avant de reformuler":"Please enter an SEO description of at least 5 characters before rephrasing"):lt(t,"seoDescription")},disabled:fe&&"seoDescription"===be,className:"w-full px-3 py-2 bg-purple-50 text-purple-700 rounded text-sm hover:bg-purple-100 transition-colors flex items-center justify-center gap-2 disabled:opacity-50",children:fe&&"seoDescription"===be?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(I.A,{className:"w-4 h-4 animate-spin"}),ae("properties.rephrasing")]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(B.A,{className:"w-4 h-4"}),ae("properties.aiRephrase")]})})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.seoDescriptionHelp")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{htmlFor:"verificationMetaText",className:"block text-sm mb-1",children:ae("properties.verificationTags")}),(0,S.jsx)("textarea",{id:"verificationMetaText",value:u.verificationMetaText||"",onChange:e=>A({verificationMetaText:e.target.value}),placeholder:'<meta name="google-site-verification" content="...">',rows:3,spellCheck:!1,className:"w-full px-3 py-2 border rounded text-xs font-mono ".concat(se?"border-red-500":"")}),se&&(0,S.jsx)("p",{role:"alert",className:"text-xs text-red-600 mt-1",children:se}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.verificationTagsHelp")})]}),(0,S.jsxs)("div",{className:"border-t pt-6",children:[(0,S.jsx)("h3",{className:"mb-4",children:ae("properties.contactInformation")}),(0,S.jsxs)("div",{children:[(0,S.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,S.jsx)("label",{className:"block text-sm",children:ae("properties.phoneNumber")}),(0,S.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:!1!==u.showPhone,onChange:e=>A({showPhone:e.target.checked}),className:"w-4 h-4 text-blue-600 rounded"}),(0,S.jsx)("span",{className:"text-xs text-gray-600",children:ae("properties.showInFooter")})]})]}),(0,S.jsx)("input",{type:"tel",value:u.phone||"",onChange:e=>A({phone:e.target.value}),placeholder:ae("placeholders.phone"),className:"w-full px-3 py-2 border rounded text-sm"}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.displayedInFooter")})]}),(0,S.jsxs)("div",{className:"mt-4",children:[(0,S.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,S.jsx)("label",{className:"block text-sm",children:ae("properties.address")}),(0,S.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:!1!==u.showAddress,onChange:e=>A({showAddress:e.target.checked}),className:"w-4 h-4 text-blue-600 rounded"}),(0,S.jsx)("span",{className:"text-xs text-gray-600",children:ae("properties.showInFooter")})]})]}),(0,S.jsx)("textarea",{value:u.address||"",onChange:e=>A({address:e.target.value}),placeholder:ae("placeholders.address"),rows:3,className:"w-full px-3 py-2 border rounded text-sm resize-none"}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.displayedInFooter")})]})]}),(0,S.jsxs)("div",{className:"border-t pt-6",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,S.jsx)(E.A,{className:"w-5 h-5 text-purple-600"}),(0,S.jsx)("h3",{children:ae("properties.headerFooterColors")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:ae("properties.headerBackgroun
1dColor")}),(0,S.jsx)(oo,{value:u.headerBackgroundColor||"#ffffff",onChange:e=>A({headerBackgroundColor:e}),placeholder:ae("placeholders.colorWhite"),defaultValue:"#ffffff",resetLabel:ae("common.reset")}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.headerBackgroundHelp")})]}),(0,S.jsxs)("div",{className:"mt-4",children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:ae("properties.headerFontSize")}),(0,S.jsxs)("select",{value:u.headerFontSizeScale||1,onChange:e=>A({headerFontSizeScale:parseFloat(e.target.value)}),className:"w-full px-3 py-2 border rounded text-sm bg-white",children:[(0,S.jsx)("option",{value:"0.8",children:"80%"}),(0,S.jsx)("option",{value:"0.85",children:"85%"}),(0,S.jsx)("option",{value:"0.9",children:"90%"}),(0,S.jsx)("option",{value:"0.95",children:"95%"}),(0,S.jsx)("option",{value:"1",children:"100%"}),(0,S.jsx)("option",{value:"1.05",children:"105%"}),(0,S.jsx)("option",{value:"1.1",children:"110%"}),(0,S.jsx)("option",{value:"1.15",children:"115%"}),(0,S.jsx)("option",{value:"1.2",children:"120%"}),(0,S.jsx)("option",{value:"1.3",children:"130%"})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.headerFontSizeHelp")})]}),(0,S.jsxs)("div",{className:"mt-4",children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:ae("properties.headingFont")}),(0,S.jsxs)("select",{"data-testid":"select-police-titres",value:u.headingFontFamily||"",onChange:e=>A({headingFontFamily:e.target.value}),className:"w-full px-3 py-2 border rounded text-sm bg-white",children:[(0,S.jsx)("option",{value:"",children:ae("properties.fontDefault")}),k.$6.map(e=>(0,S.jsx)("option",{value:e,children:e},e))]})]}),(0,S.jsxs)("div",{className:"mt-4",children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:ae("properties.bodyFont")}),(0,S.jsxs)("select",{"data-testid":"select-police-texte",value:u.fontFamily||"",onChange:e=>A({fontFamily:e.target.value}),className:"w-full px-3 py-2 border rounded text-sm bg-white",children:[(0,S.jsx)("option",{value:"",children:ae("properties.fontDefault")}),k.$6.map(e=>(0,S.jsx)("option",{value:e,children:e},e))]})]}),(0,S.jsxs)("div",{className:"mt-4",children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:ae("properties.footerBackgroundColor")}),(0,S.jsx)(oo,{value:u.footerBackgroundColor||"#111827",onChange:e=>A({footerBackgroundColor:e}),placeholder:ae("placeholders.colorDark"),defaultValue:"#111827",resetLabel:ae("common.reset")}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.footerBackgroundHelp")})]}),(0,S.jsxs)("div",{className:"mt-4 p-3 bg-gray-50 rounded-lg border",children:[(0,S.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,S.jsx)("label",{className:"text-sm font-medium",children:"fr"===re?"Message personnalis\xe9 (footer)":"Custom Footer Message"}),(0,S.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:!0===u.showFooterCustomMessage,onChange:e=>A({showFooterCustomMessage:e.target.checked}),className:"w-4 h-4 text-blue-600 rounded"}),(0,S.jsx)("span",{className:"text-xs text-gray-600",children:"Visible"})]})]}),(0,S.jsxs)("div",{className:"space-y-2",children:[(0,S.jsx)("input",{type:"text",value:u.footerCustomLine1||"",onChange:e=>{const t=e.target.value.slice(0,40);A({footerCustomLine1:t})},placeholder:"fr"===re?"Ligne 1 (max 40 caract\xe8res)":"Line 1 (max 40 characters)",maxLength:40,className:"w-full px-3 py-2 border rounded text-sm"}),(0,S.jsx)("textarea",{value:u.footerCustomLine2||"",onChange:e=>{const t=e.target.value.slice(0,100);A({footerCustomLine2:t})},placeholder:"fr"===re?"Ligne 2 (max 100 caract\xe8res)":"Line 2 (max 100 characters)",maxLength:100,rows:2,className:"w-full px-3 py-2 border rounded text-sm resize-none"})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"fr"===re?'Affich\xe9 sous "Conditions d\'utilisation" dans le footer':'Displayed below "Terms of Use" in the footer'})]})]}),(0,S.jsxs)("div",{className:"border-t pt-6",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,S.jsx)(z.A,{className:"w-5 h-5 text-blue-600"}),(0,S.jsx)("h3",{children:ae("properties.advancedSettings")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:ae("properties.customDomain")}),(0,S.jsx)("input",{type:"text",value:u.customDomain||"",onChange:e=>A({customDomain:e.target.value}),placeholder:"fr"===re?"exemple.com":"example.com",disabled:"Free"===(null===ie||void 0===ie?void 0:ie.name),className:"w-full px-3 py-2 border rounded text-sm ".concat("Free"===(null===ie||void 0===ie?void 0:ie.name)?"bg-gray-100 cursor-not-allowed opacity-60":"")}
1),"Free"===(null===ie||void 0===ie?void 0:ie.name)?(0,S.jsx)("p",{className:"text-xs text-red-600 mt-1",children:"fr"===re?"Les domaines personnalis\xe9s ne sont pas disponibles avec le plan gratuit. Passez \xe0 un plan payant.":"Custom domain is not available on the Free plan. Upgrade to a paid plan."}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"fr"===re?"Entrez votre domaine sans www (ex: monsite.com)":"Enter your domain without www (e.g., mysite.com)"}),f&&(0,S.jsxs)("div",{className:"mt-3 p-4 bg-gradient-to-r from-blue-50 to-indigo-50 border border-blue-200 rounded-lg",children:[(0,S.jsx)("p",{className:"text-sm font-semibold text-blue-900 mb-3",children:"fr"===re?"Configuration DNS requise":"Required DNS Configuration"}),(0,S.jsx)("p",{className:"text-xs text-blue-700 mb-3",children:"fr"===re?"Ajoutez ces 2 enregistrements DNS chez votre registraire de domaine (GoDaddy, Namecheap, etc.):":"Add these 2 DNS records at your domain registrar (GoDaddy, Namecheap, etc.):"}),(0,S.jsxs)("div",{className:"mb-4 p-3 bg-white rounded border",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,S.jsx)("span",{className:"bg-blue-600 text-white text-xs font-bold px-2 py-1 rounded",children:"1"}),(0,S.jsx)("span",{className:"text-sm font-medium text-gray-800",children:"fr"===re?"Enregistrement TXT":"TXT Record"}),(0,S.jsxs)("span",{className:"text-xs text-gray-500",children:["(","fr"===re?"pour v\xe9rifier que vous \xeates propri\xe9taire":"to verify ownership",")"]})]}),(0,S.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)("span",{className:"font-medium text-gray-600 w-16",children:"fr"===re?"H\xf4te:":"Host:"}),(0,S.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"@"})]}),(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)("span",{className:"font-medium text-gray-600 w-16",children:"Type:"}),(0,S.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"TXT"})]}),(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)("span",{className:"font-medium text-gray-600 w-16",children:"fr"===re?"Valeur:":"Value:"}),(0,S.jsxs)("code",{className:"bg-yellow-100 px-2 py-1 rounded flex-1 break-all font-mono text-yellow-800",children:["neoagora-verify=",f]}),(0,S.jsx)("button",{onClick:()=>{navigator.clipboard.writeText("neoagora-verify=".concat(f)),_t.oR.success("fr"===re?"Copi\xe9!":"Copied!")},className:"text-xs bg-blue-600 text-white px-2 py-1 rounded hover:bg-blue-700",children:"fr"===re?"Copier":"Copy"})]})]})]}),(0,S.jsxs)("div",{className:"mb-3 p-3 bg-white rounded border",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,S.jsx)("span",{className:"bg-blue-600 text-white text-xs font-bold px-2 py-1 rounded",children:"2"}),(0,S.jsx)("span",{className:"text-sm font-medium text-gray-800",children:"fr"===re?"Enregistrement A":"A Record"}),(0,S.jsxs)("span",{className:"text-xs text-gray-500",children:["(","fr"===re?"pour rediriger le trafic":"to route traffic",")"]})]}),(0,S.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)("span",{className:"font-medium text-gray-600 w-16",children:"fr"===re?"H\xf4te:":"Host:"}),(0,S.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"@"})]}),(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)("span",{className:"font-medium text-gray-600 w-16",children:"Type:"}),(0,S.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"A"})]}),(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)("span",{className:"font-medium text-gray-600 w-16",children:"fr"===re?"Valeur:":"Value:"}),(0,S.jsx)("code",{className:"bg-green-100 px-2 py-1 rounded font-mono text-green-800",children:"138.197.153.209"}),(0,S.jsx)("button",{onClick:()=>{navigator.clipboard.writeText("138.197.153.209"),_t.oR.success("fr"===re?"Copi\xe9!":"Copied!")},className:"text-xs bg-blue-600 text-white px-2 py-1 rounded hover:bg-blue-700",children:"fr"===re?"Copier":"Copy"})]})]})]}),(0,S.jsxs)("div",{className:"text-xs text-gray-600 bg-gray-50 p-2 rounded",children:[(0,S.jsx)("p",{className:"font-medium mb-1",children:"Note:"}),(0,S.jsx)("p",{children:"fr"===re?"La propagation DNS peut prendre de quelques minutes \xe0 48 heures. Une fois configur\xe9, votre domaine sera automatiquement activ\xe9 avec SSL.":"DNS propagation may take a few minutes to 48 hours. Once configured, your domain will be automatically activated
1with SSL."})]})]})]})]}),(0,S.jsxs)("div",{className:"border-t pt-6 mt-6",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,S.jsx)(D.A,{className:"w-5 h-5 text-purple-600"}),(0,S.jsx)("h3",{className:"font-medium",children:ae("properties.chatbotIntegration")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.embedChatbotAgent")}),(0,S.jsxs)("select",{value:u.embeddedAgentId||"",onChange:e=>A({embeddedAgentId:e.target.value||void 0}),disabled:Be,className:"w-full px-3 py-2 border rounded text-sm disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,S.jsx)("option",{value:"",children:ae("properties.noChatbot")}),Be?(0,S.jsx)("option",{disabled:!0,children:ae("properties.loadingChatbots")}):Me.map(e=>(0,S.jsx)("option",{value:e.id,children:e.name},e.id))]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.selectChatbotHelp")}),u.embeddedAgentId&&(0,S.jsx)("div",{className:"mt-3 p-3 bg-purple-50 border border-purple-200 rounded",children:(0,S.jsxs)("p",{className:"text-xs text-purple-800",children:["\u2728 ",ae("properties.chatbotWillAppear")]})})]})]}),(0,S.jsxs)("div",{className:"mt-4",children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:ae("properties.googleAnalyticsId")}),(0,S.jsx)("input",{type:"text",value:u.googleAnalyticsId||"",onChange:e=>A({googleAnalyticsId:e.target.value}),placeholder:ae("placeholders.googleAnalytics"),className:"w-full px-3 py-2 border rounded text-sm font-mono"}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.googleAnalyticsHelp")})]}),(0,S.jsxs)("div",{className:"mt-4",children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:ae("properties.googleTagManagerId")}),(0,S.jsx)("input",{type:"text",value:u.googleTagManagerId||"",onChange:e=>A({googleTagManagerId:e.target.value}),placeholder:ae("placeholders.googleTagManager"),className:"w-full px-3 py-2 border rounded text-sm font-mono"}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.googleTagManagerHelp")})]})]}),(0,S.jsxs)("div",{className:"border-t pt-6",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,S.jsx)(L.A,{className:"w-5 h-5 text-purple-600"}),(0,S.jsx)("h3",{children:"fr"===re?"M\xe9dias sociaux":"Social Media"})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"fr"===re?"Les ic\xf4nes appara\xeetront dans le footer.":"Icons will appear in the footer."}),(0,S.jsx)("div",{className:"space-y-2",children:[{key:"facebook",label:"Facebook",placeholder:"https://facebook.com/...",icon:(0,S.jsx)("svg",{className:"w-4 h-4 text-[#1877F2]",viewBox:"0 0 24 24",fill:"currentColor",children:(0,S.jsx)("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})})},{key:"instagram",label:"Instagram",placeholder:"https://instagram.com/...",icon:(0,S.jsx)("svg",{className:"w-4 h-4 text-[#E4405F]",viewBox:"0 0 24 24",fill:"currentColor",children:(0,S.jsx)("path",{d:"M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678a6.162 6.162 0 100 12.324 6.162 6.162 0 100-12.324zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405a1.441 1.441 0 11-2.882 0 1.441 1.441 0 012.882 0z"})})},{key:"linkedin",label:"LinkedIn",placeholder:"https://linkedin.com/company/...",icon:(0,S.jsx)("svg",{className:"w-4 h-4 text-[#0A66C2]",viewBox:"0 0 24 24",fill:"
1currentColor",children:(0,S.jsx)("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.064 2.064 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})})},{key:"twitter",label:"X / Twitter",placeholder:"https://x.com/...",icon:(0,S.jsx)("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:(0,S.jsx)("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})},{key:"youtube",label:"YouTube",placeholder:"https://youtube.com/@...",icon:(0,S.jsx)("svg",{className:"w-4 h-4 text-[#FF0000]",viewBox:"0 0 24 24",fill:"currentColor",children:(0,S.jsx)("path",{d:"M23.498 6.186a3.016 3.016 0 00-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 00.502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 002.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 002.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"})})},{key:"tiktok",label:"TikTok",placeholder:"https://tiktok.com/@...",icon:(0,S.jsx)("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:(0,S.jsx)("path",{d:"M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"})})},{key:"pinterest",label:"Pinterest",placeholder:"https://pinterest.com/...",icon:(0,S.jsx)("svg",{className:"w-4 h-4 text-[#E60023]",viewBox:"0 0 24 24",fill:"currentColor",children:(0,S.jsx)("path",{d:"M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738a.36.36 0 01.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146C9.57 23.812 10.763 24 12.017 24c6.624 0 11.99-5.367 11.99-11.988C24.007 5.367 18.641 0 12.017 0z"})})},{key:"whatsapp",label:"WhatsApp",placeholder:"https://wa.me/15551234567",icon:(0,S.jsx)("svg",{className:"w-4 h-4 text-[#25D366]",viewBox:"0 0 24 24",fill:"currentColor",children:(0,S.jsx)("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})})},{key:"telegram",label:"Telegram",placeholder:"https://t.me/...",icon:(0,S.jsx)("svg",{className:"w-4 h-4 text-[#26A5E4]",viewBox:"0 0 24 24",fill:"
1currentColor",children:(0,S.jsx)("path",{d:"M11.944 0A12 12 0 000 12a12 12 0 0012 12 12 12 0 0012-12A12 12 0 0012 0 12 12 0 0011.944 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 01.171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.479.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})})},{key:"spotify",label:"Spotify",placeholder:"https://open.spotify.com/...",icon:(0,S.jsx)("svg",{className:"w-4 h-4 text-[#1DB954]",viewBox:"0 0 24 24",fill:"currentColor",children:(0,S.jsx)("path",{d:"M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z"})})},{key:"behance",label:"Behance",placeholder:"https://behance.net/...",icon:(0,S.jsx)("svg",{className:"w-4 h-4 text-[#1769FF]",viewBox:"0 0 24 24",fill:"currentColor",children:(0,S.jsx)("path",{d:"M6.938 4.503c.702 0 1.34.06 1.92.188.577.13 1.07.33 1.485.609.41.28.733.65.96 1.12.225.47.34 1.05.34 1.73 0 .74-.17 1.36-.507 1.86-.338.5-.837.9-1.502 1.22.906.26 1.576.72 2.022 1.37.448.66.665 1.45.665 2.36 0 .75-.13 1.39-.41 1.93-.28.55-.67 1-1.16 1.35-.48.348-1.05.6-1.67.767-.63.165-1.27.25-1.95.25H0V4.51h6.938v-.007zM6.545 10.16c.625 0 1.135-.145 1.53-.44.395-.294.59-.75.59-1.365 0-.335-.06-.612-.18-.832a1.391 1.391 0 00-.488-.504 2.13 2.13 0 00-.725-.27 4.384 4.384 0 00-.89-.08H3.32v3.5h3.225v-.009zm.195 5.47c.34 0 .66-.03.96-.093.3-.06.56-.17.785-.328.224-.16.398-.38.52-.67.127-.285.19-.65.19-1.09 0-.85-.23-1.46-.69-1.83-.455-.37-1.058-.556-1.81-.556H3.32v4.57h3.42v-.003zM16.132 16.36c.473.53 1.155.79 2.044.79.636 0 1.185-.165 1.65-.49.465-.33.745-.67.84-1.02h2.793c-.45 1.39-1.12 2.39-2.01 3.01-.89.62-1.96.93-3.22.93-1.04 0-1.94-.16-2.73-.487a5.644 5.644 0 01-1.98-1.385 5.88 5.88 0 01-1.19-2.14c-.273-.82-.41-1.72-.41-2.7 0-.94.14-1.82.43-2.64.288-.82.7-1.53 1.23-2.14a5.52 5.52 0 011.98-1.42c.78-.34 1.65-.51 2.63-.51 1.07 0 2 .2 2.78.61.78.41 1.42.96 1.92 1.66.51.7.87 1.51 1.08 2.43.22.92.28 1.9.18 2.95h-8.35c.06 1.01.37 1.78.84 2.31v.003zm3.58-6.82c-.37-.45-1-.68-1.88-.68-.55 0-1.01.09-1.38.28-.37.19-.66.43-.87.73-.21.3-.36.61-.44.96-.08.35-.14.66-.16.97h5.52c-.13-.96-.42-1.82-.79-2.26v-.001zM15.1 4.4H21v1.55h-5.9V4.4z"})})},{key:"googleBusiness",label:"Google Business",placeholder:"https://g.page/...",icon:(0,S.jsx)("svg",{className:"w-4 h-4 text-[#4285F4]",viewBox:"0 0 24 24",fill:"currentColor",children:(0,S.jsx)("path",{d:"M12 11.4054V15.3054H18.3816C18.0552 16.9582 16.5288 20.1054 12 20.1054C8.08919 20.1054 4.8912 16.8438 4.8912 12.855C4.8912 8.86619 8.08919 5.6046 12 5.6046C14.2152 5.6046 15.7104 6.5334 16.5672 7.3566L19.5768 4.4526C17.5992 2.6046 14.9568 1.5054 12 1.5054C5.82239 1.5054.792 6.5358.792 12.855C.792 19.1742 5.82239 24.2046 12 24.2046C18.48 24.2046 23.1648 19.2534 23.1648 13.0134C23.1648 12.3798 23.0928 11.8926 23.0064 11.4054H12Z"})})}].map(e=>{var t;let{key:o,label:s,placeholder:a,icon:r}=e;return(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)("div",{className:"flex-shrink-0 w-6 flex justify-center",title:s,children:r}),(0,S.jsx)("input",{type:"url",value:(null===(t=u.socialMedia)||void 0===t?void 0:t[o])||"",placeholder:a,onChange:e=>A({socialMedia:(0,n.A)((0,n.A)({},u.socialMedia),{},{[o]:e.target.value})}),className:"flex-1 px-2 py-1.5 border rounded text-sm"})]},o)})})]}),ce?(0,S.jsxs)("div",{className:"border-t pt-6",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,S.jsx)(H.A,{className:"w-5 h-5 text-green-600"}),(0,S.jsx)("h3",{children:ae("properties.googleCalendar")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:ae("properties.calendarConnection")}),u.googleCalendarConnected?(0,S.jsx)(S.Fragment,{children:(0,S.jsx)("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4",children:(0,S.jsxs)("div",{className:"flex items-start gap-3",children:[(0,S.jsx)(R.A,{className:"w-5 h-5 text-green-600 flex-shrink-0 mt-0.5"}),(0,S.jsxs)("div",{className:"flex-1",children:[(0,S.jsx)("p",{className:"text-sm text-green-900 mb-1",children:"Calendar Connected"}),(0,S.jsxs)("p",{className:"text-xs text-green-700 mb-3",children:["Bookings will be automatically added to: ",(0,S.jsx)("span",{className:"font-mono",children:u.googleCalendarEmail||"your calendar"})]}),(0,S.jsx)("button",{onClick:async()=>
1{if(confirm("Disconnect Google Calendar? New bookings will not be added to your calendar."))try{const e=localStorage.getItem("token");await fetch("/api/client/google/calendar/disconnect",{method:"POST",headers:{Authorization:"Bearer ".concat(e)}}),A({googleCalendarConnected:!1,googleCalendarEmail:void 0})}catch(e){console.error("Failed to disconnect Google Calendar:",e),alert("Failed to disconnect. Please try again.")}},className:"text-xs text-green-700 hover:text-green-900 underline",children:"Disconnect"})]})]})})}):(0,S.jsx)(S.Fragment,{children:(0,S.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4",children:(0,S.jsxs)("div",{className:"flex items-start gap-3",children:[(0,S.jsx)(O.A,{className:"w-5 h-5 text-gray-400 flex-shrink-0 mt-0.5"}),(0,S.jsxs)("div",{className:"flex-1",children:[(0,S.jsx)("p",{className:"text-sm text-gray-900 mb-1",children:"Not Connected"}),(0,S.jsx)("p",{className:"text-xs text-gray-600 mb-3",children:"Connect your Google Calendar to automatically add bookings from your website"}),(0,S.jsxs)("button",{onClick:async()=>{try{const e=localStorage.getItem("token"),t=await fetch("/api/client/google/calendar/connect",{headers:{Authorization:"Bearer ".concat(e)}}),o=await t.json();o.authorization_url?window.location.href=o.authorization_url:alert("Failed to get authorization URL. Please try again.")}catch(e){console.error("Failed to connect Google Calendar:",e),alert("Failed to connect. Please try again.")}},className:"flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors text-sm",children:[(0,S.jsx)(H.A,{className:"w-4 h-4"}),"Connect Google Calendar"]})]})]})})}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Bookings from your website will automatically sync to your Google Calendar"})]})]}):(0,S.jsxs)("div",{className:"border-t pt-6",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,S.jsx)(H.A,{className:"w-5 h-5 text-gray-400"}),(0,S.jsx)("h3",{className:"text-gray-600",children:ae("properties.googleCalendarIntegration")})]}),(0,S.jsx)("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-4",children:(0,S.jsxs)("div",{className:"flex items-start gap-3",children:[(0,S.jsx)(H.A,{className:"w-5 h-5 text-amber-600 flex-shrink-0 mt-0.5"}),(0,S.jsxs)("div",{className:"flex-1",children:[(0,S.jsx)("p",{className:"text-sm text-amber-900 mb-1",children:ae("properties.calendarSectionRequired")}),(0,S.jsx)("p",{className:"text-xs text-amber-700",children:ae("properties.calendarSectionHelpText")})]})]})})]})]})}const bt=()=>{if(!l||!o||!ne)return null;if(!me(l.type))return null;const e=function(e,t){switch(e.type){case"testimonials":{const n=e;for(const e of n.testimonials){var o;if(e.quote.id===t||e.author.id===t||e.role.id===t||(null===(o=e.avatar)||void 0===o?void 0:o.id)===t)return e.id}return null}case"pricing":{const o=e;for(const e of o.tiers)if(e.name.id===t||e.price.id===t||e.button.id===t||e.features.some(e=>e.id===t))return e.id;return null}case"services":{const o=e;for(const e of o.services){var n;if(e.title.id===t||e.description.id===t||e.image.id===t||(null===(n=e.button)||void 0===n?void 0:n.id)===t)return e.id}return null}case"wellness-programs":{const o=e;for(const e of o.programs){var s;if(e.title.id===t||e.description.id===t||e.image.id===t||e.duration.id===t||(null===(s=e.button)||void 0===s?void 0:s.id)===t)return e.id}return null}case"features":{const o=e;for(const e of o.features)if(e.title.id===t||e.description.id===t||e.icon.id===t)return e.id;return null}case"business-team":{const o=e;for(const e of o.members)if(e.name.id===t||e.role.id===t||e.bio.id===t||e.image.id===t)return e.id;return null}case"coaching-packages":{const o=e;for(const e of o.packages)if(e.name.id===t||e.description.id===t||e.sessions.id===t||e.price.id===t||e.button.id===t||e.features.some(e=>e.id===t))return e.id;return null}case"member-benefits":{const o=e;for(const e of o.benefits)if(e.title.id===t||e.description.id===t||e.icon.id===t)return e.id;return null}case"portfolio":{const o=e;for(const e of o.portfolioItems){var a,r;if(e.title.id===t||e.description.id===t||e.image.id===t||(null===(a=e.category)||void 0===a?void 0:a.id)===t||(null===(r=e.link)||void 0===r?void 0:r.id)===t)return e.id}return null}case"slider":{const o=e;for(const e of o.slides){var i,l,c,d;if((null===(i=e.image)||void 0===i?void 0:i.id)===t||(null===(l=e.title)||void 0===l?void 0:l.id)===t||(null===(c=e.description)||void 0===c?void 0:c.id)===t||(null===(d=e.link)||void 0===d?void 0:d.id)===t)return e.id}return null}case"sponsors":{const o=e;for(const e of o.sponsors)if(e.image.id===t||e.name.id===t)return e.id;return null}default:return null}}(l,o.id);if(!e)return null;if(ue(l)<=1)return null;const t=ae("itemTypes.".concat(pe(l.type)));return(0,S.jsxs)("div",{className:"border-t pt-4 mt-4",children:[(0,S.jsxs)("button",{onClick:()=>{window.confirm(ae("properties.confirmRemove",{itemName:t}))&&ne(l.id,e)},className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-red-500 text-white rounded-lg hover:bg-red-600 transition-colors",children:[(0,S.jsx)(_.A,{className:"w-4 h-4"}),ae("properties.removeThis",{itemName:t})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 text-center mt-2",children:ae("properties.deleteEntire",{itemName:t.toLowerCase()})})]})},yt=()=>{if(console.log("\ud83d\udd18 renderServiceButtonControls called:",{hasSelectedSection:!!l,sectionType:null===l||void 0===l?void 0:l.type,hasSelectedElement:!!o,selectedElementId:null===o||void 0===o?void 0:o.id}),!l||"services"!==l.type||!o)return console.log("\ud83d\udd18 Early return - conditions not met"),null;const e=l.services.find(e=>{var t;return e.image.id===o.id||e.title.id===o.id||e.description.id===o.id||(null===(t=e.button)||void 0===t?void 0:t.id)===o.id});if(console.log("\ud83d\udd18 Service found:",{found:!!e,serviceId:null===e||void 0===e?void 0:e.id,hasButton:!(null===e||void 0===e||!e.button)}),!e)return null;const t=!!e.button;return(0,S.jsxs)("div",{className:"border-t pt-4 mt-4",children:[t?(0,S.jsxs)("button",{onClick:()=>
1{if(window.confirm(ae("properties.removeButtonFromService"))){const t=l.services.map(t=>{if(t.id===e.id){const{button:e,buttonVisible:o}=t;return(0,s.A)(t,Xt)}return t});w(l.id,{services:t})}},className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-orange-500 text-white rounded-lg hover:bg-orange-600 transition-colors",children:[(0,S.jsx)(_.A,{className:"w-4 h-4"}),ae("properties.removeButton")]}):(0,S.jsxs)("button",{onClick:()=>{const t={id:"button-".concat(Date.now()),text:"Learn More",url:"#contact",fontFamily:"Inter",backgroundColor:"#3b82f6",textColor:"#ffffff",size:"medium"},o=l.services.map(o=>o.id===e.id?(0,n.A)((0,n.A)({},o),{},{button:t,buttonVisible:!0}):o);w(l.id,{services:o})},className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-green-500 text-white rounded-lg hover:bg-green-600 transition-colors",children:[(0,S.jsx)(g.A,{className:"w-4 h-4"}),"Add Button to Service"]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 text-center mt-2",children:t?"Remove the call-to-action button from this service":"Add a call-to-action button to this service"})]})};if("text"===r&&o){const e=o;return(0,S.jsxs)("div",{className:"p-4 space-y-4",children:[(0,S.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,S.jsx)("h3",{children:ae("properties.editText")}),(0,S.jsx)("button",{onClick:()=>j(e.id),className:"p-2 hover:bg-red-100 text-red-600 rounded",children:(0,S.jsx)(N.A,{className:"w-4 h-4"})})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.content")}),(0,S.jsxs)("div",{className:"space-y-2",children:[(0,S.jsx)("div",{className:"builder-quill-wrapper",style:{fontWeight:e.fontWeight||void 0,fontStyle:e.fontStyle||void 0,textDecoration:e.textDecoration||void 0},children:(0,S.jsx)(Jt.A,{theme:"snow",defaultValue:(0,C._A)(e.content,x),onChange:t=>((e,t,o)=>{const n="<p><br></p>"===e?"":e;rt.current={value:n,elementId:t,currentValue:o},st.current&&clearTimeout(st.current),st.current=setTimeout(()=>ct(),1200)})(t,e.id,e.content),onBlur:()=>ct(),modules:Qt,formats:Kt},"txt-".concat(e.id,"-").concat(x,"-").concat(ot))}),(0,S.jsx)("button",{onClick:()=>lt((0,C._A)(e.content,x),"content",e.id),disabled:fe&&be==="content"+e.id,className:"w-full px-3 py-2 bg-gradient-to-r from-purple-500 to-pink-500 text-white rounded-lg hover:from-purple-600 hover:to-pink-600 transition-all flex items-center justify-center gap-2 text-sm disabled:opacity-50 disabled:cursor-not-allowed",children:fe&&be==="content"+e.id?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(I.A,{className:"w-4 h-4 animate-spin"}),ae("properties.rephrasing")]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(B.A,{className:"w-4 h-4"}),ae("properties.rephraseWithAI")]})})]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.fontFamily")}),(0,S.jsx)("select",{value:e.fontFamily,onChange:t=>v(e.id,{fontFamily:t.target.value}),className:"w-full p-2 border rounded-lg",children:ge(e.fontFamily).map(e=>(0,S.jsx)("option",{value:e,children:e},e))})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.fontSize")||"Taille du texte"}),(0,S.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,S.jsxs)("select",{value:e.fontSize||"16px",onChange:t=>v(e.id,{fontSize:t.target.value}),className:"flex-1 p-2 border rounded-lg",children:[(0,S.jsx)("option",{value:"12px",children:"12 px \u2014 Tr\xe8s petit"}),(0,S.jsx)("option",{value:"14px",children:"14 px \u2014 Petit"}),(0,S.jsx)("option",{value:"16px",children:"16 px \u2014 Normal"}),(0,S.jsx)("option",{value:"18px",children:"18 px \u2014 Moyen"}),(0,S.jsx)("option",{value:"20px",children:"20 px \u2014 Grand"}),(0,S.jsx)("option",{value:"24px",children:"24 px \u2014 Tr\xe8s grand"}),(0,S.jsx)("option",{value:"28px",children:"28 px \u2014 Titre"}),(0,S.jsx)("option",{value:"32px",children:"32 px \u2014 Titre L"}),(0,S.jsx)("option",{value:"40px",children:"40 px \u2014 Titre XL"}),(0,S.jsx)("option",{value:"48px",children:"48 px \u2014 Hero"}),(0,S.jsx)("option",{value:"64px",children:"64 px \u2014 Hero XL"})]}),(0,S.jsx)("input",{type:"text",value:e.fontSize||"",onChange:t=>v(e.id,{fontSize:t.target.value}),placeholder:"ex: 18px",className:"w-20 p-2 border rounded-lg text-sm",title:"Valeur personnalis\xe9e (ex: 17px, 1.2rem)"})]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.textColor")}),(0,S.jsx)(oo,{value:e.color,onChange:t=>v(e.id,{color:t}),placeholder:ae("placeholders.colorBlack")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:"Style"}),(0,S.jsxs)("div",{className:"flex gap-2",children:[(0,S.jsx)("button",{type:"button",onClick:()=>v(e.id,{fontWeight:"bold"===e.fontWeight||"700"===e.fontWeight?"normal":"bold"}),className:"px-3 py-2 border rounded-lg flex items-center gap-2 transition-colors ".concat("bold"===e.fontWeight||"700"===e.fontWeight?"bg-blue-500 text-white border-blue-500":"bg-white hover:bg-gray-50"),children:(0,S.jsx)(U.A,{className:"w-4 h-4"})}),(0,S.jsx)("button",{type:"button",onClick:()=>v(e.id,{fontStyle:"italic"===e.fontStyle?"normal":"italic"}),className:"px-3 py-2 border rounded-lg flex items-center gap-2 transition-colors ".concat("italic"===e.fontStyle?"bg-blue-500 text-white border-blue-500":"bg-white hover:bg-gray-50"),children:(0,S.jsx)(q.A,{className:"w-4 h-4"})}),(0,S.jsx)("button",{type:"button",onClick:()=>v(e.id,{textDecoration:"underline"===e.textDecoration?"none":"underline"}),className:"px-3 py-2 border rounded-lg flex items-center gap-2 transition-colors ".concat("underline"===e.textDecoration?"bg-blue-500 text-white border-blue-500":"bg-white hover:bg-gray-50"),children:(0,S.jsx)(V.A,{className:"w-4 h-4"})})]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.textAlignment")}),(0,S.jsx)("div",{className:"flex gap-2",children:["left","center","right","justify"].map(t=>{const o=e.textAlign===t,n="left"===t?W.A:"center"===t?G.A:"right"===t?J.A:X.A,s=ae("left"
1===t?"common.left":"center"===t?"common.center":"right"===t?"common.right":"common.justify");return(0,S.jsxs)("button",{type:"button",onClick:()=>v(e.id,{textAlign:o?void 0:t}),className:"flex-1 px-2 py-2 border rounded-lg flex items-center justify-center gap-1 transition-colors ".concat(o?"bg-blue-500 text-white border-blue-500":"bg-white hover:bg-gray-50"),children:[(0,S.jsx)(n,{className:"w-4 h-4"}),(0,S.jsx)("span",{className:"text-xs",children:s})]},t)})}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:e.textAlign?"fr"===x?"Alignement global activ\xe9 \u2014 cliquez \xe0 nouveau pour d\xe9sactiver":"Global alignment active \u2014 click again to deselect":"fr"===x?"Alignement par paragraphe (\xe9diteur de texte)":"Per-paragraph alignment (text editor)"})]}),mt(),yt(),bt()]})}if("button"===r&&o){const e=o,t=l&&("services"===l.type||"pricing"===l.type||"wellness-programs"===l.type||"coaching-packages"===l.type);let s=null;return l&&t&&("services"===l.type?s=l.services.find(t=>{var o;return(null===(o=t.button)||void 0===o?void 0:o.id)===e.id}):"pricing"===l.type?s=l.tiers.find(t=>
1t.button.id===e.id):"wellness-programs"===l.type?s=l.programs.find(t=>{var o;return(null===(o=t.button)||void 0===o?void 0:o.id)===e.id}):"coaching-packages"===l.type&&(s=l.packages.find(t=>t.button.id===e.id))),(0,S.jsxs)("div",{className:"p-4 space-y-4",children:[(0,S.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,S.jsx)("h3",{children:ae("properties.editButton")}),(0,S.jsx)("button",{onClick:()=>j(e.id),className:"p-2 hover:bg-red-100 text-red-600 rounded",children:(0,S.jsx)(N.A,{className:"w-4 h-4"})})]}),s&&t&&(0,S.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3 mb-4",children:[(0,S.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,S.jsx)("label",{className:"block text-sm",children:ae("properties.showButton")}),(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[void 0===s.buttonVisible||!0===s.buttonVisible?(0,S.jsx)(b.A,{className:"w-4 h-4 text-green-600"}):(0,S.jsx)(y.A,{className:"w-4 h-4 text-gray-400"}),(0,S.jsx)("input",{type:"checkbox",checked:void 0===s.buttonVisible||!0===s.buttonVisible,onChange:t=>{if("services"===l.type){const o=l.services.map(o=>{var s;return(null===(s=o.button)||void 0===s?void 0:s.id)===e.id?(0,n.A)((0,n.A)({},o),{},{buttonVisible:t.target.checked}):o});w(l.id,{services:o})}else if("pricing"===l.type){const o=l.tiers.map(o=>o.button.id===e.id?(0,n.A)((0,n.A)({},o),{},{buttonVisible:t.target.checked}):o);w(l.id,{tiers:o})}else if("wellness-programs"===l.type){const o=l.programs.map(o=>{var s;return(null===(s=o.button)||void 0===s?void 0:s.id)===e.id?(0,n.A)((0,n.A)({},o),{},{buttonVisible:t.target.checked}):o});w(l.id,{programs:o})}else if("coaching-packages"===l.type){const o=l.packages.map(o=>o.button.id===e.id?(0,n.A)((0,n.A)({},o),{},{buttonVisible:t.target.checked}):o);w(l.id,{packages:o})}},className:"w-4 h-4 text-blue-600 rounded"})]})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500",children:"Toggle visibility of this button (it will be hidden but settings are preserved)"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.buttonText")}),(0,S.jsxs)("div",{className:"space-y-2",children:[(0,S.jsx)("input",{type:"text",value:Qe,onChange:t=>{return o=t.target.value,s=e.id,a=e.text,Ke(o),at.current&&clearTimeout(at.current),void(at.current=setTimeout(()=>{const e=localStorage.getItem("token"),t="object"===typeof a&&null!==a?(0,n.A)((0,n.A)({},a),{},{[x]:o}):{en:"en"===x?o:"",fr:"fr"===x?o:""};v(s,{text:t}),setTimeout(async()=>{try{const n=await(0,Gt.Gj)(o,x,t,e||void 0);v(s,{text:n})}catch(n){console.error("Auto-translation error:",n)}},1e3)},150));var o,s,a},onFocus:()=>tt(!0),onBlur:()=>tt(!1),className:"w-full p-2 border rounded-lg"}),(0,S.jsx)("button",{onClick:()=>lt((0,C._A)(e.text,x),"content",e.id),disabled:fe&&be==="content"+e.id,className:"w-full px-3 py-2 bg-gradient-to-r from-purple-500 to-pink-500 text-white rounded-lg hover:from-purple-600 hover:to-pink-600 transition-all flex items-center justify-center gap-2 text-sm disabled:opacity-50 disabled:cursor-not-allowed",children:fe&&be==="content"+e.id?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(I.A,{className:"w-4 h-4 animate-spin"}),ae("properties.rephrasing")]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(B.A,{className:"w-4 h-4"}),ae("properties.rephraseWithAI")]})})]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:ae("properties.linkDestination")}),(0,S.jsxs)("div",{className:"flex gap-2 mb-3",children:[(0,S.jsxs)("button",{onClick:()=>Fe("external"),className:"flex-1 py-2 px-3 text-xs rounded-lg border transition-all ".concat("external"===ze?"bg-blue-50 border-blue-500 text-blue-700":"bg-white border-gray-300 text-gray-600 hover:bg-gray-50"),children:[(0,S.jsx)(M.A,{className:"w-3 h-3 inline mr-1"}),ae("properties.externalUrl")]}),(0,S.jsxs)("button",{onClick:()=>Fe("page"),className:"flex-1 py-2 px-3 text-xs rounded-lg border transition-all ".concat("page"===ze?"bg-blue-50 border-blue-500 text-blue-700":"bg-white border-gray-300 text-gray-600 hover:bg-gray-50"),children:[(0,S.jsx)(z.A,{className:"w-3 h-3 inline mr-1"}),ae("properties.page")]}),(0,S.jsxs)("button",{onClick:()=>Fe("section"),className:"flex-1 py-2 px-3 text-xs rounded-lg border transition-all ".concat("section"===ze?"bg-blue-50 border-blue-500 text-blue-700":"bg-white border-gray-300 text-gray-600 hover:bg-gray-50"),children:[(0,S.jsx)(F.A,{className:"w-3 h-3 inline mr-1"}),ae("properties.section")]})]}),"external"===ze&&(0,S.jsxs)("div",{children:[(0,S.jsx)("input",{type:"text",value:e.url.startsWith("#")||e.url.startsWith("/")?"":e.url,onChange:t=>v(e.id,{url:t.target.value,linkType:"external"}),placeholder:ae("placeholders.buttonUrl"),className:"w-full p-2 border rounded-lg"}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.enterFullUrl")})]}),"page"===ze&&(0,S.jsxs)("div",{children:[(0,S.jsxs)("select",{value:e.url.startsWith("/")?e.url.substring(1):"",onCh
1ange:t=>{const o=m.find(e=>e.slug===t.target.value);o&&v(e.id,{url:"/".concat(o.slug),linkType:"page",targetPageId:o.id})},className:"w-full p-2 border rounded-lg",children:[(0,S.jsx)("option",{value:"",children:ae("properties.selectPage")}),m.map(e=>{const t="object"===typeof e.name&&null!==e.name?(0,C._A)(e.name,x):e.name;return(0,S.jsxs)("option",{value:e.slug,children:[t," ","home"===e.slug?"(".concat(ae("common.home"),")"):""]},e.id)})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.linkToPage")})]}),"section"===ze&&(0,S.jsxs)("div",{children:[(0,S.jsxs)("select",{value:e.targetSectionId||(e.url.startsWith("#")?e.url.substring(1):""),onChange:t=>{const o=t.target.value;if(o.includes(":")){const[t,n]=o.split(":");v(e.id,{url:"/".concat(t,"#").concat(n),linkType:"section",targetSectionId:n,targetPageSlug:t})}else v(e.id,{url:"#".concat(o),linkType:"section",targetSectionId:o,targetPageSlug:void 0})},className:"w-full p-2 border rounded-lg",children:[(0,S.jsx)("option",{value:"",children:ae("properties.selectSection")}),h.length>0&&(0,S.jsx)("optgroup",{label:ae("properties.currentPage")||"Page actuelle",children:h.map(e=>{var t,o;let n=e.type.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return"sectionTitle"in e&&null!==(t=e.sectionTitle)&&void 0!==t&&t.content?n=$t((0,C._A)(e.sectionTitle.content,x)):"headline"in e&&null!==(o=e.headline)&&void 0!==o&&o.content&&(n=$t((0,C._A)(e.headline.content,x))),(0,S.jsx)("option",{value:e.id,children:n},e.id)})}),m.filter(e=>e.id!==p&&e.sections.length>0).map(e=>{const t="object"===typeof e.name&&null!==e.name?(0,C._A)(e.name,x):e.name;return(0,S.jsx)("optgroup",{label:t,children:e.sections.map(t=>{var o,n;let s=t.type.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return"sectionTitle"in t&&null!==(o=t.sectionTitle)&&void 0!==o&&o.content?s=$t((0,C._A)(t.sectionTitle.content,x)):"headline"in t&&null!==(n=t.headline)&&void 0!==n&&n.content&&(s=$t((0,C._A)(t.headline.content,x))),(0,S.jsx)("option",{value:"".concat(e.slug,":").concat(t.id),children:s},t.id)})},e.id)})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.smoothScrollTo")})]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.backgroundColor")}),(0,S.jsx)(oo,{value:e.backgroundColor,onChange:t=>v(e.id,{backgroundColor:t}),placeholder:ae("placeholders.colorBlack")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.textColor")}),(0,S.jsx)(oo,{value:e.textColor,onChange:t=>v(e.id,{textColor:t}),placeholder:ae("placeholders.colorWhite")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.buttonSize")}),(0,S.jsx)("select",{value:e.size,onChange:t=>v(e.id,{size:t.target.value}),className:"w-full p-2 border rounded-lg",children:he.map(e=>(0,S.jsx)("option",{value:e,children:ae("common.".concat(e))},e))})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.fontFamily")}),(0,S.jsx)("select",{value:e.fontFamily,onChange:t=>v(e.id,{fontFamily:t.target.value}),className:"w-full p-2 border rounded-lg",children:ge(e.fontFamily).map(e=>(0,S.jsx)("option",{value:e,children:e},e))})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.buttonAlignment")}),(0,S.jsxs)("div",{className:"flex gap-2",children:[(0,S.jsxs)("button",{type:"button",onClick:()=>v(e.id,{alignment:"left"}),className:"flex-1 px-2 py-2 border rounded-lg flex items-center justify-center gap-1 transition-colors ".concat("left"===(e.alignment||"left")?"bg-blue-500 text-white border-blue-500":"bg-white hover:bg-gray-50"),children:[(0,S.jsx)(W.A,{className:"w-4 h-4"}),(0,S.jsx)("span",{className:"text-xs",children:ae("common.left")})]}),(0,S.jsxs)("button",{type:"button",onClick:()=>v(e.id,{alignment:"center"}),className:"flex-1 px-2 py-2 border rounded-lg flex items-center justify-center gap-1 transition-colors ".concat("center"===e.alignment?"bg-blue-500 text-white border-blue-500":"bg-white hover:bg-gray-50"),children:[(0,S.jsx)(G.A,{className:"w-4 h-4"}),(0,S.jsx)("span",{className:"text-xs",children:ae("common.center")})]}),(0,S.jsxs)("button",{type:"button",onClick:()=>v(e.id,{alignment:"right"}),className:"flex-1 px-2 py-2 border rounded-lg flex items-center justify-center gap-1 transition-colors ".concat("right"===e.alignment?"bg-blue-500 text-white border-blue-500":"bg-white hover:bg-gray-50"),children:[(0,S.jsx)(J.A,{className:"w-4 h-4"}),(0,S.jsx)("span",{className:"text-xs",children:ae("common.right")})]})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.chooseButtonAlignment")})]}),bt()]})}if("image"===r&&o){var vt,jt,Nt;const e=o,t="features"===(null===l||void 0===l?void 0:l.type)&&(null===(vt=l.features)||void 0===vt?void 0:vt.some(t=>t.icon.id===e.id)),s="member-benefits"===(null===l||void 0===l?void 0:l.type)&&(null===(jt=l.benefits)||void 0===jt?void 0:jt.some(t=>t.icon.id===e.id));return(0,S.jsxs)("div",{className:"p-4 space-y-4",children:[(0,S.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,S.jsx)("h3",{children:ae(t?"properties.editFeatureIcon":s?"properties.editBenefitIcon":"properties.editImage")}),(0,S.jsx)("button",{onClick:()=>j(e.id),className:"p-2 hover:bg-red-100 text-red-600 rounded",children:(0,S.jsx)(N.A,{className:"w-4 h-4"})})]}),(t||s)&&(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:ae("properties.chooseIcon")}),(0,S.jsx)("div",{className:"bg-gradient-to-r from-blue-50 to-purple-50 border border-blue-200 rounded-lg p-3",children:Rt.map(o=>{const s=Ot.filter(e=>e.category===o);return 0===s.length?null:(0,S.jsxs)("div",{className:"mb-4 last:mb-0",children:[(0,S.jsx)("p",{className:"text-xs font-semibold text-gray-600 mb-2",children:o}),(0,S.jsx)("div",{className:"grid grid-cols-6 gap-2",children:s.map(o=>{var s,a;const r=o.component,i=t?null===(s=l.features)||void 0===s?void 0:s.find(t=>t.icon.id===e.id):null===(a=l.benefits)||void 0===a?void 0:a.find(t=>t.icon.id===e.id),c=(null===i||void 0===i?void 0:i.iconId)===o.id;return(0,S.jsx)("button",{onClick:()=>
1{if(l&&i)if(t){var s;const t=null===(s=l.features)||void 0===s?void 0:s.map(t=>t.icon.id===e.id?(0,n.A)((0,n.A)({},t),{},{iconType:"lucide",iconId:o.id,iconColor:t.iconColor||"#3b82f6",iconSize:t.iconSize||48}):t);w(l.id,{features:t})}else{var a;const t=null===(a=l.benefits)||void 0===a?void 0:a.map(t=>t.icon.id===e.id?(0,n.A)((0,n.A)({},t),{},{iconType:"lucide",iconId:o.id,iconColor:t.iconColor||"#3b82f6",iconSize:t.iconSize||48}):t);w(l.id,{benefits:t})}},className:"p-2 rounded-lg transition-all hover:bg-white hover:shadow-md ".concat(c?"bg-blue-500 text-white shadow-lg":"bg-white/50"),title:o.name,children:(0,S.jsx)(r,{size:24})},o.id)})})]},o)})}),l&&((o,s)=>{const a=t?null===(o=l.features)||void 0===o?void 0:o.find(t=>t.icon.id===e.id):null===(s=l.benefits)||void 0===s?void 0:s.find(t=>t.icon.id===e.id);return a&&"lucide"===a.iconType?(0,S.jsxs)("div",{className:"space-y-3 mt-4 p-3 bg-gray-50 rounded border",children:[(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.iconColor")}),(0,S.jsx)(oo,{value:a.iconColor||"#3b82f6",onChange:o=>{if(t){var s;const t=null===(s=l.features)||void 0===s?void 0:s.map(t=>t.icon.id===e.id?(0,n.A)((0,n.A)({},t),{},{iconColor:o}):t);w(l.id,{features:t})}else{var a;const t=null===(a=l.benefits)||void 0===a?void 0:a.map(t=>t.icon.id===e.id?(0,n.A)((0,n.A)({},t),{},{iconColor:o}):t);w(l.id,{benefits:t})}},placeholder:ae("placeholders.colorPrimary")})]}),(0,S.jsxs)("div",{children:[(0,S.jsxs)("label",{className:"block text-sm mb-1",children:["Icon Size: ",a.iconSize||48,"px"]}),(0,S.jsx)("input",{type:"range",min:"24",max:"96",step:"8",value:a.iconSize||48,onChange:o=>{if(t){var s;const t=null===(s=l.features)||void 0===s?void 0:s.map(t=>t.icon.id===e.id?(0,n.A)((0,n.A)({},t),{},{iconSize:parseInt(o.target.value)}):t);w(l.id,{features:t})}else{var a;const t=null===(a=l.benefits)||void 0===a?void 0:a.map(t=>t.icon.id===e.id?(0,n.A)((0,n.A)({},t),{},{iconSize:parseInt(o.target.value)}):t);w(l.id,{benefits:t})}},className:"w-full"}),(0,S.jsxs)("div",{className:"flex justify-between text-xs text-gray-500 mt-1",children:[(0,S.jsx)("span",{children:"24px"}),(0,S.jsx)("span",{children:"96px"})]})]})]}):null})(),(0,S.jsx)("div",{className:"border-t pt-3 mt-3",children:(0,S.jsx)("p",{className:"text-xs text-gray-600 mb-2",children:"Or use a custom image:"})})]}),!t&&!s&&(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.currentImage")}),(0,S.jsx)("img",{src:e.url,alt:e.alt,className:"w-full h-32 object-cover rounded-lg"})]}),f&&(0,S.jsxs)("div",{children:[(0,S.jsx)("button",{type:"button",disabled:Ne,onClick:async()=>{const t=l;let o="",n="",s="service";const a=e=>{var t;if(!e)return"";const o=null!==(t=e.content)&&void 0!==t?t:e;if("string"===typeof o)return o.replace(/<[^>]+>/g,"").replace(/ /g," ").trim();if(o&&"object"===typeof o){const e=o.fr||o.en||"";return"string"===typeof e?e.replace(/<[^>]+>/g,"").replace(/ /g," ").trim():""}return""};if("services"===(null===t||void 0===t?void 0:t.type)&&Array.isArray(t.services)){const r=t.services.find(t=>{var o;return(null===(o=t.image)||void 0===o?void 0:o.id)===e.id});r&&(o=a(r.title),n=a(r.description),s="service")}else if("features"===(null===t||void 0===t?void 0:t.type)&&Array.isArray(t.features)){const r=t.features.find(t=>{var o;return(null===(o=t.icon)||void 0===o?void 0:o.id)===e.id});r&&(o=a(r.title),n=a(r.description),s="feature")}else"hero"===(null===t||void 0===t?void 0:t.type)&&(o=a(t.headline),n=a(t.subheadline),s="hero");o||(o=a(null===t||void 0===t?void 0:t.sectionTitle)||a(null===t||void 0===t?void 0:t.headline)||e.alt||"Image"),we(!0);try{var r,i,c;const l=localStorage.getItem("token")||"",d="string"===typeof u.businessName?u.businessName:(null===(r=u.businessName)||void 0===r?void 0:r.fr)||(null===(i=u.businessName)||void 0===i?void 0:i.en)||"",g=u.tagline?"string"===typeof u.tagline?u.tagline:u.tagline.fr||u.tagline.en||"":"",x=m.find(e=>e.id===p),b=x?"object"===typeof x.name?x.name.fr||x.name.en||"":x.name||"":"",y=((null===x||void 0===x?void 0:x.sections)||h||[]).find(e=>"hero"===e.type),j=y?a(y.headline):"",N=y?a(y.subheadline):"",w=a(null===t||void 0===t?void 0:t.sectionTitle),C=[];"services"===(null===t||void 0===t?void 0:t.type)&&Array.isArray(t.services)?t.services.forEac
1h(t=>{var o;if((null===(o=t.image)||void 0===o?void 0:o.id)!==e.id){const e=a(t.title);e&&C.push(e)}}):"features"===(null===t||void 0===t?void 0:t.type)&&Array.isArray(t.features)&&t.features.forEach(t=>{var o;if((null===(o=t.icon)||void 0===o?void 0:o.id)!==e.id){const e=a(t.title);e&&C.push(e)}});const S=[d&&"Entreprise: ".concat(d),g&&"Slogan: ".concat(g),b&&"Page: ".concat(b),j&&"Titre de la page: ".concat(j),N&&"Sous-titre de la page: ".concat(N),w&&"Section: ".concat(w),C.length>0&&"Autres items de la section: ".concat(C.slice(0,5).join(", "))].filter(Boolean).join(" | "),A=await fetch("".concat(te.n,"/client/websites/").concat(f,"/generate-ai-images"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(l)},body:JSON.stringify({items:[{key:"single",title:o,description:n,type:s}],business_context:S})});if(!A.ok)return void _t.oR.error("fr"===re?"\xc9chec de la g\xe9n\xe9ration IA":"AI generation failed");const k=await A.json(),I=null===k||void 0===k||null===(c=k.images)||void 0===c?void 0:c.single;if(!I)return void _t.oR.error("fr"===re?"Aucune image g\xe9n\xe9r\xe9e":"No image generated");v(e.id,{url:I}),_t.oR.success("fr"===re?"Image r\xe9g\xe9n\xe9r\xe9e":"Image regenerated")}catch(d){console.error("[AI Image Regen]",d),_t.oR.error("fr"===re?"Erreur lors de la g\xe9n\xe9ration":"Generation error")}finally{we(!1)}},className:"w-full flex items-center justify-center gap-2 px-4 py-2.5 bg-gradient-to-r from-purple-600 to-pink-600 hover:from-purple-700 hover:to-pink-700 text-white font-medium rounded-lg transition-all disabled:opacity-60 disabled:cursor-not-allowed",children:Ne?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(I.A,{className:"w-4 h-4 animate-spin"}),"fr"===re?"G\xe9n\xe9ration en cours (20-40s)...":"Generating (20-40s)..."]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(P.A,{className:"w-4 h-4"}),"fr"===re?"R\xe9g\xe9n\xe9rer avec IA":"Regenerate with AI"]})}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"fr"===re?"G\xe9n\xe8re une nouvelle image unique avec FLUX.1.1-pro bas\xe9e sur le titre et le contexte.":"Generate a unique new image with FLUX.1.1-pro based on title and context."})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.imageUrl")}),(0,S.jsx)("input",{type:"text",value:e.url,onChange:t=>v(e.id,{url:t.target.value}),placeholder:ae("placeholders.imageUrl"),className:"w-full p-2 border rounded-lg text-sm"}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"fr"===re?"Collez une URL d'image depuis Unsplash, votre CDN, ou tout lien d'image public":"Paste an image URL from Unsplash, your CDN, or any public image link"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.orUploadImage")}),(0,S.jsx)("input",{type:"file",accept:"image/*",onChange:async t=>{var o;const n=null===(o=t.target.files)||void 0===o?void 0:o[0];if(n){const t=new FileReader;t.onloadend=async()=>{const o=t.result,n=await eo(o);v(e.id,{url:n})},t.readAsDataURL(n)}},className:"w-full px-3 py-2 border rounded text-sm file:mr-4 file:py-2 file:px-4 file:rounded file:border-0 file:text-sm file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100"}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"fr"===re?"T\xe9l\xe9versez une image depuis votre ordinateur":"Upload a new image from your computer"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.altText")}),(0,S.jsx)("input",{type:"text",value:e.alt,onChange:t=>v(e.id,{alt:t.target.value}),placeholder:ae("placeholders.imageAlt"),className:"w-full p-2 border rounded-lg"}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"fr"===re?"Important pour l'accessibilit\xe9 et le SEO":"Important for accessibility and SEO"})]}),(0,S.jsxs)("div",{className:"border-t pt-4",children:[(0,S.jsx)("label",{className:"block text-sm font-medium mb-2",children:"fr"===re?"Position de l'image":"Image Position"}),(0,S.jsx)("div",{className:"grid grid-cols-3 gap-1 w-32 mx-auto",children:[{pos:"top left",label:"\u2196"},{pos:"top center",label:"\u2191"},{pos:"top right",label:"\u2197"},{pos:"center left",label:"\u2190"},{pos:"center center",label:"\u25cf"},{pos:"center right",label:"\u2192"},{pos:"bottom left",label:"\u2199"},{pos:"bottom center",label:"\u2193"},{pos:"bottom right",label:"\u2198"}].map(t=>{let{pos:o,label:n}=t;return(0,S.jsx)("button",{onClick:()=>v(e.id,{objectPosition:o}),className:"w-10 h-10 rounded border text-sm font-bold transition-colors ".concat((e.objectPosition||"center center")===o?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-500 border-gray-300 hover:bg-gray-100"),title:o,children:n},o)})}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-2 text-center",children:"fr"===re?"Choisissez quelle partie de l'image est visible":"Choose which part of the image is visible"})]}),"sponsors"===(null===l||void 0===l?void 0:l.type)&&(0,S.jsxs)("div",{className:"border-t pt-4",children:[(0,S.jsxs)("label",{className:"block text-sm font-medium mb-1",children:["fr"===re?"Taille des logos":"Logo Size",": ",l.logoSize||80,"px"]}),(0,S.jsx)("input",{type:"range",min:30,max:200,step:5,value:"number"===typeof l.logoSize?l.logoSize:80,onChange:e=>w(l.id,{logoSize:parseInt(e.target.value)}),className:"w-full accent-blue-600"}),(0,S.jsxs)("div",{className:"flex justify-between text-xs text-gray-400 mt-1",children:[(0,S.jsx)("span",{children:"30px"}),(0,S.jsx)("span",{children:"200px"})]})]}),(0,S.jsxs)("div",{className:"text-sm text-gray-600 bg-blue-50 p-3 rounded border border-blue-200",children:[(0,S.jsxs)("p",{className:"mb-2",children:["\ud83d\udca1 ",(0,S.jsx)("strong",{children:"fr"===re?"Conseils image :":"Image Tips:"})]}),(0,S.jsxs)("ul",{className:"text-xs space-y-1 ml-4 list-disc",children:[(0,S.jsx)("li",{children:"fr"===re?"Ic\xf4nes : images carr\xe9es (ex: 256x256px)":"For icons: Use square images (e.g., 256x256px)"}),(0,S.jsx)("li",{children:"fr"===re?"Photos : au moins 800px de large":"For photos: Use at least 800px wide"}),(0,S.jsx)("li",{children:"fr"===re?"Collez des URLs Unsplash ou t\xe9l\xe9versez":"Paste Unsplash URLs or upload your own"})]})]}),"hero"===(null===l||void 0===l?void 0:l.type)&&(0,S.jsxs)("div",{className:"border-t pt-4 space-y-3",children:[(0,S.jsx)("h4",{className:"text-sm font-semibold text-gray-700",children:ae("properties.heroMediaType")}),(0,S.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,S.jsx)("button",{onClick:()=>w(l.id,{heroMediaType:"image"}),className:"p-2 border-2 rounded-lg text-xs font-medium transition-all ".concat(l.heroMediaType&&"image"!==l.heroMediaType?"border-gray-200 hover:border-gray-300":"border-blue-500 bg-blue-50 text-blue-700"),
1children:ae("properties.heroMediaImage")}),(0,S.jsx)("button",{onClick:()=>w(l.id,{heroMediaType:"video"}),className:"p-2 border-2 rounded-lg text-xs font-medium transition-all ".concat("video"===l.heroMediaType?"border-blue-500 bg-blue-50 text-blue-700":"border-gray-200 hover:border-gray-300"),children:ae("properties.heroMediaVideo")})]}),"video"===l.heroMediaType&&(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-xs mb-1",children:ae("properties.heroVideoUrl")}),(0,S.jsx)("input",{type:"text",value:l.videoUrl||"",onChange:e=>w(l.id,{videoUrl:e.target.value}),placeholder:ae("properties.heroVideoUrlPlaceholder"),className:"w-full p-2 border rounded-lg text-sm"}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.heroVideoUrlHelp")})]}),((null===(Nt=l.backgroundImage)||void 0===Nt?void 0:Nt.url)||l.videoUrl)&&(0,S.jsxs)("div",{className:"flex items-center gap-3 p-3 bg-gray-50 rounded-lg",children:[(0,S.jsx)("input",{type:"checkbox",id:"hero-media-bg-img",checked:l.mediaAsBackground||!1,onChange:e=>w(l.id,{mediaAsBackground:e.target.checked}),className:"w-4 h-4 text-blue-600 rounded"}),(0,S.jsxs)("label",{htmlFor:"hero-media-bg-img",className:"text-xs cursor-pointer",children:[(0,S.jsx)("div",{className:"font-medium",children:ae("properties.heroMediaAsBackground")}),(0,S.jsx)("div",{className:"text-gray-500",children:ae("properties.heroMediaAsBackgroundDesc")})]})]})]}),mt(),yt(),bt()]})}if(!o&&l&&!r){var wt,Ct,St,At,kt,It,Tt,zt,Ft,Mt;const e=me(l.type),t=e?ue(l):0,o=e?ae("itemTypes.".concat(pe(l.type))):"";return(0,S.jsxs)("div",{className:"p-4 space-y-4",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,S.jsx)(E.A,{className:"w-5 h-5 text-blue-600"}),(0,S.jsx)("h3",{children:ae("properties.sectionSettings")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.sectionType")}),(0,S.jsx)("p",{className:"text-sm text-gray-600 capitalize bg-gray-50 p-2 rounded",children:l.type})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm font-medium mb-1",children:"fr"===re?"Nom dans le menu":"Menu label"}),(0,S.jsx)("input",{type:"text",value:"object"===typeof l.menuLabel?(0,C._A)(l.menuLabel,x):l.menuLabel||"",onChange:e=>{const t=e.target.value,o=l.menuLabel,s="object"===typeof o&&o?(0,n.A)((0,n.A)({},o),{},{[x]:t}):{en:"en"===x?t:String(o||""),fr:"fr"===x?t:String(o||"")};w(l.id,{menuLabel:s});const a=localStorage.getItem("token");setTimeout(async()=>{try{const e=await(0,Gt.Gj)(t,x,s,a||void 0);w(l.id,{menuLabel:e})}catch(e){console.error("Menu label auto-translation error:",e)}},800)},placeholder:"fr"===re?"Ex: Nos r\xe9alisations":"Ex: Our Work",className:"w-full p-2 border rounded-lg text-sm"}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"fr"===re?'Change le nom affich\xe9 dans le menu de navigation du site (par d\xe9faut: "'+l.type.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")+'")':'Change the name shown in the site navigation menu (default: "'+l.type.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")+'")'})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.backgroundColor")}),(0,S.jsx)(oo,{value:l.backgroundColor,onChange:e=>w(l.id,{backgroundColor:e}),placeholder:ae("placeholders.colorWhite")})]}),"imagePosition"in l&&(0,S.jsxs)("div",{className:"border-t pt-4",children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:ae("properties.imagePosition")}),(0,S.jsxs)("div",{className:"flex gap-2",children:[(0,S.jsxs)("button",{onClick:()=>w(l.id,{imagePosition:"left"}),className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 rounded-lg border-2 transition-all ".concat("left"===l.imagePosition?"border-blue-600 bg-blue-50 text-blue-700":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"),children:[(0,S.jsx)(W.A,{className:"w-4 h-4"}),(0,S.jsx)("span",{className:"text-sm font-medium",children:ae("common.left")})]}),(0,S.jsxs)("button",{onClick:()=>w(l.id,{imagePosition:"right"}),className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 rounded-lg border-2 transition-all ".concat("right"===l.imagePosition?"border-blue-600 bg-blue-50 text-blue-700":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"),children:[(0,S.jsx)(J.A,{className:"w-4 h-4"}),(0,S.jsx)("span",{className:"text-sm font-medium",children:ae("common.right")})]})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Choose which side to display the image"})]}),"benefits"===l.type&&l.badge&&(0,S.jsxs)("div",{className:"border-t pt-4",children:[(0,S.jsxs)("label",{className:"flex items-center justify-between cursor-pointer",children:[(0,S.jsx)("span",{className:"text-sm",children:"Afficher le badge"}),(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[!0===l.badgeVisible?(0,S.jsx)(b.A,{className:"w-4 h-4 text-green-600"}):(0,S.jsx)(y.A,{className:"w-4 h-4 text-gray-400"}),(0,S.jsx)("input",{type:"checkbox",checked:!0===l.badgeVisible,onChange:e=>w(l.id,{badgeVisible:e.target.checked}),className:"w-4 h-4 text-blue-600 rounded"})]})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Masquer ou afficher le tag au-dessus du titre"})]}),("member-benefits"===l.type||"features"===l.type)&&(0,S.jsxs)("div",{className:"border-t pt-4",children:[(0,S.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:l.compactMode||!1,onChange:e=>w(l.id,{compactMode:e.target.checked}),className:"w-4 h-4 text-blue-600 rounded"}),(0,S.jsx)("span",{className:"text-sm",children:"Mode compact (expand au clic)"})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Affiche seulement les titres, le texte complet s'ouvre au clic"})]}),"business-team"===l.type&&"true"===localStorage.getItem("isFechamUser")&&(()=>{const e=l;return(0,S.jsxs)("div",{className:"border-t pt-4 space-y-3",children:[(0,S.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:e.showEmails||!1,onChange:e=>w(l.id,{showEmails:e.target.checked}),className:"w-4 h-4 text-blue-600 rounded"}),(0,S.jsx)("span",{className:"text-sm",children:"Afficher les emails"})]}),e.showEmails&&(0,S.jsxs)("div",{className:"space-y-2 pl-1",children:[0===De.length&&He&&(0,S.jsx)("p",{className:"text-xs text-amber-600",children:"Aucun profil utilisateur trouv\xe9."}),e.members.map(t=>{const o="object"===typeof t.name.content&&null!==t.name.content?t.name.content[x]||t.name.content.fr||t.name.content.en||"":t.name.content||"";return(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-xs text-gray-500 mb-0.5",children:o}),(0,S.jsxs)("select",{value:t.email||"",onChange:o=>{const s=e.members.map(e=>e.id===t.id?(0,n.A)((0,n.A)({},e),{},{email:o.target.value}):e);w(l.id,{members:s})},className:"w-full p-1.5 border rounded text-sm bg-white",children:[(0,S.jsx)("option",{value:"",children:"\u2014 S\xe9lectionner un profil \u2014"}),De.map(e=>(0,S.jsxs)("option",{value:e.email,children:[e.prenom," ",e.nom," (",e.email,")"]},e.id))]})]},t.id)})]})]})})(),"newsletter"===l.type&&(0,S.jsx)(so,{value:l.assignedNewsletterId||"",onChange:e=>w(l.id,{assignedNewsletterId:e||null}),language:re}),"reservation-calendar"===l.type&&(0,S.jsxs)("div",{className:"border-t pt-4 space-y-4",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,S.jsx)(E.A,{className:"w-4 h-4 text-purple-600"}),(0,S.jsx)("h4",{className:"text-sm font-semibold",children:ae("properties.calendarColors")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.calendarWidgetBackgroun
1d")}),(0,S.jsx)(oo,{value:l.calendarBackgroundColor||"#ffffff",onChange:e=>w(l.id,{calendarBackgroundColor:e}),placeholder:ae("placeholders.colorWhite")}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.calendarWidgetBackgroundHelp")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.timeSlotButtonBackground")}),(0,S.jsx)(oo,{value:l.timeSlotBackgroundColor||"#ffffff",onChange:e=>w(l.id,{timeSlotBackgroundColor:e}),placeholder:ae("placeholders.colorWhite")}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.timeSlotButtonBackgroundHelp")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.timeSlotTextColor")}),(0,S.jsx)(oo,{value:l.timeSlotTextColor||"#000000",onChange:e=>w(l.id,{timeSlotTextColor:e}),placeholder:ae("placeholders.colorBlack")}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.timeSlotTextColorHelp")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.headerTextColor")}),(0,S.jsx)(oo,{value:l.headerTextColor||"#000000",onChange:e=>w(l.id,{headerTextColor:e}),placeholder:ae("placeholders.colorBlack")}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.headerTextColorHelp")})]})]}),"slider"===l.type&&(0,S.jsxs)("div",{className:"border-t pt-4 space-y-4",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,S.jsx)(E.A,{className:"w-4 h-4 text-blue-600"}),(0,S.jsx)("h4",{className:"text-sm font-semibold",children:ae("properties.sliderDimensions")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.sliderHeight")}),(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)("input",{type:"range",min:"150",max:"900",step:"10",value:parseInt(l.slideHeight)||400,onChange:e=>w(l.id,{slideHeight:"".concat(e.target.value,"px")}),className:"flex-1"}),(0,S.jsx)("input",{type:"number",min:"100",max:"1200",value:parseInt(l.slideHeight)||400,onChange:e=>w(l.id,{slideHeight:"".concat(e.target.value,"px")}),className:"w-20 p-1 border rounded text-sm text-center"}),(0,S.jsx)("span",{className:"text-xs text-gray-500",children:"px"})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.sliderHeightHelp")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.sliderWidth")}),(0,S.jsxs)("select",{value:l.fullWidth?"100%":l.maxWidth||"100%",onChange:e=>{"100%"===e.target.value?w(l.id,{fullWidth:!0,maxWidth:"100%"}):w(l.id,{fullWidth:!1,maxWidth:e.target.value})},className:"w-full p-2 border rounded-lg text-sm",children:[(0,S.jsx)("option",{value:"100%",children:ae("properties.fullWidth")}),(0,S.jsx)("option",{value:"72rem",children:"fr"===re?"Align\xe9 au site (72rem)":"Aligned with site (72rem)"}),(0,S.jsx)("option",{value:"80%",children:"80%"}),(0,S.jsx)("option",{value:"60%",children:"60%"})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.sliderWidthHelp")})]})]}),"sponsors"===l.type&&(0,S.jsxs)("div",{className:"border-t pt-4 space-y-4",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,S.jsx)(E.A,{className:"w-4 h-4 text-blue-600"}),(0,S.jsx)("h4",{className:"text-sm font-semibold",children:"fr"===re?"Param\xe8tres commanditaires":"Sponsor Settings"})]}),(0,S.jsxs)("div",{children:[(0,S.jsxs)("label",{className:"block text-sm mb-1",children:["fr"===re?"Taille des logos":"Logo Size",": ",l.logoSize||80,"px"]}),(0,S.jsx)("input",{type:"range",min:30,max:200,step:5,value:l.logoSize||80,onChange:e=>w(l.id,{logoSize:parseInt(e.target.value)}),className:"w-full accent-blue-600"}),(0,S.jsxs)("div",{className:"flex justify-between text-xs text-gray-400 mt-1",children:[(0,S.jsx)("span",{children:"30px"}),(0,S.jsx)("span",{children:"200px"})]})]}),(0,S.jsxs)("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:l.showNames||!1,onChange:e=>w(l.id,{showNames:e.target.checked}),className:"rounded"}),"fr"===re?"Afficher les noms":"Show names"]}),(0,S.jsxs)("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:l.grayscale||!1,onChange:e=>w(l.id,{grayscale:e.target.checked}),className:"rounded"}),"fr"===re?"Logos en gris (couleur au survol)":"Grayscale logos (color on hover)"]}),mt()]}),"shop"===l.type&&(0,S.jsxs)("div",{className:"border-t pt-4 space-y-4",children:[(0,S.jsx)("div",{className:"flex items-center gap-2 mb-2",children:(0,S.jsx)("h4",{className:"text-sm font-semibold",children:"fr"===re?"Param\xe8tres boutique":"Shop Settings"})}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:"fr"===re?"Disposition":"Layout"}),(0,S.jsx)("div",{className:"flex gap-2",children:["grid","carousel"].map(e=>(0,S.jsx)("button",{onClick:()=>w(l.id,{layout:e}),className:"flex-1 px-3 py-2 rounded-lg border-2 text-sm font-medium transition-all ".concat((l.layout||"grid")===e?"border-blue-600 bg-blue-50 text-blue-700":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"),children:"grid"===e?"fr"===re?"Grille":"Grid":"fr"===re?"Carrousel":"Carousel"},e))})]}),"grid"===(l.layout||"grid")&&(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:"fr"===re?"Colonnes":"Columns"}),(0,S.jsx)("div",{className:"flex gap-2",children:[2,3,4].map(e=>(0,S.jsx)("button",{onClick:()=>w(l.id,{columns:e}),className:"flex-1 px-3 py-2 rounded-lg border-2 text-sm font-medium transition-all ".concat((l.columns||3)===e?"border-blue-600 bg-blue-50 text-blue-700":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"),children:e},e))})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:"fr"===re?"Produits affich\xe9s":"Products shown"}),(0,S.jsx)("input",{type:"number",min:1,max:20,value:l.productsToShow||6,onChange:e=>w(l.id,{productsToShow:parseInt(e.target.value)||6}),className:"w-full p-2 border rounded-lg text-sm"})]}),(0,S.jsx)(no,{websiteId:f,selectedCategory:l.selectedCategory||"",onChange:e=>w(l.id,{selectedCategory:e}),language:re}),(0,S.jsxs)("div",{className:"flex items-center justify-between",children:[(0,S.jsx)("label",{className:"text-sm",children:"fr"===re?"Afficher les filtres":"Show filters"}),(0,S.jsx)("button",{onClick:()=>w(l.id,{showFilters:!l.showFilters}),className:"relative inline-flex h-6 w-11 items-center rounded-full transition-colors ".concat(l.showFilters?"bg-blue-600":"bg-gray-200"),children:(0,S.jsx)("span",{className:"inline-block h-4 w-4 transform rounded-full bg-white transition-transform ".concat(l.showFilters?"translate-x-6":"translate-x-1")})})]})]}),"iframe"===l.type&&(0,S.jsxs)("div",{className:"border-t pt-4 space-y-4",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,S.jsx)(z.A,{className:"w-4 h-4 text-purple-600"}),(0,S.jsx)("h4",{className:"text-sm font-semibold",children:ae("properties.iframeSettings")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.embedCode")}),(0,S.jsx)("textarea",{value:l.embedCode||"",onChange:e=>{const t=e.target.value,o=t.match(/src=["']([^"']+)["']/),n=o?o[1]:"",s=t.match(/height=["']?(\d+)["']?/),a=s?"".concat(s[1],"px"):void 0,r=t.match(/width=["']?(\d+%?)["']?/),i=r?r[1].includes("%")?r[1]:"".concat(r[1],"px"):void 0,c={embedCode:t,iframeUrl:n||t};a&&(c.iframeHeight=a),i&&(c.iframeWidth=i),w(l.id,c)},placeholder:'<iframe src="https://..." width="100%" height="500"></iframe>\n\n'.concat(ae("properties.embedCodePlaceholder")),className:"w-full p-2 border rounded-lg text-sm font-mono",rows:4}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.embedCodeHelp")}),l.iframeUrl&&(0,S.jsxs)("p",{className:"text-xs text-green-600 mt-1",children:["\u2713 URL: ",l.iframeUrl.substring(0,50),"..."]}),(0,S.jsxs)("div",{className:"mt-2 p-2 bg-blue-50 rounded text-xs",children:[(0,S.jsxs)("p",{className:"font-medium text-blue-700 mb-1",children:["\u2713 ","Compatible:"]}),(0,S.jsx)("p",{className:"text-blue-600",children:"Google Forms, Maps, Calendly, YouTube, Vimeo, Typeform, HubSpot, Airtable"})]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.iframeHeight")}),(0,S.jsxs)("select",{value:l.iframeHeight||"500px",onChange:e=>w(l.id,{iframeHeight:e.target.value}),className:"w-full p-2 border rounded-lg text-sm",children:[(0,S.jsxs)("option",{value:"300px",children:["300px - ",ae("properties.small")]}),(0,S.jsx)("option",{value:"400px",children:"400px"}),(0,S.jsxs)("option",{value:"500px",children:["500px - ",ae("properties.medium")]}),(0,S.jsx)("option",{value:"600px",children:"600px"}),(0,S.jsxs)("option",{value:"700px",children:["700px - ",ae("properties.large")]}),(0,S.jsx)("option",{value:"800px",children:"800px"}),(0,S.jsxs)("option",{value:"70vh",children:["70vh - ",ae("properties.screenHeight")]}),(0,S.jsxs)("option",{value:"90vh",children:["90vh - ",ae("properties.fullScreen")]})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.iframeHeightHelp")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.iframeWidth")}),(0,S.jsxs)("select",{value:l.iframeWidth||"100%",onChange:e=>w(l.id,{iframeWidth:e.target.value}),className:"w-full p-2 border rounded-lg text-sm",children:[(0,S.jsx)("option",{value:"100%",children:ae("properties.fullWidth")}),(0,S.jsxs)("option",{value:"1200px",children:["1200px - ",ae("properties.large")]}),(0,S.jsx)("option",{value:"1000px",children:"1000px"}),(0,S.jsxs)("option",{value:"800px",children:["800px - ",ae("properties.medium")]}),(0,S.jsxs)("option",{value:"600px",children:["600px - ",ae("properties.small")]}),(0,S.jsx)("option",{value:"80%",children:"80%"}),(0,S.jsx)("option",{value:"60%",children:"60%"})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.iframeWidthHelp")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.borderRadius")}),(0,S.jsxs)("select",{value:l.borderRadius||"8px",onChange:e=>w(l.id,{borderRadius:e.target.value}),className:"w-full p-2 border rounded-lg text-sm",children:[(0,S.jsx)("option",{value:"0px",children:"0px"}),(0,S.jsx)("option",{value:"4px",children:"4px"}),(0,S.jsx)("option",{value:"8px",children:"8px"}),(0,S.jsx)("option",{value:"12px",children:"12px"}),(0,S.jsx)("option",{value:"16px",children:"16px"}),(0,S.jsx)("option",{value:"24px",children:"24px"})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.borderRadiusHelp")})]}),(0,S.jsxs)("div",{className:"flex items-center justify-between",children:[(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm",children:ae("properties.allowFullscreen")}),(0,S.jsx)("p",{className:"text-xs text-gray-500",children:ae("properties.allowFullscreenHelp")})]}),(0,S.jsx)("button",{onClick:()=>w(l.id,{allowFullscreen:!l.allowFullscreen}),className:"relative inline-flex h-6 w-11 items-center rounded-full transition-colors ".concat(!1!==l.allowFullscreen?"bg-blue-600":"bg-gray-200"),children:(0,S.jsx)("span",{className:"inline-block h-4 w-4 transform rounded-full bg-white transition-transform ".concat(!1!==l.allowFullscreen?"translate-x-6":"translate-x-1")})})]})]}),"custom-html"===l.type&&(0,S.jsxs)("div",{className:"border-t pt-4 space-y-4",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,S.jsx)(Y.A,{className:"w-4 h-4 text-purple-600"}),(0,S.jsx)("h4",{className:"text-sm font-semibold",children:ae("properties.customHtmlSettings")})]}),(0,S.jsx)("div",{className:"p-3 bg-amber-50 border border-amber-200 rounded-lg",children:(0,S.jsxs)("div",{className:"flex items-start gap-2",children:[(0,S.jsx)(Z.A,{className:"w-4 h-4 text-amber-600 mt-0.5 flex-shrink-0"}),(0,S.jsxs)("div",{children:[(0,S.jsx)("p",{className:"text-sm font-medium text-amber-800",children:ae("properties.securityWarning")}),(0,S.jsx)("p",{className:"text-xs text-amber-700 mt-1",children:ae("properties.securityWarningText")})]})]})}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.htmlCode")}),(0,S.jsx)("textarea",{value:l.htmlCode||"",onChange:e=>w(l.id,{htmlCode:e.target.value}),placeholder:ae("properties.htmlCodePlaceholder"),className:"w-full p-2 border rounded-lg text-sm font-mono bg-gray-900 text-green-400",rows:10,style:{minHeight:"200px"}}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.htmlCodeHelp")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:"HTML \u2014 version anglaise (optionnel)"}),(0,S.jsx)("textarea",{value:l.htmlCodeEn||"",onChange:e=>w(l.id,{htmlCodeEn:e.target.value}),placeholder:"Laissez vide pour afficher le m\xeame HTML dans les deux langues",className:"w-full p-2 border rounded-lg text-sm font-mono bg-gray-900 text-green-400",rows:10,style:{minHeight:"200px"}}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Affich\xe9 aux visiteurs en anglais. Vide = on r\xe9utilise le HTML ci-dessus pour les deux langues."})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:"fr"===re?"Ex\xe9cution des scripts":"Script Execution"}),(0,S.jsxs)("select",{value:l.scriptLocation||"head",onChange:e=>w(l.id,{scriptLocation:e.target.value}),className:"w-full p-2 border rounded-lg text-sm",children:[(0,S.jsx)("option",{value:"head",children:"fr"===re?"Dans <head> (recommand\xe9)":"In <head> (recommended)"}),(0,S.jsx)("option",{value:"body",children:"fr"===re?"Dans <body>":"In <body>"}
1),(0,S.jsx)("option",{value:"inline",children:"fr"===re?"Sur place (dans la section)":"Inline (in section)"})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"fr"===re?"O\xf9 les scripts externes doivent \xeatre ajout\xe9s":"Where external scripts should be added"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:ae("properties.maxWidth")}),(0,S.jsxs)("select",{value:l.containerMaxWidth||"1200px",onChange:e=>w(l.id,{containerMaxWidth:e.target.value}),className:"w-full p-2 border rounded-lg text-sm",children:[(0,S.jsx)("option",{value:"100%",children:ae("properties.fullWidth")}),(0,S.jsx)("option",{value:"1400px",children:"1400px"}),(0,S.jsx)("option",{value:"1200px",children:"1200px"}),(0,S.jsx)("option",{value:"1000px",children:"1000px"}),(0,S.jsx)("option",{value:"800px",children:"800px"})]})]})]}),"hero"===l.type&&(0,S.jsxs)("div",{className:"border-t pt-4 space-y-4",children:[(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:ae("properties.heroLayoutStyle")}),(0,S.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,S.jsxs)("button",{onClick:()=>w(l.id,{heroStyle:"centered",mediaAsBackground:!1}),className:"p-3 border-2 rounded-lg text-xs transition-all ".concat("centered"!==l.heroStyle&&l.heroStyle?"border-gray-200 hover:border-gray-300":"border-blue-500 bg-blue-50"),children:[(0,S.jsx)("div",{className:"font-semibold mb-1",children:ae("properties.heroLayoutCentered")}),(0,S.jsx)("div",{className:"text-gray-500",children:ae("properties.heroLayoutCenteredDesc")})]}),(0,S.jsxs)("button",{onClick:()=>w(l.id,{heroStyle:"image-right",mediaAsBackground:!1}),className:"p-3 border-2 rounded-lg text-xs transition-all ".concat("image-right"===l.heroStyle?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"),children:[(0,S.jsx)("div",{className:"font-semibold mb-1",children:ae("properties.heroLayoutImageRight")}),(0,S.jsx)("div",{className:"text-gray-500",children:ae("properties.heroLayoutImageRightDesc")})]}),(0,S.jsxs)("button",{onClick:()=>w(l.id,{heroStyle:"image-left",mediaAsBackground:!1}),className:"p-3 border-2 rounded-lg text-xs transition-all ".concat("image-left"===l.heroStyle?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"),children:[(0,S.jsx)("div",{className:"font-semibold mb-1",children:ae("properties.heroLayoutImageLeft")}),(0,S.jsx)("div",{className:"text-gray-500",children:ae("properties.heroLayoutImageLeftDesc")})]}),(0,S.jsxs)("button",{onClick:()=>w(l.id,{heroStyle:"text-overlay-center",mediaAsBackground:!0}),className:"p-3 border-2 rounded-lg text-xs transition-all ".concat("text-overlay-center"===l.heroStyle||l.mediaAsBackground&&(null===(wt=l.heroStyle)||void 0===wt||!wt.startsWith("text-overlay-"))?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"),children:[(0,S.jsx)("div",{className:"font-semibold mb-1",children:ae("properties.heroLayoutOverlayCenter")}),(0,S.jsx)("div",{className:"text-gray-500",children:ae("properties.heroLayoutOverlayCenterDesc")})]}),(0,S.jsxs)("button",{onClick:()=>w(l.id,{heroStyle:"text-overlay-top",mediaAsBackground:!0}),className:"p-3 border-2 rounded-lg text-xs transition-all ".concat("text-overlay-top"===l.heroStyle?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"),children:[(0,S.jsx)("div",{className:"font-semibold mb-1",children:ae("properties.heroLayoutOverlayTop")}),(0,S.jsx)("div",{className:"text-gray-500",children:ae("properties.heroLayoutOverlayTopDesc")})]}),(0,S.jsxs)("button",{onClick:()=>w(l.id,{heroStyle:"text-overlay-bottom",mediaAsBackground:!0}),className:"p-3 border-2 rounded-lg text-xs transition-all ".concat("text-overlay-bottom"===l.heroStyle?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"),children:[(0,S.jsx)("div",{className:"font-semibold mb-1",children:ae("properties.heroLayoutOverlayBottom")}),(0,S.jsx)("div",{className:"text-gray-500",children:ae("properties.heroLayoutOverlayBottomDesc")})]})]})]}),("image-right"===l.heroStyle||"image-left"===l.heroStyle||(null===(Ct=l.heroStyle)||void 0===Ct?void 0:Ct.startsWith("text-overlay-"))||l.mediaAsBackgroun
1d)&&(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:ae("properties.heroMediaType")}),(0,S.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,S.jsx)("button",{onClick:()=>w(l.id,{heroMediaType:"image"}),className:"p-2 border-2 rounded-lg text-xs font-medium transition-all ".concat(l.heroMediaType&&"image"!==l.heroMediaType?"border-gray-200 hover:border-gray-300":"border-blue-500 bg-blue-50 text-blue-700"),children:ae("properties.heroMediaImage")}),(0,S.jsx)("button",{onClick:()=>w(l.id,{heroMediaType:"video"}),className:"p-2 border-2 rounded-lg text-xs font-medium transition-all ".concat("video"===l.heroMediaType?"border-blue-500 bg-blue-50 text-blue-700":"border-gray-200 hover:border-gray-300"),children:ae("properties.heroMediaVideo")})]})]}),(!l.heroMediaType||"image"===l.heroMediaType)&&("image-right"===l.heroStyle||"image-left"===l.heroStyle||(null===(St=l.heroStyle)||void 0===St?void 0:St.startsWith("text-overlay-"))||l.mediaAsBackground)&&(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:ae("properties.heroBackgroundImage")}),(null===(At=l.backgroundImage)||void 0===At?void 0:At.url)&&(0,S.jsx)("div",{className:"mb-2",children:(0,S.jsx)("img",{src:l.backgroundImage.url,alt:l.backgroundImage.alt||"Hero image",className:"w-full h-32 object-cover rounded-lg"})}),(0,S.jsxs)("div",{className:"space-y-2",children:[(0,S.jsx)("input",{type:"text",value:(null===(kt=l.backgroundImage)||void 0===kt?void 0:kt.url)||"",onChange:e=>{var t,o;const n={id:(null===(t=l.backgroundImage)||void 0===t?void 0:t.id)||"hero-bg-".concat(Date.now()),url:e.target.value,alt:(null===(o=l.backgroundImage)||void 0===o?void 0:o.alt)||"Hero background image"};w(l.id,{backgroundImage:n})},placeholder:ae("placeholders.imageUrl"),className:"w-full p-2 border rounded-lg text-sm"}),(0,S.jsx)("input",{type:"file",accept:"image/*",onChange:async e=>{var t;const o=null===(t=e.target.files)||void 0===t?void 0:t[0];if(o){const e=new FileReader;e.onloadend=async()=>{var t,o;const n=e.result,s=await eo(n),a={id:(null===(t=l.backgroundImage)||void 0===t?void 0:t.id)||"hero-bg-".concat(Date.now()),url:s,alt:(null===(o=l.backgroundImage)||void 0===o?void 0:o.alt)||"Hero background image"};w(l.id,{backgroundImage:a})},e.readAsDataURL(o)}},className:"w-full px-3 py-2 border rounded text-sm file:mr-4 file:py-2 file:px-4 file:rounded file:border-0 file:text-sm file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100"}),(0,S.jsx)("input",{type:"text",value:(null===(It=l.backgroundImage)||void 0===It?void 0:It.alt)||"",onChange:e=>{var t,o;const n={id:(null===(t=l.backgroundImage)||void 0===t?void 0:t.id)||"hero-bg-".concat(Date.now()),url:(null===(o=l.backgroundImage)||void 0===o?void 0:o.url)||"",alt:e.target.value};w(l.id,{backgroundImage:n})},placeholder:ae("placeholders.imageAltAccessibility"),className:"w-full p-2 border rounded-lg text-sm"})]})]}),"video"===l.heroMediaType&&(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:ae("properties.heroVideoUrl")}),(0,S.jsx)("input",{type:"text",value:l.videoUrl||"",onChange:e=>w(l.id,{videoUrl:e.target.value}),placeholder:ae("properties.heroVideoUrlPlaceholder"),className:"w-full p-2 border rounded-lg text-sm"}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:ae("properties.heroVideoUrlHelp")})]}),((null===(Tt=l.heroStyle)||void 0===Tt?void 0:Tt.startsWith("text-overlay-"))||l.mediaAsBackground)&&(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:ae("properties.heroContentPosition")}),(0,S.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,S.jsx)("button",{onClick:()=>w(l.id,{contentPosition:"left"}),className:"p-2 border-2 rounded-lg text-xs font-medium transition-all ".concat("left"===l.contentPosition?"border-blue-500 bg-blue-50 text-blue-700":"border-gray-200 hover:border-gray-300"),children:ae("properties.heroContentLeft")}),(0,S.jsx)("button",{onClick:()=>w(l.id,{contentPosition:"center"}),className:"p-2 border-2 rounded-lg text-xs font-medium transition-all ".concat(l.contentPosition&&"center"!==l.contentPosition?"border-gray-200 hover:border-gray-300":"border-blue-500 bg-blue-50 text-blue-700"),
1children:ae("properties.heroContentCenter")}),(0,S.jsx)("button",{onClick:()=>w(l.id,{contentPosition:"right"}),className:"p-2 border-2 rounded-lg text-xs font-medium transition-all ".concat("right"===l.contentPosition?"border-blue-500 bg-blue-50 text-blue-700":"border-gray-200 hover:border-gray-300"),children:ae("properties.heroContentRight")})]})]}),((null===(zt=l.heroStyle)||void 0===zt?void 0:zt.startsWith("text-overlay-"))||l.mediaAsBackground)&&(0,S.jsxs)("div",{children:[(0,S.jsxs)("label",{className:"block text-sm mb-2",children:[ae("properties.heroOverlayOpacity")," (",null!==(Ft=l.overlayOpacity)&&void 0!==Ft?Ft:50,"%)"]}),(0,S.jsx)("input",{type:"range",min:"0",max:"100",step:"5",value:null!==(Mt=l.overlayOpacity)&&void 0!==Mt?Mt:50,onChange:e=>w(l.id,{overlayOpacity:parseInt(e.target.value)}),className:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer"}),(0,S.jsxs)("div",{className:"flex justify-between text-xs text-gray-500 mt-1",children:[(0,S.jsx)("span",{children:ae("properties.heroOverlayLight")}),(0,S.jsx)("span",{children:ae("properties.heroOverlayDark")})]})]})]}),"hero"===l.type&&(e=>{const t=l,o="fr"===re,a="fr"===x?"fr":"en",r=(e,t)=>"object"===typeof e&&e?(0,n.A)((0,n.A)({},e),{},{[a]:t}):{en:"en"===a?t:"",fr:"fr"===a?t:""},i=()=>"h".concat(Date.now().toString(36)).concat(Math.random().toString(36).slice(2,6)),c="image-right"===t.heroStyle||"image-left"===t.heroStyle,d=t.stats||[],u=t.photoCards||[],m=[{id:"produits_publies",fr:"Produits publi\xe9s",en:"Published products"},{id:"fait_au_quebec",fr:"Produits fabriqu\xe9s au Qu\xe9bec",en:"Products made in Quebec"},{id:"boutiques",fr:"Boutiques partenaires",en:"Partner shops"}],p=[{id:"map-pin",fr:"Rep\xe8re",en:"Pin"},{id:"store",fr:"Boutique",en:"Shop"},{id:"gift",fr:"Cadeau",en:"Gift"},{id:"heart",fr:"C\u0153ur",en:"Heart"},{id:"sparkles",fr:"\xc9tincelles",en:"Sparkles"},{id:"truck",fr:"Livraison",en:"Delivery"},{id:"star",fr:"\xc9toile",en:"Star"},{id:"leaf",fr:"Feuille",en:"Leaf"}];return(0,S.jsxs)("div",{className:"border-t pt-4 space-y-4",children:[(0,S.jsx)("h4",{className:"text-sm font-semibold text-gray-700",children:o?"Options du haut de page":"Hero options"}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:o?"\xc9tiquette au-dessus du titre":"Label above the title"}),(0,S.jsx)("input",{type:"text",value:(0,C._A)(null===(e=t.badge)||void 0===e?void 0:e.text,a),onChange:e=>{var o;const s=e.target.value;w(l.id,{badge:(0,n.A)((0,n.A)({},t.badge||{}),{},{text:r(null===(o=t.badge)||void 0===o?void 0:o.text,s)})})},placeholder:o?"Ex. : Fait au Qu\xe9bec \xb7 172 id\xe9es (vide = aucune \xe9tiquette)":"E.g.: Made locally (empty = no label)",className:"w-full p-2 border rounded-lg text-sm"}),t.badge&&(0,C._A)(t.badge.text,a)&&(0,S.jsxs)("div",{className:"grid grid-cols-2 gap-2 mt-2",children:[(0,S.jsxs)("label",{className:"flex items-center gap-2 text-xs",children:[(0,S.jsx)("input",{type:"color",value:t.badge.backgroundColor||"#FEF3C7",onChange:e=>w(l.id,{badge:(0,n.A)((0,n.A)({},t.badge),{},{backgroundColor:e.target.value})}),className:"w-8 h-8 border rounded"}),o?"Fond":"Background"]}),(0,S.jsxs)("label",{className:"flex items-center gap-2 text-xs",children:[(0,S.jsx)("input",{type:"color",value:t.badge.textColor||"#92400E",onChange:e=>w(l.id,{badge:(0,n.A)((0,n.A)({},t.badge),{},{textColor:e.target.value})}),className:"w-8 h-8 border rounded"}),o?"Texte":"Text"]})]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:o?"Chiffres sous les boutons":"Figures below the buttons"}),(0,S.jsxs)("div",{className:"space-y-2",children:[d.map((e,t)=>(0,S.jsxs)("div",{className:"space-y-1",children:[(0,S.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,S.jsx)("input",{type:"text",value:e.value||"",onChange:e=>{const o=d.map((o,s)=>s===t?(0,n.A)((0,n.A)({},o),{},{value:e.target.value}):o);w(l.id,{stats:o})},placeholder:o?"Chiffre":"Figure",className:"w-20 p-2 border rounded-lg text-sm"}),(0,S.jsx)("input",{type:"text",value:(0,C._A)(e.label,a),onChange:e=>{const o=d.map((o,s)=>s===t?(0,n.A)((0,n.A)({},o),{},{label:r(o.label,e.target.value)}):o);w(l.id,{stats:o})},placeholder:o?"Libell\xe9":"Label",className:"flex-1 min-w-0 p-2 border rounded-lg text-sm"}),(0,S.jsx)("button",{type:"button",title:o?"Retirer":"Remove",onClick:()=>w(l.id,{stats:d.filter((e,o)=>o!==t)}),className:"p-2 text-gray-500 hover:text-red-600",children:(0,S.jsx)(N.A,{className:"w-4 h-4"})})]}),(0,S.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,S.jsxs)("label",{className:"flex items-center gap-2 text-xs whitespace-nowrap",children:[(0,S.jsx)("input",{type:"checkbox",checked:!!e.auto,onChange:e=>{const o=d.map((o,a)=>
1{if(a!==t)return o;if(e.target.checked)return(0,n.A)((0,n.A)({},o),{},{auto:o.auto||"produits_publies"});const{auto:r}=o;return(0,s.A)(o,Yt)});w(l.id,{stats:o})}}),o?"Compteur automatique":"Automatic counter"]}),!!e.auto&&(0,S.jsx)("select",{value:e.auto,onChange:e=>{const o=d.map((o,s)=>s===t?(0,n.A)((0,n.A)({},o),{},{auto:e.target.value}):o);w(l.id,{stats:o})},className:"flex-1 min-w-0 p-1.5 border rounded-lg text-xs",title:o?"Source du compteur":"Counter source",children:m.map(e=>(0,S.jsx)("option",{value:e.id,children:o?e.fr:e.en},e.id))})]})]},e.id)),d.length<4&&(0,S.jsxs)("button",{type:"button",onClick:()=>w(l.id,{stats:[...d,{id:i(),value:"",label:{fr:"",en:""}}]}),className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-800",children:[(0,S.jsx)(g.A,{className:"w-3 h-3"})," ",o?"Ajouter un chiffre":"Add a figure"]})]})]}),(0,S.jsxs)("label",{className:"flex items-center justify-between text-sm",children:[(0,S.jsx)("span",{children:o?"Deuxi\xe8me bouton en contour":"Second button as outline"}),(0,S.jsx)("input",{type:"checkbox",checked:!0===t.outlineSecondButton,onChange:e=>w(l.id,{outlineSecondButton:e.target.checked})})]}),c&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)("label",{className:"flex items-center justify-between text-sm",children:[(0,S.jsx)("span",{children:o?"Photo sur la moiti\xe9 de la largeur":"Photo on half the width"}),(0,S.jsx)("input",{type:"checkbox",checked:!0===t.mediaHalfWidth,onChange:e=>w(l.id,{mediaHalfWidth:e.target.checked})})]}),(0,S.jsxs)("label",{className:"flex items-center justify-between text-sm",children:[(0,S.jsx)("span",{children:o?"Photo sur toute la moiti\xe9":"Photo fills the half"}),(0,S.jsx)("input",{type:"checkbox",checked:!0===t.mediaBleed,onChange:e=>w(l.id,{mediaBleed:e.target.checked})})]}),(0,S.jsxs)("label",{className:"flex items-center justify-between text-sm",children:[(0,S.jsx)("span",{children:o?"Fondu":"Fade"}),(0,S.jsx)("input",{type:"checkbox",checked:!0===t.mediaFade,onChange:e=>w(l.id,{mediaFade:e.target.checked})})]}),(0,S.jsxs)("label",{className:"flex items-center justify-between text-sm",children:[(0,S.jsx)("span",{children:o?"Photo aux coins arrondis avec ombre douce":"Photo with rounded corners and soft shadow"}),(0,S.jsx)("input",{type:"checkbox",checked:!0===t.mediaRoundedShadow,onChange:e=>w(l.id,{mediaRoundedShadow:e.target.checked})})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:o?"Cartes pos\xe9es sur la photo (2 au plus)":"Cards on the photo (2 max)"}),(0,S.jsxs)("div",{className:"space-y-2",children:[u.map((e,t)=>(0,S.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,S.jsx)("select",{value:e.icon||(0===t?"map-pin":"store"),onChange:e=>{const o=u.map((o,s)=>s===t?(0,n.A)((0,n.A)({},o),{},{icon:e.target.value}):o);w(l.id,{photoCards:o})},className:"w-28 p-2 border rounded-lg text-sm",title:o?"Ic\xf4ne":"Icon",children:p.map(e=>(0,S.jsx)("option",{value:e.id,children:o?e.fr:e.en},e.id))}),(0,S.jsx)("input",{type:"text",value:(0,C._A)(e.title,a),onChange:e=>{const o=u.map((o,s)=>s===t?(0,n.A)((0,n.A)({},o),{},{title:r(o.title,e.target.value)}):o);w(l.id,{photoCards:o})},placeholder:o?"Texte de la carte":"Card text",className:"flex-1 min-w-0 p-2 border rounded-lg text-sm"}),(0,S.jsx)("button",{type:"button",title:o?"Retirer":"Remove",onClick:()=>w(l.id,{photoCards:u.filter((e,o)=>o!==t)}),className:"p-2 text-gray-500 hover:text-red-600",children:(0,S.jsx)(N.A,{className:"w-4 h-4"})})]},e.id)),u.length<2&&(0,S.jsxs)("button",{type:"button",onClick:()=>w(l.id,{photoCards:[...u,{id:i(),title:{fr:"",en:""},icon:0===u.length?"map-pin":"store"}]}),className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-800",children:[(0,S.jsx)(g.A,{className:"w-3 h-3"})," ",o?"Ajouter une carte":"Add a card"]})]})]})]})]})})(),"hero"===l.type&&(0,S.jsxs)("div",{className:"border-t pt-4",children:[(0,S.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,S.jsx)("label",{className:"block text-sm",children:ae("properties.showButtons")}),(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[void 0===l.showButtons||!0===l.showButtons?(0,S.jsx)(b.A,{className:"w-4 h-4 text-green-600"}):(0,S.jsx)(y.A,{className:"w-4 h-4 text-gray-400"}),(0,S.jsx)("input",{type:"checkbox",checked:void 0===l.showButtons||!0===l.showButtons,onChange:e=>{const t={showButtons:e.target.checked};if(e.target.checked&&"buttons"in l){const e=l;
1e.buttons&&0!==e.buttons.length||(t.buttons=[{id:"btn-".concat(Date.now()),text:"Get Started",url:"#",backgroundColor:"#3b82f6",textColor:"#ffffff",size:"large",linkType:"url"}])}w(l.id,t)},className:"w-4 h-4 text-blue-600 rounded"})]})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500",children:"Toggle visibility of all buttons in this hero section"})]}),"contact"===l.type&&(0,S.jsxs)("div",{className:"border-t pt-4",children:[(0,S.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,S.jsx)("label",{className:"block text-sm",children:ae("properties.showButtons")}),(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[void 0===l.showButtons||!0===l.showButtons?(0,S.jsx)(b.A,{className:"w-4 h-4 text-green-600"}):(0,S.jsx)(y.A,{className:"w-4 h-4 text-gray-400"}),(0,S.jsx)("input",{type:"checkbox",checked:void 0===l.showButtons||!0===l.showButtons,onChange:e=>w(l.id,{showButtons:e.target.checked}),className:"w-4 h-4 text-blue-600 rounded"})]})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500",children:"Toggle visibility of all buttons in this contact section"})]}),"pricing"===l.type&&l.tiers&&(0,S.jsxs)("div",{className:"border-t pt-4",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,S.jsx)($.A,{className:"w-5 h-5 text-green-600"}),(0,S.jsx)("h3",{className:"text-sm font-semibold",children:ae("properties.pricingTiers")||"Pricing Tiers"})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:ae("properties.pricingTiersHelp")||"Customize each pricing card appearance"}),(0,S.jsx)("div",{className:"space-y-3",children:l.tiers.map(e=>(0,S.jsxs)("div",{className:"bg-gray-50 border rounded-lg p-3 ".concat(e.highlighted?"ring-2 ring-purple-400":""),children:[(0,S.jsxs)("div",{className:"flex items-start justify-between mb-3",children:[(0,S.jsxs)("div",{className:"flex-1",children:[(0,S.jsx)("p",{className:"text-sm font-medium text-gray-700",children:$t((0,C._A)(e.name.content,x))}),(0,S.jsx)("p",{className:"text-xs text-gray-500",children:$t((0,C._A)(e.price.content,x))})]}),e.highlighted&&(0,S.jsxs)("span",{className:"px-2 py-0.5 bg-purple-100 text-purple-700 text-xs rounded-full flex items-center gap-1",children:[(0,S.jsx)(Q.A,{className:"w-3 h-3"}),ae("properties.featured")||"Featured"]})]}),(0,S.jsxs)("div",{className:"mb-3",children:[(0,S.jsx)("label",{className:"block text-xs text-gray-600 mb-1",children:ae("properties.cardBackgroundColor")||"Card Background"}),(0,S.jsx)(oo,{value:e.backgroundColor||"#ffffff",onChange:t=>{const o=l.tiers.map(o=>o.id===e.id?(0,n.A)((0,n.A)({},o),{},{backgroundColor:t}):o);w(l.id,{tiers:o})},placeholder:"#ffffff"})]}),(0,S.jsxs)("div",{className:"flex items-center justify-between bg-white border rounded-lg p-2",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)(Q.A,{className:"w-4 h-4 ".concat(e.highlighted?"text-purple-600 fill-purple-600":"text-gray-400")}),(0,S.jsx)("span",{className:"text-sm text-gray-700",children:ae("properties.highlightTier")||"Feature this tier"})]}),(0,S.jsx)("input",{type:"checkbox",checked:e.highlighted||!1,onChange:t=>{const o=l.tiers.map(o=>o.id===e.id?(0,n.A)((0,n.A)({},o),{},{highlighted:t.target.checked}):o);w(l.id,{tiers:o})},className:"w-4 h-4 text-purple-600 rounded"})]}),e.highlighted&&(0,S.jsxs)("div",{className:"mt-2 bg-purple-50 border border-purple-200 rounded-lg p-2",children:[(0,S.jsx)("label",{className:"block text-xs text-purple-700 mb-1",children:ae("properties.featuredBadgeText")||"Badge Text (optional)"}),(0,S.jsx)("input",{type:"text",value:"object"===typeof e.featuredBadge?e.featuredBadge[x]||"":e.featuredBadge||"",onChange:t=>{const o=l.tiers.map(o=>o.id===e.id?(0,n.A)((0,n.A)({},o),{},{featuredBadge:t.target.value}):o);w(l.id,{tiers:o})},placeholder:ae("properties.featuredBadgePlaceholder")||"e.g., Most Popular, Best Value",className:"w-full px-2 py-1.5 text-sm border border-purple-300 rounded focus:ring-2 focus:ring-purple-500 focus:border-purple-500"}),(0,S.jsx)("p",{className:"text-xs text-purple-600 mt-1",children:ae("properties.featuredBadgeHelp")||"Leave empty to hide the badge"})]}),(0,S.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:ae("properties.highlightTierHelp")||"Featured tiers stand out with special styling"})]},e.id))}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-3 bg-blue-50 p-2 rounded border border-blue-200",children:ae("properties.clickTierToEditText")||"Click on tier names, prices, or features in the preview to edit their text and styling."})]}),"video"===l.type&&(()=>{const e=l.video||{id:"video-default",sourceType:"none",autoplay:!1,muted:!0,loop:!1,controls:!0};return(0,S.jsxs)("div",{className:"border-t pt-4 space-y-4",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,S.jsx)(E.A,{className:"w-4 h-4 text-purple-600"}),(0,S.jsx)("h4",{className:"text-sm font-semibold",children:"fr"===re?"Param\xe8tres vid\xe9o":"Video Settings"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:"fr"===re?"Source de la vid\xe9o":"Video Source"}),(0,S.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,S.jsxs)("button",{onClick:()=>{const t=(0,n.A)((0,n.A)({},e),{},{sourceType:"youtube"});w(l.id,{video:t})},className:"flex flex-col items-center justify-center gap-1 px-2 py-2 rounded-lg border-2 transition-all ".concat("youtube"===e.sourceType?"border-red-500 bg-red-50 text-red-700":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"),children:[(0,S.jsx)("span",{className:"text-lg",children:"\u25b6"}),(0,S.jsx)("span",{className:"text-[10px] font-medium",children:"YouTube"})]}),(0,S.jsxs)("button",{onClick:()=>{const t=(0,n.A)((0,n.A)({},e),{},{sourceType:"vimeo"});w(l.id,{video:t})},className:"flex flex-col items-center justify-center gap-1 px-2 py-2 rounded-lg border-2 transition-all ".concat("vimeo"===e.sourceType?"border-blue-500 bg-blue-50 text-blue-700":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"),children:[(0,S.jsx)("span",{className:"text-lg",children:"\u25b7"}),(0,S.jsx)("span",{className:"text-[10px] font-medium",children:"Vimeo"})]}),(0,S.jsxs)("button",{onClick:()=>{const t=(0,n.A)((0,n.A)({},e),{},{sourceType:"upload",uploadPath:void 0});w(l.id,{video:t}),Se(!1)},className:"flex flex-col items-center justify-center gap-1 px-2 py-2 rounded-lg border-2 transition-all ".concat("upload"!==e.sourceType||Ce?"border-gray-300 bg-white text-gray-700 hover:border-gray-400":"border-green-500 bg-green-50 text-green-700"),children:[(0,S.jsx)("span",{className:"text-lg",children:"\u2b06"}),(0,S.jsx)("span",{className:"text-[10px] font-medium",children:"fr"===re?"T\xe9l\xe9verser":"Upload"})]}),(0,S.jsxs)("button",{onClick:async()=>
1{if(Se(!0),0===Ae.length){Te(!0);try{const e=localStorage.getItem("token"),t=await fetch("".concat(te.n,"/client/video-creator/library"),{headers:{Authorization:"Bearer ".concat(e)}}),o=((await t.json()).videos||[]).filter(e=>"ready"===e.status&&e.video_url);ke(o)}catch(e){console.error("[VideoLibrary]",e)}finally{Te(!1)}}},className:"flex flex-col items-center justify-center gap-1 px-2 py-2 rounded-lg border-2 transition-all ".concat(Ce?"border-purple-500 bg-purple-50 text-purple-700":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"),children:[(0,S.jsx)("span",{className:"text-lg",children:"\ud83c\udfac"}),(0,S.jsx)("span",{className:"text-[10px] font-medium",children:"fr"===re?"Biblioth\xe8que":"Library"})]})]})]}),Ce&&(0,S.jsxs)("div",{className:"border border-purple-200 rounded-lg p-3 bg-purple-50",children:[(0,S.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,S.jsx)("label",{className:"text-sm font-medium",children:"fr"===re?"Choisir une vid\xe9o du Cr\xe9ateur Vid\xe9o":"Pick a video from the Video Creator"}),(0,S.jsx)("button",{onClick:()=>Se(!1),className:"text-xs text-gray-500 hover:text-gray-700",children:"\xd7"})]}),Ie&&(0,S.jsx)("p",{className:"text-xs text-gray-600",children:"fr"===re?"Chargement\u2026":"Loading\u2026"}),!Ie&&0===Ae.length&&(0,S.jsx)("p",{className:"text-xs text-gray-600",children:"fr"===re?"Aucune vid\xe9o pr\xeate. Cr\xe9ez-en une dans Cr\xe9ateur Vid\xe9o.":"No ready videos yet. Create one in Video Creator."}),(0,S.jsx)("div",{className:"grid grid-cols-2 gap-2 max-h-64 overflow-y-auto",children:Ae.map(t=>{const o="upload"===e.sourceType&&e.uploadPath===t.video_url;return(0,S.jsxs)("button",{onClick:()=>{const o=(0,n.A)((0,n.A)({},e),{},{sourceType:"upload",uploadPath:t.video_url});w(l.id,{video:o})},className:"flex flex-col items-start gap-1 p-2 rounded-md border text-left transition-all ".concat(o?"border-purple-500 bg-white ring-2 ring-purple-200":"border-gray-200 bg-white hover:border-purple-300"),children:[t.thumbnail_url?(0,S.jsx)("img",{src:t.thumbnail_url,alt:t.title,className:"w-full aspect-video object-cover rounded-sm"}):(0,S.jsx)("div",{className:"w-full aspect-video bg-gray-100 rounded-sm flex items-center justify-center text-gray-400 text-xs",children:"fr"===re?"Sans aper\xe7u":"No preview"}),(0,S.jsx)("p",{className:"text-[11px] font-medium text-gray-800 truncate w-full",children:t.title||("fr"===re?"Sans titre":"Untitled")}),t.duration&&(0,S.jsxs)("p",{className:"text-[10px] text-gray-500",children:[Math.round(t.duration),"s"]})]},t._id||t.id)})})]}),"youtube"===e.sourceType&&(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:"YouTube URL"}),(0,S.jsx)("input",{type:"text",value:e.youtubeUrl||"",onChange:t=>{const o=(0,n.A)((0,n.A)({},e),{},{sourceType:"youtube",youtubeUrl:t.target.value});w(l.id,{video:o})},placeholder:"https://youtube.com/watch?v=...",className:"w-full p-2 border rounded-lg text-sm"}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"fr"===re?"Collez une URL YouTube ou un ID de vid\xe9o":"Paste a YouTube video URL or video ID"})]}),"vimeo"===e.sourceType&&(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:"Vimeo URL"}),(0,S.jsx)("input",{type:"text",value:e.vimeoUrl||"",onChange:t=>{const o=(0,n.A)((0,n.A)({},e),{},{sourceType:"vimeo",vimeoUrl:t.target.value});w(l.id,{video:o})},placeholder:"https://vimeo.com/123456789",className:"w-full p-2 border rounded-lg text-sm"}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"fr"===re?"Collez une URL Vimeo":"Paste a Vimeo video URL"})]}),"upload"===e.sourceType&&(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-1",children:"fr"===re?"T\xe9l\xe9verser une vid\xe9o":"Upload Video"}),e.uploadPath?(0,S.jsxs)("div",{className:"p-3 bg-green-50 border border-green-200 rounded-lg",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 text-green-700",children:[(0,S.jsx)("span",{children:"\u2713"}),(0,S.jsx)("span",{className:"text-sm",children:"fr"===re?"Vid\xe9o t\xe9l\xe9vers\xe9e":"Video uploaded"})]}),(0,S.jsx)("p",{className:"text-xs text-green-600 mt-1 truncate",children:e.uploadPath.split("/").pop()}),(0,S.jsx)("button",{onClick:()=>{const t=(0,n.A)((0,n.A)({},e),{},{uploadPath:void 0});w(l.id,{video:t})},className:"mt-2 text-xs text-red-600 hover:text-red-800",children:"fr"===re?"Supprimer":"Remove"})]}):(0,S.jsxs)("div",{children:[(0,S.jsx)("input",{type:"file",accept:"video/*",onChange:t=>{var o;const s=null===(o=t.target.files)||void 0===o?void 0:o[0];s&&(async t=>{if(!t)return;if(!t.type.startsWith("video/"))return void alert("fr"===re?"Veuillez s\xe9lectionner un fichier vid\xe9o":"Please select a video file");if(t.size>524288e3)alert("fr"===re?"La vid\xe9o ne doit pas d\xe9passer 500 Mo":"Video must be less than 500MB");else{Je(!0),Ye(0);try{const o=localStorage.getItem("user"),s=o?JSON.parse(o)._id||JSON.parse(o).id:"default",a=new FormData;a.append("file",t),a.append("tenant_id",s),a.append("file_name",t.name);const r="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im13bGZlanNyY2psb2p0c2dwZG9uIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjM5NDAyODAsImV4cCI6MjA3OTUxNjI4MH0.-ewkb86xwJHlh30Gu3Ihp7hJrA9eZkD4uLKDIWhDNII";Ye(20);const i=await fetch("https://mwlfejsrcjlojtsgpdon.supabase.co/functions/v1/storage?action=upload",{method:"POST",headers:{Authorization:"Bearer ".concat(r)},body:a});if(Ye(60),!i.ok){const e=await i.text();throw new Error("Upload failed: ".concat(i.status," ").concat(e))}const c=await i.json();if(!c.success)throw new Error(c.error||"Upload failed");const d=(0,n.A)((0,n.A)({},e),{},{sourceType:"upload",uploadPath:c.data.path});w(l.id,{video:d}),Ye(100)}catch(o){console.error("Video upload error:",o),alert("fr"===re?"Erreur lors du t\xe9l\xe9versement de la vid\xe9o":"Error uploading video")}finally{Je(!1)}}})(s)},disabled:Ge,className:"w-full p-2 border rounded-lg text-sm file:mr-4 file:py-1 file:px-3 file:rounded file:border-0 file:text-sm file:font-medium file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100"}),Ge&&(0,S.jsxs)("div",{className:"mt-2",children:[(0,S.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,S.jsx)("div",{className:"bg-blue-600 h-2 rounded-full transition-all",style:{width:"".concat(Xe,"%")}})}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"fr"===re?"T\xe9l\xe9versement en cours...":"Uploading..."})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"fr"===re?"Max 500 Mo. Formats: MP4, WebM, MOV":"Max 500MB. Formats: MP4, WebM, MOV"})]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:"Layout"}),(0,S.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,S.jsxs)("button",{onClick:()=>w(l.id,{layout:"full-width"}),className:"flex flex-col items-center justify-center gap-1 px-2 py-2 rounded-lg border-2 transition-all ".concat("full-width"===l.layout?"border-blue-600 bg-blue-50 text-blue-700":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"),children:[(0,S.jsx)("div",{className:"w-8 h-4 bg-current roun
1ded opacity-60"}),(0,S.jsx)("span",{className:"text-[10px] font-medium",children:"Full"})]}),(0,S.jsxs)("button",{onClick:()=>w(l.id,{layout:"contained"}),className:"flex flex-col items-center justify-center gap-1 px-2 py-2 rounded-lg border-2 transition-all ".concat("contained"!==l.layout&&l.layout?"border-gray-300 bg-white text-gray-700 hover:border-gray-400":"border-blue-600 bg-blue-50 text-blue-700"),children:[(0,S.jsx)("div",{className:"w-6 h-4 bg-current rounded opacity-60 mx-1"}),(0,S.jsx)("span",{className:"text-[10px] font-medium",children:"Contained"})]}),(0,S.jsxs)("button",{onClick:()=>w(l.id,{layout:"side-by-side"}),className:"flex flex-col items-center justify-center gap-1 px-2 py-2 rounded-lg border-2 transition-all ".concat("side-by-side"===l.layout?"border-blue-600 bg-blue-50 text-blue-700":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"),children:[(0,S.jsxs)("div",{className:"flex gap-0.5",children:[(0,S.jsx)("div",{className:"w-3 h-4 bg-current rounded opacity-60"}),(0,S.jsx)("div",{className:"w-3 h-4 bg-current rounded opacity-30"})]}),(0,S.jsx)("span",{className:"text-[10px] font-medium",children:"Split"})]})]})]}),"side-by-side"===l.layout&&(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:ae("properties.videoPosition")||"Video Position"}),(0,S.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,S.jsxs)("button",{onClick:()=>w(l.id,{videoPosition:"left"}),className:"flex flex-col items-center justify-center gap-1 px-2 py-2 rounded-lg border-2 transition-all ".concat("left"!==l.videoPosition&&l.videoPosition?"border-gray-300 bg-white text-gray-700 hover:border-gray-400":"border-blue-600 bg-blue-50 text-blue-700"),children:[(0,S.jsxs)("div",{className:"flex gap-0.5",children:[(0,S.jsx)("div",{className:"w-4 h-4 bg-current rounded opacity-60"}),(0,S.jsx)("div",{className:"w-3 h-4 bg-current rounded opacity-30"})]}),(0,S.jsx)("span",{className:"text-[10px] font-medium",children:ae("properties.videoLeft")||"Video Left"})]}),(0,S.jsxs)("button",{onClick:()=>w(l.id,{videoPosition:"right"}),className:"flex flex-col items-center justify-center gap-1 px-2 py-2 rounded-lg border-2 transition-all ".concat("right"===l.videoPosition?"border-blue-600 bg-blue-50 text-blue-700":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"),children:[(0,S.jsxs)("div",{className:"flex gap-0.5",children:[(0,S.jsx)("div",{className:"w-3 h-4 bg-current rounded opacity-30"}),(0,S.jsx)("div",{className:"w-4 h-4 bg-current rounded opacity-60"})]}),(0,S.jsx)("span",{className:"text-[10px] font-medium",children:ae("properties.videoRight")||"Video Right"})]})]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:"fr"===re?"Options de lecture":"Playback Options"}),(0,S.jsxs)("div",{className:"space-y-2",children:[(0,S.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:e.autoplay||!1,onChange:t=>{const o=(0,n.A)((0,n.A)({},e),{},{autoplay:t.target.checked});w(l.id,{video:o})},className:"w-4 h-4 text-blue-600 rounded"}),(0,S.jsx)("span",{className:"text-sm",children:"fr"===re?"Lecture automatique":"Autoplay"})]}),(0,S.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:!1!==e.muted,onChange:t=>{const o=(0,n.A)((0,n.A)({},e),{},{muted:t.target.checked});w(l.id,{video:o})},className:"w-4 h-4 text-blue-600 rounded"}),(0,S.jsx)("span",{className:"text-sm",children:"fr"===re?"Muet":"Muted"})]}),(0,S.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:e.loop||!1,onChange:t=>{const o=(0,n.A)((0,n.A)({},e),{},{loop:t.target.checked});w(l.id,{video:o})},className:"w-4 h-4 text-blue-600 rounded"}),(0,S.jsx)("span",{className:"text-sm",children:"fr"===re?"Boucle":"Loop"})]}),(0,S.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:!1!==e.controls,onChange:t=>{const o=(0,n.A)((0,n.A)({},e),{},{controls:t.target.checked});w(l.id,{video:o})},className:"w-4 h-4 text-blue-600 rounded"}),(0,S.jsx)("span",{className:"text-sm",children:"fr"===re?"Afficher les contr\xf4les":"Show Controls"})]})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"fr"===re?"Note: La lecture automatique n\xe9cessite le son coup\xe9 sur la plupart des navigateurs":"Note: Autoplay requires muted audio on most browsers"})]})]})}
1)(),"wellness-programs"===l.type&&(()=>{const e=l,t=e.programs||[];return(0,S.jsxs)("div",{className:"border-t pt-4 space-y-2",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,S.jsx)(E.A,{className:"w-4 h-4 text-purple-600"}),(0,S.jsx)("h4",{className:"text-sm font-semibold",children:"fr"===re?"Param\xe8tres des programmes":"Program Settings"})]}),(0,S.jsxs)("div",{className:"mb-4",children:[(0,S.jsx)("label",{className:"block text-xs text-gray-600 mb-1.5",children:"fr"===re?"Programmes par ligne":"Programs per row"}),(0,S.jsx)("div",{className:"grid grid-cols-4 gap-1.5",children:[1,2,3,4].map(t=>(0,S.jsx)("button",{onClick:()=>w(l.id,{columnsPerRow:t}),className:"flex items-center justify-center py-2 rounded-lg border-2 text-sm font-medium transition-all ".concat((e.columnsPerRow||3)===t?"border-blue-500 bg-blue-50 text-blue-700":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"),children:t},t))})]}),t.map((e,o)=>{var s,a;const r=e.video||{id:"video-".concat(e.id),sourceType:"none",autoplay:!1,muted:!0,loop:!1,controls:!0},i=e.mediaType||"image",c=$t("object"===typeof(null===(s=e.title)||void 0===s?void 0:s.content)?e.title.content[x]||e.title.content.en||e.title.content.fr:(null===(a=e.title)||void 0===a?void 0:a.content)||"Programme ".concat(o+1)),d=Ze===e.id;return(0,S.jsxs)("div",{className:"border rounded-lg overflow-hidden bg-gray-50",children:[(0,S.jsxs)("button",{onClick:()=>$e(d?null:e.id),className:"w-full flex items-center justify-between p-3 hover:bg-gray-100 transition-colors text-left",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,S.jsx)("span",{className:"text-sm",children:"video"===i?"\ud83c\udfac":"\ud83d\uddbc\ufe0f"}),(0,S.jsx)("span",{className:"font-medium text-sm truncate",children:c})]}),(0,S.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,S.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full font-medium ".concat("video"===i?"bg-purple-100 text-purple-700":"bg-blue-100 text-blue-700"),children:"video"===i?"Vid\xe9o":"Image"}),(0,S.jsx)(K.A,{className:"w-4 h-4 text-gray-400 transition-transform ".concat(d?"rotate-180":"")})]})]}),d&&(0,S.jsxs)("div",{className:"p-3 pt-0 space-y-3 border-t",children:[(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-xs text-gray-600 mb-1",children:"fr"===re?"Type de m\xe9dia":"Media Type"}),(0,S.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,S.jsxs)("button",{onClick:()=>{const o=t.map(t=>t.id===e.id?(0,n.A)((0,n.A)({},t),{},{mediaType:"image"}):t);w(l.id,{programs:o})},className:"flex items-center justify-center gap-2 px-3 py-2 rounded-lg border-2 text-sm transition-all ".concat("image"===i?"border-blue-500 bg-blue-50 text-blue-700":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"),children:[(0,S.jsx)("span",{children:"\ud83d\uddbc\ufe0f"}),(0,S.jsx)("span",{children:"Image"})]}),(0,S.jsxs)("button",{onClick:()=>{const o=t.map(t=>t.id===e.id?(0,n.A)((0,n.A)({},t),{},{mediaType:"video"}):t);w(l.id,{programs:o})},className:"flex items-center justify-center gap-2 px-3 py-2 rounded-lg border-2 text-sm transition-all ".concat("video"===i?"border-purple-500 bg-purple-50 text-purple-700":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"),children:[(0,S.jsx)("span",{children:"\ud83c\udfac"}),(0,S.jsx)("span",{children:"Vid\xe9o"})]})]})]}),"video"===i&&(0,S.jsxs)("div",{className:"space-y-3 pt-2 border-t",children:[(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-xs text-gray-600 mb-1",children:"fr"===re?"Source vid\xe9o":"Video Source"}),(0,S.jsxs)("div",{className:"grid grid-cols-3 gap-1",children:[(0,S.jsxs)("button",{onClick:()=>{const o=t.map(t=>t.id===e.id?(0,n.A)((0,n.A)({},t),{},{video:(0,n.A)((0,n.A)({},r),{},{sourceType:"youtube"})}):t);w(l.id,{programs:o})},className:"flex flex-col items-center justify-center gap-0.5 px-2 py-1.5 rounded border text-xs transition-all ".concat("youtube"===r.sourceType?"border-red-500 bg-red-50 text-red-700":"border-gray-300 bg-white hover:border-gray-400"),children:[(0,S.jsx)("span",{children:"\u25b6"}),(0,S.jsx)("span",{children:"YouTube"})]}),(0,S.jsxs)("button",{onClick:()=>{const o=t.map(t=>
1t.id===e.id?(0,n.A)((0,n.A)({},t),{},{video:(0,n.A)((0,n.A)({},r),{},{sourceType:"vimeo"})}):t);w(l.id,{programs:o})},className:"flex flex-col items-center justify-center gap-0.5 px-2 py-1.5 rounded border text-xs transition-all ".concat("vimeo"===r.sourceType?"border-blue-500 bg-blue-50 text-blue-700":"border-gray-300 bg-white hover:border-gray-400"),children:[(0,S.jsx)("span",{children:"\u25b7"}),(0,S.jsx)("span",{children:"Vimeo"})]}),(0,S.jsxs)("button",{onClick:()=>{const o=t.map(t=>t.id===e.id?(0,n.A)((0,n.A)({},t),{},{video:(0,n.A)((0,n.A)({},r),{},{sourceType:"upload"})}):t);w(l.id,{programs:o})},className:"flex flex-col items-center justify-center gap-0.5 px-2 py-1.5 rounded border text-xs transition-all ".concat("upload"===r.sourceType?"border-green-500 bg-green-50 text-green-700":"border-gray-300 bg-white hover:border-gray-400"),children:[(0,S.jsx)("span",{children:"\u2b06"}),(0,S.jsx)("span",{children:"Upload"})]})]})]}),"youtube"===r.sourceType&&(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-xs text-gray-600 mb-1",children:"YouTube URL"}),(0,S.jsx)("input",{type:"text",value:r.youtubeUrl||"",onChange:o=>{const s=t.map(t=>t.id===e.id?(0,n.A)((0,n.A)({},t),{},{video:(0,n.A)((0,n.A)({},r),{},{sourceType:"youtube",youtubeUrl:o.target.value})}):t);w(l.id,{programs:s})},placeholder:"https://youtube.com/watch?v=...",className:"w-full p-2 border rounded text-sm"}),(()=>{const e=r.youtubeUrl||"";if(!e)return null;const t=[/(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([^&?\s]+)/,/^([a-zA-Z0-9_-]{11})$/];let o=null;for(const n of t){const t=e.match(n);if(null!==t&&void 0!==t&&t[1]){o=t[1];break}}return o?(0,S.jsxs)("div",{className:"mt-2",children:[(0,S.jsx)("img",{src:"https://img.youtube.com/vi/".concat(o,"/mqdefault.jpg"),alt:"YouTube preview",className:"w-full rounded border"}),(0,S.jsxs)("p",{className:"text-xs text-green-600 mt-1 flex items-center gap-1",children:[(0,S.jsx)("span",{children:"\u2713"})," URL valide (ID: ",o,")"]})]}):(0,S.jsx)("p",{className:"text-xs text-red-500 mt-1",children:"fr"===re?"URL YouTube invalide":"Invalid YouTube URL"})})()]}),"vimeo"===r.sourceType&&(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-xs text-gray-600 mb-1",children:"Vimeo URL"}),(0,S.jsx)("input",{type:"text",value:r.vimeoUrl||"",onChange:o=>{const s=t.map(t=>t.id===e.id?(0,n.A)((0,n.A)({},t),{},{video:(0,n.A)((0,n.A)({},r),{},{sourceType:"vimeo",vimeoUrl:o.target.value})}):t);w(l.id,{programs:s})},placeholder:"https://vimeo.com/123456789",className:"w-full p-2 border rounded text-sm"}),(()=>{const e=r.vimeoUrl||"";if(!e)return null;const t=[/vimeo\.com\/(\d+)/,/player\.vimeo\.com\/video\/(\d+)/,/^(\d+)$/];let o=null;for(const n of t){const t=e.match(n);if(null!==t&&void 0!==t&&t[1]){o=t[1];break}}return o?(0,S.jsxs)("p",{className:"text-xs text-green-600 mt-1 flex items-center gap-1",children:[(0,S.jsx)("span",{children:"\u2713"})," URL valide (ID: ",o,")"]}):(0,S.jsx)("p",{className:"text-xs text-red-500 mt-1",children:"fr"===re?"URL Vimeo invali
1de":"Invalid Vimeo URL"})})()]}),"upload"===r.sourceType&&(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-xs text-gray-600 mb-1",children:"fr"===re?"T\xe9l\xe9verser une vid\xe9o":"Upload Video"}),r.uploadPath?(0,S.jsxs)("div",{className:"p-2 bg-green-50 border border-green-200 rounded",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 text-green-700 text-sm",children:[(0,S.jsx)("span",{children:"\u2713"}),(0,S.jsx)("span",{children:"fr"===re?"Vid\xe9o t\xe9l\xe9vers\xe9e":"Video uploaded"})]}),(0,S.jsx)("p",{className:"text-xs text-green-600 mt-1 truncate",children:r.uploadPath.split("/").pop()}),(0,S.jsx)("button",{onClick:()=>{const o=t.map(t=>t.id===e.id?(0,n.A)((0,n.A)({},t),{},{video:(0,n.A)((0,n.A)({},r),{},{uploadPath:void 0})}):t);w(l.id,{programs:o})},className:"mt-1 text-xs text-red-600 hover:text-red-800",children:"fr"===re?"Supprimer":"Remove"})]}):(0,S.jsx)("div",{children:Ge?(0,S.jsxs)("div",{className:"p-3 bg-blue-50 border border-blue-200 rounded",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 text-blue-700 text-sm mb-2",children:[(0,S.jsx)(I.A,{className:"w-4 h-4 animate-spin"}),(0,S.jsx)("span",{children:"fr"===re?"T\xe9l\xe9versement...":"Uploading..."})]}),(0,S.jsx)("div",{className:"w-full bg-blue-200 rounded-full h-2",children:(0,S.jsx)("div",{className:"bg-blue-600 h-2 rounded-full transition-all",style:{width:"".concat(Xe,"%")}})})]}):(0,S.jsxs)("label",{className:"flex flex-col items-center justify-center p-3 border-2 border-dashed border-gray-300 rounded cursor-pointer hover:border-blue-400 hover:bg-blue-50 transition-all",children:[(0,S.jsx)("span",{className:"text-2xl mb-1",children:"\ud83d\udcf9"}),(0,S.jsx)("span",{className:"text-xs text-gray-600",children:"fr"===re?"Cliquez pour t\xe9l\xe9verser":"Click to upload"}),(0,S.jsx)("span",{className:"text-xs text-gray-400 mt-0.5",children:"Max 500 Mo"}),(0,S.jsx)("input",{type:"file",accept:"video/*",className:"hidden",onChange:o=>{var s;const a=null===(s=o.target.files)||void 0===s?void 0:s[0];a&&(async(e,o)=>{if(!o)return;if(!o.type.startsWith("video/"))return void alert("fr"===re?"Veuillez s\xe9lectionner un fichier vid\xe9o":"Please select a video file");if(o.size>524288e3)alert("fr"===re?"La vid\xe9o ne doit pas d\xe9passer 500 Mo":"Video must be less than 500MB");else{Je(!0),Ye(0);try{const s=localStorage.getItem("user"),a=s?JSON.parse(s)._id||JSON.parse(s).id:"default",r=new FormData;r.append("file",o),r.append("tenant_id",a),r.append("file_name",o.name);const i="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im13bGZlanNyY2psb2p0c2dwZG9uIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjM5NDAyODAsImV4cCI6MjA3OTUxNjI4MH0.-ewkb86xwJHlh30Gu3Ihp7hJrA9eZkD4uLKDIWhDNII",c="https://mwlfejsrcjlojtsgpdon.supabase.co/functions/v1/storage";Ye(30);const d=await fetch("".concat(c,"?action=upload"),{method:"POST",headers:{Authorization:"Bearer ".concat(i)},body:r});if(Ye(80),!d.ok){const e=await d.text();throw new Error("Upload failed: ".concat(d.status," ").concat(e))}const u=await d.json();if(!u.success)throw new Error(u.error||"Upload failed");const m=t.map(t=>t.id===e?(0,n.A)((0,n.A)({},t),{},{mediaType:"video",video:{id:"video-".concat(e),sourceType:"upload",uploadPath:u.data.path,autoplay:!1,muted:!0,loop:!1,controls:!0}}):t);w(l.id,{programs:m}),Ye(100),_t.oR.success("fr"===re?"Vid\xe9o t\xe9l\xe9vers\xe9e avec succ\xe8s":"Video uploaded successfully")}catch(s){console.error("Video upload error:",s),alert("fr"===re?"Erreur lors du t\xe9l\xe9versement de la vid\xe9o":"Error uploading video")}finally{Je(!1),Ye(0)}}})(e.id,a)}})]})})]}),("youtube"===r.sourceType||"vimeo"===r.sourceType||"upload"===r.sourceType)&&(0,S.jsxs)("div",{className:"grid grid-cols-2 gap-2 pt-2",children:[(0,S.jsxs)("label",{className:"flex items-center gap-1.5 text-xs cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:r.autoplay||!1,onChange:o=>{const s=t.map(t=>t.id===e.id?(0,n.A)((0,n.A)({},t),{},{video:(0,n.A)((0,n.A)({},r),{},{autoplay:o.target.checked})}):t);w(l.id,{programs:s})},className:"w-3 h-3 rounded"}),(0,S.jsx)("span",{children:"Autoplay"})]}),(0,S.jsxs)("label",{className:"flex items-center gap-1.5 text-xs cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:!1!==r.muted,onChange:o=>{const s=t.map(t=>
1t.id===e.id?(0,n.A)((0,n.A)({},t),{},{video:(0,n.A)((0,n.A)({},r),{},{muted:o.target.checked})}):t);w(l.id,{programs:s})},className:"w-3 h-3 rounded"}),(0,S.jsx)("span",{children:"fr"===re?"Muet":"Muted"})]}),(0,S.jsxs)("label",{className:"flex items-center gap-1.5 text-xs cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:r.loop||!1,onChange:o=>{const s=t.map(t=>t.id===e.id?(0,n.A)((0,n.A)({},t),{},{video:(0,n.A)((0,n.A)({},r),{},{loop:o.target.checked})}):t);w(l.id,{programs:s})},className:"w-3 h-3 rounded"}),(0,S.jsx)("span",{children:"fr"===re?"Boucle":"Loop"})]}),(0,S.jsxs)("label",{className:"flex items-center gap-1.5 text-xs cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:!1!==r.controls,onChange:o=>{const s=t.map(t=>t.id===e.id?(0,n.A)((0,n.A)({},t),{},{video:(0,n.A)((0,n.A)({},r),{},{controls:o.target.checked})}):t);w(l.id,{programs:s})},className:"w-3 h-3 rounded"}),(0,S.jsx)("span",{children:"fr"===re?"Contr\xf4les":"Controls"})]})]})]}),(0,S.jsxs)("div",{className:"border-t pt-3 mt-3",children:[(0,S.jsx)("div",{className:"flex items-center justify-between",children:(0,S.jsxs)("label",{className:"flex items-center gap-2 text-xs cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:e.collapsible||!1,onChange:o=>{const s=t.map(t=>t.id===e.id?(0,n.A)((0,n.A)({},t),{},{collapsible:o.target.checked}):t);w(l.id,{programs:s})},className:"w-3 h-3 rounded"}),(0,S.jsx)("span",{className:"font-medium",children:"fr"===re?"Description d\xe9roulante":"Collapsible Description"})]})}),e.collapsible&&(0,S.jsxs)("div",{className:"mt-2",children:[(0,S.jsx)("label",{className:"block text-xs text-gray-600 mb-1",children:"fr"===re?"Lignes visibles (repli\xe9)":"Preview Lines (collapsed)"}),(0,S.jsxs)("select",{value:e.collapsedPreviewLines||3,onChange:o=>{const s=t.map(t=>t.id===e.id?(0,n.A)((0,n.A)({},t),{},{collapsedPreviewLines:parseInt(o.target.value)}):t);w(l.id,{programs:s})},className:"w-full p-2 border rounded text-sm",children:[(0,S.jsxs)("option",{value:2,children:["2 ","fr"===re?"lignes":"lines"]}),(0,S.jsxs)("option",{value:3,children:["3 ","fr"===re?"lignes":"lines"]}),(0,S.jsxs)("option",{value:4,children:["4 ","fr"===re?"lignes":"lines"]}),(0,S.jsxs)("option",{value:5,children:["5 ","fr"===re?"lignes":"lines"]})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"fr"===re?"Le visiteur peut cliquer pour voir plus de texte.":"Visitor can click to see more text."})]})]})]})]},e.id)}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"fr"===re?"Pour modifier l'image, cliquez dessus dans l'aper\xe7u.":"To change the image, click on it in the preview."})]})})(),"portfolio"===l.type&&(0,S.jsxs)("div",{className:"border-t pt-4 space-y-4",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,S.jsx)(ee.A,{className:"w-4 h-4 text-purple-600"}),(0,S.jsx)("h4",{className:"text-sm font-semibold",children:ae("properties.portfolioSettings")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:ae("properties.layoutStyle")}),(0,S.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,S.jsxs)("button",{onClick:()=>w(l.id,{layout:"grid"}),className:"flex flex-col items-center justify-center gap-1 px-2 py-3 rounded-lg border-2 transition-all ".concat("grid"!==l.layout&&l.layout?"border-gray-300 bg-white text-gray-700 hover:border-gray-400":"border-blue-600 bg-blue-50 text-blue-700"),children:[(0,S.jsxs)("div",{className:"grid grid-cols-3 gap-0.5",children:[(0,S.jsx)("div",{className:"w-2 h-2 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-2 h-2 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-2 h-2 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-2 h-2 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-2 h-2 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-2 h-2 bg-current rounded-sm opacity-60"})]}),(0,S.jsx)("span",{className:"text-[10px] font-medium",children:ae("properties.grid")})]}),(0,S.jsxs)("button",{onClick:()=>w(l.id,{layout:"masonry"}),className:"flex flex-col items-center justify-center gap-1 px-2 py-3 rounded-lg border-2 transition-all ".concat("masonry"===l.layout?"border-blue-600 bg-blue-50 text-blue-700":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"),children:[(0,S.jsxs)("div",{className:"flex gap-0.5",children:[(0,S.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,S.jsx)("div",{className:"w-2 h-3 bg-current roun
1ded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-2 h-2 bg-current rounded-sm opacity-60"})]}),(0,S.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,S.jsx)("div",{className:"w-2 h-2 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-2 h-3 bg-current rounded-sm opacity-60"})]}),(0,S.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,S.jsx)("div",{className:"w-2 h-2.5 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-2 h-2.5 bg-current rounded-sm opacity-60"})]})]}),(0,S.jsx)("span",{className:"text-[10px] font-medium",children:ae("properties.masonry")})]}),(0,S.jsxs)("button",{onClick:()=>w(l.id,{layout:"carousel"}),className:"flex flex-col items-center justify-center gap-1 px-2 py-3 rounded-lg border-2 transition-all ".concat("carousel"===l.layout?"border-blue-600 bg-blue-50 text-blue-700":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"),children:[(0,S.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,S.jsx)("div",{className:"w-1 h-3 bg-current rounded-sm opacity-40"}),(0,S.jsx)("div",{className:"w-3 h-4 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-3 h-4 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-1 h-3 bg-current rounded-sm opacity-40"})]}),(0,S.jsx)("span",{className:"text-[10px] font-medium",children:ae("properties.carousel")})]})]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:ae("properties.displayOptions")}),(0,S.jsxs)("div",{className:"space-y-2",children:[(0,S.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:l.showFilters||!1,onChange:e=>{w(l.id,{showFilters:e.target.checked})},className:"w-4 h-4 text-blue-600 rounded"}),(0,S.jsx)("span",{className:"text-sm",children:ae("properties.showCategoryFilters")})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 ml-6",children:ae("properties.showCategoryFiltersHelp")}),(0,S.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer mt-3",children:[(0,S.jsx)("input",{type:"checkbox",checked:l.enableLightbox||!1,onChange:e=>{w(l.id,{enableLightbox:e.target.checked})},className:"w-4 h-4 text-blue-600 rounded"}),(0,S.jsx)("span",{className:"text-sm",children:ae("properties.enableLightbox")})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 ml-6",children:ae("properties.enableLightboxHelp")})]})]})]}),"reviews"===l.type&&(0,S.jsxs)("div",{className:"border-t pt-4 space-y-4",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,S.jsx)(Q.A,{className:"w-4 h-4 text-yellow-500"}),(0,S.jsx)("h4",{className:"text-sm font-semibold",children:"fr"===re?"Style d'affichage":"Display Style"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:"fr"===re?"Disposition":"Layout"}),(0,S.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,S.jsxs)("button",{onClick:()=>w(l.id,{layout:"cards"}),className:"flex flex-col items-center justify-center gap-1 px-2 py-3 rounded-lg border-2 transition-all ".concat("cards"!==l.layout&&l.layout?"border-gray-300 bg-white text-gray-700 hover:border-gray-400":"border-blue-600 bg-blue-50 text-blue-700"),children:[(0,S.jsxs)("div",{className:"grid grid-cols-3 gap-0.5",children:[(0,S.jsx)("div",{className:"w-2 h-2 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-2 h-2 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-2 h-2 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-2 h-2 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-2 h-2 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-2 h-2 bg-current rounded-sm opacity-60"})]}),(0,S.jsx)("span",{className:"text-[10px] font-medium",children:"fr"===re?"Cartes":"Cards"})]}),(0,S.jsxs)("button",{onClick:()=>w(l.id,{layout:"carousel"}),className:"flex flex-col items-center justify-center gap-1 px-2 py-3 rounded-lg border-2 transition-all ".concat("carousel"===l.layout?"border-blue-600 bg-blue-50 text-blue-700":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"),children:[(0,S.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,S.jsx)("div",{className:"w-1 h-3 bg-current roun
1ded-sm opacity-40"}),(0,S.jsx)("div",{className:"w-3 h-4 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-3 h-4 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-1 h-3 bg-current rounded-sm opacity-40"})]}),(0,S.jsx)("span",{className:"text-[10px] font-medium",children:"fr"===re?"Carrousel":"Carousel"})]}),(0,S.jsxs)("button",{onClick:()=>w(l.id,{layout:"masonry"}),className:"flex flex-col items-center justify-center gap-1 px-2 py-3 rounded-lg border-2 transition-all ".concat("masonry"===l.layout?"border-blue-600 bg-blue-50 text-blue-700":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"),children:[(0,S.jsxs)("div",{className:"flex gap-0.5",children:[(0,S.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,S.jsx)("div",{className:"w-2 h-3 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-2 h-2 bg-current rounded-sm opacity-60"})]}),(0,S.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,S.jsx)("div",{className:"w-2 h-2 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-2 h-3 bg-current rounded-sm opacity-60"})]}),(0,S.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,S.jsx)("div",{className:"w-2 h-3 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-2 h-1.5 bg-current rounded-sm opacity-60"})]})]}),(0,S.jsx)("span",{className:"text-[10px] font-medium",children:"fr"===re?"Mur":"Masonry"})]})]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:"fr"===re?"Nombre d'avis \xe0 afficher":"Number of reviews to display"}),(0,S.jsxs)("div",{className:"flex items-center gap-3",children:[(0,S.jsx)("input",{type:"number",min:"1",max:"50",placeholder:"fr"===re?"Tous":"All",value:l.maxReviews||"",onChange:e=>{const t=e.target.value?parseInt(e.target.value):void 0;w(l.id,{maxReviews:t})},className:"w-20 px-2 py-1.5 border rounded-lg text-sm text-center"}),(0,S.jsx)("span",{className:"text-xs text-gray-500",children:"fr"===re?"(vide = tous les avis)":"(empty = all reviews)"})]})]})]}),"blog"===l.type&&(0,S.jsxs)("div",{className:"border-t pt-4 space-y-4",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,S.jsx)(ee.A,{className:"w-4 h-4 text-purple-600"}),(0,S.jsx)("h4",{className:"text-sm font-semibold",children:"fr"===re?"Param\xe8tres du blogue":"Blog Settings"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:"fr"===re?"Disposition":"Layout"}),(0,S.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,S.jsxs)("button",{onClick:()=>w(l.id,{layout:"grid"}),className:"flex flex-col items-center justify-center gap-1 px-2 py-3 rounded-lg border-2 transition-all ".concat("grid"!==l.layout&&l.layout?"border-gray-300 bg-white text-gray-700 hover:border-gray-400":"border-blue-600 bg-blue-50 text-blue-700"),children:[(0,S.jsxs)("div",{className:"grid grid-cols-3 gap-0.5",children:[(0,S.jsx)("div",{className:"w-2 h-2 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-2 h-2 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-2 h-2 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-2 h-2 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-2 h-2 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-2 h-2 bg-current rounded-sm opacity-60"})]}),(0,S.jsx)("span",{className:"text-[10px] font-medium",children:"fr"===re?"Grille":"Grid"})]}),(0,S.jsxs)("button",{onClick:()=>w(l.id,{layout:"list"}),className:"flex flex-col items-center justify-center gap-1 px-2 py-3 rounded-lg border-2 transition-all ".concat("list"===l.layout?"border-blue-600 bg-blue-50 text-blue-700":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"),children:[(0,S.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,S.jsx)("div",{className:"w-6 h-1.5 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-6 h-1.5 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-6 h-1.5 bg-current rounded-sm opacity-60"})]}),(0,S.jsx)("span",{className:"text-[10px] font-medium",children:"fr"===re?"Liste":"List"})]}),(0,S.jsxs)("button",{onClick:()=>w(l.id,{layout:"carousel"}),className:"flex flex-col items-center justify-center gap-1 px-2 py-3 rounded-lg border-2 transition-all ".concat("carousel"===l.layout?"border-blue-600 bg-blue-50 text-blue-700":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"),children:[(0,S.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,S.jsx)("div",{className:"w-1 h-3 bg-current roun
1ded-sm opacity-40"}),(0,S.jsx)("div",{className:"w-3 h-4 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-3 h-4 bg-current rounded-sm opacity-60"}),(0,S.jsx)("div",{className:"w-1 h-3 bg-current rounded-sm opacity-40"})]}),(0,S.jsx)("span",{className:"text-[10px] font-medium",children:"fr"===re?"Carrousel":"Carousel"})]})]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:"fr"===re?"Nombre d'articles":"Posts to Show"}),(0,S.jsxs)("select",{value:l.postsToShow||6,onChange:e=>w(l.id,{postsToShow:parseInt(e.target.value)}),className:"w-full border rounded-lg px-3 py-2 text-sm",children:[(0,S.jsx)("option",{value:3,children:"3"}),(0,S.jsx)("option",{value:6,children:"6"}),(0,S.jsx)("option",{value:9,children:"9"}),(0,S.jsx)("option",{value:12,children:"12"})]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:"fr"===re?"Options d'affichage":"Display Options"}),(0,S.jsxs)("div",{className:"space-y-2",children:[(0,S.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:!1!==l.showCategory,onChange:e=>w(l.id,{showCategory:e.target.checked}),className:"w-4 h-4 text-blue-600 rounded"}),(0,S.jsx)("span",{className:"text-sm",children:"fr"===re?"Afficher la cat\xe9gorie":"Show Category"})]}),(0,S.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:!1!==l.showAuthor,onChange:e=>w(l.id,{showAuthor:e.target.checked}),className:"w-4 h-4 text-blue-600 rounded"}),(0,S.jsx)("span",{className:"text-sm",children:"fr"===re?"Afficher l'auteur":"Show Author"})]}),(0,S.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:!1!==l.showReadTime,onChange:e=>w(l.id,{showReadTime:e.target.checked}),className:"w-4 h-4 text-blue-600 rounded"}),(0,S.jsx)("span",{className:"text-sm",children:"fr"===re?"Afficher le temps de lecture":"Show Read Time"})]}),(0,S.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:!1!==l.showExcerpt,onChange:e=>w(l.id,{showExcerpt:e.target.checked}),className:"w-4 h-4 text-blue-600 rounded"}),(0,S.jsx)("span",{className:"text-sm",children:"fr"===re?"Afficher l'extrait":"Show Excerpt"})]})]})]}),(0,S.jsxs)("div",{children:[(0,S.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer mb-2",children:[(0,S.jsx)("input",{type:"checkbox",checked:!1!==l.viewAllButtonVisible,onChange:e=>w(l.id,{viewAllButtonVisible:e.target.checked}),className:"w-4 h-4 text-blue-600 rounded"}),(0,S.jsx)("span",{className:"text-sm font-medium",children:"fr"===re?'Afficher le bouton "Voir tout"':'Show "View All" Button'})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 ml-6",children:"fr"===re?"Lien vers la page compl\xe8te du blogue":"Links to the full blog page"})]}),(0,S.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,S.jsx)("p",{className:"text-xs text-blue-700",children:"fr"===re?"\ud83d\udca1 G\xe9rez vos articles de blogue dans l'onglet Blogue du tableau de bord client.":"\ud83d\udca1 Manage your blog posts in the Blog tab of your client dashboard."})})]}),"formations-catalogue"===l.type&&(0,S.jsxs)("div",{className:"border-t pt-4 space-y-4",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,S.jsx)(ee.A,{className:"w-4 h-4 text-purple-600"}),(0,S.jsx)("h4",{className:"text-sm font-semibold",children:"fr"===re?"Param\xe8tres des formations":"Training Settings"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:"fr"===re?"Nombre de formations \xe0 afficher":"Number of Formations"}),(0,S.jsxs)("select",{value:l.maxFormations||6,onChange:e=>w(l.id,{maxFormations:parseInt(e.target.value)}),className:"w-full border rounded-lg px-3 py-2 text-sm",children:[(0,S.jsx)("option",{value:3,children:"3"}),(0,S.jsx)("option",{value:4,children:"4"}),(0,S.jsx)("option",{value:6,children:"6"}),(0,S.jsx)("option",{value:9,children:"9"}),(0,S.jsx)("option",{value:12,children:"12"}),(0,S.jsx)("option",{value:99,children:"fr"===re?"Toutes":"All"})]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:"fr"===re?"Options d'affichage":"Display Options"}),(0,S.jsxs)("div",{className:"space-y-2",children:[(0,S.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:!1!==l.showLevel,onChange:e=>w(l.id,{showLevel:e.target.checked}),className:"w-4 h-4 text-blue-600 rounded"}),(0,S.jsx)("span",{className:"text-sm",children:"fr"===re?"Afficher le niveau":"Show Level"})]}),(0,S.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:!1!==l.showDuration,onChange:e=>w(l.id,{showDuration:e.target.checked}),className:"w-4 h-4 text-blue-600 rounded"}),(0,S.jsx)("span",{className:"text-sm",children:"fr"===re?"Afficher la dur\xe9e":"Show Duration"})]}),(0,S.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:!1!==l.showCertificate,onChange:e=>w(l.id,{showCertificate:e.target.checked}),className:"w-4 h-4 text-blue-600 rounded"}),(0,S.jsx)("span",{className:"text-sm",children:"fr"===re?"Afficher le badge certifiant":"Show Certificate Badge"})]})]})]}),(0,S.jsx)("div",{children:(0,S.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer mb-2",children:[(0,S.jsx)("input",{type:"checkbox",checked:!1!==l.viewAllButtonVisible,onChange:e=>w(l.id,{viewAllButtonVisible:e.target.checked}),className:"w-4 h-4 text-blue-600 rounded"}),(0,S.jsx)("span",{className:"text-sm font-medium",children:"fr"===re?'Afficher le bouton "Voir tout"':'Show "View All" Button'})]})}),(0,S.jsx)("div",{className:"bg-purple-50 border border-purple-200 rounded-lg p-3",children:(0,S.jsx)("p",{className:"text-xs text-purple-700",children:"fr"===re?"\ud83d\udca1 Les formations affich\xe9es proviennent automatiquement de votre catalogue LMS (formations publi\xe9es).":"\ud83d\udca1 Displayed formations are automatically fetched from your LMS catalogue (published courses)."})})]}),"commandites"===l.type&&(0,S.jsxs)("div",{className:"border-t pt-4 space-y-4",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,S.jsx)(ee.A,{className:"w-4 h-4 text-teal-600"}),(0,S.jsx)("h4",{className:"text-sm font-semibold",children:"fr"===re?"Param\xe8tres des commandites":"Sponsorship Settings"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:"fr"===re?"Nombre d'\xe9v\xe9nements \xe0 afficher":"Number of events"}),(0,S.jsxs)("select",{value:l.maxEvents||6,onChange:e=>w(l.id,{maxEvents:parseInt(e.target.value)}),className:"w-full border rounded-lg px-3 py-2 text-sm",children:[(0,S.jsx)("option",{value:2,children:"2"}),(0,S.jsx)("option",{value:3,children:"3"}),(0,S.jsx)("option",{value:4,children:"4"}),(0,S.jsx)("option",{value:6,children:"6"}),(0,S.jsx)("option",{value:12,children:"12"})]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:"fr"===re?"Options d'affichage":"Display Options"}),(0,S.jsxs)("div",{className:"space-y-2",children:[(0,S.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:!1!==l.showVideo,onChange:e=>w(l.id,{showVideo:e.target.checked}),className:"w-4 h-4 text-teal-600 rounded"}),(0,S.jsx)("span",{className:"text-sm",children:"fr"===re?"Afficher la vid\xe9o de pr\xe9sentation":"Show presentation video"})]}),(0,S.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:!1!==l.showWall,onChange:e=>w(l.id,{showWall:e.target.checked}),className:"w-4 h-4 text-teal-600 rounded"}),(0,S.jsx)("span",{className:"text-sm",children:"fr"===re?"Afficher le mur des commanditaires":"Show sponsors wall"})]})]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm mb-2",children:"fr"===re?"Couleur du bouton \xab Devenir commanditaire \xbb":'"Become a sponsor" button color'}),(0,S.jsx)("input",{type:"color",value:l.ctaColor||"#e8852a",onChange:e=>w(l.id,{ctaColor:e.target.value}),className:"w-16 h-9 border rounded cursor-pointer"})]}),(0,S.jsx)("div",{className:"bg-teal-50 border border-teal-200 rounded-lg p-3",children:(0,S.jsx)("p",{className:"text-xs text-teal-700",children:"fr"===re?"\ud83d\udca1 Les \xe9v\xe9nements, forfaits et commanditaires affich\xe9s proviennent automatiquement du module Commandites du portail. Le bouton m\xe8ne au formulaire d'inscription et de paiement.":"\ud83d\udca1 Events, packages and sponsors are automatically fetched from the portal Sponsorship module. The button leads to the registration and payment form."})})]}),"catalogue-produits"===l.type&&(0,S.jsx)(Vt,{section:l,langueInterface:re,contentLanguage:x,onUpdate:e=>w(l.id,e)}),"agent-cadeaux"===l.type&&(0,S.jsx)(Wt,{section:l,langueInterface:re,onUpdate:e=>w(l.id,e)}),"services"===l.type&&(0,S.jsxs)("div",{className:"border-t pt-4",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,S.jsx)(E.A,{className:"w-5 h-5 text-purple-600"}),(0,S.jsx)("h3",{className:"text-sm",children:ae("properties.serviceButtons")})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:ae("properties.serviceButtonsHelp")}),(0,S.jsx)("div",{className:"space-y-3",children:l.services.map((e,t)=>{const o=!!e.button;return(0,S.jsxs)("div",{className:"bg-gray-50 border rounded-lg p-3",children:[(0,S.jsx)("div",{className:"flex items-start justify-between mb-2",children:(0,S.jsxs)("div",{className:"flex-1",children:[(0,S.jsx)("p",{className:"text-sm font-medium text-gray-700",children:$t((0,C._A)(e.title.content,x))}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1 line-clamp-2",children:$t((0,C._A)(e.description.content,x))})]})}),o?(0,S.jsxs)("div",{className:"space-y-2",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 text-xs text-green-600 bg-green-50 px-2 py-1 rounded",children:[(0,S.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),ae("properties.buttonLabel"),': "',(0,C._A)(e.button.text,x),'"']}),(0,S.jsxs)("button",{onClick:()=>
1{if(window.confirm(ae("properties.removeButtonFromService"))){const t=l.services.map(t=>{if(t.id===e.id){const{button:e,buttonVisible:o}=t;return(0,s.A)(t,Zt)}return t});w(l.id,{services:t})}},className:"w-full flex items-center justify-center gap-2 px-3 py-2 bg-orange-500 text-white rounded hover:bg-orange-600 transition-colors text-sm",children:[(0,S.jsx)(_.A,{className:"w-3 h-3"}),ae("properties.removeButton")]})]}):(0,S.jsxs)("button",{onClick:()=>{const t={id:"button-".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),text:{en:"Learn More",fr:"En savoir plus"},url:"#contact",fontFamily:"Inter",backgroundColor:"#3b82f6",textColor:"#ffffff",size:"medium"},o=l.services.map(o=>o.id===e.id?(0,n.A)((0,n.A)({},o),{},{button:t,buttonVisible:!0}):o);w(l.id,{services:o})},className:"w-full flex items-center justify-center gap-2 px-3 py-2 bg-green-500 text-white rounded hover:bg-green-600 transition-colors text-sm",children:[(0,S.jsx)(g.A,{className:"w-3 h-3"}),ae("properties.addButton")]})]},e.id)})}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-3 bg-blue-50 p-2 rounded border border-blue-200",children:ae("properties.clickButtonToEdit")})]}),e&&oe&&ne&&(0,S.jsxs)("div",{className:"border-t pt-4",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,S.jsx)(ee.A,{className:"w-5 h-5 text-green-600"}),(0,S.jsx)("h3",{className:"text-sm",children:ae("properties.manageItems")})]}),(0,S.jsx)("div",{className:"bg-gray-50 p-3 rounded-lg mb-3",children:(0,S.jsx)("p",{className:"text-sm text-gray-700",children:ae("properties.itemsInSection",{count:t,name:o,plural:1!==t?"s":""})})}),(0,S.jsxs)("div",{className:"space-y-2",children:[(0,S.jsxs)("button",{onClick:()=>oe(l.id),className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-green-500 text-white rounded-lg hover:bg-green-600 transition-colors",children:[(0,S.jsx)(g.A,{className:"w-4 h-4"}),ae("properties.addNewItem",{name:o})]}),t>1&&(0,S.jsxs)("div",{className:"text-xs text-gray-500 bg-yellow-50 border border-yellow-200 p-2 rounded",children:[(0,S.jsx)("p",{className:"mb-1",children:ae("properties.removeItemInstructions")}),(0,S.jsx)("p",{children:ae("properties.removeItemStep1")}),(0,S.jsx)("p",{children:ae("properties.removeItemStep2",{name:o})})]})]})]}),(0,S.jsxs)("div",{className:"text-sm text-gray-600 bg-blue-50 p-3 rounded border border-blue-200",children:[(0,S.jsxs)("p",{className:"mb-2",children:["\ud83d\udca1 ",(0,S.jsx)("strong",{children:ae("properties.sectionSettings")})]}),(0,S.jsx)("p",{children:ae("properties.clickToEditElements")})]})]})}return o&&r?null:(0,S.jsx)("div",{className:"p-4",children:(0,S.jsx)("p",{className:"text-gray-500 text-center",children:ae("properties.clickToEdit")})})}var ro=o(65469),io=o(87978),lo=o(77819),co=o(94805);function uo(e){let{versions:t,onRestore:o,onClose:n,onBackToDashboard:s}=e;const{t:a}=(0,c.o)(),r=e=>{const t=Date.now()-e,o=Math.floor(t/6e4),n=Math.floor(t/36e5),s=Math.floor(t/864e5);return o<1?a("versionHistory.justNow"):1===o?a("versionHistory.minuteAgo",{count:1}):o<60?a("versionHistory.minutesAgo",{count:o}):1===n?a("versionHistory.hourAgo",{count:1}):n<24?a("versionHistory.hoursAgo",{count:n}):1===s?a("versionHistory.dayAgo",{count:1}):s<7?a("versionHistory.daysAgo",{count:s}):new Date(e).toLocaleDateString()},i=e=>new Date(e).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"});return(0,S.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-[9999]",children:(0,S.jsxs)("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-2xl max-h-[80vh] flex flex-col",children:[(0,S.jsx)("div",{className:"p-6 border-b",children:(0,S.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[s&&(0,S.jsx)("button",{onClick:s,className:"flex items-center justify-center w-8 h-8 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",title:a("common.backToDashboard"),children:(0,S.jsx)(ro.A,{className:"w-5 h-5"})}),(0,S.jsxs)("div",{className:"flex items-center gap-3 flex-1",children:[(0,S.jsx)(io.A,{className:"w-6 h-6 text-blue-600"}),(0,S.jsxs)("div",{children:[(0,S.jsx)("h2",{className:"text-xl",children:a("versionHistory.title")}),(0,S.jsx)("p",{className:"text-sm text-gray-500",children:a("versionHistory.versionsStored",{count:t.length,max:50})})]})]}),(0,S.jsx)("button",{onClick:n,className:"text-gray-400 hover:text-gray-600 transition-colors",children:(0,S.jsx)("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,S.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),(0,S.jsx)("div",{className:"flex-1 overflow-y-auto p-6",children:0===t.length?(0,S.jsxs)("div",{className:"text-center py-12",children:[(0,S.jsx)(lo.A,{className:"w-12 h-12 text-gray-300 mx-auto mb-3"}),(0,S.jsx)("p",{className:"text-gray-500",children:a("versionHistory.noVersionsSaved")}),(0,S.jsx)("p",{className:"text-sm text-gray-400 mt-1",children:a("versionHistory.versionsAutoCreated")})]}):(0,S.jsx)("div",{className:"space-y-3",children:t.map((e,t)=>{var n,s;const l=0===t;return(0,S.jsx)("div",{className:"p-4 border rounded-lg hover:border-blue-300 transition-all ".concat(l?"bg-blue-50 border-blue-200":"bg-gray-50"),children:(0,S.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,S.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,S.jsx)(ke.A,{className:"w-4 h-4 text-gray-400 flex-shrink-0"}),(0,S.jsx)("span",{className:"text-sm",children:r(e.timestamp)}),l&&(0,S.jsx)("span",{className:"text-xs px-2 py-0.5 bg-blue-600 text-white rounded",children:a("versionHistory.current")})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mb-2",children:i(e.timestamp)}),(0,S.jsxs)("div",{className:"flex items-center gap-4 text-xs text-gray-600",children:[(0,S.jsx)("span",{children:a("versionHistory.sectionsCount",{count:(null===(n=e.sections)||void 0===n?void 0:n.length)||(null===(s=e.pages)||void 0===s?void 0:s.flatMap(e=>e.sections||[]).length)||0})}),(0,S.jsx)("span",{className:"text-gray-300",children:"\u2022"}),(0,S.jsx)("span",{className:"truncate",children:"string"===typeof e.settings.businessName?e.settings.businessName:(0,C._A)(e.settings.businessName,"en")})]})]}),!l&&(0,S.jsxs)("button",{onClick:()=>(e=>{confirm(a("versionHistory.restoreVersionConfirm",{date:i(e.timestamp)}))&&o(e)})(e),className:"flex items-center gap-2 px-3 py-2 text-sm bg-white border border-gray-300 rounded hover:bg-gray-50 hover:border-blue-400 transition-all flex-shrink-0",children:[(0,S.jsx)(co.A,{className:"w-4 h-4"}),a("versionHistory.restore")]})]})},e.id)})})}),(0,S.jsx)("div",{className:"p-4 border-t bg-gray-50",children:(0,S.jsxs)("div",{className:"flex items-start gap-2 text-xs text-gray-600",children:[(0,S.jsx)(lo.A,{className:"w-4 h-4 flex-shrink-0 mt-0.5"}),(0,S.jsx)("p",{children:a("versionHistory.manualSaveNote",{max:50})})]})})]})})}var mo=o(53604),po=o(20454),go=o(57427),ho=o(40614),fo=o(4843);const xo=["className","style"],bo=["className","children","style"],yo=["className"],vo=["className"];function jo(e){let t=Object.assign({},((0,po.A)(e),e));return(0,S.jsx)(go.bL,(0,n.A)({"data-slot":"dialog"},t))}function No(e){let t=Object.assign({},((0,po.A)(e),e));return(0,S.jsx)(go.ZL,(0,n.A)({"data-slot":"dialog-portal"},t))}const wo=a.forwardRef((e,t)=>
1{let{className:o,style:a}=e,r=(0,s.A)(e,xo);return(0,S.jsx)(go.hJ,(0,n.A)({ref:t,"data-slot":"dialog-overlay",className:(0,fo.cn)("fixed inset-0 z-[9999] bg-black/50",o),style:(0,n.A)({backgroundColor:"rgba(0, 0, 0, 0.5)",backdropFilter:"blur(2px)",opacity:1},a)},r))});function Co(e){let{className:t,children:o,style:a}=e,r=(0,s.A)(e,bo);return(0,S.jsxs)(No,{"data-slot":"dialog-portal",children:[(0,S.jsx)(wo,{}),(0,S.jsxs)(go.UC,(0,n.A)((0,n.A)({"data-slot":"dialog-content",className:(0,fo.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-[9999] w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),style:a},r),{},{children:[o,(0,S.jsxs)(go.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,S.jsx)(ho.A,{}),(0,S.jsx)("span",{className:"sr-only",children:"Close"})]})]}))]})}function So(e){let{className:t}=e,o=(0,s.A)(e,yo);return(0,S.jsx)(go.hE,(0,n.A)({"data-slot":"dialog-title",className:(0,fo.cn)("text-lg leading-none font-semibold",t)},o))}function Ao(e){let{className:t}=e,o=(0,s.A)(e,vo);return(0,S.jsx)(go.VY,(0,n.A)({"data-slot":"dialog-description",className:(0,fo.cn)("text-muted-foreground text-sm",t)},o))}wo.displayName=go.hJ.displayName;var ko=o(16851),Io=o(10917);const To=["className","variant","asChild"],zo=(0,Io.F)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Fo(e){let{className:t,variant:o,asChild:a=!1}=e,r=(0,s.A)(e,To);const i=a?ko.DX:"span";return(0,S.jsx)(i,(0,n.A)({"data-slot":"badge",className:(0,fo.cn)(zo({variant:o}),t)},r))}const Mo=["className","type"];function Po(e){let{className:t,type:o}=e,a=(0,s.A)(e,Mo);return(0,S.jsx)("input",(0,n.A)({type:o,"data-slot":"input",className:(0,fo.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base bg-input-background transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t)},a))}var Bo=o(25908),Eo=o(76321),Do=o(33530),Lo=o(85373),Ho=o(69981),Ro=o(29373),Oo=o(38715),_o=o(6225),Uo=o(711),qo=o(98082),Vo=o(63442),Wo=o(52351),Go=o(88613),Jo=o(42022),Xo=o(230),Yo=o(56273),Zo=o(64317),$o=o(71901),Qo=o(21627),Ko=o(19202),en=o(66574),tn=o(52575),on=o(6748);function nn(e){let{open:t,onOpenChange:o,onAddSection:s,currentCategory:r,calendarIncluded:l=!0}=e;const{t:d,language:u}=(0,c.o)(),[m,p]=(0,a.useState)(""),[h,f]=(0,a.useState)("all"),x=e=>"fr"===u&&e.name_fr?e.name_fr:e.name,b=e=>"fr"===u&&e.description_fr?e.description_fr:e.description,[y,v]=(0,a.useState)(null),[j,N]=(0,a.useState)([]),[w,C]=(0,a.useState)(!0),A="true"===localStorage.getItem("isFechamUser");(0,a.useEffect)(()=>{t&&(async()=>
1{try{C(!0),console.log("[SectionLibraryBrowser] Fetching sections from API..."),console.log("[SectionLibraryBrowser] Is FECHAM user:",A);let e=null;try{e=localStorage.getItem("token")}catch(t){e=null}const o=await i.A.get("".concat(te.n,"/global-sections"),{headers:(0,n.A)((0,n.A)({},e?{Authorization:"Bearer ".concat(e)}:{}),{},{"X-Fecham-User":A?"true":"false"})});console.log("[SectionLibraryBrowser] API Response:",o.data);const s=o.data.sections||o.data;console.log("[SectionLibraryBrowser] Loaded",s.length,"sections from API"),console.log("[SectionLibraryBrowser] Benefits sections:",s.filter(e=>"benefits"===e.type||"member-benefits"===e.type)),N(Array.isArray(s)?s:[])}catch(o){var e;console.error("[SectionLibraryBrowser] Error fetching sections:",o),console.error("[SectionLibraryBrowser] Error response:",null===(e=o.response)||void 0===e?void 0:e.data),console.warn("[SectionLibraryBrowser] Falling back to mock data ("+mo._O.length+" sections)"),N(mo._O.filter(e=>e.isActive&&!(0,on.RO)(e.type)))}finally{C(!1)}})()},[t,A]);const k=["newsletter","reservation-calendar"],I=["commandites"],T=e=>!0===e.fechamOnly||I.includes(e.type);console.log("[SectionLibraryBrowser] FECHAM detection:",{isFechamUser:A,hostname:window.location.hostname});const z=Array.from(new Set(j.filter(e=>!!e.isActive&&((!A||!k.includes(e.type))&&!(!A&&T(e)))).map(e=>e.type))).sort((e,t)=>Number((0,on.RO)(t))-Number((0,on.RO)(e))),F=j.filter(e=>{if(!e.isActive)return!1;if(A&&k.includes(e.type))return!1;if(!A&&T(e))return!1;if(m){const t=m.toLowerCase();if(!(x(e).toLowerCase().includes(t)||b(e).toLowerCase().includes(t)))return!1}return"all"===h||e.type===h}).sort((e,t)=>Number((0,on.RO)(t.type))-Number((0,on.RO)(e.type))),M=e=>{console.log("[handleAddSection] Template defaultData:",e.defaultData),console.log("[handleAddSection] Template type:",e.type);const t=(0,on.RO)(e.type)?re((0,n.A)((0,n.A)({},e.defaultData||{}),{},{type:e.type}),999):re(e.defaultData,999);console.log("[handleAddSection] New section after cloneSection:",t),s(t),o(!1)},P=e=>{const t="sectionLibrary.sectionTypeLabels.".concat(e);return d(t)};return t?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(jo,{open:t,onOpenChange:o,children:(0,S.jsx)(Co,{className:"!max-w-[1100px] !w-[95vw] !p-0 !gap-0 !bg-white !grid-rows-1",style:{height:"85vh",maxHeight:"85vh",overflow:"hidden",display:"flex",flexDirection:"column"},children:(0,S.jsxs)("div",{style:{display:"flex",flex:1,overflow:"hidden",minHeight:0,height:"100%"},children:[(0,S.jsxs)("div",{style:{width:"220px",borderRight:"1px solid #e5e7eb",backgroundColor:"white",display:"flex",flexDirection:"column",flexShrink:0,height:"100%"},children:[(0,S.jsxs)("div",{style:{padding:"0.75rem 1rem",borderBottom:"1px solid #e5e7eb",flexShrink:0},children:[(0,S.jsx)(So,{className:"text-base font-semibold mb-0",children:d("sectionLibrary.title")}),(0,S.jsx)(Ao,{className:"sr-only",children:d("sectionLibrary.description")})]}),(0,S.jsxs)("div",{style:{flex:1,overflowY:"auto",paddingTop:"0.5rem",paddingBottom:"0.5rem",minHeight:0},children:[(0,S.jsx)("button",{onClick:()=>f("all"),className:"w-full text-left px-6 py-2.5 text-sm transition-colors ".concat("all"===h?"bg-blue-50 text-blue-600 border-r-2 border-blue-600":"text-gray-700 hover:bg-gray-50"),children:d("sectionTypes.all")}),z.map(e=>(0,S.jsx)("button",{onClick:()=>f(e),className:"w-full text-left px-6 py-2.5 text-sm transition-colors ".concat(h===e?"bg-blue-50 text-blue-600 border-r-2 border-blue-600":"text-gray-700 hover:bg-gray-50"),children:P(e)},e))]})]}),(0,S.jsxs)("div",{style:{flex:1,display:"flex",flexDirection:"column",backgroundColor:"#f9fafb",minWidth:0,height:"100%",overflow:"hidden"},children:[(0,S.jsx)("div",{style:{padding:"0.75rem 1rem",backgroundColor:"white",borderBottom:"1px solid #e5e7eb",flexShrink:0},children:(0,S.jsxs)("div",{className:"relative",children:[(0,S.jsx)(pt.A,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"}),(0,S.jsx)(Po,{placeholder:d("sectionLibrary.searchPlaceholder"),value:m,onChange:e=>p(e.target.value),className:"pl-10 bg-gray-50 border-gray-200"})]})}),(0,S.jsx)("div",{style:{flex:1,overflowY:"auto",padding:"1rem",minHeight:0},children:w?(0,S.jsx)("div",{className:"flex items-center justify-center h-64",children:(0,S.jsx)("div",{className:"w-8 h-8 border-4 border-blue-600 border-t-transparent roun
1ded-full animate-spin"})}):F.length>0?(0,S.jsx)("div",{className:"grid grid-cols-3 gap-3",children:F.map(e=>{var t,o,n,s,a,r,i,l;return(0,S.jsxs)("div",{className:"bg-white rounded-lg overflow-hidden border border-gray-200 hover:border-gray-300 hover:shadow-sm transition-all",children:[(0,S.jsx)("div",{className:"relative aspect-[2/1] bg-gray-100",children:(0,on.RO)(e.type)?(0,S.jsx)(on.TT,{type:e.type}):e.thumbnail||null!==(t=e.defaultData)&&void 0!==t&&null!==(o=t.backgroundImage)&&void 0!==o&&o.url||null!==(n=e.defaultData)&&void 0!==n&&null!==(s=n.image)&&void 0!==s&&s.url?(0,S.jsx)("img",{src:e.thumbnail||(null===(a=e.defaultData)||void 0===a||null===(r=a.backgroundImage)||void 0===r?void 0:r.url)||(null===(i=e.defaultData)||void 0===i||null===(l=i.image)||void 0===l?void 0:l.url),alt:x(e),className:"w-full h-full object-cover",onError:e=>{e.target.style.display="none"}}):(0,S.jsx)("div",{className:"w-full h-full flex items-center justify-center text-gray-400 text-sm",children:d("sectionLibrary.noPreview")})}),(0,S.jsxs)("div",{className:"p-3",children:[(0,S.jsx)("h4",{className:"text-sm font-medium mb-1 line-clamp-1",children:x(e)}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mb-2 line-clamp-1",children:b(e)}),(0,S.jsx)("div",{className:"flex flex-wrap gap-1 mb-2",children:e.categories.slice(0,2).map(e=>(0,S.jsx)(Fo,{variant:"secondary",className:"text-[10px] px-1.5 py-0",children:d("categories.".concat(e))},e))}),(0,S.jsxs)(Bo.$,{size:"sm",onClick:()=>M(e),className:"w-full bg-blue-600 text-white hover:bg-blue-700 h-7 text-xs",children:[(0,S.jsx)(g.A,{className:"w-3 h-3 mr-1"}),d("common.add")]})]})]},e._id)})}):(0,S.jsxs)("div",{className:"text-center py-12 text-gray-500",children:[(0,S.jsx)("p",{className:"text-sm",children:d("sectionLibrary.noResults")}),(0,S.jsx)(Bo.$,{variant:"link",className:"mt-2 text-xs",onClick:()=>{p(""),f("all")},children:d("common.clear")})]})}),(0,S.jsxs)("div",{style:{borderTop:"1px solid #e5e7eb",backgroundColor:"white",padding:"0.5rem 1rem",display:"flex",justifyContent:"space-between",alignItems:"center",flexShrink:0},children:[(0,S.jsxs)("p",{className:"text-xs text-gray-500",children:[F.length," ",d("sectionLibrary.sectionsAvailable")]}),(0,S.jsx)(Bo.$,{variant:"outline",size:"sm",onClick:()=>o(!1),className:"text-xs h-7",children:d("common.cancel")})]})]})]})})}),y&&(0,S.jsx)(jo,{open:!!y,onOpenChange:()=>v(null),children:(0,S.jsxs)(Co,{className:"max-w-5xl max-h-[85vh] overflow-y-auto",children:[(0,S.jsx)(So,{className:"text-xl",children:y.name}),(0,S.jsx)(Ao,{children:y.description}),(0,S.jsx)("div",{className:"mt-6 border rounded-lg overflow-hidden",children:(()=>{const e=y.defaultData;switch(y.type){case"hero":return(0,S.jsx)(Eo.K,{section:e,isEditMode:!1});case"features":return(0,S.jsx)(Do.t,{section:e,isEditMode:!1});case"services":return(0,S.jsx)(Lo.e,{section:e,isEditMode:!1});case"testimonials":return(0,S.jsx)(Ho.O,{section:e,isEditMode:!1});case"pricing":return(0,S.jsx)(Ro.c,{section:e,isEditMode:!1});case"contact":return(0,S.jsx)(Oo.c,{section:e,isEditMode:!1});case"benefits":return(0,S.jsx)(_o.w,{section:e,isEditMode:!1});case"wellness-programs":return(0,S.jsx)(Uo.U,{section:e,isEditMode:!1});case"business-team":return(0,S.jsx)(qo.x,{section:e,isEditMode:!1});case"coaching-packages":return(0,S.jsx)(Vo.t,{section:e,isEditMode:!1});case"member-benefits":return(0,S.jsx)(Wo.W,{section:e,isEditMode:!1});case"reservation-calendar":return(0,S.jsx)(Go.g,{section:e,isEditMode:!1});case"reviews":return(0,S.jsx)(Jo.X,{section:e,contentLanguage:"en",isPreview:!0});case"newsletter":return(0,S.jsx)(Xo.L,{section:e,contentLanguage:"en",isPreview:!0});case"blog":return(0,S.jsx)(Yo.s,{section:e,contentLanguage:"en",isPreview:!0});case"shop":return(0,S.jsx)(Zo.k,{section:e,isEditing:!0});case"iframe":return(0,S.jsx)($o.W,{section:e,isEditing:!1});case"custom-html":return(0,S.jsx)(Qo.E,{section:e,isEditing:!1});case"formations-catalogue":return(0,S.jsx)(Ko.x,{section:e,isEditing:!1});case"sponsors":return(0,S.jsx)(en.V,{section:e,isEditing:!1});case"commandites":return(0,S.jsx)(tn.i,{section:e,isEditing:!1});default:return(0,S.jsx)("div",{className:"p-8 text-center text-gray-500",children:"Section preview not available"})}})()}),(0,S.jsxs)("div",{className:"flex justify-end gap-3 mt-6",children:[(0,S.jsx)(Bo.$,{variant:"outline",onClick:()=>v(null),children:"Close"}),(0,S.jsxs)(Bo.$,{onClick:()=>{M(y),v(null)},children:[(0,S.jsx)(g.A,{className:"w-4 h-4 mr-2"}),"Add to Website"]})]})]})})]}):null}var sn=o(36210);const an={navy:{primary:"#1e40af",secondary:"#3b82f6",lightBg:"#eff6ff",darkBg:"#dbeafe"},slate:{primary:"#0f172a",secondary:"#334155",lightBg:"#f1f5f9",darkBg:"#e2e8f0"},emerald:{primary:"#059669",secondary:"#10b981",lightBg:"#f0fdf4",darkBg:"#dcfce7"},professional:{primary:"#2563eb",secondary:"#3b82f6",lightBg:"#eff6ff",darkBg:"#dbeafe"},modern:{primary:"#7c3aed",secondary:"#8b5cf6",lightBg:"#faf5ff",darkBg:"#f3e8ff"},warm:{primary:"#ea580c",secondary:"#f97316",lightBg:"#fff7ed",darkBg:"#ffedd5"}},rn={hero:["https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=1920&q=80","https://images.unsplash.com/photo-1557804506-669a67965ba0?w=1920&q=80","https://images.unsplash.com/photo-1517245386807-bb43f82c33c4?w=1920&q=80","https://images.unsplash.com/photo-1541534741688-6078c6bfb5c5?w=1920&q=80","https://images.unsplash.com/photo-1552664730-d307ca884978?w=1920&q=80"],services:["https://images.unsplash.com/photo-1486312338219-ce68d2c6f44d?w=800&q=80","https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=800&q=80","https://images.unsplash.com/photo-1552664730-d307ca884978?w=800&q=80","https://images.unsplash.com/photo-1551836022-deb4988cc6c0?w=800&q=80","https://images.unsplash.com/photo-1542744173-8e7e53415bb0?w=800&q=80","https://images.unsplash.com/photo-1553877522-43269d4ea984?w=800&q=80"],team:["https://images.unsplash.com/photo-1560250097-0b93528c311a?w=600&q=80","https://images.unsplash.com/photo-1573496359142-b8d87734a5a2?w=600&q=80","https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=600&q=80","https://images.unsplash.com/photo-1580489944761-15a19d654956?w=600&q=80","https://images.unsplash.com/photo-1519085360753-af0119f7cbe7?w=600&q=80","https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=600&q=80"],testimonials:["https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=200&q=80","https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=200&q=80","https://images.unsplash.com/photo-153452874
11775-53994a69daeb?w=200&q=80","https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?w=200&q=80","https://images.unsplash.com/photo-1517841905240-472988babdf9?w=200&q=80","https://images.unsplash.com/photo-1488161628813-04466f872be2?w=200&q=80"]};function ln(e,t,o,n,s,a){const{pageType:r,pageName:i,sections:l,requiresDynamicFeatures:c,dynamicFeatureMessage:d}=function(e){const t=e.toLowerCase();let o="general",n="New Page",s=[],a=!1,r="";if(t.match(/\b(blog|article|posts?|news|updates?|dynamic content)\b/))a=!0,o="blog-static",n="Blog",s=["hero","services","testimonials","contact"],r="This request cannot be completed because the AI doesn't have the option to create dynamic blog functionality yet.";else if(t.match(/\b(crm|customer management|lead management|database|data entry)\b/))a=!0,o="crm-info",n="Customer Portal",s=["hero","features","contact"],r="This request cannot be completed because the AI doesn't have the option to create CRM or database functionality yet.";else if(t.match(/\b(dashboard|admin panel|analytics|reports|login|authentication|user accounts?)\b/))a=!0,o="portal-info",n="Client Portal",s=["hero","features","contact"],r="This request cannot be completed because the AI doesn't have the option to create dashboard or authentication functionality yet.";else if(t.match(/\b(e-?commerce|shopping cart|online store|shop|buy now|payment|checkout)\b/))a=!0,o="ecommerce-info",n="Shop",s=["hero","services","pricing","contact"],r="This request cannot be completed because the AI doesn't have the option to create e-commerce or payment functionality yet.";else if(t.match(/\b(inventory|stock management|order management|shipping)\b/))
1a=!0,o="inventory-info",n="Services",s=["hero","features","contact"],r="This request cannot be completed because the AI doesn't have the option to create inventory management functionality yet.";else if(t.match(/\b(why choose us|why us|advantages?|methodology|approach|what makes us|our method|our approach|trager|technique|modality)\b/))o="benefits",n="Why Choose Us",s=["hero","benefits","features","testimonials","contact"];else if(t.match(/\b(about|about us|who we are|our story|company|history|mission|vision)\b/))o="about",n="About Us",s=["hero","benefits","features","business-team","testimonials","contact"];else if(t.match(/\b(team|our team|people|staff|meet the team|meet our)\b/))o="team",n="Our Team",s=["hero","business-team","member-benefits","contact"];else if(t.match(/\b(service|services|what we do|what we offer|offerings|solutions)\b/))o="services",n="Services",s=["hero","services","benefits","features","testimonials"];else if(t.match(/\b(pricing|plans|packages|cost|price|rates|fees)\b/))o="pricing",n="Pricing",s=["hero","pricing","features","testimonials","contact"];else if(t.match(/\b(contact|reach|get in touch|contact us)\b/))o="contact",n="Contact",s=["contact"];else if(t.match(/\b(program|programs|classes|courses|training|workshops)\b/))o="programs",n="Programs",s=["hero","wellness-programs","features","pricing","contact"];else if(t.match(/\b(coaching|mentoring|consultation|coach)\b/))o="coaching",n="Coaching",s=["hero","coaching-packages","features","testimonials","contact"];else if(t.match(/\b(membership|member|join|benefits|become a member)\b/))o="membership",n="Membership",s=["hero","member-benefits","pricing","testimonials","contact"];else if(t.match(/\b(book|booking|reserve|reservation|schedule|appointment)\b/))o="booking",n="Booking online",s=["hero","reservation-calendar","features"];else if(t.match(/\b(testimonial|reviews|success|clients|results|feedback)\b/))o="testimonials",n="Success Stories",s=["hero","testimonials","features","contact"];
1else if(t.match(/\b(career|careers|jobs|hiring|work with us|join our team)\b/))o="careers",n="Careers",s=["hero","features","business-team","contact"];else if(t.match(/\b(faq|questions|help|support)\b/))o="faq",n="FAQ",s=["hero","features","contact"];else if(t.match(/\b(portfolio|gallery|work|projects|showcase|our work)\b/))o="portfolio",n="Our Work",s=["hero","services","testimonials","contact"];else{const t=function(e){const t=e.replace(/^(create|add|make|build|generate|i need|i want|need|want|a page for|a page about)/gi,"").replace(/(page|section)$/gi,"").trim();return!t||t.length<3?null:t.split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")}(e);t?(n=t,o="custom",s=function(e){const t=e.toLowerCase(),o=["hero"];return t.match(/\b(feature|benefit|advantage|why)\b/)&&o.push("features"),t.match(/\b(service|offering|solution)\b/)&&o.push("services"),t.match(/\b(team|people|staff)\b/)&&o.push("business-team"),t.match(/\b(review|testimonial|client|customer)\b/)&&o.push("testimonials"),t.match(/\b(price|pricing|cost|plan|package)\b/)&&o.push("pricing"),t.match(/\b(program|class|course)\b/)&&o.push("wellness-programs"),t.match(/\b(coach|coaching|mentor)\b/)&&o.push("coaching-packages"),t.match(/\b(member|membership|join)\b/)&&o.push("member-benefits"),t.match(/\b(book|reserve|appointment|schedule)\b/)&&o.push("reservation-calendar"),o.push("contact"),o}(e)):s=["hero","features","contact"]}return{pageType:o,pageName:n,sections:s,requiresDynamicFeatures:a,dynamicFeatureMessage:r}}(e);if(c)return{id:"error",name:"",slug:"",sections:[],order:0,createdBy:"ai",aiGenerated:!0,reasoning:d,requiresDynamicFeatures:!0,dynamicFeatureMessage:d};const u=e=>"string"===typeof e?e:(null===e||void 0===e?void 0:e.en)||(null===e||void 0===e?void 0:e.fr)||"",m=n.map(e=>u(e.name).toLowerCase()),p=i.toLowerCase().replace(/\s+/g,"-");if(m.includes(i.toLowerCase()))return{id:"error",name:"",slug:"",sections:[],order:0,createdBy:"ai",aiGenerated:!0,reasoning:'A page named "'.concat(i,'" already exists on your website.'),requiresDynamicFeatures:!1,dynamicFeatureMessage:'This page cannot be created because a page named "'.concat(i,'" already exists. Please choose a different page type or name.'),isDuplicate:!0};if(n.map(e=>e.slug).includes(p)){const e=n.find(e=>e.slug===p),t=e?u(e.name):p;return{id:"error",name:"",slug:"",sections:[],order:0,createdBy:"ai",aiGenerated:!0,reasoning:"A page with similar content already exists.",requiresDynamicFeatures:!1,dynamicFeatureMessage:'This page cannot be created because a similar page ("'.concat(t,'") already exists. Please choose a different page type.'),isDuplicate:!0}}(function(e,t,o){const n={};if(e)for(const g of e){var s,a,r,i,l,c,d,u,m,p;const e=g;"headline"in e&&null!==(s=e.headline)&&void 0!==s&&s.content&&(n.headline=(0,C._A)(e.headline.content,"en")),"subheadline"in e&&null!==(a=e.subheadline)&&void 0!==a&&a.content&&(n.subheadline=(0,C._A)(e.subheadline.content,"en")),"sectionTitle"in e&&null!==(r=e.sectionTitle)&&void 0!==r&&r.content&&(n.sectionTitle=(0,C._A)(e.sectionTitle.content,"en")),"description"in e&&null!==(i=e.description)&&void 0!==i&&i.content&&(n.description=(0,C._A)(e.description.content,"en")),"features"in e&&(null===(l=e.features)||void 0===l?void 0:l.length)>0&&(n.features=e.features.map(e=>(0,C._A)(e.title.content,"en")).join(", ")),"services"in e&&(null===(c=e.services)||void 0===c?void 0:c.length)>0&&(n.services=e.services.map(e=>(0,C._A)(e.title.content,"en")).join(", ")),"testimonials"in e&&(null===(d=e.testimonials)||void 0===d?void 0:d.length)>0&&(n.testimonials=e.testimonials.map(e=>(0,C._A)(e.quote.content,"en")).join(", ")),"tiers"in e&&(null===(u=e.tiers)||void 0===u?void 0:u.length)>0&&(n.pricing=e.tiers.map(e=>(0,C._A)(e.name.content,"en")).join(", ")),"members"in e&&(null===(m=e.members)||void 0===m?void 0:m.length)>0&&(n.members=e.members.map(e=>(0,C._A)(e.name.content,"en")).join(", ")),"benefits"in e&&(null===(p=e.benefits)||void 0===p?void 0:p.length)>0&&(n.benefits=e.benefits.map(e=>(0,C._A)(e.title.content,"en")).join(", "))}o&&(n.tagline=o)})(a,0,s),an["wellness"===t?"emerald":"coaching"===t?"modern":"business"===t?"professional":"navy"];const g=p,h=l.map((e,t)=>ie(e,t));!function(e){const t={};for(const n of e)t[n.type]=n.id;const o=t.contact||t["reservation-calendar"]||t.pricing||t.services;for(const n of e){if("hero"===n.type&&"buttons"in n&&n.buttons)for(const e of n.buttons)"#"!==e.url&&""!==e.url||o&&(e.url="#".concat(o),e.linkType="section",e.targetSectionId=o);if("benefits"===n.type&&"button"in n&&n.button){const e=n.button;"#"!==e.url&&""!==e.url||o&&(e.url="#".concat(o),e.linkType="section",e.targetSectionId=o)}if("services"===n.type&&"services"in n&&n.services){const e=t.contact||t["reservation-calendar"];for(const t of n.services)!t.button||"#"!==t.button.url&&""!==t.button.url||e&&(t.button.url="#".concat(e),t.button.linkType="section",t.button.targetSectionId=e)}if("pricing"===n.type&&"tiers"in n&&n.tiers){const e=t.contact||t["reservation-calendar"];for(const t of n.tiers)!t.button||"#"!==t.button.url&&""!==t.button.url||e&&(t.button.url="#".concat(e),t.button.linkType="section",t.button.targetSectionId=e)}}}(h);return{id:"page-".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),name:i,slug:g,sections:h,order:n.length,createdBy:"ai",aiGenerated:!0,reasoning:"Generated a ".concat(r," page based on your request with ").concat(l.length," relevant sections"),requiresDynamicFeatures:!1,dynamicFeatureMessage:""}}function cn(e){let{open:t,onOpenChange:o,existingPages:s,category:r,businessName:i,tagline:l,homeSections:d,websiteId:u,onPageCreate:m}=e;const[p,g]=(0,a.useState)(""),[h,f]=(0,a.useState)(!1),[x,b]=(0,a.useState)(null),[y,j]=(0,a.useState)("input"),[N,w]=(0,a.useState)(""),[C,A]=(0,a.useState)(!1),[k,T]=(0,a.useState)(!1),[z,F]=(0,a.useState)(!1),[M,B]=(0,a.useState)(!1),{t:E}=(0,c.o)();(0,a.useEffect)(()=>
1{if(t){const e=sessionStorage.getItem("aiPagePrompt");e&&(g(e),sessionStorage.removeItem("aiPagePrompt"),setTimeout(()=>{e.trim()&&L()},500))}},[t]);const D=[E("aiPageCreator.quickSuggestions.aboutUs"),E("aiPageCreator.quickSuggestions.services"),E("aiPageCreator.quickSuggestions.pricing"),E("aiPageCreator.quickSuggestions.contact"),E("aiPageCreator.quickSuggestions.team"),E("aiPageCreator.quickSuggestions.booking")],L=async()=>{if(p.trim()){f(!0);try{const M="string"===typeof i?i:i.fr||i.en||"",P=l?"string"===typeof l?l:l.fr||l.en||"":"",D=p.match(/\b(une|des|les|sur|pour|dans|avec|page|cr\xe9er|creer|services|notre|nos)\b/gi),L=D&&D.length>=2||"fr"===E("common.language"),H=ln(p,r,0,s,P,d);if(H&&"error"===H.id)return H.isDuplicate?(w(H.dynamicFeatureMessage||E("aiPageCreator.duplicatePage")),T(!0),A(!0),f(!1),void g("")):(w(H.dynamicFeatureMessage),T(!1),A(!0),f(!1),void g(""));if(!H)return _t.oR.error(E("aiPageCreator.failedToGenerate")),void f(!1);const R=localStorage.getItem("token");if(R)try{const r=(H.sections||[]).map(e=>e.type).filter(Boolean);let i="";if(d&&d.length>0){const n=d.find(e=>"hero"===e.type);if(n&&"headline"in n){var e,t,o,a;const s="object"===typeof(null===(e=n.headline)||void 0===e?void 0:e.content)?n.headline.content.fr||n.headline.content.en:null===(t=n.headline)||void 0===t?void 0:t.content,r="subheadline"in n?"object"===typeof(null===(o=n.subheadline)||void 0===o?void 0:o.content)?n.subheadline.content.fr||n.subheadline.content.en:null===(a=n.subheadline)||void 0===a?void 0:a.content:"";s&&(i+="TITRE DU SITE: ".concat(s,"\n")),r&&(i+="SOUS-TITRE DU SITE: ".concat(r,"\n"))}const s=d.find(e=>"services"===e.type);if(s&&"services"in s){const e=s.services.slice(0,4).map(e=>{var t,o;return"object"===typeof(null===(t=e.title)||void 0===t?void 0:t.content)?e.title.content.fr||e.title.content.en:null===(o=e.title)||void 0===o?void 0:o.content}).filter(Boolean);e.length>0&&(i+="SERVICES EXISTANTS: ".concat(e.join(", "),"\n"))}}if(s.length>0){const e=s.map(e=>"object"===typeof e.name?e.name.fr||e.name.en:e.name).filter(Boolean);i+="PAGES EXISTANTES: ".concat(e.join(", "),"\n")}const l=r.includes("contact"),u=r.includes("benefits"),g=r.filter(e=>"hero"!==e&&"contact"!==e&&"benefits"!==e),f="Tu es un redacteur web professionnel BILINGUE. Genere le contenu d'une page web en FRANCAIS et ANGLAIS.\n\nENTREPRISE: ".concat(M,"\n").concat(P?"SLOGAN: ".concat(P):"","\n").concat(i?"\nCONTEXTE DU SITE (source de verite sur l'industrie reelle du client):\n".concat(i):"",'\nDEMANDE DU CLIENT: "').concat(p,'"\nSECTIONS: ').concat(r.join(", "),'\n\nIMPORTANT: DEDUIS l\'industrie/secteur du client a partir du NOM, SLOGAN et CONTEXTE DU SITE ci-dessus (titres, sous-titres, services existants). N\'utilise AUCUN theme visuel du template (wellness, yoga, fitness, spa, coaching, etc.) si le contexte reel du client ne correspond pas. Exemple: si le site parle de "transformation numerique" ou "consultation technologique", le secteur est conseil/tech, PAS wellness.\n\nIMPORTANT: Chaque champ texte doit etre un objet {"fr": "...", "en": "..."} avec les DEUX traductions.\n\nRetourne UNIQUEMENT un JSON valide (pas de markdown):\n{\n "pageName": {"fr": "Titre court", "en": "Short Title"},\n "hero": {\n "headline": {"fr": "Titre accrocheur", "en": "Catchy headline"},\n "subheadline": {"fr": "Sous-titre", "en": "Subtitle"},\n "buttonText": {"fr": "Decouvrir", "en": "Discover"}\n },').concat(l?'\n "contact": {\n "headline": {"fr": "Contactez-nous", "en": "Contact Us"},\n "description": {"fr": "...", "en": "..."},\n "buttonText": {"fr": "Envoyer", "en": "Send"}\n },':"").concat(u?'\n "benefits": {\n "headline": {"fr": "...", "en": "..."},\n "description": {"fr": "...", "en": "..."},\n "buttonText": {"fr": "En savoir plus", "en": "Learn More"}\n },':"",'\n "sections": [').concat(g.map(e=>"services"===e?'\n {"type":"services","title":{"fr":"...","en":"..."},"items":[{"title":{"fr":"...","en":"..."},"description":{"fr":"...","en":"..."},"buttonText":{"fr":"En savoir plus","en":"Learn More"}}]}':"features"===e?'\n {"type":"features","title":{"fr":"...","en":"..."},"items":[{"title":{"fr":"...","en":"..."},"description":{"fr":"...","en":"..."}}]}':"testimonials"===e?'\n {"type":"testimonials","title":{"fr":"...","en":"..."},"items":[{"title":{"fr":"Prenom Nom","en":"First Last"},"role":{"fr":"Poste","en":"Position"},"description":{"fr":"Citation","en":"Quote"}}]}
1':"pricing"===e?'\n {"type":"pricing","title":{"fr":"...","en":"..."},"description":{"fr":"...","en":"..."},"items":[{"title":{"fr":"Plan","en":"Plan"},"price":"$99/mo","features":[{"fr":"...","en":"..."}],"buttonText":{"fr":"Commencer","en":"Get Started"}}]}':"business-team"===e?'\n {"type":"business-team","title":{"fr":"...","en":"..."},"description":{"fr":"...","en":"..."},"items":[{"name":"Prenom Nom","role":{"fr":"Poste","en":"Position"},"bio":{"fr":"Bio","en":"Bio"}}]}':"").filter(Boolean).join(","),'\n ]\n}\n\nREGLES:\n1. Contenu SPECIFIQUE a "').concat(p,"\" \u2014 ZERO generique\n2. Vocabulaire du domaine REEL de l'entreprise (deduis-le du CONTEXTE DU SITE, PAS du template)\n3. Descriptions: 2-3 phrases concretes\n4. EXACTEMENT 6 items par section\n5. Traductions COHERENTES entre fr et en (meme sens, pas de mot-a-mot)\n6. ZERO reference a wellness/yoga/fitness/spa/meditation/coaching sauf si le contexte du site le confirme explicitement"),b=await fetch("".concat(te.n,"/claude-proxy"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(R)},body:JSON.stringify({model:"claude-opus-4-7",max_tokens:6e3,messages:[{role:"user",content:f}]})});if(b.ok){var c,m;const e=(null===(c=(await b.json()).content)||void 0===c||null===(m=c[0])||void 0===m?void 0:m.text)||"";console.log("[AI Page] Claude raw response length:",e.length);const t=e.match(/\{[\s\S]*\}/);if(t){var h,x,y,v,N,C;const e=JSON.parse(t[0]);var S,k;if(console.log("[AI Page] Parsed AI content:",JSON.stringify(e).substring(0,500)),console.log("[AI Page] pageName type:",typeof e.pageName,e.pageName),console.log("[AI Page] sections count:",null===(h=e.sections)||void 0===h?void 0:h.length),null!==(x=e.sections)&&void 0!==x&&null!==(y=x[0])&&void 0!==y&&y.items)console.log("[AI Page] first item title type:",typeof(null===(S=e.sections[0].items[0])||void 0===S?void 0:S.title),null===(k=e.sections[0].items[0])||void 0===k?void 0:k.title);e._lang=L?"fr":"en",function(e,t){if(!t||!e.sections)return;const o=e=>e?"object"===typeof e&&("fr"in e||"en"in e)?{en:e.en||e.fr||"",fr:e.fr||e.en||""}:"string"===typeof e?{en:e,fr:e}:null:null,s=(e,t)=>{if(!e||!t)return;const n=o(t);n&&(e.content=n)},a=e=>o(e)||{en:"",fr:""};if(t.pageName){const n=o(t.pageName);if(n){e.name=n;const t=(n.en||n.fr||"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");e.slug=t}}for(const r of e.sections){if("hero"===r.type&&t.hero&&"headline"in r&&(t.hero.headline&&s(r.headline,t.hero.headline),t.hero.subheadline&&s(r.subheadline,t.hero.subheadline),t.hero.buttonText&&r.buttons&&r.buttons.length>0&&(r.buttons[0].text=a(t.hero.buttonText))),"contact"===r.type&&t.contact&&"headline"in r&&(t.contact.headline&&s(r.headline,t.contact.headline),t.contact.description&&"description"in r&&s(r.description,t.contact.description),t.contact.buttonText&&r.buttons&&r.buttons.length>0&&(r.buttons[0].text=a(t.contact.buttonText))),"benefits"===r.type&&t.benefits&&"headline"in r&&(t.benefits.headline&&s(r.headline,t.benefits.headline),t.benefits.description&&"description"in r&&s(r.description,t.benefits.description),t.benefits.buttonText&&"button"in r&&r.button&&(r.button.text=a(t.benefits.buttonText))),"business-team"===r.type&&"sectionTitle"in r){const e=(t.sections||[]).find(e=>"business-team"===e.type||"team"===e.type);if(e&&(e.title&&s(r.sectionTitle,e.title),e.description&&"description"in r&&s(r.description,e.description),e.items&&"members"in r))for(let t=0;t<Math.min(e.items.length,r.members.length);t++)e.items[t].name&&s(r.members[t].name,e.items[t].name),e.items[t].role&&s(r.members[t].role,e.items[t].role),e.items[t].bio&&r.members[t].bio&&s(r.members[t].bio,e.items[t].bio)}const e=(t.sections||[]).find(e=>e.type===r.type);if(e){if(e.title&&"sectionTitle"in r&&s(r.sectionTitle,e.title),e.description&&"description"in r&&"hero"!==r.type&&s(r.description,e.description),"services"===r.type&&"services"in r&&e.items){const t=r.services[0];r.services=e.items.map((e,s)=>({id:"".concat(Date.now(),"-svc-").concat(s),image:null!==t&&void 0!==t&&t.image?(0,n.A)((0,n.A)({},t.image),{},{id:"".concat(Date.now(),"-svcimg-").concat(s),url:rn.services[s%rn.services.length]}):void 0,title:{id:"".concat(Date.now(),"-svct-").concat(s),content:o(e.title)||{en:"",fr:""},fontFamily:"Inter",fontSize:"28px",color:"#1a1a1a",tag:"h3"},description:{id:"".concat(Date.now(),"-svcd-").concat(s),content:o(e.description)||{en:"",fr:""},fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"},button:null!==t&&void 0!==t&&t.button?{id:"".concat(Date.now(),"-svcb-").concat(s),text:a(e.buttonText||{fr:"En savoir plus",en:"Learn More"}),url:"#",fontFamily:"Inter",backgroundColor:t.button.backgroundColor||"#2563eb",textColor:"#ffffff",size:"medium"}:void 0}))}if("features"===r.type&&"features"in r&&e.items){const t=r.features[0];r.features=e.items.map((e,s)=>({id:"".concat(Date.now(),"-feat-").concat(s),icon:null!==t&&void 0!==t&&t.icon?(0,n.A)((0,n.A)({},t.icon),{},{id:"".concat(Date.now(),"-featico-").concat(s),url:rn.services[s%rn.services.length]}):void 0,title:{id:"".concat(Date.now(),"-featt-").concat(s),content:o(e.title)||{en:"",fr:""},fontFamily:"Inter",fontSize:"24px",color:"#1a1a1a",tag:"h3"},description:{id:"".concat(Date.now(),"-featd-").concat(s),content:o(e.description)||{en:"",fr:""},fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"}}
1))}if("testimonials"===r.type&&"testimonials"in r&&e.items&&(r.testimonials=e.items.map((e,t)=>{const n=o(e.title)||{en:"",fr:""};return{id:"".concat(Date.now(),"-test-").concat(t),quote:{id:"".concat(Date.now(),"-testq-").concat(t),content:o(e.description)||{en:"",fr:""},fontFamily:"Inter",fontSize:"18px",color:"#1a1a1a",tag:"p"},author:{id:"".concat(Date.now(),"-testa-").concat(t),content:n,fontFamily:"Inter",fontSize:"20px",color:"#1a1a1a",tag:"p"},role:{id:"".concat(Date.now(),"-testr-").concat(t),content:o(e.role)||{en:"",fr:""},fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"},avatar:{id:"".concat(Date.now(),"-testav-").concat(t),url:"https://images.unsplash.com/photo-".concat(["1494790108377-be9c29b29330","1500648767791-00dcc994a43e","1534528741775-53994a69daeb","1506794778202-cad84cf45f1d","1517841905240-472988babdf9","1488161628813-04466f872be2"][t%6],"?w=200&q=80"),alt:n.en||n.fr||"Client"}}})),"pricing"===r.type&&"tiers"in r&&e.items){const t=r.tiers[0];r.tiers=e.items.map((e,n)=>{var s,r;return{id:"".concat(Date.now(),"-tier-").concat(n),name:{id:"".concat(Date.now(),"-tiern-").concat(n),content:o(e.title)||{en:"",fr:""},fontFamily:"Inter",fontSize:"28px",color:"#111827",tag:"h3"},price:{id:"".concat(Date.now(),"-tierp-").concat(n),content:o(e.price)||{en:"",fr:""},fontFamily:"Inter",fontSize:"52px",color:"#111827",tag:"p"},features:(e.features||[]).map((e,t)=>({id:"".concat(Date.now(),"-tierf-").concat(n,"-").concat(t),content:o(e)||{en:"",fr:""},fontFamily:"Inter",fontSize:"17px",color:"#4b5563",tag:"p"})),button:{id:"".concat(Date.now(),"-tierb-").concat(n),text:a(e.buttonText||{fr:"Commencer",en:"Get Started"}),url:"#",fontFamily:"Inter",backgroundColor:1===n?(null===t||void 0===t||null===(s=t.button)||void 0===s?void 0:s.backgroundColor)||"#2563eb":"#ffffff",textColor:1===n?"#ffffff":(null===t||void 0===t||null===(r=t.button)||void 0===r?void 0:r.backgroundColor)||"#2563eb",size:"large"},highlighted:1===n}})}}}}(H,e),console.log("[AI Page] After apply - first section services count:",(null===(v=H.sections)||void 0===v||null===(N=v[0])||void 0===N||null===(C=N.services)||void 0===C?void 0:C.length)||"N/A"),console.log("[AI Page] After apply - page name:",H.name)}else console.error("[AI Page] No JSON found in Claude response:",e.substring(0,200))}else console.error("[AI Page] Claude proxy returned status:",b.status)}catch(I){console.error("[AI Page] Claude enrichment FAILED:",I)}if(z&&u&&R){B(!0);try{const e=["string"===typeof i?i:(null===i||void 0===i?void 0:i.fr)||(null===i||void 0===i?void 0:i.en),l?"string"===typeof l?l:l.fr||l.en:""].filter(Boolean).join(" \u2014 "),t=await async function(e,t,o,n,s){if(null===e||void 0===e||!e.sections||!t||!n)return 0;const a=[],r={},i=e=>{var t;if(!e)return"";const o=null!==(t=e.content)&&void 0!==t?t:e;if("string"===typeof o)return o.replace(/<[^>]+>/g,"").replace(/ /g," ").trim();if(o&&"object"===typeof o){const e=o.fr||o.en||"";return"string"===typeof e?e.replace(/<[^>]+>/g,"").replace(/ /g," ").trim():""}return""};if(e.sections.forEach((e,t)=>{"services"===e.type&&Array.isArray(e.services)&&e.services.forEach((e,o)=>{if(null===e||void 0===e||!e.image)return;const n="s".concat(t,"-i").concat(o);a.push({key:n,title:i(e.title),description:i(e.description),type:"service"}),r[n]={sIdx:t,iIdx:o,field:"image"}}),"features"===e.type&&Array.isArray(e.features)&&e.features.forEach((e,o)=>{if(null===e||void 0===e||!e.icon)return;const n="s".concat(t,"-i").concat(o);a.push({key:n,title:i(e.title),description:i(e.description),type:"feature"}),r[n]={sIdx:t,iIdx:o,field:"icon"}})}),0===a.length)return 0;const l=await fetch("".concat(o,"/client/websites/").concat(t,"/generate-ai-images"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(n)},body:JSON.stringify({items:a,business_context:s||""})});if(!l.ok)return console.error("[AI Images] Backend error",l.status),0;const c=(await l.json()).images||{};let d=0;for(const u of Object.keys(c)){const t=r[u];if(!t)continue;const o=e.sections[t.sIdx],n="image"===t.field?o.services:o.features,s=null===n||void 0===n?void 0:n[t.iIdx];if(!s)continue;const a="image"===t.field?s.image:s.icon;a&&(a.url=c[u],d+=1)}return d}(H,u,te.n,R,e);console.log("[AI Page] Replaced ".concat(t," images with AI"))}catch(F){console.error("[AI Page] AI image generation failed:",F),_t.oR.error(E("aiPageCreator.aiImagesFailed")||"AI image generation failed, using default images")}finally{B(!1)}}b(H),j("preview")}catch(M){console.error("[AI Page] Generation error:",M),_t.oR.error(E("aiPageCreator.failedToGenerate"))}finally{f(!1)}}else _t.oR.error(E("aiPageCreator.pleaseDescribe"))},H=()=>{g(""),b(null),j("input"),o(!1)};return t?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("div",{className:"fixed inset-0 z-[9999]",style:{backgroundColor:"rgba(0, 0, 0, 0.6)",backdropFilter:"blur(3px)"},onClick:H}),(0,S.jsx)("div",{className:"fixed left-1/2 top-1/2 z-[10000] w-full max-w-3xl -translate-x-1/2 -translate-y-1/2",style:{maxHeight:"85vh"},onClick:e=>e.stopPropagation(),children:(0,S.jsxs)("div",{className:"bg-white rounded-lg shadow-2xl overflow-hidden",children:[(0,S.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[(0,S.jsx)("div",{className:"flex items-center gap-2",children:(0,S.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:E("aiPageCreator.title")})}),(0,S.jsx)("button",{onClick:H,className:"text-gray-400 hover:text-gray-600 transition-colors",children:(0,S.jsx)(ho.A,{className:"h-5 w-5"})})]}),(0,S.jsx)("div",{className:"p-6 overflow-y-auto",style:{maxHeight:"calc(85vh - 80px)"},children:"input"===y?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("p",{className:"text-gray-600 mb-6",children:E("aiPageCreator.description",{category:r})}),(0,S.jsxs)("div",{className:"space-y-3 mb-6",children:[(0,S.jsx)("label",{className:"text-sm font-medium text-gray-700",children:E("aiPageCreator.whatToCreate")}),(0,S.jsxs)("div",{className:"flex gap-2",children:[(0,S.jsx)(Po,{placeholder:E("aiPageCreator.promptPlaceholder"),value:p,onChange:e=>g(e.target.value),onKeyDown:e=>{"Enter"!==e.key||h||L()},className:"flex-1",disabled:h}),(0,S.jsx)(Bo.$,{onClick:L,disabled:h||!p.trim(),className:"bg-green-600 hover:bg-green-700 text-white font-medium px-6",children:h?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(I.A,{className:"h-4 w-4 mr-2 animate-spin"}),M?E("aiPageCreator.generatingImages")||"Generation des images...":E("c
1ommon.creating")]}):E("common.generate")})]})]}),(0,S.jsx)("div",{className:"mb-6 p-4 bg-purple-50 border border-purple-200 rounded-lg",children:(0,S.jsxs)("label",{className:"flex items-start gap-3 cursor-pointer",children:[(0,S.jsx)("input",{type:"checkbox",checked:z,onChange:e=>F(e.target.checked),disabled:h,className:"w-5 h-5 mt-0.5 text-purple-600 rounded cursor-pointer"}),(0,S.jsxs)("div",{className:"flex-1",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)(P.A,{className:"w-4 h-4 text-purple-600"}),(0,S.jsx)("span",{className:"text-sm font-medium text-gray-900",children:E("aiPageCreator.generateAiImages")||"Generer des images IA uniques"})]}),(0,S.jsx)("p",{className:"text-xs text-gray-600 mt-1",children:E("aiPageCreator.generateAiImagesHelp")||"Une image unique generee par IA pour chaque service et fonctionnalite (ajoute 30-60s)."})]})]})}),(0,S.jsxs)("div",{className:"space-y-3",children:[(0,S.jsx)("label",{className:"text-sm font-medium text-gray-700",children:E("aiPageCreator.quickIdeas")}),(0,S.jsx)("div",{className:"grid grid-cols-2 gap-2",children:D.map((e,t)=>(0,S.jsx)("button",{onClick:()=>{g(e),setTimeout(()=>L(),100)},disabled:h,className:"px-4 py-3 text-left text-sm text-purple-700 bg-purple-50 hover:bg-purple-100 border border-purple-200 rounded-lg transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:e},t))})]}),(0,S.jsxs)("div",{className:"mt-6 p-4 bg-gray-50 rounded-lg border border-gray-200",children:[(0,S.jsx)("div",{className:"flex items-start gap-2 mb-2",children:(0,S.jsx)("h3",{className:"font-semibold text-gray-900",children:E("aiPageCreator.howItWorks")})}),(0,S.jsxs)("ul",{className:"space-y-1 text-sm text-gray-600 ml-6",children:[(0,S.jsxs)("li",{children:["\u2022 ",E("aiPageCreator.createMultipleSections")]}),(0,S.jsxs)("li",{children:["\u2022 ",E("aiPageCreator.contentTailored",{businessName:"string"===typeof i?i:i.en,category:r})]}),(0,S.jsxs)("li",{children:["\u2022 ",E("aiPageCreator.colorsMatch")]}),(0,S.jsxs)("li",{children:["\u2022 ",E("aiPageCreator.fullyEditable")]})]})]})]}):(0,S.jsx)(S.Fragment,{children:(0,S.jsxs)("div",{className:"space-y-4",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 text-green-600 bg-green-50 px-4 py-3 rounded-lg border border-green-200",children:[(0,S.jsx)(sn.A,{className:"h-5 w-5"}),(0,S.jsx)("p",{className:"font-medium",children:E("aiPageCreator.pageCreatedSuccess")})]}),x&&(0,S.jsxs)("div",{className:"bg-gray-50 rounded-lg p-6 border border-gray-200",children:[(0,S.jsx)("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:String("object"===typeof x.name?x.name.fr||x.name.en:x.name)}),(0,S.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:E("aiPageCreator.pageIncludes",{count:x.sections.length})}),(0,S.jsxs)("div",{className:"space-y-2",children:[(0,S.jsx)("p",{className:"text-sm font-medium text-gray-700",children:E("aiPageCreator.sectionsIncluded")}),(0,S.jsx)("div",{className:"flex flex-wrap gap-2",children:x.sections.map((e,t)=>(0,S.jsx)("span",{className:"px-3 py-1 bg-white text-gray-700 text-sm rounded-full border border-gray-300",children:e.type},t))})]})]}),(0,S.jsxs)("div",{className:"flex gap-3 pt-4",children:[(0,S.jsx)(Bo.$,{onClick:()=>{j("input")},variant:"outline",className:"flex-1",children:E("aiPageCreator.createAnother")}),(0,S.jsxs)(Bo.$,{onClick:()=>{x&&(m(x),x.sections&&_t.oR.success('Added "'.concat(String("object"===typeof x.name?x.name.fr||x.name.en:x.name),'" with ').concat(x.sections.length," sections!")),H())},className:"flex-1 bg-green-600 hover:bg-green-700 text-white font-medium",children:[E("aiPageCreator.addToWebsite"),(0,S.jsx)(v.A,{className:"h-4 w-4 ml-2"})]})]})]})})})]})}),C&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("div",{className:"fixed inset-0 z-[10001]",style:{backgroundColor:"rgba(0, 0, 0, 0.6)",backdropFilter:"blur(3px)"},onClick:()=>A(!1)}),(0,S.jsx)("div",{className:"fixed left-1/2 top-1/2 z-[10002] w-full max-w-md -translate-x-1/2 -translate-y-1/2",onClick:e=>e.stopPropagation(),children:(0,S.jsxs)("div",{className:"bg-white rounded-lg shadow-2xl p-6",children:[(0,S.jsxs)("div",{className:"flex items-start gap-3 mb-4",children:[(0,S.jsx)(lo.A,{className:"h-6 w-6 flex-shrink-0 mt-0.5 ".concat(k?"text-red-500":"text-amber-500")}),(0,S.jsxs)("div",{children:[(0,S.jsx)("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:E(k?"aiPageCreator.duplicatePageTitle":"aiPageCreator.dynamicContentTitle")}),(0,S.jsx)("p",{className:"text-gray-600 text-sm",children:N})]})]}),(0,S.jsx)(Bo.$,{onClick:()=>{A(!1),T(!1)},className:"w-full ".concat(k?"bg-red-600 hover:bg-red-700":"bg-amber-600 hover:bg-amber-700"),children:E("common.ok")})]})})]})]}):null}var dn=o(5379),un=o(79989);const mn={Home:{en:"Home",fr:"Accueil"},About:{en:"About",fr:"\xc0 propos"},Services:{en:"Services",fr:"Services"}
1,Contact:{en:"Contact",fr:"Contact"},Blog:{en:"Blog",fr:"Blog"},Portfolio:{en:"Portfolio",fr:"Portfolio"},Team:{en:"Team",fr:"\xc9quipe"},FAQ:{en:"FAQ",fr:"FAQ"},Pricing:{en:"Pricing",fr:"Tarifs"},Testimonials:{en:"Testimonials",fr:"T\xe9moignages"}};function pn(e){let{pages:t,currentPageId:o,onPageChange:n,onAddPage:s,onDeletePage:r,onRenamePage:i,onReorderPages:l,onSetParentPage:d}=e;const{language:u,t:m}=(0,c.o)(),[p,f]=(0,a.useState)(null),[x,b]=(0,a.useState)(""),[y,v]=(0,a.useState)(null),[j,w]=(0,a.useState)(null),[A,k]=(0,a.useState)(null),I=(0,a.useRef)({}),T=e=>{const t=e.name;if(t&&"object"===typeof t&&Object.prototype.hasOwnProperty.call(t,"en"))return(0,C._A)(t,u);if(t){const e=String(t);return mn[e]?(0,C._A)(mn[e],u):e}return"Page"},[z,F]=(0,a.useState)(null),[M,P]=(0,a.useState)(null),B=e=>{x.trim()&&i(e,x.trim()),f(null)};(0,a.useEffect)(()=>{const e=e=>{e.target.closest(".page-dropdown")||(v(null),k(null))};if(y)return console.log("Dropdown is open for page:",y),document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[y]);const E=e=>{e.target.style.opacity="1",F(null),P(null)};return(0,S.jsx)("div",{className:"bg-white border-b relative",style:{zIndex:100},onDragLeave:()=>P(null),children:(0,S.jsxs)("div",{className:"flex items-center px-4 py-2 gap-0 overflow-x-auto overflow-y-visible",style:{position:"relative"},children:[t.map((e,s)=>{const a=e.id===o,i="home"===e.slug,c=z===e.id,g=M===s&&null!==z;return(0,S.jsxs)("div",{className:"relative flex items-center",onDragOver:e=>((e,t)=>{e.preventDefault(),e.dataTransfer.dropEffect="move",0!==t?M!==t&&P(t):P(null)})(e,s),onDrop:e=>((e,o)=>{if(e.preventDefault(),!z||!l)return F(null),void P(null);if(0===o)return F(null),void P(null);const n=t.findIndex(e=>e.id===z);-1!==n&&n!==o&&l(n,o),F(null),P(null)})(e,s),children:[g&&(0,S.jsx)("div",{className:"absolute left-0 top-1 bottom-1 w-1 bg-gray-800 rounded-full z-10"}),(0,S.jsx)("div",{draggable:!i&&!p,onDragStart:o=>((e,o)=>{const n=t.find(e=>e.id===o);"home"!==(null===n||void 0===n?void 0:n.slug)?(F(o),e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",o),setTimeout(()=>{e.target.style.opacity="0.5"},0)):e.preventDefault()})(o,e.id),onDragEnd:E,className:"\n flex items-center gap-1 px-3 py-2 rounded-t-lg cursor-pointer transition-all mx-1\n ".concat(a?"bg-blue-50 border-t-2 border-l border-r border-blue-500 text-blue-700 font-medium":"bg-gray-50 hover:bg-gray-100 text-gray-700","\n ").concat(c?"opacity-50":"","\n ").concat(i?"":"cursor-grab active:cursor-grabbing","\n "),children:p===e.id?(0,S.jsx)("div",{className:"flex items-center gap-2",children:(0,S.jsx)("input",{type:"text",value:x,onChange:e=>b(e.target.value),onKeyDown:t=>{"Enter"===t.key&&B(e.id),"Escape"===t.key&&(f(null),b(""))},className:"px-2 py-1 border rounded text-sm w-32",autoFocus:!0,onBlur:()=>B(e.id)})}):(0,S.jsxs)(S.Fragment,{children:[!i&&l&&(0,S.jsx)(h.A,{className:"h-3 w-3 text-gray-400 flex-shrink-0"}),(0,S.jsxs)("button",{onClick:()=>n(e.id),className:"flex items-center gap-2",children:[i?(0,S.jsx)(mt.A,{className:"h-4 w-4"}):(0,S.jsx)(Ie.A,{className:"h-4 w-4"}),(0,S.jsx)("span",{className:"text-sm whitespace-nowrap",children:(()=>{const t=e.name;if(t&&"object"===typeof t&&Object.prototype.hasOwnProperty.call(t,"en"))return(0,C._A)(t,u);if(t){const e=String(t);return mn[e]?(0,C._A)(mn[e],u):e}return"Page"})()})]}),!i&&(0,S.jsxs)("div",{className:"relative page-dropdown",children:[(0,S.jsx)("button",{ref:t=>{I.current[e.id]=t},className:"p-1 hover:bg-gray-200 rounded",onClick:t=>((e,t)=>{if(t.stopPropagation(),console.log("Toggle dropdown for page:",e,"Current:",y),y===e)v(null),w(null);else{const t=I.current[e];if(t){const e=t.getBoundingClientRect();w({top:e.bottom+4,left:e.right-192})}v(e)}})(e.id,t),children:(0,S.jsx)(dn.A,{className:"h-3 w-3"})}),y===e.id&&j&&(0,S.jsx)("div",{className:"fixed rounded-lg shadow-xl border border-gray-300",style:{backgroundColor:"#ffffff",zIndex:99999,display:"block",top:"".concat(j.top,"px"),left:"".concat(j.left,"px"),width:"192px"},onClick:e=>e.stopPropagation(),children:(0,S.jsxs)("div",{className:"py-1",children:[(0,S.jsxs)("button",{onClick:()=>(e=>{f(e.id),b("object"===typeof e.name?e.name[u]||e.name.fr||e.name.en:e.name),v(null)})(e),className:"w-full flex items-center gap-2 px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 transition-colors",children:[(0,S.jsx)(un.A,{className:"h-4 w-4 text-blue-600"}),m("pageManager.rename")]}),d&&(A===e.id?(0,S.jsxs)("div",{className:"px-4 py-2",children:[(0,S.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:m("pageManager.parentPage")}),(0,S.jsxs)("select",{autoFocus:!0,value:e.parentPageId||"",onChange:t=>{return o=e.id,n=t.target.value,null===d||void 0===d||d(o,""===n?null:n),k(null),void v(null);var o,n},onClick:e=>e.stopPropagation(),className:"w-full text-sm border rounded px-2 py-1",children:[(0,S.jsx)("option",{value:"",children:m("pageManager.noParentPage")}),t.filter(o=>{if(o.id===e.id)return!1;if("home"===o.slug)return!1;return!function(e,t){const o=new Set;let n=[e];for(;n.length>0;){const e=[];for(const s of t)s.parentPageId&&n.includes(s.parentPageId)&&!o.has(s.id)&&(o.add(s.id),e.push(s.id));n=e}return o}(e.id,t).has(o.id)}).map(e=>(0,S.jsx)("option",{value:e.id,children:T(e)},e.id))]})]}):(0,S.jsxs)("button",{onClick:()=>k(e.id),className:"w-full flex items-center justify-between gap-2 px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 transition-colors",children:[(0,S.jsx)("span",{children:m("pageManager.parentPage")}),(0,S.jsx)("span",{className:"text-xs text-gray-400 truncate max-w-[80px]",children:e.parentPageId?T(t.find(t=>
1t.id===e.parentPageId)||e):m("pageManager.noParentPage")})]})),(0,S.jsxs)("button",{onClick:()=>{return t=e.id,r(t),void v(null);var t},className:"w-full flex items-center gap-2 px-4 py-2 text-sm text-red-600 hover:bg-red-50 transition-colors",children:[(0,S.jsx)(N.A,{className:"h-4 w-4"}),m("common.delete")]})]})})]})]})})]},e.id)}),(0,S.jsx)("button",{onClick:s,className:"flex items-center justify-center w-8 h-8 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",title:m("pageManager.aiNewPage"),children:(0,S.jsx)(g.A,{className:"h-5 w-5"})})]})})}var gn=o(28969),hn=o(1523);function fn(e){let{pages:t,currentPageId:o,currentPageSections:s,websiteSettings:r,selectedSectionId:i,selectedElementId:l,onAddSection:d,onUpdateSection:u,onDeleteSection:m,onUpdateSettings:p,onNavigateToSection:g,onSelectElement:f,onUpdateElement:x,onSaveConversation:b,conversationHistory:y=[],onAddPage:v,onAddItemToSection:j}=e;const{t:N,language:w}=(0,c.o)(),A=w||"en",k=A,[T,z]=(0,a.useState)(!1),[F,M]=(0,a.useState)(!1),[B,E]=(0,a.useState)({x:24,y:24}),[D,L]=(0,a.useState)(!1),[H,R]=(0,a.useState)({x:0,y:0}),[O,_]=(0,a.useState)(()=>y.map(e=>(0,n.A)((0,n.A)({},e),{},{timestamp:e.timestamp instanceof Date?e.timestamp:new Date(e.timestamp)}))),[U,q]=(0,a.useState)(""),[V,W]=(0,a.useState)(!1),G=(0,a.useRef)(null),J=(0,a.useRef)(null);(0,a.useEffect)(()=>{const e=e=>{if(D){const t=window.innerWidth,o=window.innerHeight,n=t-e.clientX-H.x,s=o-e.clientY-H.y;E({x:Math.max(0,Math.min(n,t-384)),y:Math.max(0,Math.min(s,o-(F?64:600)))})}},t=()=>{L(!1)};if(D)return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}},[D,H,F]);const[X,Y]=(0,a.useState)(!1);(0,a.useEffect)(()=>{const e=localStorage.getItem("token");e&&fetch("/api/client/access",{headers:{Authorization:"Bearer ".concat(e)}}).then(e=>e.ok?e.json():null).then(e=>{e&&!0===e.catalogue_affilies_enabled&&Y(!0)}).catch(()=>{})},[]),(0,a.useEffect)(()=>{T&&!F&&setTimeout(()=>{var e;null===(e=G.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})},100)},[O,T,F]),(0,a.useEffect)(()=>{var e;T&&!F&&(null===(e=J.current)||void 0===e||e.focus())},[T,F]),(0,a.useEffect)(()=>{O.length>0&&b(O)},[O,b]);const Z=()=>Math.random().toString(36).substr(2,9),$=async()=>{if(!U.trim()||V)return;const e={id:Z(),role:"user",content:U.trim(),timestamp:new Date};_(t=>[...t,e]),q(""),W(!0),setTimeout(()=>{var e;null===(e=J.current)||void 0===e||e.focus()},0);try{const c=(()=>{var e;const n=t.find(e=>e.id===o),a=e=>(0,C._A)(e,k),c=s.map(e=>{const t={id:e.id,type:e.type,order:e.order,elements:[]},o=e;return o.headline&&t.elements.push({id:o.headline.id,type:"text",role:"headline",content:a(o.headline.content)}),o.subheadline&&t.elements.push({id:o.subheadline.id,type:"text",role:"subheadline",content:a(o.subheadline.content)}),o.description&&t.elements.push({id:o.description.id,type:"text",role:"description",content:a(o.description.content)}),o.buttons&&Array.isArray(o.buttons)&&o.buttons.forEach(e=>{t.elements.push({id:e.id,type:"button",role:"button",content:a(e.text)})}),"pricing"!==e.type&&"coaching-packages"!==e.type||!o.packages||o.packages.forEach((e,o)=>{e.name&&t.elements.push({id:e.name.id,type:"text",role:"package".concat(o,"_name"),content:a(e.name.content)}),e.price&&t.elements.push({id:e.price.id,type:"text",role:"package".concat(o,"_price"),content:a(e.price.content)}),e.description&&t.elements.push({id:e.description.id,type:"text",role:"package".concat(o,"_description"),content:a(e.description.content)})}),["features","services","benefits","member-benefits"].includes(e.type)&&o.items&&o.items.forEach((e,o)=>{e.title&&t.elements.push({id:e.title.id,type:"text",role:"item".concat(o,"_title"),content:a(e.title.content)}),e.description&&t.elements.push({id:e.description.id,type:"text",role:"item".concat(o,"_description"),content:a(e.description.content)})}),"testimonials"===e.type&&o.testimonials&&o.testimonials.forEach((e,o)=>{e.name&&t.elements.push({id:e.name.id,type:"text",role:"testimonial".concat(o,"_name"),content:a(e.name.content)}),e.quote&&t.elements.push({id:e.quote.id,type:"text",role:"testimonial".concat(o,"_quote"),content:a(e.quote.content)})}
1),"business-team"===e.type&&o.teamMembers&&o.teamMembers.forEach((e,o)=>{e.name&&t.elements.push({id:e.name.id,type:"text",role:"team".concat(o,"_name"),content:a(e.name.content)}),e.role&&t.elements.push({id:e.role.id,type:"text",role:"team".concat(o,"_role"),content:a(e.role.content)})}),o.backgroundImage&&t.elements.push({id:o.backgroundImage.id,type:"image",role:"background"}),o.image&&t.elements.push({id:o.image.id,type:"image",role:"image"}),t});return{websiteSettings:{businessName:r.businessName,tagline:r.tagline,hasLogo:!(null===(e=r.logo)||void 0===e||!e.url),googleAnalyticsId:r.googleAnalyticsId||"not set",googleTagManagerId:r.googleTagManagerId||"not set"},currentPage:{name:(null===n||void 0===n?void 0:n.name)||"Home",sectionCount:s.length,sections:c},allPages:t.map(e=>({name:e.name,slug:e.slug,sectionCount:e.sections.length})),selectedSection:i,selectedElement:l,availableSectionTypes:["hero","features","services","testimonials","pricing","contact","benefits","wellness-programs","business-team","coaching-packages","member-benefits","reservation-calendar",...X?["agent-cadeaux","catalogue-produits","boutiques-partenaires"]:[]]}})(),d=O.map(e=>({role:e.role,content:e.content})),u="true"===localStorage.getItem("aiAssistantDemoMode"),m=localStorage.getItem("token")||"",p=!0?"/api/claude-proxy":"https://api.anthropic.com/v1/messages";if(!u)try{const t=await fetch(p,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(m)},body:JSON.stringify({model:"claude-sonnet-4-6",max_tokens:2e3,messages:[...d,{role:"user",content:"You are NEO, a friendly website building assistant. You're helping a business owner build their website - they are NOT technical, so speak in simple, everyday language.\n\nIMPORTANT - LANGUAGE:\n- The user's interface language is: ".concat("fr"===A?"FRENCH":"ENGLISH","\n- You MUST respond in ").concat("fr"===A?"FRENCH":"ENGLISH"," language\n- All your responses must be in ").concat("fr"===A?"FRENCH":"ENGLISH",'\n\nCOMMUNICATION STYLE:\n- Use simple, clear language - avoid technical jargon (no "sections", say "parts of your page" instead)\n- Be warm, friendly, and encouraging\n- Use analogies and examples that business owners understand\n- Never mention code, CSS, HTML, or technical terms\n- Explain things like you\'re helping a friend, not a developer\n- Keep responses short (2-3 sentences max)\n- Use emojis occasionally to be friendly \u2728\n\nWEBSITE CONTEXT:\n').concat(JSON.stringify(c,null,2),"\n\nUSER QUESTION/REQUEST:\n").concat(e.content,'\n\nWHEN ANSWERING QUESTIONS:\n- Explain in simple terms (e.g., "the top banner of your page" instead of "hero section")\n- Give practical advice business owners can use\n- Be encouraging and positive\n\nWHEN TAKING ACTIONS:\nIf the user wants you to make changes (add something, change colors, etc.), respond naturally like:\n"I\'ll add that for you right now! \u2728" then include the actions at the END:\n\nACTIONS:\n```json\n[\n {\n "type": "add_page" | "add_section" | "add_item" | "update_section" | "update_element" | "delete_section" | "update_settings" | "navigate" | "select_element",\n "payload": { /* action-specific data */ },\n "description": "Human-readable description"\n }\n]\n```\n\nAVAILABLE ACTIONS:\n- add_page: { prompt: "team page" } - Creates a complete new page with multiple sections\n- add_section: { type: "hero" | "features" | "testimonials" | "contact" | "pricing" | "business-team" | etc. } - Adds ONE section to current page\n- add_item: { sectionId: "id", itemType: "team_member" | "feature" | "service" | "testimonial" | etc. } - Adds item to a section (e.g., add team member to team section)\n- update_section: { sectionId: "id", updates: { backgroundColor: "#hex", imagePosition: "left" | "right", heroStyle: "image-left" | "centered" | "image-right" } } - Update section properties\n- update_element: { elementId: "id", elementType: "text" | "button" | "image", updates: { content: "new text", color: "#hex", fontSize: "24px", url: "https://..." } } - Update individual text, button, or image properties\n- delete_section: { sectionId: "id" }\n- update_settings: { updates: { businessName: "New Name" } }\n- navigate: { sectionId: "id" }\n- select_element: { elementId: "id", elementType: "button" | "text" | "image" }\n\nIMAGE POSITIONING:\n- For Benefits sections: use imagePosition: "left" or "right"\n- For Hero sections: use heroStyle: "image-left", "centered", or "image-right"\n- When user asks to "move image to left/right", use update_section with the appropriate property\n\nIMPORTANT DISTINCTIONS:\n- "Create a team PAGE" \u2192 use add_page with prompt "team page"\n- "Add a team SECTION" \u2192 use add_section with type "business-team"\n- "Add another team member" \u2192 use add_item with itemType "team_member" and the team section\'s ID\n').concat(X?'\nCATALOGUE AFFILI\xc9S (this account has it) - extra add_section types:\n- add_section: { type: "agent-cadeaux" } - the gift assistant area at the top of the page (a conversation that suggests gift ideas from their catalogue)\n- add_section: { type: "catalogue-produits" } - a grid of their products (their favorites, one category or one store)\n- add_section: { type: "boutiques-partenaires" } - their partner stores\nExamples:\n- "ajoute mes coups de c\u0153ur" \u2192 add_section with type "catalogue-produits"\n- "ajoute l\'assistant cadeaux en haut" \u2192 add_section with type "agent-cadeaux"\n- "montre mes boutiques" \u2192 add_section with type "boutiques-partenaires"\nNEVER invent products or prices. Products come only from the Catalogue Affili\xe9s of the portal. If the user asks you to add a product, tell them to add it in Catalogue Affili\xe9s (in French: \xab ajoutez-le dans Catalogue Affili\xe9s \xbb).\n':"",'\nEXAMPLES FOR MOVING IMAGES:\nUser: "Move the image to the left"\nIf it\'s a Benefits section: { type: "update_section", payload: { sectionId: "benefits-section-id", updates: { imagePosition: "left" } }}
1\nIf it\'s a Hero section: { type: "update_section", payload: { sectionId: "hero-section-id", updates: { heroStyle: "image-left" } }}\n\nEXAMPLES FOR UPDATING ELEMENTS:\nUser: "Change the title to \'Welcome\'"\nLook in context for the element with role "headline", then: { type: "update_element", payload: { elementId: "abc123", elementType: "text", updates: { content: "Welcome" } }}\n\nUser: "Remove this button"\nLook for the button element in context, then: { type: "update_element", payload: { elementId: "btn456", elementType: "button", updates: { content: "" } }}\n\nUser: "Change the subtitle"\nLook for element with role "subheadline", then: { type: "update_element", payload: { elementId: "sub789", elementType: "text", updates: { content: "New subtitle text" } }}\n\nIMPORTANT: Always use the element IDs from the WEBSITE CONTEXT above. Look at context.currentPage.sections[].elements[] to find the right element ID.\n\nRemember: You\'re helping a business owner, not a developer. Be friendly and clear! \ud83d\ude0a')}]})});if(t.ok){const e=(await t.json()).content[0].text,o=Q(e),n={id:Z(),role:"assistant",content:e,timestamp:new Date,actions:o};return _(e=>[...e,n]),o&&o.length>0&&K(o),void W(!1)}{let e="";try{const o=await t.json();o&&"string"===typeof o.detail&&(e=o.detail)}catch(n){}throw 401===t.status&&(e="Votre session a expir\xe9. Reconnectez-vous puis r\xe9essayez."),new Error(e||"L'assistant ne peut pas r\xe9pondre pour le moment. R\xe9essayez dans un instant.")}}catch(a){throw console.warn("AI Assistant API call failed:",a),a}if(u){await new Promise(e=>setTimeout(e,1500));const t=ee(e.content,c),o={id:Z(),role:"assistant",content:t.content,timestamp:new Date,actions:t.actions};return _(e=>[...e,o]),t.actions&&t.actions.length>0&&K(t.actions),void W(!1)}}catch(c){console.error("AI Assistant error:",c);const e=c instanceof Error&&c.message&&!/fetch|network/i.test(c.message)?c.message:"L'assistant ne peut pas r\xe9pondre pour le moment. V\xe9rifiez votre connexion et r\xe9essayez.";_t.oR.error(N("aiAssistant.failedResponse"));const t={id:Z(),role:"assistant",content:e,timestamp:new Date};_(e=>[...e,t])}finally{W(!1),setTimeout(()=>{var e;null===(e=J.current)||void 0===e||e.focus()},100)}},Q=e=>{try{console.log("[AiAssistant] Parsing actions from response:",e);const t=e.match(/ACTIONS:\s*```json\s*([\s\S]*?)\s*```/);if(t){console.log("[AiAssistant] Found actions JSON:",t[1]);const e=JSON.parse(t[1]);return console.log("[AiAssistant] Parsed actions:",e),e}console.log("[AiAssistant] No ACTIONS block found in response")}catch(t){console.error("[AiAssistant] Failed to parse actions:",t)}},K=e=>{console.log("[AiAssistant] Executing actions:",e),e.forEach(e=>{console.log("[AiAssistant] Executing action:",e);try{switch(e.type){case"add_section":d(e.payload.type),_t.oR.success(e.description||"Added ".concat(e.payload.type," section"));break;case"update_section":u(e.payload.sectionId,e.payload.updates),_t.oR.success(e.description||"Section updated");break;case"delete_section":m(e.payload.sectionId),_t.oR.success(e.description||"Section deleted");break;case"update_settings":p(e.payload.updates),_t.oR.success(e.description||"Settings updated");break;case"navigate":g(e.payload.sectionId),_t.oR.success(e.description||"Navigated to section");break;case"select_element":f(e.payload.elementId,e.payload.elementType),_t.oR.success(e.description||"Element selected");break;case"add_page":v?(v(e.payload.prompt),_t.oR.success(e.description||"Creating new page...")):_t.oR.error(N("aiAssistant.pageCreationNotAvailable"));break;case"add_item":j?(j(e.payload.sectionId,e.payload.itemType),_t.oR.success(e.description||"Added item to section")):_t.oR.error(N("aiAssistant.addingItemsNotAvailable"));break;case"update_element":x?(x(e.payload.elementId,e.payload.elementType,e.payload.updates),_t.oR.success(e.description||"Element updated")):_t.oR.error("Updating elements not available")}}catch(t){console.error("Failed to execute action:",e,t),_t.oR.error("Failed to execute: ".concat(e.description))}})},ee=(e,t)=>{const o=e.toLowerCase();return o.includes("add")&&o.includes("testimonial")?{content:"Sure! I'll add a testimonials section to your page right now. \u2728",actions:[{type:"add_section",payload:{type:"testimonials"},description:"Added testimonials section"}]}:o.includes("add")&&o.includes("feature")?{content:"I'll add a features section for you! \ud83c\udfaf",actions:[{type:"add_section",payload:{type:"features"},description:"Added features section"}]}:o.includes("add")&&o.includes("contact")?{content:"Adding a contact section now! \ud83d\udce7",actions:[{type:"add_section",payload:{type:"contact"},description:"Added contact section"}]}:o.includes("alignment")||o.includes("align")?{content:"To change button alignment, select the section containing the button, then use the Property Panel on the right. You can choose from left, center, or right alignment. Currently, your page has ".concat(t.currentPage.sectionCount," sections.")}:o.includes("google calendar")||o.includes("calendar")?{content:"To connect Google Calendar, you need to add a Reservation Calendar section. Would you like me to add one? You'll need to configure OAuth settings in the admin panel."}:o.includes("coaching")||o.includes("coach")?{content:"For a coaching website, I recommend these sections:\n\n1. Hero Section - introduce yourself\n2. Coaching Packages - your offerings\n3. Benefits Section - what clients gain\n4. Testimonials - social proof\n5. Contact Section - book a call\n\nWould you like me to add any of these?"}:o.includes("how many")||o.includes("what sections")?{content:'Your "'.concat(t.currentPage.name,'" page currently has ').concat(t.currentPage.sectionCount," sections. You have ").concat(t.allPages.length," pages total on your website.")}:{content:"I can help you with:\n\n\u2022 Adding sections (testimonials, features, contact, etc.)\n\u2022 Answering questions about your website\n\u2022 Explaining how to use different features\n\u2022 Guiding you through website customization\n\nWhat would you like help with?"}},te=[N("aiAssistant.quickQuestions.buttonAlignment"),N("aiAssistant.quickQuestions.addTestimonials"),N("aiAssistant.quickQuestions.coachingSections"),N("aiAssistant.quickQuestions.connectCalendar")];return T?(0,S.jsxs)("div",{className:"fixed bg-white rounded-2xl shadow-2xl transition-all duration-300 z-50 flex flex-col ".concat(F?"w-80 h-16":"w-96 h-[600px]"," ").concat(D?"cursor-grabbing":""),style:{right:"".concat(B.x,"px"),bottom:"".concat(B.y,"px")},onMouseDown:e=>{if(e.target.closest(".drag-handle")){L(!0);const t=e.currentTarget.getBoundingClientRect();R({x:e.clientX-t.left,y:e.clientY-t.top})}},children:[(0,S.jsxs)("div",{className:"flex items-center justify-between p-4 border-b bg-gradient-to-r from-blue-500 to-purple-600 text-white rounded-t-2xl drag-handle cursor-grab active:cursor-grabbing",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)(h.A,{className:"w-4 h-4 opacity-70"}),(0,S.jsx)(P.A,{className:"w-5 h-5"}),(0,S.jsx)("h3",{className:"font-semibold",children:N("aiAssistant.title")})]}),(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)("button",{onClick:()=>M(!F),className:"p-1 hover:bg-white/20 rounded transition-colors",title:F?"Maximize":"Minimize",children:F?(0,S.jsx)(gn.A,{className:"w-4 h-4"}):(0,S.jsx)(hn.A,{className:"w-4 h-4"})}),(0,S.jsx)("button",{onClick:()=>z(!1),className:"p-1 hover:bg-white/20 rounded transition-colors",title:N("c
1ommon.close"),children:(0,S.jsx)(ho.A,{className:"w-4 h-4"})})]})]}),!F&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:[0===O.length?(0,S.jsxs)("div",{className:"text-center py-8 space-y-4",children:[(0,S.jsx)("div",{className:"w-16 h-16 bg-gradient-to-br from-blue-100 to-purple-100 rounded-full flex items-center justify-center mx-auto",children:(0,S.jsx)(He.A,{className:"w-8 h-8 text-blue-600"})}),(0,S.jsxs)("div",{children:[(0,S.jsx)("h4",{className:"font-semibold text-gray-900",children:N("aiAssistant.greeting")}),(0,S.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:N("aiAssistant.description")})]}),(0,S.jsxs)("div",{className:"space-y-2",children:[(0,S.jsx)("p",{className:"text-xs text-gray-500",children:N("aiAssistant.tryAsking")}),te.map((e,t)=>(0,S.jsx)("button",{onClick:()=>q(e),className:"block w-full text-left text-sm p-2 bg-gray-50 hover:bg-gray-100 rounded-lg transition-colors",children:e},t))]})]}):O.map(e=>(0,S.jsx)("div",{className:"flex ".concat("user"===e.role?"justify-end":"justify-start"),children:(0,S.jsxs)("div",{className:"max-w-[80%] rounded-2xl px-4 py-2 ".concat("user"===e.role?"bg-gradient-to-br from-blue-500 to-purple-600 text-white":"bg-gray-100 text-gray-900"),children:[(0,S.jsx)("p",{className:"text-sm whitespace-pre-wrap",children:e.content.replace(/ACTIONS:[\s\S]*$/,"").trim()}),e.actions&&e.actions.length>0&&(0,S.jsx)("div",{className:"mt-2 pt-2 border-t border-gray-300 space-y-1",children:e.actions.map((e,t)=>(0,S.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,S.jsx)(he.A,{className:"w-3 h-3 text-yellow-600"}),(0,S.jsx)("span",{className:"text-gray-700",children:e.description})]},t))}),(0,S.jsx)("p",{className:"text-xs opacity-60 mt-1",children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})},e.id)),V&&(0,S.jsx)("div",{className:"flex justify-start",children:(0,S.jsx)("div",{className:"bg-gray-100 rounded-2xl px-4 py-3",children:(0,S.jsx)(I.A,{className:"w-5 h-5 text-blue-600 animate-spin"})})}),(0,S.jsx)("div",{ref:G})]}),(0,S.jsxs)("div",{className:"p-4 border-t bg-gray-50 rounded-b-2xl",children:[(0,S.jsxs)("div",{className:"flex gap-2",children:[(0,S.jsx)("input",{ref:J,type:"text",value:U,onChange:e=>q(e.target.value),onKeyPress:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),$())},placeholder:N("aiAssistant.inputPlaceholder"),disabled:V,className:"flex-1 px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed"}),(0,S.jsx)("button",{onClick:$,disabled:!U.trim()||V,className:"px-4 py-2 bg-gradient-to-br from-blue-500 to-purple-600 text-white rounded-lg hover:shadow-lg disabled:opacity-50 disabled:cursor-not-allowed transition-all",children:V?(0,S.jsx)(I.A,{className:"w-5 h-5 animate-spin"}):(0,S.jsx)(Oe.A,{className:"w-5 h-5"})})]}),(0,S.jsxs)("div",{className:"mt-2 space-y-1",children:[(0,S.jsx)("p",{className:"text-xs text-gray-500",children:N("aiAssistant.messagesInConversation",{count:O.length,plural:O.length>1?N("aiAssistant.messages"):N("aiAssistant.message")})}),(0,S.jsxs)("p",{className:"text-xs text-gray-400 italic",children:["\u26a0\ufe0f ",N("aiAssistant.disclaimer")]})]})]})]})]}):(0,S.jsxs)("button",{onClick:()=>z(!0),className:"fixed bottom-6 right-6 w-14 h-14 bg-gradient-to-br from-blue-500 to-purple-600 text-white rounded-full shadow-lg hover:shadow-xl transition-all duration-300 flex items-center justify-center group z-50",title:N("aiAssistant.title"),children:[(0,S.jsx)(P.A,{className:"w-6 h-6 group-hover:scale-110 transition-transform"}),(0,S.jsx)("span",{className:"absolute -top-1 -right-1 w-3 h-3 bg-green-400 rounded-full border-2 border-white"})]})}var xn=o(20001);function bn(e){var t,o,s,r;let{open:i,onClose:l,websiteSettings:d,websiteId:u,pages:m,currentPageSections:p,onUpdateSettings:g,contentLanguage:h,onContentLanguageChange:x}=e;const{language:b,t:y}=(0,c.o)(),[v,j]=(0,a.useState)(null),[N,w]=(0,a.useState)(b),C=null!==h&&void 0!==h?h:N,A=e=>{x?x(e):w(e)},[k,T]=((0,a.useRef)(null),(0,a.useState)(!1)),[F,M]=(0,a.useState)(!1),[B,E]=(0,a.useState)(!0);(0,a.useEffect)(()=>
1{if(!i||!u)return void E(!1);(async()=>{E(!0);if("true"===localStorage.getItem("isFechamUser"))return T(!0),M(!0),void E(!1);try{const o=localStorage.getItem("token"),n=await fetch("/api/client/websites/".concat(u,"/usage"),{headers:{Authorization:"Bearer ".concat(o)}});if(n.ok){var e,t;const o=await n.json(),s=(null===(e=o.plan)||void 0===e?void 0:e.name)||"",a="free"!==s.toLowerCase()&&""!==s;T(a),M(!0===(null===(t=o.plan)||void 0===t?void 0:t.custom_domain)||a)}}catch(o){console.error("Failed to check subscription:",o),T(!0),M(!0)}finally{E(!1)}})()},[i,u]);const D=(null===p||void 0===p?void 0:p.some(e=>"reservation-calendar"===e.type||"reservationCalendar"===e.type))||!1,_=(0,a.useCallback)(async(e,t)=>{if(e.trim()&&!v){j(t);try{const o=localStorage.getItem("token"),n=await fetch("/api/ai/rephrase",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(o)},body:JSON.stringify({text:e,context:t})});if(n.ok){const e=await n.json();e.rephrased&&g({[t]:e.rephrased})}}catch(o){console.error("Rephrase error:",o)}finally{j(null)}}},[g,v]);return i?(0,S.jsxs)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center",children:[(0,S.jsx)("div",{className:"absolute inset-0 bg-black/50",onClick:l}),(0,S.jsxs)("div",{className:"relative bg-white rounded-xl shadow-2xl w-full max-w-2xl max-h-[90vh] overflow-hidden",children:[(0,S.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b bg-gray-50",children:[(0,S.jsxs)("div",{className:"flex items-center gap-3",children:[(0,S.jsx)("div",{className:"p-2 bg-blue-100 rounded-lg",children:(0,S.jsx)(z.A,{className:"w-5 h-5 text-blue-600"})}),(0,S.jsx)("h2",{className:"text-lg font-semibold",children:y("properties.websiteSettings")})]}),(0,S.jsx)("button",{onClick:l,className:"p-2 hover:bg-gray-200 rounded-lg transition-colors",children:(0,S.jsx)(ho.A,{className:"w-5 h-5"})})]}),(0,S.jsxs)("div",{className:"p-6 overflow-y-auto max-h-[calc(90vh-130px)] space-y-6",children:[(0,S.jsxs)("div",{className:"flex items-center justify-between p-3 bg-blue-50 border border-blue-200 rounded-lg",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)(xn.A,{className:"w-4 h-4 text-blue-600"}),(0,S.jsx)("span",{className:"text-sm font-medium text-blue-900",children:"fr"===b?"Langue du contenu en cours d'\xe9dition":"Content language being edited"})]}),(0,S.jsxs)("div",{className:"flex gap-1",children:[(0,S.jsx)("button",{onClick:()=>A("en"),className:"px-3 py-1.5 text-sm font-medium rounded-md transition-colors ".concat("en"===C?"bg-blue-600 text-white":"bg-white text-blue-700 border border-blue-300 hover:bg-blue-100"),children:"EN"}),(0,S.jsx)("button",{onClick:()=>A("fr"),className:"px-3 py-1.5 text-sm font-medium rounded-md transition-colors ".concat("fr"===C?"bg-blue-600 text-white":"bg-white text-blue-700 border border-blue-300 hover:bg-blue-100"),children:"FR"})]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm font-medium mb-1",children:y("properties.businessName")}),(0,S.jsx)("input",{type:"text",value:"string"===typeof d.businessName?d.businessName:null!==(t=d.businessName[b])&&void 0!==t?t:"",onChange:e=>{const t=e.target.value,o="object"===typeof d.businessName?d.businessName:{en:d.businessName||"",fr:d.businessName||""};g({businessName:(0,n.A)((0,n.A)({},o),{},{[b]:t})})},className:"w-full px-3 py-2 border rounded-lg text-sm"}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:y("properties.businessNameHelp")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm font-medium mb-1",children:y("properties.tagline")}),(0,S.jsx)("input",{type:"text",maxLength:50,value:"string"===typeof d.tagline?d.tagline:null!==(o=d.tagline[b])&&void 0!==o?o:"",onChange:e=>{const t=e.target.value.slice(0,50),o="object"===typeof d.tagline?d.tagline:{en:d.tagline||"",fr:d.tagline||""};g({tagline:(0,n.A)((0,n.A)({},o),{},{[b]:t})})},className:"w-full px-3 py-2 border rounded-lg text-sm"}),(0,S.jsxs)("div",{className:"flex justify-between mt-1",children:[(0,S.jsx)("p",{className:"text-xs text-gray-500",children:y("properties.taglineHelp")}),(0,S.jsxs)("p",{className:"text-xs ".concat(("string"===typeof d.tagline?d.tagline.length:(d.tagline[b]||"").length)>=45?"text-amber-600":"text-gray-400"),children:["string"===typeof d.tagline?d.tagline.length:(d.tagline[b]||"").length,"/50"]})]})]}),(0,S.jsxs)("div",{className:"border-t pt-6",children:[(0,S.jsx)("label",{className:"block text-sm font-medium mb-2",children:y("properties.logo")}),(0,S.jsxs)("div",{className:"flex gap-4 items-start",children:[(0,S.jsxs)("label",{className:"flex items-center gap-2 px-4 py-2 bg-blue-50 border border-blue-200 rounded-lg cursor-pointer hover:bg-blue-100 transition-colors",children:[(0,S.jsx)(ht.A,{className:"w-4 h-4 text-blue-600"}),(0,S.jsx)("span",{className:"text-sm text-blue-700",children:y("properties.uploadLogo")}),(0,S.jsx)("input",{type:"file",accept:"image/*",className:"hidden",onChange:async e=>{var t;const o=null===(t=e.target.files)||void 0===t?void 0:t[0];if(o){const e=new FileReader;e.onloadend=async()=>{const t=e.result;try{const e=localStorage.getItem("token"),n=await fetch("/api/client/websites/upload-base64-image",{method:"POST",headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({image:t})});if(n.ok){const e=await n.json();if(e.success&&e.url){var o;const t="string"===typeof d.businessName?d.businessName:d.businessName.en;g({logo:{id:(null===(o=d.logo)||void 0===o?void 0:o.id)||"logo-1",url:e.url,alt:t+" Logo"}}),_t.oR.success(y("properties.logoUploaded")||"Logo uploaded successfully")}else _t.oR.error("Upload failed - invalid response")}else{const e=await n.json().catch(()=>({}));console.error("Logo upload failed:",n.status,e),_t.oR.error(e.detail||y("properties.logoUploadFailed")||"Failed to upload logo")}}catch(n){console.error("Logo upload error:",n),_t.oR.error(y("properties.logoUploadFailed")||"Failed to upload logo")}}
1,e.readAsDataURL(o)}}})]}),(null===(s=d.logo)||void 0===s?void 0:s.url)&&(0,S.jsxs)("div",{className:"flex items-center gap-3",children:[(0,S.jsx)("img",{src:d.logo.url,alt:"Logo preview",className:"h-12 object-contain border rounded"}),(0,S.jsx)("button",{onClick:()=>g({logo:void 0}),className:"text-sm text-red-600 hover:text-red-700",children:y("properties.removeLogo")})]})]}),(null===(r=d.logo)||void 0===r?void 0:r.url)&&(0,S.jsxs)("div",{className:"mt-4",children:[(0,S.jsxs)("label",{className:"block text-sm text-gray-600 mb-1",children:[y("properties.logoHeight"),": ",d.logoHeight||40,"px"]}),(0,S.jsx)("input",{type:"range",min:"20",max:"80",value:d.logoHeight||40,onChange:e=>g({logoHeight:parseInt(e.target.value)}),className:"w-full"})]})]}),(0,S.jsxs)("div",{className:"border-t pt-6",children:[(0,S.jsx)("h3",{className:"text-sm font-medium mb-4",children:y("properties.seoSettings")}),(0,S.jsxs)("div",{className:"space-y-4",children:[(0,S.jsxs)("div",{children:[(0,S.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,S.jsx)("label",{className:"text-sm",children:y("properties.seoTitle")}),(0,S.jsxs)("button",{onClick:()=>{const e="string"===typeof d.businessName?d.businessName:d.businessName.en;_(d.seoTitle||e,"seoTitle")},disabled:"seoTitle"===v,className:"flex items-center gap-1 text-xs text-purple-600 hover:text-purple-700 disabled:opacity-50",children:["seoTitle"===v?(0,S.jsx)(I.A,{className:"w-3 h-3 animate-spin"}):(0,S.jsx)(P.A,{className:"w-3 h-3"}),y("properties.rephraseWithAI")]})]}),(0,S.jsx)("input",{type:"text",value:d.seoTitle||"",placeholder:"string"===typeof d.businessName?d.businessName:d.businessName.en,onChange:e=>g({seoTitle:e.target.value}),className:"w-full px-3 py-2 border rounded-lg text-sm"})]}),(0,S.jsxs)("div",{children:[(0,S.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,S.jsx)("label",{className:"text-sm",children:y("properties.seoDescription")}),(0,S.jsxs)("button",{onClick:()=>{const e="string"===typeof d.tagline?d.tagline:d.tagline.en;_(d.seoDescription||e,"seoDescription")},disabled:"seoDescription"===v,className:"flex items-center gap-1 text-xs text-purple-600 hover:text-purple-700 disabled:opacity-50",children:["seoDescription"===v?(0,S.jsx)(I.A,{className:"w-3 h-3 animate-spin"}):(0,S.jsx)(P.A,{className:"w-3 h-3"}),y("properties.rephraseWithAI")]})]}),(0,S.jsx)("textarea",{value:d.seoDescription||"",placeholder:"string"===typeof d.tagline?d.tagline:d.tagline.en,onChange:e=>g({seoDescription:e.target.value}),rows:3,className:"w-full px-3 py-2 border rounded-lg text-sm resize-none"})]})]})]}),(0,S.jsxs)("div",{className:"border-t pt-6",children:[(0,S.jsx)("h3",{className:"text-sm font-medium mb-4",children:y("properties.contactInfo")}),(0,S.jsxs)("div",{className:"space-y-4",children:[(0,S.jsxs)("div",{children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,S.jsx)("input",{type:"checkbox",id:"showPhone",checked:!1!==d.showPhone,onChange:e=>g({showPhone:e.target.checked})}),(0,S.jsx)("label",{htmlFor:"showPhone",className:"text-sm",children:y("properties.showPhone")})]}),(0,S.jsx)("input",{type:"tel",value:d.phone||"",placeholder:y("properties.phonePlaceholder"),onChange:e=>g({phone:e.target.value}),className:"w-full px-3 py-2 border rounded-lg text-sm"})]}),(0,S.jsxs)("div",{children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,S.jsx)("input",{type:"checkbox",id:"showAddress",checked:!1!==d.showAddress,onChange:e=>g({showAddress:e.target.checked})}),(0,S.jsx)("label",{htmlFor:"showAddress",className:"text-sm",children:y("properties.showAddress")})]}),(0,S.jsx)("input",{type:"text",value:d.address||"",placeholder:y("properties.addressPlaceholder"),onChange:e=>g({address:e.target.value}),className:"w-full px-3 py-2 border rounded-lg text-sm"})]})]})]}),(0,S.jsxs)("div",{className:"border-t pt-6",children:[(0,S.jsx)("h3",{className:"text-sm font-medium mb-4",children:y("properties.colors")}),(0,S.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"text-sm text-gray-600 mb-1 block",children:y("properties.headerBackgroun
1d")}),(0,S.jsxs)("div",{className:"flex gap-2",children:[(0,S.jsx)("input",{type:"color",value:d.headerBackgroundColor||"#ffffff",onChange:e=>g({headerBackgroundColor:e.target.value}),className:"w-10 h-10 rounded cursor-pointer"}),(0,S.jsx)("input",{type:"text",value:d.headerBackgroundColor||"#ffffff",onChange:e=>g({headerBackgroundColor:e.target.value}),className:"flex-1 px-3 py-2 border rounded-lg text-sm font-mono"})]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"text-sm text-gray-600 mb-1 block",children:y("properties.footerBackground")}),(0,S.jsxs)("div",{className:"flex gap-2",children:[(0,S.jsx)("input",{type:"color",value:d.footerBackgroundColor||"#111827",onChange:e=>g({footerBackgroundColor:e.target.value}),className:"w-10 h-10 rounded cursor-pointer"}),(0,S.jsx)("input",{type:"text",value:d.footerBackgroundColor||"#111827",onChange:e=>g({footerBackgroundColor:e.target.value}),className:"flex-1 px-3 py-2 border rounded-lg text-sm font-mono"})]})]})]})]}),(0,S.jsxs)("div",{className:"border-t pt-6",children:[(0,S.jsx)("h3",{className:"text-sm font-medium mb-4",children:y("properties.fontFamily")}),(0,S.jsxs)("select",{value:d.fontFamily||"Inter",onChange:e=>g({fontFamily:e.target.value}),className:"w-full px-3 py-2 border rounded-lg text-sm",style:{fontFamily:d.fontFamily||"Inter"},children:[(0,S.jsx)("option",{value:"Inter",style:{fontFamily:"Inter"},children:"Inter"}),(0,S.jsx)("option",{value:"Roboto",style:{fontFamily:"Roboto"},children:"Roboto"}),(0,S.jsx)("option",{value:"Open Sans",style:{fontFamily:"Open Sans"},children:"Open Sans"}),(0,S.jsx)("option",{value:"Lato",style:{fontFamily:"Lato"},children:"Lato"}),(0,S.jsx)("option",{value:"Montserrat",style:{fontFamily:"Montserrat"},children:"Montserrat"}),(0,S.jsx)("option",{value:"Poppins",style:{fontFamily:"Poppins"},children:"Poppins"}),(0,S.jsx)("option",{value:"Playfair Display",style:{fontFamily:"Playfair Display"},children:"Playfair Display"}),(0,S.jsx)("option",{value:"Merriweather",style:{fontFamily:"Merriweather"},children:"Merriweather"}),(0,S.jsx)("option",{value:"Source Sans Pro",style:{fontFamily:"Source Sans Pro"},children:"Source Sans Pro"}),(0,S.jsx)("option",{value:"Nunito",style:{fontFamily:"Nunito"},children:"Nunito"})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:y("properties.fontFamilyHelp")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:y("properties.fontSize")}),(0,S.jsxs)("select",{value:d.fontSizeScale||1,onChange:e=>g({fontSizeScale:parseFloat(e.target.value)}),className:"w-full px-3 py-2 border rounded-lg text-sm bg-white",children:[(0,S.jsxs)("option",{value:"0.85",children:["85% - ",y("properties.fontSizeSmaller")]}),(0,S.jsx)("option",{value:"0.9",children:"90%"}),(0,S.jsx)("option",{value:"0.95",children:"95%"}),(0,S.jsxs)("option",{value:"1",children:["100% - ",y("properties.fontSizeDefault")]}),(0,S.jsx)("option",{value:"1.05",children:"105%"}),(0,S.jsx)("option",{value:"1.1",children:"110%"}),(0,S.jsx)("option",{value:"1.15",children:"115%"}),(0,S.jsxs)("option",{value:"1.2",children:["120% - ",y("properties.fontSizeLarger")]})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:y("properties.fontSizeHelp")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:y("properties.headerFontSize")}),(0,S.jsxs)("select",{value:d.headerFontSizeScale||1,onChange:e=>g({headerFontSizeScale:parseFloat(e.target.value)}),className:"w-full px-3 py-2 border rounded-lg text-sm bg-white",children:[(0,S.jsxs)("option",{value:"0.8",children:["80% - ",y("properties.fontSizeSmaller")]}),(0,S.jsx)("option",{value:"0.85",children:"85%"}),(0,S.jsx)("option",{value:"0.9",children:"90%"}),(0,S.jsx)("option",{value:"0.95",children:"95%"}),(0,S.jsxs)("option",{value:"1",children:["100% - ",y("properties.fontSizeDefault")]}),(0,S.jsx)("option",{value:"1.05",children:"105%"}),(0,S.jsx)("option",{value:"1.1",children:"110%"}),(0,S.jsx)("option",{value:"1.15",children:"115%"}),(0,S.jsx)("option",{value:"1.2",children:"120%"}),(0,S.jsxs)("option",{value:"1.3",children:["130% - ",y("properties.fontSizeLarger")]})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:y("properties.headerFontSizeHelp")})]}),(0,S.jsx)("div",{className:"border-t pt-6",children:(0,S.jsxs)("div",{className:"flex items-start gap-3",children:[(0,S.jsxs)("div",{className:"relative",children:[(0,S.jsx)("input",{type:"checkbox",id:"hideNeoAgoraBranding",checked:!d.hideNeoAgoraBranding,disabled:!k||B,onChange:e=>g({hideNeoAgoraBranding:!e.target.checked}),className:"w-4 h-4 ".concat(k?"cursor-pointer":"opacity-50 cursor-not-allowed")}),!k&&!B&&(0,S.jsx)(gt.A,{className:"absolute -right-5 top-0 w-3 h-3 text-gray-400"})]}),(0,S.jsxs)("div",{className:"flex-1",children:[(0,S.jsx)("label",{htmlFor:"hideNeoAgoraBranding",className:"text-sm font-medium ".concat(k?"text-gray-700":"text-gray-400"),children:y("properties.hideNeoAgoraBranding")}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:y("properties.hideNeoAgoraBrandingHelp")}),!k&&!B&&(0,S.jsxs)("p",{className:"text-xs text-amber-600 mt-2 flex items-center gap-1",children:[(0,S.jsx)(gt.A,{className:"w-3 h-3"}),y("properties.hideNeoAgoraBrandingPaidOnly")]})]})]})}),(0,S.jsxs)("div",{className:"border-t pt-6",children:[(0,S.jsx)("h3",{className:"text-sm font-medium mb-4",children:y("properties.advancedSettings")}),(0,S.jsxs)("div",{className:"space-y-4",children:[(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm text-gray-600 mb-1",children:y("properties.customDomain")}),(0,S.jsx)("input",{type:"text",value:d.customDomain||"",placeholder:"fr"===b?"exemple.com":"example.com",disabled:!F||B,onChange:e=>g({customDomain:e.target.value}),className:"w-full px-3 py-2 border rounded-lg text-sm ".concat(F||B?"":"bg-gray-100 cursor-not-allowed opacity-60")}),F||B?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"fr"===b?"Entrez votre domaine sans www (ex: monsite.com)":"Enter your domain without www (e.g., mysite.com)"}),u&&(0,S.jsxs)("div",{className:"mt-3 p-4 bg-gradient-to-r from-blue-50 to-indigo-50 border border-blue-200 rounded-lg",children:[(0,S.jsx)("p",{className:"text-sm font-semibold text-blue-900 mb-3",children:"fr"===b?"Configuration DNS requise":"Required DNS Configuration"}),(0,S.jsx)("p",{className:"text-xs text-blue-700 mb-3",children:"fr"===b?"Ajoutez ces 2 enregistrements DNS chez votre registraire de domaine (GoDaddy, Namecheap, etc.):":"Add these 2 DNS records at your domain registrar (GoDaddy, Namecheap, etc.):"}),(0,S.jsxs)("div",{className:"mb-4 p-3 bg-white rounded border",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,S.jsx)("span",{className:"bg-blue-600 text-white text-xs font-bold px-2 py-1 rounded",children:"1"}),(0,S.jsx)("span",{className:"text-sm font-medium text-gray-800",children:"fr"===b?"Enregistrement TXT":"TXT Record"}),(0,S.jsxs)("span",{className:"text-xs text-gray-500",children:["(","fr"===b?"pour v\xe9rifier que vous \xeates propri\xe9taire":"to verify ownership",")"]})]}),(0,S.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)("span",{className:"font-medium text-gray-600 w-16",children:"fr"===b?"H\xf4te:":"Host:"}),(0,S.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"@"})]}),(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)("span",{className:"font-medium text-gray-600 w-16",children:"Type:"}),(0,S.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"TXT"})]}),(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)("span",{className:"font-medium text-gray-600 w-16",children:"fr"===b?"Valeur:":"Value:"}),(0,S.jsxs)("code",{className:"bg-yellow-100 px-2 py-1 rounded flex-1 break-all font-mono text-yellow-800",children:["neoagora-verify=",u]}),(0,S.jsxs)("button",{onClick:()=>{navigator.clipboard.writeText("neoagora-verify=".concat(u)),_t.oR.success("fr"===b?"Copi\xe9!":"Copied!")},className:"flex items-center gap-1 text-xs bg-blue-600 text-white px-2 py-1 rounded hover:bg-blue-700",children:[(0,S.jsx)(f.A,{className:"w-3 h-3"}),"fr"===b?"Copier":"Copy"]})]})]})]}),(0,S.jsxs)("div",{className:"mb-3 p-3 bg-white rounded border",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,S.jsx)("span",{className:"bg-blue-600 text-white text-xs font-bold px-2 py-1 rounded",children:"2"}),(0,S.jsx)("span",{className:"text-sm font-medium text-gray-800",children:"fr"===b?"Enregistrement A":"A Record"}),(0,S.jsxs)("span",{className:"text-xs text-gray-500",children:["(","fr"===b?"pour rediriger le trafic":"to route traffic",")"]})]}),(0,S.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)("span",{className:"font-medium text-gray-600 w-16",children:"fr"===b?"H\xf4te:":"Host:"}),(0,S.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"@"})]}),(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)("span",{className:"font-medium text-gray-600 w-16",children:"Type:"}),(0,S.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"A"})]}),(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)("span",{className:"font-medium text-gray-600 w-16",children:"fr"===b?"Valeur:":"Value:"}),(0,S.jsx)("code",{className:"bg-green-100 px-2 py-1 rounded font-mono text-green-800",children:"138.197.153.209"}),(0,S.jsxs)("button",{onClick:()=>{navigator.clipboard.writeText("138.197.153.209"),_t.oR.success("fr"===b?"Copi\xe9!":"Copied!")},className:"flex items-center gap-1 text-xs bg-blue-600 text-white px-2 py-1 rounded hover:bg-blue-700",children:[(0,S.jsx)(f.A,{className:"w-3 h-3"}),"fr"===b?"Copier":"Copy"]})]})]})]}),(0,S.jsxs)("div",{className:"text-xs text-gray-600 bg-gray-50 p-2 rounded",children:[(0,S.jsx)("p",{className:"font-medium mb-1",children:"Note:"}),(0,S.jsx)("p",{children:"fr"===b?"La propagation DNS peut prendre de quelques minutes \xe0 48 heures. Une fois configur\xe9, votre domaine sera automatiquement activ\xe9 avec SSL.":"DNS propagation may take a few minutes to 48 hours. Once configured, your domain will be automatically activated
1with SSL."})]})]})]}):(0,S.jsxs)("p",{className:"text-xs text-red-600 mt-1 flex items-center gap-1",children:[(0,S.jsx)(gt.A,{className:"w-3 h-3"}),"fr"===b?"Les domaines personnalis\xe9s ne sont pas disponibles avec le plan gratuit. Passez \xe0 un plan payant.":"Custom domains are not available on the Free plan. Upgrade to a paid plan."]})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm text-gray-600 mb-1",children:y("properties.embeddedAgentId")}),(0,S.jsx)("input",{type:"text",value:d.embeddedAgentId||"",placeholder:y("properties.agentIdPlaceholder"),onChange:e=>g({embeddedAgentId:e.target.value}),className:"w-full px-3 py-2 border rounded-lg text-sm font-mono"}),d.embeddedAgentId&&(0,S.jsx)("p",{className:"text-xs text-green-600 mt-1",children:y("properties.agentWillAppear")})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm text-gray-600 mb-1",children:y("properties.googleAnalyticsId")}),(0,S.jsx)("input",{type:"text",value:d.googleAnalyticsId||"",placeholder:"G-XXXXXXXXXX",onChange:e=>g({googleAnalyticsId:e.target.value}),className:"w-full px-3 py-2 border rounded-lg text-sm font-mono"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("label",{className:"block text-sm text-gray-600 mb-1",children:y("properties.googleTagManagerId")}),(0,S.jsx)("input",{type:"text",value:d.googleTagManagerId||"",placeholder:"GTM-XXXXXXX",onChange:e=>g({googleTagManagerId:e.target.value}),className:"w-full px-3 py-2 border rounded-lg text-sm font-mono"})]})]})]}),(0,S.jsxs)("div",{className:"border-t pt-6",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,S.jsx)(L.A,{className:"w-5 h-5 text-purple-600"}),(0,S.jsx)("h3",{className:"text-sm font-medium",children:"fr"===b?"M\xe9dias sociaux":"Social Media"})]}),(0,S.jsx)("p",{className:"text-xs text-gray-500 mb-4",children:"fr"===b?"Ajoutez vos liens de m\xe9dias sociaux. Les ic\xf4nes appara\xeetront dans le footer de votre site.":"Add your social media links. Icons will appear in the footer of your website."}),(0,S.jsxs)("div",{className:"space-y-4",children:[(0,S.jsxs)("div",{className:"space-y-3",children:[(0,S.jsx)("p",{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:"fr"===b?"R\xe9seaux sociaux":"Social Networks"}),[{key:"facebook",label:"Facebook",placeholder:"https://facebook.com/votre-page",icon:(0,S.jsx)("svg",{className:"w-4 h-4 text-[#1877F2]",viewBox:"0 0 24 24",fill:"currentColor",children:(0,S.jsx)("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})})},{key:"instagram",label:"Instagram",placeholder:"https://instagram.com/votre-compte",icon:(0,S.jsx)("svg",{className:"w-4 h-4 text-[#E4405F]",viewBox:"0 0 24 24",fill:"currentColor",children:(0,S.jsx)("path",{d:"M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678a6.162 6.162 0 100 12.324 6.162 6.162 0 100-12.324zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405a1.441 1.441 0 11-2.882 0 1.441 1.441 0 012.882 0z"})})},{key:"linkedin",label:"LinkedIn",placeholder:"https://linkedin.com/company/votre-entreprise",icon:(0,S.jsx)("svg",{className:"w-4 h-4 text-[#0A66C2]",viewBox:"0 0 24 24",fill:"
1currentColor",children:(0,S.jsx)("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.064 2.064 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})})},{key:"twitter",label:"X / Twitter",placeholder:"https://x.com/votre-compte",icon:(0,S.jsx)("svg",{className:"w-4 h-4 text-gray-900",viewBox:"0 0 24 24",fill:"currentColor",children:(0,S.jsx)("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})},{key:"youtube",label:"YouTube",placeholder:"https://youtube.com/@votre-chaine",icon:(0,S.jsx)("svg",{className:"w-4 h-4 text-[#FF0000]",viewBox:"0 0 24 24",fill:"currentColor",children:(0,S.jsx)("path",{d:"M23.498 6.186a3.016 3.016 0 00-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 00.502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 002.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 002.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"})})},{key:"tiktok",label:"TikTok",placeholder:"https://tiktok.com/@votre-compte",icon:(0,S.jsx)("svg",{className:"w-4 h-4 text-gray-900",viewBox:"0 0 24 24",fill:"currentColor",children:(0,S.jsx)("path",{d:"M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"})})}].map(e=>{var t;let{key:o,label:s,placeholder:a,icon:r}=e;return(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)("div",{className:"flex-shrink-0 w-8 flex justify-center",children:r}),(0,S.jsx)("input",{type:"url",value:(null===(t=d.socialMedia)||void 0===t?void 0:t[o])||"",placeholder:a,onChange:e=>g({socialMedia:(0,n.A)((0,n.A)({},d.socialMedia),{},{[o]:e.target.value})}),className:"flex-1 px-3 py-1.5 border rounded-lg text-sm"})]},o)})]}),(0,S.jsxs)("div",{className:"space-y-3",children:[(0,S.jsx)("p",{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:"fr"===b?"Autres r\xe9seaux":"Other Networks"}),[{key:"pinterest",label:"Pinterest",placeholder:"https://pinterest.com/votre-compte",icon:(0,S.jsx)("svg",{className:"w-4 h-4 text-[#E60023]",viewBox:"0 0 24 24",fill:"currentColor",children:(0,S.jsx)("path",{d:"M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738a.36.36 0 01.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146C9.57 23.812 10.763 24 12.017 24c6.624 0 11.99-5.367 11.99-11.988C24.007 5.367 18.641 0 12.017 0z"})})}].map(e=>{var t;let{key:o,label:s,placeholder:a,icon:r}=e;return(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)("div",{className:"flex-shrink-0 w-8 flex justify-center",children:r}),(0,S.jsx)("input",{type:"url",value:(null===(t=d.socialMedia)||void 0===t?void 0:t[o])||"",placeholder:a,onChange:e=>g({socialMedia:(0,n.A)((0,n.A)({},d.socialMedia),{},{[o]:e.target.value})}),className:"flex-1 px-3 py-1.5 border rounded-lg text-sm"})]},o)})]}),(0,S.jsxs)("div",{className:"space-y-3",children:[(0,S.jsx)("p",{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:"fr"===b?"Messagerie":"Messaging"}),[{key:"whatsapp",label:"WhatsApp",placeholder:"https://wa.me/15551234567",icon:(0,S.jsx)("svg",{className:"w-4 h-4 text-[#25D366]",viewBox:"0 0 24 24",fill:"
1currentColor",children:(0,S.jsx)("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})})},{key:"telegram",label:"Telegram",placeholder:"https://t.me/votre-compte",icon:(0,S.jsx)("svg",{className:"w-4 h-4 text-[#26A5E4]",viewBox:"0 0 24 24",fill:"currentColor",children:(0,S.jsx)("path",{d:"M11.944 0A12 12 0 000 12a12 12 0 0012 12 12 12 0 0012-12A12 12 0 0012 0 12 12 0 0011.944 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 01.171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.479.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})})}].map(e=>{var t;let{key:o,label:s,placeholder:a,icon:r}=e;return(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)("div",{className:"flex-shrink-0 w-8 flex justify-center",children:r}),(0,S.jsx)("input",{type:"url",value:(null===(t=d.socialMedia)||void 0===t?void 0:t[o])||"",placeholder:a,onChange:e=>g({socialMedia:(0,n.A)((0,n.A)({},d.socialMedia),{},{[o]:e.target.value})}),className:"flex-1 px-3 py-1.5 border rounded-lg text-sm"})]},o)})]}),(0,S.jsxs)("div",{className:"space-y-3",children:[(0,S.jsx)("p",{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:"fr"===b?"M\xe9dia / Contenu":"Media / Content"}),[{key:"spotify",label:"Spotify",placeholder:"https://open.spotify.com/artist/votre-id",icon:(0,S.jsx)("svg",{className:"w-4 h-4 text-[#1DB954]",viewBox:"0 0 24 24",fill:"currentColor",children:(0,S.jsx)("path",{d:"M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z"})})},{key:"behance",label:"Behance",placeholder:"https://behance.net/votre-compte",icon:(0,S.jsx)("svg",{className:"w-4 h-4 text-[#1769FF]",viewBox:"0 0 24 24",fill:"currentColor",children:(0,S.jsx)("path",{d:"M6.938 4.503c.702 0 1.34.06 1.92.188.577.13 1.07.33 1.485.609.41.28.733.65.96 1.12.225.47.34 1.05.34 1.73 0 .74-.17 1.36-.507 1.86-.338.5-.837.9-1.502 1.22.906.26 1.576.72 2.022 1.37.448.66.665 1.45.665 2.36 0 .75-.13 1.39-.41 1.93-.28.55-.67 1-1.16 1.35-.48.348-1.05.6-1.67.767-.63.165-1.27.25-1.95.25H0V4.51h6.938v-.007zM6.545 10.16c.625 0 1.135-.145 1.53-.44.395-.294.59-.75.59-1.365 0-.335-.06-.612-.18-.832a1.391 1.391 0 00-.488-.504 2.13 2.13 0 00-.725-.27 4.384 4.384 0 00-.89-.08H3.32v3.5h3.225v-.009zm.195 5.47c.34 0 .66-.03.96-.093.3-.06.56-.17.785-.328.224-.16.398-.38.52-.67.127-.285.19-.65.19-1.09 0-.85-.23-1.46-.69-1.83-.455-.37-1.058-.556-1.81-.556H3.32v4.57h3.42v-.003zM16.132 16.36c.473.53 1.155.79 2.044.79.636 0 1.185-.165 1.65-.49.465-.33.745-.67.84-1.02h2.793c-.45 1.39-1.12 2.39-2.01 3.01-.89.62-1.96.93-3.22.93-1.04 0-1.94-.16-2.73-.487a5.644 5.644 0 01-1.98-1.385 5.88 5.88 0 01-1.19-2.14c-.273-.82-.41-1.72-.41-2.7 0-.94.14-1.82.43-2.64.288-.82.7-1.53 1.23-2.14a5.52 5.52 0 011.98-1.42c.78-.34 1.65-.51 2.63-.51 1.07 0 2 .2 2.78.61.78.41 1.42.96 1.92 1.66.51.7.87 1.51 1.08 2.43.22.92.28 1.9.18 2.95h-8.35c.06 1.01.37 1.78.84 2.31v.003zm3.58-6.82c-.37-.45-1-.68-1.88-.68-.55 0-1.01.09-1.38.28-.37.19-.66.43-.87.73-.21.3-.36.61-.44.96-.08.35-.14.66-.16.97h5.52c-.13-.96-.42-1.82-.79-2.26v-.001zM15.1 4.4H21v1.55h-5.9V4.4z"})})}].map(e=>{var t;let{key:o,label:s,placeholder:a,icon:r}=e;return(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)("div",{className:"flex-shrink-0 w-8 flex justify-center",children:r}),(0,S.jsx)("input",{type:"url",value:(null===(t=d.socialMedia)||void 0===t?void 0:t[o])||"",placeholder:a,onChange:e=>g({socialMedia:(0,n.A)((0,n.A)({},d.socialMedia),{},{[o]:e.target.value})}),className:"flex-1 px-3 py-1.5 border rounded-lg text-sm"})]},o)})]}),(0,S.jsxs)("div",{className:"space-y-3",children:[(0,S.jsx)("p",{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:"Business"}),[{key:"googleBusiness",label:"Google Business",placeholder:"https://g.page/votre-entreprise",icon:(0,S.jsx)("svg",{className:"w-4 h-4 text-[#4285F4]",viewBox:"0 0 24 24",fill:"
1currentColor",children:(0,S.jsx)("path",{d:"M12 11.4054V15.3054H18.3816C18.0552 16.9582 16.5288 20.1054 12 20.1054C8.08919 20.1054 4.8912 16.8438 4.8912 12.855C4.8912 8.86619 8.08919 5.6046 12 5.6046C14.2152 5.6046 15.7104 6.5334 16.5672 7.3566L19.5768 4.4526C17.5992 2.6046 14.9568 1.5054 12 1.5054C5.82239 1.5054 .792 6.5358.792 12.855C.792 19.1742 5.82239 24.2046 12 24.2046C18.48 24.2046 23.1648 19.2534 23.1648 13.0134C23.1648 12.3798 23.0928 11.8926 23.0064 11.4054H12Z"})})}].map(e=>{var t;let{key:o,label:s,placeholder:a,icon:r}=e;return(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[(0,S.jsx)("div",{className:"flex-shrink-0 w-8 flex justify-center",children:r}),(0,S.jsx)("input",{type:"url",value:(null===(t=d.socialMedia)||void 0===t?void 0:t[o])||"",placeholder:a,onChange:e=>g({socialMedia:(0,n.A)((0,n.A)({},d.socialMedia),{},{[o]:e.target.value})}),className:"flex-1 px-3 py-1.5 border rounded-lg text-sm"})]},o)})]})]})]}),D?(0,S.jsxs)("div",{className:"border-t pt-6",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,S.jsx)(H.A,{className:"w-5 h-5 text-green-600"}),(0,S.jsx)("h3",{className:"text-sm font-medium",children:y("properties.googleCalendar")})]}),d.googleCalendarConnected?(0,S.jsx)("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4",children:(0,S.jsxs)("div",{className:"flex items-start gap-3",children:[(0,S.jsx)(R.A,{className:"w-5 h-5 text-green-600 flex-shrink-0 mt-0.5"}),(0,S.jsxs)("div",{className:"flex-1",children:[(0,S.jsx)("p",{className:"text-sm text-green-900 mb-1",children:"Calendar Connected"}),(0,S.jsxs)("p",{className:"text-xs text-green-700 mb-3",children:["Bookings will be automatically added to: ",(0,S.jsx)("span",{className:"font-mono",children:d.googleCalendarEmail||"your calendar"})]}),(0,S.jsx)("button",{onClick:async()=>{if(confirm("Disconnect Google Calendar? New bookings will not be added to your calendar."))try{const e=localStorage.getItem("token");await fetch("/api/client/google/calendar/disconnect",{method:"POST",headers:{Authorization:"Bearer ".concat(e)}}),g({googleCalendarConnected:!1,googleCalendarEmail:void 0})}catch(e){console.error("Failed to disconnect Google Calendar:",e),alert("Failed to disconnect. Please try again.")}},className:"text-xs text-green-700 hover:text-green-900 underline",children:"Disconnect"})]})]})}):(0,S.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4",children:(0,S.jsxs)("div",{className:"flex items-start gap-3",children:[(0,S.jsx)(O.A,{className:"w-5 h-5 text-gray-400 flex-shrink-0 mt-0.5"}),(0,S.jsxs)("div",{className:"flex-1",children:[(0,S.jsx)("p",{className:"text-sm text-gray-900 mb-1",children:"Not Connected"}),(0,S.jsx)("p",{className:"text-xs text-gray-600 mb-3",children:"Connect your Google Calendar to automatically add bookings from your website"}),(0,S.jsxs)("button",{onClick:async()=>{try{const e=localStorage.getItem("token"),t=await fetch("/api/client/google/calendar/connect",{headers:{Authorization:"Bearer ".concat(e)}}),o=await t.json();o.authorization_url?window.location.href=o.authorization_url:alert("Failed to get authorization URL. Please try again.")}catch(e){console.error("Failed to connect Google Calendar:",e),alert("Failed to connect. Please try again.")}},className:"flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors text-sm",children:[(0,S.jsx)(H.A,{className:"w-4 h-4"}),"Connect Google Calendar"]})]})]})})]}):(0,S.jsxs)("div",{className:"border-t pt-6",children:[(0,S.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,S.jsx)(H.A,{className:"w-5 h-5 text-gray-400"}),(0,S.jsx)("h3",{className:"text-sm font-medium text-gray-600",children:y("properties.googleCalendarIntegration")})]}),(0,S.jsx)("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-4",children:(0,S.jsxs)("div",{className:"flex items-start gap-3",children:[(0,S.jsx)(H.A,{className:"w-5 h-5 text-amber-600 flex-shrink-0 mt-0.5"}),(0,S.jsxs)("div",{className:"flex-1",children:[(0,S.jsx)("p",{className:"text-sm text-amber-900 mb
1-1",children:y("properties.calendarSectionRequired")}),(0,S.jsx)("p",{className:"text-xs text-amber-700",children:y("properties.calendarSectionHelpText")})]})]})})]})]}),(0,S.jsx)("div",{className:"flex justify-end px-6 py-4 border-t bg-gray-50",children:(0,S.jsx)("button",{onClick:l,className:"px-6 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:y("common.done")||"Done"})})]})]}):null}function yn(e){return"string"===typeof e}async function vn(e,t,o){if(yn(e.content)){const s=await(0,Gt.Us)(e.content,t,o);return(0,n.A)((0,n.A)({},e),{},{content:s})}return e}async function jn(e,t,o){if(yn(e.text)){const s=await(0,Gt.Us)(e.text,t,o);return(0,n.A)((0,n.A)({},e),{},{text:s})}return e}async function Nn(e,t,o){return await Promise.all(e.map(e=>async function(e,t,o){const s=(0,n.A)({},e);"headline"in s&&s.headline&&yn(s.headline.content)&&(s.headline=await vn(s.headline,t,o)),"subheadline"in s&&s.subheadline&&yn(s.subheadline.content)&&(s.subheadline=await vn(s.subheadline,t,o)),"sectionTitle"in s&&s.sectionTitle&&yn(s.sectionTitle.content)&&(s.sectionTitle=await vn(s.sectionTitle,t,o)),"buttons"in s&&s.buttons&&Array.isArray(s.buttons)&&(s.buttons=await Promise.all(s.buttons.map(e=>jn(e,t,o))));const a=["features","services","programs","testimonials","packages","benefits","team"];for(const r of a)s[r]&&Array.isArray(s[r])&&(s[r]=await Promise.all(s[r].map(async e=>{const s=(0,n.A)({},e);return s.title&&yn(s.title.content)&&(s.title=await vn(s.title,t,o)),s.description&&yn(s.description.content)&&(s.description=await vn(s.description,t,o)),s.name&&yn(s.name.content)&&(s.name=await vn(s.name,t,o)),s.role&&yn(s.role.content)&&(s.role=await vn(s.role,t,o)),s.duration&&yn(s.duration.content)&&(s.duration=await vn(s.duration,t,o)),s.price&&yn(s.price.content)&&(s.price=await vn(s.price,t,o)),s.button&&yn(s.button.text)&&(s.button=await jn(s.button,t,o)),s})));return s}(e,t,o)))}function wn(e){for(const t of e){const e=t;if("headline"in e&&e.headline&&yn(e.headline.content))return!0;if("subheadline"in e&&e.subheadline&&yn(e.subheadline.content))return!0;if("buttons"in e&&e.buttons&&e.buttons.some(e=>yn(e.text)))return!0;const o=["features","services","programs"];for(const t of o)if(e[t]&&Array.isArray(e[t])){if(e[t].some(e=>e.title&&yn(e.title.content)||e.description&&yn(e.description.content)))return!0}}return!1}function Cn(){var e,t,o,s;let{websiteId:r,initialData:i,onSave:l,onSaveCheckpoint:d,onLoadCheckpoints:g,onRestoreCheckpoint:h,onBackToDashboard:f,isSaving:x=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{t:y,language:v}=(0,c.o)(),[j,N]=(0,a.useState)([]),[w,C]=(0,a.useState)("home"),[k,I]=(0,a.useState)(()=>{if("fr"===(null===i||void 0===i?void 0:i.language))return"fr";return"fr"===localStorage.getItem("siteLanguage")?"fr":"en"}),T=(0,a.useRef)(null);(0,a.useEffect)(()=>{const e=(null===i||void 0===i?void 0:i.id)||(null===i||void 0===i?void 0:i.website_id);i&&e&&T.current!==e&&(T.current=e,"fr"===i.language&&I("fr"))},[i]);const z=!(null===i||void 0===i||!i.bilingual_enabled),[F,M]=(0,a.useState)("wellness-modern"),P=j.find(e=>e.id===w),B=(null===P||void 0===P?void 0:P.sections)||[];console.log("[WebsiteBuilder] RENDER - pages:",j.length,"currentPageId:",w,"currentPage:",P?"found":"NOT FOUND","sections:",B.length);const E=e=>{N(t=>t.map(t=>{if(t.id===w){const o="function"===typeof e?e(t.sections):e;return(0,n.A)((0,n.A)({},t),{},{sections:o})}return t}))},[D,L]=(0,a.useState)(null),[H,R]=(0,a.useState)(null),[O,_]=(0,a.useState)(null),[U,q]=(0,a.useState)(!1),[V,W]=(0,a.useState)(null),[G,J]=(0,a.useState)(!1),[X,Y]=(0,a.useState)(null),[Z,$]=(0,a.useState)(!1),[Q,K]=(0,a.useState)(!1),[ee,te]=(0,a.useState)(!1),[se,le]=(0,a.useState)(!1),[ue,me]=(0,a.useState)(!1),[pe,he]=(0,a.useState)([]),[fe,xe]=(0,a.useState)(!1),[be,ye]=(0,a.useState)(null),[ve,je]=(0,a.useState)(()=>{try{const e=localStorage.getItem("websiteSettings");if(e)return JSON.parse(e)}catch(e){}return{businessName:{en:"My Business",fr:"Mon Entreprise"},tagline:{en:"Your success is our mission",fr:"Votre succ\xe8s est notre mission"}}}),Ne=((0,a.useRef)(!0),(0,a.useRef)(!1)),we=(0,a.useRef)(""),[Ce,Se]=(0,a.useState)(!1);(0,a.useEffect)(()=>{var e,t,o,s;if(!i||!i.content){console.log("[WebsiteBuilder] No initialData provided, loading default template");const e=m("wellness-modern");return e&&e.sections&&N([{id:"home",name:"Home",slug:"home",sections:e.sections,order:0,createdBy:"user"}]),void setTimeout(()=>{Se(!0),console.log("[WebsiteBuilder] Default template loaded, enabling change detection")},150)}const a=localStorage.getItem("currentWebsiteId");r&&a!==r&&(console.log("[WebsiteBuilder] Different website detected, clearing localStorage to load fresh data"),localStorage.removeItem("websitePages"),localStorage.removeItem("websiteSettings"),localStorage.removeItem("currentWebsiteId"),localStorage.removeItem("bilingualContentMigrated")),r&&localStorage.setItem("currentWebsiteId",r),console.log("[WebsiteBuilder] Loading website data from database:",i);i.content.pages&&i.content.pages.length>0?(console.log("[WebsiteBuilder] Loading",i.content.pages.length,"pages from database"),N((e=>e.map(e=>(0,n.A)((0,n.A)({},e),{},{sections:(e.sections||[]).map(e=>ge(e))})))(i.content.pages)),C(i.content.pages[0].id)):i.content.sections&&(console.log("[WebsiteBuilder] Loading sections from old format"),N([{id:"home",name:"Home",slug:"home",sections:i.content.sections.map(e=>ge(e)),order:0,createdBy:"user"}]));const l=(null===(e=i.content)||void 0===e?void 0:e.settings)||{};console.log("[WebsiteBuilder] Loading settings from DB. contentSettings.logo:",l.logo);let c=i.business_name;c?"string"===typeof c&&(c={en:c,fr:c}):c={en:"My Business",fr:"Mon Entreprise"};let d=null===(t=i.content)||void 0===t?void 0:t.tagline;d?"string"===typeof d&&(d={en:d,fr:d}):d={en:"Your success is our mission",fr:"Votre succ\xe8s est notre mission"},je((0,n.A)((0,n.A)({},l),{},{businessName:c,tagline:d,seoTitle:i.seo_title,seoDescription:i.seo_description,verificationMetaText:(Array.isArray(i.verification_meta)?i.verification_meta:[]).map(e=>{const t=void 0!==e.name?"name":"property",o=void 0!==e.content?"content":"value";return"<meta "+t+'="'+e[t]+'" '+o+'="'+e[o]+'">'}).join("\n"),logo:l.logo,logoHeight:l.logoHeight||i.content.logoHeight||40,embeddedAgentId:i.embedded_agent_id,customDomain:i.custom_domain,businessEmail
1:i.business_email||"",phone:i.phone||l.phone||"",address:i.address||l.address||"",showPhone:null===(o=l.showPhone)||void 0===o||o,showAddress:null===(s=l.showAddress)||void 0===s||s,primaryColor:l.primaryColor||"",secondaryColor:l.secondaryColor||"",accentColor:l.accentColor||"",fontFamily:l.fontFamily||"",fontSizeScale:l.fontSizeScale||1,hideNeoAgoraBranding:l.hideNeoAgoraBranding||!1,footerCustomLine1:l.footerCustomLine1||"",footerCustomLine2:l.footerCustomLine2||"",showFooterCustomMessage:l.showFooterCustomMessage||!1,socialMedia:l.socialMedia||void 0}));(async()=>{try{const e=localStorage.getItem("token");if(!e)return;const t=await fetch("/api/client/google/calendar/status",{headers:{Authorization:"Bearer ".concat(e)}});if(t.ok){const e=await t.json();console.log("[WebsiteBuilder] Google Calendar status:",e),e.connected&&je(t=>(0,n.A)((0,n.A)({},t),{},{googleCalendarConnected:!0,googleCalendarEmail:e.calendar_id||"your calendar"}))}}catch(e){console.error("[WebsiteBuilder] Failed to fetch Google Calendar status:",e)}})(),i.content.template_id&&M(i.content.template_id),setTimeout(()=>{Se(!0),console.log("[WebsiteBuilder] Initial data loading complete, change detection now enabled")},100)},[i]),(0,a.useEffect)(()=>{if(!localStorage.getItem("backgroundColorsMigrated")){let e=!1;const t=j.map(t=>(0,n.A)((0,n.A)({},t),{},{sections:t.sections.map(t=>"features"!==t.type||"#ffffff"!==t.backgroundColor&&"#fff"!==t.backgroundColor?"testimonials"!==t.type||"#ffffff"!==t.backgroundColor&&"#fff"!==t.backgroundColor&&"#f8fafc"!==t.backgroundColor?t:(e=!0,(0,n.A)((0,n.A)({},t),{},{backgroundColor:"#faf5ff"})):(e=!0,(0,n.A)((0,n.A)({},t),{},{backgroundColor:"#f0fdf4"})))}));e&&(N(t),console.log("\u2705 Migrated section background colors")),localStorage.setItem("backgroundColorsMigrated","true")}},[]),(0,a.useEffect)(()=>{(async()=>{if("true"===localStorage.getItem("bilingualContentMigrated"))return;if(j.some(e=>e.sections&&wn(e.sections))){console.log("\ud83c\udf10 Starting bilingual content migration...");try{const e=await Promise.all(j.map(async e=>{if(!e.sections||!wn(e.sections))return e;const t=await Nn(e.sections,v,localStorage.getItem("token")||void 0);return(0,n.A)((0,n.A)({},e),{},{sections:t})}));N(e),localStorage.setItem("bilingualContentMigrated","true"),console.log("\u2705 Bilingual content migration completed"),_t.oR.success("Content converted to bilingual format")}catch(e){console.error("\u274c Migration failed:",e),_t.oR.error("Failed to convert content to bilingual format")}}else localStorage.setItem("bilingualContentMigrated","true")})()},[]),(0,a.useEffect)(()=>{try{localStorage.setItem("websitePages",JSON.stringify(j))}catch(e){}},[j]),(0,a.useEffect)(()=>{try{localStorage.setItem("websiteSettings",JSON.stringify(ve))}catch(e){}},[ve]),(0,a.useEffect)(()=>{const e="string"===typeof ve.businessName?ve.businessName:ve.businessName.en,t=ve.tagline?"string"===typeof ve.tagline?ve.tagline:ve.tagline.en:"",o=ve.seoTitle||e;document.title=o;let n=document.querySelector('meta[name="description"]');n||(n=document.createElement("meta"),n.setAttribute("name","description"),document.head.appendChild(n)),n.setAttribute("content",ve.seoDescription||t)},[ve.seoTitle,ve.seoDescription,ve.businessName,ve.tagline]);const[Ae,ke]=(0,a.useState)(!1);(0,a.useEffect)(()=>{if(Ce&&j.length>0&&!Ae){const e=JSON.stringify({pages:j,websiteSettings:ve,currentTemplateId:F});console.log("[ChangeDetection] Setting initial baseline after load"),we.current=e,ke(!0)}},[Ce,j,ve,F,Ae]),(0,a.useEffect)(()=>{if(0===j.length)return void console.log("[ChangeDetection] No pages yet, skipping");if(!Ce)return void console.log("[ChangeDetection] Still loading initial data, skipping");if(!Ae||""===we.current)return void console.log("[ChangeDetection] Baseline not set yet, skipping");const e=JSON.stringify({pages:j,websiteSettings:ve,currentTemplateId:F}),t=we.current!==e;console.log("[ChangeDetection] Content comparison:",{hasChanged:t,currentHash:e.substring(0,50)+"...",savedHash:we.current.substring(0,50)+"..."}),t&&!se?(console.log("[ChangeDetection] Content changed! Setting hasUnsavedChanges=true"),le(!0)):!t&&se&&(console.log("[ChangeDetection] Content matches baseline! Setting hasUnsavedChanges=false"),le(!1))},[Ce,j,ve,F,Ae,se]),(0,a.useEffect)(()=>{(async()=>
1{if(console.log("[VersionHistory] Loading versions for websiteId:",r),r){try{localStorage.removeItem("websiteVersions_".concat(r))}catch(e){}if(g)try{console.log("[VersionHistory] Loading checkpoints from MongoDB...");const e=await g();if(e&&e.length>0){const t=["hero","features","about","howItWorks","services","testimonials","faq","cta","contact","footer"],o=e.map(e=>{var o;const n=e.content_snapshot||{};let s=n.sections||[],a=n.pages||[];if(0===s.length&&0===a.length){const e=t.filter(e=>n[e]&&"object"===typeof n[e]);e.length>0&&(s=e.map(e=>({id:e,type:e,data:n[e]})))}return{id:e.id||"checkpoint_".concat(e.created_at),timestamp:new Date(e.created_at).getTime(),sections:s,pages:a,currentPageId:(null===a||void 0===a||null===(o=a[0])||void 0===o?void 0:o.id)||"home",settings:{businessName:n.business_name||"",tagline:n.tagline||""},currentTemplateId:n.template_id||"",description:e.description||"Auto-save",_rawSnapshot:n}});console.log("[VersionHistory] Loaded from MongoDB:",o.length,"versions"),he(o.sort((e,t)=>t.timestamp-e.timestamp).slice(0,50))}}catch(t){console.warn("[VersionHistory] Failed to load from MongoDB:",t)}}else console.log("[VersionHistory] No websiteId provided")})()},[r,g]),(0,a.useEffect)(()=>{const e=e=>{se&&(e.preventDefault(),e.returnValue="")};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[se]);const Ie=async()=>{if(console.log("\ud83d\udd35 [handleManualSave] Starting save - hasUnsavedChanges:",se,"websiteId:",r),!se)return console.log("[handleManualSave] No unsaved changes, skipping"),!0;console.log("[handleManualSave] Starting save...",{pagesCount:j.length,hasOnSave:!!l,websiteId:r}),te(!0);try{try{localStorage.setItem("websitePages",JSON.stringify(j))}catch(o){try{const e=[];for(let t=0;t<localStorage.length;t++){const o=localStorage.key(t);o&&(o.startsWith("websiteVersions_")||o.startsWith("websitePages")||o.startsWith("websiteSettings")||o.startsWith("bilingualContentMigrated")||o.startsWith("backgroundColorsMigrated"))&&e.push(o)}e.forEach(e=>localStorage.removeItem(e))}catch(n){}}const e=j.flatMap(e=>e.sections||[]),t=[{id:"version_".concat(Date.now()),timestamp:Date.now(),sections:e,pages:j,currentPageId:w,settings:ve,currentTemplateId:F},...pe].slice(0,Math.min(50,10));if(he(t),r)try{localStorage.removeItem("websiteVersions_".concat(r))}catch(n){}if(l&&r){console.log("[handleManualSave] Calling onSave with:",{sectionsCount:B.length,websiteSettings:ve,currentTemplateId:F});try{if(await l(B,ve,F),console.log("[handleManualSave] \u2705 onSave completed successfully"),d)try{await d(B,ve,F,"Manual save"),console.log("[handleManualSave] \u2705 Checkpoint saved to MongoDB")}catch(s){console.warn("[handleManualSave] Could not save checkpoint (non-critical):",s)}}catch(a){throw console.error("[handleManualSave] \u274c onSave FAILED:",a),a}}else console.log("[handleManualSave] \u26a0\ufe0f Skipping onSave - onSave:",!!l,"websiteId:",r);return we.current=JSON.stringify({pages:j,websiteSettings:ve,currentTemplateId:F}),le(!1),Y(null),_t.oR.success(y("toast.saved")),console.log("[handleManualSave] \u2705 Save completed successfully, hasUnsavedChanges set to false"),!0}catch(i){var e,t;console.error("[handleManualSave] \u274c Failed to save:",i);const o=null===i||void 0===i||null===(e=i.response)||void 0===e||null===(t=e.data)||void 0===t?void 0:t.detail;return o&&"verification_meta_invalide"===o.code&&"string"===typeof o.message?(Y(o.message),Me("businessName")):_t.oR.error(y("toast.failedToSave")),!1}finally{te(!1),console.log("[handleManualSave] Finally block - isSaving set to false")}},Te=e=>{const t=ie(e,(B.length>0?Math.max(...B.map(e=>e.order)):-1)+1);console.log("[WebsiteBuilder] Adding new section:",{type:e,section:t}),E([...B,t])},ze=e=>{E(B.filter(t=>t.id!==e)),O===e&&(_(null),L(null),R(null))},Fe=(e,t)=>{E(B.map(o=>o.id===e?(0,n.A)((0,n.A)({},o),t):o))},Me=e=>{L(null),R(null),_(null),W(e)},Pe=e=>{"verificationMetaText"in e&&Y(null),je((0,n.A)((0,n.A)({},ve),e))},Be=e=>e?e.replace(/\s*ql-align-(center|right|justify|left)\s*/g," ").replace(/\s*class="\s*"/g,""):e,De=(e,t)=>{if("textAlign"in t&&t.textAlign)for(const s of B){const o=ce(s,e);if(o&&"content"in o.element){const e=o.element.content;"string"===typeof e?t.content=Be(e):e&&"object"===typeof e&&("en"in e||"fr"in e)&&(t.content=(0,n.A)((0,n.A)({},e),{},{en:Be(e.en||""),fr:Be(e.fr||"")}));break}}const o=B.map(o=>ce(o,e)?function(e,t,o){var n,s,a,r;const i=JSON.parse(JSON.stringify(e)),l=e=>{(null===e||void 0===e?void 0:e.id)===t&&Object.assign(e,o)},c=e=>{(null===e||void 0===e?void 0:e.id)===t&&Object.assign(e,o)},d=e=>{(null===e||void 0===e?void 0:e.id)===t&&Object.assign(e,o)};switch(i.type){case"hero":const e=i;l(e.headline),l(e.subheadline),null===(n=e.buttons)||void 0===n||n.forEac
1h(c),e.backgroundImage&&d(e.backgroundImage);break;case"features":const t=i;l(t.sectionTitle),null===(s=t.features)||void 0===s||s.forEach(e=>{d(e.icon),l(e.title),l(e.description)});break;case"services":const o=i;l(o.sectionTitle),o.services.forEach(e=>{d(e.image),l(e.title),l(e.description),e.button&&c(e.button)});break;case"testimonials":const u=i;l(u.sectionTitle),u.testimonials.forEach(e=>{l(e.quote),l(e.author),l(e.role),e.avatar&&d(e.avatar)});break;case"pricing":const m=i;l(m.sectionTitle),l(m.description),m.tiers.forEach(e=>{var t;l(e.name),l(e.price),c(e.button),null===(t=e.features)||void 0===t||t.forEach(l)});break;case"contact":const p=i;l(p.headline),l(p.sectionTitle),l(p.description),null===(a=p.buttons)||void 0===a||a.forEach(c);break;case"benefits":const g=i;l(g.headline),l(g.badge),l(g.description),d(g.image),g.button&&c(g.button),null===(r=g.features)||void 0===r||r.forEach(e=>{l(null===e||void 0===e?void 0:e.title),l(null===e||void 0===e?void 0:e.description)});break;case"wellness-programs":const h=i;l(h.sectionTitle),h.programs.forEach(e=>{d(e.image),l(e.title),l(e.description),l(e.duration),e.button&&c(e.button)});break;case"business-team":const f=i;l(f.sectionTitle),l(f.description),f.members.forEach(e=>{d(e.image),l(e.name),l(e.role),l(e.bio)});break;case"coaching-packages":const x=i;l(x.sectionTitle),l(x.description),x.packages.forEach(e=>{l(e.name),l(e.description),l(e.sessions),l(e.price),c(e.button),e.features.forEach(l)});break;case"member-benefits":const b=i;l(b.sectionTitle),l(b.description),b.benefits.forEach(e=>{d(e.icon),l(e.title),l(e.description)});break;case"reservation-calendar":const y=i;l(y.sectionTitle),l(y.description);break;case"reviews":const v=i;l(v.title),l(v.description);break;case"newsletter":const j=i;l(j.title),j.description&&l(j.description),c(j.submitButton);break;case"video":const N=i;N.sectionTitle&&l(N.sectionTitle),N.description&&l(N.description);break;case"portfolio":const w=i;l(w.sectionTitle),w.description&&l(w.description),w.portfolioItems.forEach(e=>{d(e.image),l(e.title),l(e.description),e.category&&l(e.category),e.link&&c(e.link)});break;case"blog":const C=i;l(C.sectionTitle),C.description&&l(C.description),C.viewAllButton&&c(C.viewAllButton);break;case"shop":const S=i;l(S.sectionTitle),S.description&&l(S.description),S.viewAllButton&&c(S.viewAllButton);break;case"slider":const A=i;A.sectionTitle&&l(A.sectionTitle),A.description&&l(A.description),A.slides.forEach(e=>{d(e.image),e.title&&l(e.title),e.description&&l(e.description),e.link&&c(e.link)});break;case"iframe":const k=i;k.sectionTitle&&l(k.sectionTitle),k.description&&l(k.description);break;case"custom-html":const I=i;I.sectionTitle&&l(I.sectionTitle);break;case"formations-catalogue":const T=i;l(T.sectionTitle),T.description&&l(T.description),T.viewAllButton&&c(T.viewAllButton);break;case"sponsors":const z=i;l(z.sectionTitle),z.description&&l(z.description),z.sponsors.forEac
1h(e=>{d(e.image),l(e.name)});break;case"commandites":const F=i;l(F.sectionTitle),F.description&&l(F.description);break;case"agent-cadeaux":{const e=i;[e.surtitre,e.sectionTitle,e.intro,e.accueil,e.champ,e.pourCommencer,e.confiance,e.titreCompact,e.introCompact,e.champCompact].forEach(l),(e.boutonsDepart||[]).forEach(l),c(e.bouton),c(e.boutonCompact);break}case"catalogue-produits":{const e=i;[e.sectionTitle,e.description,e.piedDeSection].forEach(l),c(e.lienTout);break}case"boutiques-partenaires":{const e=i;[e.sectionTitle,e.description].forEach(l),c(e.bouton);break}}return i}(o,e,t):o);E(o)},Le=e=>{const t=B.find(t=>t.id===e);if(!t)return;const o=function(e){const t=JSON.parse(JSON.stringify(e));switch(t.type){case"testimonials":{const e=t;return e.testimonials.push({id:oe(),quote:{id:oe(),content:ae("New testimonial quote"),fontFamily:"Inter",fontSize:"18px",color:"#1a1a1a",tag:"p"},author:{id:oe(),content:ae("Author Name"),fontFamily:"Inter",fontSize:"20px",color:"#1a1a1a",tag:"p"},role:{id:oe(),content:ae("Job Title, Company"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"}}),e}case"pricing":{const e=t;return e.tiers.push({id:oe(),name:{id:oe(),content:ae("New Plan"),fontFamily:"Inter",fontSize:"24px",color:"#1a1a1a",tag:"h3"},price:{id:oe(),content:ae("$19/mo"),fontFamily:"Inter",fontSize:"32px",color:"#1a1a1a",tag:"p"},features:[{id:oe(),content:ae("Feature 1"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"}],button:{id:oe(),text:ae("Get Started"),url:"#",fontFamily:"Inter",backgroundColor:ne.primaryColor,textColor:"#ffffff",size:"medium",alignment:"center"},highlighted:!1}),e}case"services":{const e=t;return e.services.push({id:oe(),image:{id:oe(),url:"https://images.unsplash.com/photo-1486312338219-ce68d2c6f44d?w=600",alt:"Service image"},title:{id:oe(),content:ae("New Service"),fontFamily:"Inter",fontSize:"28px",color:"#1a1a1a",tag:"h3"},description:{id:oe(),content:ae("Service description goes here"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"}}),e}case"wellness-programs":{const e=t;return e.programs.push({id:oe(),image:{id:oe(),url:"https://images.unsplash.com/photo-1635545999375-057ee4013deb?w=600",alt:"Program"},title:{id:oe(),content:ae("New Program"),fontFamily:"Inter",fontSize:"24px",color:"#1a1a1a",tag:"h3"},description:{id:oe(),content:ae("Program description"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"},duration:{id:oe(),content:ae("60 minutes"),fontFamily:"Inter",fontSize:"14px",color:"#666666",tag:"p"},button:{id:oe(),text:ae("Learn More"),url:"#",fontFamily:"Inter",backgroundColor:"#16a34a",textColor:"#ffffff",size:"medium",alignment:"left"},buttonVisible:!0}),e}case"features":{const e=t;return e.features.push({id:oe(),icon:{id:oe(),url:"https://images.unsplash.com/photo-1551808525-51a94da548ce?w=400",alt:"Feature icon"},title:{id:oe(),content:ae("New Feature"),fontFamily:"Inter",fontSize:"24px",color:"#1a1a1a",tag:"h3"},description:{id:oe(),content:ae("Feature description"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"}}),e}case"business-team":{const e=t;return e.members.push({id:oe(),image:{id:oe(),url:"https://images.unsplash.com/photo-1574085727801-3992ff7ab11b?w=600",alt:"Team member"},name:{id:oe(),content:ae("Team Member"),fontFamily:"Inter",fontSize:"24px",color:"#1a1a1a",tag:"h3"},role:{id:oe(),content:ae("Position"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"},bio:{id:oe(),content:ae("Brief bio"),fontFamily:"Inter",fontSize:"14px",color:"#666666",tag:"p"}}),e}case"coaching-packages":{const e=t;return e.packages.push({id:oe(),name:{id:oe(),content:ae("New Package"),fontFamily:"Inter",fontSize:"24px",color:"#1a1a1a",tag:"h3"},description:{id:oe(),content:ae("Package description"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"},sessions:{id:oe(),content:ae("4 Sessions"),fontFamily:"Inter",fontSize:"18px",color:"#1a1a1a",tag:"p"},price:{id:oe(),content:ae("$497"),fontFamily:"Inter",fontSize:"32px",color:"#1a1a1a",tag:"p"},features:[{id:oe(),content:ae("Feature 1"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"}],button:{id:oe(),text:ae("Get Started"),url:"#",fontFamily:"Inter",backgroundColor:ne.primaryColor,textColor:"#ffffff",size:"medium"},highlighted:!1}),e}case"member-benefits":{const e=t;return e.benefits.push({id:oe(),icon:{id:oe(),url:"https://images.unsplash.com/photo-1580849279061-0179c4ebf14e?w=400",alt:"Benefit"},title:{id:oe(),content:ae("New Benefit"),fontFamily:"Inter",fontSize:"24px",color:"#1a1a1a",tag:"h3"},description:{id:oe(),content:ae("Benefit description"),fontFamily:"Inter",fontSize:"16px",color:"#666666",tag:"p"}}
1),e}case"portfolio":{const e=t,o=e.portfolioItems[e.portfolioItems.length-1];return e.portfolioItems.push({id:oe(),image:{id:oe(),url:"https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=800",alt:"Portfolio project"},title:de({id:oe(),content:ae("Project Title"),fontFamily:"Inter",fontSize:"20px",color:"#1f2937",tag:"h3"},null===o||void 0===o?void 0:o.title),description:{id:oe(),content:ae("Project description goes here"),fontFamily:"Inter",fontSize:"16px",color:"#6b7280",tag:"p"},category:de({id:oe(),content:ae("Branding"),fontFamily:"Inter",fontSize:"12px",color:"#6b7280",tag:"span"},null===o||void 0===o?void 0:o.category),link:{id:oe(),text:ae("View Project"),url:"#",fontFamily:"Inter",backgroundColor:ne.primaryColor,textColor:"#ffffff",size:"small"},linkVisible:!0}),e}case"slider":{const e=t;return e.slides.push({id:oe(),image:{id:oe(),url:"https://images.pexels.com/photos/3184291/pexels-photo-3184291.jpeg?auto=compress&cs=tinysrgb&w=1200",alt:"Slide image"},title:{id:oe(),content:{en:"New Slide",fr:"Nouvelle diapositive"},fontFamily:"Inter",fontSize:"32px",color:"#ffffff",tag:"h3"},description:{id:oe(),content:{en:"Slide description",fr:"Description de la diapositive"},fontFamily:"Inter",fontSize:"18px",color:"#ffffff",tag:"p"}}),e}case"sponsors":{const e=t;return e.sponsors.push({id:oe(),image:{id:oe(),url:"https://images.unsplash.com/photo-1599305445671-ac291c95aaa9?w=400&h=200&fit=crop",alt:"Sponsor logo"},name:{id:oe(),content:ae("New Sponsor"),fontFamily:"Inter",fontSize:"14px",color:"#6b7280",tag:"span"},url:""}),e}default:return null}}(t);o&&(E(B.map(t=>t.id===e?o:t)),_t.oR.success(y("toast.itemAdded")))};return(0,S.jsxs)("div",{className:"h-screen flex flex-col bg-gray-50",children:[(0,S.jsxs)("div",{className:"bg-white border-b px-6 py-4 flex items-center justify-between",children:[(0,S.jsx)("div",{className:"flex items-center gap-4",children:(0,S.jsxs)("div",{children:[(0,S.jsx)("h1",{className:"text-2xl",children:y("pages.websiteBuilder.title")}),(0,S.jsxs)("p",{className:"text-gray-600 text-sm",children:[y("pages.websiteBuilder.subtitle")," [",v.toUpperCase(),"]"]})]})}),(0,S.jsxs)("div",{className:"flex gap-2 items-center",children:[!U&&(0,S.jsxs)(S.Fragment,{children:[f&&(0,S.jsx)("button",{onClick:()=>{se?(ye(()=>f),xe(!0)):null===f||void 0===f||f()},className:"flex items-center justify-center w-8 h-8 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",title:y("common.backToDashboard"),children:(0,S.jsx)(ro.A,{className:"w-5 h-5"})}),(0,S.jsxs)("button",{onClick:()=>me(!0),className:"flex items-center gap-2 px-4 py-2 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 transition-colors",title:y("versionHistory.title"),children:[(0,S.jsx)(io.A,{className:"w-4 h-4"}),y("versionHistory.title")]}),(0,S.jsxs)("button",{onClick:Ie,disabled:!se||ee,className:"flex items-center gap-2 px-4 py-2 rounded-lg transition-colors relative ".concat(se?"bg-orange-500 text-white hover:bg-orange-600":"bg-green-100 text-green-700 hover:bg-green-200"," ").concat(ee?"opacity-70 cursor-not-allowed":""),children:[(0,S.jsx)(vt.A,{className:"w-4 h-4"}),y(ee?"common.saving":se?"common.saveChanges":"common.saved"),se&&!ee&&(0,S.jsx)("span",{className:"absolute -top-1 -right-1 w-3 h-3 bg-red-500 rounded-full animate-pulse"})]}),(0,S.jsxs)("button",{onClick:()=>Me("businessName"),className:"flex items-center gap-2 px-4 py-2 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 transition-colors",children:[(0,S.jsx)(Ee.A,{className:"w-4 h-4"}),y("pages.settings.title")]})]}),(0,S.jsx)("div",{className:"flex rounded-lg overflow-hidden border border-gray-300",role:"group",title:"fr"===v?"Langue du contenu":"Content language","data-testid":"content-language-toggle",children:["fr","en"].map(e=>(0,S.jsx)("button",{type:"button",onClick:()=>I(e),"aria-pressed":k===e,className:"px-3 py-2 text-sm font-medium transition-colors ".concat(k===e?"bg-blue-600 text-white":"bg-white text-gray-700 hover:bg-gray-100"),children:e.toUpperCase()},e))}),(0,S.jsxs)("button",{onClick:()=>{r?window.open("/preview/".concat(r),"_blank"):_t.oR.info("fr"===v?"Sauvegardez d'abord pour pr\xe9visualiser":"Save first to preview")},className:"flex items-center gap-2 px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors",children:[(0,S.jsx)(b.A,{className:"w-4 h-4"}),y("preview.title")]})]})]}),!U&&(0,S.jsx)(pn,{pages:j,currentPageId:w,onPageChange:C,onAddPage:()=>K(!0),onDeletePage:e=>{j.length<=1?_t.oR.error(y("toast.cannotDeleteOnlyPage")):(N(j.filter(t=>t.id!==e)),w===e&&C(j[0].id),_t.oR.success(y("toast.pageDeleted")))},onRenamePage:(e,t)=>
1{const o=v,s={en:"en"===o?t:"",fr:"fr"===o?t:""};N(j.map(o=>o.id===e?(0,n.A)((0,n.A)({},o),{},{name:s,slug:t.toLowerCase().replace(/\s+/g,"-")}):o)),_t.oR.success(y("toast.pageRenamed"));const a=localStorage.getItem("token");setTimeout(async()=>{try{const r=await(0,Gt.Gj)(t,o,s,a||void 0);N(t=>t.map(t=>t.id===e?(0,n.A)((0,n.A)({},t),{},{name:r}):t))}catch(r){}},500)},onReorderPages:(e,t)=>{if(0===e||0===t)return;const o=[...j],[n]=o.splice(e,1);o.splice(t,0,n),o.forEach((e,t)=>{e.order=t}),N(o)},onSetParentPage:(e,t)=>{N(o=>o.map(o=>o.id===e?(0,n.A)((0,n.A)({},o),{},{parentPageId:t||void 0}):o)),_t.oR.success(y("toast.pageParentUpdated"))}}),(0,S.jsxs)("div",{className:"flex-1 flex overflow-hidden",children:[!U&&(0,S.jsx)("div",{className:"w-96 bg-white border-r overflow-y-auto flex-shrink-0",children:(0,S.jsx)(A,{sections:B,onAddSection:Te,onRemoveSection:ze,onReorderSection:(e,t)=>{if(-1===B.findIndex(t=>t.id===e))return;const o=[...B].sort((e,t)=>e.order-t.order),n=o.findIndex(t=>t.id===e);if("up"===t&&n>0){const e=o[n].order;o[n].order=o[n-1].order,o[n-1].order=e}else if("down"===t&&n<o.length-1){const e=o[n].order;o[n].order=o[n+1].order,o[n+1].order=e}E([...o])},onMoveSection:(e,t)=>{const o=[...B].sort((e,t)=>e.order-t.order);if(e<0||e>=o.length||t<0||t>=o.length)return;const[n]=o.splice(e,1);o.splice(t,0,n),o.forEach((e,t)=>{e.order=t}),E([...o])},onCloneSection:e=>{const t=B.find(t=>t.id===e);if(!t)return;const o=re(t,(B.length>0?Math.max(...B.map(e=>e.order)):-1)+1);E([...B,o])},onToggleSectionHidden:e=>{E(B.map(t=>t.id===e?(0,n.A)((0,n.A)({},t),{},{hidden:!t.hidden}):t))},pages:j,currentPageId:w,onMoveSectionToPage:(e,t)=>{if(t===w)return;const o=B.find(t=>t.id===e);o&&N(s=>s.map(s=>{if(s.id===w)return(0,n.A)((0,n.A)({},s),{},{sections:s.sections.filter(t=>t.id!==e)});if(s.id===t){const e=s.sections||[],t=e.length>0?Math.max(...e.map(e=>e.order)):-1;return(0,n.A)((0,n.A)({},s),{},{sections:[...e,(0,n.A)((0,n.A)({},o),{},{order:t+1})]})}return s}))},onCloneSectionToPage:(e,t)=>{const o=B.find(t=>t.id===e);o&&N(e=>e.map(e=>{if(e.id===t){const t=e.sections||[],s=t.length>0?Math.max(...t.map(e=>e.order)):-1,a=re(o,s+1);return(0,n.A)((0,n.A)({},e),{},{sections:[...t,a]})}return e}))},selectedSectionId:O,onSectionSelect:e=>{_(e),L(null),R(null),setTimeout(()=>{const t=document.getElementById(e);t&&t.scrollIntoView({behavior:"smooth",block:"center"})},100)},currentCategory:null===(e=u.find(e=>e.id===F))||void 0===e?void 0:e.category,onOpenLibrary:()=>$(!0)})}),(0,S.jsx)("div",{className:"flex-1 overflow-y-auto bg-gray-100",children:(0,S.jsx)("div",{className:"flex justify-center items-start min-h-full p-8",children:(0,S.jsx)("div",{className:"\n transition-all duration-300 ease-in-out shadow-2xl\n ".concat(U?"w-[1280px]":"max-w-5xl mx-auto w-full","\n "),children:(0,S.jsx)(p.l,{websiteId:r,sections:B,settings:ve,pages:j,currentPageId:w,onPageChange:e=>{C(e)},onElementClick:(e,t)=>{Ne.current=!0,L(e),R(t),W(null);for(const o of B){if(ce(o,e)){_(o.id);break}}setTimeout(()=>{Ne.current=!1},50)}
1,onSettingsClick:Me,selectedSectionId:O,isEditing:!U,builderLanguage:k,isBilingual:z,onContentLanguageChange:I,onNavigate:e=>{if(console.log("[WebsiteBuilder] handlePreviewNavigate:",e),r){const t="/preview/".concat(r).concat(e);window.open(t,"_blank")}else _t.oR.info("fr"===v?"Sauvegardez d'abord pour pr\xe9visualiser":"Save first to preview")},onSectionClick:e=>{Ne.current?console.log("\u23ed\ufe0f Skipping section click - element was clicked"):(console.log("\ud83d\udce6 Section clicked:",e),_(e),L(null),R(null),W(null),setTimeout(()=>{const t=document.getElementById(e);t&&t.scrollIntoView({behavior:"smooth",block:"center"})},100))}})})})}),!U&&(0,S.jsxs)("div",{className:"w-96 bg-white border-l overflow-y-auto flex-shrink-0",children:[(0,S.jsx)("div",{className:"p-4 border-b",children:(0,S.jsx)("h3",{children:y("properties.title")})}),(0,S.jsx)(ao,{selectedElement:(()=>{if(!D)return null;for(const e of B){const t=ce(e,D);if(t)return t.element}return null})(),selectedElementType:H,selectedSection:O&&B.find(e=>e.id===O)||null,selectedSettingType:V,websiteSettings:ve,pages:j,currentPageId:w,currentPageSections:B,websiteId:r,contentLanguage:k,onUpdateElement:De,onDeleteElement:e=>{for(const s of B){const a=ce(s,e);if(a){const r=a.element;if("text"in r&&"backgroundColor"in r){var t,o;if("buttons"in s&&Array.isArray(s.buttons)){if(-1!==s.buttons.findIndex(t=>t.id===e)){const t=s.buttons.filter(t=>t.id!==e);return E(B.map(e=>e.id===s.id?(0,n.A)((0,n.A)({},e),{},{buttons:t}):e)),L(null),void _t.oR.success(y("toast.buttonRemoved")||"Button removed")}}if("viewAllButton"in s&&(null===(t=s.viewAllButton)||void 0===t?void 0:t.id)===e)return E(B.map(e=>e.id===s.id?(0,n.A)((0,n.A)({},e),{},{viewAllButtonVisible:!1}):e)),L(null),void _t.oR.success(y("toast.buttonHidden")||"Button hidden");if("services"in s){const t=s.services.map(t=>{var o;return(null===(o=t.button)||void 0===o?void 0:o.id)===e?(0,n.A)((0,n.A)({},t),{},{buttonVisible:!1}):t});return E(B.map(e=>e.id===s.id?(0,n.A)((0,n.A)({},e),{},{services:t}):e)),L(null),void _t.oR.success(y("toast.buttonHidden")||"Button hidden")}if("tiers"in s){const t=s.tiers.map(t=>{var o;return(null===(o=t.button)||void 0===o?void 0:o.id)===e?(0,n.A)((0,n.A)({},t),{},{buttonVisible:!1}):t});return E(B.map(e=>e.id===s.id?(0,n.A)((0,n.A)({},e),{},{tiers:t}):e)),L(null),void _t.oR.success(y("toast.buttonHidden")||"Button hidden")}if("programs"in s){const t=s.programs.map(t=>{var o;return(null===(o=t.button)||void 0===o?void 0:o.id)===e?(0,n.A)((0,n.A)({},t),{},{buttonVisible:!1}):t});return E(B.map(e=>e.id===s.id?(0,n.A)((0,n.A)({},e),{},{programs:t}):e)),L(null),void _t.oR.success(y("toast.buttonHidden")||"Button hidden")}if("packages"in s){const t=s.packages.map(t=>{var o;return(null===(o=t.button)||void 0===o?void 0:o.id)===e?(0,n.A)((0,n.A)({},t),{},{buttonVisible:!1}):t});return E(B.map(e=>e.id===s.id?(0,n.A)((0,n.A)({},e),{},{packages:t}):e)),L(null),void _t.oR.success(y("toast.buttonHidden")||"Button hidden")}if("benefits"===s.type&&(null===(o=s.button)||void 0===o?void 0:o.id)===e)return E(B.map(e=>e.id===s.id?(0,n.A)((0,n.A)({},e),{},{buttonVisible:!1}):e)),L(null),void _t.oR.success(y("toast.buttonHidden")||"Button hidden")}if("content"in r)return De(e,{content:{en:"",fr:""}}),L(null),void _t.oR.success(y("toast.elementCleared")||"Element cleared");if("url"in r&&"alt"in r)return De(e,{url:""}),L(null),void _t.oR.success(y("toast.elementCleared")||"Element cleared")}}},onUpdateSection:Fe,onUpdateSettings:Pe,onAddItemToSection:Le,onRemoveItemFromSection:(e,t)=>{const o=B.find(t=>t.id===e);if(!o)return;const n=function(e,t){const o=JSON.parse(JSON.stringify(e));switch(o.type){case"testimonials":{const e=o;return e.testimonials=e.testimonials.filter(e=>e.id!==t),e}case"pricing":{const e=o;return e.tiers=e.tiers.filter(e=>e.id!==t),e}case"services":{const e=o;return e.services=e.services.filter(e=>e.id!==t),e}case"wellness-programs":{const e=o;return e.programs=e.programs.filter(e=>e.id!==t),e}case"features":{const e=o;return e.features=e.features.filter(e=>e.id!==t),e}case"business-team":{const e=o;return e.members=e.members.filter(e=>e.id!==t),e}case"coaching-packages":{const e=o;return e.packages=e.packages.filter(e=>e.id!==t),e}case"member-benefits":{const e=o;return e.benefits=e.benefits.filter(e=>e.id!==t),e}case"portfolio":{const e=o;return e.portfolioItems=e.portfolioItems.filter(e=>e.id!==t),e}case"slider":{const e=o;return e.slides=e.slides.filter(e=>e.id!==t),e}case"sponsors":{const e=o;return e.sponsors=e.sponsors.filter(e=>e.id!==t),e}default:return null}}(o,t);n&&(E(B.map(t=>
1t.id===e?n:t)),L(null),R(null),_t.oR.success(y("toast.itemRemoved")))},verificationMetaError:X})]})]}),(0,S.jsx)("div",{className:"bg-white border-t px-6 py-3 text-sm text-gray-600",children:(0,S.jsxs)("div",{className:"flex items-center justify-between",children:[(0,S.jsxs)("div",{children:[y("sections.title"),": ",(0,S.jsx)("span",{className:"font-medium",children:B.length})]}),(0,S.jsxs)("div",{className:"text-xs",children:["\ud83d\udca1 ",y("properties.selectPrompt")]})]})}),(0,S.jsx)(nn,{open:Z,onOpenChange:$,onAddSection:e=>{const t=re(e,(B.length>0?Math.max(...B.map(e=>e.order)):-1)+1);E([...B,t]),_t.oR.success(y("toast.sectionAdded"))},currentCategory:null===(t=u.find(e=>e.id===F))||void 0===t?void 0:t.category}),(0,S.jsx)(cn,{open:Q,onOpenChange:K,existingPages:j,category:(null===(o=u.find(e=>e.id===F))||void 0===o?void 0:o.category)||"blank",businessName:ve.businessName,tagline:ve.tagline,homeSections:(null===(s=j.find(e=>"home"===e.slug))||void 0===s?void 0:s.sections)||B,websiteId:r,onPageCreate:e=>{N([...j,e]),C(e.id),_t.oR.success(y("toast.pageCreated",{name:"object"===typeof e.name?e.name.fr||e.name.en:e.name}))}}),(0,S.jsx)(fn,{pages:j,currentPageId:w,currentPageSections:B,websiteSettings:ve,selectedSectionId:O,selectedElementId:D,onAddSection:Te,onUpdateSection:Fe,onDeleteSection:ze,onUpdateSettings:Pe,onNavigateToSection:e=>{_(e),setTimeout(()=>{const t=document.getElementById(e);t&&t.scrollIntoView({behavior:"smooth",block:"center"})},100)},onSelectElement:(e,t)=>{L(e),R(t)},onUpdateElement:(e,t,o)=>{De(e,o)},onAddPage:e=>{var t,o;const n=(null===(t=u.find(e=>e.id===F))||void 0===t?void 0:t.category)||"blank",s=(null===(o=j.find(e=>"home"===e.slug))||void 0===o?void 0:o.sections)||[],a=("string"===typeof ve.businessName?ve.businessName:ve.businessName.en,ve.tagline?"string"===typeof ve.tagline?ve.tagline:ve.tagline.en:void 0),r=ln(e,n,0,j,a,s);r&&"error"===r.id?_t.oR.error(r.dynamicFeatureMessage||y("toast.cannotCreatePage")):r?(N(e=>[...e,r]),setTimeout(()=>{C(r.id),_t.oR.success(y("toast.pageGeneratedSuccess",{name:"object"===typeof r.name?r.name.fr||r.name.en:r.name,count:r.sections.length}))},0)):_t.oR.error(y("toast.pageGeneratedFailed"))},onAddItemToSection:(e,t)=>{Le(e)},onSaveConversation:e=>{try{localStorage.setItem("aiAssistantConversation",JSON.stringify(e))}catch(t){console.error("Failed to save AI conversation:",t)}},conversationHistory:(()=>{try{const e=localStorage.getItem("aiAssistantConversation");return e?JSON.parse(e):[]}catch(e){return[]}})()}),ue&&(0,S.jsx)(uo,{versions:pe,onRestore:e=>{e.pages&&e.pages.length>0?(N(e.pages.map(e=>(0,n.A)((0,n.A)({},e),{},{sections:(e.sections||[]).map(e=>ge(e))}))),C(e.currentPageId||e.pages[0].id)):e.sections&&(N([{id:"home",name:"Home",slug:"home",sections:e.sections,order:0,createdBy:"user"}
1]),C("home")),me(!1),le(!0),_t.oR.success(y("toast.versionRestored"))},onClose:()=>me(!1),onBackToDashboard:f}),(0,S.jsx)(bn,{open:G,onClose:()=>J(!1),websiteSettings:ve,websiteId:r,pages:j,currentPageSections:B,onUpdateSettings:Pe,contentLanguage:k,onContentLanguageChange:I}),fe&&(0,S.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-[9999]",children:(0,S.jsxs)("div",{className:"bg-white rounded-lg shadow-xl p-6 max-w-md mx-4",children:[(0,S.jsx)("h3",{className:"text-lg font-semibold mb-2",children:y("unsavedChanges.title")}),(0,S.jsx)("p",{className:"text-gray-600 mb-6",children:y("unsavedChanges.message")}),(0,S.jsxs)("div",{className:"flex gap-3 justify-end",children:[(0,S.jsx)("button",{onClick:()=>{xe(!1),ye(null)},className:"px-4 py-2 text-gray-600 hover:bg-gray-100 rounded-lg transition-colors",children:y("unsavedChanges.cancel")}),(0,S.jsx)("button",{onClick:()=>{xe(!1),be&&be()},className:"px-4 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700 transition-colors",children:y("unsavedChanges.leaveWithoutSaving")}),(0,S.jsx)("button",{onClick:async()=>{await Ie()&&(xe(!1),be&&be())},className:"px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:y("unsavedChanges.saveAndLeave")})]})]})})]})}function Sn(e){const{websiteId:t,initialData:o,onSave:n,onSaveCheckpoint:s,onLoadCheckpoints:r,onRestoreCheckpoint:i,onBackToDashboard:d,isSaving:u}=e;return(0,a.useEffect)(()=>{const e=localStorage.getItem("siteLanguage")||"en";l.Ay.language!==e&&l.Ay.changeLanguage(e)},[]),(0,S.jsx)(c.I,{children:(0,S.jsx)(Cn,{websiteId:t,initialData:o,onSave:n,onSaveCheckpoint:s,onLoadCheckpoints:r,onRestoreCheckpoint:i,onBackToDashboard:d,isSaving:u})})}var An=o(4662);const kn=["verificationMetaText"],In="/api";function Tn(){const{websiteId:e}=(0,r.g)(),t=(0,r.Zp)(),[o,l]=(0,a.useState)(!0),[c,d]=(0,a.useState)(null),[u,m]=(0,a.useState)(null),[p,g]=(0,a.useState)(!1);(0,a.useEffect)(()=>{e?((0,An.LZ)(e),h()):l(!1)},[e]);const h=async()=>{try{l(!0);const t=localStorage.getItem("token"),o=(await i.A.get("".concat(In,"/client/websites/").concat(e),{headers:{Authorization:"Bearer ".concat(t)}})).data.website;m(o),l(!1)}catch(t){console.error("Failed to load website:",t),d("Failed to load website. Please try again."),l(!1)}};if(o)return(0,S.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",background:"#f8f9fa",color:"#1f2937"},children:(0,S.jsxs)("div",{style:{textAlign:"center"},children:[(0,S.jsx)("div",{style:{fontSize:"48px",marginBottom:"16px"},children:"\u26a1"}),(0,S.jsx)("h2",{children:"Loading Website Builder..."})]})});if(c)return(0,S.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",background:"#f8f9fa",color:"#1f2937"},children:(0,S.jsxs)("div",{style:{textAlign:"center"},children:[(0,S.jsx)("h2",{style:{color:"#ef4444"},children:"Error"}),(0,S.jsx)("p",{children:c}),(0,S.jsx)("button",{onClick:()=>t("/client/dashboard"),style:{marginTop:"16px",padding:"12px 24px",background:"#3b82f6",color:"#fff",border:"none",borderRadius:"8px",cursor:"pointer"},children:"Back to Dashboard"})]})});return(0,S.jsx)(Sn,{websiteId:e,initialData:u,onSave:async(o,a,r)=>{console.log("[WebsiteBuilderV3] handleSaveWebsite called with:",{sectionsCount:null===o||void 0===o?void 0:o.length,settings:a,templateId:r,websiteId:e});try{var l,d;g(!0);const u=localStorage.getItem("token");let m=[];try{const e=localStorage.getItem("websitePages");e&&(m=JSON.parse(e))}catch(c){console.error("Error loading pages:",c)}const p=m.length>0?m:[{id:"home",name:"Home",slug:"home",sections:o,order:0,createdBy:"user"}],h=p.find(e=>"home"===e.slug||"home"===e.id),f=(null===h||void 0===h?void 0:h.sections)||o,{verificationMetaText:x}=a,b=(0,s.A)(a,kn),y={template_version:"v3",template_id:r,tagline:a.tagline||"",logoHeight:a.logoHeight||40,sections:f,pages:p,settings:(0,n.A)((0,n.A)({},b),{},{logo:a.logo||null,logoHeight:a.logoHeight||40,tagline:a.tagline||"",primaryColor:a.primaryColor||"#667eea",secondaryColor:a.secondaryColor||"",accentColor:a.accentColor||"",fontFamily:a.fontFamily||"",fontSizeScale:a.fontSizeScale||1,hideNeoAgoraBranding:a.hideNeoAgoraBranding||!1,footerCustomLine1:a.footerCustomLine1||"",footerCustomLine2:a.footerCustomLine2||"",showFooterCustomMessage:a.showFooterCustomMessage||!1,phone:a.phone||"",address:a.address||"",showPhone:null===(l=a.showPhone)||void 0===l||l,showAddress:null===(d=a.showAddress)||void 0===d||d,socialMedia:a.socialMedia||null})};if(e)await i.A.post("".concat(In,"/save-website-raw/").concat(e),(0,n.A)({content:y,business_name:a.businessName,seo_title:a.seoT
1itle,seo_description:a.seoDescription,logo_url:a.logo,embedded_agent_id:a.embeddedAgentId||null,custom_domain:a.customDomain||null,business_email:a.businessEmail||null,phone:a.phone||null,address:a.address||null},"string"===typeof a.verificationMetaText?{verification_meta_text:a.verificationMetaText}:{}),{headers:{Authorization:"Bearer ".concat(u)}}),console.log("[WebsiteBuilderV3] \u2705 Website saved to MongoDB:",{pagesCount:m.length,custom_domain:a.customDomain,business_email:a.businessEmail}),(0,An.GI)(e,"save");else{const e=(await i.A.post("".concat(In,"/client/websites"),{business_name:a.businessName,business_description:a.tagline||"Website created with v3 builder",template_id:r,content:y},{headers:{Authorization:"Bearer ".concat(u)}})).data.website.id;t("/websites/".concat(e,"/edit"))}return g(!1),!0}catch(u){throw console.error("Failed to save website:",u),g(!1),u}},onSaveCheckpoint:async function(t,o,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"Auto-save";if(e)try{const a=localStorage.getItem("token");let r=[];try{const e=localStorage.getItem("websitePages");e&&(r=JSON.parse(e))}catch(c){console.error("Error loading pages for checkpoint:",c)}const l=r.length>0?r.flatMap(e=>e.sections||[]):t,d={template_version:"v3",template_id:n,tagline:o.tagline||"",business_name:o.businessName||"",sections:l,pages:r.length>0?r:[{id:"home",name:"Home",slug:"home",sections:t,order:0,createdBy:"user"}]};await i.A.post("".concat(In,"/client/websites/").concat(e,"/checkpoints"),{content_snapshot:d,description:s,type:"auto"},{headers:{Authorization:"Bearer ".concat(a)}}),console.log("[WebsiteBuilderV3] \u2705 Checkpoint saved with",l.length,"sections from",r.length,"pages")}catch(a){console.error("Failed to save checkpoint:",a)}},onLoadCheckpoints:async()=>{if(!e)return[];try{const t=localStorage.getItem("token");return(await i.A.get("".concat(In,"/client/websites/").concat(e,"/checkpoints"),{headers:{Authorization:"Bearer ".concat(t)}})).data.checkpoints||[]}catch(t){return console.error("Failed to load checkpoints:",t),[]}},onRestoreCheckpoint:async t=>{if(!e)return!1;try{const o=localStorage.getItem("token");return await i.A.post("".concat(In,"/client/websites/").concat(e,"/restore/").concat(t),{},{headers:{Authorization:"Bearer ".concat(o)}}),await h(),!0}catch(o){throw console.error("Failed to restore checkpoint:",o),o}},onBackToDashboard:()=>{t("/client/dashboard")},isSaving:p})}}}]); 2//# sourceMappingURL=604.ad8cbc67.chunk.js.map
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.