const{createApp}=Vue const{createVuetify,useDisplay}=Vuetify var data={alert:{show:false,color:'success',text:'',timeout:0,},theme:{dark:false,},nav:{showDrawer:false,tab:'account',discussions:{targetPage:1,}},search:{width:80,text:null,loading:false,},usersMap:new Map([[1847,{uid:1847,url:'/u/38796a396a045c76686e516f1b131c3e',avatar:'/a/38796a396a045c76686e516f1b131c3e',username:'Nidongwoma🤖',}],[1911,{uid:1911,url:'/u/3b215a2e6a045c76696b576f15081411',avatar:'/a/3b215a2e6a045c76696b576f15081411',username:'杜会主乂🤖',}],[2199,{uid:2199,url:'/u/143a7c256a045c7561635f6f41312613',avatar:'/a/143a7c256a045c7561635f6f41312613',username:'ieeci🤖',}],[3541,{uid:3541,url:'/u/181b005e6a045c74656e576f3f3d3676',avatar:'/a/181b005e6a045c74656e576f3f3d3676',username:'miko🤖',}],[3590,{uid:3590,url:'/u/0f13410a6a045c746563566f2d28392b',avatar:'/a/0f13410a6a045c746563566f2d28392b',username:'yhsiao🤖',}],[4294,{uid:4294,url:'/u/310444276a045c736263526f445b617e',avatar:'/a/310444276a045c736263526f445b617e',username:'qilifuzi🤖',}],[6267,{uid:6267,url:'/u/1e1154056a045c71626c516f432a242d',avatar:'/a/1e1154056a045c71626c516f432a242d',username:'队长🤖',}],[6848,{uid:6848,url:'/u/222743196a045c71686e5e6f473f2077',avatar:'/a/222743196a045c71686e5e6f473f2077',username:'miniso520🤖',}],[10184,{uid:10184,url:'/u/343c625e6a045d776162526f47270023',avatar:'/a/343c625e6a045d776162526f47270023',username:'大西瓜🤖',}],]),} const App={setup(){const{smAndUp,mdAndUp}=useDisplay() return{smAndUp,mdAndUp}},data(){return data;},mounted(){const themeDark=localStorage.getItem("themeDark") if(themeDark!==null){this.theme.dark=JSON.parse(themeDark)}},methods:{successAlert(msg){this.alert={show:true,color:'success',text:msg,timeout:1500,}},failureAlert(msg){this.alert={show:true,color:'error',text:msg,timeout:5000,}},flipThemeDark(){this.theme.dark=!this.theme.dark localStorage.setItem("themeDark",JSON.stringify(this.theme.dark))},toSearch(){if(!this.search.text){this.failureAlert('搜索词不能为空') return} let keywords=this.search.text.trim() if(keywords.length<1){this.failureAlert('搜索词不能为空') return} if(keywords.length>100){this.failureAlert('搜索词过长') return} this.doSearch(keywords)},toReg(){window.location.href="/reg"},toLogin(){window.location.href="/login"},toPage(){let url=window.location.href url=url.replace(/(\/\d+)?$/,this.nav.discussions.targetPage>1?`/${this.nav.discussions.targetPage}`:'') window.location.href=url},getTimeInfo(t){if(!t){return ""} const now=new Date();const then=new Date(t);const diff=now-then;const minute=60*1000;const hour=minute*60;const day=hour*24;const month=day*30;const year=month*12;if(diff