PageSourceSearch

https://www.kanhan.com/_nuxt/CiwONkD4.js

js kanhan.com collected 2026-10-03 23:47:49 UTC 4,229 bytes, 1 lines download raw bytes

1import{az as E,aL as k,at as N,ap as R,U as D,S as F,Z as O,k as S,aP as H,aK as I,h as M,a7 as n,M as U,H as v,j as u,an as p,o as W,g as i,a5 as b,q}from"./1cnms7l4.js";import{u as x}from"./D50tmuJY.js";import K from"./Ct3JOSlr.js";import"./DscMmph_.js";import"./DlAUqK2U.js";function Z(d){const l=E("vimeoPlayer",()=>({scriptInput:{src:"https://player.vimeo.com/api/player.js"},scriptOptions:{use(){return{Vimeo:window.Vimeo}}}}),d);{const m=k(l.status,a=>{a==="loading"&&(N({link:[{rel:"preconnect",href:"https://i.vimeocdn.com"},{rel:"preconnect",href:"https://f.vimeocdn.com"},{rel:"preconnect",href:"https://fresnel.vimeocdn.com"}]}),m())})}return l}const G={__name:"ScriptVimeoPlayer",props:{trigger:{type:[String,Array,Boolean],required:!1,default:"mousedown"},placeholderAttrs:{type:Object,required:!1},rootAttrs:{type:Object,required:!1},aboveTheFold:{type:Boolean,required:!1},vimeoOptions:{type:Object,required:!1},id:{type:null,required:!1},url:{type:null,required:!1}},emits:["play","playing","pause","ended","timeupdate","progress","seeking","seeked","texttrackchange","chapterchange","cuechange","cuepoint","volumechange","playbackratechange","bufferstart","bufferend","error","loaded","durationchange","fullscreenchange","qualitychange","camerachange","resize","enterpictureinpicture","leavepictureinpicture"],setup(d,{expose:l,emit:m}){const a=d,P=m,A=["play","playing","pause","ended","timeupdate","progress","seeking","seeked","texttrackchange","chapterchange","cuechange","cuepoint","volumechange","playbackratechange","bufferstart","bufferend","error","loaded","durationchange","fullscreenchange","qualitychange","camerachange","resize","enterpictureinpicture","leavepictureinpicture"],c=b(),V=b(),s=x({trigger:a.trigger,el:V});let g=!1;a.trigger==="mousedown"&&s instanceof Promise&&s.then(e=>{e&&(g=!0)});const h=b(!1),{onLoaded:j,status:o}=Z({scriptOptions:{trigger:s}}),w=i(()=>a.vimeoOptions?.id||a.id),T=i(()=>`vimeo-embed:${w.value}`),{data:L}=R(T,()=>$fetch("https://vimeo.com/api/oembed.json",{params:{url:`https://vimeo.com/${w.value}`,format:"json"}}),{lazy:!0}),f=i(()=>L.value?.thumbnail_url);let t;l({play:()=>t?.play(),pause:()=>t?.pause(),getDuration:()=>t?.getDuration(),getCurrentTime:()=>t?.getCurrentTime(),setCurrentTime:e=>t?.setCurrentTime(e),getVolume:()=>t?.getVolume(),setVolume:e=>t?.setVolume(e),getPaused:()=>t?.getPaused(),getEnded:()=>t?.getEnded(),getLoop:()=>t?.getLoop(),setLoop:e=>t?.setLoop(e),getPlaybackRate:()=>t?.getPlaybackRate(),setPlaybackRate:e=>t?.setPlaybackRate(e)});const $=i(()=>a.vimeoOptions?.width||c.value?.parentNode?.offsetWidth||640),_=i(()=>a.vimeoOptions?.height||c.value?.parentNode?.offsetHeight||480);D(()=>{j(async({Vimeo:e})=>{const r=a.vimeoOptions||{};!r.id&&a.id&&(r.id=a.id),!r.url&&a.url&&(r.url=a.url),r.width=$.value,r.height=_.value,t=new e.Player(c.value,r),g&&(t.play(),g=!1);for(const y of A)t.on(y,C=>{P(y,C,t),y==="loaded"&&(h.value=!0)})})}),k(()=>a.id,e=>{e&&t?.loadVideo(Number(e))}),k(o,e=>{e==="error"&&P("error")});const z=i(()=>q(a.rootAttrs,{"aria-busy":o.value==="loading","aria-label":o.value==="awaitingLoad"?"Vimeo Player - Placeholder":o.value==="loading"?"Vimeo Player - Loading":"Vimeo Player - Loaded","aria-live":"polite",role:"application",style:{maxWidth:"100%",width:"auto",height:"auto",aspectRatio:"16/9",position:"relative",backgroundColor:"black"},...s instanceof Promise?s.ssrAttrs||{}:{}})),B=i(()=>q(a.placeholderAttrs,{src:f.value,alt:"",loading:a.aboveTheFold?"eager":"lazy",fetchpriority:a.aboveTheFold?"high":void 0,style:{cursor:"pointer",width:"100%",objectFit:"contain",height:"100%"}}));return F(()=>t?.unload()),(e,r)=>(O(),S("div",v({ref_key:"rootEl",ref:V},z.value),[H(M("div",{ref_key:"elVimeo",ref:c,class:"vimeo-player"},null,512),[[I,h.value]]),h.value?u("",!0):n(e.$slots,"placeholder",v({key:0},p(L),{placeholder:f.value}),()=>[f.value?(O(),S("img",U(v({key:0},B.value)),null,16)):u("",!0)]),p(o)==="loading"?n(e.$slots,"loading",{key:1},()=>[W(K,{color:"white"})]):u("",!0),p(o)==="awaitingLoad"?n(e.$slots,"awaitingLoad",{key:2}):p(o)==="error"?n(e.$slots,"error",{key:3}):u("",!0),n(e.$slots,"default")],16))}},te=Object.assign(G,{__name:"ScriptVimeoPlayer"});export{te 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.