import{b,n as w,r as h,o as E,f as p,a as l,c as f,g as s,h as n,t,p as g,m as k,w as u,q as x,F as C,T as N,k as y,s as B,K as D,v as K,x as T}from"./index-ad591d72.js";import{s as q}from"./index-264c9d8d.js";import{c as F}from"./index-7e3b9e04.js";import{H as P}from"./Header-8fe47e74.js";import{u as $}from"./index-4f1337e8.js";import{_ as H}from"./_plugin-vue_export-helper-c27b6911.js";import"./request-2786ead7.js";import"./axios-4a70c6fc.js";import"./index-6ba67784.js";const J=r=>(K("data-v-a45a069b"),r=r(),T(),r),O={class:"top"},R={class:"tips"},z={key:0,class:"search-input"},A=J(()=>n("svg",{class:"icon","aria-hidden":"true"},[n("use",{"xlink:href":"#icon-sousuo"})],-1)),M={class:"version"},U={__name:"home",setup(r){const d=b(),m=w(),o=h({}),_=$();(()=>{q({Category:"Event"}).then(e=>{!e.Err&&e.settings.length!=0&&_.setEvent(JSON.parse(e.settings[0].Value))})})(),E(()=>{o.value=JSON.parse(window.localStorage.getItem("version"))});const a=h(""),v=()=>{a.value!=""&&F({Field:"Bib",Value:a.value}).then(e=>{if(e.Err==""&&e.Participants.length>0){if(m.name=="participants"){let i=d.resolve({path:"/index/participants",query:{id:e.Participants[0].ID}});location.replace(i.href),location.reload()}else d.push({path:"/index/participants",query:{id:e.Participants[0].ID}});a.value=""}})};return(e,i)=>{const I=p("el-input"),S=p("el-icon"),V=p("router-view");return l(),f(C,null,[s(P),n("div",O,[n("div",R,t(g(_).event.EventName),1),g(m).name!="participants"?(l(),f("div",z,[s(I,{modelValue:a.value,"onUpdate:modelValue":i[0]||(i[0]=c=>a.value=c),style:{height:"24px"},clearable:"",onKeyup:k(v,["enter"]),placeholder:e.$t("participants.search")},null,8,["modelValue","onKeyup","placeholder"]),s(S,{style:{cursor:"pointer"},onClick:v,size:"20",color:"#333333"},{default:u(()=>[A]),_:1})])):x("",!0)]),n("div",M,t(e.$t("home.version"))+"："+t(o.value.version)+"."+t(o.value.branch)+"."+t(o.value.commitId)+"   "+t(e.$t("home.compileTime"))+"："+t(o.value.buildDateTime),1),s(V,null,{default:u(({Component:c})=>[s(N,null,{default:u(()=>[(l(),y(D,{include:"participants"},[(l(),y(B(c)))],1024))]),_:2},1024)]),_:1})],64)}}},oe=H(U,[["__scopeId","data-v-a45a069b"]]);export{oe as default};
