1import{d as Q,_ as X}from"./Cy78dx8_.js";import{u as G,_ as J}from"./8IQ5Pvdh.js";import{a8 as Y,T,a3 as m}from"./D2QsAF9A.js";import{A as Z,i as ee,f as c,B as te,y as oe,a1 as i,P as n,U as $,ae as s,aw as g,Q as y,V as C,v as a,a8 as f,F as L,ad as M,O as N,a7 as I,ac as j,ax as z,W as B,d as D,ay as se,X as ae}from"./zS39GKmL.js";const re={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"},ne={class:"flex items-center justify-between h-16"},le={class:"flex items-center"},ie={class:"relative"},ue=["src","alt"],de={class:"hidden sm:block text-white font-bold text-lg"},ce={key:0,class:"page-banner text-white"},pe={class:"hidden md:flex items-center space-x-6"},he={class:"flex items-center gap-4"},me={class:"hidden lg:block relative"},fe={class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},ve={key:0,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h16"},we={key:1,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},ge={class:"md:hidden border-t border-white/10"},ye={class:"px-4 py-3 border-b border-white/10"},be={class:"relative"},xe={class:"px-4 py-2"},_e=Z({__name:"HeaderW",props:{menu:{}},setup(O){const b=ee("seoH1",null),P=O,{theme:V,siteName:v,siteIcon:x,safeMenu:_}=G(P),l=c(!1),u=c(""),H=c(),E=c(),w=c(!1),p=c(!1),k=async o=>{if(o&&(o.isComposing||p.value))return;o?.target instanceof HTMLInputElement&&o.target.blur();const e=u.value.trim();if(!(!e||w.value)){w.value=!0;try{const r=/[\u4e00-\u9fa5]/.test(e)?(await Q(async()=>{const{pinyin:A}=await import("./BYfvGsnL.js");return{pinyin:A}},[],import.meta.url)).pinyin(e,{toneType:"none",separator:""}):e,[d,t,h]=await Promise.allSettled([R(r),q(r),U(r)]);if(d.status==="fulfilled"&&d.value){W(d.value);return}if(t.status==="fulfilled"&&t.value){F(t.value);return}if(h.status==="fulfilled"&&h.value){K(h.value);return}await m({path:"/search",query:{q:e}})}catch(r){console.error("æç´¢å¤±è´¥:",r)}finally{w.value=!1,l.value=!1}}},R=async o=>{try{return(await $fetch("/api/media/leagueList",{method:"POST",body:{pinyinName:o,pageNum:1,pageSize:1}})).data?.[0]}catch(e){return console.error("æç´¢èèµå¤±è´¥:",e),null}},q=async o=>{try{return(await $fetch("/api/media/teamList",{method:"POST",body:{pinyinName:o,pageNum:1,pageSize:1}})).data?.[0]}catch(e){return console.error("æç´¢çé失败:",e),null}},U=async o=>{try{return(await $fetch("/api/media/newsList",{method:"POST",body:{pinyinName:o,pageNum:1,pageSize:1}})).data?.[0]}catch(e){return console.error("æç´¢èµè®¯å¤±è´¥:",e),null}},W=o=>{const e=o,r=e.gameType===2?"basketball":"football";m(`/league/${r}/${e.leagueId}`)},F=o=>{const e=o,r=e.gameType===2?"basketball":"football";m(`/team/${r}/${e.teamId}`)},K=o=>{m(`/news/outside/${o.newsId}`)},S=o=>{const e=o.target;l.value&&!e.closest("header")&&(l.value=!1)};return te(()=>{document.addEventListener("click",S)}),oe(()=>{document.removeEventListener("click",S)}),(o,e)=>{const r=J,d=Y;return n(),i("header",{class:"w-full sticky top-0 z-50",style:ae({backgroundColor:a(V)?.primary||"#111827"})},[$(r),s("div",re,[s("div",ne,[s("div",le,[$(d,{to:"/",class:"flex items-center gap-3 group transition-transform hover:scale-105"},{default:y(()=>[s("div",ie,[a(x)?(n(),i("img",{key:0,src:a(x),alt:a(v)?`${a(v)} 徿 `:"ç«ç¹å¾æ ",class:"h-8 w-8 rounded-lg object-cover border border-white/20 transition-transform group-hover:scale-110"},null,8,ue)):C("",!0)]),s("div",null,[s("div",de,f(a(v)),1),a(b)?.show?.value?(n(),i("h1",ce,f(a(b).text.value),1)):C("",!0)])]),_:1})]),s("nav",pe,[(n(!0),i(L,null,M(a(_),t=>(n(),N(d,{key:t.label,to:t.to,target:t.target,title:t.label,class:j(["px-3 py-2 text-base font-medium transition-colors duration-200 whitespace-nowrap",(o._.provides[T]||o.$route).path===t.to?"text-sky-400":"text-white/80 hover:text-white"])},{default:y(()=>[I(f(t.label),1)]),_:2},1032,["to","target","title","class"]))),128))]),s("div",he,[s("div",me,[e[8]||(e[8]=s("label",{for:"headerr-search",class:"sr-only"},"æç´¢èèµ/çé",-1)),g(s("input",{ref_key:"searchInput",ref:H,"onUpdate:modelValue":e[0]||(e[0]=t=>D(u)?u.value=t:null),id:"headerr-search",type:"text",placeholder:"æç´¢èèµ/çé...",name:"q","aria-label":"æç´¢èèµ/çé",class:"w-64 px-4 py-2 pl-10 rounded-lg border border-white/20 bg-white/10 text-white placeholder-white/50 focus:outline-none focus:ring-2 focus:ring-sky-400/30 focus:bg-white/15 transition-all duration-200",onKeydown:B(k,["enter"]),onCompositionstart:e[1]||(e[1]=t=>p.value=!0),onCompositionend:e[2]||(e[2]=t=>p.value=!1)},null,544),[[z,a(u)]]),e[9]||(e[9]=s("svg",{class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-white/50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[s("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1))]),s("button",{class:"md:hidden p-2 rounded-md text-white/80 hover:text-white hover:bg-white/10 transition-colors duration-200","aria-label":"忢èå",onClick:e[3]||(e[3]=t=>l.value=!a(l))}
1,[(n(),i("svg",fe,[a(l)?(n(),i("path",we)):(n(),i("path",ve))]))])])]),g(s("div",ge,[s("div",ye,[s("div",be,[e[10]||(e[10]=s("label",{for:"headerr-search-mobile",class:"sr-only"},"æç´¢èèµ/çé",-1)),g(s("input",{ref_key:"mobileSearchInput",ref:E,"onUpdate:modelValue":e[4]||(e[4]=t=>D(u)?u.value=t:null),id:"headerr-search-mobile",type:"text",placeholder:"æç´¢èèµ/çé...",name:"q","aria-label":"æç´¢èèµ/çé",class:"w-full px-4 py-3 pl-10 rounded-lg border border-white/20 bg-white/10 text-white placeholder-white/50 focus:outline-none focus:ring-2 focus:ring-sky-400/30 transition-all duration-200",onKeydown:B(k,["enter"]),onCompositionstart:e[5]||(e[5]=t=>p.value=!0),onCompositionend:e[6]||(e[6]=t=>p.value=!1)},null,544),[[z,a(u)]]),e[11]||(e[11]=s("svg",{class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-white/50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[s("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1))])]),s("nav",xe,[(n(!0),i(L,null,M(a(_),t=>(n(),N(d,{key:t.label,to:t.to,target:t.target,title:t.label,class:j(["block px-3 py-3 rounded-md text-base font-medium transition-colors duration-200",(o._.provides[T]||o.$route).path===t.to?"text-sky-400":"text-white/80 hover:text-white hover:bg-white/5"]),onClick:e[7]||(e[7]=h=>l.value=!1)},{default:y(()=>[I(f(t.label),1)]),_:2},1032,["to","target","title","class"]))),128))])],512),[[se,a(l)]])])],4)}}}),Ce=Object.assign(X(_e,[["__scopeId","data-v-267c5339"]]),{__name:"DynamicHeaderW"});export{Ce 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.