1import{m as ft,n as pt,_ as mt}from"./article-CyUooda7.js";import{aG as ve,b5 as ht,W as _t,p as se,X as W,bg as gt,bG as yt,y as c,aJ as ot,Y as Pe,Z as Te,aH as _e,$ as nt,i as I,b9 as bt,a0 as at,a1 as xt,x as b,a2 as pe,o as ye,aZ as st,F as we,bH as wt,q as Ct,ac as F,aK as $t,_ as he,U as it,P as lt,w as ae,a as ze,ax as It,bI as Oe,b as L,c as D,d as h,u as x,j as U,e as Y,k as fe,a8 as St,O as kt,ao as tt,ap as Lt,aq as Ht,M as me,f as q,g as Le,r as He,B as rt,t as te,h as ge,n as xe,s as Ce,ai as Pt,N as Ve,bJ as Tt,bK as zt,l as Ot,bB as Vt,bE as Rt,m as jt,v as At,a9 as Et}from"./index-B97kF60y.js";import{t as Mt}from"./index-D94quFqE.js";import{a as Wt,b as Nt,p as Dt,c as Bt,d as Ft,e as Ut}from"./video-Ku-h6xsz.js";import{T as Yt}from"./index-DC1iFGm2.js";import{_ as qt}from"./index-CuOsKUtN.js";import{T as ct}from"./index-DJc6Tgko.js";import{T as Jt}from"./index-CIltHOHg.js";import{i as Kt,N as Gt,a as Xt}from"./Spin-CS8J2QhF.js";import{r as Zt,a as Qt,N as eo,E as to,W as oo,S as no,I as ao,b as so}from"./Close-N7-UC-NF.js";import{o as io}from"./omit-DbnPTcif.js";import"./upperFirst-CqOKadm9.js";const{cubicBezierEaseInOut:ue,cubicBezierEaseOut:lo,cubicBezierEaseIn:ro}=ht;function co({overflow:u="hidden",duration:a=".3s",originalTransition:e="",leavingDelay:t="0s",foldPadding:o=!1,enterToProps:d=void 0,leaveToProps:v=void 0,reverse:w=!1}={}){const i=w?"leave":"enter",s=w?"enter":"leave";return[ve(`&.fade-in-height-expand-transition-${s}-from, 2 &.fade-in-height-expand-transition-${i}-to`,Object.assign(Object.assign({},d),{opacity:1})),ve(`&.fade-in-height-expand-transition-${s}-to, 3 &.fade-in-height-expand-transition-${i}-from`,Object.assign(Object.assign({},v),{opacity:0,marginTop:"0 !important",marginBottom:"0 !important",paddingTop:o?"0 !important":void 0,paddingBottom:o?"0 !important":void 0})),ve(`&.fade-in-height-expand-transition-${s}-active`,` 4 overflow: ${u}; 5 transition: 6 max-height ${a} ${ue} ${t}, 7 opacity ${a} ${lo} ${t}, 8 margin-top ${a} ${ue} ${t}, 9 margin-bottom ${a} ${ue} ${t}, 10 padding-top ${a} ${ue} ${t}, 11 padding-bottom ${a} ${ue} ${t} 12 ${e?`,${e}`:""} 13 `),ve(`&.fade-in-height-expand-transition-${i}-active`,` 14 overflow: ${u}; 15 transition: 16 max-height ${a} ${ue}, 17 opacity ${a} ${ro}, 18 margin-top ${a} ${ue}, 19 margin-bottom ${a} ${ue}, 20 padding-top ${a} ${ue}, 21 padding-bottom ${a} ${ue} 22 ${e?`,${e}`:""} 23 `)]}const uo={margin:"0 0 8px 0",padding:"10px 20px",maxWidth:"720px",minWidth:"420px",iconMargin:"0 10px 0 0",closeMargin:"0 0 0 10px",closeSize:"20px",closeIconSize:"16px",iconSize:"20px",fontSize:"14px"};function vo(u){const{textColor2:a,closeIconColor:e,closeIconColorHover:t,closeIconColorPressed:o,infoColor:d,successColor:v,errorColor:w,warningColor:i,popoverColor:s,boxShadow2:r,primaryColor:y,lineHeight:C,borderRadius:$,closeColorHover:O,closeColorPressed:T}=u;return Object.assign(Object.assign({},uo),{closeBorderRadius:$,textColor:a,textColorInfo:a,textColorSuccess:a,textColorError:a,textColorWarning:a,textColorLoading:a,color:s,colorInfo:s,colorSuccess:s,colorError:s,colorWarning:s,colorLoading:s,boxShadow:r,boxShadowInfo:r,boxShadowSuccess:r,boxShadowError:r,boxShadowWarning:r,boxShadowLoading:r,iconColor:a,iconColorInfo:d,iconColorSuccess:v,iconColorWarning:i,iconColorError:w,iconColorLoading:y,closeColorHover:O,closeColorPressed:T,closeIconColor:e,closeIconColorHover:t,closeIconColorPressed:o,closeColorHoverInfo:O,closeColorPressedInfo:T,closeIconColorInfo:e,closeIconColorHoverInfo:t,closeIconColorPressedInfo:o,closeColorHoverSuccess:O,closeColorPressedSuccess:T,closeIconColorSuccess:e,closeIconColorHoverSuccess:t,closeIconColorPressedSuccess:o,closeColorHoverError:O,closeColorPressedError:T,closeIconColorError:e,closeIconColorHoverError:t,closeIconColorPressedError:o,closeColorHoverWarning:O,closeColorPressedWarning:T,closeIconColorWarning:e,closeIconColorHoverWarning:t,closeIconColorPressedWarning:o,closeColorHoverLoading:O,closeColorPressedLoading:T,closeIconColorLoading:e,closeIconColorHoverLoading:t,closeIconColorPressedLoading:o,loadingColor:y,lineHeight:C,borderRadius:$})}const fo={common:_t,self:vo};var po=function(u,a,e,t){function o(d){return d instanceof e?d:new e(function(v){v(d)})}return new(e||(e=Promise))(function(d,v){function w(r){try{s(t.next(r))}catch(y){v(y)}}function i(r){try{s(t.throw(r))}catch(y){v(y)}}function s(r){r.done?d(r.value):o(r.value).then(w,i)}s((t=t.apply(u,a||[])).next())})};const mo={distance:{type:Number,default:0},onLoad:Function,scrollbarProps:Object},ho=se({name:"InfiniteScroll",props:mo,setup(u){const a=c(null);let e=!1;const t=()=>po(this,void 0,void 0,function*(){var v;const{value:w}=a;if(w){const{containerRef:i}=w,s=i==null?void 0:i.scrollHeight,r=i==null?void 0:i.clientHeight,y=i==null?void 0:i.scrollTop;if(i&&s!==void 0&&r!==void 0&&y!==void 0&&y+r>=s-u.distance){e=!0;try{yield(v=u.onLoad)===null||v===void 0?void 0:v.call(u)}catch{}e=!1}}});return{scrollbarInstRef:a,handleScroll:()=>{e||t()},handleWheel:v=>{v.deltaY<=0||e||t()}}},render(){return W(yt,Object.assign({},this.scrollbarProps,{ref:"scrollbarInstRef",onWheel:this.handleWheel,onScroll:this.handleScroll}),{default:()=>gt(this.$slots.default,()=>[])})}}),dt={icon:Function,type:{type:String,default:"info"},content:[String,Number,Function],showIcon:{type:Boolean,default:!0},closable:Boolean,keepAliveOnHover:Boolean,onClose:Function,onMouseenter:Function,onMouseleave:Function},ut=ot("n-message-api"),vt=ot("n-message-provider"),_o=ve([Pe("message-wrapper",` 24 margin: var(--n-margin); 25 z-index: 0; 26 transform-origin: top center;
27 display: flex; 28 `,[co({overflow:"visible",originalTransition:"transform .3s var(--n-bezier)",enterToProps:{transform:"scale(1)"},leaveToProps:{transform:"scale(0.85)"}})]),Pe("message",` 29 box-sizing: border-box; 30 display: flex; 31 align-items: center; 32 transition: 33 color .3s var(--n-bezier), 34 box-shadow .3s var(--n-bezier), 35 background-color .3s var(--n-bezier), 36 opacity .3s var(--n-bezier), 37 transform .3s var(--n-bezier), 38 margin-bottom .3s var(--n-bezier); 39 padding: var(--n-padding); 40 border-radius: var(--n-border-radius); 41 flex-wrap: nowrap; 42 overflow: hidden; 43 max-width: var(--n-max-width); 44 color: var(--n-text-color); 45 background-color: var(--n-color); 46 box-shadow: var(--n-box-shadow); 47 `,[Te("content",` 48 display: inline-block; 49 line-height: var(--n-line-height); 50 font-size: var(--n-font-size); 51 `),Te("icon",` 52 position: relative; 53 margin: var(--n-icon-margin); 54 height: var(--n-icon-size); 55 width: var(--n-icon-size); 56 font-size: var(--n-icon-size); 57 flex-shrink: 0; 58 `,[["default","info","success","warning","error","loading"].map(u=>_e(`${u}-type`,[ve("> *",` 59 color: var(--n-icon-color-${u}); 60 transition: color .3s var(--n-bezier); 61 `)])),ve("> *",` 62 position: absolute; 63 left: 0; 64 top: 0; 65 right: 0; 66 bottom: 0; 67 `,[Kt()])]),Te("close",` 68 margin: var(--n-close-margin); 69 transition: 70 background-color .3s var(--n-bezier), 71 color .3s var(--n-bezier); 72 flex-shrink: 0; 73 `,[ve("&:hover",` 74 color: var(--n-close-icon-color-hover); 75 `),ve("&:active",` 76 color: var(--n-close-icon-color-pressed); 77 `)])]),Pe("message-container",` 78 z-index: 6000; 79 position: fixed; 80 height: 0; 81 overflow: visible; 82 display: flex; 83 flex-direction: column; 84 align-items: center; 85 `,[_e("top",` 86 top: 12px; 87 left: 0; 88 right: 0; 89 `),_e("top-left",` 90 top: 12px; 91 left: 12px; 92 right: 0; 93 align-items: flex-start; 94 `),_e("top-right",` 95 top: 12px; 96 left: 0; 97 right: 12px; 98 align-items: flex-end; 99 `),_e("bottom",` 100 bottom: 4px; 101 left: 0; 102 right: 0; 103 justify-content: flex-end; 104 `),_e("bottom-left",` 105 bottom: 4px; 106 left: 12px; 107 right: 0; 108 justify-content: flex-end; 109 align-items: flex-start; 110 `),_e("bottom-right",` 111 bottom: 4px; 112 left: 0; 113 right: 12px; 114 justify-content: flex-end; 115 align-items: flex-end; 116 `)])]),go={info:()=>W(ao,null),success:()=>W(no,null),warning:()=>W(oo,null),error:()=>W(to,null),default:()=>null},yo=se({name:"Message",props:Object.assign(Object.assign({},dt),{render:Function}),setup(u){const{inlineThemeDisabled:a,mergedRtlRef:e}=nt(u),{props:t,mergedClsPrefixRef:o}=I(vt),d=bt("Message",e,o),v=at("Message","-message",_o,fo,t,o),w=b(()=>{const{type:s}=u,{common:{cubicBezierEaseInOut:r},self:{padding:y,margin:C,maxWidth:$,iconMargin:O,closeMargin:T,closeSize:V,iconSize:R,fontSize:H,lineHeight:j,borderRadius:B,iconColorInfo:J,iconColorSuccess:N,iconColorWarning:K,iconColorError:A,iconColorLoading:E,closeIconSize:Q,closeBorderRadius:m,[pe("textColor",s)]:_,[pe("boxShadow",s)]:g,[pe("color",s)]:P,[pe("closeColorHover",s)]:n,[pe("closeColorPressed",s)]:f,[pe("closeIconColor",s)]:S,[pe("closeIconColorPressed",s)]:p,[pe("closeIconColorHover",s)]:k}}=v.value;return{"--n-bezier":r,"--n-margin":C,"--n-padding":y,"--n-max-width":$,"--n-font-size":H,"--n-icon-margin":O,"--n-icon-size":R,"--n-close-icon-size":Q,"--n-close-border-radius":m,"--n-close-size":V,"--n-close-margin":T,"--n-text-color":_,"--n-color":P,"--n-box-shadow":g,"--n-icon-color-info":J,"--n-icon-color-success":N,"--n-icon-color-warning":K,"--n-icon-color-error":A,"--n-icon-color-loading":E,"--n-close-color-hover":n,"--n-close-color-pressed":f,"--n-close-icon-color":S,"--n-close-icon-color-pressed":p,"--n-close-icon-color-hover":k,"--n-line-height":j,"--n-border-radius":B}}),i=a?xt("message",b(()=>u.type[0]),w,{}):void 0;return{mergedClsPrefix:o,rtlEnabled:d,messageProviderProps:t,handleClose(){var s;(s=u.onClose)===null||s===void 0||s.call(u)},cssVars:a?void 0:w,themeClass:i==null?void 0:i.themeClass,onRender:i==null?void 0:i.onRender,placement:t.placement}},render(){const{render:u,type:a,closable:e,content:t,mergedClsPrefix:o,cssVars:d,themeClass:v,onRender:w,icon:i,handleClose:s,showIcon:r}=this;w==null||w();let y;return W("div",{class:[`${o}-message-wrapper`,v],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:[{alignItems:this.placement.startsWith("top")?"flex-start":"flex-end"},d]},u?u(this.$props):W("div",{class:[`${o}-message ${o}-message--${a}-type`,this.rtlEnabled&&`${o}-message--rtl`]},(y=bo(i,a,o))&&r?W("div",{class:`${o}-message__icon ${o}-message__icon--${a}-type`},W(Gt,null,{default:()=>y})):null,W("div",{class:`${o}-message__content`},Zt(t)),e?W(Qt,{clsPrefix:o,class:`${o}-message__close`,onClick:s,absolute:!0}):null))}});function bo(u,a,e){if(typeof u=="function")return u();{const t=a==="loading"?W(Xt,{clsPrefix:e,strokeWidth:24,scale:.85}):go[a]();return t?W(eo,{clsPrefix:e,key:a},{default:()=>t}):null}}const xo=se({name:"MessageEnvironment",props:Object.assign(Object.assign({},dt),{duration:{type:Number,default:3e3},onAfterLeave:Function,onLeave:Function,internalKey:{type:String,required:!0},onInternalAfterLeave:Function,onHide:Function,onAfterHide:Function}),setup(u){let a=null;const e=c(!0);ye(()=>{t()});function t(){const{duration:r}=u;r&&(a=window.setTimeout(v,r))}function o(r){r.currentTarget===r.target&&a!==null&&(window.clearTimeout(a),a=null)}function d(r){r.currentTarget===r.target&&t()}function v(){const{onHide:r}=u;e.value=!1,a&&(window.clearTimeout(a),a=null),r&&r()}function w(){const{onClose:r}=u;r&&r(),v()}function i(){const{onAfterLeave:r,onInternalAfterLeave:y,onAfterHide:C,internalKey:$}=u;r&&r(),y&&y($),C&&C()}function s(){v()}return{show:e,hide:v,handleClose:w,handleAfterLeave:i,handleMouseleave:d,handleMouseenter:o,deactivate:s}},render(){return W(so,{appear:!0,onAfterLeave:this.handleAfterLeave,onLeave:this.onLeave},{default:()=>
116[this.show?W(yo,{content:this.content,type:this.type,icon:this.icon,showIcon:this.showIcon,closable:this.closable,onClose:this.handleClose,onMouseenter:this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.keepAliveOnHover?this.handleMouseleave:void 0}):null]})}}),wo=Object.assign(Object.assign({},at.props),{to:[String,Object],duration:{type:Number,default:3e3},keepAliveOnHover:Boolean,max:Number,placement:{type:String,default:"top"},closable:Boolean,containerClass:String,containerStyle:[String,Object]}),Co=se({name:"MessageProvider",props:wo,setup(u){const{mergedClsPrefixRef:a}=nt(u),e=c([]),t=c({}),o={create(i,s){return d(i,Object.assign({type:"default"},s))},info(i,s){return d(i,Object.assign(Object.assign({},s),{type:"info"}))},success(i,s){return d(i,Object.assign(Object.assign({},s),{type:"success"}))},warning(i,s){return d(i,Object.assign(Object.assign({},s),{type:"warning"}))},error(i,s){return d(i,Object.assign(Object.assign({},s),{type:"error"}))},loading(i,s){return d(i,Object.assign(Object.assign({},s),{type:"loading"}))},destroyAll:w};F(vt,{props:u,mergedClsPrefixRef:a}),F(ut,o);function d(i,s){const r=wt(),y=Ct(Object.assign(Object.assign({},s),{content:i,key:r,destroy:()=>{var $;($=t.value[r])===null||$===void 0||$.hide()}})),{max:C}=u;return C&&e.value.length>=C&&e.value.shift(),e.value.push(y),y}function v(i){e.value.splice(e.value.findIndex(s=>s.key===i),1),delete t.value[i]}function w(){Object.values(t.value).forEach(i=>{i.hide()})}return Object.assign({mergedClsPrefix:a,messageRefs:t,messageList:e,handleAfterLeave:v},o)},render(){var u,a,e;return W(we,null,(a=(u=this.$slots).default)===null||a===void 0?void 0:a.call(u),this.messageList.length?W(st,{to:(e=this.to)!==null&&e!==void 0?e:"body"},W("div",{class:[`${this.mergedClsPrefix}-message-container`,`${this.mergedClsPrefix}-message-container--${this.placement}`,this.containerClass],key:"message-container",style:this.containerStyle},this.messageList.map(t=>W(xo,Object.assign({ref:o=>{o&&(this.messageRefs[t.key]=o)},internalKey:t.key,onInternalAfterLeave:this.handleAfterLeave},io(t,["destroy"],void 0),{duration:t.duration===void 0?this.duration:t.duration,keepAliveOnHover:t.keepAliveOnHover===void 0?this.keepAliveOnHover:t.keepAliveOnHover,closable:t.closable===void 0?this.closable:t.closable}))))):null)}});function $o(){const u=I(ut,null);return u===null&&$t("use-message","No outer <n-message-provider /> founded. See prerequisite in https://www.naiveui.com/en-US/os-theme/components/message for more details. If you want to use `useMessage` outside setup, please check https://www.naiveui.com/zh-CN/os-theme/components/message#Q-&-A."),u}const Io={class:"tvb-video-detail_player-wrap"},So=se({name:"TvbVideoDetailPlayer"}),ko=Object.assign(So,{setup(u,{expose:a}){const e=I("size"),t=I("currentVideo"),o=c(t.value||{}),d=I("setCurrentVideo"),v=I("nextVideo"),w=I("extraLoaded"),i=I("prevVideo"),s=c(null),r=I("isPreview"),y=it(),C=c([]),$=c(!1),O=c(null),T=async()=>{var l;if((l=t.value)!=null&&l.id){$.value=!0,O.value=null;try{const{code:z,data:M}=await pt({exclude_ids:t.value.id});if(z===0)C.value=M.list||[];else throw new Error("Failed to fetch recommended videos")}catch(z){O.value=z.message}finally{$.value=!1}}},V="https://www.tvb.com/",R=b(()=>{var M,Z,le,re,ce,de,ee,Re,je,Ae,Ee,Me,We,Ne,De,Be,Fe,Ue,Ye,qe,Je,Ke,Ge,Xe,Ze,Qe,et;if(!t.value)return"";const l={"@context":"https://schema.org","@type":"VideoObject",name:((M=o==null?void 0:o.value)==null?void 0:M.seo_title)||"",description:((Z=o==null?void 0:o.value)==null?void 0:Z.meta_description)||"",datePublished:((ce=(re=me)==null?void 0:re.unix(((le=o==null?void 0:o.value)==null?void 0:le.publish_at)||0))==null?void 0:ce.toISOString())||"",dateModified:((Re=(ee=me)==null?void 0:ee.unix(((de=o==null?void 0:o.value)==null?void 0:de.updated_at)||0))==null?void 0:Re.toISOString())||"",thumbnailUrl:[(je=t.value.og_image_info)==null?void 0:je.large],uploadDate:((Me=(Ee=me)==null?void 0:Ee.unix(((Ae=o==null?void 0:o.value)==null?void 0:Ae.publish_at)||0))==null?void 0:Me.toISOString())||"",contentUrl:((We=o==null?void 0:o.value)==null?void 0:We.video_url)||"",embedUrl:H.value};((Ne=o==null?void 0:o.value)==null?void 0:Ne.video_time)>0&&(l.duration=(De=o==null?void 0:o.value)!=null&&De.video_time?me("2000-01-01 00:00:00").second(((Be=
116o==null?void 0:o.value)==null?void 0:Be.video_time)||0).format("[PT]m[M]s[S]"):"PT1S");const z={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"主é ",item:V},{"@type":"ListItem",position:2,name:(Ye=(Ue=(Fe=o.value)==null?void 0:Fe.category_info)==null?void 0:Ue.parent)==null?void 0:Ye.title,item:(Ke=(Je=(qe=o.value)==null?void 0:qe.category_info)==null?void 0:Je.parent)==null?void 0:Ke.link},{"@type":"ListItem",position:3,name:(Xe=(Ge=o.value)==null?void 0:Ge.category_info)==null?void 0:Xe.title,item:(Qe=(Ze=o.value)==null?void 0:Ze.category_info)==null?void 0:Qe.link},{"@type":"ListItem",position:4,name:(et=o.value)==null?void 0:et.title,item:H.value}]};return[l,z]}),H=b(()=>{var l,z;return V+(((z=(l=o==null?void 0:o.value)==null?void 0:l.uri)==null?void 0:z.slice(1))||"")}),j=b(()=>({link:[{rel:"canonical",href:H.value},{rel:"alternate",hreflang:"x-default",href:H.value},{rel:"alternate",hreflang:"zh-hk",href:H.value}],script:[{id:"video-ld-json",innerHTML:JSON.stringify(R.value),type:"application/ld+json"}]})),{patch:B}=lt(j),J=async(l=!1)=>{var le,re,ce,de;if(!((le=t.value)!=null&&le.id))return;const z={video_id:t.value.id};r.value&&(z.key=(re=y==null?void 0:y.params)==null?void 0:re.videoId);const{code:M,data:Z}=await Wt(z);if(M===0){E.value=Z.region_only===1;try{const ee=await ft({category_id:t.value.category_id});(ee==null?void 0:ee.code)===0&&(Z.category_info=(ee==null?void 0:ee.data)||{})}catch(ee){console.error(ee)}o.value={...t.value,...Z},d(o.value),B(j.value),r.value||window.history.replaceState(history.state,null,St(t.value.uri)),S(),l||setTimeout(()=>{s.value&&s.value.play().catch(ee=>{console.warn("Auto-play failed:",ee)})},500),kt({page_title:"video_detail_page",screen_class:((ce=t.value)==null?void 0:ce.seo_title)||"",screenID:"S007",eventCategory:((de=t.value)==null?void 0:de.category_name)||"",eventLabel:"video_detail",eventID:"S007",screenLabel:location.href})}else E.value=!0;return w&&(w.value=!0),Z},N=b(()=>{var l;return(l=t.value)==null?void 0:l.video_url}),K=b(()=>{var l;return{1:"youtube",2:"shaka"}[(l=t.value)==null?void 0:l.video_type]}),A=b(()=>{var l,z,M,Z;return["s","xs"].includes(e)?(z=(l=t.value)==null?void 0:l.image_info)==null?void 0:z.small:(Z=(M=t.value)==null?void 0:M.image_info)==null?void 0:Z.large}),E=c(!1),Q=b(()=>{var l;return(l=t.value)==null?void 0:l.video_clarity}),m=b(()=>{var l;
116return(l=t.value)==null?void 0:l.subtitle}),_=c(""),g=c("pr"),P=b(()=>{var l;return((l=t.value)==null?void 0:l.is_show_ad)??1}),n=b(()=>P.value!==2),f=(l,z="pr")=>{var le,re,ce,de;const M=l.ad_unit_prefix;if(!M)return"";const Z=Lt(l.ads_list,z);return Ht({adUnitPrefix:M,adChildUnit:z,adSize:Z,customParams:{adtype:"vod",vtype:"vod",content_type:"video",sub_category_path:((re=(le=t.value)==null?void 0:le.category_info)==null?void 0:re.path)||"x",video_id:((ce=t.value)==null?void 0:ce.id)||"x"},videoDuration:((de=t.value)==null?void 0:de.video_time)||0})},S=async()=>{if(n.value)try{const{data:l}=await tt({position:14,adtype:"pr"});l!=null&&l.ad_unit_prefix&&(g.value="pr",_.value=f(l,"pr"))}catch(l){console.error("Failed to fetch instream ads:",l)}},p=async()=>{var l;if(n.value)try{const{data:z}=await tt({position:14,adtype:"mr"});if(z!=null&&z.ad_unit_prefix){const M=f(z,"mr");M&&((l=s.value)==null||l.requestAds(M))}}catch(z){console.error("Failed to fetch mr ads:",z)}};ae(n,l=>{l?S():_.value=""});const k=()=>{},G=()=>{g.value==="pr"&&(g.value="mr",p())},X=l=>{console.error("Instream ad error:",l)},oe=()=>{},ne=b(()=>C.value.map(l=>({cover:l.image_info.small,title:l.title,url:l.uri})));ye(()=>{J(),T()}),ze(J);const ie=c(null),be=({state:l})=>{ie.value&&clearTimeout(ie.value),ie.value=setTimeout(()=>{var z;l==="ended"&&((z=v.value)!=null&&z.id)&&(ne.value.length>0||d(v.value)),E.value=l==="error"},100)},$e=()=>{var l;(l=i.value)!=null&&l.id&&d(i.value)},Ie=()=>{var l;(l=v.value)!=null&&l.id&&d(v.value)},Se=It(),ke=l=>{l!=null&&l.url&&Se.push(l.url)};return Oe(()=>{ie.value&&clearTimeout(ie.value)}),a({getExtra:J}),(l,z)=>{var M,Z,le,re,ce,de;return L(),D("div",Io,[h("div",{class:fe(["tvb-video-detail_player",[x(e)]])},[N.value||(M=x(t))!=null&&M.video_id?(L(),U(Yt,{key:0,"youbora-options":{videoTitle:x(t).title,programTitle:x(t).category_name,videoSrc:N.value,contentId:(Z=x(t))==null?void 0:Z.id},"content-id":(le=x(t))==null?void 0:le.content_id,src:N.value,"poster-url":A.value,"region-only":(re=x(t))==null?void 0:re.region_only,type:K.value,style:{height:"100%",width:"100%"},mute:!1,onStateChange:be,onPrev:$e,onNext:Ie,onRecommendNavigate:ke,ref_key:"tvbPlayerRef",ref:s,"drag-box":"","drag-box-disabled":["s","xs"].includes(x(e)),title:((ce=x(t))==null?void 0:ce.title)||((de=x(t))==null?void 0:de.seo_title)||"","show-episode-navigation":!0,"video-clarity":Q.value,subtitle:m.value,"featured-videos":ne.value,"ad-tag-url":_.value,"show-instream-ads":n.value,onAdStart:k,onAdEnd:G,onAdError:X,onContentResume:oe},null,8,["youbora-options","content-id","src","poster-url","region-only","type","drag-box-disabled","title","video-clarity","subtitle","featured-videos","ad-tag-url","show-instream-ads"])):Y("",!0)],2)])}}}),Lo=he(ko,[["__scopeId","data-v-5b6d9e63"]]),Ho={class:"tvb-video-detail_item-image"},Po={class:"tvb-video-detail_item-play"},To={class:"tvb-video-detail_item-playing"},zo={class:"tvb-video-detail_item-playing-loader"},Oo={class:"tvb-video-detail_item-info"},Vo={class:"tvb-video-detail_item-title"},Ro={class:"tvb-video-detail_item-other"},jo={class:"tvb-video-detail_item-category"},Ao={class:"tvb-video-detail_item-updated_at"},Eo=se({name:"TvbVideoDetailItem"}),Mo=Object.assign(Eo,{props:{info:{type:Object,default:()=>{}}},emits:["scroll-to"],setup(u,{emit:a}){const e=u,t=I("size"),o=I("setCurrentVideo"),d=I("currentVideo"),v=b(()=>d.value.id===e.info.id),w=a,i=c(),s=()=>{const y=i.value;if(!y)return 0;const C=y.offsetTop-y.offsetHeight;return C<=0?0:C-(["s","xs"].includes(t.value)?6:8)};ae(v,y=>{y&&w("scroll-to",s())});const r=()=>{v.value||o(e.info)};return(y,C)=>{var T,V,R,H;const $=Le,O=rt;return L(),D("div",{class:fe(["tvb-video-detail_item",{"is-playing":v.value,[x(t)]:x(t)}]),onClick:r,ref_key:"listItemsRef",ref:i},[h("div",Ho,[h("div",Po,[q($,{class:"tvb-video-detail_item-play-icon",name:"icon_shorts_play"})]),h("div",To,[h("ul",zo,[(L(),D(we,null,He(3,j=>h("li",{key:j})),64))]),C[0]||(C[0]=h("p",{class:"tvb-video-detail_item-playing-text"},"ç¶åææ¾",-1))]),q(O,{class:"tvb-video-detail_item-image-el",src:["s","xs"].includes(x(t))?(V=(T=u.info)==null?void 0:T.image_info)==null?void 0:V.small:(H=(R=u.info)==null?void 0:R.image_info)==null?void 0:H.medium,alt:u.info.title,transform:""},null,8,["src","alt"])]),h("div",Oo,[h("h4",Vo,[h("span",null,te(u.info.title),1)]),h("div",Ro,[h("p",jo,te(u.info.category_name),1),h("p",Ao,te(x(me).unix(u.info.updated_at).format("YYYY-MM-DD HH:mm")),1)])])],2)}}}),Wo=he(Mo,[["__scopeId","data-v-34300fb2"]]),No={class:"tvb-video-detail_list-header"},Do={class:"tvb-video-detail_list-header-container"},Bo=se({name:"TvbVideoDetailList"}),Fo=Object.assign(Bo,{emits:["lm-show-list-change"],setup(u,{expose:a,emit:e}){const t=c(1),o=c(10),d=c([]),v=I("size"),w=I("width"),i=I("defaultVideo"),s=I("currentVideo"),r=I("playerHe
116ight"),y=I("setNextVideo"),C=I("setPrevVideo"),$=e,O=c(!1),T=c(),V=c(),R=c(!1),H=c(!0),j=c(!1),B=async()=>{var g,P,n;if(O.value||j.value)return;j.value=!0;const _=await Nt({video_id:(g=i.value)==null?void 0:g.id,category_id:(P=i.value)==null?void 0:P.category_id,exclude_ids:d.value.reduce((f,S)=>f.concat(S.id),[]).join(","),page:t.value,limit:o.value});if(_.code===0){const f=((n=_==null?void 0:_.data)==null?void 0:n.list)||[];d.value=[...d.value,...f],O.value=!(f!=null&&f.length)||(f==null?void 0:f.length)<o.value,K()}j.value=!1},J=()=>{t.value++,B()},N=_=>{var g,P;(P=(g=T.value)==null?void 0:g.scrollbarInstRef)==null||P.scrollTo({left:0,top:_,behavior:"smooth"})},K=()=>{var P;if(!((P=d.value)!=null&&P.length)||!s.value)return;let _=d.value[0],g=null;for(let n=0;n<d.value.length;n++){const f=d.value[n],S=d.value[n+1]||{},p=d.value[n-1]||{};f.id===s.value.id&&(S.id&&(_=S),p.id&&(g=p))}_&&(_.hash=Math.random().toString(36).slice(2,10),y(_)),g?(g.hash=Math.random().toString(36).slice(2,10),C(g)):C(null)};ae(H,_=>{$("lm-show-list-change",_)},{immediate:!0});const A=()=>{var g,P;if(typeof window>"u")return"0px";const _=window.innerHeight-(((g=document.querySelector(".tvb-home-header"))==null?void 0:g.clientHeight)||0)-(((P=document.querySelector(".tvb-video-detail_player"))==null?void 0:P.clientHeight)||0);return`${_>0?_-8-12:0}px`},E=c("0px"),Q=()=>{["s","xs"].includes(v.value)?R.value=!0:H.value=!0},m=()=>{["s","xs"].includes(v.value)?R.value=!1:H.value=!1};return ye(async()=>{await B(),E.value=A()}),ze(B),ae(s,K),ae([R,w,v],([_,g,P])=>{if(typeof window>"u")return;E.value=A();const n=document.querySelector(".tvb-home-header");_&&g&&n&&window.scrollY<=n.clientHeight&&window.scroll(0,n.clientHeight),Ce(()=>{document.body.style.height=["m","s","xs"].includes(P)&&_?"100vh":"",document.body.style.width=["m","s","xs"].includes(P)&&_?"100vw":"",document.body.style.overflow=["m","s","xs"].includes(P)&&_?"hidden":"";const f=document.querySelector(".tvb-video-detail_container-content");f&&(f.style.boxShadow=["m","s","xs"].includes(P)&&_?"0 0 100px 1000px #FFF":""),setTimeout(()=>{document.body.style.overflow=["m","s","xs"].includes(P)&&_?"hidden":""},100)})},{deep:!0,immediate:!0}),a({show:Q,hide:m}),(_,g)=>{const P=Le,n=ho;return L(),D("div",{class:fe(["tvb-video-detail_list",{[x(v)]:x(v),show:["s","xs"].includes(x(v))?R.value:H.value}]),style:xe({"--tvb-video-detail-list-height":E.value,"--tvb-video-detail-list-player-height":x(r)})},[h("div",No,[h("div",Do,[g[0]||(g[0]=h("h4",{class:"tvb-video-detail_list-title"},"ææ¾å表",-1)),q(P,{name:"close",class:"tvb-video-detail_list-close",onClick:m})])]),h("div",{class:"tvb-video-detail_list-items",ref_key:"listItemsRef",ref:V},[q(n,{style:{height:"100%"},distance:10,onLoad:J,ref_key:"infiniteScrollRef",ref:T},{default:ge(()=>[(L(!0),D(we,null,He(d.value,f=>(L(),U(Wo,{key:f.id,info:f,onScrollTo:N},null,8,["info"]))),128))]),_:1},512)],512)],6)}}}),Uo=he(Fo,[["__scopeId","data-v-d957e428"]]),Yo={class:"tvb-next-play-info-container"},qo={class:"tvb-next-play-info-image"},Jo={class:"tvb-next-play-info-status-text"},Ko={class:"tvb-next-play-info-detail"},Go={class:"tvb-next-play-info-title"},Xo={class:"tvb-next-play-info-other"},Zo={class:"tvb-next-play-info-category"},Qo={key:0,class:"tvb-next-play-info-updated_at"},en={class:"tvb-next-play-info-play-list"},tn=se({name:"NextPlayInfo"}),on=Object.assign(tn,{setup(u){const a=I("size"),e=I("currentVideo",{}),t=I("nextVideo",{}),o=b(()=>{var r;return(r=t==null?void 0:t.value)==null?void 0:r.id}),d=c(""),v=c(""),w=c(""),i=c(""),s=()=>{var r,y,C,$,O,T,V,R,H,j;d.value=((y=(r=t==null?void 0:t.value)==null?void 0:r.image_info)==null?void 0:y.small)||(($=(C=e==null?void 0:e.value)==null?void 0:C.image_info)==null?void 0:$.small),v.value=((O=t==null?void 0:t.value)==null?void 0:O.title)||((T=e==null?void 0:e.value)==null?void 0:T.title),w.value=((V=t==null?void 0:t.value)==null?void 0:V.category_name)||((R=e==null?void 0:e.value)==null?void 0:R.category_name),i.value=((H=t==null?void 0:t.value)==null?void 0:H.updated_at)||((j=e==null?void 0:e.value)==null?void 0:j.updated_at)};return ye(s),ae([t,e],s,{deep:!0}),(r,y)=>{const C=rt,$=Le;return L(),D("div",{class:fe(["tvb-next-play-info",[x(a)]])},[h("div",Yo,[h("div",qo,[d.value?(L(),U(C,{class:"tvb-next-play-info-image-el",src:d.value,alt:v.value,key:d.value},null,8,["src","alt"])):Y("",!0),h("p",Jo,te(o.value?"å³å°ææ¾":"ç¶åææ¾"),1)]),h("div",Ko,[h("p",Go,te(v.value),1),h("div",Xo,[h("p",Zo,te(w.value),1),i.value?(L(),D("p",Qo,te(x(me).unix(i.value).format("YYYY-MM-DD HH:mm")),1)):Y("",!0)])]),h("div",en,[q($,{class:"tvb-next-play-info-play-list-icon",name:"play_list"})])])],2)}}}),nn=he(on,[["__scopeId","data-v-86088f34"]]),an=se({name:"TvbVideoDetailContainer"}),sn=Object.assign(an,{setup(u){const a=I("size"),e=I("currentVideo"),t=I("adsLoaded",c(!0)),o=I("extraLoaded",c(!0)),d=c(window.innerWidth),v=c(window.innerHeight),w=b(()=>{var p;return((p=e.value)==null?void 0:p.is_show_ad)??1}),i=b(()=>{var p;return(p=e.value)==null?void 0:p.id}),s=b(()=>{var p;return(p=e.value)==null?void 0:p.category_info}),r=c(0),y=p=>{var k;(k=p.size)!=null&&k[1]&&(r.value=p.size[1])},C=c(window.innerHeight),$=()=>{C.value=window.innerHeight}
116,O=b(()=>i.value&&w.value!==2&&d.value>=1144&&o.value),T=b(()=>"lrec"),V=c("100%"),R=c("100%"),H=c(),j=c(),B=c(),J=c(),N=c(),K=c(!0);let A=null,E=null;const Q=()=>document.querySelector(".tvb-video-page"),m=()=>{d.value=window.innerWidth,v.value=window.innerHeight},_=p=>{const k=p.clientWidth,G=p.clientHeight,X=k>0?`${k}px`:V.value,oe=G>0?`${G}px`:R.value;if(X===V.value&&oe===R.value)return;const ne=Q();ne&&(console.log("[Shaka Player] åæ¥æ´æ°ææ¾å¨å°ºå¯¸å°CSSåé, finalWidth:",X,"finalHeight:",oe),ne.style.setProperty("--player-width",X),ne.style.setProperty("--player-height",oe)),V.value=X,R.value=oe},g=()=>{var k;const p=(k=H.value)==null?void 0:k.querySelector(".tvb-video-detail_player");p&&_(p)},P=()=>{E&&clearTimeout(E),E=setTimeout(()=>{console.log("[Shaka Player] é²ææ´æ°ææ¾å¨å°ºå¯¸ - debouncedUpdateDimensions"),g()},50)},n=()=>{var k;A&&(A.disconnect(),A=null);const p=(k=H.value)==null?void 0:k.querySelector(".tvb-video-detail_player");p&&(A=new ResizeObserver(()=>{console.log("[Shaka Player] ResizeObserver è§¦åæ´æ°ææ¾å¨å°ºå¯¸"),requestAnimationFrame(()=>{g()})}),A.observe(p))};ye(()=>{window.addEventListener("resize",m),window.addEventListener("resize",$),Ce(()=>{console.log("[Shaka Player] onMounted åå§åæ´æ°ææ¾å¨å°ºå¯¸"),n(),g()})}),Oe(()=>{window.removeEventListener("resize",m),window.removeEventListener("resize",$),A&&(A.disconnect(),A=null),E&&clearTimeout(E)});const f=(p=!1)=>{var k;(k=j.value)==null||k.getExtra(p)},S=()=>{var p;(p=B.value)==null||p.show()};return F("playerWidth",V),F("playerHeight",R),F("getExtra",f),F("showList",S),F("lrecAdHeight",r),ae([d,v,H],()=>{P()},{flush:"post"}),ae(()=>{var p;return(p=e==null?void 0:e.value)==null?void 0:p.id},async(p,k)=>{p&&p!==k&&(console.log("[Shaka Player] è§é¢åæ¢, newId:",p,"oldId:",k),await Ce(),console.log("[Shaka Player] è§é¢åæ¢ååå§åæ´æ°ææ¾å¨å°ºå¯¸"),n(),g(),Tt()&&setTimeout(()=>{console.log("[Shaka Player] Safari å»¶è¿æ´æ°ææ¾å¨å°ºå¯¸"),g()},100))},{flush:"post"}),ae(t,async p=>{p&&(console.log("[Shaka Player] 广åå è½½å®æï¼éæ°è®¡ç®ææ¾å¨å°ºå¯¸"),await Ce(),n(),g(),setTimeout(()=>{g()},100))}),(p,k)=>{var X,oe,ne,ie;const G=Ve;return L(),D("div",{class:fe(["tvb-video-detail_container",[x(a)]])},[h("div",{class:"tvb-video-detail_container-content",ref_key:"playerContentRef",ref:H},[(L(),U(Lo,{key:((X=x(e))==null?void 0:X.hash)||((oe=x(e))==null?void 0:oe.id),ref_key:"playerRef",ref:j})),N.value?(L(),U(st,{key:0,to:N.value,disabled:!["s","xs"].includes(x(a))},[d.value<=1143&&!K.value||["s","xs"].includes(x(a))?(L(),U(nn,{key:0,ref_key:"nextPlayInfoRef",ref:J,onClick:(ne=B.value)==null?void 0:ne.show},null,8,["onClick"])):Y("",!0)],8,["to","disabled"])):Y("",!0),q(Uo,{ref_key:"playerListRef",ref:B,onLmShowListChange:k[0]||(k[0]=be=>K.value=be)},null,512),O.value?(L(),U(G,{key:1,class:"tvb-video-detail_container-lrec","ad-type":T.value,position:14,unit:`/${i.value}`,"show-ad":w.value!==2,params:{content_type:"video",vtype:"vod",sub_category_path:((ie=s.value)==null?void 0:ie.path)||"x",video_id:i.value||"x"},onLoad:y},null,8,["ad-type","unit","show-ad","params"])):Y("",!0)],512),Pt(p.$slots,"default",{playerWidth:V.value},void 0,!0),h("div",{class:"tvb-video-detail_container-next-play-info",ref_key:"nextPlayInfoElRef",ref:N},null,512)],2)}}}),ln=he(sn,[["__scopeId","data-v-0b0deb5a"]]),rn=se({name:"TvbVideoDetailDescription"}),cn=Object.assign(rn,{setup(u){const a=I("currentVideo"),e=I("playerWidth","100%"),t=b(()=>a.value.description||""),o=I("size"),d=c(!0),v=c(null),w=b(()=>a.value.tags||[]);return(i,s)=>{var y;const r=zt("router-link");return L(),D("div",{class:fe(["tvb-video-detail_description",[x(o)]]),style:xe({width:x(e),maxHeight:d.value?"none":"280px"})},[q(qt,{id:"currentVideo.id",img:x(a).image_info.small,thumbnail:(y=x(a).image_info)==null?void 0:y.small,class:"tvb-video-detail_description-content",content:[{type:1,rich_text:{html:t.value},image:null}],ref_key:"descriptionContentRef",ref:v},null,8,["img","thumbnail","content"]),w.value.length?(L(),D("div",{key:0,class:"tvb-video-detail_info-tags",style:xe({width:x(e)})},[(L(!0),D(we,null,He(w.value,C=>(L(),U(r,{class:"tvb-video-detail_info-tag",key:C.name,to:`/search?tag=${C.id}&tag_name=${C.name}`},{default:ge(()=>[Ot("# "+te(C.name),1)]),_:2},1032,["to"]))),128))],4)):Y("",!0)],6)}}}),dn=he(cn,[["__scopeId","data-v-2d5e256a"]]),un={class:"tvb-video-detail_info-title"},vn={class:"tvb-video-detail_info-other"},fn={class:"tvb-video-detail_info-other-write_article"},pn=["innerHTML"],mn={class:"tvb-video-detail_info-other-btns"}
116,hn={key:0},_n={class:"tvb-video-detail_info-popover-content"},gn={class:"tvb-video-detail_info-shares"},yn=["onClick"],bn={class:"tvb-video-detail_info-share-icon-text"},xn=se({name:"TvbVideoDetailInfo"}),wn=Object.assign(xn,{setup(u){const a=I("getExtra",()=>{}),e=I("currentVideo"),t=I("playerWidth","100%"),o=I("size"),d=b(()=>["s","xs"].includes(o.value)),v=I("extraLoaded",c(!0)),w=I("lrecAdHeight",c(0)),i=b(()=>e.value.title||""),s=b(()=>e.value.is_like||!1),r=b(()=>e.value.like_num||0),y=b(()=>{var m;return(m=e.value.author)==null?void 0:m.join("ã")}),C=c(),$=$o(),O=c(!1),T=c(!1),V=b(()=>{var m;return(m=e.value)==null?void 0:m.id}),R=b(()=>{var m;return(m=e.value)==null?void 0:m.category_info}),H=b(()=>{var m;return((m=e.value)==null?void 0:m.is_show_ad)??1}),j=c(typeof window<"u"?window.innerWidth:1440),B=()=>{j.value=window.innerWidth},J=b(()=>j.value>=830?"sb":"bn");ye(()=>{window.addEventListener("resize",B)}),Oe(()=>{window.removeEventListener("resize",B)});const N=async m=>{const _=await Bt({share_id:e.value.id,type:m});if(_.code!==0)throw new Error(_.message);const g=_==null?void 0:_.data;if(!g)throw new Error("æªè·åå°æ°æ®");let P=`${g.title}\r 117${g.link?g.link:""}`;return g.content&&(P=P+`\r 118====================\r 119${g.content}`),{str:P,data:g}},K=c([{name:"éé Facebook å享",icon:"facebook",onClick:async()=>{var m;try{const _=await N(1);window.FB.ui({method:"share",href:(m=_==null?void 0:_.data)!=null&&m.link?_.data.link:""})}catch(_){$.error(_.message)}}},{name:"éé WhatsApp å享",icon:"whatsapp",onClick:async()=>{try{const m=await N(2);window.open(`https://api.whatsapp.com/send?text=${encodeURIComponent((m==null?void 0:m.str)||"")}`,"_blank")}catch(m){$.error(m.message)}}},{name:"è¤è£½é£çµ",icon:"copy",onClick:async()=>{try{const m=await N(3);await Vt(m==null?void 0:m.str),$.success("å·²è¤è£½é£çµ")}catch(m){$.error(m.message)}}}]),A=m=>{O.value=m},E=async()=>{var _;const m=await Dt({type:2,liked_id:e.value.id,status:s.value?2:1,video_id:e.value.id});m.code===150001?($.error("è«å ç»é"),(_=C.value)!=null&&_.login&&C.value.login()):m.code!==0?$.error(m.message):(a==null||a(),$.success("æä½æå"))},Q=b(()=>{if(!e.value.publish_at)return"";let m=`ç¼ä½æ¥æï¼${me.unix(e.value.publish_at).format("YYYY-MM-DD HH:mm")} `;return e.value.updated_at&&e.value.updated_at>e.value.publish_at&&(["s","xs"].includes(o.value)&&(m+="<br />"),m+=`æ´æ°æ¥æï¼${me.unix(e.value.updated_at).format("YYYY-MM-DD HH:mm")}`),m});return(m,_)=>{var f;const g=Le,P=Rt,n=Ve;return L(),D(we,null,[h("div",{class:"tvb-video-detail_info",style:xe({minHeight:x(w)?`${x(w)}px`:void 0})},[h("div",{class:fe(["tvb-video-detail_info-content",[x(o)]]),style:xe({width:x(t)})},[h("h1",un,te(i.value),1),h("div",vn,[h("p",fn,"æ°æï¼"+te(y.value),1),Q.value?(L(),D("p",{key:0,class:"tvb-video-detail_info-other-publish_date",innerHTML:Q.value},null,8,pn)):Y("",!0)]),h("div",mn,[h("button",{class:"tvb-video-detail_info-btn",onClick:E},[q(g,{class:"tvb-video-detail_info-btn-icon",name:`like_${s.value?"active":"default"}`},null,8,["name"]),r.value?(L(),D("span",hn,te(r.value),1)):Y("",!0)]),(L(),U(P,{overlap:T.value,placement:"bottom-end",key:x(o),trigger:["m","s","xs"].includes(x(o))?"click":"hover","show-arrow":!1,"wrapper-style":"tvb-video-detail_info-popover","onUpdate:show":A},{trigger:ge(()=>[h("button",{class:fe(["tvb-video-detail_info-btn",{"is-active":O.value}])},[q(g,{class:"tvb-video-detail_info-btn-icon",name:"share"})],2)]),default:ge(()=>[h("div",_n,[h("div",gn,[(L(!0),D(we,null,He(K.value,S=>(L(),D("div",{class:"tvb-video-detail_info-share",key:S.name,onClick:S.onClick},[q(g,{class:"tvb-video-detail_info-share-icon",name:S.icon},null,8,["name"]),h("p",bn,te(S.name),1)],8,yn))),128))])])]),_:1},8,["overlap","trigger"]))])],6),d.value?(L(),U(ct,{key:0,class:"tvb-video-detail_info-preferred"})):Y("",!0),V.value&&H.value!==2&&x(v)?(L(),U(n,{style:xe({marginTop:"16px",width:x(t)}),"ad-type":J.value,key:J.value,position:14,unit:`/${V.value}`,"show-ad":H.value!==2,params:{content_type:"video",vtype:"vod",sub_category_path:((f=R.value)==null?void 0:f.path)||"x",video_id:V.value||"x"}},null,8,["style","ad-type","unit","show-ad","params"])):Y("",!0),q(dn)],4),q(x(Jt),{type:"login-logout",ref_key:"loginRef",ref:C,style:{display:"none"}},null,512)],64)}}}),Cn=he(wn,[["__scopeId","data-v-37bb8b11"]]),$n={class:"tvb-video-page_nav"},In={key:1,class:"tvb-video-detail"},Sn=["content"],kn=["content"],Ln=["content"],Hn=["content"],Pn=["content"],Tn=["content"],zn=["content"],On=["content"],Vn=["content"],Rn=["content"],jn=["content"],An=["content"],En=se({name:"TVBVideoDetail"}),Mn=Object.assign(En,{setup(u){const a=it(),e=c({}),t=c({}),o=c({}),d=c({}),v=I("language","zh"),w=c(!0),i=I("isPreview"),s=c(0),r=I("seoTitleSuffix"),y=I("size"),C=b(()=>["s","xs"].includes(y.value)),$=b(()=>{var n;return(n=e.value)==null?void 0:n.id}),O=b(()=>{var n;return(n=e.value)==null?void 0:n.category_info}),T=b(()=>{var n;return((n=e.value)==null?void 0:n.is_show_ad)??1}),V=c(!1),R=()=>
119{console.log("[Shaka Player] 广åå è½½å®æï¼è§¦åææ¾å¨å°ºå¯¸éæ°è®¡ç®"),V.value=!0},H=c(!1);ae(()=>T.value,n=>{n===2&&(console.log("[Shaka Player] 广å被å±è½ï¼è·³è¿å¹¿åå è½½çå¾ "),V.value=!0)},{immediate:!0}),F("currentVideo",e),F("adsLoaded",V),F("extraLoaded",H),F("defaultVideo",t),F("setCurrentVideo",n=>{H.value=!1,e.value=n});const j=I("setAdParams",()=>{});ae([()=>{var n;return(n=e.value)==null?void 0:n.id},()=>{var n,f;return(f=(n=e.value)==null?void 0:n.category_info)==null?void 0:f.path},H],([n,f,S])=>{!n||!S||j({content_type:"video",vtype:"vod",sub_category_path:f||"x",video_id:n})},{immediate:!0}),F("nextVideo",o),F("setNextVideo",n=>{o.value=n}),F("prevVideo",d),F("setPrevVideo",n=>{d.value=n});const B=async()=>{var f,S;H.value=!1;const n=(S=(f=a.params)==null?void 0:f.videoId)==null?void 0:S.replace("v","");if(n){const p=i.value?Ft:Ut,{code:k,data:G}=await p({video_id:n});s.value=k,G.category_info={},k===0&&(t.value=G,e.value=t.value)}w.value=!1,typeof window<"u"&&Ce(()=>{window.scroll(0,0)})};ye(()=>{B()}),ze(B);const J=b(()=>{var f,S,p,k,G,X,oe,ne,ie,be,$e,Ie,Se,ke,l;const n=[{name:v==="en"?"Home":"主é ",path:"/"}];return(p=(S=(f=e.value)==null?void 0:f.category_info)==null?void 0:S.parent)!=null&&p.title&&n.push({name:((X=(G=(k=e.value)==null?void 0:k.category_info)==null?void 0:G.parent)==null?void 0:X.title)||"",path:((ie=(ne=(oe=e.value)==null?void 0:oe.category_info)==null?void 0:ne.parent)==null?void 0:ie.link)||""}),($e=(be=e.value)==null?void 0:be.category_info)!=null&&$e.title&&n.push({name:((Se=(Ie=e.value)==null?void 0:Ie.category_info)==null?void 0:Se.title)||"",path:((l=(ke=e.value)==null?void 0:ke.category_info)==null?void 0:l.link)||""}),n}),N=b(()=>{var n,f;return((f=(n=e==null?void 0:e.value)==null?void 0:n.og_image_info)==null?void 0:f.medium)||""}),K=b(()=>{var p,k;const S=(((p=e.value)==null?void 0:p.meta_description)||((k=e.value)==null?void 0:k.description)||"").replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim();return S.length>160?S.slice(0,160):S}),A=b(()=>{var n;return(n=e.value.author)==null?void 0:n.join("ã")}),E="https://www.tvb.com/",Q=b(()=>{var n,f;return E+(((f=(n=e==null?void 0:e.value)==null?void 0:n.uri)==null?void 0:f.slice(1))||"")}),m=b(()=>{var n,f;return(((n=e.value)==null?void 0:n.seo_title)||((f=e.value)==null?void 0:f.title)||"")+r}),_=b(()=>{var f;const n=(f=e.value)==null?void 0:f.ld_json;if(!n)return"";if(typeof n=="string"){const S=n.trim();if(!S)return"";try{return JSON.parse(S),S}catch{return""}}try{return JSON.stringify(n)}catch{return""}}),g=b(()=>{const n=[];return _.value&&n.push({id:"video-extra-ld-json",innerHTML:_.value,type:"application/ld+json"}),{script:n}}),{patch:P}=lt(g);return ae(g,()=>{P(g.value)},{immediate:!0}),(n,f)=>{var k,G;const S=Ve,p=mt;return L(),D("div",{class:fe(["tvb-video-page",[x(y)]])},[$.value&&T.value!==2&&H.value?(L(),U(S,{key:0,"ad-type":"topbn",position:14,unit:`/${$.value}`,"show-ad":T.value!==2,params:{content_type:"video",vtype:"vod",sub_category_path:((k=O.value)==null?void 0:k.path)||"x",video_id:$.value||"x"},onLoad:R,onError:R},null,8,["unit","show-ad","params"])):Y("",!0),jt(h("div",$n,[q(Mt,{breadcrumbs:J.value},null,8,["breadcrumbs"]),C.value?Y("",!0):(L(),U(ct,{key:0}))],512),[[At,J.value&&!w.value]]),w.value?Y("",!0):(L(),D("div",In,[q(ln,null,{default:ge(()=>[q(x(Co),null,{default:ge(()=>{var X;return[(L(),U(Cn,{key:(X=e.value)==null?void 0:X.id}))]}),_:1})]),_:1})])),$.value&&T.value!==2&&H.value?(L(),U(S,{key:2,"ad-type":"to",position:14,unit:`/${$.value}`,"show-ad":T.value!==2,params:{content_type:"video",vtype:"vod",sub_category_path:((G=O.value)==null?void 0:G.path)||"x",video_id:$.value||"x"}},null,8,["unit","show-ad","params"])):Y("",!0),s.value!==0?(L(),U(p,{key:3,icon:"img_article_deleted",des:x(i)?"é è¦½éæ¥å·²å¤±æï¼è«éæ°ç²å":"æ±æï¼æ¾ä¸å°ç¸éè³æ",showbtn:!x(i),style:{margin:"12vh auto 6vh"}},null,8,["des","showbtn"])):Y("",!0),q(x(Et),null,{default:ge(()=>[h("title",null,te(m.value),1),h("meta",{name:"author",content:A.value},null,8,Sn),h("meta",{name:"description",content:K.value},null,8,kn),f[0]||(f[0]=h("meta",{property:"og:type",content:"video.other"},null,-1)),h("meta",{property:"og:image",content:N.value},null,8,Ln),h("meta",{property:"og:title",content:m.value},null,8,Hn),h("meta",{property:"og:image:alt",content:e.value.og_image_alt_txt},null,8,Pn),h("meta",{property:"og:url",content:Q.value},null,8,Tn),h("meta",{property:"og:description",content:K.value},null,8,zn),h("meta",{name:"twitter:title",content:m.value},null,8,On),h("meta",{name:"twitter:image",content:N.value},null,8,Vn),h("meta",{name:"twitter:image:alt",content:e.value.og_image_alt_txt},null,8,Rn),h("meta",{name:"twitter:url",content:Q.value},null,8,jn),h("meta",{property:"twitter:description",content:K.value},null,8,An)]),_:1})],2)}}}),Zn=he(Mn,[["__scopeId","data-v-cc703586"]]);export{Zn as default}; 120//# sourceMappingURL=index-Ba0dSWEw.js.map
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.