PageSourceSearch

https://www.digiknow.com.tw/_nuxt/BSDjFeTx.js

js digiknow.com.tw collected 2026-10-01 15:35:12 UTC 14,422 bytes, 1 lines download raw bytes

1import{_ as We}from"./Cep5FnKL.js";import{A as Oe,z as Ge,r as Ke,ac as Xe,ad as Ze,ae as ne,af as Je,ag as Qe,ah as et,ai as tt,b as st,j as at,k as lt,aj as ot,ak as L,c as nt,i as it,al as ut,am as ie}from"./BWZN0XpW.js";import{i as rt,d as r,ai as J,m as y,n as ct,k as dt,am as vt,an as mt,ao as pt,ap as ft,w as ht,y as gt,j as yt,f as wt,A as f,X as d,N as S,L as b,W as U,u as n,Z as s,aa as xt,a0 as N,a2 as ue,P as re,M as ce,aq as bt,U as _t,ar as Mt,a3 as Q,a6 as Ct,a5 as R,a7 as St,T as kt,v as q}from"./Ci6hL83t.js";import{_ as Ut}from"./B3pthLwc.js";import{_ as Pt}from"./DtAHAKtE.js";import{u as Tt}from"./DTKzOwz0.js";import{u as Dt}from"./X5SsMf5Z.js";import{c as It}from"./Bx8Ho6Bi.js";import"./BeoDcdzL.js";import"./OLvXCpfx.js";import"./CpDG0SrE.js";import"./Ckb8g3Lx.js";import"./BWUvGElL.js";import"./ts0cGMbQ.js";import"./2mTkQZYb.js";import"./DbsvbXiH.js";const jt={class:"relative"},Rt={class:"h-full rounded-xl aspect-[9/16] flex justify-center items-center"},$t={class:"bg-neutral-40 flex-1 flex flex-col rounded-xl justify-end w-auto aspect-[9/16] max-w-[100dvw] relative"},Ht={key:0,class:"absolute top-0 left-0 w-full h-20 pointer-events-none"},Et={class:"absolute top-6 left-4 flex justify-start items-center pointer-events-auto",style:{to
1p:"24px",left:"16px"}},Yt={key:1,ref:"outer-layer",class:"flex h-full items-center justify-center relative overflow-clip bg-neutral-5"},At={key:0,class:"fixed inset-0 bg-black/40 z-10"},Lt={key:2,class:"flex flex-col items-center h-[inherit] justify-center"},Vt={class:"py-4 px-5 flex items-center justify-between border-b border-neutral-15"},zt={class:"text-actTitle text-xl font-medium"},Nt={key:0,class:"py-4 px-5 text-neutral-70 text-base font-medium overflow-y-auto h-[calc(100%-80px)]"},qt={class:"text-[#AC6167] mt-2"},Ft=["onClick"],Bt={class:"flex gap-14 my-5 text-neutral-70 text-lg font-medium"},Wt={class:"flex flex-col gap-1"},Ot={class:"flex flex-col gap-1"},Gt={class:"text-neutral-50 font-normal p-4 bg-lightash rounded-[10px]"},Kt={key:1,class:"py-4 px-5 h-[calc(100%-80px)] overflow-y-auto relative"},Xt={class:"h-full overflow-y-auto"},Zt={class:"pb-20"},Jt={key:0,class:"absolute top-2 right-[66px] w-[90px] h-[35px] text-white text-sm font-normal px-2.5 py-2 bg-neutral-70 rounded-lg"},Qt={key:0,class:"absolute top-2 right-[66px] w-[90px] h-[35px] text-white text-sm font-normal px-2.5 py-2 bg-neutral-70 rounded-lg"},F=190,es=20,ts=50,ws={__name:"[uuid]",setup(ss){const P=Oe(),de=Ge(),B=Ke();Tt();const ve=rt("device"),{setCurrentRouteMeta:me,disposeSeoMeta:pe}=Xe(),p=It(),{height:fe,width:he}=Ze(),T=r({width:0,height:0}),ge=J("outer-layer"),{width:V,height:ye}=Dt(ge),we=J("swiper-container");ne(we);const xe=J("right-side-panel");ne(xe);const be=y(()=>!k.value||h.value?{}:{transform:`translateX(-${Math.round((T.value?.width+F)/2)}px)`}),_e=y(()=>{const t=Math.round((V.value-(T.value?.width*2+F))/2);return h?.value?{}:{right:`${t}px`}}),Me=y(()=>({right:`${Math.round((V.value-(T.value?.width*2+F))/2-70)}px`})),Ce=r(!1),h=y(()=>p.isMobileClip),Se=y(()=>h.value?!0:he.value<1024);ct(()=>[V.value,ye.value],()=>{H.value&&H.value.update()});const D=r(!0),I=r(!1),v=dt(new Map),ke=t=>e=>{e&&v.value.set(t,e)},w=r(""),M=r({}),W=r(Je[1]),Ue=y(()=>B.isLogin),z=r([]),ee=r({}),O=r({total:0,commentHistory:[]}),k=r(!1),$=r(""),C=r({content:!1,message:!1}),G=r(!1),K=r(!1),H=r(null),_=r(0),E=r(""),i=y(()=>p.clipPlayList||[]),Pe=r([vt,mt,pt,ft]),Te=y(()=>_.value>0),De=y(()=>_.value<i.value?.length-1),te=t=>{const e=t.slides?.[0]?.offsetHeight;e&&(T.value={height:Math.round(e),width:Math.round(e*9/16)})},se=t=>{const e=t?.slides?.[0]?.offsetHeight;e?T.value={height:Math.round(e),width:Math.round(e*9/16)}:setTimeout(()=>{se(t)},200)},Ie=t=>{q(()=>{se(t)}),H.value=t,_.value=t.activeIndex};function je(){H.value?.slidePrev()}function Re(){H.value?.slideNext()}const $e=async t=>{pe();const{path:e,name:l,params:a,fullPath:m}=P||{},u={path:`/clip/${t}`,name:l,params:{...a,uuid:t},fullPath:m};await me(u)},X=Qe(async t=>{history.replaceState(null,"",`/clip/${t}`),w.value=t,M.value=i.value.find(e=>e.id===t),await $e(t),await Y()},300);async function He(t){if(!i?.value||i?.value.length===0)return;const e=t.activeIndex;_.value=e,v.value.get(i.value[e]?.customUuid)?.refreshUserInfo?.();const l=t.previousIndex,a=i.value[l],m=L().format("YYYY-MM-DD HH:mm:ss");if(l!=null&&l!==e&&a){const{id:g,customUuid:x}=a,o=v.value.get(x);if(o?.closeSharePanel?.(),o){const j=o?.getVideoElement()?.currentTime?.()||0,A={id:g,customUuid:x,videoDuration:Math.round(a.length||0),watchedDuration:Math.round(j||0),...o.getPlayMeta?.()||{},endTime:m};p.updateClipPlayHistory(A),Z(A),o?.clearPlayMeta?.()}}if(i?.value?.length-e-1<5){if(I.value)return;I.value=!0;const{status:g,message:x}=await p.clipPlaylistNext(l);I.value=!1}const u=i.value[e];u&&u?.id&&(v.value.forEach((g,x)=>{g?.pauseVideo?.(),g?.resetPlayState?.()}),w.value=u?.id,X(u?.id),E.value=u?.customUuid,await q(),setTimeout(()=>{v.value.get(u?.customUuid)?.playVideo?.()},100))}function Ee(t){const e=i.value[t];if(e){const{id:l,customUuid:a}=e,m=v.value.get(a);if(m){const c=L().format("YYYY-MM-DD HH:mm:ss"),u=m?.getVideoElement()?.currentTime?.()||0,g={id:l,customUuid:a,videoDuration:Math.round(e.length||0),watchedDuration:Math.round(u||0),...m.getPlayMeta?.()||{},endTime:c};p.updateClipPlayHistory(g),Z(g)}v.value.get(e?.customUuid)?.clearPlayMeta?.()}}async function Z(t){const e=L().format("YYYY-MM-DD HH:mm:ss"),l={uuid:t.id,videoDuration:t.videoDuration,watchedDuration:t.watchedDuration,startTime:t?.startTime||e,endTime:t?.endTime||e,isReplay:t?.
1isReplay||!1};await p.clipVisits(l)}const Ye={clip:We},ae=r(4),Ae={clip:tt},le=y(()=>ae.value===""?"":et[ae.value]),Le=y(()=>Ye[le.value]);y(()=>Ae[le.value]??(()=>{}));const Ve=()=>{},ze=()=>{},oe=(t,e="")=>{if(e==="close"){C.value.content=!1,C.value.message=!1,k.value=!1;return}t==="content"&&(C.value.content=!C.value.content,k.value=C.value.content),t==="message"&&(C.value.message=!C.value.message,k.value=C.value.message),$.value=t},Ne=t=>{W.value=t,Y()},Y=async()=>{const t={uuid:w.value,sort:W?.value.value??"visits"},e=Ue.value?"apiArticles.comments":"apiArticles.commentsWithoutToken",{status:l,message:a,result:m}=await nt(e,t);if(l){const c=m??[];z.value=it(c)?c?.map(ut)??[]:[],ee.value=ie(c||[]);const u=Math.abs(c?.reduce((x,o)=>x+(o.userKpReward?.kp||0),0)||0),g=c?.filter(x=>x.userKpReward?.fromUserId===B.user?.id)||[];O.value={total:u,commentHistory:g}}else z.value=[],ee.value=ie([]),O.value={total:0,commentHistory:[]},B.setDevNotifyError(`無法取得文章留言,${a}`)},qe=async()=>{const t=i.value[0];t&&(await q(),setTimeout(()=>{v.value.get(t?.customUuid)?.playVideo?.()},200))},Fe=t=>{if(t){const e={k:t,tab:"clip",a:0};de.push({name:"Search",query:e})}},Be=()=>{const t=[{url:"//cloudcache.tencent-cloud.com/open/qcloud/video/tcplayer/tcplayer.css",extension:"css"},{url:"//imgcache.qq.com/open/qcloud/video/tcplayer/libs/hls.min.0.13.2m.js",extension:"js"},{url:"//imgcache.qq.com/open/qcloud/video/tcplayer/tcplayer.v4.1.min.js",extension:"js"}],e=document.head;t.forEach(({url:l,extension:a})=>{if(Array.from(a==="js"?document.scripts:document.styleSheets).some(u=>u.src?.includes(l)||u.href?.includes(l)))return;const c=document.createElement(a==="js"?"script":"link");a==="js"?(c.src=l,c.async=!1):(c.href=l,c.rel="stylesheet"),e.appendChild(c)})};return ht(()=>{let t=ve.isMobile;fe.value<640&&(t=t||!0),V.value<T.value?.width*2+F+(es+ts)*2+100&&(t=t||!0),!D.value&&(i.value?.length===0?p.setIsMobileClip(!1):p.setIsMobileClip(t))}),gt(()=>{p.setClipPlayList([]),p.setClipPlayHistory([]),_.value=0,E.value="",w.value="",M.value={},D.value=!0,v.value?.forEach((t,e)=>{t?.clearPlayer?.()}),v.value?.clear()}),yt(async()=>{if(Ce.value=!1,p.setClipPlayList([]),p.setClipPlayHistory([]),_.value=0,E.value="",w.value="",M.value={},v.value?.forEach((a,m)=>{a?.clearPlayer?.()}),v.value?.clear(),D.value=!0,!D.value||I.value)return;I.value=!0,Be();const t=P.params.uuid!=="detail"?{uuid:P.params.uuid}:{},{status:e,message:l}=await p.clipPlaylistInit(t);if(i.value.length>0&&P.params.uuid==="detail"){const a=i.value[0].id;E.value=i.value[0].customUuid,w.value=a,X(a)}if(i.value.length>0&&P.params.uuid!=="detail"){const a=P.params.uuid;w.value=a,X(a)}D.value=!1,q(()=>{qe()}),I.value=!1}),wt(()=>{const t=i.value[_.value];if(_.value!==null&&_.value!==void 0&&t){const{id:e,customUuid:l}=t,a=v.value.get(l);if(a){const m=L().format("YYYY-MM-DD HH:mm:ss"),c=a?.getVideoElement()?.currentTime?.()||0,u={id:e,customUuid:l,videoDuration:Math.round(t.length||0),watchedDuration:Math.round(c||0),...a.getPlayMeta?.()||{},endTime:m};p.updateClipPlayHistory(u),Z(u),a?.clearPlayMeta?.()}}v.value.forEach((e,l)=>{e?.clearPlayer?.()}),v.value.clear()}),(t,e)=>{const l=st,a=bt,m=Mt,c=at,u=lt,g=Ut,x=Pt;return d(),f("div",jt,[D.value?(d(),f("div",{key:0,class:U(["h-full w-full flex items-center justify-center bg-neutral-5 relative",[n(h)?"":"py-14"]])},[s("div",Rt,[s("div",$t,[n(Se)?(d(),f("div",Ht,[e[9]||(e[9]=s("div",{class:"w-full h-full bg-[linear-gradient(180deg,rgba(0,0,0,0.3),transparent)] rounded-t-lg"},null,-1)),s("div",Et,[s("button",{class:"flex items-center justify-center w-8 h-8 flex-shrink-0",onClick:e[0]||(e[0]=o=>t.$router.back())},[b(l,{name:"chevron-left",color:"white",iconHoverColor:"white",size:32})])])])):S("",!0),e[10]||(e[10]=xt('<div class="animate-pulse px-4 py-5 h-[144px]"><div class="flex flex-row items-center gap-2"><div class="size-[42px] rounded-full bg-neutral-20"></div><div class="w-[30%] h-5 rounded-xl bg-neutral-20"></div></div><div class="mt-4 w-[80%] h-5 rounded-xl bg-neutral-20"></div><div class="mt-2 w-[60%] h-5 rounded-xl bg-neutral-20"></div></div>',1))])])],2)):n(i)&&n(i)?.length>0?(d(),f("div",Yt,[s("div",{class:U(["flex absolute h-full w-full items-center justify-center transition-transform duration-500",[n(
1h)?"pt-0":"pt-14"]]),style:Q([n(be)])},[b(m,{ref:"swiper-container",class:U(["swiper-container w-full",[n(h)?"h-[calc((100dvh)-0px)]":"h-[calc((100dvh)-150px-56px)]"]]),freeMode:!1,mousewheel:{sensitivity:1},speed:100,modules:Pe.value,direction:"vertical","slides-per-view":n(h)?1:1.1,"space-between":16,centeredSlides:!1,virtual:{enabled:!0},onResize:te,onUpdate:te,onSwiper:Ie,onSlideChange:He},{default:N(()=>[(d(!0),f(ue,null,re(n(i)||[],(o,j)=>(d(),ce(a,{key:`clip-swiper-item-${o.customUuid}`,"data-key":`clip-swiper-item-${o.customUuid}`,virtualIndex:j},{default:N(()=>[(d(),ce(_t(n(Le)),{class:"h-[calc(100%)]",key:`clip-${o.customUuid}`,data:o,currentViewingUuid:w.value,activeCustomUuid:E.value,showMessage:k.value,isMobile:n(h),"message-length":z.value?.length||0,messageRewardInfo:O.value,ref_for:!0,ref:ke(o.customUuid),isFirst:j===0,onUpdateFollower:Ve,onSwapSuccess:ze,onOpenMessage:e[1]||(e[1]=A=>oe(A.messageType)),onClipEnded:A=>Ee(j),onFinishedReward:Y},null,40,["data","currentViewingUuid","activeCustomUuid","showMessage","isMobile","message-length","messageRewardInfo","isFirst","onClipEnded"]))]),_:2},1032,["data-key","virtualIndex"]))),128))]),_:1},8,["class","modules","slides-per-view"])],6),k.value&&n(h)?(d(),f("div",At)):S("",!0)],512)):!n(i)||n(i)?.length===0?(d(),f("div",Lt,[b(c,{src:"imgs/imgFarAct",class:"mt-3 -ml-1 mb-8 w-60 lg:w-96"}),e[12]||(e[12]=s("p",{class:"text-neutral-50 mb-2 text-lg font-medium"},"暫時沒有內容",-1)),e[13]||(e[13]=s("p",{class:"text-neutral-50 mb-6 text-lg font-medium"},"敬請期待精彩短影音!",-1)),b(u,{to:{name:"Home"}},{default:N(()=>e[11]||(e[11]=[s("button",{class:"px-10 py-2 bg-primary-main-gradient-to-r rounded-xl relative flex items-center justify-center mb-10 w-[300px]"},[s("p",{class:"text-base text-white"},"立即探索知識")],-1)])),_:1,__:[11]})])):S("",!0),b(kt,{name:"fade"},{default:N(()=>[Ct(s("div",{class:U(["absolute z-10 top-0 py-14 h-full flex items-center",[n(h)?"w-full ":""]]),ref:"right-side-panel",style:Q([n(_e)])},[s("div",{class:U(["bg-white rounded-xl border border-neutral-15",[n(h)?"w-full h-full mx-4":"aspect-[9/16] h-full"]])},[s("div",Vt,[s("div",zt,R($.value==="content"?"內容說明":"留言"),1),s("div",null,[s("button",{onClick:e[2]||(e[2]=o=>oe($.value,"close"))},[b(l,{size:"16",name:"times",color:"neutral-50"})])])]),$.value==="content"?(d(),f("div",Nt,[s("div",null,R(M.value?.title),1),s("div",qt,[(d(!0),f(ue,null,re(M.value?.tag||[],o=>(d(),f("span",{key:o?.value,class:"cursor-pointer mr-1",onClick:j=>Fe(o?.label)}," #"+R(o?.label),9,Ft))),128))]),s("div",Bt,[s("div",Wt,[e[14]||(e[14]=s("div",{class:"text-neutral-50 text-sm font-normal"},"觀看次數",-1)),s("div",null,R(n(ot)(M.value?.watchedCount||0)),1)]),s("div",Ot,[e[15]||(e[15]=s("div",{class:"text-neutral-50 text-sm font-normal"},"發佈日期",-1)),s("div",null,R(n(L)(M.value?.published).format("YYYY/MM/DD")),1)])]),s("div",Gt,R(M.value?.description),1)])):S("",!0),$.value==="message"?(d(),f("div",Kt,[s("div",Xt,[s("div",Zt,[b(g,{ref:"messageRef",list:z.value,"comment-like-list":[],"article-uuid":w.value,selected:W.value,pageType:"clip",haveSeries:!1,onReload:e[3]||(e[3]=o=>Y()),onSelected:Ne},null,8,["list","article-uuid","selected"])])]),s("div",null,[b(x,{class:"absolute pl-5 pr-5 pt-7 pb-7 bottom-0 left-0 bg-white w-full h-20 border-t border-neutral-15",layout:"single","article-uuid":w.value,onReload:e[4]||(e[4]=o=>Y())},null,8,["article-uuid"])])])):S("",!0)],2)],6),[[St,k.value]])]),_:1}),n(h)?S("",!0):(d(),f("div",{key:3,class:"absolute top-0 bottom-0 transform justify-center z-20 flex flex-col gap-6",style:Q([n(Me)])},[s("button",{class:U(["p-[13px] bg-footer hover:bg-neutral-15 active:bg-neutral-20 rounded-full transition-all ease-in-out duration-700",n(Te)?"opacity-100 translate-y-0":"opacity-0 translate-y-[74px] pointer-events-none"]),onClick:je,onMouseenter:e[5]||(e[5]=o=>K.value=!0),onMouseleave:e[6]||(e[6]=o=>K.value=!1)},[b(l,{size:"24",name:"prev",color:"actTitle"}),K.value?(d(),f("div",Jt," 上一部影片 ")):S("",!0)],34),s("button",{class:U(["p-[13px] bg-footer hover:bg-neutral-15 active:bg-neutral-20 rounded-full transition-all ease-in-out duration-700 relative",n(De)?"opacity-100 translate-y-0":"opacity-0 translate-y-[-74px] pointer-events-none"]),onClick:Re,onMouseenter:e[7]||
1(e[7]=o=>G.value=!0),onMouseleave:e[8]||(e[8]=o=>G.value=!1)},[b(l,{size:"24",name:"next",color:"actTitle"}),G.value?(d(),f("div",Qt," 下一部影片 ")):S("",!0)],34)],4))])}}};export{ws as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.