1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,26842,e=>{"use strict";var t=e.i(43476),a=e.i(71645),s=e.i(56420);let l=(0,s.default)("accessibility",[["circle",{cx:"16",cy:"4",r:"1",key:"1grugj"}],["path",{d:"m18 19 1-7-6 1",key:"r0i19z"}],["path",{d:"m5 8 3-3 5.5 3-2.36 3.5",key:"9ptxx2"}],["path",{d:"M4.24 14.5a5 5 0 0 0 6.88 6",key:"10kmtu"}],["path",{d:"M13.76 17.5a5 5 0 0 0-6.88-6",key:"2qq6rc"}]]),i=(0,s.default)("speech",[["path",{d:"M8.8 20v-4.1l1.9.2a2.3 2.3 0 0 0 2.164-2.1V8.3A5.37 5.37 0 0 0 2 8.25c0 2.8.656 3.054 1 4.55a5.77 5.77 0 0 1 .029 2.758L2 20",key:"11atix"}],["path",{d:"M19.8 17.8a7.5 7.5 0 0 0 .003-10.603",key:"yol142"}],["path",{d:"M17 15a3.5 3.5 0 0 0-.025-4.975",key:"ssbmkc"}]]),r=(0,s.default)("face-slightly-smiling",[["path",{d:"M15 10V9",key:"4dkmfx"}],["path",{d:"M16.472 15a6 6 0 01-8.943 0",key:"7qomzy"}],["path",{d:"M9 10V9",key:"1lazqi"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),n=(0,s.default)("person-standing",[["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["path",{d:"m9 20 3-6 3 6",key:"se2kox"}],["path",{d:"m6 8 6 2 6-2",key:"4o3us4"}],["path",{d:"M12 10v4",key:"1kjpxc"}]]);var o=e.i(63676);e.i(31972);var d=e.i(65387),c=e.i(57688),m=e.i(94220),x=e.i(75157),h=e.i(19455);function u({tool:e,className:s,variant:l="desktop"}){let[i,r]=(0,a.useState)(!1);return"mobile"===l?(0,t.jsxs)("button",{onClick:e.onClick,className:"flex items-center w-full gap-3 p-1 transition-colors rounded-lg group",children:[(0,t.jsx)("div",{className:"flex items-center justify-center text-mantis-500 group-hover:text-mantis-600",children:(0,t.jsx)(e.icon,{className:"w-6 h-6"})}),(0,t.jsxs)("div",{className:"text-start",children:[(0,t.jsx)("h4",{className:"text-xs font-medium group-hover:text-mantis-600",children:e.label}),(0,t.jsx)("p",{className:"text-[8px] text-gray-600",children:e.description})]})]}):(0,t.jsx)("div",{className:(0,x.cn)("fixed z-30 hidden md:flex",e.position,s),children:(0,t.jsxs)(h.Button,{variant:"default",onClick:e.onClick,className:(0,x.cn)("h-11 text-white transition-all duration-300 ease-in-out border rounded-lg bg-mantis-500 border-mantis-500 hover:bg-mantis-500 text-sm [&_svg]:pointer-pointer [&_svg]:size-6",i?"px-4":"w-11 h-11"),"aria-label":e.label,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:[(0,t.jsx)(e.icon,{className:"w-6 h-6"}),i&&(0,t.jsx)("span",{className:"whitespace-nowrap",children:e.label})]})})}var p=e.i(65160);e.s(["SocialSidebar",0,function({threshold:e=400,className:s}){let[h,g]=(0,a.useState)(!1),[b,f]=(0,a.useState)(!1),{isOpen:j,openModal:w,closeModal:v,modalContent:N}=(0,m.useAccessibilityModal)(),{data:y}=(0,d.useSocialMedias)(),A=[{id:"penilaian",icon:r,label:"Beri Penilaian",description:"Beri penilaian seberapa puas Anda dengan layanan kami.",position:"right-4 top-[40%] transform -translate-y-1/2",onClick:()=>w("penilaian")},{id:"aduan",icon:i,label:"Aduan Warga",description:"Layanan aduan dan Hotline Terintegrasi Kabupaten Ciamis.",position:"right-4 top-[48%] transform -translate-y-1/2",onClick:()=>w("aduanWarga")},{id:"akses-cepat",icon:n,label:"Akses Cepat",description:"Jelajahi konten atau fitur utama dengan lebih efisien dan cepat.",position:"right-4 top-[56%] transform -translate-y-1/2",onClick:()=>w("aksesCepat")}];return(0,a.useEffect)(()=>{let t=!1,a=()=>{t||(requestAnimationFrame(()=>{f(window.pageYOffset>e),t=!1}),t=!0)};return window.addEventListener("scroll",a,{passive:!0}),()=>window.removeEventListener("scroll",a)},[e]),(0,a.useEffect)(()=>{let e=e=>{h&&(e.target.closest("[data-accessibility-menu]")||g(!1))};return document.addEventListener("click",e),()=>document.removeEventListener("click",e)},[h]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"absolute z-30 flex-col hidden gap-1 transform -translate-y-1/2 left-3 top-[45%] lg:flex",children:y?.map((e,a)=>(0,t.jsx)("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center transition-all duration-200 w-11 h-11 group hover:scale-110","aria-label":`Kunjungi ${e.title}`,children:(0,t.jsx)(c.default,{src:e.image_url||"https://placehold.co/80X80",alt:e.title,width:40,height:40,className:"object-cover transition-all duration-200 rounded-lg w-9 h-9 grayscale group-hover:grayscale-0",priority:!0,onError:e=>{e.currentTarget.src="https://placehold.co/80X80"}})},a))}),A.map(e=>(0,t.jsx)(u,{tool:e,variant:"desktop"},e.id)),(0,t.jsx)("button",{onClick:()=>g(!h),className:(0,x.cn)("fixed z-50 flex items-center justify-center w-12 h-12 transition-all border rounded-lg text-primary-white lg:hidden right-6 bottom-[80px] border-mantis-500/50 bg-mantis-500 hover:bg-mantis-600 duration-300 ease-in-out",b?"opacity-100 translate-y-0":"opacity-0 translate-y-8 pointer-events-none"),"aria-label":"Menu Aksesibilitas","data-accessibility-menu":!0,children:(0,t.jsx)(l,{className:"w-5 h-5"})}),h&&(0,t.jsxs)("div",{className:"fixed inset-0 z-40 lg:hidden",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/20",onClick:()=>g(!1)}),(0,t.jsx)("div",{className:(0,x.cn)("absolute h-fit right-6 bottom-[
1138px] duration-300 overflow-hidden transition-transform transform shadow-xl bg-primary-white w-56 rounded-xl",h?"translate-x-0":"translate-x-full"),"data-accessibility-menu":!0,children:(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)("h3",{className:"font-medium text-gray-900",children:"Menu Aksesibilitas"}),(0,t.jsx)("button",{onClick:()=>g(!1),className:"p-1 rounded hover:bg-gray-100","aria-label":"Tutup menu",children:(0,t.jsx)(o.X,{className:"w-4 h-4"})})]}),(0,t.jsx)("div",{className:"space-y-3",children:A.map(e=>(0,t.jsx)(u,{tool:{...e,onClick:()=>{e.onClick?.(),g(!1)}},variant:"mobile"},e.id))})]})})]}),N&&(0,t.jsx)(p.AccessibilityModal,{isOpen:j,onClose:v,modalContent:N,className:`max-w-[85dvw] md:max-w-[50dvw] ${"Beri Penilaian"===N.title?"max-w-[90dvh] max-h-[90dvh] p-0":""}`})]})}],26842)},30518,e=>{"use strict";var t=e.i(43476),a=e.i(71645),s=e.i(67927),l=e.i(49882),i=e.i(41120),r=e.i(32781),n=e.i(74544),o=e.i(20865),d=e.i(19455);let c=(0,a.createContext)(void 0),m=()=>{let e=(0,a.useContext)(c);if(!e)throw Error("useAgenda must be used within AgendaProvider");return e},x=function({countdown:e}){let[s,l]=(0,a.useState)(e);return((0,a.useEffect)(()=>{if(!e)return;let t=setInterval(()=>{l(e=>{if(!e)return;let{days:t,hours:a,minutes:s,seconds:l}=e;return l>0?l--:s>0?(s--,l=59):a>0?(a--,s=59,l=59):t>0&&(t--,a=23,s=59,l=59),{days:t,hours:a,minutes:s,seconds:l}})},1e3);return()=>clearInterval(t)},[e]),s)?(0,t.jsxs)("div",{className:"flex flex-col items-end self-end justify-end w-full h-full",children:[(0,t.jsx)("div",{className:"mb-3 text-sm text-primary-white font-roboto",children:"Agenda akan dimulai:"}),(0,t.jsx)("div",{className:"grid grid-cols-4 gap-2 p-3 border rounded-lg",children:[{label:"Hari",value:s.days.toString().padStart(2,"0")},{label:"Jam",value:s.hours.toString().padStart(2,"0")},{label:"Menit",value:s.minutes.toString().padStart(2,"0")},{label:"Detik",value:s.seconds.toString().padStart(2,"0")}].map((e,a)=>(0,t.jsxs)("div",{className:"text-left",children:[(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsx)("div",{className:"py-1 px-1.5 text-sm font-normal text-center text-primary-black uppercase bg-primary-white rounded-lg font-lato",children:e.value}),(0,t.jsx)("p",{className:"text-sm font-normal uppercase text-primary-white font-lato",children:a>=3?"":":"})]}),(0,t.jsx)("div",{className:"mt-1 text-xs text-primary-white font-roboto",children:e.label})]},e.label))})]}):null};var h=e.i(87486),u=e.i(82022),p=e.i(22016);let g=function(){let{selectedEvent:e}=m();return e?(0,t.jsxs)("div",{className:"relative overflow-hidden transition-all duration-500 bg-white rounded-lg h-80 lg:h-[530px]",children:[(0,t.jsx)("img",{src:e.image||"/placeholder.svg",alt:e.title,className:"object-cover w-full h-full transition-opacity duration-500"}),(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-primary-black/85 via-primary-black/60 to-primary-black/30"}),(0,t.jsx)("div",{className:"absolute bottom-0 w-full",children:(0,t.jsxs)("div",{className:"grid w-full grid-cols-12 gap-6 p-6",children:[(0,t.jsxs)("div",{className:"w-full col-span-12 text-primary-white lg:col-span-9",children:[(0,t.jsx)("h3",{className:"mb-1 text-base font-semibold leading-tight lg:mb-4 lg:text-4xl font-roboto",children:e.title}),(0,t.jsxs)("div",{className:"flex items-center text-[10px] gap-2 mb-2 lg:mb-4 lg:text-xs opacity-90 text-primary-white/80",children:[(0,t.jsx)("span",{children:e.time}),(0,t.jsx)("span",{children:"|"}),(0,t.jsx)("span",{children:e.date})]}),(0,t.jsx)("p",{className:"mb-2 text-xs leading-relaxed text-primary-white lg:text-sm lg:mb-4 line-clamp-1 lg:line-clamp-2 font-roboto",children:e.description}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mb-2",children:e.tags.split(", ").map(e=>(0,t.jsx)(h.Badge,{variant:"default",className:"px-2 py-2.5 rounded-lg text-[8px] lg:text-[10px] font-normal bg-lilac-bush-100/20 text-primary-white hover:bg-lilac-bush-100/30 backdrop-blur-sm",children:e.trim()},e))}),e.socialLink&&(0,t.jsx)(p.default,{href:e.socialLink||"",children:(0,t.jsxs)(d.Button,{variant:"outline",size:"sm",className:"mt-2 text-xs bg-transparent md:text-sm text-primary-white w-fit hover:text-primary-white font-roboto hover:bg-transparent hover:underline",children:["Link Event ",(0,t.jsx)(u.ExternalLink,{})]})})]}),e.countdown&&(0,t.jsx)("div",{className:"hidden w-full col-span-3 lg:block",children:(0,t.jsx)(x,{countdown:e.countdown})})]})})]}):(0,t.jsx)("div",{className:"relative flex items-center justify-center overflow-hidden bg-gray-100 rounded-lg h-80 lg:h-96",children:(0,t.jsxs)("div",{className:"text-center text-gray-500",children:[(0,t.jsx)(l.Calendar,{className:"w-16 h-16 mx-auto mb-4 opacity-50"}),(0,t.jsx)("h3",{className:"mb-2 text-xl font-semibold",children:"Tidak ada agenda"}
1),(0,t.jsx)("p",{children:"Belum ada agenda untuk saat ini"})]})})};var b=e.i(59684);let f=function({event:e,isSelected:a}){let{setSelectedEvent:s}=m(),l=()=>{s(e)};return(0,t.jsxs)("div",{onClick:l,className:`flex items-start lg:items-center gap-4 p-3 rounded-lg cursor-pointer transition-all duration-300 ease-in-out ${a?"bg-lilac-bush-950/10 text-lilac-bush-950 scale-100":"bg-white hover:bg-lilac-bush-900/10 border border-lilac-bush-900/10 scale-95"}`,role:"button",tabIndex:0,"aria-label":`Select ${e.title}`,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),l())},children:[(0,t.jsx)("img",{src:e.image||"/placeholder.svg",alt:e.title,className:"flex-shrink-0 object-cover rounded size-14"}),(0,t.jsxs)("div",{className:"flex flex-col items-start justify-center w-full gap-4 lg:flex-row lg:justify-between lg:items-center",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h4",{className:"font-semibold mb-1 font-roboto text-xs lg:text-sm text-lilac-bush-950",children:e.title}),(0,t.jsxs)("div",{className:`text-[10px] lg:text-xs font-lato ${a?"text-lilac-bush-950":"text-lilac-bush-950/50"}`,children:[e.time," | ",e.date]}),(0,t.jsx)("div",{className:`text-[10px] lg:text-xs mt-0 lg:mt-1 ${a?"text-lilac-bush-950":"text-lilac-bush-950/50"}`,children:e.tags.split(",").join(" | ")})]}),a&&e.date&&(new Date(e.date).toDateString()===new Date().toDateString()?(0,t.jsx)(p.default,{href:e.socialLink||"",target:"_blank",rel:"noopener noreferrer",children:(0,t.jsx)(d.Button,{variant:a?"secondary":"outline",size:"sm",className:`text-xs shadow-none ${a?"bg-lilac-bush-900 text-primary-white border-lilac-bush-100 hover:bg-lilac-bush-950 hover:text-primary-white":"cursor-not-allowed"}`,children:"Sedang Berlangsung"})}):e.date<new Date().toISOString()?(0,t.jsx)(d.Button,{variant:a?"secondary":"outline",size:"sm",className:`text-xs shadow-none ${a?"bg-gray-500 text-primary-white border-gray-100 hover:bg-gray-500 hover:text-primary-white":"cursor-not-allowed"}`,title:"Sudah Selesai",children:"Sudah Selesai"}):(0,t.jsx)(d.Button,{variant:a?"secondary":"outline",size:"sm",className:`text-xs shadow-none ${a?"bg-lilac-bush-900 text-primary-white border-lilac-bush-100 hover:bg-lilac-bush-950 hover:text-primary-white":"cursor-not-allowed"}`,children:"Belum Dimulai"}))]})]})};e.i(24016),e.i(37351);var j=e.i(53358),w=e.i(28116);let v=(0,j.createPaginatedFetcher)("/events"),N=((0,j.createCollectionFetcher)("/events"),e=>(0,w.parseJsonField)(e,null)),y=e=>e.date||N(e.event_period)?.start||null,A=e=>{if(!e)return null;let t=e.match(/^(\d{4}-\d{2}-\d{2})/);if(t)return t[1];let a=new Date(e);if(Number.isNaN(a.getTime()))return null;let s=a.getFullYear(),l=`${a.getMonth()+1}`.padStart(2,"0"),i=`${a.getDate()}`.padStart(2,"0");return`${s}-${l}-${i}`};var k=e.i(66027),C=e.i(1851),S=e.i(61613),B=e.i(68482);let E=(e,t)=>(0,k.useQuery)({queryKey:S.queryKeys.events.list(e),queryFn:()=>{let t;return t=e,v({per_page:j.MAX_PER_PAGE,...t})},staleTime:B.CACHE_TIER.list.staleTime,gcTime:B.CACHE_TIER.list.gcTime,refetchOnWindowFocus:!1,retry:B.v1Retry,...t});var D=e.i(29592),M=e.i(42956),K=e.i(75157),R=e.i(24071);let $=function(){let{selectedDate:e,setSelectedDate:l,setIsDateLoading:i}=m(),[r]=(0,a.useState)(new Date),{data:n,isLoading:o}=E(),d=(0,a.useMemo)(()=>{if(!n?.data)return{};let e={};return n.data.forEach(t=>{let a=A(y(t));a&&(e[a]||(e[a]=[]),e[a].push(t))}),e},[n]),c=new Date,x=r.getFullYear(),h=r.getMonth(),u=c.getDate(),p=c.getMonth(),g=c.getFullYear(),b=new Date(x,h+1,0).getDate(),[f,j]=(0,a.useState)(()=>{let e=new Date(c),t=c.getDate();return t<=3?e.setDate(1):t>=b-2?e.setDate(b-4):e.setDate(t-2),e}),w=["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],v=["Min","Sen","Sel","Rab","Kam","Jum","Sab"],{dates:N,dayLabels:k}=(()=>{let e=[],t=[];for(let a=0;a<5;a++){let s=new Date(f);s.setDate(f.getDate()+a),s.getMonth()===h&&s.getFullYear()===x&&(e.push(s.getDate()),t.push(v[s.getDay()]))}return{dates:e,dayLabels:t}})(),C=f.getDate()>1,S=()=>{let e=new Date(f);return e.setDate(f.getDate()+4),e.getDate()<b&&e.getMonth()===h},B=e=>{let t=`${x}-${(h+1).toString().padStart(2,"0")}-${e.toString().padStart(2,"0")}`;return d[t]&&d[t].length>0},D=e=>e===u&&h===p&&x===g,M=t=>e.getDate()===t&&e.getMonth()===h&&e.getFullYear()===x;return o?(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)("div",{className:"w-full py-2 mb-4 text-center rounded-lg bg-lilac-bush-50",children:(0,t.jsxs)("h4",{className:"text-xs font-semibold text-lilac-bush-950 font-roboto",children:[w[h]," ",x]})}),(0,t.jsxs)("div",{className:"flex items-center justify-between px-1",children:[(0,t.jsx)("div",{className:"w-4 h-4 bg-gray-200 rounded animate-pulse flex-shrink-0"}),(0,t.jsx)("div",{className:"flex justify-center gap-1 flex-1 overflow-hidden",children:Array.from({length:5}).map((e,a)=>(0,t.jsxs)("div",{className:"text-center flex-shrink-0",children:[(0,t.jsx)("div",{className:"w-6 h-3 mb-1 bg-gray-200 rounded animate-pulse mx-auto"}),(0,t.jsx)("div",{className:"w-9 h-9 bg-gray-200 rounded-lg animate-pulse"})]},a))}),(0,t.jsx)("div",{className:"w-4 h-4 bg-gray-200 rounded animate-pulse flex-shrink-0"})]})]}):(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)("div",{className:"w-full py-2 mb-4 text-center rounded-lg bg-lilac-bush-50",children:(0,t.jsxs)("h4",{className:"text-xs font-semibold text-lilac-bush-950 font-roboto",children:[w[h]," ",x]})}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2 px-1",children:[(0,t.jsx)("button",{onClick:()=>{let e=new Date(f);e.setDate(f.getDate()-5),e.getDate()>=1&&e.getMonth()===h?j(e):j(new Date(x,h,1))},disabled:!C,className:`p-1 rounded transition-colors flex-shrink-0 ${C?"hover:bg-lilac-bush-50 text-lilac-bush-950":"text-gray-300 cursor-not-allowed"}`,"aria-label":"Previous dates",children:(0,t.jsx)(R.ChevronLeft,{className:"w-4 h-4"})}),(0,t.jsx)("div",{className:"flex justify-center gap-1 flex-1 min-w-0 overflow-hidden",children:N.map((e,a)=>{let s,r=(s=`${x}-${(h+1).toString().padStart(2,"0")}-${e.toString().padStart(2,"0")}`,d[s]?.length||0);return(0,t.jsxs)("div",{className:"text-center flex-shrink-0 min-w-0",children:[(0,t.jsx)("div",{className:"mb-1 text-xs text-gray-500 truncate",children:k[a]}),(0,t.jsxs)("button",{onClick:()=>{let t;return t=new Date(x,h,e,12,0,0,0),void(i(!0),setTimeout(()=>{l(t),i(!1)},300))},className:`w-8 h-8 sm:w-9 sm:h-9 rounded-lg text-xs sm:text-sm font-medium font-roboto transition-colors relative flex items-center justify-center ${M(e)?"bg-mantis-600 text-primary-white":D(e)?"bg-blue-100 text-blue-800 hover:bg-blue-200":B(e)?"bg-mantis-100 text-mantis-700 hover:bg-mantis-200":"hover:bg-gray-100 text-gray-700"}`,"aria-label":`Select ${e} ${w[h]} ${x}${B(e)?` (${r} event${r>1?"s":""})`:""}`,children:[e,B(e)&&!M(e)&&(0,t.jsxs)("div",{className:"absolute bottom-0.5 left-1/2 transform -translate-x-1/2",children:[(0,t.jsx)("div",{className:"w-1 h-1 bg-mantis-600 rounded-full"}),r>1&&(0,t.jsx)("div",{className:"flex gap-0.5 mt-0.5 justify-center",children:Array.from({length:Math.min(r-1,2)}).map((e,a)=>(0,t.jsx)("div",{className:"w-0.5 h-0.5 bg-mantis-600 rounded-full"},a))})]}),D(e)&&!M(e)&&(0,t.jsx)("div",{className:"absolute top-0.5 right-0.5 w-1.5 h-1.5 bg-blue-600 rounded-full"})]})]},`${e}-${a}`)})}),(0,t.jsx)("button",{onClick:()=>{let e=new Date(f);e.setDate(f.getDate()+5);let t=new Date(e);t.setDate(e.getDate()+4),t.getDate()<=b&&t.getMonth()===h?j(e):j(new Date(x,h,b-4))},disabled:!S(),className:`p-1 rounded transition-colors flex-shrink-0 ${S()?"hover:bg-lilac-bush-50 text-lilac-bush-950":"text-gray-300 cursor-not-allowed"}`,"aria-label":"Next dates",children:(0,t.jsx)(s.ChevronRight,{className:"w-4 h-4"})})]})]})};function L(){return(0,t.jsxs)("div",{className:"p-4 border border-gray-200 rounded-lg animate-pulse",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsx)("div",{className:"w-20 h-4 bg-gray-200 rounded"}),(0,t.jsx)("div",{className:"w-4 h-4 bg-gray-200 rounded"})]}),(0,t.jsx)("div",{className:"w-full h-5 mb-2 bg-gray-200 rounded"}),(0,t.jsx)("div",{className:"w-24 h-4 mb-3 bg-gray-200 rounded"}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{className:"w-32 h-3 bg-gray-200 rounded"}),(0,t.jsx)("div",{className:"w-20 h-3 bg-gray-200 rounded"})]})]})}function T(){return(0,t.jsx)("div",{className:"space-y-2",children:Array.from({length:4}).map((e,a)=>(0,t.jsxs)("div",{className:"flex items-start gap-4 p-3 bg-gray-100 rounded-lg animate-pulse",children:[(0,t.jsx)("div",{className:"flex-shrink-0 bg-gray-200 rounded size-14"}),(0,t.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,t.jsx)("div",{className:"w-3/4 h-4 bg-gray-200 rounded"}),(0,t.jsx)("div",{className:"w-1/2 h-3 bg-gray-200 rounded"}),(0,t.jsx)("div",{className:"w-2/3 h-3 bg-gray-200 rounded"})]}),(0,t.jsx)("div",{className:"w-20 h-8 bg-gray-200 rounded"})]},a))})}function P({event:e}){let a=y(e),l=a?(0,K.getEventStatus)(a,e.open):null;return(0,t.jsxs)("div",{className:"p-4 transition-all duration-300 border rounded-lg border-mantis-100 hover:border-mantis-200 bg-mantis-50 group hover:cursor-pointer hover:shadow-sm",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-3",children:[(0,t.jsx)(h.Badge,{variant:"secondary",className:"text-[10px] font-normal text-mantis-700 bg-mantis-100",children:e.type_agenda}),(0,t.jsx)(s.ChevronRight,{className:"w-4 h-4 transition-transform text-mantis-600 group-hover:translate-x-1"})]}),(0,t.jsx)("h4",{className:"mb-3 text-sm font-semibold leading-tight text-mantis-800 font-roboto group-hover:text-mantis-900 line-clamp-2",children:e.title}),(0,t.jsxs)("div",{className:"mb-3 space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-mantis-600",children:[(0,t.jsx)(n.Clock,{className:"w-3 h-3"}),(0,t.jsx)("span",{children:(0,K.formatEventTime)(e.open,e.close)})]}),e.location&&(0,t.jsxs)("div",{className:"flex items-start gap-2 text-[11px] text-mantis-600",children:[(0,t.jsx)(o.MapPin,{className:"w-3 h-3 mt-0.5 flex-shrink-0"}),(0,t.jsx)("span",{className:"line-clamp-2",children:e.location})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-[10px] text-mantis-600",children:a?(0,K.formatEventDate)(a):""}),l&&(0,t.jsx)(h.Badge,{variant:"outline",className:`text-[10px] font-normal px-2 py-1 ${l.className} border-none`,children:l.label})]}),e.link_event&&(0,t.jsx)("div",{className:"pt-3 mt-3 border-t border-mantis-200",children:(0,t.jsx)(p.default,{href:e.link_event,target:"_blank",rel:"noopener noreferrer",className:"text-[11px] text-mantis-700 hover:text-mantis-900 hover:underline",children:"Lihat Detail Event â"})})]})}e.s(["AgendaSection",0,function(){let[e,s]=(0,a.useState)(new Date),[n,o]=(0,a.useState)(null),[m,x]=(0,a.useState)(!1),{data:h,isLoading:u,isError:p,error:j,refetch:w}=E(),{data:v,isLoading:k,isError:S,refetch:B}=(e=>{let{data:t,...s}=E(),l=(0,a.useMemo)(()=>A((0,C.format)(e,"yyyy-MM-dd")),[e]);return{data:(0,a.useMemo)(()=>{let e;return l?(e=t?.data??[],e.filter(e=>A(y(e))===l)):[]},[t,l]),dateKey:l,...s}})(e),R=(0,a.useMemo)(()=>h?.data&&0!==h.data.length?(h.data||[]).map(e=>{let t=y(e)??"",a=N(e.event_period)?.start||t;
1return{id:e.id.toString(),title:e.title,description:"",date:t,date_start:a,time:(0,K.formatEventTime)(e.open,e.close),location:e.location??"",category:e.type_agenda??"",image:e.image_url||"/placeholder.svg",tags:(e.tags??[]).map(e=>e.title).join(", "),socialLink:e.link_event||e.website,countdown:(0,K.calculateCountdown)(a,e.open)??void 0}}):[],[h]);return((0,a.useEffect)(()=>{u||!(R.length>0)||n||o(R[0])},[u,R,n]),(0,a.useEffect)(()=>{if(k)x(!0);else{let e=setTimeout(()=>x(!1),300);return()=>clearTimeout(e)}},[k]),u)?(0,t.jsxs)("section",{className:"relative px-4 py-6 md:py-12 md:px-6 lg:px-32",children:[(0,t.jsx)("div",{className:"flex flex-col items-start justify-start",children:(0,t.jsx)("h1",{className:"mb-4 text-2xl font-semibold lg:text-4xl lg:mb-0 font-roboto text-lilac-bush-950",children:"Calendar of Events"})}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 mt-6 lg:grid-cols-12",children:[(0,t.jsxs)("div",{className:"lg:col-span-9",children:[(0,t.jsx)("div",{className:"relative flex items-center justify-center overflow-hidden bg-gray-100 rounded-lg h-80 lg:h-96 animate-pulse",children:(0,t.jsx)(r.Loa
1der2,{className:"w-16 h-16 text-gray-400 animate-spin"})}),(0,t.jsx)(b.ScrollArea,{className:"relative pt-3 h-80",children:(0,t.jsx)(T,{})})]}),(0,t.jsx)("div",{className:"h-full lg:col-span-3",children:(0,t.jsxs)("div",{className:"h-full p-4 bg-white border border-gray-200 rounded-lg md:p-6",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)("div",{className:"w-2/3 h-6 mb-2 bg-gray-200 rounded animate-pulse"}),(0,t.jsx)("div",{className:"w-full h-4 bg-gray-200 rounded animate-pulse"}),(0,t.jsx)("div",{className:"w-5/6 h-4 bg-gray-200 rounded animate-pulse"})]}),(0,t.jsx)("div",{className:"w-full h-64 bg-gray-100 rounded animate-pulse"}),(0,t.jsx)("div",{className:"w-full h-0.5 mt-4 border-t border-gray-100"}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(L,{})})]})})]})]}):p?(0,t.jsxs)("section",{className:"relative px-4 py-6 md:py-12 md:px-6 lg:px-32",children:[(0,t.jsx)("div",{className:"flex flex-col items-start justify-start mb-6",children:(0,t.jsx)("h1",{className:"text-2xl font-semibold md:text-4xl text-nowrap text-lilac-bush-950",children:"Calendar of Events"})}),(0,t.jsxs)(D.Alert,{variant:"destructive",children:[(0,t.jsx)(i.RefreshCw,{className:"w-4 h-4"}),(0,t.jsxs)(D.AlertDescription,{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:["Gagal memuat data agenda:"," ",j?.message||"Terjadi kesalahan tidak dikenal."]}),(0,t.jsx)(d.Button,{variant:"outline",size:"sm",onClick:()=>w(),children:"Coba Lagi"})]})]})]}):0===R.length?(0,t.jsxs)("section",{className:"relative px-4 py-6 md:py-12 md:px-6 lg:px-32",children:[(0,t.jsx)("div",{className:"flex flex-col items-start justify-start mb-6",children:(0,t.jsx)("h1",{className:"text-2xl font-semibold md:text-4xl text-nowrap text-lilac-bush-950",children:"Calendar of Events"})}),(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,t.jsx)(l.Calendar,{className:"w-16 h-16 mx-auto mb-4 text-gray-400 opacity-50"}),(0,t.jsx)("h3",{className:"mb-2 text-xl font-semibold text-gray-700",children:"Tidak ada agenda tersedia"}),(0,t.jsx)("p",{className:"text-gray-500",children:"Saat ini tidak ada agenda yang dapat ditampilkan."})]})]}):(0,t.jsx)(c.Provider,{value:{selectedDate:e,setSelectedDate:s,selectedEvent:n,setSelectedEvent:o,isDateLoading:m,setIsDateLoading:x},children:(0,t.jsxs)("section",{className:"relative px-4 py-6 md:py-12 md:px-6 lg:px-32",children:[(0,t.jsx)("div",{className:"flex flex-col items-start justify-start",children:(0,t.jsx)("h1",{className:"text-2xl font-semibold lg:text-4xl font-roboto text-lilac-bush-950",children:"Calendar of Events"})}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 mt-4 md:mt-6 lg:grid-cols-12",children:[(0,t.jsxs)("div",{className:"lg:col-span-9",children:[(0,t.jsx)(g,{}),(0,t.jsxs)(b.ScrollArea,{className:"relative pt-3 h-80",children:[(0,t.jsx)("div",{className:"pb-10 space-y-2",children:R.map(e=>(0,t.jsx)(f,{event:e,isSelected:n?.id===e.id},e.id))}),(0,t.jsx)("div",{className:"absolute bottom-0 left-0 self-end w-full h-16 bg-gradient-to-t from-white via-white/50 to-white/0"})]})]}),(0,t.jsx)("div",{className:"h-full lg:col-span-3",children:(0,t.jsxs)("div",{className:"h-full p-4 overflow-hidden bg-white border border-gray-200 rounded-lg md:p-6",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)("h3",{className:"mb-2 text-lg font-bold text-lilac-bush-950 font-roboto",children:"Calendar of Events"}),(0,t.jsx)("p",{className:"text-xs text-lilac-bush-950/50 font-lato",children:"Dapatkan informasi terkait semua kegiatan yang dilakukan di Kabupaten Ciamis."})]}),(0,t.jsx)($,{}),(0,t.jsx)("div",{className:"w-full h-0.5 mt-4 border-t border-gray-100"}),(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsxs)("h4",{className:"text-sm font-semibold break-words text-lilac-bush-950",children:["Agenda ",(e=>{try{return(0,C.format)(e,"dd MMMM yyyy",{locale:M.id})}catch(t){return console.error("Date formatting error:",t),e.toLocaleDateString("id-ID",{day:"2-digit",month:"long",year:"numeric"})}})(e)]}),S&&(0,t.jsx)(d.Button,{variant:"ghost",size:"sm",onClick:()=>B(),className:"flex-shrink-0 h-6 px-2 text-xs",children:(0,t.jsx)(i.RefreshCw,{className:"w-3 h-3"})})]}),m?(0,t.jsx)(L,{}):S?(0,t.jsxs)("div",{className:"p-4 text-center border border-red-200 rounded-lg bg-red-50",children:[(0,t.jsx)("p",{className:"mb-2 text-sm text-red-600",children:"Gagal memuat agenda"}),(0,t.jsx)(d.Button,{variant:"outline",size:"sm",onClick:()=>B(),className:"text-xs",children:"Coba Lagi"})]}):v&&v.length>0?(0,t.jsx)("div",{className:"space-y-3 overflow-y-auto max-h-96",children:v.map(e=>(0,t.jsx)(P,{event:e},e.id))}):(0,t.jsxs)("div",{className:"p-6 text-center",children:[(0,t.jsx)(l.Calendar,{className:"w-12 h-12 mx-auto mb-3 text-gray-300"}),(0,t.jsx)("h4",{className:"mb-2 text-sm font-semibold text-gray-900",children:"Tidak ada agenda"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"Belum ada agenda untu
1k tanggal ini"})]})]})]})})]})]})})}],30518)},15677,e=>{"use strict";var t=e.i(43476),a=e.i(62368),s=e.i(56420);let l=(0,s.default)("smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]),i=(0,s.default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);var r=e.i(82303),n=e.i(57688);e.s(["default",0,function(){return(0,t.jsx)("section",{className:"relative px-4 py-10 sm:px-6 md:py-16 lg:px-32 overflow-hidden",children:(0,t.jsxs)("div",{className:"relative bg-gradient-to-br from-lilac-bush-900 via-lilac-bush-950 to-lilac-bush-950 rounded-3xl overflow-hidden shadow-2xl",children:[(0,t.jsx)("div",{className:"absolute top-0 right-0 w-72 h-72 bg-lilac-bush-700/20 rounded-full blur-3xl -translate-y-1/2 translate-x-1/3 z-50"}),(0,t.jsx)("div",{className:"absolute bottom-0 left-0 w-56 h-56 bg-mantis-500/10 rounded-full blur-3xl translate-y-1/2 -translate-x-1/3 z-50"}),(0,t.jsx)("div",{className:"absolute top-12 left-12 w-3 h-3 bg-mantis-400 rounded-full opacity-60 z-50"}),(0,t.jsx)("div",{className:"absolute top-24 right-32 w-2 h-2 bg-lilac-bush-300 rounded-full opacity-40 z-50"}),(0,t.jsx)("div",{className:"absolute inset-0 opacity-[0.03]",style:{backgroundImage:"radial-gradient(circle, white 1px, transparent 1px)",backgroundSize:"24px 24px"}}),(0,t.jsxs)("div",{className:"relative z-10 grid grid-cols-1 md:grid-cols-2 gap-8 md:gap-12 items-center p-6 sm:p-8 lg:p-12",children:[(0,t.jsxs)("div",{className:"order-2 md:order-1 text-center md:text-left space-y-6",children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 px-4 py-1.5 bg-white/10 backdrop-blur-sm rounded-full border border-white/10",children:[(0,t.jsx)(l,{className:"w-3.5 h-3.5 text-mantis-400"}),(0,t.jsx)("span",{className:"text-xs font-medium text-primary-white/90 font-poppins",children:"Aplikasi Resmi Pemkab Ciamis"})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("h2",{className:"text-2xl sm:text-3xl lg:text-4xl font-bold text-primary-white leading-tight font-poppins",children:["Warga Ciamis, Sudah Punya"," ",(0,t.jsx)("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-mantis-300 to-mantis-400",children:"Helo Ciamis?"})]}),(0,t.jsx)("p",{className:"text-sm sm:text-base text-primary-white/70 leading-relaxed max-w-lg mx-auto md:mx-0 font-lato",children:"Download dan rasakan kemudahan mengakses informasi publik, layanan pemerintah, berita terkini, dan agenda kegiatan Kabupaten Ciamis dalam satu genggaman."})]}),(0,t.jsxs)("div",{className:"flex flex-wrap justify-center md:justify-start gap-4 text-primary-white/80",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-8 h-8 rounded-lg bg-white/10",children:(0,t.jsx)(r.Users,{className:"w-4 h-4 text-mantis-400"})}),(0,t.jsx)("span",{className:"text-xs font-medium font-lato",children:"Gratis untuk Semua"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-8 h-8 rounded-lg bg-white/10",children:(0,t.jsx)(i,{className:"w-4 h-4 text-mantis-400"})}),(0,t.jsx)("span",{className:"text-xs font-medium font-lato",children:"Mudah Digunakan"})]})]}),(0,t.jsx)("div",{className:"flex flex-col sm:flex-row items-center justify-center md:justify-start gap-3 pt-2",children:(0,t.jsxs)("a",{href:"https://play.google.com/store/apps/details?id=com.helotampilbaru.app&pcampaignid=web_share",target:"_blank",rel:"noopener noreferrer",className:"group flex items-center gap-3 bg-mantis-500 hover:bg-mantis-600 text-primary-white font-semibold py-3 px-6 rounded-xl transition-all duration-300 shadow-lg shadow-mantis-500/25 hover:shadow-mantis-500/40 hover:-translate-y-0.5 w-full sm:w-auto justify-center",children:[(0,t.jsx)(a.Download,{className:"w-5 h-5 transition-transform group-hover:-translate-y-0.5"}),(0,t.jsxs)("div",{className:"text-left",children:[(0,t.jsx)("p",{className:"text-[10px] font-normal opacity-80 leading-none",children:"Download di"}),(0,t.jsx)("p",{className:"text-sm font-bold leading-tight font-poppins",children:"Google Play"})]})]})})]}),(0,t.jsxs)("div",{className:"order-1 md:order-2 flex justify-center relative",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-lilac-bush-600/30 via-trans
1parent to-transparent rounded-2xl blur-2xl scale-90"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"absolute -inset-4 border-2 border-dashed border-white/10 rounded-3xl"}),(0,t.jsx)("div",{className:"relative bg-gradient-to-b from-white/10 to-white/5 p-2 rounded-2xl backdrop-blur-sm border border-white/10 shadow-2xl",children:(0,t.jsx)(n.default,{src:"/images/CTA_helo.png",alt:"Helo Ciamis - Aplikasi Resmi Pemerintah Kabupaten Ciamis",width:480,height:360,className:"relative z-10 object-contain w-full h-auto rounded-xl",priority:!0})}),(0,t.jsx)("div",{className:"absolute -bottom-3 -left-3 sm:-left-6 bg-white/10 backdrop-blur-md border border-white/20 rounded-xl px-3 py-2 shadow-lg",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-7 h-7 rounded-lg bg-mantis-500",children:(0,t.jsx)(a.Download,{className:"w-3.5 h-3.5 text-white"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[10px] text-primary-white/70 leading-none",children:"Unduh Gratis"}),(0,t.jsx)("p",{className:"text-xs font-bold text-primary-white leading-tight",children:"Android"})]})]})}),(0,t.jsx)("div",{className:"absolute -top-3 -right-3 sm:-right-4 bg-white/10 backdrop-blur-md border border-white/20 rounded-xl px-3 py-2 shadow-lg",children:(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("div",{className:"flex -space-x-1",children:(0,t.jsx)("div",{className:"w-5 h-5 rounded-full bg-mantis-400 border-2 border-lilac-bush-900 flex items-center justify-center",children:(0,t.jsx)(i,{className:"w-2.5 h-2.5 text-white"})})}),(0,t.jsx)("p",{className:"text-xs font-bold text-primary-white",children:"#HeloCiamis"})]})})]})]})]})]})})}],15677)},47952,e=>{"use strict";var t=e.i(43476),a=e.i(71645),s=e.i(66595),l=e.i(19455),i=e.i(93479);e.i(31972);var r=e.i(65387),n=e.i(57688);e.s(["HeroSection",0,function(){let[e,o]=(0,a.useState)(0),[d,c]=(0,a.useState)(""),{data:m}=(0,r.useHomeBackgrounds)();(0,a.useEffect)(()=>{let e=m?.length??0;if(!e)return;let t=setInterval(()=>{o(t=>(t+1)%e)},5e3);return()=>clearInterval(t)},[m]);let{data:x}=(0,r.useSocialMedias)();return(0,t.jsxs)("section",{id:"home-section",className:"flex justify-center w-full px-4 overflow-hidden h-fit lg:px-32",children:[m?.map((a,s)=>(0,t.jsx)("div",{className:`absolute inset-0 transition-opacity duration-1000 w-full ${s===e?"opacity-100":"opacity-0"}`,children:(0,t.jsx)(n.default,{src:a.image_url,alt:"background",width:500,height:500,className:"object-cover w-full h-full",priority:!0})},s)),(0,t.jsx)("div",{className:"absolute inset-0 w-full opacity-80 bg-gradient-to-r from-mantis-950 to-lilac-bush-950"}),(0,t.jsxs)("div",{className:"relative z-10 w-full mx-auto text-center pt-28 md:pt-32 lg:pt-52 text-primary-white h-fit",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("h1",{className:"mx-auto mb-4 text-xl font-bold leading-relaxed tracking-wide sm:mb-6 sm:text-2xl md:max-w-3xl md:text-5xl font-poppins",children:"SINERGI MEWUJUDKAN CIAMIS MAJU DAN BERKELANJUTAN"}),(0,t.jsx)("p",{className:"max-w-xs mx-auto text-xs sm:text-sm md:max-w-3xl md:text-base text-primary-white/80",children:"Temukan informasi publik terkini dari Pemerintah Daerah Kabupaten Ciamis"})]}),(0,t.jsxs)("div",{className:"relative flex flex-col sm:flex-row gap-4 max-w-[42rem] mx-auto mb-8",children:[(0,t.jsxs)("div",{className:"relative flex-1",children:[(0,t.jsx)(s.Search,{className:"absolute w-4 h-4 transform -translate-y-1/2 lg:w-5 lg:h-5 text-primary-black/40 left-3 top-1/2"}),(0,t.jsx)(i.Input,{type:"text",placeholder:"Helo Ciamis",value:d,onChange:e=>c(e.target.value),className:"h-12 border-0 rounded-lg pl-9 lg:pl-10 text-primary-black bg-primary-white placeholder:text-xs"})]}),(0,t.jsx)(l.Button,{variant:"default",size:"lg",className:"absolute h-8 transform -translate-y-1/2 rounded-sm text-primary-white bg-lilac-bush-900 right-2 top-1/2 hover:bg-lilac-bush-950 font-poppins",children:"Cari"})]}),(0,t.jsx)("div",{className:"flex flex-row items-center justify-between w-full max-w-lg gap-3 mx-auto mt-6 md:hidden",children:x?.map((e,a)=>(0,t.jsx)("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center transition-colors duration-300 w-11 h-11 group","aria-label":e.title,children:(0,t.jsx)(n.default,{src:e.image_url||"",alt:e.title,width:24,height:24,className:"object-cover w-10 h-10 grayscale group-hover:grayscale-0",loading:"lazy"})},a))})]})]})}])},34115,e=>{"use strict";var t=e.i(43476),a=e.i(80401),s=e.i(86301),l=e.i(79053),i=e.i(99946);function r(e,t,a){let s=`swiper-slide-shadow${a?`-${a}`:""}${e?` swiper-slide-shadow-${e}`:""}`,l=(0,i.p)(t),r=`.${s.split(" ").join(".")}`,n=l.querySelector(r);if(n)return n;let o=(0,i.a)("div",s.split(" "));return l.append(o),o}let n=({swiper:e,extendParams:t,on:a})=>{t({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}}),!function(e){let{effect:t,swiper:a,on:s,setTranslate:l,setTransition:i,overwriteParams:r,perspective:n,recreateShadows:o,getEffectParams:d}=e;s("beforeInit",()=>{if(a.params.effect!==t)return;a.classNames.push(`${a.params.containerModifierClass}${t}`),n&&n()&&a.classNames.push(`${a.params.containerModifierClass}3d`);let e=r?r():{};Object.assign(a.params,e),Object.assign(a.originalParams,e)}),s("setTranslate _virtualUpdated",()=>{a.params.effect===t&&l()}),s("setTransition",(e,s)=>{a.params.effect===t&&i(s)}),s("transitionEnd",()=>{if(a.params.effect===t&&o){let e=d?d():void 0;
1e&&e.slideShadows&&(a.slides.forEach(e=>{e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(e=>e.remove())}),o())}});let c=!1;s("virtualUpdate",()=>{a.params.effect===t&&(a.slides.length||(c=!0),requestAnimationFrame(()=>{c&&a.slides&&a.slides.length&&(l(),c=!1)}))})}({effect:"coverflow",swiper:e,on:a,setTranslate:()=>{let{width:t,height:a,slides:s,slidesSizesGrid:l}=e,n=e.params.coverflowEffect,o=e.isHorizontal(),d=e.translate,c=o?-d+t/2:-d+a/2,m=o?n.rotate:-n.rotate,x=n.depth,h=(0,i.o)(e);for(let e=0,t=s.length;e<t;e+=1){let t=s[e],a=l[e],d=(c-(t.swiperSlideOffset??0)-a/2)/a,u="function"==typeof n.modifier?n.modifier(d):d*n.modifier,p=o?m*u:0,g=o?0:m*u,b=-x*Math.abs(u),f="string"==typeof n.stretch&&-1!==n.stretch.indexOf("%")?parseFloat(n.stretch)/100*a:n.stretch,j=o?0:f*u,w=o?f*u:0,v=1-(1-n.scale)*Math.abs(u);.001>Math.abs(w)&&(w=0),.001>Math.abs(j)&&(j=0),.001>Math.abs(b)&&(b=0),.001>Math.abs(p)&&(p=0),.001>Math.abs(g)&&(g=0),.001>Math.abs(v)&&(v=0);let N=`translate3d(${w}px,${j}px,${b}px) rotateX(${h(g)}deg) rotateY(${h(p)}deg) scale(${v})`;if(function(e){let t=(0,i.p)(e);return t!==e&&(t.style.backfaceVisibility="hidden",t.style.setProperty("-webkit-backface-visibility","hidden")),t}(t).style.transform=N,t.style.zIndex=String(-Math.abs(Math.round(u))+1),n.slideShadows){let e=o?t.querySelector(".swiper-slide-shadow-left"):t.querySelector(".swiper-slide-shadow-top"),a=o?t.querySelector(".swiper-slide-shadow-right"):t.querySelector(".swiper-slide-shadow-bottom");e||(e=r("coverflow",t,o?"left":"top")),a||(a=r("coverflow",t,o?"right":"bottom")),e&&(e.style.opacity=String(u>0?u:0)),a&&(a.style.opacity=String(-u>0?-u:0))}}},setTransition:t=>{e.slides.map(e=>(0,i.p)(e)).forEach(e=>{e.style.transitionDuration=`${t}ms`,e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(e=>{e.style.transitionDuration=`${t}ms`})})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})};var o=e.i(57688),d=e.i(22016),c=e.i(99847),m=e.i(24071),x=e.i(67927),h=e.i(32781);e.i(31972);var u=e.i(8960),p=e.i(65387),g=e.i(71645),b=e.i(29592),f=e.i(19455);let j=()=>(0,t.jsx)("div",{className:"flex items-center justify-center w-full h-32 bg-gray-200 rounded-lg md:h-40 animate-pulse",children:(0,t.jsx)(h.Loader2,{className:"w-8 h-8 text-gray-400 animate-spin"})}),w=({onRetry:e})=>(0,t.jsxs)(b.Alert,{className:"mx-6 md:mx-32",children:[(0,t.jsx)(c.AlertCircle,{className:"w-4 h-4"}),(0,t.jsxs)(b.AlertDescription,{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{children:"Failed to load banner data"}),(0,t.jsx)(f.Button,{variant:"outline",size:"sm",onClick:e,children:"Retry"})]})]}),v=({item:e,index:a})=>{let s=(0,t.jsx)("div",{className:"w-full min-h-[5em]",children:(0,t.jsx)(o.default,{src:e.img||"https://placehold.co/400x300",alt:`Banner slide ${a+1}`,width:320,height:120,className:"object-cover w-full h-full",priority:a<2,placeholder:"blur",blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAABAAEDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAv/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAX/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwCdABmX/9k="})});return e.link?(0,t.jsx)(d.default,{href:e.link,className:"block rounded-lg focus:outline-none focus:ring-0 focus:ring-mantis-500 focus:ring-offset-0","aria-label":`View banner ${a+1}`,children:s}):s};e.s(["default",0,function(){let{data:e,isLoading:i,isError:r,refetch:o}=(0,p.useBanners)(),d=(0,g.useMemo)(()=>e?(0,u.partitionSiteBanners)(e).slider.map(u.toSliderBannerViewModel):[],[e]),c=(0,g.useCallback)(()=>{o()},[o]);return i?(0,t.jsx)("section",{className:"relative px-6 py-6 md:py-12 md:px-32",children:(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4 ",children:Array.from({length:1}).map((e,a)=>(0,t.jsx)(j,{},a))})}):r?(0,t.jsx)("section",{className:"relative px-6 py-6 md:py-12 md:px-32",children:(0,t.jsx)(w,{onRetry:c})}):d.length?(0,t.jsxs)("section",{className:"relative px-6 pt-0 pb-6 md:py-12 md:px-32",children:[(0,t.jsx)("div",{className:"md:block absolute z-0 hidden md:top-[-4em] left-0 right-0 h-24 overflow-hidden",children:(0,t.jsx)("svg",{className:"relative w-full h-20 md:h-24 fill-white",viewBox:"0 0 1440 180",fill:"none",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"none",role:"img","aria-label":"Decorative curved section divider with flat sides",children:(0,t.jsx)("path",{d:"M0,200 L0,100 C480,0 960,0 1440,100 L1440,200 Z",fill:"white"})})}),(0,t.jsxs)("div",{className:"relative pt-8 -mt-0 transition-colors duration-300 ease-in lg:-mt-64 group md:pt-0",children:[(0,t.jsx)("div",{className:"z-10 flex items-center justify-center px-2 py-2 text-transparent transition-colors duration-150 ease-in rounded-full swiper-button image-swiper-button-next group-hover:bg-mantis-50/70 group-hover:text-mantis-500",children:(0,t.jsx)(x.ChevronRight,{className:"w-5 h-5 md:w-6 md:h-6 text-mantis-500"})}),(0,t.jsx)("div",{className:"z-10 flex items-center justify-center px-2 py-2 text-transparent transition-colors duration-150 ease-in rounded-full swiper-button image-swiper-button-prev group-hover:bg-mantis-50/70 group-hover:text-mantis-500",children:(0,t.jsx)(m.ChevronLeft,{className:"w-5 h-5 text-mantis-500 md:w-6 md:h-6"})}),(0,t.jsx)(a.Swiper,{slidesPerView:1,effect:"coverflow",grabCursor:!0,spaceBetween:40,autoplay:{delay:5e3,disableOnInteraction:!1,pauseOnMouseEnter:!0},loop:d.length>1,mousewheel:{forceToAxis:!0},pagination:{el:".swiper-pagination-custom",clickable:!0,bulletClass:"swiper-pagination-bullet-custom",bulletActiveClass:"swiper-pagination-bullet-active-custom"},navigation:{nextEl:".image-swiper-button-next",prevEl:".image-swiper-button-prev",disabledClass:"swiper-button-disabled"},coverflowEffect:{rotate:0,stretch:0,depth:100,modifier:1,slideShadows:!1,scale:.8},breakpoints:{640:{slidesPerView:1,spaceBetween:20},768:{slidesPerView:1,spaceBetween:20},1024:{slidesPerView:(d.length,1),spaceBetween:20,centeredSlidesB
1ounds:!0},1280:{slidesPerView:(d.length,1),spaceBetween:20,centeredSlidesBounds:!0}},modules:[n,l.Navigation,s.Pagination],className:"mySwiper",style:{width:"100%"},children:d?.map((e,s)=>(0,t.jsx)(a.SwiperSlide,{children:(0,t.jsx)(v,{item:e,index:s})},`${e.img}-${s}`))}),(0,t.jsx)("div",{className:"flex justify-center mt-4 space-x-2 swiper-pagination-custom"})]})]}):null}],34115)},56295,e=>{"use strict";var t=e.i(43476),a=e.i(19455),s=e.i(49882),l=e.i(24071),i=e.i(67927),r=e.i(82022),n=e.i(41120),o=e.i(71645),d=e.i(87486),c=e.i(15288),m=e.i(75157),x=e.i(22016),h=e.i(57688),u=e.i(2747);e.i(58226);var p=e.i(56331),g=e.i(48425),b=Object.defineProperty,f=(e,t)=>b(e,"name",{value:t,configurable:!0}),j="horizontal",w=["horizontal","vertical"],v=o.forwardRef(f(function(e,a){let{decorative:s,orientation:l=j,...i}=e,r=N(l)?l:j;return(0,t.jsx)(g.Primitive.div,{"data-orientation":r,...s?{role:"none"}:{"aria-orientation":"vertical"===r?r:void 0,role:"separator"},...i,ref:a})},"Separator"));function N(e){return w.includes(e)}f(N,"isValidOrientation");let y=o.forwardRef(({className:e,orientation:a="horizontal",decorative:s=!0,...l},i)=>(0,t.jsx)(v,{ref:i,decorative:s,orientation:a,className:(0,m.cn)("shrink-0 bg-border","horizontal"===a?"h-[1px] w-full":"h-full w-[1px]",e),...l}));function A(){let[e,a]=(0,o.useState)(!1);return((0,o.useEffect)(()=>{a(!0);let e=document.createElement("script");return e.src="https://widget.komdigi.go.id/gpr-widget-kominfo.min.js",e.async=!0,document.body.appendChild(e),()=>{document.body.removeChild(e)}},[]),e)?(0,t.jsx)("div",{id:"gpr-kominfo-widget-container",className:"min-w-[300px] max-w-[780px] w-full h-full"}):null}y.displayName=v.displayName,e.s(["NewsSection",0,function(){let[e,g]=(0,o.useState)(1),[b,f]=(0,o.useState)("TERBARU"),[j,w]=(0,o.useState)(!1),[v,N]=(0,o.useState)(!1),[k,C]=(0,o.useState)(!0),[S,B]=(0,o.useState)(!1);(0,o.useEffect)(()=>{N(!0)},[]);let{data:E,isLoading:D,isError:M,error:K,refetch:R}=(0,p.useNewsHomeFeed)({enabled:v}),$=E?.featured??[],L=E?.latest??[],T=E?.popular??[],P=$.length,z=$.length>0?$[(e-1)%$.length]:null;(0,o.useEffect)(()=>{if($.length>1&&k&&v){let e=setInterval(()=>{g(e=>e%$.length+1)},5e3);return()=>clearInterval(e)}},[$.length,k,v]);let Q=(0,o.useCallback)(t=>{j||t===e||0===P||(w(!0),C(!1),g(t),setTimeout(()=>{C(!0)},1e4),setTimeout(()=>{w(!1)},300))},[e,j,P]),U=(0,o.useCallback)(()=>{0===P||Q(e%P+1)},[e,P,Q]),F=(0,o.useCallback)(()=>{0===P||Q(1===e?P:e-1)},[e,P,Q]),I=(()=>{switch(b){case"TERBARU":default:return{data:L,isLoading:D,isError:M,refetch:R};case"TERPOPULER":return{data:T,isLoading:D,isError:M,refetch:R}}})();return(0,t.jsx)("section",{id:"news-section",className:"relative py-6 lg:pb-12 sm:mt-0",children:(0,t.jsx)("div",{className:"relative z-10 px-4 sm:px-6 lg:px-32",children:(0,t.jsx)(c.Card,{className:"relative bg-white shadow-xl rounded-2xl",children:(0,t.jsx)(c.CardContent,{className:"p-4 pt-6 lg:p-6",children:(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-12",children:[(0,t.jsx)("div",{className:"order-2 h-full md:order-1 lg:col-span-5",children:(0,t.jsx)("section",{className:"relative w-full h-full overflow-hidden bg-white rounded-xl xl:order-first",children:(0,t.jsx)(A,{})})}),(0,t.jsxs)("div",{className:"flex flex-col order-1 gap-6 md:order-2 lg:col-span-7",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center lg:flex-row lg:items-center lg:justify-between",children:[(0,t.jsx)("h2",{className:"mb-4 text-2xl font-semibold md:text-3xl lg:mb-0 font-roboto text-lilac-bush-950",children:"Berita Terkini"}),(0,t.jsx)(y,{className:"max-w-[300px] hidden md:block"}),(0,t.jsx)(x.default,{href:"/berita",children:(0,t.jsxs)(a.Button,{variant:"outline",size:"sm",className:"text-[10px] md:text-xs bg-transparent text-mantis-500 border-mantis-500 hover:bg-mantis-50 hover:text-mantis-500 lg:self-auto",children:["Lihat Semua Berita",(0,t.jsx)(r.ExternalLink,{className:"w-4 h-4"})]})})]}),!v||D?(0,t.jsx)(()=>(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-8 lg:grid-cols-12",children:[(0,t.jsx)("div",{className:"order-2 lg:col-span-7",children:(0,t.jsxs)("div",{className:"relative bg-gray-200 rounded-lg overflow-hidden min-h-[400px] lg:h-full",children:[(0,t.jsx)(u.Skeleton,{className:"w-full h-full"}),(0,t.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 p-4 lg:p-6 bg-black/20 backdrop-blur-md rounded-t-xl",children:[(0,t.jsx)(u.Skeleton,{className:"w-20 h-4 mb-2"}),(0,t.jsx)(u.Skeleton,{className:"w-full h-6 mb-2"}),(0,t.jsx)(u.Skeleton,{className:"w-3/4 h-6 mb-4"}),(0,t.jsxs)("div",{className:"flex items-center gap-4 mb-4",children:[(0,t.jsx)(u.Skeleton,{className:"w-24 h-3"}),(0,t.jsx)(u.Skeleton,{className:"w-32 h-3"})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(u.Skeleton,{className:"w-32 h-8"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(u.Skeleton,{className:"w-8 h-8 rounded-full"}),(0,t.jsx)(u.Skeleton,{className:"w-16 h-4"}),(0,t.jsx)(u.Skeleton,{className:"w-8 h-8 rounded-full"})]})]})]})]})}),(0,t.jsxs)("div",{className:"order-3 lg:col-span-5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-center w-full gap-1 mb-6",children:[(0,t.jsx)(u.Skeleton,{className:"w-full h-10"}),(0,t.jsx)(u.Skeleton,{className:"w-full h-10"})]}),(0,t.jsx)("div",{className:"space-y-6",children:Array.from({length:5}).map((e,a)=>(0,t.jsxs)("div",{className:"pb-4 border-b border-gray-200 last:border-b-0",children:[(0,t.jsx)(u.Skeleton,{className:"w-full h-4 mb-3"}),(0,t.jsx)(u.Skeleton,{className:"w-3/4 h-4 mb-3"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(u.Skeleton,{className:"w-16 h-5"}),(0,t.jsx)(u.Skeleton,{className:"w-20 h-3"})]})]},a))})]})]}),{}):M?(0,t.jsx)(({message:e,onRetry:s})=>(0,t.jsxs)("div",{className:"py-12 text-center",children:[(0,t.jsx)("p",{className:"mb-4 text-lg text-red-500",children:e}),(0,t.jsxs)(a.Button,{onClick:s,variant:"outline",children:[(0,t.jsx)(n.RefreshCw,{className:"w-4 h-4 mr-2"}),"Coba Lagi"]})]}),{message:K?.message||"Gagal memuat berita terkini",onRetry:()=>R()}):0===$.length?(0,t.jsx)("div",{className:"py-12 text-center",children:(0,t.jsx)("p",{className:"text-lg text-primary-black/40",children:"Belum ada berita tersedia"})}):(0,t.jsxs)("div",{className:"grid h-full grid-cols-1 gap-4 lg:grid-cols-12",children:[(0,t.jsx)("div",{className:"order-2 lg:col-span-7",children:(0,t.jsx)("div",{className:"relative bg-white rounded-xl overflow-hidden h-[25em] md:h-full",children:z&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.default,{src:z.image_url||"https://plachold.co/600x400",alt:z.title,width:500,height:500,className:`object-cover transition-opacity duration-300 h-full w-full ${j?"opacity-0":"opacity-100"}`,sizes:"(max-width: 768px) 100dvw, (max-width: 1200px) 40dvw, 50dvw",loading:"lazy",placeholder:"blur",blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAABAAEDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAv/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAX/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwCdABmX/9k="}),(0,t.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 p-2 text-primary-white md:p-4 bg-primary-black/70 backdrop-blur-md rounded-t-xl",children:[(0,t.jsx)(d.Badge,{variant:"secondary",className:"mb-2 font-semibold font-lato text-[8px] md:text-xs bg-lilac-bush-50/90 text-lilac-bush-900 hover:bg-lilac-bush-50/90",children:(z.category?.name??"").toUpperCase()}),(0,t.jsx)("h3",{className:"mb-2 text-sm font-bold leading-tight md:mb-4 md:text-lg line-clamp-2 font-roboto text-primary-white",children:z.title}),(0,t.jsx)("div",{className:"flex flex-col items-start mb-2 text-sm md:flex-row md:items-center md:mb-6 md:gap-4 opacity-90",children:(0,t.jsxs)("div",{className:"flex items-center gap-1 text-nowrap",children:[(0,t.jsx)(s.Calendar,{className:"w-3 h-3 text-primary-white/60"}),(0,t.jsx)("span",{className:"text-[8px] md:text-xs text-primary-white/60",children:(0,m.formatDate)(z.published_at)})]})}),(0,t.jsxs)("div",{className:"flex flex-col items-center justify-between gap-2 md:flex-row md:gap-2",children:[(0,t.jsx)(x.default,{href:`/berita/detail/${z.slug}`,className:"w-full md:w-auto",children:(0,t.jsx)(a.Button,{variant:"outline",size:"sm",className:"w-full bg-transparent md:w-auto border-primary-white/60 font-roboto hover:bg-primary-white/10 hover:text-primary-white",children:"Baca Selengkapnya"})}),(0,t.jsxs)("div",{className:"items-center hidden gap-2 md:flex",children:[(0,t.jsx)("button",{onClick:F,disabled:j||P<=1,className:"flex items-center justify-center w-8 h-8 transition-colors rounded-full hover:bg-primary-white/20 disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Previous slide",children:(0,t.jsx)(l.ChevronLeft,{className:"w-4 h-4"})}),(0,t.jsxs)("span",{className:"text-sm font-medium font-roboto",children:[e," ",(0,t.jsxs)("span",{className:"font-normal text-primary-white/60",children:["dari ",P]})]}),(0,t.jsx)("button",{onClick:U,disabled:j||P<=1,className:"flex items-center justify-center w-8 h-8 transition-colors rounded-full hover:bg-primary-white/20 disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Next slide",children:(0,t.jsx)(i.ChevronRight,{className:"w-4 h-4"})})]})]})]})]})})}),(0,t.jsxs)("div",{className:"order-3 lg:col-span-5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-center w-full gap-1 mb-4",children:[(0,t.jsxs)("button",{onClick:()=>f("TERBARU"),className:`px-6 py-3 text-sm md:text-base rounded-lg font-medium transition-colors relative w-full ${"TERBARU"===b?"text-lilac-bush-900":"text-primary-black/40 hover:text-lilac-bush-900 hover:bg-lilac-bush-50 cursor-pointer"}`,children:["TERBARU","TERBARU"===b&&(0,t.jsx)("div",{className:"absolute bottom-0 left-0 right-0 w-full h-1 rounded-t cursor-pointer bg-lilac-bush-900 text-lilac-bush-bush-900"})]}),(0,t.jsxs)("button",{onClick:()=>f("TERPOPULER"),className:`px-6 py-3 text-sm md:text-base rounded-lg font-medium transition-colors relative w-full ${"TERPOPULER"===b?"text-lilac-bush-900":"text-primary-black/40 hover:text-lilac-bush-900 hover:bg-lilac-bush-50 cursor-pointer"}`,children:["TERPOPULER","TERPOPULER"===b&&(0,t.jsx)("div",{className:"absolute bottom-0 left-0 right-0 w-full h-1 rounded-t cursor-pointer bg-lilac-bush-900 text-lilac-bush-900"})]})]}),(0,t.jsx)("div",{className:"space-y-6",children:I.isLoading?(0,t.jsx)("div",{className:"space-y-4",children:Array.from({length:4}).map((e,a)=>(0,t.jsxs)("div",{className:"pb-4 border-b border-gray-200 last:border-b-0",children:[(0,t.jsx)(u.Skeleton,{className:"w-full h-4 mb-3"}),(0,t.jsx)(u.Skeleton,{className:"w-3/4 h-4 mb-3"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(u.Skeleton,{className:"w-16 h-5"}),(0,t.jsx)(u.Skeleton,{className:"w-20 h-3"})]})]},a))}):I.isError?(0,t.jsxs)("div",{className:"py-8 text-center",children:[(0,t.jsxs)("p",{className:"mb-2 text-sm text-red-500",children:["Gagal memuat berita ",b.toLowerCase()]}),(0,t.jsxs)(a.Button,{onClick:()=>I.refetch(),size:"sm",variant:"outline",children:[(0,t.jsx)(n.RefreshCw,{className:"w-3 h-3 mr-1"}),"Coba Lagi"]})]}):0===I.data.length?(0,t.jsx)("div",{className:"py-8 text-center",children:(0,t.jsxs)("p",{className:"text-sm text-gray-500",children:["Belum ada berita ",b.toLowerCase()]})}):I.data.slice(0,4).map((e,a)=>(0,t.jsx)(x.default,{href:`/berita/detail/${e.slug}`,children:(0,t.jsxs)("div",{className:"p-2 pb-2 transition-colors duration-200 ease-in-out border-b roun
1ded-lg cursor-pointerborder-mantis-200 last:border-b-0 group",children:[(0,t.jsx)("h4",{className:"mb-2 text-xs font-semibold leading-tight transition-colors md:mb-3 lg:text-base text-primary-black group-hover:text-lilac-bush-700 line-clamp-2 hover:underline",children:e.title}),(0,t.jsxs)("div",{className:"flex items-center gap-2 lg:gap-4 text-[10px] lg:text-xs text-primary-black/40",children:[(0,t.jsx)(d.Badge,{variant:"secondary",className:"px-3 py-1 text-[8px] text-nowrap lg:text-[10px] font-medium bg-lilac-bush-900/10 rounded-full text-lilac-bush-900",children:e.category?.name}),"TERBARU"===b&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-px h-3 rounded-full bg-primary-black/40"}),(0,t.jsx)("span",{className:"flex items-center gap-1",children:(0,m.formatDate)(e.published_at)})]}),"TERPOPULER"===b&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-px h-3 rounded-full bg-primary-black/40"}),(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[e.hit," views"]})]})]})]})},e.id))})]})]})]})]})})})})})}],56295)},44296,e=>{"use strict";var t=e.i(43476),a=e.i(71645),s=e.i(57688),l=e.i(22016),i=e.i(63676),r=e.i(24071),n=e.i(67927),o=e.i(82022),d=e.i(19455),c=e.i(76639),m=e.i(75157);e.i(31972);var x=e.i(65387),h=e.i(26999);e.s(["default",0,function({delay:e=4e3,autoClose:u,showOncePerSession:p=!0,maxShowsPerDay:g=1,storageKey:b="home"}){let{isOpen:f,setIsOpen:j,currentIndex:w,popupData:v,currentPopup:N,hasMultiple:y,canGoNext:A,canGoPrevious:k,handleClose:C,handleNext:S,handlePrevious:B,goToIndex:E,isLoading:D,isError:M}=(0,x.usePagePopup)({delay:e,autoClose:u,showOncePerSession:p,maxShowsPerDay:g,storageKey:b});if((0,a.useEffect)(()=>{if(!f)return;let e=e=>{switch(e.key){case"Escape":C();break;case"ArrowRight":y&&A&&S();break;case"ArrowLeft":y&&k&&B()}};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[f,C,S,B,y,A,k]),D||M||!N||!f)return null;let K=(0,t.jsxs)("div",{className:"relative group",children:[(0,t.jsx)(s.default,{src:N.img||"https://placehold.co/800x600",alt:`Banner popup ${w+1}`,width:800,height:600,className:"md:w-auto md:h-auto md:max-h-[85dvh] w-full max-w-[85dvw] h-[70dvh] object-cover rounded-lg",priority:!0,placeholder:"blur",blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAABAAEDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAv/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAX/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwCdABmX/9k="}),N.link&&(0,t.jsxs)("div",{className:"absolute flex items-center gap-2 px-3 py-1 text-sm text-white transition-opacity duration-300 rounded-full opacity-0 top-4 right-16 bg-black/70 group-hover:opacity-100",children:[(0,t.jsx)(o.ExternalLink,{className:"w-4 h-4"}),(0,t.jsx)("span",{children:"Klik untuk mengunjungi"})]}),y&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.Button,{variant:"ghost",size:"icon",className:(0,m.cn)("absolute left-4 top-1/2 transform -translate-y-1/2 bg-black/50 hover:bg-black/70 text-white rounded-full opacity-0 group-hover:opacity-100 transition-all duration-300",!k&&"opacity-30 cursor-not-allowed"),onClick:B,disabled:!k,"aria-label":"Banner sebelumnya",children:(0,t.jsx)(r.ChevronLeft,{className:"w-5 h-5"})}),(0,t.jsx)(d.Button,{variant:"ghost",size:"icon",className:(0,m.cn)("absolute right-4 top-1/2 transform -translate-y-1/2 bg-black/50 hover:bg-black/70 text-white rounded-full opacity-0 group-hover:opacity-100 transition-all duration-300",!A&&"opacity-30 cursor-not-allowed"),onClick:S,disabled:!A,"aria-label":"Banner selanjutnya",children:(0,t.jsx)(n.ChevronRight,{className:"w-5 h-5"})})]})]});return(0,t.jsx)(c.Dialog,{open:f,onOpenChange:j,children:(0,t.jsxs)(c.DialogContent,{className:"w-full h-fit max-w-[85dvw] max-h-[75dvh] md:max-h-[90dvh] md:w-fit md:max-w-[70dvw] p-0 md:mx-4 mx-auto overflow-hidden bg-transparent border-0 shadow-2xl",children:[(0,t.jsx)(c.DialogTitle,{className:"hidden",children:"Popup"}),(0,t.jsx)(h.DialogDescription,{className:"hidden",children:"Popup"}),(0,t.jsxs)("div",{className:"relative overflow-hidden bg-white shadow-2xl rounded-2xl",children:[(0,t.jsxs)("div",{className:"absolute top-0 left-0 right-0 z-20 flex items-center justify-between p-4",children:[y&&(0,t.jsxs)("div",{className:"px-3 py-1 text-sm font-medium text-white rounded-full bg-black/70",children:[w+1," dari ",v.length]}),(0,t.jsx)("div",{className:"ml-auto",children:(0,t.jsx)(c.DialogClose,{asChild:!0,children:(0,t.jsx)(d.Button,{variant:"ghost",size:"icon",className:"transition-all duration-200 rounded-full bg-primary-black hover:bg-primary-black hover:scale-110",onClick:C,"aria-label":"Tutup popup",children:(0,t.jsx)(i.X,{className:"w-5 h-5 text-white"})})})})]}),(0,t.jsx)("div",{className:"p-4",children:N.link?(0,t.jsx)(l.default,{href:N.link,target:"_blank",rel:"noopener noreferrer",className:"block focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-xl transition-transform duration-200 hover:scale-[1.02]",onClick:C,children:K}):K}),y&&(0,t.jsx)("div",{className:"absolute z-20 transform -translate-x-1/2 bottom-6 left-1/2",children:(0,t.jsx)("div",{className:"flex px-4 py-2 space-x-2 rounded-full bg-black/50 backdrop-blur-sm",children:v.map((e,a)=>(0,t.jsx)("button",{onClick:()=>E(a),className:(0,m.cn)("w-3 h-3 rounded-full transition-all duration-200 hover:scale-110",a===w?"bg-white scale-125":"bg-white/50 hover:bg-white/75"),"aria-label":`Ke banner ${a+1}`},a))})})]})]})})}])},48089,e=>{"use strict";var t=e.i(43476);e.i(48673);var a=e.i(54841),s=e.i(58310),l=e.i(75153),i=e.i(24071),r=e.i(67927),n=e.i(62368),o=e.i(72382),d=e.i(26091);let c=(0,e.i(56420).default)("square-arrow-out-up-right",[["path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",key:"y09zxi"}
1],["path",{d:"m21 3-9 9",key:"mpx6sq"}],["path",{d:"M15 3h6v6",key:"1q9fwt"}]]);var m=e.i(22016),x=e.i(71645),h=e.i(79053),u=e.i(86301),p=e.i(80401),g=e.i(19455),b=e.i(76639),f=e.i(75157),j=e.i(87486);e.s(["default",0,function(){let[e,w]=(0,x.useState)(!1),[v,N]=(0,x.useState)(null),{data:y=[]}=(0,s.useDocumentFullList)(),A=(0,x.useMemo)(()=>[...y].sort((e,t)=>(t.count_download??0)-(e.count_download??0)),[y]),{download:k}=(0,s.useDownloadDocument)(),C=e=>{k(e.slug,e.file_url||e.link,e.title)};return(0,t.jsxs)("section",{className:"relative px-4 py-6 sm:px-6 md:py-12 lg:px-32",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center space-y-6 md:justify-between md:flex-row md:space-x-6 md:items-center",children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold lg:text-4xl font-roboto text-lilac-bush-950",children:"Arsip dan Dokumen"}),(0,t.jsx)(m.default,{href:"/arsip-dan-dokumen?tahun=2025&topik=dokumen-perencanaan",children:(0,t.jsxs)(g.Button,{variant:"outline",size:"sm",className:"text-mantis-500 border-mantis-500 hover:bg-mantis-50 hover:text-mantis-500 font-roboto",children:[(0,t.jsx)("p",{children:"Lihat Semua Laporan"}),(0,t.jsx)(c,{className:"w-4 h-4"})]})})]}),(0,t.jsx)("div",{className:"mt-4 md:mt-6",children:(0,t.jsxs)("div",{className:"relative transition-colors duration-300 ease-in group",children:[A.length>3&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"z-10 flex items-center justify-center px-2 py-2 text-transparent transition-colors duration-150 ease-in rounded-full swiper-button image-swiper-button-next group-hover:bg-mantis-50 group-hover:text-mantis-500",children:(0,t.jsx)(r.ChevronRight,{className:"w-5 h-5 text-mantis-500 md:w-6 md:h-6"})}),(0,t.jsx)("div",{className:"z-10 flex items-center justify-center px-2 py-2 text-transparent transition-colors duration-150 ease-in rounded-full swiper-button image-swiper-button-prev group-hover:bg-mantis-50 group-hover:text-mantis-500",children:(0,t.jsx)(i.ChevronLeft,{className:"w-5 h-5 text-mantis-500 md:w-6 md:h-6"})})]}),(0,t.jsx)(p.Swiper,{slidesPerView:1.5,spaceBetween:20,autoplay:{delay:5e3,disableOnInteraction:!1,pauseOnMouseEnter:!0},loop:A.length>1,grabCursor:!0,mousewheel:{forceToAxis:!0},pagination:{clickable:!0,el:".transparency-swiper-pagination",bulletClass:"transparency-pagination-bullet",bulletActiveClass:"transparency-pagination-bullet-active"},navigation:{nextEl:".image-swiper-button-next",prevEl:".image-swiper-button-prev",disabledClass:"swiper-button-disabled"},breakpoints:{320:{slidesPerView:1.5,spaceBetween:20},640:{slidesPerView:2,spaceBetween:20},768:{slidesPerView:3,spaceBetween:20},1024:{slidesPerView:4,spaceBetween:20}},modules:[h.Navigation,u.Pagination],className:"transparency-swiper",style:{height:"auto"},children:A.slice(0,8).map(e=>(0,t.jsx)(p.SwiperSlide,{children:(0,t.jsxs)("div",{className:"relative w-full p-4 transition-shadow duration-300 bg-white border shadow-none md:p-6 rounded-xl h-[300px] md:h-[400px] flex flex-col",children:[(0,t.jsx)("div",{className:"flex justify-center mb-4",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-16 h-16 bg-gray-100 border-2 border-gray-200 rounded-lg md:h-20",children:(0,t.jsx)(d.FileText,{className:"w-6 h-6 text-gray-400"})}),(0,t.jsx)("div",{className:"absolute px-2 py-1 text-xs font-bold text-white bg-red-500 rounded -top-2 -right-2",children:"PDF"})]})}),(0,t.jsxs)("div",{className:"relative flex flex-col overflow-hidden grow",children:[(0,t.jsx)("p",{className:"mb-2 text-[10px] md:text-xs font-medium text-lilac-bush-700 text-start",children:e.category?.name}),(0,t.jsxs)("div",{className:"flex flex-col items-start justify-start mb-2",children:[(0,t.jsx)("h3",{className:"mb-1 text-xs font-semibold leading-tight text-lilac-bush-950 md:text-sm line-clamp-2 text-start",children:e.title}),(0,t.jsx)("p",{className:"mb-1 text-[10px] md:text-xs leading-relaxed text-lilac-bush-950/60 line-clamp-2 text-start",children:(0,a.parseDocumentsType)(e.documents_type).join(", ")}),(0,t.jsxs)("p",{className:"mb-1 text-[10px] md:text-xs text-lilac-bush-950/60",children:["Tanggal: ",(0,f.formatDate)(e.published_at)||"-"]}
1),(0,t.jsxs)("p",{className:"text-[10px] md:text-xs text-lilac-bush-950/60",children:["Diunduh: ",e.count_download]})]}),(0,t.jsxs)("div",{className:"flex gap-2 pt-4 mt-auto",children:[(0,t.jsxs)(g.Button,{variant:"outline",size:"sm",className:"flex-1 text-xs text-mantis-500 border-mantis-500 hover:bg-mantis-50 hover:text-mantis-500",onClick:()=>{var t;return t=e.slug,void(N(A.find(e=>e.slug===t)??null),w(!0))},children:[(0,t.jsx)(o.Eye,{className:"hidden w-3 h-3 md:block"}),"Detail"]}),(0,t.jsxs)(g.Button,{size:"sm",className:"flex-1 text-xs text-white bg-mantis-500 hover:bg-mantis-600",onClick:()=>C(e),children:[(0,t.jsx)(n.Download,{className:"hidden w-3 h-3 md:block"}),"Unduh"]})]})]})]})},e.slug))}),(0,t.jsx)("div",{className:"flex items-center justify-center mt-6",children:(0,t.jsx)("div",{className:"flex items-center justify-center gap-2 transparency-swiper-pagination"})})]})}),(0,t.jsx)(b.Dialog,{open:e,onOpenChange:w,children:(0,t.jsx)(b.DialogContent,{className:"max-w-[90dvw] md:max-w-2xl rounded-2xl",children:v?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(b.DialogHeader,{children:[(0,t.jsx)(j.Badge,{variant:"outline",className:"mb-2 w-fit",children:v.category?.name}),(0,t.jsx)(b.DialogTitle,{className:"text-xl font-bold leading-tight text-mantis-600",children:v.title})]}),(0,t.jsx)("div",{className:"space-y-4",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Jenis Informasi:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:(0,a.parseDocumentsType)(v.documents_type).map((e,a)=>(0,t.jsx)(j.Badge,{variant:"secondary",className:"text-[10px] md:text-xs",children:e},a))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Tanggal Publikasi:"}),(0,t.jsxs)("p",{className:"flex items-center gap-1 mt-1 text-xs text-gray-600 md:text-sm",children:[(0,t.jsx)(l.CalendarCheck,{className:"w-3 h-3"}),(0,f.formatDate)(v.published_at)]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Jumlah Unduhan:"}),(0,t.jsxs)("p",{className:"flex items-center gap-1 mt-1 text-xs text-gray-600 md:text-sm",children:[(0,t.jsx)(n.Download,{className:"w-3 h-3"}),v.count_download," kali"]})]})]})}),(0,t.jsxs)(b.DialogFooter,{className:"flex-col gap-1",children:[(0,t.jsx)(m.default,{href:`/arsip-dan-dokumen/preview/${v.slug}`,className:"w-full md:w-fit",children:(0,t.jsxs)(g.Button,{className:"w-full text-white md:w-fit bg-lilac-bush-950 hover:bg-lilac-bush-900",children:[(0,t.jsx)(o.Eye,{className:"w-4 h-4"}),"Lihat"]})}),(0,t.jsxs)(g.Button,{onClick:()=>C(v),className:"w-full bg-mantis-500 hover:bg-mantis-600 md:w-fit",children:[(0,t.jsx)(n.Download,{className:"w-4 h-4"}),"Unduh"]})]})]}):(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-sm text-gray-600",children:"Tidak ada dokumen yang dipilih"})})})]})}],48089)}]);
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.