PageSourceSearch

https://studio.firstory.me/assets/index-DNUQDAk2.js

js firstory.me collected 2026-10-01 09:22:20 UTC 28,387 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MarkMap-DWGCdCtk.js","assets/react-vendor-BGQ-fvu8.js","assets/index-M8ieJTCO.js","assets/charts-vendor-fU6IkEZ_.js","assets/lodash-vendor-0cI-KiNp.js","assets/main-BjGN4ckN.js","assets/apollo-vendor-WdUFfbxi.js","assets/main-BZaURQke.css","assets/episode-extracts-lWzlQSkh.js","assets/list-B1zVQFXM.js","assets/useConnectionPage-BTbbEfwS.js","assets/popover-0Z-4IRr6.js","assets/chevron-left-5-Gg-yzc.js","assets/useForm-B9SS0o31.js","assets/form-vendor-0hBSyWfc.js","assets/button-group-BJMhmbJF.js","assets/checkbox-CLy4ehUu.js","assets/useValueChanged-CApZTwHC.js","assets/editor-vendor-BUwO_Joe.js","assets/switch-BTo2ktPD.js","assets/textarea-BvmO5uxP.js","assets/eye-Bbl7GlPX.js","assets/radio-group-C_7LLUci.js","assets/useForm-DZylwh60.css","assets/download-file-Cvh8-FWX.js","assets/ExtractionCard-B068RyP3.js","assets/UpgradeButton-DMEJ93k3.js","assets/tag-a1FYt1LX.js","assets/useFeatureUsage-BA9zAMJc.js","assets/EpisodeNumber-xuwCZniL.js","assets/layers-B8SOUsLx.js","assets/AlbumCover-BZIy8u7L.js","assets/GoBackButton-EkK7A2nF.js","assets/MoreMenu-B-vo6WuA.js","assets/DataTable-QKvIPynO.js","assets/table-CFsjfTm-.js","assets/index-Q4xRmGO5.js","assets/PublishedAtDisplay-CnfYAmxe.js","assets/SearchBar-COWg7hS_.js","assets/ConfigurableTab-Biy8-gEf.js"])))=>i.map(i=>d[i]);
2import{a as m,j as e}from"./react-vendor-BGQ-fvu8.js";import{h as K,o as v,q as Ne,bg as ke,bh as Ee,w as q,S as Me,B as le,bj as Se,bk as de,bS as Ce,ai as S,C as Y,cF as Te,bO as Ae,cf as Z,fQ as ue,aH as pe,dt as ze,T as me,x as xe,y as fe,Y as C,i as Oe,b3 as Re,b4 as Ie,ay as Fe,D as P,g7 as Pe,b6 as Ue,b7 as Le,ap as Be,aq as De,ar as qe,as as We,bB as $e,E as G,R as X,L as he,Q as Ve,M as y,br as He,at as Qe,fB as Ge,k as Je,ao as Ke,ak as ee,al as N}from"./main-BjGN4ckN.js";import{a as Ye,b as Ze,c as Xe}from"./episode-extracts-lWzlQSkh.js";import{d as es}from"./download-file-Cvh8-FWX.js";import{D as ss}from"./useConnectionPage-BTbbEfwS.js";import{i as ts,E as rs}from"./ExtractionCard-B068RyP3.js";import{T as ge}from"./tag-a1FYt1LX.js";import{L as as,Q as _e}from"./useForm-B9SS0o31.js";import{u as ns}from"./useFeatureUsage-BA9zAMJc.js";import{a as W,E as is,b as os,D as cs,c as ls}from"./EpisodeNumber-xuwCZniL.js";import{L as ds}from"./layers-B8SOUsLx.js";import{A as be}from"./AlbumCover-BZIy8u7L.js";import{G as us}from"./GoBackButton-EkK7A2nF.js";import{M as ps}from"./MoreMenu-B-vo6WuA.js";import{D as ms,c as xs}from"./DataTable-QKvIPynO.js";import{P as fs}from"./PublishedAtDisplay-CnfYAmxe.js";import{S as hs}from"./SearchBar-COWg7hS_.js";import{d as gs}from"./list-B1zVQFXM.js";import{C as _s}from"./ConfigurableTab-Biy8-gEf.js";const bs=[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]],je=K("arrow-left-right",bs);const js=[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]],ws=K("list-tree",js);const ys=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],vs=K("network",ys);function Ns({episodeId:t,episodeExtractId:s}){const[r,n]=m.useState(!1),a=v(),{showRawSnackbarMessage:i}=Ne(),{mutate:o,loading:l,error:u}=Ye(),d=[{label:a.formatMessage({id:"ai.episodeExtracts.export.exportCsv"}),value:"csv"},{label:a.formatMessage({id:"ai.episodeExtracts.export.exportSrt"}),value:"srt"},{label:a.formatMessage({id:"ai.episodeExtracts.export.exportMd"}),value:"markdown"}],p=async h=>{const f=await o({episodeExtractId:s,format:h});f&&(es(f.blob,`episode-${t.slice(0,6)}.${h}`,f.mime?f.mime:"application/octet-stream"),n(!1))};return m.useEffect(()=>{u&&(i(u??"Something error",{variant:"error",vertical:"top",horizontal:"center"}),n(!1))},[u,i]),e.jsxs(ke,{open:r,onOpenChange:n,children:[e.jsxs(Ee,{render:e.jsx(le,{variant:"outline",className:q("relative px-3 py-1.5 shadow-sm",l&&"pointer-events-none")}
2),children:[e.jsx(ss,{className:"mr-2 translate-y-px text-foreground"}),e.jsx("span",{className:q(l&&"opacity-25"),children:a.formatMessage({id:"ai.episodeExtracts.export.exportExtracts"})}),l&&e.jsx("div",{className:"absolute top-1/2 left-1/2 flex -translate-x-1/2 -translate-y-1/2 items-center",children:e.jsx(Me,{className:"size-5 text-foreground"})})]}),e.jsx(Se,{align:"end",className:"min-w-40",children:d.map(h=>e.jsx(de,{onClick:()=>{p(h.value)},className:q(l&&"pointer-events-none opacity-50"),children:h.label},h.value))})]})}function ks(t){const s=v();return e.jsx("div",{className:"relative mx-auto max-w-[800px] rounded-lg border bg-error py-4",children:e.jsxs("div",{className:"flex flex-col items-center gap-4 px-4 md:px-6",children:[e.jsx("div",{className:"flex size-12 items-center justify-center rounded-full bg-error-foreground/10",children:e.jsx(Ce,{className:"size-6 text-error-foreground"})}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("span",{className:"font-semibold text-error-foreground",children:s.formatMessage({id:"ai.episodeExtracts.failed"})}),e.jsx("p",{className:"max-w-[300px] text-sm text-muted-foreground",children:s.formatMessage({id:"ai.episodeExtracts.failed.description"})}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["ID: ",t.id]})]})]})})}function Es(t){if(!t.data)return null;const{data:s}=t;return e.jsx("div",{className:"flex flex-col gap-4",children:s.map((r,n)=>e.jsx(S,{className:"p-4 md:p-6",children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("h6",{className:"flex items-center gap-3 text-lg font-bold",children:[e.jsx(ge,{className:"size-6 text-primary"}),r.key]}),e.jsx("p",{className:"ml-9 text-base",children:r.desc})]})},n))})}const Ms=m.lazy(()=>Te(()=>import("./MarkMap-DWGCdCtk.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39])).then(t=>({default:t.MarkMap})));function Ss(t){return t.data?e.jsx(m.Suspense,{fallback:e.jsx(Y,{}),children:e.jsx(Ms,{value:t.data})}):null}function $({Icon:t,titleId:s,children:r}){const n=v();return e.jsxs("div",{className:"rounded-lg bg-info p-4 md:p-6",children:[e.jsxs("h6",{className:"mb-3 flex items-center gap-3 text-base font-bold",children:[e.jsx(t,{className:"size-6 text-info-foreground"}),n.formatMessage({id:s})]}),r]})}function V({children:t}){return e.jsx(S,{variant:"outlined",className:"px-4 py-3 md:px-6 md:py-4",children:t})}function Cs(t){if(!t.takeaways||!t.summary||!t.outlines)return null;const{takeaways:s,outlines:r,summary:n}=t;return e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx($,{Icon:Ae,titleId:"ai.episodeExtracts.summary",children:e.jsx(V,{children:e.jsx("p",{className:"text-base",children:n})})}),e.jsx($,{Icon:as,titleId:"ai.episodeExtracts.takeaways",children:e.jsx("div",{className:"flex flex-col gap-3",children:s.map((a,i)=>e.jsx(V,{children:e.jsxs("div",{className:"flex flex-row items-center gap-3",children:[e.jsx("div",{className:"grid size-6 place-content-center",children:e.jsx("div",{className:"size-2 rounded-full bg-info-foreground"})}),e.jsx("p",{className:"text-base",children:a})]})},i))})}),e.jsx($,{Icon:ws,titleId:"ai.episodeExtracts.outlines",children:e.jsx("div",{className:"flex flex-col gap-3",children:r.map((a,i)=>e.jsxs(V,{children:[e.jsxs("div",{className:"mb-3 flex items-center gap-1",children:[e.jsx(Z,{className:"size-4 text-info-foreground"}),e.jsx("span",{className:"text-xs",children:a.time})]}),e.jsx("h6",{className:"mb-3 text-base",children:a.title}),e.jsx("p",{className:"text-base text-muted-foreground",children:a.summary})]},i))})})]})}function Ts(t){if(!t.data)return null;const{data:s}=t;return e.jsx("div",{className:"flex flex-col gap-4",children:s.map((r,n)=>e.jsx(S,{className:"p-4 md:p-6",children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("h6",{className:"flex items-center gap-3 text-lg font-bold",children:[e.jsx(ue,{className:"size-6 text-primary"}),r.question]}),e.jsx("p",{className:"ml-9 text-base",children:r.answer})]})}
2,n))})}function As(t){if(!t.data)return null;const{data:s}=t;return e.jsx("div",{className:"flex flex-col gap-6",children:s.map((r,n)=>e.jsxs(S,{className:"p-4 md:p-6",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(_e,{className:"size-6 shrink-0 text-primary"}),e.jsx("p",{className:"text-base",children:r.content})]}),e.jsxs("div",{className:"ml-6",children:[e.jsx("div",{className:"py-3",children:e.jsx(pe,{})}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Z,{className:"size-4 text-primary"}),e.jsx("span",{className:"text-sm",children:r.time})]})]})]},n))})}function zs(t,s){const r=[];let n=[],a=0;for(const i of t){const o=i.content.length;a+o>s&&n.length>0&&(r.push({time:n[0].time,transcripts:n}),n=[],a=0),n.push(i),a+=o}return n.length>0&&r.push({time:n[0].time,transcripts:n}),r}function Os(t){const s=[];let r=[],n="";for(const a of t)a.speaker!==n&&(r.length>0&&s.push(r),r=[]),r.push(a),n=a.speaker;return r.length>0&&s.push(r),s}function Rs(t){return Os(t).map(r=>{const n=r[0].speaker,a=zs(r,200);return{speaker:n,segments:a}})}function Is(t){const s=["#0066cc","#996633","#009933","#9933cc","#cc3366","#007a99","#ff6600","#e30000","#3366ff","#669900"],r=(a,i)=>{const o=a.match(/(\d+)/);return o?`S${o[1]}`:`S${i+1}`},n={};return t.forEach((a,i)=>{n[a]={color:s[i%s.length],label:r(a,i)}}),n}function Fs(t){const s=m.useRef(null),r=m.useMemo(()=>{if(!t.data)return;const n=Rs(t.data),a=new Set;n.forEach(o=>{a.add(o.speaker)});const i=Is(Array.from(a));return s.current=i,n.map(o=>({segments:o.segments,speaker:o.speaker,avatar:i[o.speaker]}))},[t.data]);return t.data?e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"flex flex-col gap-4 roun
2ded-lg border border-border bg-card/70 p-4 shadow-sm",children:s.current&&e.jsx("div",{className:"flex flex-row flex-wrap gap-3",children:Object.entries(s.current).map(([n,a])=>e.jsxs("div",{className:"flex flex-row items-center gap-2 rounded-full px-4 py-2 text-nowrap",style:{backgroundColor:`${a.color}1A`},children:[e.jsx("div",{className:"flex size-6 items-center justify-center rounded-full text-xs font-bold",style:{backgroundColor:a.color,color:"white"},children:a.label}),e.jsx("span",{className:"text-sm",children:n})]},n))})}),r?.map((n,a)=>e.jsxs("div",{className:"flex flex-col items-start gap-2 rounded-lg border border-border bg-card px-4 py-3 shadow-sm md:px-6 md:py-4",children:[e.jsxs("div",{className:"flex flex-row items-center gap-2",children:[e.jsx("div",{className:"flex size-9 items-center justify-center rounded-full text-xs font-bold",style:{backgroundColor:n.avatar.color,color:"white"},children:n.avatar.label}),e.jsx("span",{className:"text-sm font-bold",children:n.speaker}),e.jsx("span",{children:n.segments[0].time})]}),e.jsx("div",{className:"flex w-full flex-col gap-6 pl-3",children:n.segments.map((i,o)=>e.jsx(Ps,{transcript:i.transcripts,time:i.time,color:n.avatar.color,showTime:o!==0},`${a}-${o}`))})]},a))]}):null}function Ps({transcript:t,color:s,time:r,showTime:n=!0}){return e.jsxs("div",{className:"flex flex-col gap-2 rounded-lg bg-card",children:[n&&e.jsxs("div",{className:"flex flex-row items-center gap-2",children:[e.jsx(Z,{className:"size-4 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:r})]}),e.jsxs("div",{className:"flex flex-row gap-6 pl-1",children:[e.jsx(pe,{orientation:"vertical",className:"w-1 self-stretch",style:{backgroundColor:s??"var(--border)"}}),e.jsx("div",{children:t.map((a,i)=>e.jsx(Us,{transcript:a},i))})]})]})}function Us({transcript:t}){const[s,r]=m.useState(!1),[n,a]=m.useState(!1),i=m.useRef(-1),o=m.useRef(!1),l=v(),u=m.useCallback(()=>{window.clearTimeout(i.current),r(!0),o.current=!0,a(!0),navigator.clipboard&&navigator.clipboard.writeText(t.content),i.current=window.setTimeout(()=>{o.current=!1,a(!1),setTimeout(()=>{r(!1)},100)},1500)},[t.content]),d=m.useCallback(p=>{!p&&o.current||a(p)},[]);return m.useEffect(()=>()=>{window.clearTimeout(i.current)},[]),e.jsx(ze,{children:e.jsxs(me,{open:n,onOpenChange:d,children:[e.jsx(xe,{render:e.jsx(we,{onClick:u}),children:t.content}),e.jsx(fe,{side:"top",children:s?l.formatMessage({id:"general.copied"}):t.time})]})})}const we=m.forwardRef(({children:t,onClick:s},r)=>e.jsxs("span",{ref:r,className:"group relative inline-block text-base hover:cursor-pointer",onClick:s,children:[e.jsx("span",{className:"absolute -inset-0.5 scale-95 rounded bg-accent opacity-0 transition-all group-hover:scale-100 group-hover:opacity-100"}),e.jsx("span",{className:"relative z-10",children:t})]}));we.displayName="TranscriptContent";let c;const _=new Array(32).fill(void 0);_.push(void 0,null,!0,!1);function E(t){return _[t]}const ye=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});ye.decode();let R=null;function k(){return(R===null||R.buffer!==c.memory.buffer)&&(R=new Uint8Array(c.memory.buffer)),R}function I(t,s){return ye.decode(k().subarray(t,t+s))}let M=_.length;function H(t){M===_.length&&_.push(_.length+1);const s=M;return M=_[s],_[s]=t,s}let j=0;const U=new TextEncoder("utf-8"),Ls=typeof U.encodeInto=="function"?function(t,s){return U.encodeInto(t,s)}:function(t,s){const r=U.encode(t);return s.set(r),{read:t.length,written:r.length}};function oe(t,s,r){if(r===void 0){const l=U.encode(t),u=s(l.length);return k().subarray(u,u+l.length).set(l),j=l.length,u}let n=t.length,a=s(n);const i=k();let o=0;for(;o<n;o++){const l=t.charCodeAt(o);if(l>127)break;i[a+o]=l}if(o!==n){o!==0&&(t=t.slice(o)),a=r(a,n,n=o+t.length*3);const l=k().subarray(a+o,a+n),u=Ls(t,l);o+=u.written}return j=o,a}let F=null;function x(){return(F===null||F.buffer!==c.memory.buffer)&&(F=new Int32Array(c.memory.buffer)),F}function Bs(t){t<36||(_[t]=M,M=t)}function T(t){const s=E(t);return Bs(t),s}function A(t,s){const r=s(t.length*1);return k().set(t,r/1),j=t.length,r}let L=32;function Ds(t){if(L==1)throw new Error("out of js stack");return _[--L]=t,L}function se(t,s){return k().subarray(t/1,t/1+s)}function qs(t,s){try{const l=c.__wbindgen_add_to_stack_pointer(-16),u=A(t,c.__wbindgen_malloc),d=j;c.compress(l,u,d,Ds(s));var r=x()[l/4+0],n=x()[l/4+1],a=x()[l/4+2],i=x()[l/4+3];if(i)throw T(a);var o=se(r,n).slice();return c.__wbindgen_free(r,n*1),o}finally{c.__wbindgen_add_to_stack_pointer(16),_[L++]=void 0}}function Ws(t){try{const o=c.__wbindgen_add_to_stack_pointer(-16),l=A(t,c.__wbindgen_malloc),u=j;c.decompress(o,l,u);var s=x()[o/4+0],r=x()[o/4+1],n=x()[o/4+2],a=x()[o/4+3];if(a)throw T(n);var i=se(s,r).slice();return c.__wbindgen_free(s,r*1),i}finally{c.__wbindgen_add_to_stack_pointer(16)}}function Q(t){return t==null}const $s=Object.freeze({ResultSuccess:1,1:"ResultSuccess",NeedsMoreInput:2,2:"NeedsMoreInput",NeedsMoreOutput:3,3:"NeedsMoreOutput"});class z{static __wrap(s){const r=Object.create(z.prototype);return r.ptr=s,r}__destroy_into_raw(){const s=this.ptr;return this.ptr=0,s}free(){const s=this.__destroy_into_raw();c.__wbg_brotlistreamresult_free(s)}
2get code(){return c.__wbg_get_brotlistreamresult_code(this.ptr)>>>0}set code(s){c.__wbg_set_brotlistreamresult_code(this.ptr,s)}get buf(){try{const a=c.__wbindgen_add_to_stack_pointer(-16);c.__wbg_get_brotlistreamresult_buf(a,this.ptr);var s=x()[a/4+0],r=x()[a/4+1],n=se(s,r).slice();return c.__wbindgen_free(s,r*1),n}finally{c.__wbindgen_add_to_stack_pointer(16)}}set buf(s){const r=A(s,c.__wbindgen_malloc),n=j;c.__wbg_set_brotlistreamresult_buf(this.ptr,r,n)}get input_offset(){return c.__wbg_get_brotlistreamresult_input_offset(this.ptr)>>>0}set input_offset(s){c.__wbg_set_brotlistreamresult_input_offset(this.ptr,s)}}class B{static __wrap(s){const r=Object.create(B.prototype);return r.ptr=s,r}__destroy_into_raw(){const s=this.ptr;return this.ptr=0,s}free(){const s=this.__destroy_into_raw();c.__wbg_compressstream_free(s)}constructor(s){const r=c.compressstream_new(!Q(s),Q(s)?0:s);return B.__wrap(r)}compress(s,r){try{const u=c.__wbindgen_add_to_stack_pointer(-16);var n=Q(s)?0:A(s,c.__wbindgen_malloc),a=j;c.compressstream_compress(u,this.ptr,n,a,r);var i=x()[u/4+0],o=x()[u/4+1],l=x()[u/4+2];if(l)throw T(o);return z.__wrap(i)}finally{c.__wbindgen_add_to_stack_pointer(16)}}total_out(){return c.compressstream_total_out(this.ptr)>>>0}}class D{static __wrap(s){const r=Object.create(D.prototype);return r.ptr=s,r}__destroy_into_raw(){const s=this.ptr;return this.ptr=0,s}free(){const s=this.__destroy_into_raw();c.__wbg_decompressstream_free(s)}constructor(){const s=c.decompressstream_new();return D.__wrap(s)}decompress(s,r){try{const o=c.__wbindgen_add_to_stack_pointer(-16),l=A(s,c.__wbindgen_malloc),u=j;c.decompressstream_decompress(o,this.ptr,l,u,r);var n=x()[o/4+0],a=x()[o/4+1],i=x()[o/4+2];if(i)throw T(a);return z.__wrap(n)}finally{c.__wbindgen_add_to_stack_pointer(16)}}total_out(){return c.decompressstream_total_out(this.ptr)>>>0}}async function Vs(t,s){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,s)}catch(n){if(t.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",n);else throw n}const r=await t.arrayBuffer();return await WebAssembly.instantiate(r,s)}else{const r=await WebAssembly.instantiate(t,s);return r instanceof WebAssembly.Instance?{instance:r,module:t}:r}}async function te(t){typeof t>"u"&&(t=new URL("/assets/brotli_wasm_bg-NfWIZley.wasm",import.meta.url));const s={};s.wbg={},s.wbg.__wbindgen_is_undefined=function(a){return E(a)===void 0},s.wbg.__wbindgen_is_object=function(a){const i=E(a);return typeof i=="object"&&i!==null},s.wbg.__wbindgen_string_new=function(a,i){const o=I(a,i);return H(o)},s.wbg.__wbindgen_error_new=function(a,i){const o=new Error(I(a,i));return H(o)},s.wbg.__wbindgen_json_serialize=function(a,i){const o=E(i),l=JSON.stringify(o===void 0?null:o),u=oe(l,c.__wbindgen_malloc,c.__wbindgen_realloc),d=j;x()[a/4+1]=d,x()[a/4+0]=u},s.wbg.__wbg_new_693216e109162396=function(){const a=new Error;return H(a)},s.wbg.__wbg_stack_0ddaca5d1abfb52f=function(a,i){const o=E(i).stack,l=oe(o,c.__wbindgen_malloc,c.__wbindgen_realloc),u=j;x()[a/4+1]=u,x()[a/4+0]=l},s.wbg.__wbg_error_09919627ac0992f5=function(a,i){try{console.error(I(a,i))}finally{c.__wbindgen_free(a,i)}},s.wbg.__wbindgen_object_drop_ref=function(a){T(a)},s.wbg.__wbindgen_throw=function(a,i){throw new Error(I(a,i))},(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));const{instance:r,module:n}=await Vs(await t,s);
2return c=r.exports,te.__wbindgen_wasm_module=n,c}const Hs=Object.freeze(Object.defineProperty({__proto__:null,BrotliStreamResult:z,BrotliStreamResultCode:$s,CompressStream:B,DecompressStream:D,compress:qs,decompress:Ws,default:te},Symbol.toStringTag,{value:"Module"})),Qs=te().then(()=>Hs),Gs=await Qs;var J;(t=>{function s(r){const n=new TextDecoder,a=Uint8Array.from(atob(r),i=>i.charCodeAt(0));return n.decode(Gs.decompress(a))}t.decompress=s})(J||(J={}));function Js(t){const[s,r]=m.useState("0"),n=v(),a=C(),i=Oe(),o=Re(),l=Ie(),{loading:u,permission:d}=Fe({type:P.User.Feature.aiEpisodeExtract}),p=Ze(),h=ns(P.User.Feature.aiEpisodeExtract),{episodeExtracts:f,usage:b}=t,g=m.useMemo(()=>{if(!f?.data)return null;const w=J.decompress(f.data);return JSON.parse(w)},[f?.data]),re=[{id:"0",label:e.jsxs("div",{className:"flex flex-row items-center gap-2",children:[e.jsx(ds,{}),e.jsx("span",{className:"text-sm",children:n.formatMessage({id:"ai.episodeExtracts.overview"})})]}),component:e.jsx(Cs,{summary:g?.summary,takeaways:g?.takeaways,outlines:g?.chapters})},{id:"1",label:e.jsxs("div",{className:"flex flex-row items-center gap-2",children:[e.jsx(vs,{}),e.jsx("span",{className:"text-sm",children:n.formatMessage({id:"ai.episodeExtracts.mindmap"})})]}),component:e.jsx(Ss,{data:g?.mindmap})},{id:"2",label:e.jsxs("div",{className:"flex flex-row items-center gap-2",children:[e.jsx(Pe,{}),e.jsx("span",{className:"text-sm",children:n.formatMessage({id:"ai.episodeExtracts.transcripts"})})]}),component:e.jsx(Fs,{data:g?.transcripts})},{id:"3",label:e.jsxs("div",{className:"flex flex-row items-center gap-2",children:[e.jsx(ue,{}),e.jsx("span",{className:"text-sm",children:n.formatMessage({id:"ai.episodeExtracts.qa"})})]}),component:e.jsx(Ts,{data:g?.qas})},{id:"4",label:e.jsxs("div",{className:"flex flex-row items-center gap-2",children:[e.jsx(ge,{}),e.jsx("span",{className:"text-sm",children:n.formatMessage({id:"ai.episodeExtracts.keywords"})})]}),component:e.jsx(Es,{data:g?.keywords})},{id:"5",label:e.jsxs("div",{className:"flex flex-row items-center gap-2",children:[e.jsx(_e,{}),e.jsx("span",{className:"text-sm",children:n.formatMessage({id:"ai.episodeExtracts.highlights"})})]}),component:e.jsx(As,{data:g?.highlights})}],ae=f?.status===W.Pending||f?.status===W.Processing,ne=f?.status===W.Error,ie=Ue({feature:P.User.Feature.aiEpisodeExtract,surface:o,currentPlan:d.subscriptionType,quota:{current:b?.count??0,limit:b?.limit??0}}),ve=!ne&&!g&&!ae&&ts(b);return Le(!u&&ve?ie:null),e.jsx("div",{className:"w-full",children:e.jsxs(Be,{value:s,onValueChange:r,className:"w-full",children:[e.jsxs("div",{className:"mb-4 flex flex-row flex-wrap items-center justify-between gap-2 overflow-y-auto",children:[e.jsx(De,{variant:"line",className:"pb-2",children:re.map(w=>e.jsx(qe,{value:w.id,children:w.label},w.id))}),f&&g&&e.jsx("div",{className:"pb-2",children:e.jsx(Ns,{episodeId:t.episodeId,episodeExtractId:f.id})})]}),re.map(w=>{let O;return ne?O=e.jsx(ks,{id:f.id}):g?O=w.component:O=e.jsx(rs,{isProcessing:ae,totalCredits:b?.limit??0,usedCredits:b?.count??0,onUnlock:async()=>{await p(t.episodeId),h({action:"request_extracts"})},onUpgrade:()=>{a.push("/account/subscription/plans"),i.clickUpgradeButton({ga:{label:"AI"}}),l(ie)}}),e.jsx(We,{value:w.id,children:O},w.id)})]})})}function Ks(){const{id:t}=$e(),{data:s,loading:r}=Xe({episodeId:t}),n=v(),a=C();if(r||!s)return e.jsx(G,{children:e.jsx(Y,{})});const i=s.studioEpisodeFindOne;if(!i)return e.jsx(X,{to:"/ai-studio/episodes"});if(!i.audioUrl)return a.push(`/episodes/${i.id}/info`),null;const o=s.studioShowFindOne,l=!i.publishedAt&&(!i?.setting?.publishMode||i?.setting?.publishMode===P.Episode.PublishMode.draft),u=!!i.appleSetting?.enabled,d=!!(i.entitlements&&i.entitlements.length>0),p=i.entitlements?.flatMap(h=>h.tier?[h.tier.title]:[])||[];return e.jsxs(G,{children:[e.jsx("div",{className:"mb-2",children:e.jsx(us,{onClick:()=>{if(l){a.push("/ai-studio/episodes/draft");return}a.push("/ai-studio/episodes")}})}),e.jsx(S,{className:"p-4",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-row justify-between",children:[e.jsxs("div",{className:"flex flex-row items-center gap-4",children:[e.jsx(be,{size:60,imageUrl:i?.imageUrl||o.avatar}),e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"flex flex-row items-center gap-2",children:[e.jsx("span",{className:"font-bold",children:i.title}),(d||u)&&e.jsx(he,{})]}),e.jsx("div",{children:l&&e.jsx(Ve,{variant:"outline",children:n.formatMessage({id:"episodes.draftNotPublished"})})}),!i.publishedAt&&i.setting?.schedule&&e.jsx("div",{children:e.jsx("span",{className:"text-xs",children:e.jsx(y,{id:"episodes.scheduledAt",values:{date:He(i.setting.schedule)}})})})]})]}),e.jsxs(me,{children:[e.jsx(xe,{render:e.jsx(le,{variant:"ghost",size:"icon",onClick:()=>a.push(`/episodes/${t}`)}),children:e.jsx(je,{})}),e.jsx(fe,{children:n.formatMessage({id:"ai.episodeExtracts.goToEpisode"})})]})]}),e.jsx(is,{episode:i,hideRating:!0}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(Qe,{id:"monetization.exclusiveC
2ontent",children:e.jsx("span",{children:e.jsx(y,{id:"episodes.access"})})}),e.jsx(Ge,{hasAppleSettings:u,hasEntitlements:d,tiers:p})]})]})}),e.jsx("div",{className:"mt-10",children:e.jsx(Js,{episodeId:t,episodeExtracts:s.studioEpisodeFindOne.episodeExtracts,usage:s.studioUserFindOne.episodeExtractsUsage})})]})}function Ys({episode:t}){const s=C();return e.jsx(ps,{children:e.jsxs(de,{onClick:r=>{r.stopPropagation(),s.push(`/episodes/${t.id}`)},children:[e.jsx(je,{className:"size-4 text-muted-foreground"}),e.jsx(y,{id:"ai.episodeExtracts.goToEpisode"})]})})}const Zs=xs();function Xs({show:t,episodes:s,hasMore:r,isFetchingAfter:n,loadMore:a}){const i=C(),o=m.useMemo(()=>{const u=[{id:"episodeNumber",enableSorting:!1,size:64,accessorFn:d=>d,header:()=>"#",cell:d=>{const p=d.getValue();return e.jsx(os,{episode:p})}},{id:"info",enableSorting:!1,size:240,accessorFn:d=>d,header:()=>e.jsx(y,{id:"general.title"}),cell:d=>{const p=d.getValue();return e.jsxs("div",{className:"flex flex-row items-center gap-2",children:[e.jsx(be,{imageUrl:p.imageUrl||t.avatar||void 0,size:36}),e.jsx("span",{className:"line-clamp-2 overflow-hidden font-bold text-ellipsis",style:{display:"-webkit-box",WebkitBoxOrient:"vertical"},children:p.title})]})}},{id:"publishedAt",enableSorting:!1,meta:{align:"right"},accessorFn:d=>d,header:()=>e.jsx(y,{id:"general.date"}),cell:d=>{const p=d.getValue();return e.jsx(fs,{publishedAt:p.publishedAt,scheduledAt:p.setting?.schedule,scheduledMessageId:"episodes.scheduledAt"})}},{id:"duration",enableSorting:!1,size:96,meta:{align:"right"},accessorFn:d=>d,header:()=>e.jsx(y,{id:"episodes.duration"}),cell:d=>{const p=d.getValue();return e.jsx(cs,{episode:p})}},{id:"access",enableSorting:!1,size:120,meta:{align:"right"},accessorFn:d=>d,header:()=>e.jsx(y,{id:"episodes.access"}),cell:d=>{const p=d.getValue(),h=p.entitlements&&p.entitlements.length>0,f=!!p.appleSetting?.enabled;return e.jsxs("div",{className:"flex flex-row items-center justify-end gap-2",children:[h||f?e.jsx(he,{size:14}):null,e.jsx(y,{id:h||f?"episodes.access.member":"episodes.access.public"})]})}},{id:"episodeExtracts",enableSorting:!1,size:150,meta:{align:"center"},accessorFn:d=>d,header:()=>e.jsx(y,{id:"ai.episodeExtracts.status"}),cell:d=>{const p=d.getValue();return e.jsx(ls,{status:p.episodeExtractsStatus?.status})}}];return u.push(Zs.display({id:"actions",enableSorting:!1,size:72,meta:{sticky:"right",align:"right"},cell:d=>{const p=d.row.original;return e.jsx(Ys,{episode:p})}})),u},[t]),l=m.useCallback(u=>{i.push(`/ai-studio/episodes/${u.id}`)},[i]);return e.jsx(ms,{stickyHeader:!0,stickyFooter:!0,showPagination:!0,columns:o,data:s,hasMore:r,loading:n,loadMore:a,onRowClick:l})}function ce({isDraft:t}){const s=C(),r=Je(),n=m.useMemo(()=>
2new URLSearchParams(r.search).get("query")?.trim()||"",[r]),{show:a}=Ke(),{loading:i,data:o,nodes:l,hasMore:u,loadMore:d,isFetchingAfter:p}=gs({hasRouterParams:!0,isDraft:t,queryString:n}),h=m.useMemo(()=>t?l.filter(b=>!!b.audioUrl):l,[l,t]),f=m.useCallback(b=>{const g=new URLSearchParams(r.search);g.set("query",b),g.set("page","1"),s.push({...r,search:g.toString()})},[s,r]);return a?e.jsxs(e.Fragment,{children:[e.jsx(hs,{value:n,onChange:f}),!o&&i?e.jsx(Y,{}):e.jsx(Xs,{show:a,episodes:h,hasMore:u,loadMore:d,isFetchingAfter:p})]}):e.jsx(X,{to:"/"})}function et(){const t=v();return e.jsxs(G,{title:t.formatMessage({id:"ai.episodeExtracts"}),children:[e.jsx(_s,{pageId:"ai-studio-episodes"}),e.jsxs(ee,{children:[e.jsx(N,{exact:!0,path:"/ai-studio/episodes",children:e.jsx(ce,{isDraft:!1})}),e.jsx(N,{path:"/ai-studio/episodes/draft",children:e.jsx(ce,{isDraft:!0})})]})]})}function st(){return e.jsxs(ee,{children:[e.jsx(N,{exact:!0,path:["/ai-studio/episodes","/ai-studio/episodes/draft"],children:e.jsx(et,{})}),e.jsx(N,{path:"/ai-studio/episodes/:id",children:e.jsx(Ks,{})}),e.jsx(N,{children:e.jsx(X,{to:"/ai-studio/episodes"})})]})}function tt(){return e.jsx(ee,{children:e.jsx(N,{path:"/ai-studio/episodes",children:e.jsx(st,{})})})}const yt=Object.freeze(Object.defineProperty({__proto__:null,default:tt},Symbol.toStringTag,{value:"Module"}));export{vs as N,yt as i};

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.