PageSourceSearch

https://community-highlighter.onrender.com/assets/api-BIhUjpOr.js

js community-highlighter.onrender.com collected 2026-10-03 11:39:46 UTC 12,686 bytes, 5 lines download raw bytes

1const u=e=>{const t=window.location.protocol==="https:"?"wss:":"ws:",a=window.location.host;return`${t}//${a}${e}`};async function g(e){const a=await fetch("/api/transcript",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(typeof e=="string"?{videoId:e}:e)});if(!a.ok){const n=await a.text();throw new Error(`Failed to fetch transcript: ${n}`)}return a.text()}async function m(e){const t=typeof e=="string"?{transcript:e}:{transcript:e.transcript||e.text||""},a=await fetch("/api/wordfreq",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){const n=await a.text();throw new Error(`Failed to fetch word frequency: ${n}`)}return a.json()}async function S(e){const t=await fetch("/api/summary_ai",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const a=await t.text();throw new Error(`API Error ${t.status}: ${a}`)}return t.json()}async function C(e){const t=await fetch("/api/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const a=await t.text();throw new Error(`Translation failed: ${a}`)}return t.json()}async function T(e){const t=await fetch("/api/render_clips",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const a=await t.text();throw new Error(`Failed to start render job: ${a}`)}return t.json()}async function N(e){const t=await fetch(`/api/job_status?jobId=${e}`);if(!t.ok){const a=await t.text();throw new Error(`Failed to get job status: ${a}`)}return t.json()}async function E(e){const a=await fetch("/api/download_mp4",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(typeof e=="string"?{videoId:e}:e)});if(!a.ok){const n=await a.text();throw new Error(`Failed to get download link: ${n}`)}return a.json()}async function b(e){const t=await fetch("/api/metadata",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({videoId:e})});if(!t.ok){const a=await t.text();throw new Error(`Failed to get metadata: ${a}`)}return t.json()}async function O(e){const a=await fetch("/api/analytics/extended",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(typeof e=="string"?{transcript:e}:e)});if(!a.ok){const n=await a.text();throw new Error(`Failed to fetch extended analytics: ${n}`)}return a.json()}async function _(){const e=await fetch("/api/optimization/stats");if(!e.ok)throw new Error("Failed to get optimization stats");return e.json()}async function j(e=null){const t=e?`/api/optimization/clear_cache?video_id=${e}`:"/api/optimization/clear_cache",a=await fetch(t,{method:"POST"});if(!a.ok)throw new Error("Failed to clear cache");return a.json()}function k(e,t,a,n){const i=new AbortController;return fetch("/api/assistant/chat/stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),signal:i.signal}).then(async o=>{if(!o.ok){const r=await o.text();n&&n(new Error(`Chat stream error ${o.status}: ${r}`));return}const f=o.body.getReader(),l=new TextDecoder;let w="",c="";for(;;){const{done:r,value:p}=await f.read();if(r)break;w+=l.decode(p,{stream:!0});const d=w.split(`
2`);w=d.pop()||"";for(const h of d){if(!h.startsWith("data: "))continue;const y=h.slice(6).trim();if(y==="[DONE]")return;try{const s=JSON.parse(y);if(s.error){n&&n(new Error(s.error));return}if(s.done){a&&a({fullText:c,suggestions:s.suggestions||[],stats:s.stats});return}s.text&&(c+=s.text,t&&t(s.text,c))}catch{}}}if(c)a&&a({fullText:c,suggestions:[],stats:{}});else{console.warn("[Chat] SSE stream returned no text, trying non-streaming fallback");try{const r=await fetch("/api/assistant/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),signal:i.signal});if(r.ok){const p=await r.json();if(p.answer){t&&t(p.answer,p.answer),a&&a({fullText:p.answer,suggestions:p.suggestions||[],stats:p.stats||{}});return}}}catch(r){console.warn("[Chat] Non-streaming fallback also failed:",r)}n&&n(new Error("No response received from AI. Please check your API keys are configured."))}}).catch(o=>{o.name!=="AbortError"&&n&&n(o)}),i}async function $(e){const t=await fetch("/api/assistant/suggestions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const a=await t.text();throw new Error(`Failed to get suggestions: ${a}`)}return t.json()}async function A(e){const t=await fetch("/api/knowledge/add_meeting",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const a=await t.text();throw new Error(`Failed to add to knowledge base: ${a}`)}return t.json()}async function B(e){const t=await fetch("/api/knowledge/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const a=await t.text();throw new Error(`Search failed: ${a}`)}return t.json()}async function K(e){const t=await fetch("/api/knowledge/find_related",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const a=await t.text();throw new Error(`Failed to find related meetings: ${a}`)}return t.json()}async function R(){const e=await fetch("/api/knowledge/stats");if(!e.ok){const t=await e.text();throw new Error(`Failed to get KB stats: ${t}`)}return e.json()}async function x(e,t,a,n){try{const i=await fetch("/api/knowledge/add_meeting_stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!i.ok)throw new Error(`HTTP ${i.status}`);const o=i.body.getReader(),f=new TextDecoder;let l="";for(;;){const{done:w,value:c}=await o.read();if(w)break;l+=f.decode(c,{stream:!0});const r=l.split(`
3`);l=r.pop()||"";for(const p of r)if(p.startsWith("data: "))try{const d=JSON.parse(p.slice(6));d.done?a&&a(d):d.progress!==void 0&&t&&t(d)}catch{}}}catch(i){n&&n(i)}}async function L(){const e=await fetch("/api/knowledge/meetings");if(!e.ok)throw new Error("Failed to list KB meetings");return e.json()}async function D(){const e=await fetch("/api/knowledge/dashboard_stats");if(!e.ok)throw new Error("Failed to load dashboard stats");return e.json()}async function U(e={}){const t=await fetch("/api/knowledge/entity_tracking",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error("Failed to load entity tracking");return t.json()}async function J(){const e=await fetch("/api/knowledge/decisions_across_meetings");if(!e.ok)throw new Error("Failed to load decisions");return e.json()}async function P(){const e=await fetch("/api/knowledge/topic_clusters",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(!e.ok)throw new Error("Failed to load topic clusters");return e.json()}async function F(e){const t=await fetch("/api/knowledge/compare_meetings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error("Failed to compare meetings");return t.json()}async function v(){const e=await fetch("/api/knowledge/participation_across");if(!e.ok)throw new Error("Failed to load participation data");return e.json()}async function I(e){const t=await fetch("/api/knowledge/delete_meeting",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({video_id:e})});if(!t.ok)throw new Error("Failed to delete meeting");return t.json()}async function M(){const e=await fetch("/api/knowledge/ai_comparison",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(!e.ok)throw new Error("Failed to generate AI comparison");return e.json()}async function W(e){const t=await fetch("/api/knowledge/topic_drilldown",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error("Failed to get topic drilldown");return t.json()}async function z(e={}){const t=await fetch("/api/knowledge/framing_analysis",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error("Failed to get framing analysis");return t.json()}async function q(e={}){const t=await fetch("/api/knowledge/word_cloud",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error("Failed to get word cloud data");return t.json()}async function H(e){const t=await fetch("/api/render_multi_video_clips",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});
3if(!t.ok)throw new Error("Failed to start multi-video render");return t.json()}async function V(e){const t=await fetch("/api/knowledge/save_analysis",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error("Failed to save analysis");return t.json()}async function G(e,t,a,n){try{const i=await fetch("/api/knowledge/enrich_meeting",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({video_id:e,force:!0})});if(!i.ok)throw new Error("Enrich request failed");const o=i.body.getReader(),f=new TextDecoder;let l="";for(;;){const{done:w,value:c}=await o.read();if(w)break;l+=f.decode(c,{stream:!0});const r=l.split(`
4`);l=r.pop()||"";for(const p of r)if(p.startsWith("data: "))try{const d=JSON.parse(p.slice(6));d.done?a&&a(d):d.progress<0?n&&n(new Error(d.stage)):t&&t(d)}catch{}}}catch(i){n&&n(i)}}async function Q(e){const t=await fetch("/api/clip/preview",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const a=await t.text();throw new Error(`Failed to get clip preview: ${a}`)}return t.json()}async function X(e){const t=await fetch(`/api/video_formats/${e}`);return t.ok?t.json():{formats:[]}}async function Y(e){const t=await fetch("/api/clip_thumbnails",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return t.ok?t.json():{thumbnails:[]}}function Z(e,t,a,n){const i=new AbortController;return fetch("/api/summary_ai/stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),signal:i.signal}).then(async o=>{if(!o.ok){const r=await o.text();n&&n(new Error(`Stream error ${o.status}: ${r}`));return}const f=o.body.getReader(),l=new TextDecoder;let w="",c="";for(;;){const{done:r,value:p}=await f.read();if(r)break;w+=l.decode(p,{stream:!0});const d=w.split(`
5`);w=d.pop()||"";for(const h of d){if(!h.startsWith("data: "))continue;const y=h.slice(6).trim();if(y==="[DONE]"){a&&a(c);return}try{const s=JSON.parse(y);if(s.cached){c=s.text,a&&a(c);return}if(s.text&&(c+=s.text,t&&t(s.text,c)),s.error){n&&n(new Error(s.error));return}}catch{}}}c&&a&&a(c)}).catch(o=>{o.name!=="AbortError"&&n&&n(o)}),i}function tt(e,t,a,n){const i=new WebSocket(u(`/ws/job/${e}`));return i.onmessage=o=>{try{const f=JSON.parse(o.data);f.status==="done"||f.status==="error"?a&&a(f):t&&t(f)}catch{}},i.onerror=()=>n&&n(),i.onclose=o=>{o.wasClean||n&&n()},i}function et(e,t){return fetch("/api/share/precompute",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({video_id:e,transcript:(t||"").slice(0,1e5)})}).catch(()=>{})}async function at(e){const t=await fetch("/api/jargon/explain",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(await t.text());return t.json()}async function nt(e){const t=await fetch("/api/export/srt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(await t.text());return t.blob()}async function ot(e){const t=await fetch("/api/export/pdf",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(await t.text());return t.blob()}async function it(e){const t=await fetch("/api/share/moment",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(await t.text());return t.json()}async function rt(e){const t=await fetch("/api/accessibility/simplify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(await t.text());return t.json()}async function st(e){const t=await fetch("/api/accessibility/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(await t.text());return t.json()}export{Q as A,it as B,x as C,k as D,A as E,L as F,D as G,P as H,U as I,q as J,J as K,z as L,v as M,G as N,M as O,I as P,W as Q,F as R,H as S,_ as a,nt as b,ot as c,E as d,N as e,et as f,Y as g,j as h,m as i,S as j,X as k,g as l,b as m,O as n,V as o,T as p,C as q,R as r,Z as s,B as t,$ as u,K as v,tt as w,rt as x,st as y,at as z};

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.