PageSourceSearch

https://scripod.com/assets/play-button-DrBTageq.js

js scripod.com collected 2026-10-09 00:24:10 UTC 3,822 bytes, 1 lines download raw bytes

1import{a as e,t}from"./jsx-runtime-D_MnEzuy.js";import{t as n}from"./react-DBEjWt7A.js";import{n as r}from"./index.esm-yZ3WVT7t.js";import{r as i}from"./audio-player-Bi3uQCco.js";import{i as a,r as o}from"./dist-DT2jQ2P_.js";import{a as s,i as c,n as l}from"./formatTime-DG3ogLIf.js";var u=e(n(),1),d=t(),f=u.memo(({episode:e,className:t,style:n,stopPropagation:f=!1,fixedTimestamp:p})=>{let{audio:m,episode:h,status:g,playEpisode:_,pauseEpisode:v,historyMap:y,daiAlign:b,audioDurationRatio:x}=i()||{};e?.id!==h?.id&&(b=void 0,x=1);let S=(0,u.useMemo)(()=>p===void 0?l(e.itunesDuration||e.ai?.audioDuration||null):typeof p==`number`?c(b?.aToB(p)||p):p,[e,p]),C=(0,u.useRef)(null);C.current=h;let[w,T]=(0,u.useState)(0),E=(0,u.useRef)(w);E.current=w;let D=(0,u.useCallback)(e=>{if(C.current?.id===e.id&&m.src)g===`paused`?_():v();else{let t=E.current;t>.98&&(t=0),_(e,void 0,{progress:t})}},[_,m,g]),O=(0,u.useCallback)(t=>{let n=typeof t==`number`?t:s(t);_(e,b?.aToB(n)||n)},[_,e]),k=e?.id===h?.id&&g===`playing`,A=e?.id===h?.id&&(g===`loading`||g===`seeking`);(0,u.useEffect)(()=>{let t=C.current?.id===e.id?m.duration:void 0,n=(Number.isNaN(t)?void 0:t)??e.ai?.audioDuration??e.itunesDuration;if(n!==null){if(p!==void 0){let e=typeof p==`number`?p:s(p);T(e/n);return}if(k){let e=()=>{T(Math.round(m.currentTime/n*100)/100)};return m.addEventListener(`timeupdate`,e),()=>{m.removeEventListener(`timeupdate`,e)}}}},[k,m]),(0,u.useEffect)(()=>{if(p!==void 0)return;let t=y[e.id];if(!t&&e.user?.lastPosition&&(t={time:e.user.lastPosition},y[e.id]=t),t){let t=e.ai?.audioDuration||e.itunesDuration;if(t){let n=y[e.id].time/t;T(n>1?1:n)}}},[y,e]);let j=h?.id===e.id||y&&e.id in y;return(0,d.jsxs)(`button`,{"data-status":h?.id===e.id?g:void 0,className:a(`inline-flex flex-col w-fit cursor-pointer transition-transform hover:scale-[102%] active:scale-[98%] `,t),style:n,onClick:t=>{f&&(t.stopPropagation(),t.preventDefault()),p===void 0?D(e):O(p)},children:[(0,d.jsxs)(`div`,{className:`flex items-center`,children:[p===void 0?k?(0,d.jsx)(r.pause,{className:a(`fill-current h-(--icon-size,14px)`)}):A?(0,d.jsx)(o,{size:14,tickWidth:2}):(0,d.jsx)(r.resume,{className:a(`fill-current h-(--icon-size,14px) -ml-px`)}):(0,d.jsx)(r.resume,{className:a(`fill-current h-(--icon-size,14px)`)}),(0,d.jsx)(`div`,{className:`[display:var(--inline-progress)]`,children:p===void 0?(0,d.jsxs)(`div`,{className:a(`relative h-1 rounded-full transition-all duration-300 overflow-clip`,{"opacity-0 w-0":!j,"opacity-100 w-8 ml-2":j}),children:[(0,d.jsx)(`div`,{className:`absolute inset-0 bg-current opacity-20`}),(0,d.jsx)(`div`,{className:a(`absolute h-full bg-current`),style:{width:`${w*100}%`}})]}):(0,d.jsxs)(`div`,{className:a(`relative h-1 w-12 ml-2`),children:[(0,d.jsx)(`div`,{className:`absolute inset-0 rounded-full bg-current opacity-20`}),(0,d.jsx)(`div`,{className:a(`absolute w-0.5 rounded h-1.5 -top-px bg-current -translate-x-px`),style:{left:`${w*100}%`}})]})}),(0,d.jsx)(`span`,{className:`ml-2 text-current`,children:S})]}),(0,d.jsx)(`div`,{className:`[display:var(--bottom-progress,none)]`,children:p===void 0?(0,d.jsxs)(`div`,{className:a(`relative rounded-full self-stretch transition-all duration-300 overflow-clip opacity-0 h-(--progress-height,4px) mt-(--progress-margin-top-hidden,-12px)`,j&&`opacity-100 mt-(--progress-margin-top-shown,8px)`),children:[(0,d.jsx)(`div`,{className:`absolute inset-0 bg-current opacity-20`}),(0,d.jsx)(`div`,{className:`absolute bg-current h-full `,style:{width:`${w*100}%`}})]}):(0,d.jsxs)(`div`,{className:a(`relative self-stretch h-1 mt-2`),children:[(0,d.jsx)(`div`,{className:`absolute inset-0 bg-current opacity-20 rounded-full`}),(0,d.jsx)(`div`,{className:`absolute bg-current w-0.5 h-2 -top-0.5 rounded-full -translate-x-px`,style:{left:`${w*100}%`}})]})})]})});export{f as t};

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.