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/Home-0ukNlDWW.js

2 lines
24 KiB

9 months ago
import{W as Fe}from"./whisper-add-friend-CuQaAOYJ.js";import{_ as Ne}from"./whisper-DFhobfFF.js";import{_ as Re,a as Ge}from"./post-item.vue_vue_type_style_index_0_lang-Dfn2xguO.js";import{_ as qe}from"./post-skeleton-YfJeD-2o.js";import{d as ye,H as i,c as le,b as ke,e as r,f as k,bk as w,j as D,k as a,w as o,q as A,Z as g,y as he,A as x,x as fe,F as _e,u as ge,S as Oe,E as Pe}from"./@vue-CQsYufSu.js";import{u as Ae}from"./vuex-DNAxYlmG.js";import{l as we}from"./lodash-YI8ZzHBK.js";import{g as Se,a as Me,c as Ye,b as We,d as Le,e as Ke,u as je,f as Qe,h as He,_ as Ze}from"./index-v3l9hw1O.js";import{p as Je}from"./content-BMjusBPS.js";import{V as G,P as X}from"./IEnum-B3rDUvtK.js";import{I as Xe,V as $e,A as et,d as tt,E as st}from"./@vicons-C3A8jsfr.js";import{o as be,v as at,j as nt,e as ze,w as ot,x as lt,y as it,z as rt,A as ut,B as ct,C as pt,a as Te,D as dt,E as vt,F as mt,G as ft,H as _t,l as gt,I as ht,J as wt,k as yt}from"./naive-ui-DNcWoFGl.js";import{_ as kt}from"./main-nav.vue_vue_type_style_index_0_lang-DmAlkpQJ.js";import{b as At,u as bt}from"./vue-router-zwGLnBy5.js";import{W as zt}from"./v3-infinite-loading-DK6TzcZc.js";import{S as Tt}from"./@opentiny-BMB0hRxY.js";import"./copy-to-clipboard-CA7crPat.js";import"./@babel-Cpj98o6Y.js";import"./toggle-selection-BHUZwh74.js";import"./axios-Bo0ATomq.js";import"./moment-BqTRGcJI.js";/* empty css */import"./seemly-B7f2tHrf.js";import"./vueuc-CbQ6ZCvR.js";import"./evtd-CI_DDEu_.js";import"./@css-render-CQdyXCYJ.js";import"./vooks-BQzJqMzq.js";import"./vdirs-DL8EOfHr.js";import"./@juggle-C8OzoCMD.js";import"./css-render-Ct37b3-v.js";import"./@emotion-WldOFDRm.js";import"./lodash-es-i05dkx59.js";import"./treemate-HRdUPn5m.js";import"./async-validator-DKvM95Vc.js";import"./date-fns-x7VUUoCw.js";import"./paopao-video-player-DAi68TC5.js";import"./vue-C5uo8kQw.js";const Ct=$=>{const _=new FileReader,p=z=>["application/zip","application/x-zip","application/octet-stream","application/x-zip-compressed"].includes(z),h=()=>{const z=new Uint8Array(_.result).subarray(0,4);let d="";for(let b=0;b<z.length;b++)d+=z[b].toString(16);switch(d){case"504b0304":case"504b0506":case"504b0708":return p("application/zip");case"504b030414":return p("application/x-zip-compressed");case"504b0508":return p("application/x-zip");case"504b5370":return p("application/octet-stream");default:return!1}};return new Promise((z,d)=>{_.onloadend=()=>{const b=$.type;z(b===""||b==="application/octet-stream"?h():p(b))},_.readAsArrayBuffer($.slice(0,4))})},It={key:0,class:"compose-wrap"},Dt={class:"compose-line"},Bt={class:"compose-user"},Ut={class:"compose-line compose-options"},Vt={class:"attachment"},xt={class:"submit-wrap"},Et={class:"attachment-list-wrap"},Ft={key:0,class:"attachment-price-wrap"},Nt=D("span",null," 附件价格¥",-1),Rt={key:0,class:"eye-wrap"},Gt={key:1,class:"link-wrap"},qt={key:1,class:"compose-wrap"},Ot=D("div",{class:"login-wrap"},[D("span",{class:"login-banner"}," 登录后,精彩更多")],-1),Pt={key:0,class:"login-only-wrap"},St={key:1,class:"login-wrap"},Mt=ye({__name:"compose",emits:["post-success"],setup($,{emit:_}){const p=_,h=Ae(),z=i([]),d=i(!1),b=i(!1),N=i(!1),R=i(!1),E=i(""),L=i([]),B=i(),q=i(0),y=i("public/image"),T=i([]),C=i([]),U=i([]),O=i([]),S=i(G.PUBLIC),v=i(G.PUBLIC),V=i("true".toLowerCase()==="true"),K="/v1/attachment",M=le(()=>"Bearer "+localStorage.getItem("PAOPAO_TOKEN")),Q=le(()=>{let e=[{value:G.PUBLIC,label:"公开"},{value:G.PRIVATE,label:"私密"},{value:G.Following,label:"关注可见"}];return h.state.profile.useFriendship&&e.push({value:G.FRIEND,label:"好友可见"}),e}),H=()=>{N.value=!N.value,N.value&&R.value&&(R.value=!1)},ee=()=>{R.value=!R.value,R.value&&N.value&&(N.value=!1)},te=we.debounce(e=>{Se({k:e}).then(t=>{let n=[];t.suggest.map(l=>{n.push({label:l,value:l})}),z.value=n,d.value=!1}).catch(t=>{d.value=!1})},200),ie=we.debounce(e=>{Me({k:e}).then(t=>{let n=[];t.suggest.map(l=>{n.push({label:l,value:l})}),z.value=n,d.value=!1}).catch(t=>{d.value=!1})},200),re=(e,t)=>{d.value||(d.value=!0,t==="@"?te(e):ie(e))},ue=e=>{e.len