diff --git a/app/src/main/assets/h5/assets/BBCodeView-FxCuZHI9.js b/app/src/main/assets/h5/assets/BBCodeView-EwXTKT8H.js similarity index 99% rename from app/src/main/assets/h5/assets/BBCodeView-FxCuZHI9.js rename to app/src/main/assets/h5/assets/BBCodeView-EwXTKT8H.js index c921b195..9c60fc0f 100644 --- a/app/src/main/assets/h5/assets/BBCodeView-FxCuZHI9.js +++ b/app/src/main/assets/h5/assets/BBCodeView-EwXTKT8H.js @@ -1,2 +1,2 @@ -import{d as Qt,r as Jt,o as Xt,c as Zt,b as te,i as ee,_ as ne}from"./index-7eRT9hrs.js";const ut=` +import{d as Qt,r as Jt,o as Xt,c as Zt,b as te,i as ee,_ as ne}from"./index-KiD6n6db.js";const ut=` `,J=" ",$="=",Y='"',F=" ",j="[",K="]",v="/",H="\\",tt=t=>typeof t=="object"&&!!t.tag,Ot=t=>typeof t=="string",Ct=(t,e,n)=>Object.keys(t).reduce(e,n),xt=t=>tt(t)?t.content.reduce((e,n)=>e+xt(n),0):Ot(t)?t.length:0,se=(t,e)=>{t.content.push(e)},dt=t=>t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/(javascript|data|vbscript):/gi,"$1%3A"),wt=(t,e)=>{const n=typeof e,s={boolean:()=>e?`${t}`:"",number:()=>`${t}="${e}"`,string:()=>`${t}="${dt(e)}"`,object:()=>`${t}="${dt(JSON.stringify(e))}"`};return s[n]?s[n]():""},et=t=>t==null?"":Ct(t,(e,n)=>[...e,wt(n,t[n])],[""]).join(" "),q=t=>Ct(t,(e,n)=>t[n]===n?t[n]:null,null),re=(t,e)=>{const n=q(e);if(n){const s=wt(t,n),i={...e};delete i[n];const l=et(i);return`${s}${l}`}return`${t}${et(e)}`};class G{attr(e,n){return typeof n<"u"&&(this.attrs[e]=n),this.attrs[e]}append(e){return se(this,e)}get length(){return xt(this)}toTagStart({openTag:e=j,closeTag:n=K}={}){const s=re(this.tag,this.attrs);return`${e}${s}${n}`}toTagEnd({openTag:e=j,closeTag:n=K}={}){return`${e}${v}${this.tag}${n}`}toTagNode(){return new G(this.tag.toLowerCase(),this.attrs,this.content)}toString({openTag:e=j,closeTag:n=K}={}){const s=this.content.length===0,i=this.content.reduce((c,C)=>c+C.toString({openTag:e,closeTag:n}),""),l=this.toTagStart({openTag:e,closeTag:n});return s?l:`${l}${i}${this.toTagEnd({openTag:e,closeTag:n})}`}constructor(e,n,s){this.tag=e,this.attrs=n,this.content=Array.isArray(s)?s:[s]}}G.create=(t,e={},n=[])=>new G(t,e,n);G.isOf=(t,e)=>t.tag===e;const m="type",lt="value",Rt="row",Wt="line",$t=1,Gt=2,Pt=3,Mt=4,Vt=5,Dt=6,st=t=>t&&typeof t[lt]<"u"?t[lt]:"",oe=t=>t&&t[Wt]||0,ie=t=>t&&t[Rt]||0,ce=t=>t&&typeof t[m]<"u"?t[m]===Vt||t[m]===Dt||t[m]===$t:!1,ae=t=>t&&typeof t[m]<"u"?t[m]===Gt:!1,ft=t=>st(t).charCodeAt(0)===v.charCodeAt(0),ue=t=>!ft(t),le=t=>t&&typeof t[m]<"u"?t[m]===Pt:!1,Te=t=>t&&typeof t[m]<"u"?t[m]===Mt:!1,fe=t=>{const e=st(t);return ft(t)?e.slice(1):e},ge=t=>{let e=j;return e+=st(t),e+=K,e};class Ae{isEmpty(){return isNaN(this[m])}isText(){return ce(this)}isTag(){return ae(this)}isAttrName(){return le(this)}isAttrValue(){return Te(this)}isStart(){return ue(this)}isEnd(){return ft(this)}getName(){return fe(this)}getValue(){return st(this)}getLine(){return oe(this)}getColumn(){return ie(this)}toString(){return ge(this)}constructor(e,n,s,i){this[m]=Number(e),this[lt]=String(n),this[Wt]=Number(s),this[Rt]=Number(i)}}const I=$t,_t=Gt,he=Pt,Nt=Mt,pe=Vt,Ee=Dt;function de(t,e){const n={pos:0,len:t.length},s=f=>{const{pos:A}=n,E=t.indexOf(f,A);return E>=0?t.substring(A,E):""},i=f=>t.indexOf(f,n.pos)>=0,l=()=>n.len>n.pos,c=()=>n.pos===n.len,C=(f=1,A)=>{n.pos+=f,e&&e.onSkip&&!A&&e.onSkip()},T=()=>t.substring(n.pos),O=(f=0)=>t.substring(n.pos,n.pos+f),d=()=>t[n.pos],N=()=>{const f=n.pos-1;return typeof t[f]<"u"?t[f]:null},x=()=>{const f=n.pos+1;return f<=t.length-1?t[f]:null},S=(f,A)=>{let E=0;if(l())for(E=n.pos;l()&&f(d());)C(1,A);return t.substring(E,n.pos)};this.skip=C,this.hasNext=l,this.getCurr=d,this.getRest=T,this.getNext=x,this.getPrev=N,this.isLast=c,this.includes=i,this.grabWhile=S,this.grabN=O,this.substrUntilChar=s}const St=(t,e)=>new de(t,e),_e=(t,e)=>{for(;t.charAt(0)===e;)t=t.substring(1);for(;t.charAt(t.length-1)===e;)t=t.substring(0,t.length-1);return t},Ne=t=>t.replace(H+Y,Y);function Se(t=[]){const e=t,n=()=>Array.isArray(e)&&e.length>0&&typeof e[e.length-1]<"u"?e[e.length-1]:null,s=()=>e.length?e.pop():!1,i=c=>e.push(c),l=()=>e;this.push=i,this.toArray=l,this.getLast=n,this.flushLast=s}const X=(t=[])=>new Se(t),be="!",ye=(t,e,n=0,s=0)=>new Ae(t,e,n,s);function Le(t,e={}){let T=0,O=0,d=-1,N=0,x=0,S="";const f=new Array(Math.floor(t.length)),A=e.openTag||j,E=e.closeTag||K,z=!!e.enableEscapeTags,w=e.contextFreeTags||[],rt=e.onToken||(()=>{}),ot=[E,A,Y,H,F,J,$,ut,be],it=[A,F,J,ut],ct=[F,J],at=[$,F,J],B=o=>ot.indexOf(o)>=0,r=o=>o===ut,a=o=>ct.indexOf(o)>=0,g=o=>it.indexOf(o)===-1,R=o=>at.indexOf(o)>=0,P=o=>o===A||o===E||o===H,gt=o=>o===H,At=()=>{O++},ht=o=>Ne(_e(o,Y)),pt=(o,h)=>{S!==""&&h&&(S=""),S===""&&w.includes(o)&&(S=o)},u=St(t,{onSkip:At});function _(o,h){const p=ye(o,h,T,O);rt(p),d+=1,f[d]=p}function kt(o,h){if(x===1){const y=Q=>!(Q===$||a(Q)),M=o.grabWhile(y),V=o.isLast(),D=o.getCurr()!==$;return o.skip(),V||D?_(Nt,ht(M)):_(he,M),V?0:D?1:2}if(x===2){let y=!1;const M=D=>{const Q=D===Y,Ft=o.getPrev(),Et=o.getNext(),Ht=Ft===H,Yt=Et===$,qt=a(D),zt=a(Et);return y&&R(D)?!0:Q&&!Ht&&(y=!y,!y&&!(Yt||zt))?!1:h?!0:qt===!1},V=o.grabWhile(M);return o.skip(),_(Nt,ht(V)),o.isLast()?0:1}const p=y=>!(y===$||a(y)||o.isLast()),b=o.grabWhile(p);return _(_t,b),pt(b),o.skip(),h?2:o.includes($)?1:2}function vt(){const o=u.getCurr(),h=u.getNext();u.skip();const p=u.substrUntilChar(E),b=p.length===0||p.indexOf(A)>=0;if(B(h)||b||u.isLast())return _(I,o),0;const W=p.indexOf($)===-1,y=p[0]===v;if(W||y){const M=u.grabWhile(V=>V!==E);return u.skip(),_(_t,M),pt(M,y),0}return 2}function jt(){const h=u.grabWhile(W=>W!==E,!0),p=St(h,{onSkip:At}),b=p.includes(F);for(x=0;p.hasNext();)x=kt(p,!b);return u.skip(),0}function Kt(){if(r(u.getCurr()))return _(Ee,u.getCurr()),u.skip(),O=0,T++,0;if(a(u.getCurr())){const h=u.grabWhile(a);return _(pe,h),0}if(u.getCurr()===A){if(S){const h=A.length+v.length+S.length,p=`${A}${v}${S}`;if(u.grabN(h)===p)return 1}else if(u.includes(E))return 1;return _(I,u.getCurr()),u.skip(),0}if(z){if(gt(u.getCurr())){const b=u.getCurr(),W=u.getNext();return u.skip(),P(W)?(u.skip(),_(I,W),0):(_(I,b),0)}const h=b=>g(b)&&!gt(b),p=u.grabWhile(h);return _(I,p),0}const o=u.grabWhile(g);return _(I,o),0}function Ut(){for(N=0;u.hasNext();)switch(N){case 1:N=vt();break;case 2:N=jt();break;case 0:default:N=Kt();break}return f.length=d+1,f}function Bt(o){const h=A+v+o.getValue();return t.indexOf(h)>-1}return{tokenize:Ut,isTokenNested:Bt}}const me=(t,e={})=>{const n=e,s=n.openTag||j,i=n.closeTag||K,l=(n.onlyAllowTags||[]).filter(Boolean).map(r=>r.toLowerCase());let c=null;const C=X(),T=X(),O=X(),d=X(),N=new Set,x=r=>{const a=r.getValue();return!N.has(a)&&c.isTokenNested&&c.isTokenNested(r)?(N.add(a),!0):N.has(a)},S=r=>!!N.has(r),f=r=>l.length?l.indexOf(r.toLowerCase())>=0:!0,A=()=>{O.flushLast()&&d.flushLast()},E=()=>{const r=T.getLast();return r&&Array.isArray(r.content)?r.content:C.toArray()},z=(r,a=!0)=>{const g=E();Array.isArray(g)&&(g.push(r.toTagStart({openTag:s,closeTag:i})),r.content.length&&(r.content.forEach(R=>{g.push(R)}),a&&g.push(r.toTagEnd({openTag:s,closeTag:i}))))},w=r=>{const a=E();Array.isArray(a)&&(tt(r)?f(r.tag)?a.push(r.toTagNode()):z(r):a.push(r))},rt=r=>{A();const a=G.create(r.getValue()),g=x(r);O.push(a),g?T.push(a):w(a)},ot=r=>{A();const a=T.flushLast();if(a)w(a);else if(typeof n.onError=="function"){const g=r.getValue(),R=r.getLine(),P=r.getColumn();n.onError({message:`Inconsistent tag '${g}' on line ${R} and column ${P}`,tagName:g,lineNumber:R,columnNumber:P})}},it=r=>{r.isStart()&&rt(r),r.isEnd()&&ot(r)},ct=r=>{const a=O.getLast(),g=r.getValue(),R=S(r);if(a)if(r.isAttrName())d.push(g),a.attr(d.getLast(),"");else if(r.isAttrValue()){const P=d.getLast();P?(a.attr(P,g),d.flushLast()):a.attr(g,g)}else r.isText()?R?a.append(g):w(g):r.isTag()&&w(r.toString());else r.isText()?w(g):r.isTag()&&w(r.toString())},at=r=>{r.isTag()?it(r):ct(r)};c=(e.createTokenizer?e.createTokenizer:Le)(t,{onToken:at,openTag:s,closeTag:i,onlyAllowTags:n.onlyAllowTags,contextFreeTags:n.contextFreeTags,enableEscapeTags:n.enableEscapeTags}),c.tokenize();const B=T.flushLast();return B&&S(B.tag)&&z(B,!1),C.toArray()},Tt=t=>typeof t=="object",Oe=t=>typeof t=="boolean";function U(t,e){const n=t;if(Array.isArray(n))for(let s=0;s[].some.call(e,s=>nt(n,s))):Object.keys(t).every(n=>{const s=e[n],i=t[n];return Tt(i)&&i!==null&&s!==null?nt(i,s):Oe(i)?i!==(s===null):s===i})}function bt(t,e){return Array.isArray(t)?U(this,n=>{for(let s=0;snt(t,n)?e(n):n)}function Ce(t){return U(this,t)}function xe(t){const e=typeof t=="function"?[t]:t||[];let n={skipParse:!1};return{process(s,i){n=i||{};const l=n.parser||me,c=n.render,C=n.data||null;if(typeof l!="function")throw new Error('"parser" is not a function, please pass to "process(input, { parser })" right function');let T=n.skipParse?s||[]:l(s,n);const O=T;return T.messages=[],T.options=n,T.walk=Ce,T.match=bt,e.forEach(d=>{T=d(T,{parse:l,render:c,iterate:U,match:bt,data:C})||T}),{get html(){if(typeof c!="function")throw new Error('"render" function not defined, please pass to "process(input, { render })"');return c(T,T.options)},tree:T,raw:O,messages:T.messages}}}}const we="/>",Re="",We=(t,{stripTags:e=!1})=>{if(!t)return"";const n=typeof t;return n==="string"||n==="number"?t:n==="object"?e===!0?Z(t.content,{stripTags:e}):t.content===null?[yt,t.tag,et(t.attrs),we].join(""):[yt,t.tag,et(t.attrs),Lt,Z(t.content),Re,t.tag,Lt].join(""):Array.isArray(t)?Z(t,{stripTags:e}):""},Z=(t,{stripTags:e=!1}={})=>[].concat(t).reduce((n,s)=>n+We(s,{stripTags:e}),""),$e=(t,e,n)=>xe(e).process(t,{...n,render:Z}).html,Ge=t=>typeof t=="object"&&!!t.tag;function Pe(t,e,n,s){e.walk(i=>Ge(i)&&t[i.tag]?t[i.tag](i,n,s):i)}function It(t,e=Pe){const n=(s={})=>{n.options=Object.assign(n.options||{},s);const i=(l,c)=>e(t,l,c,n.options);return i.options=n.options,i};return n.extend=s=>It(s(t,n.options),e),n}const Me=(t,e)=>t[0]===e,mt={color:t=>`color:${t};`,size:t=>`font-size:${t};`},Ve=t=>Object.keys(t).reduce((e,n)=>mt[n]?e.concat(mt[n](t[n])):e,[]).join(" "),De=t=>{let e=0;const n=[],s=()=>G.create("li"),i=c=>{n[e]=n[e]||c},l=c=>{n[e]&&n[e].content?n[e].content=n[e].content.concat(c):n[e]=n[e].concat(c)};return t.forEach(c=>{Ot(c)&&Me(c,"*")?(n[e]&&e++,i(s()),l(c.substr(1))):tt(c)&&G.isOf(c,"*")?(n[e]&&e++,i(s())):tt(n[e])?n[e]?l(c):i(c):(e++,i(c))}),[].concat(n)},Ie=(t,e)=>q(t.attrs)?q(t.attrs):e(t.content),L=(t,e,n)=>({tag:t,attrs:e,content:n}),k=t=>({style:t}),ke={b:t=>L("span",k("font-weight: bold;"),t.content),i:t=>L("span",k("font-style: italic;"),t.content),u:t=>L("span",k("text-decoration: underline;"),t.content),s:t=>L("span",k("text-decoration: line-through;"),t.content),url:(t,{render:e},n)=>L("a",{href:Ie(t,e)},t.content),img:(t,{render:e})=>L("img",{src:e(t.content)},null),quote:t=>L("blockquote",{},[L("p",{},t.content)]),code:t=>L("pre",{},t.content),style:t=>L("span",k(Ve(t.attrs)),t.content),list:t=>{const e=q(t.attrs);return L(e?"ol":"ul",e?{type:e}:{},De(t.content))},color:t=>L("span",k(`color: ${q(t.attrs)};`),t.content)},ve=It(ke),je={class:"bbcode"},Ke=["innerHTML"],Ue=Qt({__name:"BBCodeView",setup(t){const e=Jt(""),s={setCode:i=>{e.value=$e(i.code||"",ve())}};return Xt(()=>{window.bbcode=s,window.mounted=!0}),(i,l)=>(ee(),Zt("div",je,[te("div",{innerHTML:e.value},null,8,Ke)]))}}),Fe=ne(Ue,[["__scopeId","data-v-a57e7426"]]);export{Fe as default}; diff --git a/app/src/main/assets/h5/assets/BlogView-p4wu9TU3.js b/app/src/main/assets/h5/assets/BlogView-MBic_I3A.js similarity index 93% rename from app/src/main/assets/h5/assets/BlogView-p4wu9TU3.js rename to app/src/main/assets/h5/assets/BlogView-MBic_I3A.js index 55a3b39b..1a74e33d 100644 --- a/app/src/main/assets/h5/assets/BlogView-p4wu9TU3.js +++ b/app/src/main/assets/h5/assets/BlogView-MBic_I3A.js @@ -1 +1 @@ -import{d as V,r as n,a as S,o as x,c as l,b as a,t as r,w as I,e as i,u as b,F as N,f as R,g as v,h as f,n as h,i as c}from"./index-7eRT9hrs.js";import{c as m,R as D,C as L,B as M,a as T,W as H}from"./BottomSpinnerView-r3MJ3GpY.js";const J={key:0,class:"blog",id:"blog"},U={class:"blog-title"},F=["onClick"],P={class:"blog-author"},z={class:"blog-time"},E=["innerHTML"],O={key:0,class:"blog-tag"},W=a("div",{class:"tip"},"标签:",-1),j={class:"blog-tag-item"},q={key:1,class:"divider"},C=10,Q=V({__name:"BlogView",setup(A){const t=n({}),_=n(),w=n(new Date().getDate()),u=n(1),g=n("desc"),d=S([]),p=n("哼!Bangumi老娘我是有底线的人"),k={loadBlogDetail:async e=>{t.value=e,await h(),m.optContentJs(_.value)}},y=async e=>{const s=window.android.onLoadComments(u.value,C,g.value),o=JSON.parse(s);o.length==0?e.complete():(await m.delay(200),d.push(...o),u.value++,await h(),o.length{var s,o;const e=((s=t.value)==null?void 0:s.userId)||"";window.android&&e&&window.android&&window.android.onClickUser(e,(o=t.value)==null?void 0:o.id)};return x(()=>{window.robotSay=e=>{p.value=e},m.initComment(null,()=>d,e=>{g.value=e,u.value=1,d.length=0,w.value++}),window.blog=k,window.mounted=!0}),(e,s)=>t.value.id?(c(),l("div",J,[a("div",U,r(t.value.title),1),a("div",{class:"blog-info",onClick:I(B,["stop"])},[a("div",P,r(t.value.userName),1),a("div",z,r(t.value.time),1)],8,F),i(D,{related:t.value.related},null,8,["related"]),a("div",{class:"blog-content",ref_key:"blogContentRef",ref:_,innerHTML:b(m).optText(t.value.content)},null,8,E),(t.value.tags||[]).length>0?(c(),l("div",O,[W,(c(!0),l(N,null,R(t.value.tags||[],o=>(c(),l("div",j,r(o.title),1))),256))])):v("",!0),t.value.content?(c(),l("div",q)):v("",!0),i(L,{target:"#blog",comments:d,sort:g.value},null,8,["comments","sort"]),i(b(H),{class:"loading",target:"#blog",identifier:w.value,distance:300,onInfinite:y},{spinner:f(()=>[i(M)]),complete:f(()=>[i(T,{message:p.value},null,8,["message"])]),_:1},8,["identifier"])])):v("",!0)}});export{Q as default}; +import{d as V,r as n,a as S,o as x,c as l,b as a,t as r,w as I,e as i,u as b,F as N,f as R,g as v,h as f,n as h,i as c}from"./index-KiD6n6db.js";import{c as m,R as D,C as L,B as M,a as T,W as H}from"./BottomSpinnerView-_3O8hS20.js";const J={key:0,class:"blog",id:"blog"},U={class:"blog-title"},F=["onClick"],P={class:"blog-author"},z={class:"blog-time"},E=["innerHTML"],O={key:0,class:"blog-tag"},W=a("div",{class:"tip"},"标签:",-1),j={class:"blog-tag-item"},q={key:1,class:"divider"},C=10,Q=V({__name:"BlogView",setup(A){const t=n({}),_=n(),w=n(new Date().getDate()),u=n(1),g=n("desc"),d=S([]),p=n("哼!Bangumi老娘我是有底线的人"),k={loadBlogDetail:async e=>{t.value=e,await h(),m.optContentJs(_.value)}},y=async e=>{const s=window.android.onLoadComments(u.value,C,g.value),o=JSON.parse(s);o.length==0?e.complete():(await m.delay(200),d.push(...o),u.value++,await h(),o.length{var s,o;const e=((s=t.value)==null?void 0:s.userId)||"";window.android&&e&&window.android&&window.android.onClickUser(e,(o=t.value)==null?void 0:o.id)};return x(()=>{window.robotSay=e=>{p.value=e},m.initComment(null,()=>d,e=>{g.value=e,u.value=1,d.length=0,w.value++}),window.blog=k,window.mounted=!0}),(e,s)=>t.value.id?(c(),l("div",J,[a("div",U,r(t.value.title),1),a("div",{class:"blog-info",onClick:I(B,["stop"])},[a("div",P,r(t.value.userName),1),a("div",z,r(t.value.time),1)],8,F),i(D,{related:t.value.related},null,8,["related"]),a("div",{class:"blog-content",ref_key:"blogContentRef",ref:_,innerHTML:b(m).optText(t.value.content)},null,8,E),(t.value.tags||[]).length>0?(c(),l("div",O,[W,(c(!0),l(N,null,R(t.value.tags||[],o=>(c(),l("div",j,r(o.title),1))),256))])):v("",!0),t.value.content?(c(),l("div",q)):v("",!0),i(L,{target:"#blog",comments:d,sort:g.value},null,8,["comments","sort"]),i(b(H),{class:"loading",target:"#blog",identifier:w.value,distance:300,onInfinite:y},{spinner:f(()=>[i(M)]),complete:f(()=>[i(T,{message:p.value},null,8,["message"])]),_:1},8,["identifier"])])):v("",!0)}});export{Q as default}; diff --git a/app/src/main/assets/h5/assets/BottomSpinnerView-FlWfsOPZ.css b/app/src/main/assets/h5/assets/BottomSpinnerView-OFAEnm-Q.css similarity index 68% rename from app/src/main/assets/h5/assets/BottomSpinnerView-FlWfsOPZ.css rename to app/src/main/assets/h5/assets/BottomSpinnerView-OFAEnm-Q.css index b433197c..6ed8b7bb 100644 --- a/app/src/main/assets/h5/assets/BottomSpinnerView-FlWfsOPZ.css +++ b/app/src/main/assets/h5/assets/BottomSpinnerView-OFAEnm-Q.css @@ -1 +1 @@ -.image-container[data-v-b3953fd3]{width:var(--4123973e);height:var(--16ed4428);overflow:hidden;display:block}.image-container img[data-v-b3953fd3]{object-fit:cover;margin:0!important;padding:0!important;border-radius:0!important;border:none!important;width:100%;height:100%;display:block;background:var(--surface-container-color);flex-shrink:0}.relative[data-v-1217f2f5]{width:100%;display:flex;flex-flow:column nowrap}.relative .relative-subject[data-v-1217f2f5]{margin:16px;padding:12px;border-radius:6px;background-color:var(--surface-container-color)}.relative .relative-subject .relative[data-v-1217f2f5]{width:100%;display:flex;flex-flow:row nowrap;align-items:center;margin-top:6px}.relative .relative-subject .cover[data-v-1217f2f5]{margin:6px 0;border-radius:6px;background-color:var(--surface-container-color)}.relative .relative-subject .title[data-v-1217f2f5]{width:0;flex:1;padding:2px 6px 4px 12px;color:var(--primary-color)}.robot[data-v-3540c0b3]{width:100%;height:400px;display:flex;flex-flow:column nowrap;align-items:center}.robot .message[data-v-3540c0b3]{padding:16px 60px;font-size:12px;color:var(--on-surface-variant-color);text-align:center}.robot .robot-pic[data-v-3540c0b3]{border-radius:0!important;border:none!important;margin:0 auto;background:#333333}.robot .robot-pic[data-v-3540c0b3]{left:-40px;background:url(./bg_bangumi-zgoKjpW4.png) 0 -10px no-repeat;background-size:280px 75px;width:40px;height:50px}.robot .robot-1[data-v-3540c0b3]{background-position:-40px 0}.robot .robot-2[data-v-3540c0b3]{background-position:-80px 0}.robot .robot-3[data-v-3540c0b3]{background-position:-120px 0}.robot .robot-4[data-v-3540c0b3]{background-position:-160px 0}.robot .robot-5[data-v-3540c0b3]{background-position:-200px 0}.robot .robot-6[data-v-3540c0b3]{background-position:-240px 0}.emoji-container[data-v-197f4999]{width:fit-content;display:flex;flex-flow:row wrap}.emoji-container .emoji[data-v-197f4999]{width:fit-content;display:flex;flex-flow:row nowrap;align-items:center;padding:4px 12px;margin:6px 12px 6px 0;border-radius:100px;background:var(--surface-container-color)}.emoji-container .emoji.selected[data-v-197f4999]{background:#ffc4d7}.emoji-container .emoji.selected span[data-v-197f4999]{color:var(--primary-color)}.emoji-container .emoji .smile[data-v-197f4999]{height:20px;width:20px;line-height:20px;margin:0!important;padding:1px;border:none!important;background:transparent!important;border-radius:0!important}.emoji-container .emoji .user-count[data-v-197f4999]{color:var(--on-surface-variant-color);padding:0 0 0 6px;line-height:20px;font-size:14px}.comment[data-v-eba1bdb1]{width:100%;display:flex;flex-flow:column nowrap;padding:12px 16px;min-height:300px}.comment .comment-title[data-v-eba1bdb1]{display:flex;flex-flow:row nowrap;padding-bottom:16px;align-items:center;font-size:16px}.comment .comment-title .title[data-v-eba1bdb1]{color:var(--on-surface-color);font-weight:700}.comment .comment-title .sort[data-v-eba1bdb1]{margin-left:16px;font-size:16px;color:var(--primary-color)}.comment .comment-title .write[data-v-eba1bdb1]{color:var(--primary-color);font-weight:700}.comment .comment-item[data-v-eba1bdb1]{display:flex;flex-flow:row nowrap}.comment .comment-item .avatar[data-v-eba1bdb1]{margin:6px 0;border-radius:6px;background:var(--surface-container-color)}.comment .comment-item .comment-content[data-v-eba1bdb1]{padding-bottom:12px;margin-left:12px;width:0;flex:1}.comment .comment-item .comment-content .info[data-v-eba1bdb1]{width:100%;display:flex;flex-flow:row nowrap;align-items:center}.comment .comment-item .comment-content .info .user-name[data-v-eba1bdb1]{font-size:14px;color:var(--on-surface-color);opacity:.75;padding:4px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:50%}.comment .comment-item .comment-content .info .user-name.sub[data-v-eba1bdb1]{max-width:35%}.comment .comment-item .comment-content .info .time[data-v-eba1bdb1]{font-size:12px;color:var(--on-surface-variant-color);opacity:.5;margin-left:12px}.comment .comment-item .comment-content .info .floor[data-v-eba1bdb1]{padding:0 6px}.comment .comment-item .comment-content .info .action[data-v-eba1bdb1]{height:24px;width:24px;flex-shrink:0;line-height:24px;margin:0!important;box-sizing:border-box;padding:1px 0!important;border:none;filter:invert(.5)}.comment .comment-item .comment-content .topic-html[data-v-eba1bdb1]{width:100%;max-width:100%;word-break:break-all;overflow-x:hidden!important}.comment .comment-item .comment-content .topic-html img[data-v-eba1bdb1]{min-width:120px}.comment .comment-item .comment-content .sub-reply[data-v-eba1bdb1]{width:100%;display:flex;flex-flow:column nowrap}.spinner-container[data-v-18fb154c]{display:flex;flex-flow:column;align-items:center;height:60px;width:100%}.spinner[data-v-18fb154c]{border:2px solid rgba(0,0,0,.1);border-top:2px solid var(--primary-color);border-radius:50%;width:24px;height:24px;animation:spin-18fb154c 1s linear infinite}@keyframes spin-18fb154c{0%{transform:rotate(0)}to{transform:rotate(360deg)}} +.image-container[data-v-b3953fd3]{width:var(--4123973e);height:var(--16ed4428);overflow:hidden;display:block}.image-container img[data-v-b3953fd3]{object-fit:cover;margin:0!important;padding:0!important;border-radius:0!important;border:none!important;width:100%;height:100%;display:block;background:var(--surface-container-color);flex-shrink:0}.relative[data-v-1217f2f5]{width:100%;display:flex;flex-flow:column nowrap}.relative .relative-subject[data-v-1217f2f5]{margin:16px;padding:12px;border-radius:6px;background-color:var(--surface-container-color)}.relative .relative-subject .relative[data-v-1217f2f5]{width:100%;display:flex;flex-flow:row nowrap;align-items:center;margin-top:6px}.relative .relative-subject .cover[data-v-1217f2f5]{margin:6px 0;border-radius:6px;background-color:var(--surface-container-color)}.relative .relative-subject .title[data-v-1217f2f5]{width:0;flex:1;padding:2px 6px 4px 12px;color:var(--primary-color)}.robot[data-v-3540c0b3]{width:100%;height:400px;display:flex;flex-flow:column nowrap;align-items:center}.robot .message[data-v-3540c0b3]{padding:16px 60px;font-size:12px;color:var(--on-surface-variant-color);text-align:center}.robot .robot-pic[data-v-3540c0b3]{border-radius:0!important;border:none!important;margin:0 auto;background:#333333}.robot .robot-pic[data-v-3540c0b3]{left:-40px;background:url(./bg_bangumi-zgoKjpW4.png) 0 -10px no-repeat;background-size:280px 75px;width:40px;height:50px}.robot .robot-1[data-v-3540c0b3]{background-position:-40px 0}.robot .robot-2[data-v-3540c0b3]{background-position:-80px 0}.robot .robot-3[data-v-3540c0b3]{background-position:-120px 0}.robot .robot-4[data-v-3540c0b3]{background-position:-160px 0}.robot .robot-5[data-v-3540c0b3]{background-position:-200px 0}.robot .robot-6[data-v-3540c0b3]{background-position:-240px 0}.emoji-container[data-v-197f4999]{width:fit-content;display:flex;flex-flow:row wrap}.emoji-container .emoji[data-v-197f4999]{width:fit-content;display:flex;flex-flow:row nowrap;align-items:center;padding:4px 12px;margin:6px 12px 6px 0;border-radius:100px;background:var(--surface-container-color)}.emoji-container .emoji.selected[data-v-197f4999]{background:#ffc4d7}.emoji-container .emoji.selected span[data-v-197f4999]{color:var(--primary-color)}.emoji-container .emoji .smile[data-v-197f4999]{height:20px;width:20px;line-height:20px;margin:0!important;padding:1px;border:none!important;background:transparent!important;border-radius:0!important}.emoji-container .emoji .user-count[data-v-197f4999]{color:var(--on-surface-variant-color);padding:0 0 0 6px;line-height:20px;font-size:14px}.comment[data-v-829b08c6]{width:100%;display:flex;flex-flow:column nowrap;padding:12px 16px;min-height:300px}.comment .comment-title[data-v-829b08c6]{display:flex;flex-flow:row nowrap;padding-bottom:16px;align-items:center;font-size:16px}.comment .comment-title .title[data-v-829b08c6]{color:var(--on-surface-color);font-weight:700}.comment .comment-title .sort[data-v-829b08c6]{margin-left:16px;font-size:16px;color:var(--primary-color)}.comment .comment-title .write[data-v-829b08c6]{color:var(--primary-color);font-weight:700}.comment .comment-item[data-v-829b08c6]{display:flex;flex-flow:row nowrap}.comment .comment-item .avatar[data-v-829b08c6]{margin:6px 0;border-radius:6px;background:var(--surface-container-color)}.comment .comment-item .comment-content[data-v-829b08c6]{padding-bottom:12px;margin-left:12px;width:0;flex:1}.comment .comment-item .comment-content .info[data-v-829b08c6]{width:100%;display:flex;flex-flow:row nowrap;align-items:center}.comment .comment-item .comment-content .info .user-name[data-v-829b08c6]{font-size:14px;color:var(--on-surface-color);opacity:.75;padding:4px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:50%}.comment .comment-item .comment-content .info .user-name.sub[data-v-829b08c6]{max-width:35%}.comment .comment-item .comment-content .info .time[data-v-829b08c6]{font-size:12px;color:var(--on-surface-variant-color);opacity:.5;margin-left:12px}.comment .comment-item .comment-content .info .floor[data-v-829b08c6]{padding:0 6px}.comment .comment-item .comment-content .info .action[data-v-829b08c6]{height:24px;width:24px;flex-shrink:0;line-height:24px;margin:0!important;box-sizing:border-box;padding:1px 0!important;border:none;filter:invert(.5)}.comment .comment-item .comment-content .topic-html[data-v-829b08c6]{width:100%;max-width:100%;line-height:1.5;word-break:break-all;overflow-x:hidden!important}.comment .comment-item .comment-content .topic-html img[data-v-829b08c6]{min-width:120px}.comment .comment-item .comment-content .sub-reply[data-v-829b08c6]{width:100%;display:flex;flex-flow:column nowrap}.spinner-container[data-v-18fb154c]{display:flex;flex-flow:column;align-items:center;height:60px;width:100%}.spinner[data-v-18fb154c]{border:2px solid rgba(0,0,0,.1);border-top:2px solid var(--primary-color);border-radius:50%;width:24px;height:24px;animation:spin-18fb154c 1s linear infinite}@keyframes spin-18fb154c{0%{transform:rotate(0)}to{transform:rotate(360deg)}} diff --git a/app/src/main/assets/h5/assets/BottomSpinnerView-r3MJ3GpY.js b/app/src/main/assets/h5/assets/BottomSpinnerView-_3O8hS20.js similarity index 98% rename from app/src/main/assets/h5/assets/BottomSpinnerView-r3MJ3GpY.js rename to app/src/main/assets/h5/assets/BottomSpinnerView-_3O8hS20.js index 42f5e58a..9d1f7468 100644 --- a/app/src/main/assets/h5/assets/BottomSpinnerView-r3MJ3GpY.js +++ b/app/src/main/assets/h5/assets/BottomSpinnerView-_3O8hS20.js @@ -1 +1 @@ -import{d as I,j as K,k as $,o as A,i as f,c as g,b as l,u as C,_ as R,t as k,F as j,f as L,g as b,w as y,e as S,r as q,p as T,l as V,m as Q,q as U,s as X,v as Z,x as tt,y as et,z as M,n as W}from"./index-7eRT9hrs.js";const ot={class:"image-container"},st=["src"],nt=I({__name:"ImageView",props:{src:{type:String},width:{type:String,default:"100%"},height:{type:String,default:"100%"}},setup(t){K(i=>({"4123973e":C(s),"16ed4428":C(n)}));const o=t,{src:e,width:s,height:n}=$(o),d=async i=>{const r=i.currentTarget;r.src="/ic_holder.jpg"};return A(()=>{console.log("Component mounted")}),(i,r)=>(f(),g("div",ot,[l("img",{class:"image",src:C(e),alt:"Image",onError:r[0]||(r[0]=u=>d(u))},null,40,st)]))}}),J=R(nt,[["__scopeId","data-v-b3953fd3"]]),it={key:0,class:"relative"},rt={class:"relative-subject"},ct={class:"tip"},lt=["onClick"],at={class:"title"},dt=I({__name:"RelativeItemView",props:{related:{type:Object,required:!1}},setup(t){const o=t,{related:e}=$(o),s=n=>{window.android&&window.android.onClickRelated(JSON.stringify(n))};return(n,d)=>C(e)&&C(e).items.length?(f(),g("div",it,[l("div",rt,[l("div",ct,k(C(e).title),1),(f(!0),g(j,null,L(C(e).items,i=>(f(),g("div",{class:"relative",onClick:y(r=>s(i),["stop"])},[S(J,{class:"cover",height:"44px",width:"44px",src:i.image},null,8,["src"]),l("div",at,"# "+k(i.title),1)],8,lt))),256))])])):b("",!0)}}),me=R(dt,[["__scopeId","data-v-1217f2f5"]]),pt=t=>(T("data-v-3540c0b3"),t=t(),V(),t),ut={class:"robot"},mt=pt(()=>l("div",{style:{flex:"1"}},null,-1)),_t={class:"message"},ft=I({__name:"BottomRobotView",props:{message:{type:String,required:!0}},setup(t){const o=t,{message:e}=$(o),s=q(),n=["robot-1","robot-2","robot-3","robot-4","robot-5","robot-6"];return A(()=>{var i;const d=Math.floor(Math.random()*n.length);return(i=s.value)==null?void 0:i.classList.add(n[d])}),(d,i)=>(f(),g("div",ut,[mt,l("div",{class:"robot-pic",ref_key:"robot",ref:s},null,512),l("div",_t,k(C(e)),1)]))}}),_e=R(ft,[["__scopeId","data-v-3540c0b3"]]),H="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1702628742133'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='7098'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='24'%20height='24'%3e%3cpath%20d='M863.701333%20202.965333a256%20256%200%200%201%2010.069334%20351.402667l-346.709334%20347.221333a21.333333%2021.333333%200%200%201-30.208%200l-346.624-347.221333a256%20256%200%200%201%20361.813334-361.130667%20255.914667%20255.914667%200%200%201%20351.658666%209.728zM220.672%20263.338667a170.666667%20170.666667%200%200%200-8.192%20232.576L512%20795.904l299.52-299.946667a170.666667%20170.666667%200%200%200-240.896-240.64L421.504%20404.48a42.666667%2042.666667%200%200%201-60.373333-60.373333l90.368-90.410667-3.498667-2.944a170.666667%20170.666667%200%200%200-227.328%2012.586667z'%20fill='%23000000'%20p-id='7099'%3e%3c/path%3e%3c/svg%3e";function gt(t){if(!t)return;const o=t.querySelectorAll("img"),e=[];for(let s=0;s0&&d.indexOf("/img/smiles")==-1&&(e.push(d),n.onclick=()=>{window.android&&window.android.onPreviewImage(d,e)})}t.querySelectorAll("span.text_mask").forEach(s=>{const n=s;n.onclick=d=>{d.preventDefault(),F(d.currentTarget)}})}const vt=t=>{if(F(t))return!0;const o=t.tagName.toLowerCase();if(o=="a")return!0;if(o=="img"&&window.android){const e=t;return e.getAttribute("smileid")==null&&window.android.onPreviewImage(e.src,[e.src]),!0}return!1},F=t=>{const o=O(t,".text_mask");return o?(o.classList.contains("show")?o.classList.remove("show"):o.classList.add("show"),!0):!1},O=(t,o,e=3,s=0)=>!t||s>e?null:t.matches(o)?t:O(t.parentElement,o,e,s+1),ht=(t,o,e)=>{const s=t.currentTarget;if(s&&o){const n=s.getBoundingClientRect();o.scrollTo({top:o.scrollTop+n.top-(e?40:10),behavior:"smooth"});const d=O(s,".comment-item",5);if(d!=null){const i=()=>{d.classList.remove("blinking"),d.removeEventListener("animationend",i)};d.classList.add("blinking"),d.addEventListener("animationend",i)}}},wt=(t,o)=>{let e=o.replace(/
([^^]*?)<\/div>/,"").replace(/([^^]*?)<\/span>/,"").replace(/<\/?[^>]+>/g,"").replace(/</g,"<").replace(/>/g,">").replace(/\B@([^\W_]\w*)\b/g,"@$1");return e.length>100&&(e=e.slice(0,100)+"..."),"[quote][b]"+t+"[/b] 说: "+e+"[/quote]"},yt=t=>"  "+(t||"").trim().replace(/ /g," ").trim();async function kt(t){return new Promise(o=>setTimeout(o,t))}const Ct=(t,o,e)=>{const s=r=>{for(const u in r){const _=r[u];let v=!1;if(o().forEach(a=>{a.id==u&&(v=!0)}),!v){const a=_.pst_id,m=_.pst_uid,c=z(_,a,m,!1);o().unshift(c)}}},n=r=>{for(const u in r){const _=r[u];let v=null;if(o().forEach(a=>{a.id==u&&(v=a)}),v!=null){const a=v,m=a.id,c=a.userId,w=a.topicSubReply.map(h=>h.id),p=_.map(h=>z(h,m,c,!0)).filter(h=>!w.includes(h.id));a.topicSubReply.push(...p)}}},d=r=>{var v,a;const u=(v=r.posts)==null?void 0:v.main;u!=null&&s(u);const _=(a=r.posts)==null?void 0:a.sub;_!=null&&n(_)},i=r=>{console.log("刷新贴贴:"+JSON.stringify(r,null,2));for(const u in r){const _=r[u];t&&t(u,_),o().forEach(v=>{v.id==u&&(v.emojis=_||[]),v.topicSubReply.forEach(a=>{a.id==u&&(a.emojis=_||[])})})}};window.comment={addComment:d,refreshEmoji:i,changeSort:e}},z=(t,o,e,s=!1)=>{const n={},d=s?1:0,i=s?t.pst_id:0,r=t.pst_uid,u=t.avatar||"";return n.id=t.pst_id,n.time=t.dateline,n.userAvatar=u.startsWith("//")?"https:"+u:u,n.userName=t.nickname,n.userId=t.username,n.replyContent=t.pst_content,n.replyJs=`subReply('${t.model}', ${t.pst_mid}, ${o}, ${i}, ${r}, ${e}, ${d})`,n.topicSubReply=[],n.emojiParam={enable:!1},n.emojis=[],n},E={optContentJs:gt,optText:yt,optReplyItemClick:vt,optReplyContent:wt,scrollIntoView:ht,delay:kt,initComment:Ct},xt={class:"emoji-container"},It=["onClick"],$t=["src"],St={class:"user-count"},bt=I({__name:"EmojiView",props:{emojis:{type:Array,required:!0},comment:{type:Object,required:!0}},setup(t){const o=t,{emojis:e,comment:s}=$(o),n=i=>{try{const r=parseInt(i);return r===0?"https://bgm.tv/img/smiles/tv/44.gif":`https://bgm.tv/img/smiles/tv/${r-39}.gif`}catch{return""}},d=i=>{const r=s==null?void 0:s.value;window.android.onToggleSmile(r.id,r.gh,JSON.stringify(i))};return(i,r)=>(f(),g("div",xt,[(f(!0),g(j,null,L(C(e),u=>(f(),g("div",{class:Q(["emoji",{selected:u.selected}]),key:u.value,onClick:y(_=>d(u),["stop"])},[l("img",{class:"smile",src:n(u.value),alt:"smile"},null,8,$t),l("span",St,k(u.users.length),1)],10,It))),128))]))}}),D=R(bt,[["__scopeId","data-v-197f4999"]]),N=t=>(T("data-v-eba1bdb1"),t=t(),V(),t),Rt={class:"comment"},Et={class:"comment-title"},jt=N(()=>l("div",{class:"title"},"用户讨论",-1)),Lt=["onClick"],Tt=N(()=>l("div",{style:{flex:"1"}},null,-1)),Vt={class:"comment-content"},Nt=["onClick"],Bt=["onClick"],Mt={class:"time"},qt={class:"floor"},Jt=N(()=>l("div",{style:{flex:"1"}},null,-1)),At=["onClick"],Ot=["innerHTML","onClick"],Pt=["onClick"],Ut={class:"info"},Ht=["onClick"],zt={class:"time"},Dt={class:"floor"},Gt=N(()=>l("div",{style:{flex:"1"}},null,-1)),Wt=["onClick"],Ft=["innerHTML"],Yt=I({__name:"CommentView",props:{target:{type:String,required:!0},comments:{type:Array,default:[],required:!0},sort:{type:String,required:!0}},setup(t){const o=t,{target:e,comments:s,sort:n}=$(o),d=a=>{switch(a){case"desc":return"最新";case"hot":return"最热";default:return"时间"}},i=a=>{window.android&&a.userId&&window.android&&window.android.onClickUser(a.userId,a.id)},r=(a,m,c)=>{const w=a.target;if(E.optReplyItemClick(w))return;E.scrollIntoView(a,document.querySelector(e==null?void 0:e.value),c==null);const p=(c==null?void 0:c.replyJs)||"",h=m.replyJs||"",x=p.length>0,P=x?p:h,B=c||m;if(window.android){if(P.length>0){x&&(B.replyQuote=E.optReplyContent(B.userName,B.replyContent)),window.android.onReplyUser(p.length>0?p:P,JSON.stringify(c||m));return}window.android.onNeedLogin()}},u=()=>{window.android&&window.android.onClickCommentSort()},_=(a,m)=>{window.android&&window.android.onClickCommentAction(JSON.stringify(m),a.clientX,a.clientY)},v=a=>{E.scrollIntoView(a,document.querySelector(e==null?void 0:e.value),!0),window.android&&window.android.onReplyNew()};return(a,m)=>(f(),g("div",Rt,[l("div",Et,[jt,l("div",{class:"sort",onClick:y(u,["stop"])},"排序:"+k(d(C(n))),9,Lt),Tt,l("div",{class:"write",onClick:m[0]||(m[0]=y(c=>v(c),["stop"]))},"写留言")]),(f(!0),g(j,null,L(C(s),c=>{var w;return f(),g("div",{class:"comment-item",key:c.id},[S(J,{class:"avatar",width:"36px",height:"36px",src:c.userAvatar,onClick:y(p=>i(c),["stop"])},null,8,["src","onClick"]),l("div",Vt,[l("div",{class:"info",onClick:y(p=>r(p,c,null),["stop"])},[l("div",{class:"user-name",onClick:y(p=>i(c),["stop"])},k(c.userName),9,Bt),l("div",Mt,[U(k(c.time),1),l("span",qt,k(c.floor),1)]),Jt,(w=c.emojiParam)!=null&&w.enable?(f(),g("img",{key:0,class:"action",smileid:"",src:H,alt:"action",onClick:y(p=>_(p,c),["stop"])},null,8,At)):b("",!0)],8,Nt),l("div",{class:"topic-html",innerHTML:c.replyContent,onClick:y(p=>r(p,c,null),["stop"])},null,8,Ot),S(D,{emojis:c.emojis,comment:c,style:{"margin-top":"16px"}},null,8,["emojis","comment"]),(f(!0),g(j,null,L(c.topicSubReply||[],p=>{var h;return f(),g("div",{class:"comment-item",key:p.id},[S(J,{class:"avatar",height:"24px",width:"24px",src:p.userAvatar,onClick:y(x=>i(p),["stop"])},null,8,["src","onClick"]),l("div",{class:"comment-content",onClick:y(x=>r(x,c,p),["stop"])},[l("div",Ut,[l("div",{class:"user-name sub",onClick:y(x=>i(p),["stop"])},k(p.userName),9,Ht),l("div",zt,[U(k(p.time),1),l("span",Dt,k(p.floor),1)]),Gt,(h=p.emojiParam)!=null&&h.enable?(f(),g("img",{key:0,class:"action",smileid:"",src:H,alt:"action",onClick:y(x=>_(x,p),["stop"])},null,8,Wt)):b("",!0)]),l("div",{class:"topic-html",innerHTML:p.replyContent},null,8,Ft),S(D,{emojis:p.emojis,comment:c,style:{"margin-top":"16px"}},null,8,["emojis","comment"])],8,Pt)])}),128))])])}),128))]))}}),fe=R(Yt,[["__scopeId","data-v-eba1bdb1"]]);function Kt(t,o){const e=t.getBoundingClientRect();if(!o)return e.top>=0&&e.bottom<=window.innerHeight;const s=o.getBoundingClientRect();return e.top>=s.top&&e.bottom<=s.bottom}async function Qt(t){return await W(),t.value instanceof HTMLElement?t.value:t.value?document.querySelector(t.value):null}function G(t){let o=`0px 0px ${t.distance}px 0px`;t.top&&(o=`${t.distance}px 0px 0px 0px`);const e=new IntersectionObserver(s=>{s[0].isIntersecting&&(t.firstload&&t.emit(),t.firstload=!0)},{root:t.parentEl,rootMargin:o});return e.observe(t.infiniteLoading.value),e}const Y=(t,o)=>{const e=t.__vccOpts||t;for(const[s,n]of o)e[s]=n;return e},Xt={},Zt=t=>(T("data-v-d3e37633"),t=t(),V(),t),te={class:"container"},ee=Zt(()=>l("div",{class:"spinner"},null,-1)),oe=[ee];function se(t,o){return f(),g("div",te,oe)}const ne=Y(Xt,[["render",se],["__scopeId","data-v-d3e37633"]]),ie={class:"state-error"},re=I({__name:"InfiniteLoading",props:{top:{type:Boolean,default:!1},target:{},distance:{default:0},identifier:{},firstload:{type:Boolean,default:!0},slots:{}},emits:["infinite"],setup(t,{emit:o}){const e=t;let s=null,n=0;const d=q(null),i=q(""),{top:r,firstload:u,distance:_}=e,{identifier:v,target:a}=$(e),m={infiniteLoading:d,top:r,firstload:u,distance:_,parentEl:null,emit(){n=(m.parentEl||document.documentElement).scrollHeight,c.loading(),o("infinite",c)}},c={loading(){i.value="loading"},async loaded(){i.value="loaded";const w=m.parentEl||document.documentElement;await W(),r&&(w.scrollTop=w.scrollHeight-n),Kt(d.value,m.parentEl)&&m.emit()},complete(){i.value="complete",s==null||s.disconnect()},error(){i.value="error"}};return X(v,()=>{s==null||s.disconnect(),s=G(m)}),A(async()=>{m.parentEl=await Qt(a),s=G(m)}),Z(()=>{s==null||s.disconnect()}),(w,p)=>(f(),g("div",{ref_key:"infiniteLoading",ref:d,style:{"min-height":"1px"}},[tt(l("div",null,[M(w.$slots,"spinner",{},()=>[S(ne)],!0)],512),[[et,i.value=="loading"]]),i.value=="complete"?M(w.$slots,"complete",{key:0},()=>{var h;return[l("span",null,k(((h=w.slots)==null?void 0:h.complete)||"No more results!"),1)]},!0):b("",!0),i.value=="error"?M(w.$slots,"error",{key:1,retry:m.emit},()=>{var h;return[l("span",ie,[l("span",null,k(((h=w.slots)==null?void 0:h.error)||"Oops something went wrong!"),1),l("button",{class:"retry",onClick:p[0]||(p[0]=(...x)=>m.emit&&m.emit(...x))},"retry")])]},!0):b("",!0)],512))}}),ge=Y(re,[["__scopeId","data-v-a7077831"]]),ce=t=>(T("data-v-18fb154c"),t=t(),V(),t),le={key:0,class:"spinner-container"},ae=ce(()=>l("div",{class:"spinner"},null,-1)),de=[ae],pe=I({__name:"BottomSpinnerView",props:{show:{type:Boolean,default:!0}},setup(t){const o=t,{show:e}=$(o);return(s,n)=>C(e)?(f(),g("div",le,de)):b("",!0)}}),ve=R(pe,[["__scopeId","data-v-18fb154c"]]);export{ve as B,fe as C,D as E,me as R,ge as W,H as _,_e as a,E as c}; +import{d as I,j as K,k as $,o as A,i as f,c as g,b as l,u as C,_ as R,t as k,F as j,f as L,g as b,w as y,e as S,r as q,p as T,l as V,m as Q,q as U,s as X,v as Z,x as tt,y as et,z as M,n as W}from"./index-KiD6n6db.js";const ot={class:"image-container"},st=["src"],nt=I({__name:"ImageView",props:{src:{type:String},width:{type:String,default:"100%"},height:{type:String,default:"100%"}},setup(t){K(i=>({"4123973e":C(s),"16ed4428":C(n)}));const o=t,{src:e,width:s,height:n}=$(o),d=async i=>{const r=i.currentTarget;r.src="/ic_holder.jpg"};return A(()=>{console.log("Component mounted")}),(i,r)=>(f(),g("div",ot,[l("img",{class:"image",src:C(e),alt:"Image",onError:r[0]||(r[0]=u=>d(u))},null,40,st)]))}}),J=R(nt,[["__scopeId","data-v-b3953fd3"]]),it={key:0,class:"relative"},rt={class:"relative-subject"},ct={class:"tip"},lt=["onClick"],at={class:"title"},dt=I({__name:"RelativeItemView",props:{related:{type:Object,required:!1}},setup(t){const o=t,{related:e}=$(o),s=n=>{window.android&&window.android.onClickRelated(JSON.stringify(n))};return(n,d)=>C(e)&&C(e).items.length?(f(),g("div",it,[l("div",rt,[l("div",ct,k(C(e).title),1),(f(!0),g(j,null,L(C(e).items,i=>(f(),g("div",{class:"relative",onClick:y(r=>s(i),["stop"])},[S(J,{class:"cover",height:"44px",width:"44px",src:i.image},null,8,["src"]),l("div",at,"# "+k(i.title),1)],8,lt))),256))])])):b("",!0)}}),me=R(dt,[["__scopeId","data-v-1217f2f5"]]),pt=t=>(T("data-v-3540c0b3"),t=t(),V(),t),ut={class:"robot"},mt=pt(()=>l("div",{style:{flex:"1"}},null,-1)),_t={class:"message"},ft=I({__name:"BottomRobotView",props:{message:{type:String,required:!0}},setup(t){const o=t,{message:e}=$(o),s=q(),n=["robot-1","robot-2","robot-3","robot-4","robot-5","robot-6"];return A(()=>{var i;const d=Math.floor(Math.random()*n.length);return(i=s.value)==null?void 0:i.classList.add(n[d])}),(d,i)=>(f(),g("div",ut,[mt,l("div",{class:"robot-pic",ref_key:"robot",ref:s},null,512),l("div",_t,k(C(e)),1)]))}}),_e=R(ft,[["__scopeId","data-v-3540c0b3"]]),H="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1702628742133'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='7098'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='24'%20height='24'%3e%3cpath%20d='M863.701333%20202.965333a256%20256%200%200%201%2010.069334%20351.402667l-346.709334%20347.221333a21.333333%2021.333333%200%200%201-30.208%200l-346.624-347.221333a256%20256%200%200%201%20361.813334-361.130667%20255.914667%20255.914667%200%200%201%20351.658666%209.728zM220.672%20263.338667a170.666667%20170.666667%200%200%200-8.192%20232.576L512%20795.904l299.52-299.946667a170.666667%20170.666667%200%200%200-240.896-240.64L421.504%20404.48a42.666667%2042.666667%200%200%201-60.373333-60.373333l90.368-90.410667-3.498667-2.944a170.666667%20170.666667%200%200%200-227.328%2012.586667z'%20fill='%23000000'%20p-id='7099'%3e%3c/path%3e%3c/svg%3e";function gt(t){if(!t)return;const o=t.querySelectorAll("img"),e=[];for(let s=0;s0&&d.indexOf("/img/smiles")==-1&&(e.push(d),n.onclick=()=>{window.android&&window.android.onPreviewImage(d,e)})}t.querySelectorAll("span.text_mask").forEach(s=>{const n=s;n.onclick=d=>{d.preventDefault(),F(d.currentTarget)}})}const vt=t=>{if(F(t))return!0;const o=t.tagName.toLowerCase();if(o=="a")return!0;if(o=="img"&&window.android){const e=t;return e.getAttribute("smileid")==null&&window.android.onPreviewImage(e.src,[e.src]),!0}return!1},F=t=>{const o=O(t,".text_mask");return o?(o.classList.contains("show")?o.classList.remove("show"):o.classList.add("show"),!0):!1},O=(t,o,e=3,s=0)=>!t||s>e?null:t.matches(o)?t:O(t.parentElement,o,e,s+1),ht=(t,o,e)=>{const s=t.currentTarget;if(s&&o){const n=s.getBoundingClientRect();o.scrollTo({top:o.scrollTop+n.top-(e?40:10),behavior:"smooth"});const d=O(s,".comment-item",5);if(d!=null){const i=()=>{d.classList.remove("blinking"),d.removeEventListener("animationend",i)};d.classList.add("blinking"),d.addEventListener("animationend",i)}}},wt=(t,o)=>{let e=o.replace(/
([^^]*?)<\/div>/,"").replace(/([^^]*?)<\/span>/,"").replace(/<\/?[^>]+>/g,"").replace(/</g,"<").replace(/>/g,">").replace(/\B@([^\W_]\w*)\b/g,"@$1");return e.length>100&&(e=e.slice(0,100)+"..."),"[quote][b]"+t+"[/b] 说: "+e+"[/quote]"},yt=t=>"  "+(t||"").trim().replace(/ /g," ").trim();async function kt(t){return new Promise(o=>setTimeout(o,t))}const Ct=(t,o,e)=>{const s=r=>{for(const u in r){const _=r[u];let v=!1;if(o().forEach(a=>{a.id==u&&(v=!0)}),!v){const a=_.pst_id,m=_.pst_uid,c=z(_,a,m,!1);o().unshift(c)}}},n=r=>{for(const u in r){const _=r[u];let v=null;if(o().forEach(a=>{a.id==u&&(v=a)}),v!=null){const a=v,m=a.id,c=a.userId,w=a.topicSubReply.map(h=>h.id),p=_.map(h=>z(h,m,c,!0)).filter(h=>!w.includes(h.id));a.topicSubReply.push(...p)}}},d=r=>{var v,a;const u=(v=r.posts)==null?void 0:v.main;u!=null&&s(u);const _=(a=r.posts)==null?void 0:a.sub;_!=null&&n(_)},i=r=>{console.log("刷新贴贴:"+JSON.stringify(r,null,2));for(const u in r){const _=r[u];t&&t(u,_),o().forEach(v=>{v.id==u&&(v.emojis=_||[]),v.topicSubReply.forEach(a=>{a.id==u&&(a.emojis=_||[])})})}};window.comment={addComment:d,refreshEmoji:i,changeSort:e}},z=(t,o,e,s=!1)=>{const n={},d=s?1:0,i=s?t.pst_id:0,r=t.pst_uid,u=t.avatar||"";return n.id=t.pst_id,n.time=t.dateline,n.userAvatar=u.startsWith("//")?"https:"+u:u,n.userName=t.nickname,n.userId=t.username,n.replyContent=t.pst_content,n.replyJs=`subReply('${t.model}', ${t.pst_mid}, ${o}, ${i}, ${r}, ${e}, ${d})`,n.topicSubReply=[],n.emojiParam={enable:!1},n.emojis=[],n},E={optContentJs:gt,optText:yt,optReplyItemClick:vt,optReplyContent:wt,scrollIntoView:ht,delay:kt,initComment:Ct},xt={class:"emoji-container"},It=["onClick"],$t=["src"],St={class:"user-count"},bt=I({__name:"EmojiView",props:{emojis:{type:Array,required:!0},comment:{type:Object,required:!0}},setup(t){const o=t,{emojis:e,comment:s}=$(o),n=i=>{try{const r=parseInt(i);return r===0?"https://bgm.tv/img/smiles/tv/44.gif":`https://bgm.tv/img/smiles/tv/${r-39}.gif`}catch{return""}},d=i=>{const r=s==null?void 0:s.value;window.android.onToggleSmile(r.id,r.gh,JSON.stringify(i))};return(i,r)=>(f(),g("div",xt,[(f(!0),g(j,null,L(C(e),u=>(f(),g("div",{class:Q(["emoji",{selected:u.selected}]),key:u.value,onClick:y(_=>d(u),["stop"])},[l("img",{class:"smile",src:n(u.value),alt:"smile"},null,8,$t),l("span",St,k(u.users.length),1)],10,It))),128))]))}}),D=R(bt,[["__scopeId","data-v-197f4999"]]),N=t=>(T("data-v-829b08c6"),t=t(),V(),t),Rt={class:"comment"},Et={class:"comment-title"},jt=N(()=>l("div",{class:"title"},"用户讨论",-1)),Lt=["onClick"],Tt=N(()=>l("div",{style:{flex:"1"}},null,-1)),Vt={class:"comment-content"},Nt=["onClick"],Bt=["onClick"],Mt={class:"time"},qt={class:"floor"},Jt=N(()=>l("div",{style:{flex:"1"}},null,-1)),At=["onClick"],Ot=["innerHTML","onClick"],Pt=["onClick"],Ut={class:"info"},Ht=["onClick"],zt={class:"time"},Dt={class:"floor"},Gt=N(()=>l("div",{style:{flex:"1"}},null,-1)),Wt=["onClick"],Ft=["innerHTML"],Yt=I({__name:"CommentView",props:{target:{type:String,required:!0},comments:{type:Array,default:[],required:!0},sort:{type:String,required:!0}},setup(t){const o=t,{target:e,comments:s,sort:n}=$(o),d=a=>{switch(a){case"desc":return"最新";case"hot":return"最热";default:return"时间"}},i=a=>{window.android&&a.userId&&window.android&&window.android.onClickUser(a.userId,a.id)},r=(a,m,c)=>{const w=a.target;if(E.optReplyItemClick(w))return;E.scrollIntoView(a,document.querySelector(e==null?void 0:e.value),c==null);const p=(c==null?void 0:c.replyJs)||"",h=m.replyJs||"",x=p.length>0,P=x?p:h,B=c||m;if(window.android){if(P.length>0){x&&(B.replyQuote=E.optReplyContent(B.userName,B.replyContent)),window.android.onReplyUser(p.length>0?p:P,JSON.stringify(c||m));return}window.android.onNeedLogin()}},u=()=>{window.android&&window.android.onClickCommentSort()},_=(a,m)=>{window.android&&window.android.onClickCommentAction(JSON.stringify(m),a.clientX,a.clientY)},v=a=>{E.scrollIntoView(a,document.querySelector(e==null?void 0:e.value),!0),window.android&&window.android.onReplyNew()};return(a,m)=>(f(),g("div",Rt,[l("div",Et,[jt,l("div",{class:"sort",onClick:y(u,["stop"])},"排序:"+k(d(C(n))),9,Lt),Tt,l("div",{class:"write",onClick:m[0]||(m[0]=y(c=>v(c),["stop"]))},"写留言")]),(f(!0),g(j,null,L(C(s),c=>{var w;return f(),g("div",{class:"comment-item",key:c.id},[S(J,{class:"avatar",width:"36px",height:"36px",src:c.userAvatar,onClick:y(p=>i(c),["stop"])},null,8,["src","onClick"]),l("div",Vt,[l("div",{class:"info",onClick:y(p=>r(p,c,null),["stop"])},[l("div",{class:"user-name",onClick:y(p=>i(c),["stop"])},k(c.userName),9,Bt),l("div",Mt,[U(k(c.time),1),l("span",qt,k(c.floor),1)]),Jt,(w=c.emojiParam)!=null&&w.enable?(f(),g("img",{key:0,class:"action",smileid:"",src:H,alt:"action",onClick:y(p=>_(p,c),["stop"])},null,8,At)):b("",!0)],8,Nt),l("div",{class:"topic-html",innerHTML:c.replyContent,onClick:y(p=>r(p,c,null),["stop"])},null,8,Ot),S(D,{emojis:c.emojis,comment:c,style:{"margin-top":"16px"}},null,8,["emojis","comment"]),(f(!0),g(j,null,L(c.topicSubReply||[],p=>{var h;return f(),g("div",{class:"comment-item",key:p.id},[S(J,{class:"avatar",height:"24px",width:"24px",src:p.userAvatar,onClick:y(x=>i(p),["stop"])},null,8,["src","onClick"]),l("div",{class:"comment-content",onClick:y(x=>r(x,c,p),["stop"])},[l("div",Ut,[l("div",{class:"user-name sub",onClick:y(x=>i(p),["stop"])},k(p.userName),9,Ht),l("div",zt,[U(k(p.time),1),l("span",Dt,k(p.floor),1)]),Gt,(h=p.emojiParam)!=null&&h.enable?(f(),g("img",{key:0,class:"action",smileid:"",src:H,alt:"action",onClick:y(x=>_(x,p),["stop"])},null,8,Wt)):b("",!0)]),l("div",{class:"topic-html",innerHTML:p.replyContent},null,8,Ft),S(D,{emojis:p.emojis,comment:c,style:{"margin-top":"16px"}},null,8,["emojis","comment"])],8,Pt)])}),128))])])}),128))]))}}),fe=R(Yt,[["__scopeId","data-v-829b08c6"]]);function Kt(t,o){const e=t.getBoundingClientRect();if(!o)return e.top>=0&&e.bottom<=window.innerHeight;const s=o.getBoundingClientRect();return e.top>=s.top&&e.bottom<=s.bottom}async function Qt(t){return await W(),t.value instanceof HTMLElement?t.value:t.value?document.querySelector(t.value):null}function G(t){let o=`0px 0px ${t.distance}px 0px`;t.top&&(o=`${t.distance}px 0px 0px 0px`);const e=new IntersectionObserver(s=>{s[0].isIntersecting&&(t.firstload&&t.emit(),t.firstload=!0)},{root:t.parentEl,rootMargin:o});return e.observe(t.infiniteLoading.value),e}const Y=(t,o)=>{const e=t.__vccOpts||t;for(const[s,n]of o)e[s]=n;return e},Xt={},Zt=t=>(T("data-v-d3e37633"),t=t(),V(),t),te={class:"container"},ee=Zt(()=>l("div",{class:"spinner"},null,-1)),oe=[ee];function se(t,o){return f(),g("div",te,oe)}const ne=Y(Xt,[["render",se],["__scopeId","data-v-d3e37633"]]),ie={class:"state-error"},re=I({__name:"InfiniteLoading",props:{top:{type:Boolean,default:!1},target:{},distance:{default:0},identifier:{},firstload:{type:Boolean,default:!0},slots:{}},emits:["infinite"],setup(t,{emit:o}){const e=t;let s=null,n=0;const d=q(null),i=q(""),{top:r,firstload:u,distance:_}=e,{identifier:v,target:a}=$(e),m={infiniteLoading:d,top:r,firstload:u,distance:_,parentEl:null,emit(){n=(m.parentEl||document.documentElement).scrollHeight,c.loading(),o("infinite",c)}},c={loading(){i.value="loading"},async loaded(){i.value="loaded";const w=m.parentEl||document.documentElement;await W(),r&&(w.scrollTop=w.scrollHeight-n),Kt(d.value,m.parentEl)&&m.emit()},complete(){i.value="complete",s==null||s.disconnect()},error(){i.value="error"}};return X(v,()=>{s==null||s.disconnect(),s=G(m)}),A(async()=>{m.parentEl=await Qt(a),s=G(m)}),Z(()=>{s==null||s.disconnect()}),(w,p)=>(f(),g("div",{ref_key:"infiniteLoading",ref:d,style:{"min-height":"1px"}},[tt(l("div",null,[M(w.$slots,"spinner",{},()=>[S(ne)],!0)],512),[[et,i.value=="loading"]]),i.value=="complete"?M(w.$slots,"complete",{key:0},()=>{var h;return[l("span",null,k(((h=w.slots)==null?void 0:h.complete)||"No more results!"),1)]},!0):b("",!0),i.value=="error"?M(w.$slots,"error",{key:1,retry:m.emit},()=>{var h;return[l("span",ie,[l("span",null,k(((h=w.slots)==null?void 0:h.error)||"Oops something went wrong!"),1),l("button",{class:"retry",onClick:p[0]||(p[0]=(...x)=>m.emit&&m.emit(...x))},"retry")])]},!0):b("",!0)],512))}}),ge=Y(re,[["__scopeId","data-v-a7077831"]]),ce=t=>(T("data-v-18fb154c"),t=t(),V(),t),le={key:0,class:"spinner-container"},ae=ce(()=>l("div",{class:"spinner"},null,-1)),de=[ae],pe=I({__name:"BottomSpinnerView",props:{show:{type:Boolean,default:!0}},setup(t){const o=t,{show:e}=$(o);return(s,n)=>C(e)?(f(),g("div",le,de)):b("",!0)}}),ve=R(pe,[["__scopeId","data-v-18fb154c"]]);export{ve as B,fe as C,D as E,me as R,ge as W,H as _,_e as a,E as c}; diff --git a/app/src/main/assets/h5/assets/IndexView-8mANpuUq.js b/app/src/main/assets/h5/assets/IndexView-ZsWcpY4E.js similarity index 50% rename from app/src/main/assets/h5/assets/IndexView-8mANpuUq.js rename to app/src/main/assets/h5/assets/IndexView-ZsWcpY4E.js index a875c2d3..8355fc66 100644 --- a/app/src/main/assets/h5/assets/IndexView-8mANpuUq.js +++ b/app/src/main/assets/h5/assets/IndexView-ZsWcpY4E.js @@ -1 +1 @@ -import{_ as e}from"./index-7eRT9hrs.js";const n={};function r(c,t){return null}const o=e(n,[["render",r]]);export{o as default}; +import{_ as e}from"./index-KiD6n6db.js";const n={};function r(c,t){return null}const o=e(n,[["render",r]]);export{o as default}; diff --git a/app/src/main/assets/h5/assets/TopicView-4JXChxle.js b/app/src/main/assets/h5/assets/TopicView-4JXChxle.js new file mode 100644 index 00000000..2be8c254 --- /dev/null +++ b/app/src/main/assets/h5/assets/TopicView-4JXChxle.js @@ -0,0 +1 @@ +import{d as b,r as n,a as x,o as T,c,b as s,t as v,g as m,w as g,e as a,u as h,h as k,n as j,i as d}from"./index-KiD6n6db.js";import{c as r,R,E as D,_ as E,C as J,B as M,a as H,W as L}from"./BottomSpinnerView-_3O8hS20.js";const U={key:0,class:"topic",id:"topic"},A={class:"topic-title"},O=["onClick"],z={key:0,class:"topic-author"},F={class:"topic-time"},W=["innerHTML"],X={key:0,class:"emoji"},Y=s("div",{style:{flex:"1"}},null,-1),q={key:1,class:"divider"},y=10,Z=b({__name:"TopicView",setup(G){const o=n({}),w=n(),_=n(new Date().getDate()),u=n(1),p=n("desc"),l=x([]),C=n("哼!Bangumi老娘我是有底线的人"),V={loadTopicDetail:async e=>{o.value=e,await j(),r.optContentJs(w.value)}},S=async e=>{const t=window.android.onLoadComments(u.value,y,p.value),i=JSON.parse(t);i.length==0?e.complete():(await r.delay(200),l.push(...i),u.value++,await j(),i.length{var t;return{emojiParam:e.emojiParam,id:(t=e.emojiParam)==null?void 0:t.likeCommentId,gh:e.gh}},B=e=>{let t=f(o.value);window.android&&window.android.onClickCommentAction(JSON.stringify(t),e.clientX,e.clientY)},I=(e,t)=>{e==o.value.emojiParam.likeCommentId&&(o.value.emojis=t)},N=()=>{var t,i;const e=((t=o.value)==null?void 0:t.userId)||"";window.android&&e&&window.android&&window.android.onClickUser(e,(i=o.value)==null?void 0:i.id)};return T(()=>{window.robotSay=e=>{C.value=e},r.initComment(I,()=>l,e=>{p.value=e,u.value=1,l.length=0,_.value++}),window.topic=V,window.mounted=!0}),(e,t)=>{var i;return o.value.id?(d(),c("div",U,[s("div",A,v(o.value.title),1),s("div",{class:"topic-info",onClick:g(N,["stop"])},[o.value.userName?(d(),c("div",z,v(o.value.userName),1)):m("",!0),s("div",F,v(o.value.time),1)],8,O),a(R,{related:o.value.related},null,8,["related"]),s("div",{class:"topic-content",ref_key:"topicContentRef",ref:w,innerHTML:h(r).optText(o.value.content)},null,8,W),(i=o.value.emojiParam)!=null&&i.enable?(d(),c("div",X,[a(D,{class:"topic-emoji",emojis:o.value.emojis,comment:f(o.value)},null,8,["emojis","comment"]),Y,s("img",{class:"action",smileid:"",src:E,alt:"action",onClick:t[0]||(t[0]=g(P=>B(P),["stop"]))})])):m("",!0),o.value.content?(d(),c("div",q)):m("",!0),a(J,{target:"#topic",comments:l,sort:p.value},null,8,["comments","sort"]),a(h(L),{class:"loading",target:"#topic",identifier:_.value,distance:300,onInfinite:S},{spinner:k(()=>[a(M)]),complete:k(()=>[a(H,{message:C.value},null,8,["message"])]),_:1},8,["identifier"])])):m("",!0)}}});export{Z as default}; diff --git a/app/src/main/assets/h5/assets/TopicView-vg8qrC83.js b/app/src/main/assets/h5/assets/TopicView-vg8qrC83.js deleted file mode 100644 index cd719e20..00000000 --- a/app/src/main/assets/h5/assets/TopicView-vg8qrC83.js +++ /dev/null @@ -1 +0,0 @@ -import{d as x,r as a,a as N,o as T,c as r,b as n,t as u,w as g,e as s,u as h,g as p,h as k,n as j,i as v}from"./index-7eRT9hrs.js";import{c as l,R,E as D,_ as E,C as J,B as M,a as H,W as L}from"./BottomSpinnerView-r3MJ3GpY.js";const U={key:0,class:"topic",id:"topic"},A={class:"topic-title"},O=["onClick"],z={class:"topic-author"},F={class:"topic-time"},W=["innerHTML"],X={key:0,class:"emoji"},Y=n("div",{style:{flex:"1"}},null,-1),q={key:1,class:"divider"},y=10,Z=x({__name:"TopicView",setup(G){const o=a({}),w=a(),_=a(new Date().getDate()),m=a(1),d=a("desc"),c=N([]),C=a("哼!Bangumi老娘我是有底线的人"),V={loadTopicDetail:async e=>{o.value=e,await j(),l.optContentJs(w.value)}},S=async e=>{const t=window.android.onLoadComments(m.value,y,d.value),i=JSON.parse(t);i.length==0?e.complete():(await l.delay(200),c.push(...i),m.value++,await j(),i.length{var t;return{emojiParam:e.emojiParam,id:(t=e.emojiParam)==null?void 0:t.likeCommentId,gh:e.gh}},B=e=>{let t=f(o.value);window.android&&window.android.onClickCommentAction(JSON.stringify(t),e.clientX,e.clientY)},I=(e,t)=>{e==o.value.emojiParam.likeCommentId&&(o.value.emojis=t)},P=()=>{var t,i;const e=((t=o.value)==null?void 0:t.userId)||"";window.android&&e&&window.android&&window.android.onClickUser(e,(i=o.value)==null?void 0:i.id)};return T(()=>{window.robotSay=e=>{C.value=e},l.initComment(I,()=>c,e=>{d.value=e,m.value=1,c.length=0,_.value++}),window.topic=V,window.mounted=!0}),(e,t)=>{var i;return o.value.id?(v(),r("div",U,[n("div",A,u(o.value.title),1),n("div",{class:"topic-info",onClick:g(P,["stop"])},[n("div",z,u(o.value.userName),1),n("div",F,u(o.value.time),1)],8,O),s(R,{related:o.value.related},null,8,["related"]),n("div",{class:"topic-content",ref_key:"topicContentRef",ref:w,innerHTML:h(l).optText(o.value.content)},null,8,W),(i=o.value.emojiParam)!=null&&i.enable?(v(),r("div",X,[s(D,{class:"topic-emoji",emojis:o.value.emojis,comment:f(o.value)},null,8,["emojis","comment"]),Y,n("img",{class:"action",smileid:"",src:E,alt:"action",onClick:t[0]||(t[0]=g(b=>B(b),["stop"]))})])):p("",!0),o.value.content?(v(),r("div",q)):p("",!0),s(J,{target:"#topic",comments:c,sort:d.value},null,8,["comments","sort"]),s(h(L),{class:"loading",target:"#topic",identifier:_.value,distance:300,onInfinite:S},{spinner:k(()=>[s(M)]),complete:k(()=>[s(H,{message:C.value},null,8,["message"])]),_:1},8,["identifier"])])):p("",!0)}}});export{Z as default}; diff --git a/app/src/main/assets/h5/assets/index-KUfdhnDy.css b/app/src/main/assets/h5/assets/index-KUfdhnDy.css new file mode 100644 index 00000000..d66343a0 --- /dev/null +++ b/app/src/main/assets/h5/assets/index-KUfdhnDy.css @@ -0,0 +1 @@ +#main[data-v-717c16c0]{height:100%;width:100%}@font-face{font-family:BgmFont;src:url(/android/font.ttf) format("truetype");font-weight:400;font-style:normal}:root{font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}@media (prefers-color-scheme: dark){:root{--primary-color: #FFB0C8;--surface-color: #201A1B;--on-primary-color: #650033;--on-surface-color: #EBE0E1;--on-surface-variant-color: #D5C2C6;--surface-container-color: #2d2627}}@media (prefers-color-scheme: light){:root{--primary-color: #A23662;--surface-color: #FFFBFF;--on-primary-color: #FFFFFF;--on-surface-color: #201A1B;--on-surface-variant-color: #514347;--surface-container-color: #eeeeee}}html,body{margin:0;padding:0;height:100%;width:100%;display:flex;place-items:center;background:var(--surface-color)}html *,body *{font-family:BgmFont,monospace;box-sizing:border-box;background:transparent;-webkit-user-select:none;user-select:none;color:var(--on-surface-color)}#app{height:100%;width:100%}.w-0{width:0!important}.w-20{width:20%!important}.w-25{width:25%!important}.w-30{width:30%!important}.w-40{width:40%!important}.w-50{width:50%!important}.w-60{width:60%!important}.h-0{height:0!important}.h-10{height:10%!important}.h-40{height:40%!important}.pointer{cursor:pointer!important}.select-none{-webkit-user-select:none!important;user-select:none!important}.select-text{-webkit-user-select:text!important;user-select:text!important}pre{overflow-x:scroll!important;background:var(--surface-container-color);border-radius:6px;padding:12px;font-size:80%;color:var(--primary-color);box-sizing:border-box}img[smileid]{vertical-align:text-bottom!important;width:auto!important;min-width:unset!important;border-radius:0!important;display:inline-block!important;object-fit:contain!important;border:none!important;margin-right:4px;margin-left:4px;margin-top:0!important;margin-bottom:0!important}img{display:block;max-width:100%;flex-shrink:0;height:auto;border-radius:6px;margin:12px 0;border:1px var(--surface-container-color) solid}.quote{font-size:75%;margin:6px 0;color:var(--on-surface-variant-color);opacity:.75}.quote span{font-weight:700;background:var(--surface-container-color);border-radius:6px;padding:2px 4px;font-size:10px;color:var(--primary-color)}.quote q:before{content:open-quote;display:inline;height:0;line-height:0;left:-22px;position:relative;top:15px;font-size:30px;letter-spacing:-18px;color:var(--on-surface-variant-color)}.quote q:after{content:close-quote;display:inline;height:0;line-height:0;left:3px;position:relative;top:20px;font-size:30px;color:var(--on-surface-variant-color)}.text_mask{color:var(--on-surface-variant-color)!important;background:var(--on-surface-variant-color)!important;margin-bottom:4px;padding:2px 4px;flex-shrink:0;display:inline-block;border-radius:6px!important;overflow:hidden;text-decoration:none;vertical-align:middle;-webkit-tap-highlight-color:transparent;transition:color ease .2s}.text_mask *{color:var(--on-surface-variant-color)!important;background:var(--on-surface-variant-color)!important}.text_mask.show,.text_mask.show *{color:var(--surface-color)!important}.text_mask.show a{color:var(--primary-color)!important;background:var(--surface-container-color)!important}a{outline:none;color:var(--primary-color)!important;margin-bottom:4px;margin-top:4px;background:var(--surface-container-color)!important;padding:2px 6px 4px;flex-shrink:0;display:inline-block;border-radius:6px!important;overflow:hidden;text-decoration:none;vertical-align:middle;-webkit-tap-highlight-color:transparent}.divider{height:12px;background-color:var(--surface-container-color);width:100%;margin-top:24px;opacity:.75}.run-enter-from,.run-leave-to{opacity:0}.run-enter-to,.run-leave-from{opacity:1}.run-enter-active,.run-leave-active{transition:opacity .2s linear}.blinking{border-radius:6px;animation:blinkAnimation 1s forwards}@keyframes blinkAnimation{0%{background:transparent}50%{background:rgba(153,153,153,.4980392157)}90%{background:transparent}to{background:transparent}} diff --git a/app/src/main/assets/h5/assets/index-7eRT9hrs.js b/app/src/main/assets/h5/assets/index-KiD6n6db.js similarity index 99% rename from app/src/main/assets/h5/assets/index-7eRT9hrs.js rename to app/src/main/assets/h5/assets/index-KiD6n6db.js index 40c5efdb..8c398e84 100644 --- a/app/src/main/assets/h5/assets/index-7eRT9hrs.js +++ b/app/src/main/assets/h5/assets/index-KiD6n6db.js @@ -2,10 +2,10 @@ * vue-router v4.2.5 * (c) 2023 Eduardo San Martin Morote * @license MIT - */const at=typeof window<"u";function lc(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const q=Object.assign;function Mn(e,t){const n={};for(const s in t){const r=t[s];n[s]=we(r)?r.map(e):e(r)}return n}const Lt=()=>{},we=Array.isArray,cc=/\/$/,uc=e=>e.replace(cc,"");function Nn(e,t,n="/"){let s,r={},o="",i="";const l=t.indexOf("#");let c=t.indexOf("?");return l=0&&(c=-1),c>-1&&(s=t.slice(0,c),o=t.slice(c+1,l>-1?l:t.length),r=e(o)),l>-1&&(s=s||t.slice(0,l),i=t.slice(l,t.length)),s=hc(s??t,n),{fullPath:s+(o&&"?")+o+i,path:s,query:r,hash:i}}function fc(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function nr(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function ac(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&vt(t.matched[s],n.matched[r])&&yo(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function vt(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function yo(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!dc(e[n],t[n]))return!1;return!0}function dc(e,t){return we(e)?sr(e,t):we(t)?sr(t,e):e===t}function sr(e,t){return we(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function hc(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let o=n.length-1,i,l;for(i=0;i1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(i-(i===s.length?1:0)).join("/")}var Dt;(function(e){e.pop="pop",e.push="push"})(Dt||(Dt={}));var jt;(function(e){e.back="back",e.forward="forward",e.unknown=""})(jt||(jt={}));function pc(e){if(!e)if(at){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),uc(e)}const gc=/^[^#]+#/;function mc(e,t){return e.replace(gc,"#")+t}function _c(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const Rn=()=>({left:window.pageXOffset,top:window.pageYOffset});function yc(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=_c(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function rr(e,t){return(history.state?history.state.position-t:-1)+e}const Yn=new Map;function bc(e,t){Yn.set(e,t)}function vc(e){const t=Yn.get(e);return Yn.delete(e),t}let Ec=()=>location.protocol+"//"+location.host;function bo(e,t){const{pathname:n,search:s,hash:r}=t,o=e.indexOf("#");if(o>-1){let l=r.includes(e.slice(o))?e.slice(o).length:1,c=r.slice(l);return c[0]!=="/"&&(c="/"+c),nr(c,"")}return nr(n,e)+s+r}function xc(e,t,n,s){let r=[],o=[],i=null;const l=({state:g})=>{const E=bo(e,location),A=n.value,S=t.value;let H=0;if(g){if(n.value=E,t.value=g,i&&i===A){i=null;return}H=S?g.position-S.position:0}else s(E);r.forEach(N=>{N(n.value,A,{delta:H,type:Dt.pop,direction:H?H>0?jt.forward:jt.back:jt.unknown})})};function c(){i=n.value}function d(g){r.push(g);const E=()=>{const A=r.indexOf(g);A>-1&&r.splice(A,1)};return o.push(E),E}function a(){const{history:g}=window;g.state&&g.replaceState(q({},g.state,{scroll:Rn()}),"")}function p(){for(const g of o)g();o=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",a)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",a,{passive:!0}),{pauseListeners:c,listen:d,destroy:p}}function or(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?Rn():null}}function wc(e){const{history:t,location:n}=window,s={value:bo(e,n)},r={value:t.state};r.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(c,d,a){const p=e.indexOf("#"),g=p>-1?(n.host&&document.querySelector("base")?e:e.slice(p))+c:Ec()+e+c;try{t[a?"replaceState":"pushState"](d,"",g),r.value=d}catch(E){console.error(E),n[a?"replace":"assign"](g)}}function i(c,d){const a=q({},t.state,or(r.value.back,c,r.value.forward,!0),d,{position:r.value.position});o(c,a,!0),s.value=c}function l(c,d){const a=q({},r.value,t.state,{forward:c,scroll:Rn()});o(a.current,a,!0);const p=q({},or(s.value,c,null),{position:a.position+1},d);o(c,p,!1),s.value=c}return{location:s,state:r,push:l,replace:i}}function Rc(e){e=pc(e);const t=wc(e),n=xc(e,t.state,t.location,t.replace);function s(o,i=!0){i||n.pauseListeners(),history.go(o)}const r=q({location:"",base:e,go:s,createHref:mc.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function Pc(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),Rc(e)}function Cc(e){return typeof e=="string"||e&&typeof e=="object"}function vo(e){return typeof e=="string"||typeof e=="symbol"}const Ue={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Eo=Symbol("");var ir;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(ir||(ir={}));function Et(e,t){return q(new Error,{type:e,[Eo]:!0},t)}function Le(e,t){return e instanceof Error&&Eo in e&&(t==null||!!(e.type&t))}const lr="[^/]+?",Oc={sensitive:!1,strict:!1,start:!0,end:!0},Ac=/[.+*?^${}()[\]/\\]/g;function Tc(e,t){const n=q({},Oc,t),s=[];let r=n.start?"^":"";const o=[];for(const d of e){const a=d.length?[]:[90];n.strict&&!d.length&&(r+="/");for(let p=0;pt.length?t.length===1&&t[0]===80?1:-1:0}function Ic(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Mc={type:0,value:""},Nc=/[a-zA-Z0-9_]/;function Fc(e){if(!e)return[[]];if(e==="/")return[[Mc]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(E){throw new Error(`ERR (${n})/"${d}": ${E}`)}let n=0,s=n;const r=[];let o;function i(){o&&r.push(o),o=[]}let l=0,c,d="",a="";function p(){d&&(n===0?o.push({type:0,value:d}):n===1||n===2||n===3?(o.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:d,regexp:a,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),d="")}function g(){d+=c}for(;l{i(F)}:Lt}function i(a){if(vo(a)){const p=s.get(a);p&&(s.delete(a),n.splice(n.indexOf(p),1),p.children.forEach(i),p.alias.forEach(i))}else{const p=n.indexOf(a);p>-1&&(n.splice(p,1),a.record.name&&s.delete(a.record.name),a.children.forEach(i),a.alias.forEach(i))}}function l(){return n}function c(a){let p=0;for(;p=0&&(a.record.path!==n[p].record.path||!xo(a,n[p]));)p++;n.splice(p,0,a),a.record.name&&!fr(a)&&s.set(a.record.name,a)}function d(a,p){let g,E={},A,S;if("name"in a&&a.name){if(g=s.get(a.name),!g)throw Et(1,{location:a});S=g.record.name,E=q(ur(p.params,g.keys.filter(F=>!F.optional).map(F=>F.name)),a.params&&ur(a.params,g.keys.map(F=>F.name))),A=g.stringify(E)}else if("path"in a)A=a.path,g=n.find(F=>F.re.test(A)),g&&(E=g.parse(A),S=g.record.name);else{if(g=p.name?s.get(p.name):n.find(F=>F.re.test(p.path)),!g)throw Et(1,{location:a,currentLocation:p});S=g.record.name,E=q({},p.params,a.params),A=g.stringify(E)}const H=[];let N=g;for(;N;)H.unshift(N.record),N=N.parent;return{name:S,path:A,params:E,matched:H,meta:Bc(H)}}return e.forEach(a=>o(a)),{addRoute:o,resolve:d,removeRoute:i,getRoutes:l,getRecordMatcher:r}}function ur(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function $c(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:Hc(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function Hc(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function fr(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Bc(e){return e.reduce((t,n)=>q(t,n.meta),{})}function ar(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}function xo(e,t){return t.children.some(n=>n===e||xo(e,n))}const wo=/#/g,kc=/&/g,Kc=/\//g,Dc=/=/g,Uc=/\?/g,Ro=/\+/g,Wc=/%5B/g,zc=/%5D/g,Po=/%5E/g,qc=/%60/g,Co=/%7B/g,Vc=/%7C/g,Oo=/%7D/g,Qc=/%20/g;function vs(e){return encodeURI(""+e).replace(Vc,"|").replace(Wc,"[").replace(zc,"]")}function Yc(e){return vs(e).replace(Co,"{").replace(Oo,"}").replace(Po,"^")}function Jn(e){return vs(e).replace(Ro,"%2B").replace(Qc,"+").replace(wo,"%23").replace(kc,"%26").replace(qc,"`").replace(Co,"{").replace(Oo,"}").replace(Po,"^")}function Jc(e){return Jn(e).replace(Dc,"%3D")}function Xc(e){return vs(e).replace(wo,"%23").replace(Uc,"%3F")}function Zc(e){return e==null?"":Xc(e).replace(Kc,"%2F")}function un(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function Gc(e){const t={};if(e===""||e==="?")return t;const s=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ro&&Jn(o)):[s&&Jn(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function eu(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=we(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const tu=Symbol(""),hr=Symbol(""),Es=Symbol(""),Ao=Symbol(""),Xn=Symbol("");function Tt(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function ze(e,t,n,s,r){const o=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((i,l)=>{const c=p=>{p===!1?l(Et(4,{from:n,to:t})):p instanceof Error?l(p):Cc(p)?l(Et(2,{from:t,to:p})):(o&&s.enterCallbacks[r]===o&&typeof p=="function"&&o.push(p),i())},d=e.call(s&&s.instances[r],t,n,c);let a=Promise.resolve(d);e.length<3&&(a=a.then(c)),a.catch(p=>l(p))})}function Fn(e,t,n,s){const r=[];for(const o of e)for(const i in o.components){let l=o.components[i];if(!(t!=="beforeRouteEnter"&&!o.instances[i]))if(nu(l)){const d=(l.__vccOpts||l)[t];d&&r.push(ze(d,n,s,o,i))}else{let c=l();r.push(()=>c.then(d=>{if(!d)return Promise.reject(new Error(`Couldn't resolve component "${i}" at "${o.path}"`));const a=lc(d)?d.default:d;o.components[i]=a;const g=(a.__vccOpts||a)[t];return g&&ze(g,n,s,o,i)()}))}}return r}function nu(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function pr(e){const t=He(Es),n=He(Ao),s=ve(()=>t.resolve(gt(e.to))),r=ve(()=>{const{matched:c}=s.value,{length:d}=c,a=c[d-1],p=n.matched;if(!a||!p.length)return-1;const g=p.findIndex(vt.bind(null,a));if(g>-1)return g;const E=gr(c[d-2]);return d>1&&gr(a)===E&&p[p.length-1].path!==E?p.findIndex(vt.bind(null,c[d-2])):g}),o=ve(()=>r.value>-1&&iu(n.params,s.value.params)),i=ve(()=>r.value>-1&&r.value===n.matched.length-1&&yo(n.params,s.value.params));function l(c={}){return ou(c)?t[gt(e.replace)?"replace":"push"](gt(e.to)).catch(Lt):Promise.resolve()}return{route:s,href:ve(()=>s.value.href),isActive:o,isExactActive:i,navigate:l}}const su=Xr({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:pr,setup(e,{slots:t}){const n=mn(pr(e)),{options:s}=He(Es),r=ve(()=>({[mr(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[mr(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&t.default(n);return e.custom?o:_o("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),ru=su;function ou(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function iu(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!we(r)||r.length!==s.length||s.some((o,i)=>o!==r[i]))return!1}return!0}function gr(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const mr=(e,t,n)=>e??t??n,lu=Xr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=He(Xn),r=ve(()=>e.route||s.value),o=He(hr,0),i=ve(()=>{let d=gt(o);const{matched:a}=r.value;let p;for(;(p=a[d])&&!p.components;)d++;return d}),l=ve(()=>r.value.matched[i.value]);Zt(hr,ve(()=>i.value+1)),Zt(tu,l),Zt(Xn,r);const c=di();return Xt(()=>[c.value,l.value,e.name],([d,a,p],[g,E,A])=>{a&&(a.instances[p]=d,E&&E!==a&&d&&d===g&&(a.leaveGuards.size||(a.leaveGuards=E.leaveGuards),a.updateGuards.size||(a.updateGuards=E.updateGuards))),d&&a&&(!E||!vt(a,E)||!g)&&(a.enterCallbacks[p]||[]).forEach(S=>S(d))},{flush:"post"}),()=>{const d=r.value,a=e.name,p=l.value,g=p&&p.components[a];if(!g)return _r(n.default,{Component:g,route:d});const E=p.props[a],A=E?E===!0?d.params:typeof E=="function"?E(d):E:null,H=_o(g,q({},A,t,{onVnodeUnmounted:N=>{N.component.isUnmounted&&(p.instances[a]=null)},ref:c}));return _r(n.default,{Component:H,route:d})||H}}});function _r(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const cu=lu;function uu(e){const t=jc(e.routes,e),n=e.parseQuery||Gc,s=e.stringifyQuery||dr,r=e.history,o=Tt(),i=Tt(),l=Tt(),c=hi(Ue);let d=Ue;at&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const a=Mn.bind(null,_=>""+_),p=Mn.bind(null,Zc),g=Mn.bind(null,un);function E(_,C){let R,T;return vo(_)?(R=t.getRecordMatcher(_),T=C):T=_,t.addRoute(T,R)}function A(_){const C=t.getRecordMatcher(_);C&&t.removeRoute(C)}function S(){return t.getRoutes().map(_=>_.record)}function H(_){return!!t.getRecordMatcher(_)}function N(_,C){if(C=q({},C||c.value),typeof _=="string"){const h=Nn(n,_,C.path),m=t.resolve({path:h.path},C),y=r.createHref(h.fullPath);return q(h,m,{params:g(m.params),hash:un(h.hash),redirectedFrom:void 0,href:y})}let R;if("path"in _)R=q({},_,{path:Nn(n,_.path,C.path).path});else{const h=q({},_.params);for(const m in h)h[m]==null&&delete h[m];R=q({},_,{params:p(h)}),C.params=p(C.params)}const T=t.resolve(R,C),z=_.hash||"";T.params=a(g(T.params));const u=fc(s,q({},_,{hash:Yc(z),path:T.path})),f=r.createHref(u);return q({fullPath:u,hash:z,query:s===dr?eu(_.query):_.query||{}},T,{redirectedFrom:void 0,href:f})}function F(_){return typeof _=="string"?Nn(n,_,c.value.path):q({},_)}function U(_,C){if(d!==_)return Et(8,{from:C,to:_})}function L(_){return me(_)}function ee(_){return L(q(F(_),{replace:!0}))}function ie(_){const C=_.matched[_.matched.length-1];if(C&&C.redirect){const{redirect:R}=C;let T=typeof R=="function"?R(_):R;return typeof T=="string"&&(T=T.includes("?")||T.includes("#")?T=F(T):{path:T},T.params={}),q({query:_.query,hash:_.hash,params:"path"in T?{}:_.params},T)}}function me(_,C){const R=d=N(_),T=c.value,z=_.state,u=_.force,f=_.replace===!0,h=ie(R);if(h)return me(q(F(h),{state:typeof h=="object"?q({},z,h.state):z,force:u,replace:f}),C||R);const m=R;m.redirectedFrom=C;let y;return!u&&ac(s,T,R)&&(y=Et(16,{to:m,from:T}),Oe(T,T,!0,!1)),(y?Promise.resolve(y):Pe(m,T)).catch(b=>Le(b)?Le(b,2)?b:Ke(b):W(b,m,T)).then(b=>{if(b){if(Le(b,2))return me(q({replace:f},F(b.to),{state:typeof b.to=="object"?q({},z,b.to.state):z,force:u}),C||m)}else b=Je(m,T,!0,f,z);return ke(m,T,b),b})}function Re(_,C){const R=U(_,C);return R?Promise.reject(R):Promise.resolve()}function ot(_){const C=ct.values().next().value;return C&&typeof C.runWithContext=="function"?C.runWithContext(_):_()}function Pe(_,C){let R;const[T,z,u]=fu(_,C);R=Fn(T.reverse(),"beforeRouteLeave",_,C);for(const h of T)h.leaveGuards.forEach(m=>{R.push(ze(m,_,C))});const f=Re.bind(null,_,C);return R.push(f),le(R).then(()=>{R=[];for(const h of o.list())R.push(ze(h,_,C));return R.push(f),le(R)}).then(()=>{R=Fn(z,"beforeRouteUpdate",_,C);for(const h of z)h.updateGuards.forEach(m=>{R.push(ze(m,_,C))});return R.push(f),le(R)}).then(()=>{R=[];for(const h of u)if(h.beforeEnter)if(we(h.beforeEnter))for(const m of h.beforeEnter)R.push(ze(m,_,C));else R.push(ze(h.beforeEnter,_,C));return R.push(f),le(R)}).then(()=>(_.matched.forEach(h=>h.enterCallbacks={}),R=Fn(u,"beforeRouteEnter",_,C),R.push(f),le(R))).then(()=>{R=[];for(const h of i.list())R.push(ze(h,_,C));return R.push(f),le(R)}).catch(h=>Le(h,8)?h:Promise.reject(h))}function ke(_,C,R){l.list().forEach(T=>ot(()=>T(_,C,R)))}function Je(_,C,R,T,z){const u=U(_,C);if(u)return u;const f=C===Ue,h=at?history.state:{};R&&(T||f?r.replace(_.fullPath,q({scroll:f&&h&&h.scroll},z)):r.push(_.fullPath,z)),c.value=_,Oe(_,C,R,f),Ke()}let Ce;function Pt(){Ce||(Ce=r.listen((_,C,R)=>{if(!Ut.listening)return;const T=N(_),z=ie(T);if(z){me(q(z,{replace:!0}),T).catch(Lt);return}d=T;const u=c.value;at&&bc(rr(u.fullPath,R.delta),Rn()),Pe(T,u).catch(f=>Le(f,12)?f:Le(f,2)?(me(f.to,T).then(h=>{Le(h,20)&&!R.delta&&R.type===Dt.pop&&r.go(-1,!1)}).catch(Lt),Promise.reject()):(R.delta&&r.go(-R.delta,!1),W(f,T,u))).then(f=>{f=f||Je(T,u,!1),f&&(R.delta&&!Le(f,8)?r.go(-R.delta,!1):R.type===Dt.pop&&Le(f,20)&&r.go(-1,!1)),ke(T,u,f)}).catch(Lt)}))}let it=Tt(),te=Tt(),Q;function W(_,C,R){Ke(_);const T=te.list();return T.length?T.forEach(z=>z(_,C,R)):console.error(_),Promise.reject(_)}function Fe(){return Q&&c.value!==Ue?Promise.resolve():new Promise((_,C)=>{it.add([_,C])})}function Ke(_){return Q||(Q=!_,Pt(),it.list().forEach(([C,R])=>_?R(_):C()),it.reset()),_}function Oe(_,C,R,T){const{scrollBehavior:z}=e;if(!at||!z)return Promise.resolve();const u=!R&&vc(rr(_.fullPath,0))||(T||!R)&&history.state&&history.state.scroll||null;return Wr().then(()=>z(_,C,u)).then(f=>f&&yc(f)).catch(f=>W(f,_,C))}const ae=_=>r.go(_);let lt;const ct=new Set,Ut={currentRoute:c,listening:!0,addRoute:E,removeRoute:A,hasRoute:H,getRoutes:S,resolve:N,options:e,push:L,replace:ee,go:ae,back:()=>ae(-1),forward:()=>ae(1),beforeEach:o.add,beforeResolve:i.add,afterEach:l.add,onError:te.add,isReady:Fe,install(_){const C=this;_.component("RouterLink",ru),_.component("RouterView",cu),_.config.globalProperties.$router=C,Object.defineProperty(_.config.globalProperties,"$route",{enumerable:!0,get:()=>gt(c)}),at&&!lt&&c.value===Ue&&(lt=!0,L(r.location).catch(z=>{}));const R={};for(const z in Ue)Object.defineProperty(R,z,{get:()=>c.value[z],enumerable:!0});_.provide(Es,C),_.provide(Ao,Lr(R)),_.provide(Xn,c);const T=_.unmount;ct.add(_),_.unmount=function(){ct.delete(_),ct.size<1&&(d=Ue,Ce&&Ce(),Ce=null,c.value=Ue,lt=!1,Q=!1),T()}}};function le(_){return _.reduce((C,R)=>C.then(()=>ot(R)),Promise.resolve())}return Ut}function fu(e,t){const n=[],s=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;ivt(d,l))?s.push(l):n.push(l));const c=e.matched[i];c&&(t.matched.find(d=>vt(d,c))||r.push(c))}return[n,s,r]}const au="modulepreload",du=function(e,t){return new URL(e,t).href},yr={},Pn=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link");r=Promise.all(n.map(i=>{if(i=du(i,s),i in yr)return;yr[i]=!0;const l=i.endsWith(".css"),c=l?'[rel="stylesheet"]':"";if(!!s)for(let p=o.length-1;p>=0;p--){const g=o[p];if(g.href===i&&(!l||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${c}`))return;const a=document.createElement("link");if(a.rel=l?"stylesheet":au,l||(a.as="script",a.crossOrigin=""),a.href=i,document.head.appendChild(a),l)return new Promise((p,g)=>{a.addEventListener("load",p),a.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${i}`)))})}))}return r.then(()=>t()).catch(o=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=o,window.dispatchEvent(i),!i.defaultPrevented)throw o})},hu=()=>Pn(()=>import("./BlogView-p4wu9TU3.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),pu=()=>Pn(()=>import("./TopicView-vg8qrC83.js"),__vite__mapDeps([4,1,2,5]),import.meta.url),gu=()=>Pn(()=>import("./BBCodeView-FxCuZHI9.js"),__vite__mapDeps([6,7]),import.meta.url),mu=()=>Pn(()=>import("./IndexView-8mANpuUq.js"),__vite__mapDeps([]),import.meta.url),Ln={blog:"blog",topic:"topic",bbcode:"bb-code",index:"index"},_u=[{path:"/",component:mu},{name:Ln.blog,path:"/blog",component:hu},{name:Ln.topic,path:"/topic",component:pu},{name:Ln.bbcode,path:"/bb-code",component:gu}],yu=uu({routes:_u,history:Pc()});ec(ic).use(yu).mount("#app");export{ge as F,nc as _,mn as a,po as b,pl as c,Xr as d,fe as e,Ru as f,Cu as g,Ci as h,ms as i,Au as j,vu as k,xu as l,ss as m,Wr as n,eo as o,Eu as p,_l as q,di as r,Xt as s,bu as t,gt as u,hs as v,Tu as w,wu as x,Ou as y,Pu as z}; + */const at=typeof window<"u";function lc(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const q=Object.assign;function Mn(e,t){const n={};for(const s in t){const r=t[s];n[s]=we(r)?r.map(e):e(r)}return n}const Lt=()=>{},we=Array.isArray,cc=/\/$/,uc=e=>e.replace(cc,"");function Nn(e,t,n="/"){let s,r={},o="",i="";const l=t.indexOf("#");let c=t.indexOf("?");return l=0&&(c=-1),c>-1&&(s=t.slice(0,c),o=t.slice(c+1,l>-1?l:t.length),r=e(o)),l>-1&&(s=s||t.slice(0,l),i=t.slice(l,t.length)),s=hc(s??t,n),{fullPath:s+(o&&"?")+o+i,path:s,query:r,hash:i}}function fc(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function nr(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function ac(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&vt(t.matched[s],n.matched[r])&&yo(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function vt(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function yo(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!dc(e[n],t[n]))return!1;return!0}function dc(e,t){return we(e)?sr(e,t):we(t)?sr(t,e):e===t}function sr(e,t){return we(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function hc(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let o=n.length-1,i,l;for(i=0;i1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(i-(i===s.length?1:0)).join("/")}var Dt;(function(e){e.pop="pop",e.push="push"})(Dt||(Dt={}));var jt;(function(e){e.back="back",e.forward="forward",e.unknown=""})(jt||(jt={}));function pc(e){if(!e)if(at){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),uc(e)}const gc=/^[^#]+#/;function mc(e,t){return e.replace(gc,"#")+t}function _c(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const Rn=()=>({left:window.pageXOffset,top:window.pageYOffset});function yc(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=_c(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function rr(e,t){return(history.state?history.state.position-t:-1)+e}const Yn=new Map;function bc(e,t){Yn.set(e,t)}function vc(e){const t=Yn.get(e);return Yn.delete(e),t}let Ec=()=>location.protocol+"//"+location.host;function bo(e,t){const{pathname:n,search:s,hash:r}=t,o=e.indexOf("#");if(o>-1){let l=r.includes(e.slice(o))?e.slice(o).length:1,c=r.slice(l);return c[0]!=="/"&&(c="/"+c),nr(c,"")}return nr(n,e)+s+r}function xc(e,t,n,s){let r=[],o=[],i=null;const l=({state:g})=>{const E=bo(e,location),A=n.value,S=t.value;let H=0;if(g){if(n.value=E,t.value=g,i&&i===A){i=null;return}H=S?g.position-S.position:0}else s(E);r.forEach(N=>{N(n.value,A,{delta:H,type:Dt.pop,direction:H?H>0?jt.forward:jt.back:jt.unknown})})};function c(){i=n.value}function d(g){r.push(g);const E=()=>{const A=r.indexOf(g);A>-1&&r.splice(A,1)};return o.push(E),E}function a(){const{history:g}=window;g.state&&g.replaceState(q({},g.state,{scroll:Rn()}),"")}function p(){for(const g of o)g();o=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",a)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",a,{passive:!0}),{pauseListeners:c,listen:d,destroy:p}}function or(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?Rn():null}}function wc(e){const{history:t,location:n}=window,s={value:bo(e,n)},r={value:t.state};r.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(c,d,a){const p=e.indexOf("#"),g=p>-1?(n.host&&document.querySelector("base")?e:e.slice(p))+c:Ec()+e+c;try{t[a?"replaceState":"pushState"](d,"",g),r.value=d}catch(E){console.error(E),n[a?"replace":"assign"](g)}}function i(c,d){const a=q({},t.state,or(r.value.back,c,r.value.forward,!0),d,{position:r.value.position});o(c,a,!0),s.value=c}function l(c,d){const a=q({},r.value,t.state,{forward:c,scroll:Rn()});o(a.current,a,!0);const p=q({},or(s.value,c,null),{position:a.position+1},d);o(c,p,!1),s.value=c}return{location:s,state:r,push:l,replace:i}}function Rc(e){e=pc(e);const t=wc(e),n=xc(e,t.state,t.location,t.replace);function s(o,i=!0){i||n.pauseListeners(),history.go(o)}const r=q({location:"",base:e,go:s,createHref:mc.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function Pc(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),Rc(e)}function Cc(e){return typeof e=="string"||e&&typeof e=="object"}function vo(e){return typeof e=="string"||typeof e=="symbol"}const Ue={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Eo=Symbol("");var ir;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(ir||(ir={}));function Et(e,t){return q(new Error,{type:e,[Eo]:!0},t)}function Le(e,t){return e instanceof Error&&Eo in e&&(t==null||!!(e.type&t))}const lr="[^/]+?",Oc={sensitive:!1,strict:!1,start:!0,end:!0},Ac=/[.+*?^${}()[\]/\\]/g;function Tc(e,t){const n=q({},Oc,t),s=[];let r=n.start?"^":"";const o=[];for(const d of e){const a=d.length?[]:[90];n.strict&&!d.length&&(r+="/");for(let p=0;pt.length?t.length===1&&t[0]===80?1:-1:0}function Ic(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Mc={type:0,value:""},Nc=/[a-zA-Z0-9_]/;function Fc(e){if(!e)return[[]];if(e==="/")return[[Mc]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(E){throw new Error(`ERR (${n})/"${d}": ${E}`)}let n=0,s=n;const r=[];let o;function i(){o&&r.push(o),o=[]}let l=0,c,d="",a="";function p(){d&&(n===0?o.push({type:0,value:d}):n===1||n===2||n===3?(o.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:d,regexp:a,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),d="")}function g(){d+=c}for(;l{i(F)}:Lt}function i(a){if(vo(a)){const p=s.get(a);p&&(s.delete(a),n.splice(n.indexOf(p),1),p.children.forEach(i),p.alias.forEach(i))}else{const p=n.indexOf(a);p>-1&&(n.splice(p,1),a.record.name&&s.delete(a.record.name),a.children.forEach(i),a.alias.forEach(i))}}function l(){return n}function c(a){let p=0;for(;p=0&&(a.record.path!==n[p].record.path||!xo(a,n[p]));)p++;n.splice(p,0,a),a.record.name&&!fr(a)&&s.set(a.record.name,a)}function d(a,p){let g,E={},A,S;if("name"in a&&a.name){if(g=s.get(a.name),!g)throw Et(1,{location:a});S=g.record.name,E=q(ur(p.params,g.keys.filter(F=>!F.optional).map(F=>F.name)),a.params&&ur(a.params,g.keys.map(F=>F.name))),A=g.stringify(E)}else if("path"in a)A=a.path,g=n.find(F=>F.re.test(A)),g&&(E=g.parse(A),S=g.record.name);else{if(g=p.name?s.get(p.name):n.find(F=>F.re.test(p.path)),!g)throw Et(1,{location:a,currentLocation:p});S=g.record.name,E=q({},p.params,a.params),A=g.stringify(E)}const H=[];let N=g;for(;N;)H.unshift(N.record),N=N.parent;return{name:S,path:A,params:E,matched:H,meta:Bc(H)}}return e.forEach(a=>o(a)),{addRoute:o,resolve:d,removeRoute:i,getRoutes:l,getRecordMatcher:r}}function ur(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function $c(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:Hc(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function Hc(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function fr(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Bc(e){return e.reduce((t,n)=>q(t,n.meta),{})}function ar(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}function xo(e,t){return t.children.some(n=>n===e||xo(e,n))}const wo=/#/g,kc=/&/g,Kc=/\//g,Dc=/=/g,Uc=/\?/g,Ro=/\+/g,Wc=/%5B/g,zc=/%5D/g,Po=/%5E/g,qc=/%60/g,Co=/%7B/g,Vc=/%7C/g,Oo=/%7D/g,Qc=/%20/g;function vs(e){return encodeURI(""+e).replace(Vc,"|").replace(Wc,"[").replace(zc,"]")}function Yc(e){return vs(e).replace(Co,"{").replace(Oo,"}").replace(Po,"^")}function Jn(e){return vs(e).replace(Ro,"%2B").replace(Qc,"+").replace(wo,"%23").replace(kc,"%26").replace(qc,"`").replace(Co,"{").replace(Oo,"}").replace(Po,"^")}function Jc(e){return Jn(e).replace(Dc,"%3D")}function Xc(e){return vs(e).replace(wo,"%23").replace(Uc,"%3F")}function Zc(e){return e==null?"":Xc(e).replace(Kc,"%2F")}function un(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function Gc(e){const t={};if(e===""||e==="?")return t;const s=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ro&&Jn(o)):[s&&Jn(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function eu(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=we(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const tu=Symbol(""),hr=Symbol(""),Es=Symbol(""),Ao=Symbol(""),Xn=Symbol("");function Tt(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function ze(e,t,n,s,r){const o=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((i,l)=>{const c=p=>{p===!1?l(Et(4,{from:n,to:t})):p instanceof Error?l(p):Cc(p)?l(Et(2,{from:t,to:p})):(o&&s.enterCallbacks[r]===o&&typeof p=="function"&&o.push(p),i())},d=e.call(s&&s.instances[r],t,n,c);let a=Promise.resolve(d);e.length<3&&(a=a.then(c)),a.catch(p=>l(p))})}function Fn(e,t,n,s){const r=[];for(const o of e)for(const i in o.components){let l=o.components[i];if(!(t!=="beforeRouteEnter"&&!o.instances[i]))if(nu(l)){const d=(l.__vccOpts||l)[t];d&&r.push(ze(d,n,s,o,i))}else{let c=l();r.push(()=>c.then(d=>{if(!d)return Promise.reject(new Error(`Couldn't resolve component "${i}" at "${o.path}"`));const a=lc(d)?d.default:d;o.components[i]=a;const g=(a.__vccOpts||a)[t];return g&&ze(g,n,s,o,i)()}))}}return r}function nu(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function pr(e){const t=He(Es),n=He(Ao),s=ve(()=>t.resolve(gt(e.to))),r=ve(()=>{const{matched:c}=s.value,{length:d}=c,a=c[d-1],p=n.matched;if(!a||!p.length)return-1;const g=p.findIndex(vt.bind(null,a));if(g>-1)return g;const E=gr(c[d-2]);return d>1&&gr(a)===E&&p[p.length-1].path!==E?p.findIndex(vt.bind(null,c[d-2])):g}),o=ve(()=>r.value>-1&&iu(n.params,s.value.params)),i=ve(()=>r.value>-1&&r.value===n.matched.length-1&&yo(n.params,s.value.params));function l(c={}){return ou(c)?t[gt(e.replace)?"replace":"push"](gt(e.to)).catch(Lt):Promise.resolve()}return{route:s,href:ve(()=>s.value.href),isActive:o,isExactActive:i,navigate:l}}const su=Xr({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:pr,setup(e,{slots:t}){const n=mn(pr(e)),{options:s}=He(Es),r=ve(()=>({[mr(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[mr(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&t.default(n);return e.custom?o:_o("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),ru=su;function ou(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function iu(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!we(r)||r.length!==s.length||s.some((o,i)=>o!==r[i]))return!1}return!0}function gr(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const mr=(e,t,n)=>e??t??n,lu=Xr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=He(Xn),r=ve(()=>e.route||s.value),o=He(hr,0),i=ve(()=>{let d=gt(o);const{matched:a}=r.value;let p;for(;(p=a[d])&&!p.components;)d++;return d}),l=ve(()=>r.value.matched[i.value]);Zt(hr,ve(()=>i.value+1)),Zt(tu,l),Zt(Xn,r);const c=di();return Xt(()=>[c.value,l.value,e.name],([d,a,p],[g,E,A])=>{a&&(a.instances[p]=d,E&&E!==a&&d&&d===g&&(a.leaveGuards.size||(a.leaveGuards=E.leaveGuards),a.updateGuards.size||(a.updateGuards=E.updateGuards))),d&&a&&(!E||!vt(a,E)||!g)&&(a.enterCallbacks[p]||[]).forEach(S=>S(d))},{flush:"post"}),()=>{const d=r.value,a=e.name,p=l.value,g=p&&p.components[a];if(!g)return _r(n.default,{Component:g,route:d});const E=p.props[a],A=E?E===!0?d.params:typeof E=="function"?E(d):E:null,H=_o(g,q({},A,t,{onVnodeUnmounted:N=>{N.component.isUnmounted&&(p.instances[a]=null)},ref:c}));return _r(n.default,{Component:H,route:d})||H}}});function _r(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const cu=lu;function uu(e){const t=jc(e.routes,e),n=e.parseQuery||Gc,s=e.stringifyQuery||dr,r=e.history,o=Tt(),i=Tt(),l=Tt(),c=hi(Ue);let d=Ue;at&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const a=Mn.bind(null,_=>""+_),p=Mn.bind(null,Zc),g=Mn.bind(null,un);function E(_,C){let R,T;return vo(_)?(R=t.getRecordMatcher(_),T=C):T=_,t.addRoute(T,R)}function A(_){const C=t.getRecordMatcher(_);C&&t.removeRoute(C)}function S(){return t.getRoutes().map(_=>_.record)}function H(_){return!!t.getRecordMatcher(_)}function N(_,C){if(C=q({},C||c.value),typeof _=="string"){const h=Nn(n,_,C.path),m=t.resolve({path:h.path},C),y=r.createHref(h.fullPath);return q(h,m,{params:g(m.params),hash:un(h.hash),redirectedFrom:void 0,href:y})}let R;if("path"in _)R=q({},_,{path:Nn(n,_.path,C.path).path});else{const h=q({},_.params);for(const m in h)h[m]==null&&delete h[m];R=q({},_,{params:p(h)}),C.params=p(C.params)}const T=t.resolve(R,C),z=_.hash||"";T.params=a(g(T.params));const u=fc(s,q({},_,{hash:Yc(z),path:T.path})),f=r.createHref(u);return q({fullPath:u,hash:z,query:s===dr?eu(_.query):_.query||{}},T,{redirectedFrom:void 0,href:f})}function F(_){return typeof _=="string"?Nn(n,_,c.value.path):q({},_)}function U(_,C){if(d!==_)return Et(8,{from:C,to:_})}function L(_){return me(_)}function ee(_){return L(q(F(_),{replace:!0}))}function ie(_){const C=_.matched[_.matched.length-1];if(C&&C.redirect){const{redirect:R}=C;let T=typeof R=="function"?R(_):R;return typeof T=="string"&&(T=T.includes("?")||T.includes("#")?T=F(T):{path:T},T.params={}),q({query:_.query,hash:_.hash,params:"path"in T?{}:_.params},T)}}function me(_,C){const R=d=N(_),T=c.value,z=_.state,u=_.force,f=_.replace===!0,h=ie(R);if(h)return me(q(F(h),{state:typeof h=="object"?q({},z,h.state):z,force:u,replace:f}),C||R);const m=R;m.redirectedFrom=C;let y;return!u&&ac(s,T,R)&&(y=Et(16,{to:m,from:T}),Oe(T,T,!0,!1)),(y?Promise.resolve(y):Pe(m,T)).catch(b=>Le(b)?Le(b,2)?b:Ke(b):W(b,m,T)).then(b=>{if(b){if(Le(b,2))return me(q({replace:f},F(b.to),{state:typeof b.to=="object"?q({},z,b.to.state):z,force:u}),C||m)}else b=Je(m,T,!0,f,z);return ke(m,T,b),b})}function Re(_,C){const R=U(_,C);return R?Promise.reject(R):Promise.resolve()}function ot(_){const C=ct.values().next().value;return C&&typeof C.runWithContext=="function"?C.runWithContext(_):_()}function Pe(_,C){let R;const[T,z,u]=fu(_,C);R=Fn(T.reverse(),"beforeRouteLeave",_,C);for(const h of T)h.leaveGuards.forEach(m=>{R.push(ze(m,_,C))});const f=Re.bind(null,_,C);return R.push(f),le(R).then(()=>{R=[];for(const h of o.list())R.push(ze(h,_,C));return R.push(f),le(R)}).then(()=>{R=Fn(z,"beforeRouteUpdate",_,C);for(const h of z)h.updateGuards.forEach(m=>{R.push(ze(m,_,C))});return R.push(f),le(R)}).then(()=>{R=[];for(const h of u)if(h.beforeEnter)if(we(h.beforeEnter))for(const m of h.beforeEnter)R.push(ze(m,_,C));else R.push(ze(h.beforeEnter,_,C));return R.push(f),le(R)}).then(()=>(_.matched.forEach(h=>h.enterCallbacks={}),R=Fn(u,"beforeRouteEnter",_,C),R.push(f),le(R))).then(()=>{R=[];for(const h of i.list())R.push(ze(h,_,C));return R.push(f),le(R)}).catch(h=>Le(h,8)?h:Promise.reject(h))}function ke(_,C,R){l.list().forEach(T=>ot(()=>T(_,C,R)))}function Je(_,C,R,T,z){const u=U(_,C);if(u)return u;const f=C===Ue,h=at?history.state:{};R&&(T||f?r.replace(_.fullPath,q({scroll:f&&h&&h.scroll},z)):r.push(_.fullPath,z)),c.value=_,Oe(_,C,R,f),Ke()}let Ce;function Pt(){Ce||(Ce=r.listen((_,C,R)=>{if(!Ut.listening)return;const T=N(_),z=ie(T);if(z){me(q(z,{replace:!0}),T).catch(Lt);return}d=T;const u=c.value;at&&bc(rr(u.fullPath,R.delta),Rn()),Pe(T,u).catch(f=>Le(f,12)?f:Le(f,2)?(me(f.to,T).then(h=>{Le(h,20)&&!R.delta&&R.type===Dt.pop&&r.go(-1,!1)}).catch(Lt),Promise.reject()):(R.delta&&r.go(-R.delta,!1),W(f,T,u))).then(f=>{f=f||Je(T,u,!1),f&&(R.delta&&!Le(f,8)?r.go(-R.delta,!1):R.type===Dt.pop&&Le(f,20)&&r.go(-1,!1)),ke(T,u,f)}).catch(Lt)}))}let it=Tt(),te=Tt(),Q;function W(_,C,R){Ke(_);const T=te.list();return T.length?T.forEach(z=>z(_,C,R)):console.error(_),Promise.reject(_)}function Fe(){return Q&&c.value!==Ue?Promise.resolve():new Promise((_,C)=>{it.add([_,C])})}function Ke(_){return Q||(Q=!_,Pt(),it.list().forEach(([C,R])=>_?R(_):C()),it.reset()),_}function Oe(_,C,R,T){const{scrollBehavior:z}=e;if(!at||!z)return Promise.resolve();const u=!R&&vc(rr(_.fullPath,0))||(T||!R)&&history.state&&history.state.scroll||null;return Wr().then(()=>z(_,C,u)).then(f=>f&&yc(f)).catch(f=>W(f,_,C))}const ae=_=>r.go(_);let lt;const ct=new Set,Ut={currentRoute:c,listening:!0,addRoute:E,removeRoute:A,hasRoute:H,getRoutes:S,resolve:N,options:e,push:L,replace:ee,go:ae,back:()=>ae(-1),forward:()=>ae(1),beforeEach:o.add,beforeResolve:i.add,afterEach:l.add,onError:te.add,isReady:Fe,install(_){const C=this;_.component("RouterLink",ru),_.component("RouterView",cu),_.config.globalProperties.$router=C,Object.defineProperty(_.config.globalProperties,"$route",{enumerable:!0,get:()=>gt(c)}),at&&!lt&&c.value===Ue&&(lt=!0,L(r.location).catch(z=>{}));const R={};for(const z in Ue)Object.defineProperty(R,z,{get:()=>c.value[z],enumerable:!0});_.provide(Es,C),_.provide(Ao,Lr(R)),_.provide(Xn,c);const T=_.unmount;ct.add(_),_.unmount=function(){ct.delete(_),ct.size<1&&(d=Ue,Ce&&Ce(),Ce=null,c.value=Ue,lt=!1,Q=!1),T()}}};function le(_){return _.reduce((C,R)=>C.then(()=>ot(R)),Promise.resolve())}return Ut}function fu(e,t){const n=[],s=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;ivt(d,l))?s.push(l):n.push(l));const c=e.matched[i];c&&(t.matched.find(d=>vt(d,c))||r.push(c))}return[n,s,r]}const au="modulepreload",du=function(e,t){return new URL(e,t).href},yr={},Pn=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link");r=Promise.all(n.map(i=>{if(i=du(i,s),i in yr)return;yr[i]=!0;const l=i.endsWith(".css"),c=l?'[rel="stylesheet"]':"";if(!!s)for(let p=o.length-1;p>=0;p--){const g=o[p];if(g.href===i&&(!l||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${c}`))return;const a=document.createElement("link");if(a.rel=l?"stylesheet":au,l||(a.as="script",a.crossOrigin=""),a.href=i,document.head.appendChild(a),l)return new Promise((p,g)=>{a.addEventListener("load",p),a.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${i}`)))})}))}return r.then(()=>t()).catch(o=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=o,window.dispatchEvent(i),!i.defaultPrevented)throw o})},hu=()=>Pn(()=>import("./BlogView-MBic_I3A.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),pu=()=>Pn(()=>import("./TopicView-4JXChxle.js"),__vite__mapDeps([4,1,2,5]),import.meta.url),gu=()=>Pn(()=>import("./BBCodeView-EwXTKT8H.js"),__vite__mapDeps([6,7]),import.meta.url),mu=()=>Pn(()=>import("./IndexView-ZsWcpY4E.js"),__vite__mapDeps([]),import.meta.url),Ln={blog:"blog",topic:"topic",bbcode:"bb-code",index:"index"},_u=[{path:"/",component:mu},{name:Ln.blog,path:"/blog",component:hu},{name:Ln.topic,path:"/topic",component:pu},{name:Ln.bbcode,path:"/bb-code",component:gu}],yu=uu({routes:_u,history:Pc()});ec(ic).use(yu).mount("#app");export{ge as F,nc as _,mn as a,po as b,pl as c,Xr as d,fe as e,Ru as f,Cu as g,Ci as h,ms as i,Au as j,vu as k,xu as l,ss as m,Wr as n,eo as o,Eu as p,_l as q,di as r,Xt as s,bu as t,gt as u,hs as v,Tu as w,wu as x,Ou as y,Pu as z}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./BlogView-p4wu9TU3.js","./BottomSpinnerView-r3MJ3GpY.js","./BottomSpinnerView-FlWfsOPZ.css","./BlogView-rpjgMQfG.css","./TopicView-vg8qrC83.js","./TopicView-BbLA7xc5.css","./BBCodeView-FxCuZHI9.js","./BBCodeView-ok635Qnb.css"] + __vite__mapDeps.viteFileDeps = ["./BlogView-MBic_I3A.js","./BottomSpinnerView-_3O8hS20.js","./BottomSpinnerView-OFAEnm-Q.css","./BlogView-rpjgMQfG.css","./TopicView-4JXChxle.js","./TopicView-BbLA7xc5.css","./BBCodeView-EwXTKT8H.js","./BBCodeView-ok635Qnb.css"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } \ No newline at end of file diff --git a/app/src/main/assets/h5/assets/index-Sp0Xd0Q6.css b/app/src/main/assets/h5/assets/index-Sp0Xd0Q6.css deleted file mode 100644 index 79f53926..00000000 --- a/app/src/main/assets/h5/assets/index-Sp0Xd0Q6.css +++ /dev/null @@ -1 +0,0 @@ -#main[data-v-717c16c0]{height:100%;width:100%}@font-face{font-family:BgmFont;src:url(/android/font.ttf) format("truetype");font-weight:400;font-style:normal}:root{font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}@media (prefers-color-scheme: dark){:root{--primary-color: #FFB0C8;--surface-color: #201A1B;--on-primary-color: #650033;--on-surface-color: #EBE0E1;--on-surface-variant-color: #D5C2C6;--surface-container-color: #2d2627}}@media (prefers-color-scheme: light){:root{--primary-color: #A23662;--surface-color: #FFFBFF;--on-primary-color: #FFFFFF;--on-surface-color: #201A1B;--on-surface-variant-color: #514347;--surface-container-color: #eeeeee}}html,body{margin:0;padding:0;height:100%;width:100%;display:flex;place-items:center;background:var(--surface-color)}html *,body *{font-family:BgmFont,monospace;box-sizing:border-box;background:transparent;-webkit-user-select:none;user-select:none;color:var(--on-surface-color)}#app{height:100%;width:100%}.w-0{width:0!important}.w-20{width:20%!important}.w-25{width:25%!important}.w-30{width:30%!important}.w-40{width:40%!important}.w-50{width:50%!important}.w-60{width:60%!important}.h-0{height:0!important}.h-10{height:10%!important}.h-40{height:40%!important}.pointer{cursor:pointer!important}.select-none{-webkit-user-select:none!important;user-select:none!important}.select-text{-webkit-user-select:text!important;user-select:text!important}pre{overflow-x:scroll!important;background:var(--surface-container-color);border-radius:6px;padding:12px;font-size:80%;color:var(--primary-color);box-sizing:border-box}img[smileid]{vertical-align:middle!important;padding-bottom:6px;width:auto!important;min-width:unset!important;border-radius:0!important;display:inline-block!important;object-fit:contain;border:none!important;margin-right:4px;margin-left:4px}img{display:block;max-width:100%;flex-shrink:0;height:auto;border-radius:6px;margin:12px 0;border:1px var(--surface-container-color) solid}.quote{font-size:75%;margin:6px 0;color:var(--on-surface-variant-color);opacity:.75}.quote span{font-weight:700;background:var(--surface-container-color);border-radius:6px;padding:2px 4px;font-size:10px;color:var(--primary-color)}.quote q:before{content:open-quote;display:inline;height:0;line-height:0;left:-22px;position:relative;top:15px;font-size:30px;letter-spacing:-18px;color:var(--on-surface-variant-color)}.quote q:after{content:close-quote;display:inline;height:0;line-height:0;left:3px;position:relative;top:20px;font-size:30px;color:var(--on-surface-variant-color)}.text_mask{color:var(--on-surface-variant-color)!important;background:var(--on-surface-variant-color)!important;margin-bottom:4px;padding:2px 4px;flex-shrink:0;display:inline-block;border-radius:6px!important;overflow:hidden;text-decoration:none;vertical-align:middle;-webkit-tap-highlight-color:transparent;transition:color ease .2s}.text_mask *{color:var(--on-surface-variant-color)!important;background:var(--on-surface-variant-color)!important}.text_mask.show,.text_mask.show *{color:var(--surface-color)!important}.text_mask.show a{color:var(--primary-color)!important;background:var(--surface-container-color)!important}a{outline:none;color:var(--primary-color)!important;margin-bottom:4px;margin-top:4px;background:var(--surface-container-color)!important;padding:2px 6px 4px;flex-shrink:0;display:inline-block;border-radius:6px!important;overflow:hidden;text-decoration:none;vertical-align:middle;-webkit-tap-highlight-color:transparent}.divider{height:12px;background-color:var(--surface-container-color);width:100%;margin-top:24px;opacity:.75}.run-enter-from,.run-leave-to{opacity:0}.run-enter-to,.run-leave-from{opacity:1}.run-enter-active,.run-leave-active{transition:opacity .2s linear}.blinking{border-radius:6px;animation:blinkAnimation 1s forwards}@keyframes blinkAnimation{0%{background:transparent}50%{background:rgba(153,153,153,.4980392157)}90%{background:transparent}to{background:transparent}} diff --git a/app/src/main/assets/h5/index.html b/app/src/main/assets/h5/index.html index c9987ba9..ba34479d 100644 --- a/app/src/main/assets/h5/index.html +++ b/app/src/main/assets/h5/index.html @@ -6,8 +6,8 @@ Bangumi for Android - - + +
diff --git a/app/src/main/assets/h5/test.http b/app/src/main/assets/h5/test.http index c3b2bdd3..fca94d41 100644 --- a/app/src/main/assets/h5/test.http +++ b/app/src/main/assets/h5/test.http @@ -63,3 +63,18 @@ TE: trailers GET https://tinygrail.oss-cn-hangzhou.aliyuncs.com/avatar/edbbcd8f731821b6172a74bf1e6ba9ec.jpg Referer: https://bgm.tv + +### +GET https://frodo.douban.com/api/v2/search/suggestion?q=%E6%B5%B7%E8%B4%BC%E7%8E%8B&apikey=0dad551ec0f84ed02907ff5c42e8ec70&_sig=YIaBWngsMazLHzYtVn50BAbHTkc%3D&_ts=1703084439&count=10 +Sec-Fetch-Dest: empty +Sec-Fetch-Mode: cors +Sec-Fetch-Site: cross-site +Pragma: no-cache +Cache-Control: no-cache +TE: trailers +Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.6,zh-HK;q=0.4,en;q=0.2 +Referer: https://frodo.douban.com/api/v2/search/suggestion?q=%E6%B5%B7%E8%B4%BC%E7%8E%8B&apikey=0dad551ec0f84ed02907ff5c42e8ec70 +User-Agent: api-client/1 com.douban.frodo/7.65.0(277) Android/33 product/coral vendor/Google model/Pixel 4 XL brand/google rom/android network/wifi udid/0643fa6abfd3eaff076ff3ee603211ded11fc344 platform/mobile nd/1 +Host: frodo.douban.com +Connection: Keep-Alive +Accept-Encoding: gzip \ No newline at end of file diff --git a/app/src/main/java/com/xiaoyv/bangumi/ui/feature/person/PersonActivity.kt b/app/src/main/java/com/xiaoyv/bangumi/ui/feature/person/PersonActivity.kt index 1876b545..5dc66338 100644 --- a/app/src/main/java/com/xiaoyv/bangumi/ui/feature/person/PersonActivity.kt +++ b/app/src/main/java/com/xiaoyv/bangumi/ui/feature/person/PersonActivity.kt @@ -12,11 +12,10 @@ import com.xiaoyv.bangumi.databinding.ActivityPersonBinding import com.xiaoyv.bangumi.helper.RouteHelper import com.xiaoyv.blueprint.base.mvvm.normal.BaseViewModelActivity import com.xiaoyv.blueprint.constant.NavKey -import com.xiaoyv.blueprint.kts.toJson import com.xiaoyv.common.helper.FixHelper import com.xiaoyv.common.helper.UserHelper +import com.xiaoyv.common.helper.callback.AutoHideTitleListener import com.xiaoyv.common.kts.CommonDrawable -import com.xiaoyv.common.kts.debugLog import com.xiaoyv.common.kts.initNavBack import com.xiaoyv.common.kts.loadImageAnimate import com.xiaoyv.common.kts.loadImageBlur @@ -67,6 +66,8 @@ class PersonActivity : BaseViewModelActivity() internal val vpEnableLiveData = MutableLiveData() + internal val requireEntity get() = onPersonLiveData.value + /** * 是否收集 */ internal val isCollected: Boolean - get() = onPersonLiveData.value?.isCollected == true + get() = requireEntity?.isCollected == true + + internal val requireName: String + get() = requireEntity?.nameNative.orEmpty().ifBlank { requireEntity?.nameCn.orEmpty() } override fun onViewCreated() { queryPersonInfo() diff --git a/app/src/main/java/com/xiaoyv/bangumi/ui/feature/person/character/PersonCharacterFragment.kt b/app/src/main/java/com/xiaoyv/bangumi/ui/feature/person/character/PersonCharacterFragment.kt index f133131b..ae35170f 100644 --- a/app/src/main/java/com/xiaoyv/bangumi/ui/feature/person/character/PersonCharacterFragment.kt +++ b/app/src/main/java/com/xiaoyv/bangumi/ui/feature/person/character/PersonCharacterFragment.kt @@ -31,6 +31,9 @@ class PersonCharacterFragment : BaseListFragment BgmApiManager.bgmWebApi.queryEpDetail(topicId) + .parserTopicEp(topicId) + // 其它类型话题 + else -> BgmApiManager.bgmWebApi.queryTopicDetail(topicId, topicType) + .parserTopic(topicId) + } } - debugLog { "解析消费:${System.currentTimeMillis() - start}" } onTopicDetailLiveData.value = list } ) diff --git a/app/src/main/java/com/xiaoyv/bangumi/ui/media/detail/MediaDetailActivity.kt b/app/src/main/java/com/xiaoyv/bangumi/ui/media/detail/MediaDetailActivity.kt index ef693c1a..53021d1f 100644 --- a/app/src/main/java/com/xiaoyv/bangumi/ui/media/detail/MediaDetailActivity.kt +++ b/app/src/main/java/com/xiaoyv/bangumi/ui/media/detail/MediaDetailActivity.kt @@ -18,6 +18,7 @@ import com.xiaoyv.common.config.annotation.TopicType import com.xiaoyv.common.config.bean.PostAttach import com.xiaoyv.common.helper.FixHelper import com.xiaoyv.common.helper.UserHelper +import com.xiaoyv.common.helper.callback.AutoHideTitleListener import com.xiaoyv.common.kts.CommonDrawable import com.xiaoyv.common.kts.CommonId import com.xiaoyv.common.kts.GoogleAttr @@ -95,6 +96,8 @@ class MediaDetailActivity : } override fun initListener() { + binding.appBar.addOnOffsetChangedListener(AutoHideTitleListener(binding.toolbar) { viewModel.requireMediaName }) + binding.speedDial.setOnActionSelectedListener(SpeedDialView.OnActionSelectedListener { actionItem -> binding.speedDial.close() diff --git a/app/src/main/res/layout/fragment_save_list_item.xml b/app/src/main/res/layout/fragment_save_list_item.xml index e4e814bd..0d2f6c85 100644 --- a/app/src/main/res/layout/fragment_save_list_item.xml +++ b/app/src/main/res/layout/fragment_save_list_item.xml @@ -84,14 +84,15 @@ android:id="@+id/tv_ep" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginTop="@dimen/ui_layout_margin" android:background="@drawable/ui_shape_rectangle_corner_6" android:backgroundTint="?attr/colorPrimary" - android:padding="@dimen/ui_size_6" + android:padding="@dimen/ui_size_4" android:textAppearance="?attr/textAppearanceLabelSmall" android:textColor="?attr/colorOnPrimary" - app:layout_constraintBottom_toBottomOf="@+id/tv_title" + android:textSize="@dimen/ui_font_10" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintTop_toTopOf="@+id/tv_title" + app:layout_constraintTop_toTopOf="parent" tools:text="12 话" /> ? = null, ): Document + @GET("/ep/{epId}") + suspend fun queryEpDetail(@Path("epId") epId: String): Document + @FormUrlEncoded @POST("/subject/set/watched/{mediaId}") suspend fun updateMediaProgress( diff --git a/lib-common/src/main/java/com/xiaoyv/common/api/parser/entity/TopicDetailEntity.kt b/lib-common/src/main/java/com/xiaoyv/common/api/parser/entity/TopicDetailEntity.kt index 68f53b40..0aad004f 100644 --- a/lib-common/src/main/java/com/xiaoyv/common/api/parser/entity/TopicDetailEntity.kt +++ b/lib-common/src/main/java/com/xiaoyv/common/api/parser/entity/TopicDetailEntity.kt @@ -29,7 +29,6 @@ data class TopicDetailEntity( @SerializedName("related") var related: SampleRelatedEntity = SampleRelatedEntity(), @SerializedName("comments") var comments: List = emptyList(), @SerializedName("replyForm") var replyForm: CommentFormEntity = CommentFormEntity(), - @SerializedName("gh") var gh: String = "", @SerializedName("emojiParam") var emojiParam: EmojiParam = EmojiParam(), @SerializedName("emojis") var emojis: List = emptyList(), ) : Parcelable { diff --git a/lib-common/src/main/java/com/xiaoyv/common/api/parser/impl/TopicParser.kt b/lib-common/src/main/java/com/xiaoyv/common/api/parser/impl/TopicParser.kt index a2bd39ec..ad454350 100644 --- a/lib-common/src/main/java/com/xiaoyv/common/api/parser/impl/TopicParser.kt +++ b/lib-common/src/main/java/com/xiaoyv/common/api/parser/impl/TopicParser.kt @@ -9,13 +9,11 @@ import com.xiaoyv.common.api.parser.entity.TopicDetailEntity import com.xiaoyv.common.api.parser.fetchStyleBackgroundUrl import com.xiaoyv.common.api.parser.hrefId import com.xiaoyv.common.api.parser.optImageUrl -import com.xiaoyv.common.api.parser.parserFormHash import com.xiaoyv.common.api.parser.parserLikeParam import com.xiaoyv.common.api.parser.replaceSmiles import com.xiaoyv.common.api.parser.requireNoError import com.xiaoyv.common.kts.groupValueOne import com.xiaoyv.widget.kts.useNotNull -import org.jsoup.nodes.Document import org.jsoup.nodes.Element import java.io.StringReader @@ -23,82 +21,67 @@ import java.io.StringReader * @author why * @since 12/2/23 */ -fun Document.parserTopic(topicId: String): TopicDetailEntity { +fun Element.parserTopic(topicId: String): TopicDetailEntity { requireNoError() - val formHash = parserFormHash() - return select("#news_list > .item, .entry_list > .item").let { - val entity = TopicDetailEntity(id = topicId, gh = formHash) + val entity = TopicDetailEntity(id = topicId) - select(".postTopic .re_info small").outerHtml().let { - val groupValues = "eraseEntry\\(\\s*(.*?)\\s*,\\s*'(.*?)'\\s*\\)".toRegex() - .find(it)?.groupValues.orEmpty() - if (entity.id.isBlank()) { - entity.id = groupValues.getOrNull(1).orEmpty() - } + select(".postTopic .re_info small").outerHtml().let { + val groupValues = "eraseEntry\\(\\s*(.*?)\\s*,\\s*'(.*?)'\\s*\\)".toRegex() + .find(it)?.groupValues.orEmpty() + if (entity.id.isBlank()) { + entity.id = groupValues.getOrNull(1).orEmpty() } + } - // 关联的讨论条目 - entity.related = select("#pageHeader").let { item -> - val related = SampleRelatedEntity(title = "关联的讨论") - val relatedItem = SampleRelatedEntity.Item() - val a = item.select("a") - useNotNull(a.firstOrNull()) { - relatedItem.image = select("img.avatar").attr("src").optImageUrl() - relatedItem.title = text().ifBlank { attr("title") } - - relatedItem.imageLink = attr("href") - relatedItem.titleLink = attr("href") - } - related.items.add(relatedItem) - related + // 关联的讨论条目 + entity.related = select("#pageHeader").let { item -> + val related = SampleRelatedEntity(title = "关联的讨论") + val relatedItem = SampleRelatedEntity.Item() + val a = item.select("a") + useNotNull(a.firstOrNull()) { + relatedItem.image = select("img.avatar").attr("src").optImageUrl() + relatedItem.title = text().ifBlank { attr("title") } + + relatedItem.imageLink = attr("href") + relatedItem.titleLink = attr("href") } + related.items.add(relatedItem) + related + } - select(".postTopic").apply { - entity.time = select(".re_info small") - .firstOrNull()?.textNodes()?.firstOrNull()?.text() - .orEmpty().trim() - - entity.userId = select("a.avatar").hrefId() - entity.userAvatar = select("a.avatar > span").attr("style") - .fetchStyleBackgroundUrl().optImageUrl() - entity.userName = select(".inner strong a").text() - entity.userSign = select(".inner .sign").text() - - // src="/img/smiles/tv/19.gif" -> src="https://bgm.tv/img/smiles/tv/19.gif" - entity.content = select(".topic_content").html().replaceSmiles() - - // 解析文字添加贴贴参数 - entity.emojiParam = select(".topic_actions .like_dropdown").parserLikeParam() - } + select(".postTopic").apply { + entity.time = select(".re_info small") + .firstOrNull()?.textNodes()?.firstOrNull()?.text() + .orEmpty().trim() - if (entity.content.isBlank()) { - entity.content = select("#columnCrtB .detail").html().replaceSmiles() - } + entity.userId = select("a.avatar").hrefId() + entity.userAvatar = select("a.avatar > span").attr("style") + .fetchStyleBackgroundUrl().optImageUrl() + entity.userName = select(".inner strong a").text() + entity.userSign = select(".inner .sign").text() - entity.title = select("#pageHeader h1") - .firstOrNull()?.lastChild()?.toString() - .orEmpty().trim() + // src="/img/smiles/tv/19.gif" -> src="https://bgm.tv/img/smiles/tv/19.gif" + entity.content = select(".topic_content").html().replaceSmiles() - entity.comments = parserBottomComment() - entity.replyForm = parserReplyForm() + // 解析文字添加贴贴参数 + entity.emojiParam = select(".topic_actions .like_dropdown").parserLikeParam() + } - // 全部的贴贴列表 - val likeJson = "data_likes_list\\s*=\\s*([\\s\\S]+?);\\s+?".toRegex() - .groupValueOne(html()) + if (entity.content.isBlank()) { + entity.content = select("#columnCrtB .detail").html().replaceSmiles() + } - val reader = JsonReader(StringReader(likeJson)) - val gson = Gson() - val create = gson.newBuilder().setLenient().create() - val likeEntity = create.fromJson(reader, LikeEntity::class.java) + entity.title = select("#pageHeader h1") + .firstOrNull()?.lastChild()?.toString() + .orEmpty().trim() - // 贴贴列表填充(文章和评论的贴贴) - entity.fillLikeInfo(likeEntity.normal()) + fillCommonData(entity) - entity - } + return entity } + /** * 解析 TopicId * @@ -115,4 +98,61 @@ fun Document.parserTopic(topicId: String): TopicDetailEntity { */ fun Element.parserTopicSendResult(): String { return "/topic/(\\d+)\"".toRegex().groupValueOne(toString()) +} + +/** + * 解析章节的讨论详情 + */ +fun Element.parserTopicEp(topicId: String): TopicDetailEntity { + requireNoError() + + val entity = TopicDetailEntity(id = topicId) + + select("#columnEpA").apply { + entity.title = select(".title").text() + + val desc = select(".epDesc") + entity.time = desc.select(".tip").remove().text() + entity.content = desc.html() + } + + entity.related = select("#subject_inner_info").let { item -> + val related = SampleRelatedEntity(title = "关联的条目") + val relatedItem = SampleRelatedEntity.Item() + val a = item.select("a") + useNotNull(a.firstOrNull()) { + relatedItem.image = select("img.avatar").attr("src").optImageUrl() + relatedItem.title = text().ifBlank { attr("title") } + + relatedItem.imageLink = attr("href") + relatedItem.titleLink = attr("href") + } + related.items.add(relatedItem) + related + } + + fillCommonData(entity) + + return entity +} + + +/** + * 话题解析公共数据 + */ +private fun Element.fillCommonData(entity: TopicDetailEntity) { + entity.comments = parserBottomComment() + entity.replyForm = parserReplyForm() + + // 全部的贴贴列表 + val likeJson = "data_likes_list\\s*=\\s*([\\s\\S]+?);\\s+?".toRegex() + .groupValueOne(html()) + + val reader = JsonReader(StringReader(likeJson)) + val gson = Gson() + val create = gson.newBuilder().setLenient().create() + val likeEntity = create.fromJson(reader, LikeEntity::class.java) + + // 贴贴列表填充(文章和评论的贴贴) + entity.fillLikeInfo(likeEntity.normal()) } \ No newline at end of file diff --git a/lib-common/src/main/java/com/xiaoyv/common/helper/callback/AutoHideTitleListener.kt b/lib-common/src/main/java/com/xiaoyv/common/helper/callback/AutoHideTitleListener.kt new file mode 100644 index 00000000..66681ef8 --- /dev/null +++ b/lib-common/src/main/java/com/xiaoyv/common/helper/callback/AutoHideTitleListener.kt @@ -0,0 +1,25 @@ +package com.xiaoyv.common.helper.callback + +import androidx.appcompat.widget.Toolbar +import com.google.android.material.appbar.AppBarLayout +import com.google.android.material.appbar.AppBarLayout.OnOffsetChangedListener +import com.xiaoyv.widget.kts.dpi +import kotlin.math.abs + +/** + * Class: [AutoHideTitleListener] + * + * @author why + * @since 12/23/23 + */ +class AutoHideTitleListener(private val toolbar: Toolbar, private val title: () -> String) : + OnOffsetChangedListener { + override fun onOffsetChanged(p0: AppBarLayout, p1: Int) { + // 完全折叠 + if (abs(p1) > p0.totalScrollRange - 40.dpi) { + toolbar.title = title() + } else { + toolbar.title = null + } + } +} \ No newline at end of file diff --git a/lib-h5/src/components/CommentView.vue b/lib-h5/src/components/CommentView.vue index e17ac450..98676b5c 100644 --- a/lib-h5/src/components/CommentView.vue +++ b/lib-h5/src/components/CommentView.vue @@ -271,6 +271,7 @@ const onClickNewComment = (event: Event) => { .topic-html { width: 100%; max-width: 100%; + line-height: 1.5; word-break: break-all; overflow-x: hidden !important; diff --git a/lib-h5/src/pages/topic/TopicView.vue b/lib-h5/src/pages/topic/TopicView.vue index 4953716b..68504c6d 100644 --- a/lib-h5/src/pages/topic/TopicView.vue +++ b/lib-h5/src/pages/topic/TopicView.vue @@ -125,7 +125,7 @@ onMounted(() => {
{{ topic.title }}
-
{{ topic.userName }}
+
{{ topic.userName }}
{{ topic.time }}
diff --git a/lib-h5/src/style.scss b/lib-h5/src/style.scss index c1a0c422..624dd41c 100644 --- a/lib-h5/src/style.scss +++ b/lib-h5/src/style.scss @@ -111,16 +111,17 @@ pre { // 表情 img[smileid] { - vertical-align: middle !important; - padding-bottom: 6px; + vertical-align: text-bottom !important; width: auto !important; min-width: unset !important; border-radius: 0 !important; display: inline-block !important; - object-fit: contain; + object-fit: contain !important; border: none !important; margin-right: 4px; margin-left: 4px; + margin-top: 0 !important; + margin-bottom: 0 !important; } // 图片