1import{_ as q}from"./icHq0B72.js";import{d as v,M as F,o as t,c as o,g as e,b as r,j as f,F as b,r as k,h as u,L as U,t as T,u as A,a4 as E,l as N,a8 as M,n as I,w as x,G,aq as O,B as W,I as J,N as Q,T as C,S,K as X,A as H,k as B,aR as Y,_ as Z}from"./C-AxzrAu.js";import{u as P}from"./j1uhNoKA.js";import{_ as ee}from"./QuJbeZub.js";import{_ as te}from"./DREh60Pb.js";import"./DcaBhfDO.js";import"./DFeSeaOQ.js";import"./XoIqt7e7.js";import"./wms1jQWc.js";import"./BygIVjLx.js";import"./BP9fCPkj.js";import"./BMiLY8uV.js";const se={key:0,class:"flex flex-row justify-between"},oe={key:0,class:"cursor-pointer font-sans font-bold text-red-70"},ae={class:""},re={class:"hover:bg-blue-10 hover:rounded px-2 cursor-pointer font-sans text-grey-60 py-2 flex flex-row items-center justify-between"},ne=["onClick"],ie={class:"font-sans leading-tight"},le=v({__name:"HeaderSearchHistory",setup(w){const n=P(),{searchHistory:i}=F(n),p=d=>{window.location.replace(`https://www.kompas.id/search?q=${encodeURIComponent(d)}`)};return(d,a)=>{const m=U;return t(),o(b,null,[e(i).length?(t(),o("div",se,[a[1]||(a[1]=r("div",{class:"font-sans font-bold text-grey-60"}," Riwayat Pencarian ",-1)),e(i).length?(t(),o("div",oe,[r("span",{onClick:a[0]||(a[0]=c=>e(n).clearHistory())}," Hapus Semua ")])):f("",!0)])):f("",!0),r("div",ae,[(t(!0),o(b,null,k(e(i),(c,h)=>(t(),o("div",{key:`search-history-${h}`},[r("div",re,[r("div",{class:"w-full",onClick:_=>p(c)},[u(m,{name:"fa:clock",class:"text-white"}),r("span",ie,T(c),1)],8,ne),u(m,{name:"fa:times",class:"cursor-pointer text-grey-40",onClick:_=>e(n).removeSearchKeyword(c)},null,8,["onClick"])])]))),128))])],64)}}}),ce={key:0},ue={class:"w-full my-4 text-grey-60"},de=v({__name:"HeaderHotTopic",setup(w){const n=A(),{data:i,status:p}=E("hotTopic",()=>n.$apiCds("/meta/hot_topic"));return(d,a)=>{const m=M;return e(i)&&e(i).result&&e(p)==="success"?(t(),o("div",ce,[a[0]||(a[0]=r("div",{class:"font-sans font-bold text-grey-60"}," Topik Hangat ",-1)),r("div",ue,[(t(!0),o(b,null,k(e(i)?.result.hot,(c,h)=>(t(),N(m,{key:`hot-topic-searchbar-${h}`,bold:"",class:I(["font-sans","inline-flex","flex-shrink-0","border-none","py-3","px-4","mr-3","mb-2"]),color:"#F1C40F",nuxt:"",size:"xs",href:c.url},{default:x(()=>[G(T(c.title),1)]),_:2},1032,["href"]))),128))])])):f("",!0)}}}),pe={class:"absolute bg-white border border-grey-30 rounded-b p-4 w-full overflow-auto max-h-[500px]"},me={class:"w-full"},_e={key:0,class:"w-full my-4"},fe=v({__name:"HeaderSearchBar",async setup(w){let n,i;const p=O(),{show_search_bar:d}=F(p),a=H(!0),m=A(),c=B(()=>[{"translate-y-0":!d.value},{"translate-y-12":d.value}]),h=B(()=>({color:"#FFFFFF",top:!0,flat:!0,tag:"div",class:"h-12 transition-transform duration-500 transform w-full z-30"})),_=H(),{data:z}=([n,i]=W(async()=>J("ArticleLatest",async()=>await m.$apiCds("/article/popular-article"))),n=await n,i(),n);return _.value=z.value?.result,Q(_,g=>{g&&console.log("Popular articles updated:",g)}),(g,l)=>{const K=q,R=le,V=de,j=ee,D=te,L=Y;return t(),N(L,X({class:e(c)},e(h),{onClick:l[3]||(l[3]=S(()=>{},["stop"]))}),{default:x(()=>[u(K,{"search-bar":!0,onShow:l[0]||(l[0]=y=>a.value=y)}),u(C,{name:"fade"},{default:x(()=>[e(d)&&e(a)?(t(),o("div",{key:0,class:"flex flex-col max-w-xl lg:mx-auto relative border-t-0 mx-1 left-0 object-bottom z-30",onClick:l[1]||(l[1]=S(y=>e(p).toggleSearchBar(),["self"]))},[r("div",pe,[r("div",me,[u(R),u(V),l[4]||(l[4]=r("div",{class:"font-sans font-bold text-grey-60"}," Terpopuler ",-1)),e(_)?(t(),o("div",_e,[(t(!0),o(b,null,k(e(_).slice(0,3),(y,$)=>(t(),o("div",{key:`popular-posts-searchbar-${$}`,class:I([$==2?"border-0":"border-b border-grey-30","first:pb-3 first:pt-0 last:pb-0 last:pt-3 py-3 w-full"])},[u(D,{post:y},{default:x(s=>[u(j,{"image-counter":s.imageCounter,"is-analisis":s.isAnalisis,"is-eksklusif":s.isEksklusif,"is-freemium":s.isFreemium,"is-kompas-brief":s.isKompasBrief,href:`${s.permalink}${s.queryOpenFrom("Search_Page")}`,"is-video":s.isVideo,"published-date":s.publishedDate,thumbnail:s.featuredImageThumbnail?.permalink,taxonomy:s.taxonomyCategory(),title:s.title,heading:"h5","time-diff":""},null,8,["image-counter","is-analisis","is-eksklusif","is-freemium","is-kompas-brief","href","is-video","published-date","thumbnail","taxonomy","title"])]),_:1},8,["post"])],2))),128))])):f("",!0)])])])):f("",!0)]),_:1}),u(C,{name:"fade"},{default:x(()=>[e(d)?(t(),o("div",{key:0,class:"absolute bg-black min-h-screen opacity-25 top-[48px] w-full",onClick:l[2]||(l[2]=y=>e(p).toggleSearchBar())})):f("",!0)]),_:1})]),_:1},16,["class"])}}}),Be=Z(fe,[["__scopeId","data-v-07e28531"]]);export{Be as default};
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.