module.exports=[4510,a=>{"use strict";a.s(["default",()=>e]);var b=a.i(87924),c=a.i(32886),d=a.i(2198);let e=({data:a})=>{let e="ar"===(0,c.useLocale)();return(0,b.jsx)("div",{className:"w-full px-5 sm:px-10 mt-10",children:(0,b.jsx)("div",{className:"   grid   gap-6   sm:grid-cols-1   md:grid-cols-2   lg:grid-cols-3   xl:grid-cols-4   ",children:a.map((a,c)=>(0,b.jsx)("div",{className:"flex  justify-center w-full",children:(0,b.jsx)(d.default,{item:{...a,id:a.id},isArabic:e,isFirst:0===c})},a.id))})})}},84850,a=>{"use strict";a.s(["Autoplay",()=>b.default]);var b=a.i(34494)},13101,a=>{"use strict";a.s(["default",()=>j]);var b=a.i(87924),c=a.i(32886),d=a.i(70388),e=a.i(46964),f=a.i(46271),g=a.i(91858);a.i(9068);var h=a.i(50416),i=a.i(84850);let j=()=>{let a="ar"===(0,c.useLocale)(),{data:j,isLoading:k,isError:l}=(0,e.useGetAllDoctors)({sort:"highest_rating"});if(k)return(0,b.jsx)("div",{className:"py-6 sm:py-8",children:(0,b.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:[1,2,3].map(a=>(0,b.jsx)("div",{className:"w-full h-64 rounded-2xl bg-gray-200 animate-pulse"},a))})});if(l)return(0,b.jsx)("div",{className:"text-center py-10 text-red-500",children:a?"حدث خطأ أثناء تحميل الأطباء.":"Failed to load doctors."});let m=j?.data||[];return(0,b.jsxs)("div",{className:`py-6 sm:py-8 ${a?"rtl":"ltr"}`,children:[(0,b.jsx)(g.Swiper,{modules:[h.Pagination,i.Autoplay],pagination:{clickable:!0},autoplay:{delay:3e3},navigation:!1,spaceBetween:20,className:"pb-10",breakpoints:{0:{slidesPerView:1},640:{slidesPerView:2},1024:{slidesPerView:3}},dir:a?"rtl":"ltr",children:m.map((c,e)=>(0,b.jsx)(g.SwiperSlide,{children:(0,b.jsx)(f.motion.div,{initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},transition:{delay:.1*e,duration:.4,ease:"easeOut"},viewport:{once:!0},className:"h-full",children:(0,b.jsx)(d.default,{doctor:c,isArabic:a})})},c.id))}),(0,b.jsx)("style",{children:`
          /* المسافة بين الكروت والنقاط */
          .swiper-pagination {
            margin-top: 25px !important;
            position: relative !important;
          }

          /* جميع النقاط */
          .swiper-pagination-bullet {
            background-color: #CCCCCC !important;
            width: 10px !important;
            height: 10px !important;
            border-radius: 6px !important;
            opacity: 1 !important;
            transition: 0.3s;
          }

          /* النقطة الفعّالة */
          .swiper-pagination-bullet-active {
            background-color: #2F537D !important;
            width: 22px !important;
            border-radius: 6px !important;
          }

          /* 🔥 إظهار أول 5 نقاط فقط */
          .swiper-pagination-bullet:nth-child(n+6) {
            display: none !important;
          }
        `})]})}},54385,a=>{"use strict";a.s(["Navigation",()=>b.default]);var b=a.i(71548)},40461,a=>{"use strict";a.s(["default",()=>o]);var b=a.i(87924),c=a.i(72131),d=a.i(91858);a.i(9068);var e=a.i(54385),f=a.i(84850),g=a.i(32886),h=a.i(9610),i=a.i(99889),j=a.i(38246),k=a.i(71987),l=a.i(46964),m=a.i(31173),n=a.i(46271);let o=()=>{let a="ar"===(0,g.useLocale)(),o=(0,h.useTranslations)("HomePage"),p=(0,c.useRef)(null),q=(0,c.useRef)(null),[r,s]=(0,c.useState)(0);(0,c.useEffect)(()=>{s(window.innerWidth);let a=()=>s(window.innerWidth);return window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]);let{data:t,isLoading:u}=(0,l.useGetAllSectors)(),v=t?.data||[],[w,x]=(0,c.useState)(null),[y,z]=(0,c.useState)(0);(0,c.useEffect)(()=>{v.length>0&&null===w&&x(v[0].id)},[v,w]);let{data:A,isLoading:B,isFetching:C}=(0,l.useGetSectionsBySector)(w),D=A?.data||[],E=()=>(0,b.jsx)("div",{className:"w-32 h-3 bg-gray-300 rounded-full animate-pulse"}),F=()=>(0,b.jsx)("div",{className:"h-44 w-40 bg-gray-200 rounded-xl shadow-sm animate-pulse"}),G={modules:[e.Navigation,f.Autoplay],spaceBetween:4,slidesPerView:6,navigation:{nextEl:a?".sector-swiper-next":".sector-swiper-prev",prevEl:a?".sector-swiper-prev":".sector-swiper-next"},onSwiper:a=>p.current=a,breakpoints:{1024:{slidesPerView:7,spaceBetween:2},768:{slidesPerView:5,spaceBetween:2},480:{slidesPerView:3,spaceBetween:2},0:{slidesPerView:2,spaceBetween:2}}},H={modules:[e.Navigation,f.Autoplay],spaceBetween:10,slidesPerView:Math.min(6,D.length||1),autoplay:{delay:2500,disableOnInteraction:!1},speed:800,navigation:{nextEl:a?".section-swiper-next":".section-swiper-prev",prevEl:a?".section-swiper-prev":".section-swiper-next"},onSwiper:a=>q.current=a,onSlideChange:a=>z(a.activeIndex),breakpoints:{1024:{slidesPerView:Math.min(6,D.length||1)},768:{slidesPerView:Math.min(4,D.length||1)},480:{slidesPerView:Math.min(3,D.length||1)},0:{slidesPerView:Math.min(2,D.length||1)}}},I={hidden:{opacity:0,y:20},visible:a=>({opacity:1,y:0,transition:{delay:.05*a,duration:.4}})};return(0,b.jsx)("div",{className:"w-full py-4",children:(0,b.jsxs)("div",{className:"container mx-auto",children:[(0,b.jsxs)("div",{className:"flex my-5 items-center justify-between",children:[(0,b.jsxs)("h2",{className:"text-xl flex items-center gap-1",children:[(0,b.jsx)("span",{className:"text-blue-600",children:(0,b.jsx)(k.default,{src:"/icons/Notes.png",alt:"sectors",width:25,height:25})}),o("sectors")]}),(0,b.jsxs)("div",{className:"flex gap-4",children:[(0,b.jsx)("button",{className:"sector-swiper-prev w-6 h-6 flex items-center justify-center rounded-full bg-blue-900 text-white hover:bg-blue-800",children:a?(0,b.jsx)(m.IoMdArrowForward,{size:18}):(0,b.jsx)(m.IoMdArrowBack,{size:18})}),(0,b.jsx)("button",{className:"sector-swiper-next w-6 h-6 flex items-center justify-center rounded-full border border-gray-300 text-gray-500 hover:bg-gray-100",children:a?(0,b.jsx)(m.IoMdArrowBack,{size:18}):(0,b.jsx)(m.IoMdArrowForward,{size:18})})]})]}),(0,b.jsx)("div",{children:u?(0,b.jsx)("div",{className:"flex justify-between overflow-x-auto py-2 gap-4",children:Array(r>=1024?7:r>=768?5:r>=480?3:2).fill(0).map((a,c)=>(0,b.jsx)(E,{},c))}):(0,b.jsx)(d.Swiper,{...G,children:v.map((a,c)=>(0,b.jsx)(d.SwiperSlide,{children:(0,b.jsx)(n.motion.div,{onClick:()=>x(a.id),className:"flex justify-center text-[12px] cursor-pointer py-2",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.05*c},children:(0,b.jsx)("span",{className:`${w===a.id?"text-[#2F537D] border-b-2 border-[#2F537D] font-semibold":"text-black"} text-sm md:text-base truncate`,title:a.name,children:a.name})})},a.id))})}),(0,b.jsxs)("div",{className:"flex my-5 items-center justify-between px-2",children:[(0,b.jsx)("h2",{className:"text-xl flex items-center gap-1",children:(0,b.jsxs)(j.default,{href:"/sections",className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-blue-600",children:(0,b.jsx)(k.default,{src:"/icons/category-2.png",alt:"sections",width:25,height:25})}),o("sections")]})}),(0,b.jsxs)("div",{className:"flex gap-4",children:[(0,b.jsx)("button",{className:"section-swiper-prev w-6 h-6 flex items-center justify-center rounded-full bg-blue-900 text-white hover:bg-blue-800",children:a?(0,b.jsx)(m.IoMdArrowForward,{size:18}):(0,b.jsx)(m.IoMdArrowBack,{size:18})}),(0,b.jsx)("button",{className:"section-swiper-next w-6 h-6 flex items-center justify-center rounded-full border border-gray-300 text-gray-500 hover:bg-gray-100",children:a?(0,b.jsx)(m.IoMdArrowBack,{size:18}):(0,b.jsx)(m.IoMdArrowForward,{size:18})})]})]}),(0,b.jsx)("div",{className:"relative",children:B||C?(0,b.jsx)("div",{className:"flex justify-center items-center gap-6 flex-wrap",children:Array(r>=1024?6:r>=768?4:r>=480?3:2).fill(0).map((a,c)=>(0,b.jsx)(F,{},c))}):D.length>0?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.Swiper,{...H,children:D.map((a,c)=>(0,b.jsx)(d.SwiperSlide,{children:(0,b.jsx)(n.motion.div,{custom:c,variants:I,initial:"hidden",animate:"visible",children:(0,b.jsx)(i.default,{id:a.id,name:a.name,icon:a.icon||"/logo.png"})})},a.id))}),(0,b.jsx)("div",{className:"absolute -bottom-12 left-1/2 -translate-x-1/2 flex items-center gap-2 px-4 py-2",children:D.map((a,c)=>(0,b.jsx)("button",{onClick:()=>q.current?.slideTo(c),className:`h-2 rounded-full transition-all duration-300 ${c===y?"bg-[#2F537D] w-6":"bg-gray-300 w-2"}`},c))})]}):(0,b.jsx)("div",{className:"text-center py-8 text-gray-500",children:o("noSections")})})]})})}},62067,a=>{"use strict";a.s(["default",()=>e]);var b=a.i(87924),c=a.i(71987),d=a.i(38246);function e({item:a}){return(0,b.jsx)(d.default,{href:`/hospital/${a.id}`,children:(0,b.jsxs)("div",{className:"   w-full    h-[250px]    flex flex-col    items-center    justify-center    text-center    bg-white    shadow-md    rounded-3xl    p-6    hover:shadow-lg    transition-shadow    duration-300   ",children:[(0,b.jsx)("div",{className:"relative w-20 h-20 rounded-full border border-gray-200 shadow-sm overflow-hidden",children:(0,b.jsx)(c.default,{src:a.image||"/placeholder.jpg",alt:a.title,fill:!0,className:"object-cover",sizes:"(max-width: 80px) 100vw, 80px"})}),(0,b.jsx)("h3",{className:"mt-4 text-lg font-semibold text-gray-800",children:a.title}),(0,b.jsx)("p",{className:"mt-1 text-md text-[#3469CC] bg-[#DAE5F1] px-3 py-1 rounded-md",children:a.type})]})})}},22250,a=>{"use strict";a.s(["default",()=>h]);var b=a.i(87924),c=a.i(31626),d=a.i(72131),e=a.i(46964),f=a.i(33508),g=a.i(32886);let h=()=>{let[a,h]=(0,d.useState)(!0),i=(0,g.useLocale)(),{data:j}=(0,e.useGetNews)(),k=j?.data??[],l=k.length>0;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(c.default,{id:"969e4fbf9d553506",children:".marquee-container.jsx-969e4fbf9d553506{position:relative;overflow:hidden}.marquee.jsx-969e4fbf9d553506{white-space:nowrap;animation-duration:25s;animation-timing-function:linear;animation-iteration-count:infinite;display:inline-block}.marquee-rtl.jsx-969e4fbf9d553506{animation-name:marquee-rtl}.marquee-ltr.jsx-969e4fbf9d553506{animation-name:marquee-ltr}@keyframes marquee-rtl{0%{transform:translate(100%)}to{transform:translate(-100%)}}@keyframes marquee-ltr{0%{transform:translate(-100%)}to{transform:translate(100%)}}@keyframes slideDown{0%{opacity:0;transform:translateY(-100%)}to{opacity:1;transform:translateY(0)}}.animate-slideDown.jsx-969e4fbf9d553506{animation:.3s ease-out slideDown}"}),a?(0,b.jsxs)("div",{className:"jsx-969e4fbf9d553506  top-0 left-0 right-0 z-50 w-full bg-[#1c3154]/90 backdrop-blur-sm text-white text-md h-10 pb-1 px-4 flex items-center gap-3 transition-all duration-300 ease-in-out",children:[(0,b.jsx)("button",{onClick:()=>{h(!a)},"aria-label":"Hide news bar",className:"jsx-969e4fbf9d553506 p-1 rounded hover:bg-white/10 transition-colors duration-200",children:(0,b.jsx)(f.X,{className:"w-4 h-4"})}),(0,b.jsx)("div",{className:"jsx-969e4fbf9d553506 marquee-container flex-1",children:l?(0,b.jsx)("div",{className:`jsx-969e4fbf9d553506 marquee ${"ar"===i?"marquee-rtl":"marquee-ltr"}`,children:k.map((a,c)=>(0,b.jsxs)("span",{className:"jsx-969e4fbf9d553506 mx-6 inline-flex items-center gap-2 opacity-90",children:[(0,b.jsx)("span",{className:"jsx-969e4fbf9d553506 w-1.5 h-1.5 rounded-full bg-white/60"}),(0,b.jsx)("span",{className:"jsx-969e4fbf9d553506",children:a.title})]},a.id??c))}):(0,b.jsx)("div",{className:"jsx-969e4fbf9d553506 text-xs text-white/70",children:"لا توجد أخبار متاحة حاليًا"})})]}):null]})}},46003,a=>{"use strict";a.s(["default",()=>m],46003);var b=a.i(87924),c=a.i(72131),d=a.i(42343);function e(a){return(0,d.GenIcon)({tag:"svg",attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 8.511c.884.284 1.5 1.128 1.5 2.097v4.286c0 1.136-.847 2.1-1.98 2.193-.34.027-.68.052-1.02.072v3.091l-3-3c-1.354 0-2.694-.055-4.02-.163a2.115 2.115 0 0 1-.825-.242m9.345-8.334a2.126 2.126 0 0 0-.476-.095 48.64 48.64 0 0 0-8.048 0c-1.131.094-1.976 1.057-1.976 2.192v4.286c0 .837.46 1.58 1.155 1.951m9.345-8.334V6.637c0-1.621-1.152-3.026-2.76-3.235A48.455 48.455 0 0 0 11.25 3c-2.115 0-4.198.137-6.24.402-1.608.209-2.76 1.614-2.76 3.235v6.226c0 1.621 1.152 3.026 2.76 3.235.577.075 1.157.14 1.74.194V21l4.155-4.155"},child:[]}]})(a)}function f(a){return(0,d.GenIcon)({tag:"svg",attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"m18.375 12.739-7.693 7.693a4.5 4.5 0 0 1-6.364-6.364l10.94-10.94A3 3 0 1 1 19.5 7.372L8.552 18.32m.009-.01-.01.01m5.699-9.941-7.81 7.81a1.5 1.5 0 0 0 2.112 2.13"},child:[]}]})(a)}var g=a.i(48617),h=a.i(46271),i=a.i(62036),j=a.i(28337),k=a.i(32886),l=a.i(9610);let m=()=>{let a="ar"===(0,k.useLocale)(),d=(0,l.useTranslations)("supportChat"),m=(0,j.createApiClient)(),[n,o]=(0,c.useState)(!1),[p,q]=(0,c.useState)(""),[r,s]=(0,c.useState)([]),[t,u]=(0,c.useState)(null),[v,w]=(0,c.useState)([]),[x,y]=(0,c.useState)(!1),[z,A]=(0,c.useState)(!1),B=(0,c.useRef)(null),C=(0,c.useRef)(null),D=(0,c.useRef)(null),E=(0,c.useRef)(null),[F,G]=(0,c.useState)({x:0,y:0,width:0,height:0}),H=()=>{if(D.current){let a=D.current.getBoundingClientRect();G({x:a.left+a.width/2,y:a.top+a.height/2,width:a.width,height:a.height})}};(0,c.useEffect)(()=>(H(),window.addEventListener("resize",H),()=>window.removeEventListener("resize",H)),[]),(0,c.useEffect)(()=>{B.current?.scrollIntoView({behavior:"smooth"})},[r]);let I=async()=>{try{A(!0);let a=await m.get("/support/chats");console.log("Chats response:",a.data),a.data.data&&a.data.data.id?(u(a.data.data),await K(a.data.data.id)):await J()}catch(a){console.error("Error initializing chat:",a),await J()}finally{A(!1)}},J=async()=>{try{console.log("Starting new chat...");let a=await m.post("/support/chats",{});console.log("New chat response:",a.data),a.data.data&&u(a.data.data)}catch(a){console.error("Error starting new chat:",a)}},K=async a=>{try{if(console.log("Loading messages for conversation:",a),!a)return void console.error("No conversation ID provided");let b=await m.get(`/support/chats/${a}`);console.log("Messages response:",b.data),b.data.data&&s(b.data.data)}catch(a){console.error("Error loading messages:",a)}},L=async()=>{if((p.trim()||0!==v.length)&&t)try{y(!0);let a=new FormData;a.append("conversation_id",String(t.id)),p.trim()&&a.append("body",p),v.forEach(b=>{a.append("attachments[]",b)}),console.log("Sending message with data:",{conversation_id:t.id,body:p,attachments:v.length});let b=await m.post("/support/chats/messages",a,{headers:{"Content-Type":"multipart/form-data"}});console.log("Message sent successfully:",b.data),b.data.data&&(s(a=>[...a,b.data.data]),q(""),w([]))}catch(a){console.error("Error sending message:",a),a.response&&(console.error("Error response data:",a.response.data),console.error("Error response status:",a.response.status))}finally{y(!1)}},M=async()=>{H(),o(!0),t?await K(t.id):await I()};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(h.motion.div,{ref:D,onClick:M,className:"fixed bottom-6 right-6 w-16 h-16 rounded-full cursor-pointer bg-gradient-to-r from-[#2F537D] to-[#4A76A8] flex justify-center items-center text-white shadow-2xl z-[999]",whileHover:{scale:1.1,boxShadow:"0 10px 25px rgba(47, 83, 125, 0.4)"},whileTap:{scale:.9},initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:200,damping:15},children:[(0,b.jsx)(e,{className:"text-2xl"}),t?.unread_count&&t.unread_count>0?(0,b.jsx)(h.motion.div,{className:"absolute -top-1 -right-1 w-4 h-4 bg-red-500 rounded-full flex items-center justify-center text-xs",animate:{scale:[1,1.2,1]},transition:{repeat:1/0,duration:2},children:t.unread_count}):null]}),(0,b.jsx)(i.AnimatePresence,{children:n&&(0,b.jsx)(h.motion.div,{className:"fixed inset-0 bg-black/40 backdrop-blur-sm flex justify-center items-center z-[1000] p-4",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>o(!1),children:(0,b.jsxs)(h.motion.div,{className:"bg-white w-full max-w-md rounded-2xl shadow-2xl overflow-hidden flex flex-col h-[80vh] max-h-[600px]",initial:{scale:.1,opacity:0,x:F.x-window.innerWidth/2,y:F.y-window.innerHeight/2,width:F.width,height:F.height,borderRadius:"50%"},animate:{scale:1,opacity:1,x:0,y:0,width:"100%",height:"80vh",maxHeight:"600px",borderRadius:"1rem"},exit:{scale:.1,opacity:0,x:F.x-window.innerWidth/2,y:F.y-window.innerHeight/2,width:F.width,height:F.height,borderRadius:"50%",transition:{duration:.3}},transition:{type:"spring",stiffness:300,damping:25,duration:.5},onClick:a=>a.stopPropagation(),children:[(0,b.jsx)(h.motion.div,{className:"bg-gradient-to-r from-[#2F537D] to-[#4A76A8] p-4 text-white",initial:{opacity:0},animate:{opacity:1},transition:{delay:.2},children:(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)(h.motion.div,{className:"w-10 h-10 rounded-full bg-white/20 flex items-center justify-center",initial:{scale:0},animate:{scale:1},transition:{delay:.3,type:"spring"},children:(0,b.jsx)(e,{className:"text-xl"})}),(0,b.jsxs)(h.motion.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.4},children:[(0,b.jsx)("h2",{className:"text-lg font-semibold",children:t?.peer?.name||d("customerService")}),(0,b.jsx)("p",{className:"text-xs opacity-80",children:d(t?.peer?.role==="admin"?"supportManager":"weAreHereToHelp")})]})]}),(0,b.jsx)(h.motion.button,{onClick:()=>o(!1),className:"text-white hover:bg-white/20 p-1 rounded-full transition-colors",initial:{scale:0,rotate:-180},animate:{scale:1,rotate:0},transition:{delay:.5,type:"spring"},children:(0,b.jsx)(g.IoClose,{className:"text-2xl"})})]})}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto p-4 bg-gray-50",children:z?(0,b.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,b.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-[#2F537D]"})}):(0,b.jsxs)(h.motion.div,{className:"space-y-4",initial:{opacity:0},animate:{opacity:1},transition:{delay:.6},children:[0===r.length?(0,b.jsxs)("div",{className:"text-center text-gray-500 py-8",children:[(0,b.jsx)(e,{className:"text-4xl mx-auto mb-2 opacity-50"}),(0,b.jsx)("p",{children:d("startNewConversation")}),(0,b.jsx)("p",{className:"text-sm mt-2 text-gray-400",children:d("writeYourFirstMessage")})]}):r.map((a,c)=>(0,b.jsx)(h.motion.div,{className:`flex ${a.from_me?"justify-end":"justify-start"}`,initial:{opacity:0,y:20,scale:.8},animate:{opacity:1,y:0,scale:1},transition:{delay:.7+.1*c,type:"spring",stiffness:300},children:(0,b.jsxs)("div",{className:`max-w-[80%] rounded-2xl p-3 relative ${a.from_me?"bg-gradient-to-r from-[#2F537D] to-[#4A76A8] text-white rounded-br-none":"bg-white text-gray-800 shadow-sm rounded-bl-none border border-gray-100"}`,children:[a.attachments&&a.attachments.length>0?(0,b.jsxs)("div",{className:"space-y-2",children:[a.attachments.map((a,c)=>(0,b.jsx)("img",{src:a.url,alt:"attachment",className:"rounded-lg max-w-full h-auto max-h-48 object-cover"},c)),a.body&&(0,b.jsx)("p",{className:"text-sm mt-2",children:a.body})]}):(0,b.jsx)("p",{className:"text-sm",children:a.body}),(0,b.jsx)("span",{className:`text-xs mt-1 block ${a.from_me?"text-blue-100":"text-gray-500"}`,children:(a=>{try{return new Date(a).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch(a){return"الآن"}})(a.created_at)})]})},a.id)),(0,b.jsx)("div",{ref:B})]})}),(0,b.jsxs)(h.motion.div,{className:"border-t border-gray-200 p-4 bg-white",initial:{opacity:0,y:50},animate:{opacity:1,y:0},transition:{delay:.8},children:[v.length>0&&(0,b.jsx)("div",{className:"flex flex-wrap gap-2 mb-3",children:v.map((a,c)=>(0,b.jsx)("div",{className:"relative",children:(0,b.jsxs)("div",{className:"bg-gray-100 rounded-lg px-3 py-2 text-sm flex items-center gap-2",children:[(0,b.jsx)(f,{className:"text-gray-600"}),(0,b.jsx)("span",{className:"text-gray-700 max-w-[120px] truncate",children:a.name}),(0,b.jsx)("button",{onClick:()=>{w(a=>a.filter((a,b)=>b!==c))},className:"text-red-500 hover:text-red-700",children:(0,b.jsx)(g.IoClose,{className:"text-sm"})})]})},c))}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(h.motion.button,{onClick:()=>{E.current?.click()},className:"text-gray-500 hover:text-[#2F537D] p-2 rounded-lg hover:bg-gray-100 transition-all duration-200",whileHover:{scale:1.05},whileTap:{scale:.95},initial:{scale:0},animate:{scale:1},transition:{delay:.85,type:"spring"},children:(0,b.jsx)(f,{className:"text-xl"})}),(0,b.jsx)("input",{ref:C,type:"text",value:p,onChange:a=>q(a.target.value),onKeyPress:a=>{"Enter"!==a.key||a.shiftKey||(a.preventDefault(),L())},placeholder:d("typeYourMessage"),disabled:x,className:"flex-1 border border-gray-300 rounded-xl px-4 py-3 focus:outline-none focus:border-[#2F537D] focus:ring-2 focus:ring-[#2F537D]/20 transition-all text-right disabled:bg-gray-100"}),(0,b.jsx)(h.motion.button,{onClick:L,disabled:x||!p.trim()&&0===v.length||!t,className:"bg-gradient-to-r from-[#2F537D] to-[#4A76A8] text-white p-3 rounded-xl hover:shadow-lg disabled:opacity-50 disabled:cursor-not-allowed transition-all flex items-center justify-center",whileTap:{scale:.95},initial:{scale:0},animate:{scale:1},transition:{delay:.9,type:"spring"},children:x?(0,b.jsx)("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}):(0,b.jsx)(g.IoSend,{className:`text-lg transform ${a?"rotate-180":""}`})})]}),(0,b.jsx)("input",{type:"file",ref:E,onChange:a=>{if(a.target.files){let b=Array.from(a.target.files);w(a=>[...a,...b])}},className:"hidden",accept:"image/*,.pdf,.doc,.docx",multiple:!0}),(0,b.jsx)(h.motion.p,{className:"text-xs text-gray-500 text-center mt-2",initial:{opacity:0},animate:{opacity:1},transition:{delay:1},children:d("supportAvailability")})]})]})})})]})}},39432,a=>{"use strict";a.s(["useInView",()=>e],39432);var b=a.i(72131),c=a.i(54760);let d={some:0,all:1};function e(a,{root:f,margin:g,amount:h,once:i=!1,initial:j=!1}={}){let[k,l]=(0,b.useState)(j);return(0,b.useEffect)(()=>{if(!a.current||i&&k)return;let b={root:f&&f.current||void 0,margin:g,amount:h};return function(a,b,{root:e,margin:f,amount:g="some"}={}){let h=(0,c.resolveElements)(a),i=new WeakMap,j=new IntersectionObserver(a=>{a.forEach(a=>{let c=i.get(a.target);if(!!c!==a.isIntersecting)if(a.isIntersecting){let c=b(a.target,a);"function"==typeof c?i.set(a.target,c):j.unobserve(a.target)}else"function"==typeof c&&(c(a),i.delete(a.target))})},{root:e,rootMargin:f,threshold:"number"==typeof g?g:d[g]});return h.forEach(a=>j.observe(a)),()=>j.disconnect()}(a.current,()=>(l(!0),i?void 0:()=>l(!1)),b)},[f,a,g,i,h]),k}},33113,a=>{"use strict";a.s(["default",()=>f]);var b=a.i(87924),c=a.i(46271),d=a.i(39432),e=a.i(72131);function f({children:a,delay:f=0,direction:g="up",className:h=""}){let i=(0,e.useRef)(null),j=(0,d.useInView)(i,{once:!0,amount:.1}),k={up:{y:50,opacity:0},down:{y:-50,opacity:0},left:{x:50,opacity:0},right:{x:-50,opacity:0}};return(0,b.jsx)(c.motion.div,{ref:i,initial:k[g],animate:j?{x:0,y:0,opacity:1}:k[g],transition:{duration:.6,delay:.1*f,ease:[.16,1,.3,1]},className:h,children:a})}},79585,a=>{"use strict";a.s(["default",()=>m]);var b=a.i(87924),c=a.i(72131),d=a.i(71987),e=a.i(91858);a.i(9068);var f=a.i(54385),g=a.i(84850),h=a.i(31173),i=a.i(46271),j=a.i(39432),k=a.i(28337),l=a.i(9610);let m=()=>{let[a,m]=(0,c.useState)([]),[n,o]=(0,c.useState)(0),[p,q]=(0,c.useState)(1),r=(0,l.useTranslations)("Kapsam"),s=(0,c.useRef)(null),t=(0,c.useRef)(null),u=(0,j.useInView)(t,{once:!0,amount:.2});(0,c.useEffect)(()=>{(async()=>{try{let a=(0,k.createApiClient)(),b=await a.get("/membership-benefits",{params:{limit:10,page:1}});m(b.data.data||[])}catch(a){console.error("Error fetching membership benefits",a)}})()},[]);let v=()=>{window.innerWidth>=1536?q(5):window.innerWidth>=1280?q(4):window.innerWidth>=1024?q(3):window.innerWidth>=768?q(2):q(1)};(0,c.useEffect)(()=>(v(),window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)),[]);let w=Math.ceil(a.length/p),x={hidden:{},visible:{transition:{staggerChildren:.15}}},y={hidden:{y:50,opacity:0},visible:{y:0,opacity:1,transition:{duration:.6}}};return(0,b.jsxs)("section",{className:"w-full pt-12 px-8",ref:t,children:[(0,b.jsxs)(i.motion.h2,{variants:{hidden:{y:30,opacity:0},visible:{y:0,opacity:1,transition:{duration:.8}}},initial:"hidden",animate:u?"visible":"hidden",className:"text-2xl font-[400] text-center mb-10",children:[r("all"),(0,b.jsx)("span",{className:"block w-44 h-1 bg-[#336BCF] mx-auto mt-4 rounded-full"})]}),(0,b.jsxs)(i.motion.div,{variants:x,initial:"hidden",animate:u?"visible":"hidden",children:[(0,b.jsx)(e.Swiper,{modules:[f.Navigation,g.Autoplay],spaceBetween:20,slidesPerView:p,autoplay:{delay:4e3,disableOnInteraction:!1},onSwiper:a=>s.current=a,onSlideChange:a=>o(a.activeIndex),children:a.map(a=>(0,b.jsx)(e.SwiperSlide,{children:(0,b.jsxs)(i.motion.div,{variants:y,className:"rounded-2xl overflow-hidden relative h-72 sm:h-80",children:[(0,b.jsx)(d.default,{src:a.image,alt:a.title,fill:!0,className:"object-cover"}),(0,b.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-[#336BCF]/90 via-[#336BCF00]/40 to-transparent"}),(0,b.jsxs)("div",{className:"absolute bottom-4 right-4 left-4 text-white",children:[(0,b.jsx)("h3",{className:"text-lg md:text-xl font-semibold",children:a.title}),(0,b.jsx)("p",{className:"text-sm md:text-base opacity-90",children:a.description})]})]})},a.id))}),(0,b.jsxs)(i.motion.div,{variants:x,className:"mt-6 flex items-center justify-center gap-4",children:[(0,b.jsx)("button",{type:"button",onClick:()=>s.current?.slidePrev(),className:"w-8 h-8 flex items-center justify-center rounded-full",children:(0,b.jsx)(h.IoMdArrowForward,{size:18})}),(0,b.jsx)("div",{className:"flex items-center gap-2",children:Array.from({length:w}).map((a,c)=>(0,b.jsx)("button",{type:"button",onClick:()=>s.current?.slideTo(c*p),className:`h-2 rounded-full transition-all duration-300 ${c===Math.floor(n/p)?"bg-[#2F537D] w-6":"bg-gray-300 w-3"}`},c))}),(0,b.jsx)("button",{type:"button",onClick:()=>s.current?.slideNext(),className:"w-8 h-8 flex items-center justify-center rounded-full",children:(0,b.jsx)(h.IoMdArrowBack,{size:18})})]})]})]})}},66895,a=>{"use strict";a.s(["default",()=>f]);var b=a.i(87924),c=a.i(71987),d=a.i(32886),e=a.i(9610);let f=()=>{let a=(0,e.useTranslations)("DistinguishesUs"),f=(0,d.useLocale)();return(0,b.jsxs)("section",{className:"py-16",dir:"ar"===f?"rtl":"ltr",children:[(0,b.jsxs)("h2",{className:"text-center text-2xl md:text-3xl font-[500] mb-16",children:[a("title"),(0,b.jsx)("span",{className:"block w-14 h-[3px] bg-[#2f537d] mx-auto mt-3 rounded-full"})]}),(0,b.jsx)("div",{className:"container mx-auto px-4",children:(0,b.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-14 text-center",children:[(0,b.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,b.jsx)(c.default,{src:"/lottie/one.gif",alt:a("item1_title"),width:70,height:70,className:"animate-bounce"}),(0,b.jsx)("h3",{className:"text-lg font-bold",children:a("item1_title")}),(0,b.jsx)("p",{className:"text-sm text-gray-600 max-w-xs",children:a("item1_desc")})]}),(0,b.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,b.jsx)(c.default,{src:"/lottie/follow.gif",alt:a("item2_desc"),width:70,height:70,className:"animate-pulse"}),(0,b.jsx)("h3",{className:"text-xl font-bold",children:a("item2_title")}),(0,b.jsx)("p",{className:"text-sm text-gray-600",children:a("item2_desc")})]}),(0,b.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,b.jsx)(c.default,{src:"/lottie/scrolldown.webp",alt:a("item3_title"),width:70,height:70,className:"animate-bounce"}),(0,b.jsx)("h3",{className:"text-lg font-bold",children:a("item3_title")}),(0,b.jsx)("p",{className:"text-sm text-gray-600",children:a("item3_desc")})]})]})})]})}},56388,a=>{"use strict";a.s(["default",()=>i]);var b=a.i(87924),c=a.i(31626),d=a.i(72131),e=a.i(91858);a.i(9068);var f=a.i(84850),g=a.i(32886),h=a.i(9610);let i=()=>{let a=(0,h.useTranslations)("PartnersInSuccess"),i=(0,g.useLocale)(),[j,k]=(0,d.useState)([]),[l,m]=(0,d.useState)(!0),[n,o]=(0,d.useState)(null);return(0,d.useEffect)(()=>{(async()=>{try{let a=process.env.NEXT_PUBLIC_API_BASE_URL||"http://develop.alaola.net",b=await fetch(`${a}/api/client/v1/success-partners?limit=10&page=1`);if(!b.ok)throw Error("Failed to fetch partners");let c=await b.json();k(c.data)}catch(a){o(a instanceof Error?a.message:"An error occurred")}finally{m(!1)}})()},[]),(0,b.jsxs)("section",{dir:"ar"===i?"ltr":"rtl",className:"jsx-4964b5a1fdca97a8 py-12 bg-white overflow-hidden",children:[(0,b.jsxs)("div",{className:"jsx-4964b5a1fdca97a8 container mx-auto px-4",children:[(0,b.jsxs)("h2",{className:"jsx-4964b5a1fdca97a8 text-center text-2xl md:text-3xl font-[500] mb-4",children:[a("title"),(0,b.jsx)("span",{className:"jsx-4964b5a1fdca97a8 block w-24 h-[3px] bg-[#2f537d] mx-auto mt-3 rounded-full"})]}),(0,b.jsx)("p",{className:"jsx-4964b5a1fdca97a8 text-center text-sm md:text-base text-gray-600 mb-10 max-w-2xl mx-auto",children:a("description")}),l&&(0,b.jsx)("div",{className:"jsx-4964b5a1fdca97a8 flex justify-center items-center py-8",children:(0,b.jsx)("div",{className:"jsx-4964b5a1fdca97a8 animate-spin rounded-full h-12 w-12 border-b-2 border-[#2f537d]"})}),n&&(0,b.jsx)("div",{className:"jsx-4964b5a1fdca97a8 text-center text-red-500 py-8",children:a("error")||"Failed to load partners"}),!l&&!n&&j.length>0&&(0,b.jsx)(e.Swiper,{modules:[f.Autoplay],loop:!0,speed:4e3,autoplay:{delay:0,disableOnInteraction:!1},allowTouchMove:!1,spaceBetween:30,breakpoints:{0:{slidesPerView:2},640:{slidesPerView:3},768:{slidesPerView:4},1024:{slidesPerView:6}},className:"partners-marquee",children:j.concat(j).map((a,c)=>(0,b.jsx)(e.SwiperSlide,{children:(0,b.jsx)("div",{className:"jsx-4964b5a1fdca97a8 flex justify-center",children:(0,b.jsxs)("div",{className:"jsx-4964b5a1fdca97a8 partner-card relative overflow-hidden bg-white p-2 rounded-lg border border-gray-100 shadow-sm hover:shadow-lg transition-all duration-300",children:[(0,b.jsx)("img",{src:a.logo,alt:a.name,loading:"lazy",onError:a=>{a.target.src="/placeholder-logo.png"},className:"jsx-4964b5a1fdca97a8 h-12 w-24 object-contain mx-auto"}),(0,b.jsx)("p",{className:"jsx-4964b5a1fdca97a8 text-center text-xs text-gray-500 mt-1 truncate w-24",children:a.name}),(0,b.jsx)("span",{className:"jsx-4964b5a1fdca97a8 shine-effect"})]})})},`${a.id}-${c}`))})]}),(0,b.jsx)(c.default,{id:"4964b5a1fdca97a8",children:".partners-marquee .swiper-wrapper{transition-timing-function:linear!important}.partner-card{position:relative}.shine-effect{pointer-events:none;background:linear-gradient(120deg,#0000 0%,#ffffff73 50%,#0000 100%);width:120%;height:100%;animation:5s ease-in-out infinite shine;position:absolute;top:0;left:-150%;transform:skew(-20deg)}@keyframes shine{0%{left:-150%}65%{left:-150%}to{left:150%}}"})]})}},53245,a=>{"use strict";a.s(["default",()=>f]);var b=a.i(87924),c=a.i(72131);a.i(5434);var d=a.i(46964),e=a.i(9610);let f=()=>{let[a,f]=(0,c.useState)(!1),[g,h]=(0,c.useState)(0),i=(0,e.useTranslations)("metting"),{data:j,isLoading:k,isError:l}=(0,d.useGetMeetings)();if((0,c.useEffect)(()=>{},[]),!a)return null;let m=j?.data??[];if(k||l||0===m.length)return null;let n=m[g],o=(a=>{let b=a.youtube_url||a.video_url;if(!b)return"";if("youtube"===a.video_type)try{let a=b.match(/[?&]v=([^&#]+)/),c=b.match(/youtu\.be\/([^?&#]+)/),d=a&&a[1]||c&&c[1]||"";if(d)return`https://www.youtube.com/embed/${d}`}catch{}return b})(n);return(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-sm",children:(0,b.jsxs)("div",{className:"relative w-full max-w-4xl mx-4",children:[(0,b.jsx)("button",{type:"button",onClick:()=>{f(!1)},className:"absolute -top-8 left-0 rounded-full bg-white/90 text-black px-4 py-1 text-sm shadow-md",children:i("close")}),(0,b.jsx)("div",{className:"w-full aspect-video bg-black rounded-2xl overflow-hidden shadow-2xl border border-white/10",children:"youtube"===n.video_type?(0,b.jsx)("iframe",{src:o,title:n.title,className:"w-full h-full",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}):(0,b.jsx)("video",{src:o,controls:!0,className:"w-full h-full object-contain"})}),(0,b.jsxs)("div",{className:"mt-4 px-2 flex items-center justify-between gap-4 text-white",children:[(0,b.jsx)("button",{type:"button",onClick:()=>{h(a=>(a-1+m.length)%m.length)},className:"px-4 py-1 rounded-full bg-white/90 text-black text-sm hover:bg-white",children:i("previous")}),(0,b.jsxs)("div",{className:"flex-1 text-center",children:[(0,b.jsx)("h3",{className:"font-semibold mb-1 truncate",children:n.title}),(0,b.jsxs)("p",{className:"text-xs text-gray-300",children:[g+1," / ",m.length]})]}),(0,b.jsx)("button",{type:"button",onClick:()=>{h(a=>(a+1)%m.length)},className:"px-4 py-1 rounded-full bg-white/90 text-black text-sm hover:bg-white",children:i("next")})]})]})})}}];

//# sourceMappingURL=_1d56150e._.js.map