1import x from"./DmkKeAQd.js";import q from"./D4nr_kkl.js";import{u as H}from"./C8uHJLGK.js";import{g as $,n as k,o as I,m as L,h as U}from"./DaI1dtU0.js";import{u as O}from"./DzhT_-Y7.js";import{d as K,a as R,ae as B,c as a,H as f,u as v,b as N,o as M,r as P,e as j,af as m}from"./D1FcBL9p.js";import{u as w}from"./BvC-Ff6-.js";import"./BlRCviZe.js";import"./Datq3-do.js";import"./DnzarRWK.js";/* empty css */import"./PM00KlGD.js";import"./EgekFmNJ.js";import"./B-3PLJnv.js";import"./CROPNIdg.js";import"./skxs2esw.js";import"./C43kgiy-.js";import"./D0etmG_Y.js";import"./qJlnEoVS.js";import"./CXXDZoq4.js";const y="https://www.ftu.org.hk",pe=K({__name:"index",async setup(A){let i,c;const{isMobile:C}=R(),n=B(),{langType:s}=H(),S=a(()=>C.value?q:x),z=async(e,o,r="1")=>{switch(e){case"1":return await U({contentId:o,langType:r});case"2":return await L({contentId:o,langType:r});case"3":return await I({contentId:o,langType:r});case"4":return await k({contentId:o,langType:r});default:return null}},{data:t}=([i,c]=f(async()=>w(()=>`counseling-detail-seo-${n.params.id}-${n.query.type||""}-${s.value}`,async()=>{const e=s.value||"1",o=String(n.query.type||""),r=String(n.query.id||"");if(!r||!o)return null;try{return await z(o,r,String(e))}catch(l){return console.error("è·åSEOæ°æ®å¤±è´¥:",l),null}},{default:()=>null,watch:[()=>n.params.id,()=>n.query.type,()=>s.value]})),i=await i,c(),i),{data:D}=([i,c]=f(async()=>w(()=>`counseling-related-${n.query.columnId||"workersRights"}-${n.query.id}-${s.value}`,async()=>{const e=String(n.query.id||""),o=String(n.query.columnId||"workersRights");try{const r=await $({columnId:o,langType:s.value||"1",pageNo:"1",pageSize:"4"});return r!=null&&r.list?r.list.filter(l=>l.id!==e).slice(0,3):[]}catch{return[]}},{default:()=>[]})),i=await i,c(),i);m("ssrDetailData",t),m("ssrRelatedData",D),m("ssrRoute",n),m("ssrLangType",s);const p=e=>{if(!e)return"";const r=e.replace(/<[^>]*>/g,"").trim().replace(/\s+/g," ").trim();return r.substring(0,155)+(r.length>155?"...":"")},{getDynamicCanonicalUrl:T}=O(),g=T("/counselingDetail",["title"]),d=a(()=>{var e;return(e=t.value)!=null&&e.createTime?new Date(t.value.createTime).toISOString():""}),h=a(()=>{var e;return(e=t.value)!=null&&e.updateTime?new Date(t.value.updateTime).toISOString():""}),_=(n.params.locale||"zh-HK")==="zh-HK"?"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1":"noindex, follow";v({title:a(()=>{var e;return((e=t.value)==null?void 0:e.title)||""}),titleTemplate:null,meta:[{name:"description",content:a(()=>{var e;return p(((e=t.value)==null?void 0:e.content)||"")})},{property:"og:title",content:a(()=>{var e;return((e=t.value)==null?void 0:e.title)||""})},{property:"og:description",content:a(()=>{var e;return p(((e=t.value)==null?void 0:e.content)||"")})},{property:"og:image",content:a(()=>{var e;return((e=t.value)==null?void 0:e.imgUrl)||""})},{property:"og:url",content:g},{property:"og:type",content:"article"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:a(()=>{var e;return((e=t.value)==null?void 0:e.title)||""})},{name:"twitter:description",content:a(()=>{var e;return p(((e=t.value)==null?void 0:e.content)||"")})},{name:"twitter:image",content:a(()=>{var e;return((e=t.value)==null?void 0:e.imgUrl)||""})},{property:"article:published_time",content:d},{property:"article:modified_time",content:h},{name:"robots",content:_}]});const b=a(()=>{if(!t.value)return"";const e={"@context":"https://schema.org","@type":"NewsArticle",headline:t.value.title||"",description:p(t.value.content||""),datePublished:d.value,dateModified:h.value||d.value,author:{"@type":"Organization",name:"馿¸¯å·¥è¯æ",url:"https://www.ftu.org.hk"},publisher:{"@type":"Organization",name:"馿¸¯å·¥è¯æ",url:"https://www.ftu.org.hk",logo:{"@type":"ImageObject",url:"https://www.ftu.org.hk/logo.png",width:200,height:60}},mainEntityOfPage:{"@type":"WebPage","@id":g.value}};return t.value.imgUrl&&(e.image={"@type":"ImageObject",url:t.value.imgUrl}),JSON.stringify(e)}),u=a(()=>{const e=new URLSearchParams,o=String(n.query.id||""),r=String(n.query.type||"");
1o&&e.append("id",o),r&&e.append("type",r);const l=e.toString()?"?"+e.toString():"";return{zhHK:`${y}/zh-HK/counselingDetail${l}`,zhCN:`${y}/zh-CN/counselingDetail${l}`,en:`${y}/en/counselingDetail${l}`}});return v({link:[{rel:"canonical",href:g},{rel:"alternate",hreflang:"zh-HK",href:a(()=>u.value.zhHK)},{rel:"alternate",hreflang:"zh-TW",href:a(()=>u.value.zhHK)},{rel:"alternate",hreflang:"zh-CN",href:a(()=>u.value.zhCN)},{rel:"alternate",hreflang:"en",href:a(()=>u.value.en)},{rel:"alternate",hreflang:"x-default",href:a(()=>u.value.zhHK)}],script:[{type:"application/ld+json",innerHTML:b}]}),(e,o)=>(M(),N(P(j(S)),{ref:"layoutRef"},null,512))}});export{pe 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.