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-4cdd5f65.js

2 lines
22 KiB

import{W as Ue}from"./whisper-add-friend-fde59c3d.js";import{_ as Be}from"./whisper-6e97e8e3.js";import{_ as xe,a as Ee}from"./post-item.vue_vue_type_style_index_0_lang-299dc5b6.js";import{_ as Ve}from"./post-skeleton-dd55abe8.js";import{d as Ce,H as l,c as we,b as Ie,e as p,f as h,bf as w,j as A,k as n,w as i,q as x,Y as y,y as ke,A as G,x as se,F as ye,u as Ae,R as Fe,E as Ne}from"./@vue-a481fc63.js";import{u as ze}from"./vuex-44de225f.js";import{l as be}from"./lodash-e0b37ac3.js";import{g as Re,a as qe,c as Ge,b as Oe,d as Pe,e as Se,u as Ye,f as Le,h as Me,_ as We}from"./index-7d4ab953.js";import{p as Ke}from"./content-aad6a645.js";import{V as B,P as j}from"./IEnum-5453a777.js";import{I as je,V as Qe,A as He,d as Ze,E as Je}from"./@vicons-f0266f88.js";import{o as De,v as Xe,j as $e,e as et,w as tt,x as st,y as at,z as nt,A as ot,B as lt,C as it,a as Te,D as rt,E as ut,F as ct,G as pt,H as dt,l as vt,I as mt,J as _t,k as ft}from"./naive-ui-eecf2ec3.js";import{_ as gt}from"./main-nav.vue_vue_type_style_index_0_lang-52234344.js";import{b as ht,u as wt}from"./vue-router-e5a2430e.js";import{W as yt}from"./v3-infinite-loading-2c58ec2f.js";import{S as At}from"./@opentiny-d73a2d67.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.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";import"./paopao-video-player-2fe58954.js";import"./vue-1e3b54ec.js";import"./xss-a5544f63.js";import"./cssfilter-af71ba68.js";const kt=Q=>{const F=new FileReader,k=u=>["application/zip","application/x-zip","application/octet-stream","application/x-zip-compressed"].includes(u),b=()=>{const u=new Uint8Array(F.result).subarray(0,4);let z="";for(let _=0;_<u.length;_++)z+=u[_].toString(16);switch(z){case"504b0304":case"504b0506":case"504b0708":return k("application/zip");case"504b030414":return k("application/x-zip-compressed");case"504b0508":return k("application/x-zip");case"504b5370":return k("application/octet-stream");default:return!1}};return new Promise((u,z)=>{F.onloadend=()=>{const _=Q.type;u(_===""||_==="application/octet-stream"?b():k(_))},F.readAsArrayBuffer(Q.slice(0,4))})},bt={key:0,class:"compose-wrap"},Ct={class:"compose-line"},It={class:"compose-user"},zt={class:"compose-line compose-options"},Dt={class:"attachment"},Tt={class:"submit-wrap"},Ut={class:"attachment-list-wrap"},Bt={key:0,class:"attachment-price-wrap"},xt=A("span",null," 附件价格¥",-1),Et={key:0,class:"eye-wrap"},Vt={key:1,class:"link-wrap"},Ft={key:1,class:"compose-wrap"},Nt=A("div",{class:"login-wrap"},[A("span",{class:"login-banner"}," 登录后,精彩更多")],-1),Rt={key:0,class:"login-only-wrap"},qt={key:1,class:"login-wrap"},Gt=Ce({__name:"compose",emits:["post-success"],setup(Q,{emit:F}){const k=ze(),b=l([]),u=l(!1),z=l(!1),_=l(!1),E=l(!1),D=l(""),C=l([]),N=l(),O=l(0),v=l("public/image"),f=l([]),I=l([]),R=l([]),V=l([]),d=l(B.PUBLIC),g=l(B.PUBLIC),q="true".toLowerCase()==="true",T=+"400",P=l("true".toLowerCase()==="true"),Y=l("true".toLowerCase()==="true"),H=l("true".toLowerCase()==="true"),Z=l("false".toLowerCase()==="true"),ae=l("true".toLowerCase()==="true"),ne="/v1/attachment",oe=we(()=>"Bearer "+localStorage.getItem("PAOPAO_TOKEN")),le=we(()=>{let e=[{value:B.PUBLIC,label:"公开"},{value:B.PRIVATE,label:"私密"},{value:B.Following,label:"关注可见"}];return q&&e.push({value:B.FRIEND,label:"好友可见"}),e}),J=()=>{_.value=!_.value,_.value&&E.value&&(E.value=!1)},X=()=>{E.value=!E.value,E.value&&_.value&&(_.value=!1)},$=be.debounce(e=>{Re({k:e}).then(t=>{let o=[];t.suggest.map(a=>{o.push({label:a,value:a})}),b.value=o,u.value=!1}).catch(t=>{u.value=!1})},200),e