PageSourceSearch

https://www.listening.com/assets/notes-tMQtTTBs.js

js listening.com collected 2026-09-24 08:54:59 UTC 3,491 bytes, 2 lines download raw bytes

1import{a as e,n as t,t as n}from"./jsx-runtime-D3jfb0Ew.js";import{$n as r,Hn as i,Mn as a,xn as o,zn as s}from"./Schema-CAUmIdFq.js";import{t as c}from"./useMutation-fVceI65m.js";import{t as l}from"./optimistic-list-entity-BljxgbiS.js";import{t as u}from"./compiler-runtime-DPI-XUKY.js";import{n as d}from"./runtime-context-DR7xYiHc.js";import{t as f}from"./api-client-tag-CiSoiJH1.js";var p=u(),m=[`notes`,`list`],h=(e={})=>o(f,t=>t.Note.ListNotes({query:e}).pipe(i(e=>({items:e.data.notes.map(e=>({...e})),nextCursor:e.data.cursor_id??void 0})))),g=(e={})=>a(function*(){let t=[],n;do{let r=yield*h({...e,cursor_id:n});t.push(...r.items),n=r.nextCursor}while(n);return t}),_=e=>o(f,t=>t.Note.UpsertManyNotes({payload:{notes:e}}).pipe(i(e=>e.data.map(e=>({...e}))))),v=e=>o(f,t=>t.Note.DeleteNote({params:{noteId:e}})),y=l({queryKey:m,listEffect:()=>g(),getId:e=>e.id,refetchInterval:3e5,operations:{update:({next:e})=>_([{id:e.id,title:e.title,body:e.body,audio_conversion_id:e.audio_conversion_id,chapter_id:e.chapter_id,chapter_audio_offset_ms:e.chapter_audio_offset_ms,chapter_word_offset:e.chapter_word_offset,tts_id:e.tts_id,doc_pack_page:e.doc_pack_page,doc_pack_char_start:e.doc_pack_char_start,doc_pack_char_end:e.doc_pack_char_end}]),remove:({id:e})=>v(e)}}),b=y.useEntity,x=y.useListQuery,S=e=>{let t=(0,p.c)(13),n;t[0]===e.audio_conversion_id?n=t[1]:(n=t=>e.audio_conversion_id?t.filter(t=>t.audio_conversion_id===e.audio_conversion_id):t,t[0]=e.audio_conversion_id,t[1]=n);let r=e.enabled??!0,i;t[2]===r?i=t[3]:(i={enabled:r},t[2]=r,t[3]=i);let a=x(n,i),o;t[4]===a.data?o=t[5]:(o=a.data??[],t[4]=a.data,t[5]=o);let s=a.error??void 0,c;return t[6]!==a.isError||t[7]!==a.isLoading||t[8]!==a.isPending||t[9]!==a.refetch||t[10]!==o||t[11]!==s?(c={data:o,isPending:a.isPending,isLoading:a.isLoading,isError:a.isError,error:s,refetch:a.refetch,hasNextPage:!1,fetchNextPage:w,isFetchingNextPage:!1},t[6]=a.isError,t[7]=a.isLoading,t[8]=a.isPending,t[9]=a.refetch,t[10]=o,t[11]=s,t[12]=c):c=t[12],c},C=()=>{let e=b(),t=d();return c({mutationFn:n=>t.runPromise(a(function*(){let t=yield*_(n);return yield*r(()=>e.utils.refetch()),yield*s(`Notes updated successfully`),t}))})};function w(){return Promise.resolve()}t();var T=e(n()),E=e=>(0,T.jsx)(`svg`,{width:18,height:18,viewBox:`0 0 18 18`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,T.jsx)(`path`,{d:`M8.16667 2.33333H5.5C4.09987 2.33333 3.3998 2.33333 2.86502 2.60582C2.39462 2.8455 2.01217 3.22795 1.77248 3.69836C1.5 4.23314 1.5 4.9332 1.5 6.33333V10.6667C1.5 11.4416 1.5 11.8291 1.58519 12.147C1.81635 13.0098 2.49022 13.6836 3.35295 13.9148C3.67087 14 4.05836 14 4.83333 14V15.9463C4.83333 16.3903 4.83333 16.6123 4.92436 16.7263C5.00352 16.8255 5.12356 16.8832 5.25045 16.8831C5.39636 16.8829 5.56973 16.7442 5.91646 16.4668L7.90434 14.8765C8.31043 14.5517 8.51347 14.3892 8.73957 14.2737C8.94017 14.1712 9.15369 14.0963 9.37435 14.051C9.62306 14 9.88308 14 10.4031 14H11.6667C13.0668 14 13.7669 14 14.3016 13.7275C14.772 13.4878 15.1545 13.1054 15.3942 12.635C15.6667 12.1002 15.6667 11.4001 15.6667 10V9.83333M15.7678 2.23223C16.7441 3.20854 16.7441 4.79146 15.7678 5.76777C14.7915 6.74408 13.2085 6.74408 12.2322 5.76777C11.2559 4.79146 11.2559 3.20854 12.2322 2.23223C13.2085 1.25592 14.7915 1.25592 15.7678 2.23223Z`,stroke:`currentColor`,strokeWidth:1.66667,strokeLinecap:`round`,strokeLinejoin:`round`})});export{g as a,C as i,S as n,m as o,b as r,E as t};
2//# sourceMappingURL=notes-tMQtTTBs.js.map

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.