PageSourceSearch

https://www.speakduo.com/assets/feedback-kDKgPeXM.js

js speakduo.com collected 2026-10-01 15:21:34 UTC 9,882 bytes, 1 lines download raw bytes

1import{aX as C,ds as E,aw as v,dt as T,r as R,j as e,B as o,ay as F,du as q,al as A,dv as z,z as k,dw as I,dx as Q,dy as K,a as D,F as G,dz as O,c as b}from"./index-BuKyStDl.js";import{f as B}from"./format-date-g02VbQr_.js";import{p as U}from"./utc-date-CHLhoVrq.js";import{i as W}from"./recording-status-CHiBlqJ0.js";import{u as V,a as X,F as H,T as J,b as Y,c as Z}from"./transcript-panel-DZv5MHgJ.js";import{h as $}from"./plan-access-B_cRkz9t.js";import{T as N}from"./triangle-alert-pdW9voI8.js";import{M as ee}from"./message-square-D0o9nCtL.js";import{R as se}from"./refresh-cw-Bjxdt3wh.js";import{C as c}from"./crown-DeikunzL.js";import{c as L}from"./common_generic_error-vLvJcNTA.js";import{f as te}from"./transcript_empty-DE4S0yQT.js";import{f as re,a as ie,b as ae,c as de,d as ne,e as ce,g as oe,h as me,i as le,j as ue,k as xe,l as he,m as fe,n as be,o as pe,p as ge,q as je,r as _e,s as ve,t as ke,u as Ne,v as we,w as ye,x as Re}from"./feedback_unavailable_title-99EfyMn2.js";import{u as Se,R as Ce}from"./use-recordings-pagination-DYfYUflb.js";import{u as Fe}from"./use-sidebar-BrFejAi0.js";import{s as Le}from"./sidebar_close_aria-i1IAr7VG.js";import"./pause-DcE2XySt.js";import"./play-DKac4cLv.js";import"./volume-x-CdNSdmka.js";import"./volume-2-N9nbsIsN.js";import"./thumbs-up-DYIO7e5K.js";import"./message-square-plus-T53LfG6V.js";import"./label-fTqNRqS8.js";import"./common_cancel-Ctr2P1hT.js";import"./common_submit-eDS96atQ.js";import"./file-text-BUOAjhHX.js";import"./panel-left-close-qcxweWyQ.js";import"./mic-BuvBjnUW.js";import"./circle-check-DcBae7Na.js";import"./clock-Di4Fe-gs.js";import"./recordings_status_unavailable-BTcuxaQ-.js";import"./infiniteQueryOptions-Kf6x0a2l.js";import"./useInfiniteQuery-Cz_Slncd.js";function Pe(){const{isAuthenticated:t}=C(),{data:a}=E({query:{enabled:t,staleTime:300*1e3}}),s=v(a);if(!s)return{kind:"unknown"};if(s.monthly_limit===0)return{kind:"no-plan"};if(s.remaining_count>0)return{kind:"has-headroom",remaining:s.remaining_count};const i=U(s.current_period_end);return{kind:"over-limit",monthlyLimit:s.monthly_limit,resetsOn:Number.isNaN(i)?null:new Date(i)}}function w(){return e.jsxs("div",{className:"p-4 md:p-6 space-y-4 md:space-y-6",children:[e.jsxs("div",{className:"space-y-2 animate-pulse",children:[e.jsx("div",{className:"h-6 md:h-8 bg-muted rounded w-36 md:w-48"}),e.jsx("div",{className:"h-3 md:h-4 bg-muted rounded w-24 md:w-32"})]}),e.jsx("div",{className:"h-12 md:h-16 bg-muted rounded animate-pulse"}),e.jsx("div",{className:"space-y-3 md:space-y-4",children:[1,2,3,4].map(t=>e.jsx("div",{className:"h-20 md:h-24 bg-muted rounded animate-pulse"},t))})]})}function Me(){return e.jsx("div",{className:"h-full flex items-center justify-center",children:e.jsxs("div",{className:"text-center p-6 md:p-8",children:[e.jsx("div",{className:"w-12 h-12 md:w-16 md:h-16 mx-auto mb-3 md:mb-4 rounded-full bg-muted flex items-center justify-center",children:e.jsx(ee,{className:"w-6 h-6 md:w-8 md:h-8 text-muted-foreground"})}),e.jsx("h3",{className:"font-semibold text-base md:text-lg mb-1.5 md:mb-2",children:ae()}),e.jsx("p",{className:"text-xs md:text-sm text-muted-foreground max-w-xs",children:de()})]})})}function x({icon:t,title:a,body:s,children:i}){return e.jsx("div",{className:"h-full flex items-center justify-center",children:e.jsxs("div",{className:"text-center p-6 md:p-8",children:[e.jsx("div",{className:"w-12 h-12 md:w-16 md:h-16 mx-auto mb-3 md:mb-4 rounded-full bg-amber-400/15 flex items-center justify-center",children:t}),e.jsx("h3",{className:"font-semibold text-base md:text-lg mb-1.5 md:mb-2",children:a}),e.jsx("p",{className:"text-xs md:text-sm text-muted-foreground max-w-xs mb-4 md:mb-6 mx-auto",children:s}),i]})})}function Ee({recordingId:t}){const a=A(),s=Pe(),{mutate:i,isPending:d,isError:m}=z({mutation:{onSuccess:async()=>{await Promise.all([a.invalidateQueries({queryKey:I(t)}),a.invalidateQueries({queryKey:Q()}),a.invalidateQueries({queryKey:K()})]).catch(()=>{})}}});return s.kind==="unknown"?e.jsx(w,{}):s.kind==="has-headroom"?e.jsxs(x,{icon:e.jsx(se,{className:"w-6 h-6 md:w-8 md:h-8 text-amber-500"}),title:le(),body:me({remaining:s.remaining}),children:[e.jsx(o,{onClick:()=>i({id:t}),disabled:d,children:d?ne():ce()}),m&&e.jsx("p",{className:"mt-3 text-xs text-destructive",children:oe()})]}):s.kind==="over-limit"?e.jsx(x,{icon:e.jsx(c,{className:"w-6 h-6 md:w-8 md:h-8 text-amber-500"}
1),title:fe(),body:s.resetsOn?xe({limit:s.monthlyLimit,date:B(s.resetsOn)}):he({limit:s.monthlyLimit}),children:e.jsx(o,{asChild:!0,children:e.jsxs(k,{to:"/pricing",children:[e.jsx(c,{"aria-hidden":!0,className:"size-4"}),ue()]})})}):e.jsx(x,{icon:e.jsx(c,{className:"w-6 h-6 md:w-8 md:h-8 text-amber-500"}),title:ge(),body:pe(),children:e.jsx(o,{asChild:!0,children:e.jsxs(k,{to:"/pricing",children:[e.jsx(c,{"aria-hidden":!0,className:"size-4"}),be()]})})})}function Te(){return e.jsx("div",{className:"h-full flex items-center justify-center",children:e.jsxs("div",{className:"text-center p-6 md:p-8 max-w-sm",children:[e.jsx("div",{className:"w-12 h-12 md:w-16 md:h-16 mx-auto mb-3 md:mb-4 rounded-full bg-amber-400/15 flex items-center justify-center",children:e.jsx(c,{className:"w-6 h-6 md:w-8 md:h-8 text-amber-500"})}),e.jsx("h3",{className:"font-semibold text-base md:text-lg mb-1.5 md:mb-2",children:Ne()}),e.jsxs("p",{className:"text-xs md:text-sm text-muted-foreground mb-2 mx-auto",children:[we(),e.jsx("sup",{className:"ml-0.5 font-semibold text-amber-500",children:"*"})]}),e.jsxs("p",{className:"text-[11px] md:text-xs italic text-muted-foreground/80 mb-4 md:mb-6 mx-auto",children:["*",ye()]}),e.jsx(o,{asChild:!0,children:e.jsxs(k,{to:"/pricing",children:[e.jsx(c,{"aria-hidden":!0,className:"size-4"}),Re()]})})]})})}function S({recovering:t=!1}){return e.jsx("div",{className:"h-full flex items-center justify-center",children:e.jsxs("div",{"aria-live":"polite","aria-atomic":"true",className:"text-center p-6 md:p-8",children:[e.jsx("div",{className:"w-12 h-12 md:w-16 md:h-16 mx-auto mb-3 md:mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"w-2.5 h-2.5 md:w-3 md:h-3 bg-green-500 rounded-full animate-pulse"}),e.jsx("div",{className:"absolute inset-0 w-2.5 h-2.5 md:w-3 md:h-3 bg-green-500 rounded-full animate-ping"})]})}),e.jsx("h3",{className:"font-semibold text-base md:text-lg mb-1.5 md:mb-2",children:t?je():_e()}),e.jsx("p",{className:"text-xs md:text-sm text-muted-foreground max-w-xs",children:t?ve():ke()})]})})}function qe({recordingId:t,recordingsLoading:a=!1}){const{setChunks:s,setTranscript:i}=V(),{user:d}=C(),m=$(d),{data:l,isLoading:h,isError:p,isFetching:g,refetch:j}=T(t??0,{query:{enabled:t!==null,refetchOnWindowFocus:!0,refetchInterval:_=>{const n=v(_.state.data);return n&&W(n)?5e3:!1}}}),r=v(l),{transcript:u}=X(r?.transcript_url);if(R.useEffect(()=>{r?.chunks?s(r.chunks):s([])},[r?.chunks,s]),R.useEffect(()=>{i(u)},[u,i]),t===null)return a?e.jsx(w,{}):e.jsx(Me,{});if(h)return e.jsx(w,{});if(p)return e.jsx(x,{icon:e.jsx(N,{className:"h-7 w-7 text-destructive"}),title:L(),body:q(),children:e.jsx(o,{variant:"outline",disabled:g,onClick:()=>{j()},children:F()})});if(!r)return e.jsx("div",{className:"h-full flex items-center justify-center",children:e.jsx("p",{className:"text-muted-foreground",children:te()})});if(r.is_collected_pending)return e.jsx(Ee,{recordingId:r.id});if(r.processing_status==="FAILED")return r.processed?e.jsx(x,{icon:e.jsx(N,{className:"h-7 w-7 text-destructive"}),title:ie(),body:re()}):e.jsx(S,{recovering:!0});if(!r.processed)return e.jsx(S,{});const f=u.length>0;return e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsx("div",{className:"p-3 md:p-4 border-b border-border bg-card",children:e.jsx(H,{audioUrl:r.processed_audio_url||r.audio_url,recordingDuration:r.duration})}),e.jsxs("div",{className:"flex-1 flex flex-col md:flex-row min-h-0",children:[f&&e.jsx("div",{className:"h-20 flex-shrink-0 md:h-full md:w-1/2 border-b md:border-b-0 md:border-r border-border overflow-hidden",children:e.jsx(J,{})}),e.jsx("div",{className:f?"flex-1 min-h-0 md:h-full md:w-1/2":"w-full",children:m?e.jsx(Y,{}):e.jsx(Te,{})})]})]})}function fs(){const t=D({from:"/dashboard/feedback"}),{recordingId:a}=G({from:"/_authed/dashboard/feedback"}),s=O(),{sidebarCollapsed:i,toggleSidebar:d,closeSidebar:m}=Fe(),{recordings:l,isLoading:h,isError:p,isFetching:g,refetch:j,hasMore:r,isLoadingMore:u,loadMore:f}=Se(),_=l[0]?.id,n=a??_??null,P=M=>{t({search:{recordingId:M}})},y=s===!0;return p&&l.length===0?e.jsxs("div",{className:"flex min-h-[50vh] flex-col items-center justify-center p-6 text-center",children:[e.jsx(N,{className:"h-8 w-8 text-destructive","aria-hidden":!0}),e.jsx("p",{className:"mt-3 text-sm text-muted-foreground",role:"alert",children:L()}),e.jsx(o,{className:"mt-3",variant:"outline",disabled:g,onClick:()=>{j()},children:F()})]}):e.jsxs("div",{className:b("h-[calc(100vh-64px)] flex relative","p-0 md:p-6","md:gap-6","gap-0"),children:[y&&e.jsx("button",{type:"button",className:b("fixed top-[64px] inset-x-0 bottom-0 bg-black/50 z-30 transition-opacity duration-300",i?"opacity-0 pointer-events-none":"opacity-100"),onClick:m,"aria-label":Le()}),e.jsx("div",{className:b("flex-shrink-0 bg-card z-40 transition-[width] duration-300 ease-in-out","w-14 border-r border-border","md:w-80 md:rounded-lg md:border md:shadow-sm md:border-r-0",y&&!i&&"!w-72 shadow-xl"),children:e.jsx(Ce,{recordings:l,selectedRecordingId:n,onSelectRecording:P,isLoading:h,hasMore:r,isLoadingMore:u,onLoadMore:f,isMobile:s,isCollapsed:i,onToggle:d})}),e.jsx("main",{className:b("flex-1 bg-card overflow-hidden","md:rounded-lg md:border md:border-border md:shadow-sm"),children:e.jsx(Z,{recordingId:n,children:e.jsx(qe,{recordingId:n,recordingsLoading:h})})})]})}export{fs as component};

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.