1import{i as B,a as o,f as h,t as se,c as Y,d as ie}from"../chunks/XAY_w4zK.js";import{p as Ie,J as Le,h as je,B as F,t as k,G as ze,s as a,i,$ as Me,g as t,j as s,n as Oe,F as q,D as P,A as ne}from"../chunks/ogozgDVj.js";import{d as Pe,s as m}from"../chunks/C8L8rAxM.js";import{e as oe,s as l,i as Ne,b as Z,a as Ee}from"../chunks/kt8enD8-.js";import{h as He,g as Ge}from"../chunks/DnXNj3MZ.js";import{h as Je}from"../chunks/C8O1we8Q.js";import{S as p}from"../chunks/BKAcNsqV.js";import{F as We}from"../chunks/Cpi8tHhV.js";import"../chunks/CZbXoZu8.js";import"../chunks/9oMDpo41.js";import"../chunks/WRShoR3F.js";const $e=!0,ht=Object.freeze(Object.defineProperty({__proto__:null,prerender:$e},Symbol.toStringTag,{value:"Module"}));var Qe=h('<meta name="description"/> <link rel="canonical"/> <meta property="og:type" content="website"/> <meta property="og:site_name"/> <meta property="og:title"/> <meta property="og:description"/> <meta property="og:url"/> <meta property="og:image"/> <meta property="og:image:width" content="512"/> <meta property="og:image:height" content="512"/> <meta property="og:image:alt"/> <meta property="og:locale"/> <meta name="twitter:card" content="summary"/> <meta name="twitter:site"/> <meta name="twitter:title"/> <meta name="twitter:description"/> <meta name="twitter:image"/> <meta name="twitter:image:alt"/> <meta name="robots" content="index, follow"/> <!>',1),Re=h('<button> <span class="count svelte-1cx50vp"> </span></button>'),Ve=h('<div class="loading-state svelte-1cx50vp"><div class="spinner svelte-1cx50vp"></div> <p>Loading trending searches...</p></div>'),Ke=h('<div class="error-state svelte-1cx50vp"><svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="svelte-1cx50vp"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg> <p> </p> <button class="retry-btn svelte-1cx50vp">Try Again</button></div>'),Xe=h('<div class="empty-state svelte-1cx50vp"><p>No trending queries found for this category.</p></div>'),Ye=ie('<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="18,15 12,9 6,15"></polyline></svg> ',1),Ze=ie('<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6,9 12,15 18,9"></polyline></svg> ',1),et=h('<span class="neutral svelte-1cx50vp">â</span>'),tt=h('<button class="trend-item svelte-1cx50vp"><div> </div> <div class="trend-info svelte-1cx50vp"><span class="query svelte-1cx50vp"> </span> <span class="category-tag svelte-1cx50vp"> </span></div> <div class="trend-stats svelte-1cx50vp"><span class="searches svelte-1cx50vp"> </span> <span><!></span></div></button>'),at=h('<div class="trends-list svelte-1cx50vp"></div>'),rt=h('<div class="trends-page svelte-1cx50vp"><header class="trends-header svelte-1cx50vp"><a href="/" class="back-link svelte-1cx50vp"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M19 12H5M12 19l-7-7 7-7"></path></svg> Back to Search</a></header> <main class="trends-content svelte-1cx50vp"><div class="trends-hero svelte-1cx50vp"><h1 class="svelte-1cx50vp">Trending Searches</h1> <p class="svelte-1cx50vp">Discover what the world is searching for today. All data is anonymized and aggregated to protect user privacy.</p> <div class="last-updated svelte-1cx50vp"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"></circle><polyline points="12,6 12,12 16,14"></polyline></svg> <!></div></div> <div class="category-filter svelte-1cx50vp"></div> <!> <div class="privacy-note svelte-1cx50vp"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="svelte-1cx50vp"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path></svg> <div><strong class="svelte-1cx50vp">Privacy Protected</strong> <p class="svelte-1cx50vp">Trending data is derived from anonymized, aggregated search patterns. Individual searches are never tracked or stored.</p></div></div></main> <!></div>');function _t(le,ve){Ie(ve,!0);let U=P(null),I=P(!0),L=P(null),j=P("All");const ee=ne(()=>{var e;return((e=t(U))==null?void 0:e.queries)??[]}),ce=ne(()=>{var e;return((e=t(U))==null?void 0:e.categories)??[{name:"All",count:0}]});async function N(e){q(I,!0),q(L,null);try{q(U,await Ge(e),!0)}catch(r){console.error("Failed to load trending:",r),q(L,"Failed to load trending data. Please try again.")}finally{q(I,!1)}}async function de(e){q(j,e,!0),await N(e==="All"?void 0:e)}Le(()=>{N()});function pe(e){return{Finance:"#10b981",Technology:"#6366f1",Sports:"#f59e0b",Weather:"#0ea5e9",Entertainment:"#ec4899",Food:"#f97316",Travel:"#14b8a6",Health:"#84cc16",Gaming:"#6366F1",Science:"#06b6d4",Career:"#64748b",Education:"#a855f7",Lifestyle:"#f472b6"}[e]||"#6b7280"}function me(e){window.location.href=`/search?q=${encodeURIComponent(e)}`}function ge(e){return new Date(e).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}const E="Trending Searches - mooncloak",z="Discover today's most popular search queries on mooncloak. See what the world is searching for, privately.",he={"@context":"https://schema.org","@type":"WebPage",name:E,description:z,url:`${p.baseUrl}/trends`,publisher:{"@type":"Organization",name:p.siteName}};var H=rt();Je("1cx50vp",e=>{var r=Qe(),v=F(r);l(v,"content",z);var x=a(v,2),y=a(x,4),c=a(y,2);l(c,"content",E);var d=a(c,2);l(d,"content",z);var _=a(d,2),S=a(_,2),C=a(S,6),g=a(C,2),u=a(g,4),T=a(u,2);l(T,"content",E);var n=a(T,2);l(n,"content",z);var w=a(n,2),b=a(w,2),M=a(b,4);He(M,()=>`<script type="application/ld+json">${JSON.stringify(he)}<\/script>`),k(()=>{l(x,"href",`${p.baseUrl}/trends`),l(y,"content",p.siteName),l(_,"content",`${p.baseUrl}/trends`),l(S,"content",p.defaultImage),l(C,"content",p.defaultImageAlt),l(g,"content",p.locale),l(u,"content",p.twitterHandle),l(w,"content",p.defaultImage),l(b,"content",p.defaultImageAlt)}),ze(()=>{Me.title="Trending Searches - mooncloak"}),o(e,r)});var G=a(i(H),2),J=i(G),te=a(i(J),4),_e=a(i(te),2);{var ue=e=>{var r=se();k(v=>m(r,`Last updated: ${v??""}`),[()=>ge(t(U).lastUpdated)]),o(e,r)},fe=e=>{var r=se("Updated every hour");o(e,r)};B(_e,e=>{t(U)?e(ue):e(fe,!1)})}s(te),s(J);var W=a(J,2);oe(W,21,()=>t(ce),Ne,(e,r)=>{var v=Re();let x;v.__click=()=>de(t(r).name);var y=i(v),c=a(y),d=i(c,!0);s(c),s(v),k(()=>{x=Z(v,1,"category-btn svelte-1cx50vp",null,x,{active:t(j)===t(r).name}),v.disabled=t(I),m(y,`${t(r).name??""} `),m(d,t(r).count)}),o(e,v)}),s(W);var xe=a(W,2);{var ye=e=>{var r=Ve();o(e,r)},we=e=>{var r=Y(),v=F(r);{var x=c=>{var d=Ke(),_=a(i(d),2),S=i(_,!0);s(_);var C=a(_,2);C.__click=()=>N(t(j)==="All"?void 0:t(j)),s(d),k(()=>m(S,t(L))),o(c,d)},y=c=>{var d=Y(),_=F(d);{var S=g=>{var u=Xe();o(g,u)},C=g=>{var u=at();oe(u,21,()=>t(ee),T=>T.rank,(T,n)=>{var w=tt();w.__click=()=>me(t(n).query);var b=i(w);let M;var ke=i(b,!0);s(b);var $=a(b,2),Q=i($),Se=i(Q,!0);s(Q);var R=a(Q,2),Ce=i(R,!0);s(R),s($);var ae=a($,2),V=i(ae),Te=i(V,!0);s(V);var K=a(V,2);let re;var Ae=i(K);{var Be=f=>{var D=Ye(),X=a(F(D));k(()=>m(X,` +${t(n).change??""}%`)),o(f,D)},Fe=f=>{var D=Y(),X=F(D);{var qe=A=>{var O=Ze(),De=a(F(O));k(()=>m(De,`${t(n).change??""}%`)),o(A,O)},Ue=A=>{var O=et();o(A,O)};B(X,A=>{t(n).change<0?A(qe):A(Ue,!1)},!0)}o(f,D)};B(Ae,f=>{t(n).change>0?f(Be):f(Fe,!1)})}s(K),s(ae),s(w),k(f=>{M=Z(b,1,"rank svelte-1cx50vp",null,M,{top3:t(n).rank<=3}),m(ke,t(n).rank),m(Se,t(n).query),Ee(R,`--tag-color: ${f??""}`),m(Ce,t(n).category),m(Te,t(n).searches),re=Z(K,1,"change svelte-1cx50vp",null,re,{positive:t(n).change>0,negative:t(n).change<0})},[()=>pe(t(n).category)]),o(T,w)}),s(u),o(g,u)};B(_,g=>{t(ee).length===0?g(S):g(C,!1)},!0)}o(c,d)};B(v,c=>{t(L)?c(x):c(y,!1)},!0)}o(e,r)};B(xe,e=>{t(I)?e(ye):e(we,!1)})}Oe(2),s(G);var be=a(G,2);We(be,{}),s(H),o(le,H),je()}Pe(["click"]);export{_t as component,ht as universal};
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.