PageSourceSearch

https://thepaper.ai/assets/PodcastDetail-CjkzS_oX.js

js thepaper.ai collected 2026-10-05 13:06:28 UTC 30,996 bytes, 41 lines download raw bytes

1import{c as _,r as c,j as e,m as ee,X as te,z as P,av as le,R as $,bx as I,P as re,A as ne,S as oe,b as ce,a as de,u as ue,aI as me,a5 as xe,D as H,s as O,B as Y,bJ as X,bz as K}from"./index-DSpYbZHl.js";import{u as he,S as pe,P as fe}from"./PageSEOInjector-CPL7urfQ.js";import{C as be,a as we}from"./card-DskTqZO1.js";import{I as ge}from"./image-DGoTuXPy.js";import{H as Q}from"./hash-gCOdAuww.js";import{F as G}from"./file-text-CIyZL4Nn.js";import{L as ve}from"./loader-circle-BKsDBjYt.js";import{P as je}from"./pause-BYzJjtt1.js";import{P as se}from"./play-DWkYjorP.js";import{H as ae}from"./headphones-BaXQ-Mnu.js";import{C as ye}from"./clock-B6xG1z9Q.js";import{S as Ne}from"./SlugCanonicalSEO-Bjc9yhLP.js";import{A as _e}from"./arrow-left-BxkDWFMf.js";import"./mountPageSchema-BbiDWl2V.js";/**
2 * @license lucide-react v0.475.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const Ee=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],ke=_("Link",Ee);/**
7 * @license lucide-react v0.475.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const Fe=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],J=_("Music",Fe);/**
12 * @license lucide-react v0.475.0 - ISC
13 *
14 * This source code is licensed under the ISC license.
15 * See the LICENSE file in the root directory of this source tree.
16 */const Pe=[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]],W=_("Radio",Pe);/**
17 * @license lucide-react v0.475.0 - ISC
18 *
19 * This source code is licensed under the ISC license.
20 * See the LICENSE file in the root directory of this source tree.
21 */const Ce=[["polygon",{points:"19 20 9 12 19 4 19 20",key:"o2sva"}],["line",{x1:"5",x2:"5",y1:"19",y2:"5",key:"1ocqjk"}]],Se=_("SkipBack",Ce);/**
22 * @license lucide-react v0.475.0 - ISC
23 *
24 * This source code is licensed under the ISC license.
25 * See the LICENSE file in the root directory of this source tree.
26 */const Ae=[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]],Le=_("SkipForward",Ae);/**
27 * @license lucide-react v0.475.0 - ISC
28 *
29 * This source code is licensed under the ISC license.
30 * See the LICENSE file in the root directory of this source tree.
31 */const ze=[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]],Z=_("Type",ze);/**
32 * @license lucide-react v0.475.0 - ISC
33 *
34 * This source code is licensed under the ISC license.
35 * See the LICENSE file in the root directory of this source tree.
36 */const Te=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],Me=_("Volume2",Te);/**
37 * @license lucide-react v0.475.0 - ISC
38 *
39 * This source code is licensed under the ISC license.
40 * See the LICENSE file in the root directory of this source tree.
41 */const Ie=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]],$e=_("VolumeX",Ie);function Be({podcastId:x,onClose:g,onSuccess:n,language:y}){const[r,o]=c.useState({title_en:"",title_es:"",youtube_url:"",cover_image_url:"",description_en:"",description_es:"",episode_number:"",duration_minutes:""}),[N,m]=c.useState(!1),[d,h]=c.useState(""),s=y==="en"?{title:"New Episode",titleEn:"Title (English)",titleEs:"Title (Spanish)",youtubeUrl:"YouTube URL",coverImage:"Cover Image URL",descEn:"Description (English)",descEs:"Description (Spanish)",episodeNumber:"Episode #",duration:"Duration (min)",save:"Save Episode",saving:"Saving...",cancel:"Cancel",required:"Title and YouTube URL are required"}:{title:"Nuevo Episodio",titleEn:"Título (Inglés)",titleEs:"Título (Español)",youtubeUrl:"URL de YouTube",coverImage:"URL de Imagen",descEn:"Descripción (Inglés)",descEs:"Descripción (Español)",episodeNumber:"Episodio #",duration:"Duración (min)",save:"Guardar Episodio",saving:"Guardando...",cancel:"Cancelar",required:"Título y URL de YouTube son obligatorios"},l=async a=>{if(a.preventDefault(),h(""),!r.title_en.trim()||!r.title_es.trim()||!r.youtube_url.trim()){h(s.required);return}m(!0);try{await P.entities.PodcastEpisode.create({podcast_id:x,title_en:r.title_en.trim(),title_es:r.title_es.trim(),youtube_url:r.youtube_url.trim(),cover_image_url:r.cover_image_url.trim()||void 0,description_en:r.description_en.trim()||void 0,description_es:r.description_es.trim()||void 0,episode_number:r.episode_number?Number(r.episode_number):void 0,duration_minutes:r.duration_minutes?Number(r.duration_minutes):void 0,status:"published"}),n()}catch(f){h(f.message||"Error saving episode")}finally{m(!1)}},p=(a,f)=>{o(w=>
41({...w,[a]:f}))};return e.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4 bg-black/60 backdrop-blur-sm",children:e.jsxs(ee.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"bg-[#1a1f2e] rounded-2xl shadow-2xl border border-white/10 w-full max-w-lg max-h-[90vh] overflow-y-auto",onClick:a=>a.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-white/10",children:[e.jsx("h2",{className:"text-lg font-bold text-white",children:s.title}),e.jsx("button",{onClick:g,className:"text-white/50 hover:text-white p-1",children:e.jsx(te,{className:"h-5 w-5"})})]}),e.jsxs("form",{onSubmit:l,className:"p-4 space-y-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-xs font-medium text-white/60 mb-1.5",children:[s.titleEn," *"]}),e.jsxs("div",{className:"relative",children:[e.jsx(Z,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-white/25"}),e.jsx("input",{type:"text",value:r.title_en,onChange:a=>p("title_en",a.target.value),placeholder:"e.g. Industry 4.0 Revolution",className:"w-full pl-9 pr-3 py-2 bg-white/5 border border-white/10 rounded-lg text-white text-sm placeholder:text-white/25 focus:outline-none focus:border-[#4A9EFF]/50"})]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-xs font-medium text-white/60 mb-1.5",children:[s.titleEs," *"]}),e.jsxs("div",{className:"relative",children:[e.jsx(Z,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-white/25"}),e.jsx("input",{type:"text",value:r.title_es,onChange:a=>p("title_es",a.target.value),placeholder:"ej. Revolución Industria 4.0",className:"w-full pl-9 pr-3 py-2 bg-white/5 border border-white/10 rounded-lg text-white text-sm placeholder:text-white/25 focus:outline-none focus:border-[#4A9EFF]/50"})]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-xs font-medium text-white/60 mb-1.5",children:[s.youtubeUrl," *"]}),e.jsxs("div",{className:"relative",children:[e.jsx(ke,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-white/25"}),e.jsx("input",{type:"url",value:r.youtube_url,onChange:a=>p("youtube_url",a.target.value),placeholder:"https://www.youtube.com/watch?v=...",className:"w-full pl-9 pr-3 py-2 bg-white/5 border border-white/10 rounded-lg text-white text-sm placeholder:text-white/25 focus:outline-none focus:border-[#4A9EFF]/50"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-white/60 mb-1.5",children:s.coverImage}),e.jsxs("div",{className:"relative",children:[e.jsx(ge,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-white/25"}),e.jsx("input",{type:"url",value:r.cover_image_url,onChange:a=>p("cover_image_url",a.target.value),placeholder:"https://...",className:"w-full pl-9 pr-3 py-2 bg-white/5 border border-white/10 rounded-lg text-white text-sm placeholder:text-white/25 focus:outline-none focus:border-[#4A9EFF]/50"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-white/60 mb-1.5",children:s.episodeNumber}),e.jsxs("div",{className:"relative",children:[e.jsx(Q,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-white/25"}),e.jsx("input",{type:"number",value:r.episode_number,onChange:a=>p("episode_number",a.target.value),placeholder:"1",className:"w-full pl-9 pr-3 py-2 bg-white/5 border border-white/10 rounded-lg text-white text-sm placeholder:text-white/25 focus:outline-none focus:border-[#4A9EFF]/50"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-white/60 mb-1.5",children:s.duration}),e.jsxs("div",{className:"relative",children:[e.jsx(Q,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-white/25"}),e.jsx("input",{type:"number",value:r.duration_minutes,onChange:a=>p("duration_minutes",a.target.value),placeholder:"30",className:"w-full pl-9 pr-3 py-2 bg-white/5 border border-white/10 rounded-lg text-white text-sm placeholder:text-white/25 focus:outline-none focus:border-[#4A9EFF]/50"})]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-white/60 mb-1.5",children:s.descEn}),e.jsxs("div",{className:"relative",children:[e.jsx(G,{className:"absolute left-3 top-3 h-4 w-4 text-white/25"}),e.jsx("textarea",{value:r.description_en,onChange:a=>p("description_en",a.target.value),placeholder:"Brief episode description...",rows:2,className:"w-full pl-9 pr-3 py-2 bg-white/5 border border-white/10 rounded-lg text-white text-sm placeholder:text-white/25 focus:outline-none focus:border-[#4A9EFF]/50 resize-none"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-white/60 mb-1.5",children:s.descEs}),e.jsxs("div",{className:"relative",children:[e.jsx(G,{className:"absolute left-3 top-3 h-4 w-4 text-white/25"}),e.jsx("textarea",{value:r.description_es,onChange:a=>p("description_es",a.target.value),placeholder:"Breve descripción del episodio...",rows:2,className:"w-full pl-9 pr-3 py-2 bg-white/5 border border-white/10 rounded-lg text-white text-sm placeholder:text-white/25 focus:outline-none focus:border-[#4A9EFF]/50 resize-none"})]})]}),d&&e.jsx("div",{className:"bg-red-500/10 border border-red-500/20 rounded-lg p-2.5 text-red-400 text-xs",children:d}),e.jsxs("div",{className:"flex gap-3 pt-2",children:[e.jsx("button",{type:"button",onClick:g,className:"flex-1 bg-white/5 hover:bg-white/10 text-white/70 py-2 rounded-lg text-sm font-medium transition-all",children:s.cancel}),e.jsx("button",{type:"submit",disabled:N,className:"flex-1 bg-[#4A9EFF] hover:bg-[#3B8EEF] disabled:opacity-50 text-white py-2 rounded-lg text-sm font-bold flex items-center justify-center gap-2 transition-all",children:N?e.jsxs(e.Fragment,{children:[e.jsx(ve,{className:"h-4 w-4 animate-spin"}),s.saving]}):s.save})]})]})]})})}function Re({websiteUrl:x,audioFileUrl:g,coverImage:n,title:y,subtitle:r}){const o=c.useRef(null),N=c.useRef(null),[m,d]=c.useState(!1),[h,s]=c.useState(0),[l,p]=c.useState(0),[a,f]=c.useState(1),[w,A]=c.useState(!1),[t,L]=c.useState(!0),[T,v]=c.useState(!1),E=(()=>
41{if(g)return g;if(!x)return null;const i=x.match(/buzzsprout\.com\/(\d+)\/episodes\/(.+)/);return i?`https://www.buzzsprout.com/${i[1]}/episodes/${i[2]}.mp3`:null})();c.useEffect(()=>{const i=o.current;if(!i||!E)return;const b=()=>L(!1),F=()=>s(i.currentTime),R=()=>p(i.duration),q=()=>d(!0),D=()=>d(!1),U=()=>L(!0),V=()=>d(!1);return i.addEventListener("loadedmetadata",R),i.addEventListener("loadeddata",b),i.addEventListener("canplay",b),i.addEventListener("timeupdate",F),i.addEventListener("play",q),i.addEventListener("pause",D),i.addEventListener("waiting",U),i.addEventListener("ended",V),()=>{i.removeEventListener("loadedmetadata",R),i.removeEventListener("loadeddata",b),i.removeEventListener("canplay",b),i.removeEventListener("timeupdate",F),i.removeEventListener("play",q),i.removeEventListener("pause",D),i.removeEventListener("waiting",U),i.removeEventListener("ended",V)}},[E]);const M=()=>{const i=o.current;i&&(i.paused?i.play():i.pause())},C=()=>{o.current&&(o.current.currentTime=Math.max(0,o.current.currentTime-15))},z=()=>{o.current&&(o.current.currentTime=Math.min(l,o.current.currentTime+15))},u=()=>{o.current&&(o.current.muted=!o.current.muted,A(o.current.muted))},j=i=>{const b=parseFloat(i.target.value);f(b),o.current&&(o.current.volume=b,o.current.muted=b===0,A(b===0))},k=i=>{const b=N.current.getBoundingClientRect(),F=Math.max(0,Math.min(1,(i.clientX-b.left)/b.width));o.current&&l&&(o.current.currentTime=F*l)},S=i=>{if(!i||isNaN(i))return"0:00";const b=Math.floor(i/60),F=Math.floor(i%60).toString().padStart(2,"0");return`${b}:${F}`},ie=l>0?h/l*100:0;return E?e.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center bg-gradient-to-b from-[#0f172a] to-[#1e293b] p-4 sm:p-6",children:[e.jsx("audio",{ref:o,src:E,preload:"metadata"}),e.jsx("div",{className:"mb-5 w-24 h-24 sm:w-28 sm:h-28 rounded-2xl overflow-hidden bg-slate-700/50 shadow-xl ring-1 ring-white/5 flex-shrink-0",children:n&&!T?e.jsx("img",{src:n,alt:"",className:"w-full h-full object-cover",onError:()=>v(!0)}):e.jsx("div",{className:"w-full h-full bg-gradient-to-br from-[#4A9EFF]/20 to-purple-500/20 flex items-center justify-center",children:e.jsx(J,{className:"h-10 w-10 sm:h-12 sm:w-12 text-[#4A9EFF]/40"})})}),y&&e.jsx("h4",{className:"text-white text-sm sm:text-base font-semibold text-center mb-1 line-clamp-1 max-w-full px-4",children:y}),r&&e.jsx("p",{className:"text-white/40 text-xs text-center mb-4 line-clamp-1 max-w-full px-4",children:r}),e.jsxs("div",{className:"w-full max-w-lg flex items-center gap-2 mb-3",children:[e.jsx("span",{className:"text-white/40 text-xs w-10 text-right font-mono",children:S(h)}),e.jsx("div",{ref:N,className:"flex-1 h-2 bg-white/10 rounded-full overflow-hidden cursor-pointer group/progress",onClick:k,children:e.jsx("div",{className:"h-full bg-gradient-to-r from-[#4A9EFF] to-[#60A5FA] rounded-full transition-all duration-100 relative",style:{width:`${ie}%`},children:e.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-3 h-3 bg-white rounded-full shadow-md opacity-0 group-hover/progress:opacity-100 transition-opacity"})})}),e.jsx("span",{className:"text-white/40 text-xs w-10 font-mono",children:S(l)})]}),e.jsxs("div",{className:"flex items-center gap-4 sm:gap-6",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("button",{onClick:u,className:"text-white/50 hover:text-white transition-colors",children:w||a===0?e.jsx($e,{className:"h-4 w-4"}):e.jsx(Me,{className:"h-4 w-4"})}),e.jsx("input",{type:"range",min:"0",max:"1",step:"0.05",value:w?0:a,onChange:j,className:"w-16 sm:w-20 h-1 accent-[#4A9EFF] cursor-pointer"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{onClick:C,className:"text-white/50 hover:text-white transition-colors",title:"Back 15s",children:e.jsx(Se,{className:"h-5 w-5"})}),e.jsx("button",{onClick:M,disabled:t,className:"w-12 h-12 bg-[#4A9EFF] rounded-full flex items-center justify-center hover:bg-[#3B8EEF] transition-all shadow-lg hover:shadow-[#4A9EFF]/30 disabled:opacity-50",children:t?e.jsx("div",{className:"w-5 h-5 border-2 border-white/30 border-t-white rounded-full animate-spin"}):m?e.jsx(je,{className:"h-5 w-5 text-white fill-white"}):e.jsx(se,{className:"h-5 w-5 text-white fill-white ml-0.5"})}),e.jsx("button",{onClick:z,className:"text-white/50 hover:text-white transition-colors",title:"Forward 15s",children:e.jsx(Le,{className:"h-5 w-5"})})]}),e.jsx("div",{className:"w-[88px] sm:w-[104px]"})]})]}):e.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center bg-gradient-to-b from-slate-800 to-slate-900 p-8",children:[e.jsx(J,{className:"h-12 w-12 text-white/10 mb-4"}),e.jsx("p",{className:"text-white/30 text-sm",children:"No audio source available"})]})}function qe({podcastId:x,onClose:g,language:n}){var z;const y=le(),[r,o]=c.useState(null),[N,m]=c.useState(!1),[d,h]=c.useState(null);c.useEffect(()=>{P.auth.me().then(h).catch(()=>h(null))},[]);const s=(d==null?void 0:d.role)==="admin",{data:l,isLoading:p}=$({queryKey:["podcast-detail-modal",x],queryFn:async()=>{const j=(await P.entities.Podcast.list()).find(k=>k.id===x);if(j){try{await P.entities.Podcast.update(x,{views_count:(j.views_count||0)+1})}catch{}return{...j,views_count:(j.views_count||0)+1}}return null},enabled:!!x}),{data:a=[],isLoading:f}=$({queryKey:["podcast-episodes-modal",x],queryFn:()=>P.entities.PodcastEpisode.filter({podcast_id:x,status:"published"},"-episode_number",100),enabled:!!x}),w=n==="en"?l==null?void 0:l.title_en:l==null?void 0:l.title_es,A=n==="en"?l==null?void 0:l.description_en:l==null?void 0:l.description_es,t=r||a[0],L=t==null?void 0:t.audio_file_url,T=(z=t==null?void 0:t.website_url)==null?void 0:z.includes("buzzsprout.com"),v=L?{type:"direct",url:t.audio_file_url}:T?{type:"buzzsprout",url:t.website_url}
41:null,B=!v&&((t==null?void 0:t.youtube_url)||(t==null?void 0:t.spotify_url)),E=t?n==="en"?t.title_en:t.title_es:"",M=t?n==="en"?t.description_en:t.description_es:"",C=n==="en"?{noEpisodes:"No episodes yet",addEpisode:"Add Episode",chat:"Episodes"}:{noEpisodes:"Aún no hay episodios",addEpisode:"Añadir Episodio",chat:"Episodios"};return p?e.jsx("div",{className:"fixed inset-0 bg-black/90 z-[95] flex items-center justify-center",children:e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-[#4A9EFF]"})}):l?e.jsxs("div",{className:"fixed inset-0 bg-black/80 backdrop-blur-sm z-[95] overflow-y-auto",children:[e.jsx("div",{className:"min-h-screen p-2 sm:p-6",children:e.jsxs("div",{className:"max-w-7xl mx-auto",children:[e.jsx("div",{className:"bg-white/5 backdrop-blur-md border border-white/10 rounded-xl shadow-lg mb-4 p-3 sm:p-4",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h1",{className:"text-sm sm:text-lg font-medium text-white truncate",children:w}),e.jsx("p",{className:"text-xs text-white/50 truncate",children:l.host_name})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.jsx("img",{src:"https://media.base44.com/images/public/6906fb0c88dfdc71a85c6f77/94c73395e_Disenosintitulo43.png",alt:"Auditorium",className:"h-8"}),e.jsx("button",{onClick:g,className:"bg-[#E50914] hover:bg-[#b20710] text-white font-bold rounded-full w-8 h-8 flex items-center justify-center",children:e.jsx(te,{className:"h-4 w-4"})})]})]})}),e.jsxs("div",{className:"grid gap-4 grid-cols-1 lg:grid-cols-4",children:[e.jsxs("div",{className:"lg:col-span-3 flex flex-col gap-4",children:[e.jsx("div",{className:"bg-gradient-to-b from-[#0f172a] to-[#1e293b] rounded-2xl overflow-hidden border border-slate-600/30 shadow-2xl",children:e.jsx("div",{className:"aspect-video relative",children:v?e.jsx(Re,{websiteUrl:v.type==="buzzsprout"?v.url:null,audioFileUrl:v.type==="direct"?v.url:null,coverImage:(t==null?void 0:t.cover_image_url)||(l==null?void 0:l.cover_image_url),title:E,subtitle:l==null?void 0:l.host_name},v.url):B?e.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center bg-gradient-to-b from-slate-800 to-slate-900 p-8 gap-4",children:[l.cover_image_url?e.jsx("img",{src:l.cover_image_url,alt:w,className:"w-20 h-20 sm:w-24 sm:h-24 rounded-2xl object-cover shadow-xl opacity-90"}):e.jsx(I,{className:"h-12 w-12 text-white/10"}),e.jsx("p",{className:"text-white/60 text-sm text-center",children:n==="en"?"Listen on:":"Escucha en:"}),e.jsxs("div",{className:"flex flex-wrap justify-center gap-3",children:[(t==null?void 0:t.youtube_url)&&e.jsxs("a",{href:t.youtube_url,target:"_blank",rel:"noopener noreferrer",className:"bg-red-600 hover:bg-red-500 text-white text-sm font-bold px-5 py-3 rounded-xl flex items-center gap-2 transition-colors shadow-lg",children:[e.jsx("svg",{viewBox:"0 0 24 24",className:"h-5 w-5 fill-current",children:e.jsx("path",{d:"M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"})}),"YouTube"]}),(t==null?void 0:t.spotify_url)&&e.jsxs("a",{href:t.spotify_url,target:"_blank",rel:"noopener noreferrer",className:"bg-green-600 hover:bg-green-500 text-white text-sm font-bold px-5 py-3 rounded-xl flex items-center gap-2 transition-colors shadow-lg",children:[e.jsx("svg",{viewBox:"0 0 24 24",className:"h-5 w-5 fill-current",children:e.jsx("path",{d:"M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z"})}),"Spotify"]}),(t==null?void 0:t.apple_podcasts_url)&&e.jsxs("a",{href:t.apple_podcasts_url,target:"_blank",rel:"noopener noreferrer",className:"bg-purple-600 hover:bg-purple-500 text-white text-sm font-bold px-5 py-3 rounded-xl flex items-center gap-2 transition-colors shadow-lg",children:[e.jsx("svg",{viewBox:"0 0 24 24",className:"h-5 w-5 fill-current",children:e.jsx("path",{d:"M12 0C8.8 0 5.7 1.3 3.3 3.3 1.3 5.3 0 8.4 0 11.6c0 4.2 2.3 7.9 5.9 9.8.4.2.8.1 1-.3.2-.4.1-.8-.3-1-3-1.7-5-4.9-5-8.5 0-5.3 4.3-9.6 9.6-9.6 5.3 0 9.6 4.3 9.6 9.6 0 3.5-1.9 6.7-4.9 8.4-.4.2-.5.7-.3 1.1.2.4.7.5 1.1.3 3.3-1.9 5.5-5.3 5.5-9.2 0-3.2-1.3-6.3-3.3-8.3C18.3 1.3 15.2 0 12 0zM12 8c-2.2 0-4 1.8-4 4 0 1.7 1.1 3.1 2.6 3.7.2.1.4.1.6.1.4 0 .8-.3.8-.7v-2.5c.7-.3 1.2-1 1.2-1.9 0-1.1-.9-2-2-2s-2 .9-2 2c0 .9.5 1.7 1.2 2v1.9c-1.2-.8-2-2.2-1.7-3.7.2-1.1 1-2 2.1-2.3 1.9-.5 3.6 1 3.6 2.8 0 1-.5 1.9-1.2 2.4V17c0 .4.3.7.8.7h.1c1.5-.6 2.5-2 2.5-3.7 0-2.2-1.8-4-4-4z"})}),"Apple Podcasts"]})]})]}):e.jsxs("div",{className:"w-full h-full flex items-center justify-center bg-slate-900",children:[l.cover_image_url?e.jsx("img",{src:l.cover_image_url,alt:w,className:"w-full h-full object-cover opacity-50"}):e.jsxs("div",{className:"text-center",children:[e.jsx(I,{className:"h-16 w-16 text-white/20 mx-auto mb-2"}),e.jsx("p",{className:"text-white/40 text-sm",children:n==="en"?"Select an episode to play":"Selecciona un episodio para reproducir"})]}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 to-transparent"})]})})}),e.jsxs("div",{className:"bg-gradient-to-br from-slate-800/90 to-slate-900/90 rounded-2xl p-4 border border-slate-600/30",children:[e.jsx("h3",{className:"text-lg font-bold text-white mb-1.5",children:E||w}),e.jsx("p",{className:"text-white/70 mb-2 text-sm line-clamp-2",children:M||A}),e.jsxs("div",{className:"flex items-center gap-4 text-xs text-white/50",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(ae,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:l.host_name})]}),(t==null?void 0:t.duration_minutes)&&e.jsxs("div",{children:[t.duration_minutes," min"]}),(t==null?void 0:t.episode_number)&&e.jsxs("div",{children:["#",t.episode_number]})]})]})]}),e.jsx("div",{className:"lg:col-span-1 flex flex-col gap-4 h-[50vh] sm:h-[60vh] lg:h-[c
41alc(100vh-200px)]",children:e.jsxs("div",{className:"bg-gradient-to-br from-slate-800/90 to-slate-900/90 rounded-2xl border border-slate-600/30 flex flex-col flex-1 overflow-hidden",children:[e.jsxs("div",{className:"p-4 border-b border-white/10 flex items-center justify-between",children:[e.jsxs("h3",{className:"text-base font-bold text-white flex items-center gap-2",children:[e.jsx(W,{className:"h-4 w-4"}),C.chat," (",a.length,")"]}),s&&e.jsxs("button",{onClick:()=>m(!0),className:"bg-[#4A9EFF] hover:bg-[#3B8EEF] text-white text-xs font-bold px-3 py-1.5 rounded-lg flex items-center gap-1",children:[e.jsx(re,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"hidden sm:inline",children:C.addEpisode})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-3 space-y-2",children:f?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-[#4A9EFF]"})}):a.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx(W,{className:"h-10 w-10 mx-auto mb-2 text-white/10"}),e.jsx("p",{className:"text-white/40 text-sm",children:C.noEpisodes})]}):e.jsx(ne,{children:a.map(u=>{var S;const j=n==="en"?u.title_en:u.title_es,k=(r==null?void 0:r.id)===u.id||!r&&u.id===((S=a[0])==null?void 0:S.id);return e.jsx(ee.button,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},onClick:()=>o(u),className:`w-full text-left p-3 rounded-lg transition-all group ${k?"bg-[#4A9EFF]/20 border border-[#4A9EFF]/30":"bg-white/5 border border-white/5 hover:bg-white/10 hover:border-white/10"}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"flex-shrink-0 w-14 h-14 rounded-lg overflow-hidden bg-slate-700",children:u.cover_image_url?e.jsx("img",{src:u.cover_image_url,alt:j,className:"w-full h-full object-cover"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center",children:e.jsx(se,{className:"h-5 w-5 text-white/30"})})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[u.episode_number&&e.jsxs("span",{className:"text-[10px] font-bold text-[#4A9EFF]",children:["#",u.episode_number]}),u.is_featured&&e.jsx(oe,{className:"h-3 w-3 text-yellow-500 fill-yellow-500"})]}),e.jsx("p",{className:"text-white text-sm font-medium line-clamp-1",children:j}),e.jsxs("div",{className:"flex items-center gap-2 mt-1 text-[10px] text-white/40",children:[u.duration_minutes&&e.jsxs("span",{className:"flex items-center gap-0.5",children:[e.jsx(ye,{className:"h-2.5 w-2.5"})," ",u.duration_minutes,"m"]}),u.published_date&&e.jsxs("span",{className:"flex items-center gap-0.5",children:[e.jsx(ce,{className:"h-2.5 w-2.5"}),new Date(u.published_date).toLocaleDateString(n==="en"?"en-US":"es-ES",{month:"short",day:"numeric"})]})]})]}),e.jsx(de,{className:`h-4 w-4 flex-shrink-0 mt-2 transition-all ${k?"text-[#4A9EFF]":"text-white/20 group-hover:text-white/50"}`})]})},u.id)})})})]})})]})]})}),N&&s&&e.jsx(Be,{podcastId:x,onClose:()=>m(!1),onSuccess:()=>{y.invalidateQueries(["podcast-episodes-modal",x]),m(!1)},language:n})]}):e.jsx("div",{className:"fixed inset-0 bg-black/90 z-[95] flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-[#1e293b] rounded-xl p-8 text-center max-w-md",children:[e.jsx(I,{className:"h-16 w-16 mx-auto mb-4 text-white/20"}),e.jsx("h2",{className:"text-xl font-bold text-white mb-2",children:n==="en"?"Podcast not found":"Podcast no encontrado"}),e.jsx("button",{onClick:g,className:"bg-[#E50914] text-white px-6 py-2 rounded-lg font-bold",children:n==="en"?"Close":"Cerrar"})]})})}function tt({routeLanguage:x}){const{language:g}=ue(),n=x||g,y=me(),[r,o]=c.useState(!0),m=new URLSearchParams(y.search).get("id"),{slug:d}=xe(),{setSEO:h}=he()||{},{data:s,isLoading:l}=$({queryKey:["podcast-detail",m||`slug:${d}`],queryFn:async()=>{const a=await P.entities.Podcast.list();return m?a.find(f=>f.id===m)||null:d&&a.find(f=>K(f.title_es)===d||K(f.title_en)===d)||null},enabled:!!(m||d)}),p=m||(s==null?void 0:s.id);return c.useEffect(()=>{h&&!s&&h({title:n==="en"?"Industry Podcast - Paper, Corrugated Board & Packaging | The Paper.AI":"Podcast de la Industria - Papel, Cartón Corrugado y Embalaje | The Paper.AI",description:n==="en"?"Listen to expert podcasts about the paper, corrugated board and packaging industry. Trends, interviews and market insights on The Paper.AI.":"Escucha podcasts de expertos sobre la industria del papel, cartón corrugado y embalaje. Tendencias, entrevistas y análisis de mercado en The Paper.AI."})},[h,n,s]),c.useEffect(()=>{if(h&&s){const a=n==="en"?s.title_en:s.title_es,f=n==="en"?s.description_en:s.description_es,w=f||(n==="en"?`${a} - Industry podcast about paper, corrugated board and packaging hosted by ${s.host_name||"industry experts"}`:`${a} - Podcast de la industria sobre papel, cartón corrugado y embalaje presentado por ${s.host_name||"expertos del sector"}`);h({title:a?`${a} - Industry Podcast | The Paper.AI`:null,description:w,image:s.cover_image_url,structuredData:{"@context":"https://schema.org","@type":"PodcastSeries",name:a,description:f,image:s.cover_image_url,url:window.location.href,author:{"@type":"Person",name:s.host_name},publisher:{"@type":"Organization",name:"The Paper.AI"}}})}},[s==null?void 0:s.id,n,h]),c.useEffect(()=>{!m&&!d&&o(!1)},[m,d]),!m&&!d?e.jsx("div",{className:"min-h-screen bg-gradient-to-b from-gray-50 to-white flex items-center justify-center p-4",children:e.jsx(be,{className:"max-w-md w-full",children:e.jsxs(we,{className:"p-8 text-center",children:[e.jsx(ae,{className:"h-16 w-16 mx-auto mb-4 text-gray-400"}),e.jsx("h2",{className:"text-xl font-bold text-gray-900 mb-2",children:n==="en"?"No podcast selected":"No se seleccionó podcast"}),e.jsx(H,{to:O("Podcasts"),children:e.jsx(Y,{className:"bg-purple-600 hover:bg-purple-700",children:n==="en"?"Browse Podcasts":"Explorar Podcasts"})})]})})}):e.jsxs(pe,{children:[e.jsx(fe,{}),e.jsx(Ne,{pathEs:X(s,"es"),pathEn:X(s,"en")}),e.jsx("div",{className:"min-h-screen bg-[#141414]",children:l?e.jsx("div",{className:"flex items-center justify-center py-32",children:e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-[#4A9EFF]"})}):e.jsx("div",{className:"w-full max-w-[1200px] mx-auto px-4 sm:px-6 py-10",children:e.jsx(H,{to:O("Podcasts"),children:e.jsxs(Y,{variant:"ghost",size:"sm",className:"text-white/50 hover:text-white mb-6",children:[e.jsx(_e,{className:"h-4 w-4 mr-2"}),n==="en"?"Back to Podcasts":"Volver a Podcasts"]})})})}),r&&p&&e.jsx(qe,{podcastId:p,onClose:()=>{o(!1),window.history.back()},language:n})]})}export{tt 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.