1import k from"./UFiZ2nQR.js";import x from"./Bc9baqXW.js";import I from"./DCyTsLRS.js";import N from"./CJQfDcAK.js";import{aU as V,ct as P,l as L,V as _,aZ as j,a_ as U,aR as A,b4 as d,b3 as B,cz as q,u as D,bd as F,cA as h,aQ as f,a3 as i,bc as w,b2 as S,b5 as E}from"./CxcBhYY2.js";import z from"./D1NOScEs.js";import"./CyXoYJZ9.js";import"./CgHB9N49.js";import"./C121wrwU.js";import"./uOUAV06f.js";import"./2K9s90U_.js";const T={class:"unleash"},G={class:"unleash__wrapper"},Z={class:"unleash__content"},H={class:"unleash__details"},J={key:0,class:"unleash__moments"},re={__name:"[slug]",async setup(M){let p,$;const r=D(),m=V(),{slug:v}=m.params,{data:e,error:O}=([p,$]=P(async()=>q(`unleash-${v}`,async()=>{let o=await h("unleash_videos").where("slug","=",v).first(),a=new Set((await h("unleash_videos").where("listed","=",!1).select("slug").all()).map(t=>t.slug));if(!o||a.has(v))throw L({statusCode:404});let n=(await h("unleash_videos").where("category","=",o.category).select("title","description","uploaded","slug","timing","host","category","thumbnail_large","thumbnail_default").all()).filter(t=>t.slug!==o.slug&&!a.has(t.slug)).sort((t,W)=>new Date(W.uploaded)-new Date(t.uploaded)).slice(0,2);for(;n.length<2;)n.push(null);let l=(await h("misc").select("entries").where("_id","=","employees").first())?.entries?.find(t=>t.id===o.host);return{video:o,suggestions:n,author:l}})),p=await p,$(),p);if(O.value)throw L({statusCode:404});const s=_(()=>`${r.public.URL.WEB}en/unleash/${e.value.video.slug}/`),g=_(()=>e.value.video.description||`Watch ${e.value.video.title} and learn how to get more value from Crisp.`),y=_(()=>e.value.author?.blog_author_slug?`${r.public.URL.WEB}en/blog/author/${e.value.author.blog_author_slug}/`:null),R=_(()=>{let o=Array.isArray(m.query.t)?m.query.t[0]:m.query.t,a=Number.parseInt(o,10);return Number.isFinite(a)&&a>=0?a:0}),b={"@type":"Organization","@id":`${r.public.URL.WEB}#organization`,name:"Crisp",url:r.public.URL.WEB,logo:{"@type":"ImageObject",url:`${r.public.URL.WEB}favicons/favicon-256x256.png`,width:256,height:256}};j(()=>({title:e.value.video.title,meta:[{name:"description",content:g.value},{property:"og:type",content:"video.other"},{property:"og:title",content:e.value.video.title+" - Crisp"},{property:"og:description",content:g.value},{property:"og:video",content:`https://www.youtube.com/embed/${e.value.video.youtube_id}`},{property:"og:video:secure_url",content:`https://www.youtube.com/embed/${e.value.video.youtube_id}`},{property:"og:video:type",content:"text/html"},{property:"og:video:width",content:1280},{property:"og:video:height",content:720},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:site",content:"@crisp_im"}],link:[{rel:"canonical",href:s.value}]})),U(()=>{let o=e.value.author?{"@type":"Person","@id":y.value||`${s.value}#host-${e.value.author.id}`,name:e.value.author.name,jobTitle:e.value.author.position,image:{"@type":"ImageObject",url:`${r.public.URL.IMAGE}avatar/operator/${e.value.author.user_id}/400/`,width:400,height:400},worksFor:{"@id":b["@id"]},...y.value?{url:y.value}:{},...e.value.author.twitter?{sameAs:[`https://twitter.com/${e.value.author.twitter}`]}:{}}:b,a=e.value.video.timing.map((u,n,c)=>{let l=C(u.time),t=c[n+1]?C(c[n+1].time):0;return{"@type":"Clip",name:u.title,startOffset:l,...t>l?{endOffset:t}:{},url:`${s.value}?t=${l}`}});return{"@context":"https://schema.org","@type":"VideoObject","@id":`${s.value}#video`,name:e.value.video.title,description:g.value,thumbnailUrl:[e.value.video.thumbnail_large,e.value.video.thumbnail_default],uploadDate:e.value.video.uploaded,...e.value.video.duration?{duration:e.value.video.duration}:{},embedUrl:`https://www.youtube.com/embed/${e.value.video.youtube_id}`,url:s.value,inLanguage:"en",isFamilyFriendly:!0,mainEntityOfPage:{"@type":"WebPage","@id":s.value},potentialAction:{"@type":"WatchAction",target:s.value},publisher:b,author:o,...a.length?{hasPart:a}:{}}}),U(()=>({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Unleash",item:`${r.public.URL.WEB}en/unleash/`},{"@type":"ListItem",position:2,name:e.value.video.title,item:s.value}]}));function C(o){return o.split(":").reduce((a,u)=>a*60+Number(u),0)}return(o,a)=>{const u=k,n=x,c=I,l=N,t=F;return f(),A("div",T,[d(t,null,{default:B(()=>[d(u,{"video-id":i(e).video.youtube_id,thumbnail:i(e).video.thumbnail_large,suggestions:i(e).suggestions,"start-seconds":i(R)},null,8,["video-id","thumbnail","suggestions","start-seconds"]),w("div",G,[w("div",Z,[d(c,{video:i(e).video},{metadata:B(()=>[w("div",H,[i(e).author?(f(),S(n,{key:0,author:i(e).author},null,8,["author"])):E("",!0),d(z,{video:i(e).video},null,8,["video"])])]),_:1},8,["video"])]),i(e).video.timing?.length?(f(),A("div",J,[d(l,{video:i(e).video},null,8,["video"])])):E("",!0)])]),_:1})])}}};export{re 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.