You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
paopao-ce/web/dist/assets/index-4ee34f7b.js

2 lines
32 KiB

import{d as z,r as R,E as J,j,o as v,Q as D,a1 as a,a as k,V as s,c as T,e as S,P as q,a2 as N,O as M,_ as h,n as Q,w as H,a3 as ae,F as X,a4 as Y,M as I,s as P,a5 as he,R as Z,L as ge,a6 as fe}from"./@vue-e0e89260.js";import{c as ve,a as we,u as le,b as ye}from"./vue-router-b8e3382f.js";import{c as ke,u as B}from"./vuex-473b3783.js";import{a as be}from"./axios-4a70c6fc.js";import{_ as Pe,N as Le,a as ue,b as ce,c as Oe,d as Ae,e as ie,f as Te,g as Re,h as de,i as Ee,j as F,k as Ce,u as $e,l as Ie,m as Se,n as Me,o as Ue,p as Ke,q as qe,r as Ne,s as De,t as xe}from"./naive-ui-62663ad7.js";import{S as Fe,M as Ve,L as ze,C as Be,B as We,P as He,W as je,a as Qe,H as ee,b as te,c as oe}from"./@vicons-d502290a.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./evtd-b614532e.js";import"./@css-render-580d83ec.js";import"./vooks-a50491fd.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))i(c);new MutationObserver(c=>{for(const n of c)if(n.type==="childList")for(const m of n.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&i(m)}).observe(document,{childList:!0,subtree:!0});function l(c){const n={};return c.integrity&&(n.integrity=c.integrity),c.referrerPolicy&&(n.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?n.credentials="include":c.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function i(c){if(c.ep)return;c.ep=!0;const n=l(c);fetch(c.href,n)}})();const Ge="modulepreload",Je=function(e){return"/"+e},se={},A=function(t,l,i){if(!l||l.length===0)return t();const c=document.getElementsByTagName("link");return Promise.all(l.map(n=>{if(n=Je(n),n in se)return;se[n]=!0;const m=n.endsWith(".css"),d=m?'[rel="stylesheet"]':"";if(!!i)for(let b=c.length-1;b>=0;b--){const _=c[b];if(_.href===n&&(!m||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${d}`))return;const g=document.createElement("link");if(g.rel=m?"stylesheet":Ge,m||(g.as="script",g.crossOrigin=""),g.href=n,document.head.appendChild(g),m)return new Promise((b,_)=>{g.addEventListener("load",b),g.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>t()).catch(n=>{const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=n,window.dispatchEvent(m),!m.defaultPrevented)throw n})},Xe=[{path:"/",name:"home",meta:{title:"广场",keepAlive:!0},component:()=>A(()=>import("./Home-9d8ff359.js"),["assets/Home-9d8ff359.js","assets/post-item.vue_vue_type_style_index_0_lang-2a15a53c.js","assets/content-9a833cfa.js","assets/@vue-e0e89260.js","assets/@vicons-d502290a.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/paopao-video-player-aa5e8b3f.js","assets/content-2fda112b.css","assets/vuex-473b3783.js","assets/vue-router-b8e3382f.js","assets/formatTime-cdf4e6f1.js","assets/moment-2ab8298d.js","assets/copy-to-clipboard-1dd3075d.js","assets/toggle-selection-93f4ad84.js","assets/post-item-593ff254.css","assets/post-skeleton-852fbfbe.js","assets/post-skeleton-f1900002.css","assets/lodash-94eb5868.js","assets/IEnum-a180d93e.js","assets/main-nav.vue_vue_type_style_index_0_lang-9bd717cc.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Home-c075a37e.css","assets/vfonts-7afd136d.css"])},{path:"/post",name:"post",meta:{title:"话题详情"},component:()=>A(()=>import("./Post-7eb03a66.js"),["assets/Post-7eb03a66.js","assets/@vue-e0e89260.js","assets/vuex-473b3783.js","assets/formatTime-cdf4e6f1.js","assets/moment-2ab8298d.js","assets/IEnum-a180d93e.js","assets/@vicons-d502290a.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/content-9a833cfa.js","assets/paopao-video-player-aa5e8b3f.js","assets/content-2fda112b.css","assets/vue-router-b8e3382f.js","assets/post-skeleton-852fbfbe.js","assets/post-skeleton-f1900002.css","assets/lodash-94eb5868.js","assets/copy-to-clipboard-1dd3075d.js","assets/toggle-selection-93f4ad84.js","assets/main-nav.vue_vue_type_style_index_0_lang-9bd717cc.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-e5c2e8bf.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/Post-00695942.css","assets/vfonts-7afd136d.css"])},{path:"/topic",name:"topic",meta:{title:"话题"},component:()=>A(()=>import("./Topic-22328811.js"),["assets/Topic-22328811.js","assets/@vicons-d502290a.js","assets/@vue-e0e89260.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav.vue_vue_type_style_index_0_lang-9bd717cc.js","assets/vuex-473b3783.js","assets/vue-router-b8e3382f.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Topic-8dbcebb5.css","assets/vfonts-7afd136d.css"])},{path:"/anouncement",name:"anouncement",meta:{title:"公告"},component:()=>A(()=>import("./Anouncement-f1573e39.js"),["assets/Anouncement-f1573e39.js","assets/post-skeleton-852fbfbe.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/@vue-e0e89260.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-9bd717cc.js","assets/vuex-473b3783.js","assets/vue-router-b8e3382f.js","assets/@vicons-d502290a.js","assets/main-nav-569a7b0c.css","assets/formatTime-cdf4e6f1.js","assets/moment-2ab8298d.js","assets/axios-4a70c6fc.js","assets/Anouncement-662e2d95.css","assets/vfonts-7afd136d.css"])},{path:"/profile",name:"profile",meta:{title:"主页"},component:()=>A(()=>import("./Profile-c50ec64e.js"),["assets/Profile-c50ec64e.js","assets/post-item.vue_vue_type_style_index_0_lang-2a15a53c.js","assets/content-9a833cfa.js","assets/@vue-e0e89260.js","assets/@vicons-d502290a.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/paopao-video-player-aa5e8b3f.js","assets/content-2fda112b.css","assets/vuex-473b3783.js","assets/vue-router-b8e3382f.js","assets/formatTime-cdf4e6f1.js","assets/moment-2ab8298d.js","assets/copy-to-clipboard-1dd3075d.js","assets/toggle-selection-93f4ad84.js","assets/post-item-593ff254.css","assets/post-skeleton-852fbfbe.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-9bd717cc.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Profile-4e105aaa.css","assets/vfonts-7afd136d.css"])},{path:"/user",name:"user",meta:{title:"用户详情"},component:()=>A(()=>import("./User-4c8d56bf.js"),["assets/User-4c8d56bf.js","assets/post-item.vue_vue_type_style_index_0_lang-2a15a53c.js","assets/content-9a833cfa.js","assets/@vue-e0e89260.js","assets/@vicons-d502290a.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/paopao-video-player-aa5e8b3f.js","assets/content-2fda112b.css","assets/vuex-473b3783.js","assets/vue-router-b8e3382f.js","assets/formatTime-cdf4e6f1.js","assets/moment-2ab8298d.js","assets/copy-to-clipboard-1dd3075d.js","assets/toggle-selection-93f4ad84.js","assets/post-item-593ff254.css","assets/post-skeleton-852fbfbe.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-9bd717cc.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/User-dfc90f68.css","assets/vfonts-7afd136d.css"])},{path:"/messages",name:"messages",meta:{title:"消息"},component:()=>A(()=>import("./Messages-83548b65.js"),["assets/Messages-83548b65.js","assets/@vue-e0e89260.js","assets/vue-router-b8e3382f.js","assets/formatTime-cdf4e6f1.js","assets/moment-2ab8298d.js","assets/@vicons-d502290a.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav.vue_vue_type_style_index_0_lang-9bd717cc.js","assets/vuex-473b3783.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Messages-7ed31ecd.css","assets/vfonts-7afd136d.css"])},{path:"/collection",name:"collection",meta:{title:"收藏"},component:()=>A(()=>import("./Collection-b058950d.js"),["assets/Collection-b058950d.js","assets/post-item.vue_vue_type_style_index_0_lang-2a15a53c.js","assets/content-9a833cfa.js","assets/@vue-e0e89260.js","assets/@vicons-d502290a.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/paopao-video-player-aa5e8b3f.js","assets/content-2fda112b.css","assets/vuex-473b3783.js","assets/vue-router-b8e3382f.js","assets/formatTime-cdf4e6f1.js","assets/moment-2ab8298d.js","assets/copy-to-clipboard-1dd3075d.js","assets/toggle-selection-93f4ad84.js","assets/post-item-593ff254.css","assets/post-skeleton-852fbfbe.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-9bd717cc.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Collection-b97b3cf7.css","assets/vfonts-7afd136d.css"])},{path:"/contacts",name:"contacts",meta:{title:"好友"},component:()=>A(()=>import("./Contacts-64f9219e.js"),["assets/Contacts-64f9219e.js","assets/vue-router-b8e3382f.js","assets/@vue-e0e89260.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-852fbfbe.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-9bd717cc.js","assets/vuex-473b3783.js","assets/@vicons-d502290a.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Contacts-b60e5e0d.css","assets/vfonts-7afd136d.css"])},{path:"/wallet",name:"wallet",meta:{title:"钱包"},component:()=>A(()=>import("./Wallet-95582312.js"),["assets/Wallet-95582312.js","assets/post-skeleton-852fbfbe.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/@vue-e0e89260.js","assets/vueuc-59ca65c3.js","assets/evtd-b614532e.js","assets/@css-render-580d83ec.js","assets/vooks-a50491fd.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-9bd717cc.js","assets/vuex-473b3783.js","assets/vue-router-b8e3382f.js","assets/@vicons-d502290a.js","assets/main-nav-569a7b0c.css","assets/qrcode-9719fc56.js","assets/encode-utf8-f813de00.js","assets/dijkstrajs-f906a09e.js","assets/formatTime-cdf4e6f1.js","assets/moment-2ab8298d.js","assets/axios-4a70c6fc.js","assets/Wallet-77044929.css","assets/vfonts-7afd136d.css"])},{path:"/setting",name:"setting",meta:{title:"设置"},component:()=>A(()=>import("./Setting-bc8e2870.js"),["assets/Setting-bc8e2870.js","assets/main-nav.vue_vue_type_style_index_0_lang-9bd717cc.js","assets/vuex-473b3783.js","assets/@vue-e0e89260.js","assets/vue-router-b8e3382f.js","assets/vooks-a50491fd.js","assets/evtd-b614532e.js","assets/@vicons-d502290a.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/@css-render-580d83ec.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Setting-bfd24152.css","assets/vfonts-7afd136d.css"])},{path:"/404",name:"404",meta:{title:"404"},component:()=>A(()=>import("./404-07930e09.js"),["assets/404-07930e09.js","assets/main-nav.vue_vue_type_style_index_0_lang-9bd717cc.js","assets/vuex-473b3783.js","assets/@vue-e0e89260.js","assets/vue-router-b8e3382f.js","assets/vooks-a50491fd.js","assets/evtd-b614532e.js","assets/@vicons-d502290a.js","assets/naive-ui-62663ad7.js","assets/seemly-76b7b838.js","assets/vueuc-59ca65c3.js","assets/@css-render-580d83ec.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/404-020b2afd.css","assets/vfonts-7afd136d.css"])},{path:"/:pathMatch(.*)",redirect:"/404"}],pe=ve({history:we(),routes:Xe});pe.beforeEach((e,t,l)=>{document.title=`${e.meta.title} | 泡泡 - 一个清新文艺的微社区`,l()});const Ye=ke({state:{refresh:Date.now(),refreshTopicFollow:Date.now(),theme:localStorage.getItem("PAOPAO_THEME"),collapsedLeft:document.body.clientWidth<=821,collapsedRight:document.body.clientWidth<=821,drawerModelShow:document.body.clientWidth<=821,desktopModelShow:document.body.clientWidth>821,authModalShow:!1,authModelTab:"signin",userLogined:!1,userInfo:{id:0,username:"",nickname:""}},mutations:{refresh(e,t){e.refresh=t||Date.now()},refreshTopicFollow(e){e.refreshTopicFollow=Date.now()},triggerTheme(e,t){e.theme=t},triggerAuth(e,t){e.authModalShow=t},triggerAuthKey(e,t){e.authModelTab=t},triggerCollapsedLeft(e,t){e.collapsedLeft=t,e.drawerModelShow=t,e.desktopModelShow=!t},triggerCollapsedRight(e,t){e.collapsedRight=t},updateUserinfo(e,t){e.userInfo=t,e.userInfo.id>0&&(e.userLogined=!0)},userLogout(e){localStorage.removeItem("PAOPAO_TOKEN"),e.userInfo={id:0,nickname:"",username:""},e.userLogined=!1}},actions:{},modules:{}}),G=be.create({baseURL:"",timeout:3e4});G.interceptors.request.use(e=>(localStorage.getItem("PAOPAO_TOKEN")&&(e.headers.Authorization="Bearer "+localStorage.getItem("PAOPAO_TOKEN")),e),e=>Promise.reject(e));G.interceptors.response.use(e=>{const{data:t={},code:l=0}=(e==null?void 0:e.data)||{};if(+l==0)return t||{};Promise.reject((e==null?void 0:e.data)||{})},(e={})=>{var l;const{response:t={}}=e||{};return+(t==null?void 0:t.status)==401?(localStorage.removeItem("PAOPAO_TOKEN"),(t==null?void 0:t.data.code)!==10005?window.$message.warning((t==null?void 0:t.data.msg)||"鉴权失败"):window.$store.commit("triggerAuth",!0)):window.$message.error(((l=t==null?void 0:t.data)==null?void 0:l.msg)||"请求失败"),Promise.reject((t==null?void 0:t.data)||{})});function o(e){return G(e)}const ne=e=>o({method:"post",url:"/v1/auth/login",data:e}),Ze=e=>o({method:"post",url:"/v1/auth/register",data:e}),W=(e="")=>o({method:"get",url:"/v1/user/info",headers:{Authorization:`Bearer ${e}`}}),et={class:"auth-wrap"},tt={key:0},ot=z({__name:"auth",setup(e){const t=R("true".toLowerCase()==="true"),l=B(),i=R(!1),c=R(),n=J({username:"",password:""}),m=R(),d=J({username:"",password:"",repassword:""}),U={username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"},repassword:[{required:!0,message:"请输入密码"},{validator:(_,u)=>!!d.password&&d.password.startsWith(u)&&d.password.length>=u.length,message:"两次密码输入不一致",trigger:"input"}]},g=_=>{var u;_.preventDefault(),_.stopPropagation(),(u=c.value)==null||u.validate(L=>{L||(i.value=!0,ne({username:n.username,password:n.password}).then(p=>{const O=(p==null?void 0:p.token)||"";return localStorage.setItem("PAOPAO_TOKEN",O),W(O)}).then(p=>{window.$message.success("登录成功"),i.value=!1,l.commit("updateUserinfo",p),l.commit("triggerAuth",!1),l.commit("refresh"),n.username="",n.password=""}).catch(p=>{i.value=!1}))})},b=_=>{var u;_.preventDefault(),_.stopPropagation(),(u=m.value)==null||u.validate(L=>{L||(i.value=!0,Ze({username:d.username,password:d.password}).then(p=>ne({username:d.username,password:d.password})).then(p=>{const O=(p==null?void 0:p.token)||"";return localStorage.setItem("PAOPAO_TOKEN",O),W(O)}).then(p=>{window.$message.success("注册成功"),i.value=!1,l.commit("updateUserinfo",p),l.commit("triggerAuth",!1),d.username="",d.password="",d.repassword=""}).catch(p=>{i.value=!1}))})};return j(()=>{const _=localStorage.getItem("PAOPAO_TOKEN")||"";_?W(_).then(u=>{l.commit("updateUserinfo",u),l.commit("triggerAuth",!1)}).catch(u=>{l.commit("userLogout")}):l.commit("userLogout")}),(_,u)=>{const L=Pe,p=Le,O=ue,r=ce,w=Oe,y=Ae,C=ie,x=Te,$=Re,K=de,V=Ee;return v(),D(V,{show:h(l).state.authModalShow,"onUpdate:show":u[7]||(u[7]=f=>h(l).state.authModalShow=f),class:"auth-card",preset:"card",size:"small","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:a(()=>[k("div",et,[s(K,{bordered:!1},{default:a(()=>[t.value?M("",!0):(v(),T("div",tt,[s(O,{justify:"center"},{default:a(()=>[s(p,null,{default:a(()=>[s(L,{type:"success"},{default:a(()=>[S("账号登录")]),_:1})]),_:1})]),_:1}),s(y,{ref_key:"loginRef",ref:c,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:a(()=>[s(w,{label:"账户",path:"username"},{default:a(()=>[s(r,{value:n.username,"onUpdate:value":u[0]||(u[0]=f=>n.username=f),placeholder:"请输入用户名",onKeyup:q(N(g,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(w,{label:"密码",path:"password"},{default:a(()=>[s(r,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":u[1]||(u[1]=f=>n.password=f),placeholder:"请输入账户密码",onKeyup:q(N(g,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s(C,{type:"primary",block:"",secondary:"",strong:"",loading:i.value,onClick:g},{default:a(()=>[S(" 登录 ")]),_:1},8,["loading"])])),t.value?(v(),D($,{key:1,"default-value":h(l).state.authModelTab,size:"large","justify-content":"space-evenly"},{default:a(()=>[s(x,{name:"signin",tab:"登录"},{default:a(()=>[s(y,{ref_key:"loginRef",ref:c,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:a(()=>[s(w,{label:"账户",path:"username"},{default:a(()=>[s(r,{value:n.username,"onUpdate:value":u[2]||(u[2]=f=>n.username=f),placeholder:"请输入用户名",onKeyup:q(N(g,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(w,{label:"密码",path:"password"},{default:a(()=>[s(r,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":u[3]||(u[3]=f=>n.password=f),placeholder:"请输入账户密码",onKeyup:q(N(g,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s(C,{type:"primary",block:"",secondary:"",strong:"",loading:i.value,onClick:g},{default:a(()=>[S(" 登录 ")]),_:1},8,["loading"])]),_:1}),s(x,{name:"signup",tab:"注册"},{default:a(()=>[s(y,{ref_key:"registerRef",ref:m,model:d,rules:U},{default:a(()=>[s(w,{label:"用户名",path:"username"},{default:a(()=>[s(r,{value:d.username,"onUpdate:value":u[4]||(u[4]=f=>d.username=f),placeholder:"用户名注册后无法修改"},null,8,["value"])]),_:1}),s(w,{label:"密码",path:"password"},{default:a(()=>[s(r,{type:"password","show-password-on":"mousedown",placeholder:"密码不少于6位",value:d.password,"onUpdate:value":u[5]||(u[5]=f=>d.password=f),onKeyup:q(N(b,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(w,{label:"重复密码",path:"repassword"},{default:a(()=>[s(r,{type:"password","show-password-on":"mousedown",placeholder:"请再次输入密码",value:d.repassword,"onUpdate:value":u[6]||(u[6]=f=>d.repassword=f),onKeyup:q(N(b,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s(C,{type:"primary",block:"",secondary:"",strong:"",loading:i.value,onClick:b},{default:a(()=>[S(" 注册 ")]),_:1},8,["loading"])]),_:1})]),_:1},8,["default-value"])):M("",!0)]),_:1})])]),_:1},8,["show"])}}});const me=(e,t)=>{const l=e.__vccOpts||e;for(const[i,c]of t)l[i]=c;return l},st=me(ot,[["__scopeId","data-v-053dfa44"]]),Xt=e=>o({method:"get",url:"/v1/posts",params:e}),nt=e=>o({method:"get",url:"/v1/tags",params:e}),Yt=e=>o({method:"get",url:"/v1/post",params:e}),Zt=e=>o({method:"get",url:"/v1/post/star",params:e}),eo=e=>o({method:"post",url:"/v1/post/star",data:e}),to=e=>o({method:"get",url:"/v1/post/collection",params:e}),oo=e=>o({method:"post",url:"/v1/post/collection",data:e}),so=e=>o({method:"get",url:"/v1/post/comments",params:e}),no=e=>o({method:"get",url:"/v1/user/contacts",params:e}),ro=e=>o({method:"post",url:"/v1/post",data:e}),ao=e=>o({method:"delete",url:"/v1/post",data:e}),lo=e=>o({method:"post",url:"/v1/post/lock",data:e}),uo=e=>o({method:"post",url:"/v1/post/stick",data:e}),co=e=>o({method:"post",url:"/v1/post/visibility",data:e}),io=e=>o({method:"post",url:"/v1/tweet/comment/thumbsup",data:e}),po=e=>o({method:"post",url:"/v1/tweet/comment/thumbsdown",data:e}),mo=e=>o({method:"post",url:"/v1/tweet/reply/thumbsup",data:e}),_o=e=>o({method:"post",url:"/v1/tweet/reply/thumbsdown",data:e}),ho=e=>o({method:"post",url:"/v1/post/comment",data:e}),go=e=>o({method:"delete",url:"/v1/post/comment",data:e}),fo=e=>o({method:"post",url:"/v1/post/comment/reply",data:e}),vo=e=>o({method:"delete",url:"/v1/post/comment/reply",data:e}),wo=e=>o({method:"post",url:"/v1/topic/stick",data:e}),yo=e=>o({method:"post",url:"/v1/topic/follow",data:e}),ko=e=>o({method:"post",url:"/v1/topic/unfollow",data:e}),rt={key:0,class:"rightbar-wrap"},at={class:"search-wrap"},lt={class:"post-num"},ut={class:"post-num"},ct={class:"copyright"},it=["href"],dt=["href"],pt=z({__name:"rightbar",setup(e){const t=R([]),l=R([]),i=R(!1),c=R(""),n=B(),m=le(),d="2023 paopao.info",U="Roc's Me",g="",b="泡泡(PaoPao)开源社区",_="https://www.paopao.info",u=+"6",L=+"12",p=()=>{i.value=!0,nt({type:"hot_extral",num:L,extral_num:u}).then(y=>{t.value=y.topics,l.value=y.extral_topics??[],w.value=!0,i.value=!1}).catch(y=>{i.value=!1})},O=y=>y>=1e3?(y/1e3).toFixed(1)+"k":y,r=()=>{m.push({name:"home",query:{q:c.value}})},w=Q({get:()=>n.state.userLogined&&l.value.length!==0,set:y=>{}});return H(()=>({refreshTopicFollow:n.state.refreshTopicFollow,userLogined:n.state.userLogined}),(y,C)=>{(y.refreshTopicFollow!==C.refreshTopicFollow||y.userLogined)&&p()}),j(()=>{p()}),(y,C)=>{const x=F,$=ce,K=ae("router-link"),V=Ce,f=de,_e=ue;return h(n).state.collapsedRight?M("",!0):(v(),T("div",rt,[k("div",at,[s($,{round:"",clearable:"",placeholder:"搜一搜...",value:c.value,"onUpdate:value":C[0]||(C[0]=E=>c.value=E),onKeyup:q(N(r,["prevent"]),["enter"])},{prefix:a(()=>[s(x,{component:h(Fe)},null,8,["component"])]),_:1},8,["value","onKeyup"])]),w.value?(v(),D(f,{key:0,class:"hottopic-wrap",title:"关注话题",embedded:"",bordered:!1,size:"small"},{default:a(()=>[s(V,{show:i.value},{default:a(()=>[(v(!0),T(X,null,Y(l.value,E=>(v(),T("div",{class:"hot-tag-item",key:E.id},[s(K,{class:"hash-link",to:{name:"home",query:{q:E.tag,t:"tag"}}},{default:a(()=>[S(" #"+I(E.tag),1)]),_:2},1032,["to"]),k("div",lt,I(O(E.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1})):M("",!0),s(f,{class:"hottopic-wrap",title:"热门话题",embedded:"",bordered:!1,size:"small"},{default:a(()=>[s(V,{show:i.value},{default:a(()=>[(v(!0),T(X,null,Y(t.value,E=>(v(),T("div",{class:"hot-tag-item",key:E.id},[s(K,{class:"hash-link",to:{name:"home",query:{q:E.tag,t:"tag"}}},{default:a(()=>[S(" #"+I(E.tag),1)]),_:2},1032,["to"]),k("div",ut,I(O(E.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1}),s(f,{class:"copyright-wrap",embedded:"",bordered:!1,size:"small"},{default:a(()=>[k("div",ct,"© "+I(h(d)),1),k("div",null,[s(_e,null,{default:a(()=>[k("a",{href:h(g),target:"_blank",class:"hash-link"},I(h(U)),9,it),k("a",{href:h(_),target:"_blank",class:"hash-link"},I(h(b)),9,dt)]),_:1})])]),_:1})]))}}});const mt=me(pt,[["__scopeId","data-v-f4a84024"]]),bo=(e={})=>o({method:"get",url:"/v1/captcha",params:e}),Po=e=>o({method:"post",url:"/v1/captcha",data:e}),Lo=e=>o({method:"post",url:"/v1/user/whisper",data:e}),Oo=e=>o({method:"post",url:"/v1/friend/requesting",data:e}),Ao=e=>o({method:"post",url:"/v1/friend/add",data:e}),To=e=>o({method:"post",url:"/v1/friend/reject",data:e}),Ro=e=>o({method:"post",url:"/v1/friend/delete",data:e}),Eo=e=>o({method:"post",url:"/v1/user/phone",data:e}),Co=e=>o({method:"post",url:"/v1/user/activate",data:e}),$o=e=>o({method:"post",url:"/v1/user/password",data:e}),Io=e=>o({method:"post",url:"/v1/user/nickname",data:e}),So=e=>o({method:"post",url:"/v1/user/avatar",data:e}),re=(e={})=>o({method:"get",url:"/v1/user/msgcount/unread",params:e}),Mo=e=>o({method:"get",url:"/v1/user/messages",params:e}),Uo=e=>o({method:"post",url:"/v1/user/message/read",data:e}),Ko=e=>o({method:"get",url:"/v1/user/collections",params:e}),qo=e=>o({method:"get",url:"/v1/user/stars",params:e}),No=e=>o({method:"get",url:"/v1/user/profile",params:e}),Do=e=>o({method:"get",url:"/v1/user/posts",params:e}),xo=e=>o({method:"get",url:"/v1/user/wallet/bills",params:e}),Fo=e=>o({method:"post",url:"/v1/user/recharge",data:e}),Vo=e=>o({method:"get",url:"/v1/user/recharge",params:e}),zo=e=>o({method:"get",url:"/v1/suggest/users",params:e}),Bo=e=>o({method:"get",url:"/v1/suggest/tags",params:e}),Wo=e=>o({method:"get",url:"/v1/attachment/precheck",params:e}),Ho=e=>o({method:"get",url:"/v1/attachment",params:e}),jo=e=>o({method:"post",url:"/v1/admin/user/status",data:e}),_t="/assets/logo-52afee68.png",ht={class:"sidebar-wrap"},gt={class:"logo-wrap"},ft={key:0,class:"user-wrap"},vt={class:"user-info"},wt={class:"nickname"},yt={class:"nickname-txt"},kt={class:"username"},bt={class:"user-mini-wrap"},Pt={key:1,class:"user-wrap"},Lt={key:0,class:"login-only-wrap"},Ot={key:1,class:"login-wrap"},At=z({__name:"sidebar",setup(e){const t=B(),l=ye(),i=le(),c=R(!1),n=R(l.name||""),m=R(),d=R("true".toLowerCase()==="true"),U=+"5000";H(l,()=>{n.value=l.name}),H(t.state,()=>{t.state.userInfo.id>0?m.value||(re().then(r=>{c.value=r.count>0}).catch(r=>{console.log(r)}),m.value=setInterval(()=>{re().then(r=>{c.value=r.count>0}).catch(r=>{console.log(r)})},U)):m.value&&clearInterval(m.value)}),j(()=>{window.onresize=()=>{t.commit("triggerCollapsedLeft",document.body.clientWidth<=821),t.commit("triggerCollapsedRight",document.body.clientWidth<=821)}});const g=Q(()=>{const r=[{label:"广场",key:"home",icon:()=>P(ee),href:"/"},{label:"话题",key:"topic",icon:()=>P(te),href:"/topic"}];return"false".toLowerCase()==="true"&&r.push({label:"公告",key:"anouncement",icon:()=>P(Ve),href:"/anouncement"}),r.push({label:"主页",key:"profile",icon:()=>P(ze),href:"/profile"}),r.push({label:"消息",key:"messages",icon:()=>P(Be),href:"/messages"}),r.push({label:"收藏",key:"collection",icon:()=>P(We),href:"/collection"}),r.push({label:"好友",key:"contacts",icon:()=>P(He),href:"/contacts"}),"false".toLocaleLowerCase()==="true"&&r.push({label:"钱包",key:"wallet",icon:()=>P(je),href:"/wallet"}),r.push({label:"设置",key:"setting",icon:()=>P(Qe),href:"/setting"}),t.state.userInfo.id>0?r:[{label:"广场",key:"home",icon:()=>P(ee),href:"/"},{label:"话题",key:"topic",icon:()=>P(te),href:"/topic"}]}),b=r=>"href"in r?P("div",{},r.label):r.label,_=r=>r.key==="messages"?P(Ie,{dot:!0,show:c.value,processing:!0},{default:()=>P(F,{color:r.key===n.value?"var(--n-item-icon-color-active)":"var(--n-item-icon-color)"},{default:r.icon})}):P(F,null,{default:r.icon}),u=(r,w={})=>{n.value=r,i.push({name:r})},L=()=>{l.path==="/"&&t.commit("refresh"),u("home")},p=r=>{t.commit("triggerAuth",!0),t.commit("triggerAuthKey",r)},O=()=>{t.commit("userLogout"),t.commit("refresh"),L()};return window.$store=t,window.$message=$e(),(r,w)=>{const y=Se,C=Me,x=Ue,$=ie;return v(),T("div",ht,[k("div",gt,[s(y,{class:"logo-img",width:"36",src:h(_t),"preview-disabled":!0,onClick:L},null,8,["src"])]),s(C,{accordion:!0,"icon-size":24,options:g.value,"render-label":b,"render-icon":_,value:n.value,"onUpdate:value":u},null,8,["options","value"]),h(t).state.userInfo.id>0?(v(),T("div",ft,[s(x,{class:"user-avatar",round:"",size:34,src:h(t).state.userInfo.avatar},null,8,["src"]),k("div",vt,[k("div",wt,[k("span",yt,I(h(t).state.userInfo.nickname),1),s($,{class:"logout",quaternary:"",circle:"",size:"tiny",onClick:O},{icon:a(()=>[s(h(F),null,{default:a(()=>[s(h(oe))]),_:1})]),_:1})]),k("div",kt,"@"+I(h(t).state.userInfo.username),1)]),k("div",bt,[s($,{class:"logout",quaternary:"",circle:"",onClick:O},{icon:a(()=>[s(h(F),{size:24},{default:a(()=>[s(h(oe))]),_:1})]),_:1})])])):(v(),T("div",Pt,[d.value?M("",!0):(v(),T("div",Lt,[s($,{strong:"",secondary:"",round:"",type:"primary",onClick:w[0]||(w[0]=K=>p("signin"))},{default:a(()=>[S(" 登录 ")]),_:1})])),d.value?(v(),T("div",Ot,[s($,{strong:"",secondary:"",round:"",type:"primary",onClick:w[1]||(w[1]=K=>p("signin"))},{default:a(()=>[S(" 登录 ")]),_:1}),s($,{strong:"",secondary:"",round:"",type:"info",onClick:w[2]||(w[2]=K=>p("signup"))},{default:a(()=>[S(" 注册 ")]),_:1})])):M("",!0)]))])}}});const Tt={"has-sider":"",class:"main-wrap",position:"static"},Rt={key:0},Et={class:"content-wrap"},Ct=z({__name:"App",setup(e){const t=B(),l=Q(()=>t.state.theme==="dark"?qe:null);return(i,c)=>{const n=At,m=ae("router-view"),d=mt,U=st,g=Ne,b=De,_=xe,u=Ke;return v(),D(u,{theme:l.value},{default:a(()=>[s(b,null,{default:a(()=>[s(g,null,{default:a(()=>{var L;return[k("div",{class:ge(["app-container",{dark:((L=l.value)==null?void 0:L.name)==="dark",mobile:!h(t).state.desktopModelShow}])},[k("div",Tt,[h(t).state.desktopModelShow?(v(),T("div",Rt,[s(n)])):M("",!0),k("div",Et,[s(m,{class:"app-wrap"},{default:a(({Component:p})=>[(v(),D(he,null,[i.$route.meta.keepAlive?(v(),D(Z(p),{key:0})):M("",!0)],1024)),i.$route.meta.keepAlive?M("",!0):(v(),D(Z(p),{key:0}))]),_:1})]),s(d)]),s(U)],2)]}),_:1})]),_:1}),s(_)]),_:1},8,["theme"])}}});fe(Ct).use(pe).use(Ye).mount("#app");export{At as $,Do as A,qo as B,Lo as C,Oo as D,No as E,Ro as F,jo as G,Ao as H,To as I,Uo as J,Mo as K,Ko as L,Wo as M,Ho as N,no as O,W as P,xo as Q,Fo as R,Vo as S,bo as T,So as U,$o as V,Eo as W,Co as X,Io as Y,Po as Z,me as _,Bo as a,Xt as b,ro as c,_o as d,vo as e,io as f,zo as g,po as h,fo as i,go as j,ho as k,Zt as l,to as m,ao as n,lo as o,eo as p,oo as q,Yt as r,uo as s,mo as t,so as u,co as v,wo as w,ko as x,yo as y,nt as z};