1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,38856,974368,e=>{"use strict";var t=e.i(191788);let r={},i=t.default.createContext(r);e.s(["MDXProvider",0,function(e){let a;if(e.disableParentContext)a="function"==typeof e.components?e.components(r):e.components||r;else{var o;let r;o=e.components,r=t.default.useContext(i),a=t.default.useMemo(function(){return"function"==typeof o?o(r):{...r,...o}},[r,o])}return t.default.createElement(i.Provider,{value:a},e.children)}],38856);var a=e.i(391398),o=e.i(41158),n=e.i(168489),s=e.i(911160);let l=(0,n.default)(()=>e.A(841621).then(e=>e.default),{loadableGenerated:{modules:[832960]},ssr:!1});function u({src:e,alt:r,className:i,style:o,...n}){let[d,c]=(0,t.useState)(!1);(0,t.useEffect)(()=>{c(!0)},[]);let m=(0,a.jsx)("img",{...n,src:e,alt:r,style:o,className:(0,s.cn)("w-full rounded-xl border border-border/40 shadow-sm",i)});return(0,a.jsx)("span",{className:"my-6 block",suppressHydrationWarning:!0,children:d?(0,a.jsx)(l,{children:m}):m})}function d(e){return e.toLowerCase().replace(/\s+/g,"-").replace(/[^\w\u4e00-\u9fa5-]/g,"")}function c(e){return"string"==typeof e?e:"number"==typeof e?String(e):Array.isArray(e)?e.map(c).join(""):e&&"object"==typeof e&&"props"in e?c(e.props.children):""}e.s(["mdxComponents",0,{h1:({children:e,className:t,...r})=>(0,a.jsx)("h1",{className:(0,s.cn)("sr-only",t),...r,"data-mdx-title":!0,children:e}),h2:({children:e,className:t,id:r,...i})=>{let o=c(e),n=r||d(o);return(0,a.jsx)("h2",{id:n,className:(0,s.cn)("mt-10 mb-4 scroll-mt-20 border-b border-border pb-2 text-2xl font-semibold tracking-tight text-foreground",t),...i,children:e})},h3:({children:e,className:t,id:r,...i})=>{let o=c(e),n=r||d(o);return(0,a.jsx)("h3",{id:n,className:(0,s.cn)("mt-8 mb-3 scroll-mt-20 text-xl font-semibold tracking-tight text-foreground",t),...i,children:e})},h4:({children:e,className:t,id:r,...i})=>{let o=c(e),n=r||d(o);return(0,a.jsx)("h4",{id:n,className:(0,s.cn)("mt-6 mb-2 scroll-mt-20 text-lg font-semibold tracking-tight text-foreground",t),...i,children:e})},p:({children:e,className:t,...r})=>(0,a.jsx)("p",{className:(0,s.cn)("my-4 leading-7 text-foreground/90",t),...r,children:e}),img:({className:e,alt:t,src:r,style:i,...o})=>(0,a.jsx)(u,{...o,src:r,alt:t,style:i,className:(0,s.cn)("w-full rounded-xl border border-border/40 shadow-sm",e)}),a:({href:e,children:t,className:r,...i})=>{let n=e?.startsWith("http"),l=n?"a":o.default;return(0,a.jsx)(l,{href:e||"#",className:(0,s.cn)("font-medium text-pink-500 underline underline-offset-4 hover:text-pink-600",r),...n?{target:"_blank",rel:"noopener noreferrer"}:{},...i,children:t})},ul:({children:e,className:t,...r})=>(0,a.jsx)("ul",{className:(0,s.cn)("my-4 ml-6 list-disc space-y-2 [&>li]:mt-2",t),...r,children:e}),ol:({children:e,className:t,...r})=>(0,a.jsx)("ol",{className:(0,s.cn)("my-4 ml-6 list-decimal space-y-2 [&>li]:mt-2",t),...r,children:e}),li:({children:e,className:t,...r})=>(0,a.jsx)("li",{className:(0,s.cn)("leading-7",t),...r,children:e}),blockquote:({children:e,className:t,...r})=>(0,a.jsx)("blockquote",{className:(0,s.cn)("my-6 border-l-4 border-pink-400 pl-6 text-muted-foreground italic",t),...r,children:e}),code:({children:e,className:t,...r})=>(0,a.jsx)("code",{className:(0,s.cn)("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold text-foreground",t),...r,children:e}),pre:({children:e,className:t,...r})=>(0,a.jsx)("pre",{className:(0,s.cn)("my-4 overflow-x-auto rounded-lg bg-muted p-4 font-mono text-sm",t),...r,children:e}),table:({children:e,className:t,...r})=>(0,a.jsx)("div",{className:"my-6 w-full overflow-x-auto",children:(0,a.jsx)("table",{className:(0,s.cn)("w-full border-collapse border border-border text-sm",t),...r,children:e})}),thead:({children:e,className:t,...r})=>(0,a.jsx)("thead",{className:(0,s.cn)("bg-muted/50",t),...r,children:e}),tbody:({children:e,className:t,...r})=>(0,a.jsx)("tbody",{className:(0,s.cn)("",t),...r,children:e}),tr:({children:e,className:t,...r})=>(0,a.jsx)("tr",{className:(0,s.cn)("border-b border-border transition-colors hover:bg-muted/30",t),...r,children:e}),th:({children:e,className:t,...r})=>(0,a.jsx)("th",{className:(0,s.cn)("h-12 border-b border-border px-4 text-left align-middle font-semibold text-foreground",t),...r,children:e}),td:({children:e,className:t,...r})=>(0,a.jsx)("td",{className:(0,s.cn)("px-4 py-3 align-top",t),...r,children:e}),hr:({className:e,...t})=>(0,a.jsx)("hr",{className:(0,s.cn)("my-8 border-border",e),...t}),strong:({children:e,className:t,...r})=>(0,a.jsx)("strong",{className:(0,s.cn)("font-semibold text-foreground",t),...r,children:e}),em:({children:e,className:t,...r})=>(0,a.jsx)("em",{className:(0,s.cn)("italic",t),...r,children:e})}],974368)},680571,e=>{"use strict";let t=(0,e.i(369547).default)("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);e.s(["ArrowUpRight",0,t],680571)},74152,e=>{"use strict";var t=e.i(706177);
1e.s(["TriangleAlert",()=>t.default])},925060,e=>{"use strict";let t=(0,e.i(369547).default)("youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]);e.s(["Youtube",0,t],925060)},724660,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useRouter",{enumerable:!0,get:function(){return o}});let i=e.r(191788),a=e.r(425479);function o(){return(0,i.useContext)(a.RouterContext)}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},148888,(e,t,r)=>{t.exports=e.r(724660)},412578,e=>{"use strict";var t=e.i(884762),r=e.i(870334),i=e.i(191788),a=e.i(148888);let o=!1;function n(){o||((0,t.c)("[nuqs] Aborting queues"),r.t.abortAll(),r.n.abort().forEach(e=>r.t.queuedQuerySync.emit(e)))}let s=(0,t.n)(function(){let e=(0,a.useRouter)();return(0,i.useEffect)(()=>(e?.events.on("routeChangeStart",n),e?.events.on("beforeHistoryChange",n),()=>{e?.events.off("routeChangeStart",n),e?.events.off("beforeHistoryChange",n)}),[]),{searchParams:(0,i.useMemo)(()=>{let t=new URLSearchParams;if(null===e)return t;for(let[r,i]of Object.entries(e.query))if("string"==typeof i)t.set(r,i);else if(Array.isArray(i))for(let e of i)t.append(r,e);return t},[JSON.stringify(e?.query)]),updateUrl:(0,i.useCallback)((e,r)=>{let i=window.next?.router,a=function(e,t){let r,i=new Set,a=/\[([^\]]+)\]/g;for(;null!==(r=a.exec(e));){let e=r[1];e&&i.add(e)}let o=Object.fromEntries(Object.entries(t).filter(([e])=>i.has(e))),n=/\[\.{3}([^\]]+)\]$/.exec(e);if(n&&n[1]){let e=n[1];o[e]=t[e]??[]}let s=/\[\[\.{3}([^\]]+)\]\]$/.exec(e);if(s&&s[1]){let e=s[1];o[e]=t[e]??[]}return o}(i.pathname,i.query),n=i.asPath.replace(/#.*$/,"").replace(/\?.*$/,"")+(0,t.o)(e)+location.hash;
1(0,t.c)("[nuqs next/pages] Updating url: %s",n);let s="push"===r.history?i.push:i.replace;o=!0,s.call(i,{pathname:i.pathname,query:{...function(e){let t={};for(let r of e.keys()){let i=e.getAll(r);1===i.length?t[r]=i[0]:i.length>1&&(t[r]=i)}return t}(e),...a}},n,{scroll:r.scroll,shallow:r.shallow}).finally(()=>{o=!1})},[]),autoResetQueueOnUpdate:!1}});e.s(["NuqsAdapter",0,s],412578)},452220,97895,599449,746306,331505,822134,e=>{"use strict";var t=e.i(191788),r=e.i(472865);e.s(["default",0,function(){let e=(0,r.useThemeStore)(e=>e.isDarkMode()),i=(0,r.useThemeStore)(e=>e.color),a=e&&"default"===i?"#1e293b":((0,r.getColorValue)(i),"pink"===i)?e?"#831843":"#f472b6":"blue"===i?e?"#1e3a8a":"#60a5fa":"zinc"===i?e?"#27272a":"#a1a1aa":"ghibli"===i?"#a0a45b":"brutal"===i?"#88aaee":e?"#1e293b":"#F17EB8";return(0,t.useEffect)(()=>{let e=document.querySelector('meta[name="theme-color"]');if(e)e.setAttribute("content",a);else{let e=document.createElement("meta");e.name="theme-color",e.content=a,document.head.appendChild(e)}},[a]),null}],452220);var i=e.i(391398),a=e.i(460764),o=e.i(589984);e.s(["Toaster",0,function(){let{toasts:e}=(0,o.useToast)();return(0,i.jsxs)(a.ToastProvider,{children:[e.map(function({id:e,title:t,description:r,action:o,...n}){return(0,i.jsxs)(a.Toast,{...n,children:[(0,i.jsxs)("div",{className:"grid gap-1",children:[t&&(0,i.jsx)(a.ToastTitle,{children:t}),r&&(0,i.jsx)(a.ToastDescription,{children:r})]}),o,(0,i.jsx)(a.ToastClose,{})]},e)}),(0,i.jsx)(a.ToastViewport,{})]})}],97895);let n=[{name:"summarize_video",description:"Summarize an online video or podcast. Supports YouTube, Bilibili, TikTok, Twitter/X, podcasts.",inputSchema:{type:"object",properties:{url:{type:"string",description:"Video or podcast URL"}},required:["url"]},method:"GET",path:"/api/v1/summarize"},{name:"summarize_with_config",description:"Summarize a video with custom prompt, AI model, or output language.",inputSchema:{type:"object",properties:{url:{type:"string",description:"Video URL"},prompt:{type:"string",description:"Custom prompt"},model:{type:"string",description:"AI model (e.g., gpt-4o, claude-3-5-sonnet)"},language:{type:"string",description:"Output language",enum:["zh","en","ja","ko","zh-TW"]}},required:["url"]},method:"POST",path:"/api/v1/summarizeWithConfig"},{name:"get_subtitles",description:"Get the full transcript/subtitles of a video or podcast with timestamps.",inputSchema:{type:"object",properties:{url:{type:"string",description:"Video URL"}},required:["url"]},method:"GET",path:"/api/v1/getSubtitle"},{name:"summarize_by_chapter",description:"Summarize a video chapter by chapter. Returns structured summaries per section.",inputSchema:{type:"object",properties:{url:{type:"string",description:"Video URL"}},required:["url"]},method:"GET",path:"/api/v1/summarizeByChapter"}];function s(){return"u">typeof navigator&&"modelContext"in navigator&&!!navigator.modelContext}async function l(e,t){let r=await fetch(e,{credentials:"same-origin",...t}),i=await r.json();return{content:[{type:"text",text:"string"==typeof i?i:JSON.stringify(i,null,2)}]}}e.s(["default",0,function(){return(0,t.useEffect)(()=>{if(!s())return;let e=function(){if(!s())return()=>{};let e=navigator.modelContext,t=[],r=r=>{try{e.registerTool(r),t.push(r.name)}catch{}};for(let e of n)r({name:e.name,description:e.description,inputSchema:e.inputSchema,readOnly:!0,async execute(t){if("GET"===e.method)return l(function(e,t){if(!t.url)return e;let r=new URLSearchParams({url:String(t.url)});return`${e}?${r.toString()}`}(e.path,t));let r={};return t.prompt&&(r.customPrompt=t.prompt),t.model&&(r.model=t.model),t.language&&(r.outputLanguage=t.language),l(e.path,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:t.url,...Object.keys(r).length>0?{promptConfig:r}:{}})})}});try{e.provideContext?.({tools:t.map(e=>({name:e}))})}catch{}return()=>{t.forEach(t=>e.unregisterTool(t))}}();return console.log("[WebMCP] BibiGPT tools registered"),e},[]),null}],599449);var u=e.i(864860);let d=RegExp(`^/(${u.locales.map(e=>e.replace("-","\\-")).join("|")})(?=/|$)`);e.s(["useBlogPostConfig",0,function(e,t,r,i){let a=function(e){if(!e)return"";let t=(e.split("?")[0]?.split("#")[0]??"").replace(d,"");return t?"/"!==t&&t.endsWith("/")?t.slice(0,-1):t:"/"}(t||e),o=a.startsWith("/blog/posts/"),n=!e.includes("["),s="/blog/posts"!==a,l="frontMatter"in r&&void 0!==r.frontMatter,u="isMDXComponent"in r&&!0===r.isMDXComponent,c=i||(l?r.frontMatter:void 0);return{isMdxBlogPost:o&&n&&s||void 0!==i||l||u,frontMatter:c}}],746306);var c=e.i(370947),m=e.i(551784),p=e.i(679935),f=e.i(748629),g=e.i(506918),h=e.i(496323),b=e.i(521196);function v(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("www.")}e.s(["useCLICommands",0,function(){let{handleNewUrl:e}=(0,b.useHandleNewUrl)(),r=(0,f.useAppStore)(e=>e.setPendingDockFiles),i=g.useStoreAuto.use.setShowAddNewContentModal();(0,t.useEffect)(()=>
1{if(console.log("[CLI] useCLICommands useEffect running, isTauri:",(0,h.isTauri)()),!(0,h.isTauri)())return;let t=!1,a=e=>{let t=e.startsWith("file://")?decodeURIComponent(e.slice(7)):e;console.log("[CLI] Setting pending dock file:",t),r([t]),i(!0),p.toast.info("æ£å¨å¤çæ¬å°æä»¶...",{description:t.split("/").pop()||t})},o=async t=>{try{v(t)?(console.log("[CLI] Processing as URL:",t),await e(t),console.log("[CLI] handleNewUrl completed")):(console.log("[CLI] Processing as file:",t),a(t))}catch(e){console.error("[CLI] Error processing input:",e)}};return(async()=>{console.log("[CLI] processStoredCLIArgs called");try{let r=await (0,c.invoke)("get_cli_args");if(console.log("[CLI] Stored args:",r,"url:",r.url,"file:",r.file,"input:",r.input,"summarize:",r.summarize),t)return;r.url&&(console.log("[CLI] Processing stored URL:",r.url),e(r.url)),r.file&&(console.log("[CLI] Processing stored file:",r.file),a(r.file)),r.input&&(console.log("[CLI] Processing stored input:",r.input,"isUrl:",v(r.input)),await o(r.input),console.log("[CLI] processInput completed for:",r.input)),r.summarize&&(console.log("[CLI] Processing stored summarize:",r.summarize),await o(r.summarize)),(r.url||r.file||r.input||r.summarize)&&(await (0,c.invoke)("clear_cli_args"),console.log("[CLI] Cleared stored args"))}catch(e){console.error("[CLI] Failed to get stored CLI args:",e)}})(),(async()=>{try{let r=await (0,m.listen)("cli-open-url",r=>{t||(console.log("[CLI] Received URL:",r.payload),e(r.payload))}),i=await (0,m.listen)("cli-open-file",e=>{t||(console.log("[CLI] Received file:",e.payload),a(e.payload))}),n=await (0,m.listen)("cli-summarize",e=>{t||(console.log("[CLI] Summarize command:",e.payload),o(e.payload))}),s=await (0,m.listen)("cli-summarize-job",r=>{if(t)return;let i=r.payload;console.log("[CLI] Summarize job:",i),e(i.url,{useQueue:!0,silentQueueToast:!0,cliJobId:i.id,cliMode:i.subtitle?"subtitle":i.chapter?"chapter":"summary"})}),l=await (0,m.listen)("cli-quick-add-task",e=>{t||console.log("[CLI] Quick add task:",e.payload)}),u=await (0,m.listen)("cli-list-tasks",e=>{t||console.log("[CLI] List tasks")}),d=await (0,m.listen)("cli-inbox-tasks",e=>{t||console.log("[CLI] Inbox tasks")}),c=await (0,m.listen)("cli-add-task",e=>{t||console.log("[CLI] Add task:",e.payload)}),f=await (0,m.listen)("cli-list-tasks-filtered",e=>{t||console.log("[CLI] List tasks filtered:",e.payload)}),g=await (0,m.listen)("cli-done-task",e=>{t||console.log("[CLI] Done task:",e.payload)}),h=await (0,m.listen)("cli-run-agent",e=>{t||console.log("[CLI] Run agent:",e.payload)}),b=await (0,m.listen)("cli-path-setup-needed",e=>{if(t)return;let{command_name:r,shell_config:i,export_command:a}=e.payload;console.log("[CLI] PATH setup needed:",e.payload),p.toast.info(`CLI "${r}" installed`,{description:`Add to ${i}: ${a}`,duration:1e4,action:{label:"Copy",onClick:()=>{navigator.clipboard.writeText(a),p.toast.success("Copied to clipboard")}}})}),v=await (0,m.listen)("cli-args",async r=>{if(t)return;let i=r.payload;console.log("[CLI] Received cli-args from single-instance:",i),i.url&&(console.log("[CLI] Processing URL from single-instance:",i.url),await e(i.url)),i.file&&(console.log("[CLI] Processing file from single-instance:",i.file),a(i.file)),i.input&&(console.log("[CLI] Processing input from single-instance:",i.input),await o(i.input)),i.summarize&&(console.log("[CLI] Processing summarize from single-instance:",i.summarize),await o(i.summarize))});return()=>{r(),i(),n(),s(),l(),u(),d(),c(),f(),g(),h(),b(),v()}}catch(e){console.error("[CLI] Failed to setup event listeners:",e)}})(),()=>{t=!0}},[])}],331505);var x=e.i(360392);function y(e){return["Failed to execute 'removeChild' on 'Node'","Failed to execute 'insertBefore' on 'Node'","Failed to execute 'appendChild' on 'Node'","The node to be removed is not a child of this node","Cannot read properties of null (reading 'removeChild')","Cannot read properties of null (reading 'insertBefore')","ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications","ChunkLoadError","Loading chunk","parser.lazy","undefined is not an object (evaluating 'a.parser.lazy","Cannot read properties of undefined (reading 'lazy')"].some(t=>e.includes(t))}function w(e){if(e instanceof DOMException)return"QuotaExceededError"===e.name||22===e.code;let t=e instanceof Error?e.message:String(e);return t.includes("QuotaExceededError")||t.includes("exceeded the quota")}function k(){console.warn("[GlobalErrorHandler] localStorage é
é¢è¶
åºï¼æ£å¨èªå¨æ¸
çæ§ç¼å...");let e=(0,x.cleanupLegacyPolishedTextCache)(),t=(0,x.cleanupAiEditorCache)(3);console.log(`[GlobalErrorHandler] å·²æ¸
ç ${e+t} 个ç¼å项`)}e.s(["useGlobalErrorHandler",0,function(){(0,t.useEffect)(()=>{let e=e=>{let t=e.message||e.error?.message||"";return w(e.error)||w(t)?(k(),e.preventDefault(),e.stopPropagation(),!1):y(t)?(console.warn("[GlobalErrorHandler] Suppressed DOM error:",t),e.preventDefault(),e.stopPropagation(),!1):void 0},t=e=>{let t=e.reason?.message||String(e.reason)||"";return w(e.reason)||w(t)?(k(),e.preventDefault(),!1):y(t)?(console.warn("[GlobalErrorHandler] Suppressed unhandled rejection:",t),e.preventDefault(),!1):void 0};return window.addEventListener("error",e,!0),window.addEventListener("unhandledrejection",t,!0),()=>{window.removeEventListener("error",e,!0),window.removeEventListener("unhandledrejection",t,!0)}},[])}],822134)},718224,e=>{"use strict";
1var t=e.i(391398),r=e.i(38856),i=e.i(168489),a=e.i(412578),o=e.i(191788),n=e.i(974368),s=e.i(112349),l=e.i(791840),u=e.i(64202),d=e.i(676148),c=e.i(145138),m=e.i(8054),p=e.i(978382),f=e.i(162588),g=e.i(483558),h=e.i(603940),b=e.i(452220),v=e.i(434196),x=e.i(97895),y=e.i(791213),w=e.i(599449),k=e.i(746306),S=e.i(331505),T=e.i(822134),C=e.i(464980),j=e.i(192634),P=e.i(193555),A=e.i(977546);let N=function(e,t){return(0,A.default)(e,t)};var E=e.i(679935),I=e.i(193905),R=e.i(226568),L=e.i(975682),_=e.i(608714),M=e.i(496323),z=e.i(864860),F=e.i(376506),D=e.i(472865),U=e.i(506918),B=e.i(490914),V=e.i(561427);function $(e){let t=new Map;for(let[r,i]of Object.entries(e)){if(null==i||""===i)continue;let e=r.toLowerCase(),a="content-type"===e?function(e){let t=e.split(",").map(e=>e.trim()).filter(Boolean);if(0===t.length)return e;let r=t[0];return t.every(e=>e.toLowerCase()===r.toLowerCase())?r:e}(i):i,o=t.get(e);(null==o||o.toLowerCase()!==a.toLowerCase())&&t.set(e,a)}return Object.fromEntries(t)}var G=e.i(580966),O=e.i(819811),q=e.i(354100);let W=window.fetch.bind(window);function H(e){if(!e)return{};if(e instanceof Headers){let t={};return e.forEach((e,r)=>{t[r]=e}),t}return Array.isArray(e)?Object.fromEntries(e):e}async function X(e,t={}){let r,i=t,a=H(t.headers);e instanceof Request?(r=e.url,a={...H(e.headers),...a},i={method:e.method,body:e.body,...t,headers:a}):r=e instanceof URL?e.href:e;let o=O.isDev?G.DESKTOP_API_HOST_DEV:G.DESKTOP_API_HOST_PROD;if((0,G.isDesktopProxiedApiUrl)(r)){r=(0,G.rewriteDesktopApiUrl)(r,o);let e=(0,q.createClient)(),{data:{session:t}}=await e.auth.getSession();console.log("ð [fetchWithProxy] session:",{hasSession:!!t,hasAccessToken:!!t?.access_token,url:r});let n={...i,credentials:"omit"};return t?W(r,{...n,headers:$({...a,[V.X_ACCESS_TOKEN]:t.access_token,[V.X_REFRESH_TOKEN]:t.refresh_token,[V.X_CLIENT_TYPE]:V.ClientTypes.Desktop})}):W(r,{...n,headers:$(a)})}return W(r,i)}(0,M.isDesktop)()&&(window.fetch=X);var Y=e.i(334620),K=e.i(416207);async function Q(t){try{let{open:r}=await e.A(698112);await r(t)}catch(e){console.error("Failed to open URL in Tauri:",e)}}function J(){return{closed:!1,close:()=>{},document,window,self:window,location}}async function Z(t){try{let r=(await e.A(366287)).default;await r.push(t)}catch(e){console.error("Failed to navigate in current window:",e),window.location.assign(t)}}let ee=(0,i.default)(()=>e.A(659637),{loadableGenerated:{modules:[478477]},ssr:!1}),et=(0,i.default)(()=>e.A(187121),{loadableGenerated:{modules:[340696]},ssr:!1}),er=(0,i.default)(()=>e.A(27732),{loadableGenerated:{modules:[292745]},ssr:!1}),ei=(0,i.default)(()=>e.A(988174),{loadableGenerated:{modules:[239955]},ssr:!1}),ea=(0,i.default)(()=>e.A(326011),{loadableGenerated:{modules:[261374]},ssr:!1}),eo=(0,i.default)(()=>e.A(620380),{loadableGenerated:{modules:[130254]},ssr:!1}),en=(0,i.default)(()=>e.A(80746),{loadableGenerated:{modules:[98841]},ssr:!1}),es=(0,i.default)(()=>e.A(217552),{loadableGenerated:{modules:[652491]},ssr:!1}),el=(0,i.default)(()=>e.A(964717),{loadableGenerated:{modules:[311587]},ssr:!1}),eu=(0,i.default)(()=>e.A(841866),{loadableGenerated:{modules:[507003]},ssr:!1}),ed=(0,i.default)(()=>e.A(402759),{loadableGenerated:{modules:[604597]},ssr:!1}),ec=(0,i.default)(()=>e.A(671911),{loadableGenerated:{modules:[177506]},ssr:!1}),em=(0,i.default)(()=>e.A(404558),{loadableGenerated:{modules:[646961]},ssr:!1}),ep=(0,i.default)(()=>e.A(210826).then(e=>e.DesktopAppContextMenu),{loadableGenerated:{modules:[764973]},ssr:!1});function ef({Component:e,pageProps:i,router:a}){let{messages:l,blogMeta:p,...g}=i;(0,T.useGlobalErrorHandler)();let h=(0,j.useIdleDeferredFlag)(),y=(0,C.useGoogleAvailable)(),A=(0,L.useSession)(),{color:z}=(0,D.useThemeStore)();!function(){let{t:e}=(0,I.useTranslation)(),t=(0,L.useSession)(),r=(0,L.useSupabaseClient)(),i=t?.user?.id,a=(0,o.useRef)(R.SUMMARY_SETTINGS_DEFAULTS),n=(0,o.useRef)(null),s=(0,o.useRef)(!1),l=(0,o.useRef)(!1),u=(0,P.useRevalidateTables)([{schema:"public",table:"custom_prompts"}]),{data:d,isLoading:c}=(0,P.useQuery)(r.from("user_summary_settings").select("*").eq("user_id",i||"").maybeSingle(),{enabled:!!i}),{mutate:m}=(0,P.useUpsertMutation)(r.from("user_summary_settings"),["user_id"],void 0,{onConflict:"user_id",ignoreDuplicates:!1,onError:e=>{console.error("Error saving user summary settings:",e)}}),{mutate:p}=(0,P.useDeleteMutation)(r.from("user_summary_settings"),["user_id"],void 0,{onError:e=>{console.error("Error deleting user summary settings:",e)}}),f=(0,o.useCallback)((e,t)=>{i&&(n.current=e,m([{user_id:i,model:e.model||null,custom_prompt:null,output_language:e.outputLanguage||null,audio_language:e.audioLanguage||null,whisper_prompt:e.whisperPrompt||null,show_emoji:e.showEmoji??null,show_timestamp:e.showTimestamp??null,detail_level:e.detailLevel??null,sentence_number:e.sentenceNumber??null}],{onSuccess:()=>{a.current=e,n.current=null,t?.onSuccess?.()},onError:()=>{n.current=null,t?.onError?.()}}))},[m,i]);(0,o.useEffect)(()=>{s.current=!1,n.current=null,l.current=!1},[i]),(0,o.useEffect)(()=>
1{if(!i||l.current)return;let t=d?.custom_prompt?.trim();t&&(l.current=!0,(async()=>{try{let{data:a,error:o}=await r.from("custom_prompts").select("id,title,custom_prompt,display_order").eq("user_id",i);if(o)throw o;let n=(a||[]).find(e=>e.custom_prompt?.trim()===t)?.id;if(!n){let a=t.replace(/\s+/g," ").slice(0,12)||e("æçèªå®ä¹æ»ç»"),{data:o,error:s}=await r.from("custom_prompts").insert({user_id:i,title:a,custom_prompt:t,display_order:0}).select("id").single();if(s||!o)throw s??Error("insert custom_prompts failed");n=o.id}for(let e of(a||[]).filter(e=>999===e.display_order&&e.id!==n))await r.from("custom_prompts").update({display_order:0}).eq("id",e.id);await r.from("custom_prompts").update({display_order:999}).eq("id",n);let{error:s}=await r.from("user_summary_settings").update({custom_prompt:null}).eq("user_id",i);if(s)throw s;await u(),E.toast.info(e("å·²æä½ ä¹åçèªå®ä¹æ»ç»è®¾ä¸ºé»è®¤æç¤ºè¯"),{description:e("卿»ç»è®¾ç½®ä¸å¯éæ¶æ´æ¢æåæ¶")})}catch(e){console.error("[migrateLegacyCustomPrompt] failed, will retry next session:",e),l.current=!1}})())},[i,d,r,u,e]),(0,o.useEffect)(()=>{!i||c||d||s.current||(s.current=!0,f(R.SUMMARY_SETTINGS_DEFAULTS,{onError:()=>{s.current=!1}}))},[i,c,d,f]),(0,o.useEffect)(()=>{let e=R.useSummarizeConfigStore.getState();if(!i){e.setSummarySettings(R.SUMMARY_SETTINGS_DEFAULTS),e._setInitialized(!1),a.current=R.SUMMARY_SETTINGS_DEFAULTS,n.current=null;return}if(d){let t={model:d.model||void 0,outputLanguage:d.output_language||void 0,audioLanguage:d.audio_language||void 0,whisperPrompt:d.whisper_prompt||void 0,showEmoji:d.show_emoji??void 0,showTimestamp:d.show_timestamp??void 0,detailLevel:d.detail_level??void 0,sentenceNumber:d.sentence_number??void 0},r={...R.SUMMARY_SETTINGS_DEFAULTS,...t},i=(0,R.extractSummarySettings)(r);N(i,a.current)||(a.current=i,n.current=null,e.setSummarySettings(r),e._setInitialized(!0))}else c||(a.current=R.SUMMARY_SETTINGS_DEFAULTS,n.current=null,e.setSummarySettings(R.SUMMARY_SETTINGS_DEFAULTS),e._setInitialized(!0))},[i,d,c]),(0,o.useEffect)(()=>{if(i)return R.useSummarizeConfigStore.subscribe(e=>{if(!e._isInitialized)return;let t=(0,R.extractSummarySettings)(e);N(t,a.current)||n.current&&N(t,n.current)||f(t)})},[i,f]),(0,o.useCallback)(()=>{let e=R.useSummarizeConfigStore.getState();s.current=!1,n.current=null,a.current=R.SUMMARY_SETTINGS_DEFAULTS,i&&p({user_id:i}),e.reset()},[i,p])}(),(0,S.useCLICommands)(),(0,o.useEffect)(()=>{if(!(0,M.isTauri)())return;(0,_.clearTauriReloadPathIfCurrentMatches)();let e=()=>{(0,_.rememberTauriReloadPath)()};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}},[]);let B=U.useStoreAuto.use.showSignInModal(),V=U.useStoreAuto.use.showAboutDialog(),$=U.useStoreAuto.use.showShortcutsDialog(),G=a.pathname,O=a.asPath||a.pathname,{isMdxBlogPost:q,frontMatter:W}=(0,k.useBlogPostConfig)(G,O,e,p),H=c.default,X=(0,o.useMemo)(()=>e.getLayout?a.pathname.startsWith("/features")?r=>(0,t.jsx)(H,{pathname:a.pathname,children:e.getLayout(r)}):t=>e.getLayout(t):q?e=>(0,t.jsx)(H,{pathname:a.pathname,children:(0,t.jsx)(d.default,{frontMatter:W,children:(0,t.jsx)(r.MDXProvider,{components:n.mdxComponents,children:e})})}):a.pathname.startsWith("/features")?e=>(0,t.jsx)(H,{pathname:a.pathname,children:(0,t.jsx)(u.default,{children:e})}):e=>(0,t.jsx)(H,{pathname:a.pathname,children:e}),[e.getLayout,q,W,a.pathname]);return(0,o.useEffect)(()=>{!function(){if(!(0,M.isTauri)())return;let e=window;if(e.__aigtdWindowOpenPolyfill)return;e.__aigtdWindowOpenPolyfill=!0;let t=window.open;window.open=function(e,r,i){if(!e)return t.call(window,e,r,i);let a=e.toString(),o=(0,K.toAppPath)(a,window.location.origin);return o?(0,K.windowOpenWantsNewContext)(r)?(0,Y.openContentInNewWindow)(o):Z(o):Q(a),J()},document.addEventListener("click",e=>{let t=(0,K.resolveClickedAnchor)(e.target),r=t?.getAttribute("href")??null;(0,K.shouldOpenInSystemBrowser)(r)&&r&&(e.preventDefault(),e.stopPropagation(),Q(r))},{capture:!0})}()},[]),(0,t.jsxs)("div",{className:(0,M.isTauri)()?"tauri-app":"",children:[(0,t.jsx)(b.default,{}),(0,t.jsx)(s.AnalyticsProvider,{userId:A?.user?.id,enableClarity:h,children:(0,t.jsxs)(f.TaskQueueProvider,{children:[(0,t.jsx)("div",{"data-iframe-hide":!0,children:(0,t.jsx)(es,{})}),y&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eo,{}),(0,t.jsx)(en,{})]}),X((0,t.jsx)(e,{...g})),(0,t.jsx)(m.VideoPlaylist,{}),(0,t.jsx)(ee,{trpcAvailable:!0}),B&&(0,t.jsx)(er,{}),(0,t.jsx)(ei,{}),(0,t.jsx)(ea,{}),(0,t.jsx)(x.Toaster,{}),(0,t.jsx)(v.Toaster,{richColors:"default"!==z}),(0,M.isTauri)()&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(el,{}),(0,t.jsx)(eu,{}),(0,t.jsx)(em,{}),(0,t.jsx)(ep,{})]}),V?(0,t.jsx)(ed,{}):null,$?(0,t.jsx)(ec,{}):null,!(0,M.isTauri)()&&(0,t.jsx)(w.default,{}),(0,F.isMobileWechat)()&&(0,t.jsx)(et,{})]})})]})}let eg=B.api.withTRPC(function(e){let{messages:r}=e.pageProps,i=e.router.locale??e.router.defaultLocale??z.defaultLocale;return(0,t.jsx)(l.default,{children:(0,t.jsx)(p.QueryPersistenceProvider,{children:(0,t.jsx)(a.NuqsAdapter,{children:(0,t.jsx)(y.TooltipProvider,{children:(0,t.jsx)(g.SidebarDndProvi
1der,{children:(0,t.jsx)(I.I18nProvider,{locale:i,messages:r,children:(0,t.jsx)(h.ThemeProvider,{children:(0,t.jsx)(ef,{...e})})})})})})})})});e.s(["default",0,eg],718224)},791840,64202,e=>{"use strict";var t=e.i(391398),r=e.i(191788),i=e.i(679935),a=e.i(611073),o=e.i(731964),n=e.i(490914),s=e.i(496323);let l=null;async function u(){if(l)return l;if(!(0,s.isTauri)())return null;try{let{getVersion:t}=await e.A(342933);return l=await t()}catch{return null}}function d(e){if(!e)return!1;let t=e.message||e.toString();return["Failed to execute 'removeChild' on 'Node'","Failed to execute 'insertBefore' on 'Node'","Failed to execute 'appendChild' on 'Node'","The node to be removed is not a child of this node","The object can not be found here","Cannot read properties of null (reading 'removeChild')","Cannot read properties of null (reading 'insertBefore')","ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications","ChunkLoadError","Loading chunk","parser.lazy","undefined is not an object (evaluating 'a.parser.lazy","Cannot read properties of undefined (reading 'lazy')","can't access property 'type', node is undefined"].some(e=>t.includes(e))}function c(){let[n,l]=r.default.useState({kind:"checking"}),u=r.default.useRef(null),d=r.default.useCallback(async()=>{if(!(0,s.isTauri)())return void l({kind:"web"});l({kind:"checking"});try{let{check:t}=await e.A(481285),r=await t();r?(u.current=r,l({kind:"available",version:r.version})):l({kind:"up-to-date"})}catch(e){l({kind:"error",message:e instanceof Error?e.message:String(e)})}},[]);r.default.useEffect(()=>{d()},[d]);let c=async()=>{if("web"===n.kind)return void window.open("https://bibigpt.co/apps/desktop","_blank");if("error"===n.kind)return void d();if("ready"===n.kind){let{relaunch:t}=await e.A(461777);try{await u.current?.install(),await t()}catch(t){let e=t instanceof Error?t.message:String(t);i.toast.error("å®è£ æ´æ°å¤±è´¥ Install failed",{description:e}),l({kind:"error",message:e})}return}if("available"!==n.kind||!u.current)return;let t=n.version;l({kind:"downloading",version:t});let r=i.toast.loading(`ä¸è½½æ´æ° v${t}...`);try{await u.current.download(),i.toast.success("ä¸è½½å®æï¼ç¹å»æé®éå¯ Click to relaunch",{id:r,duration:5e3}),l({kind:"ready"})}catch(t){let e=t instanceof Error?t.message:String(t);i.toast.error("ä¸è½½å¤±è´¥ Download failed",{id:r,description:e}),l({kind:"error",message:e})}},m="checking"===n.kind||"downloading"===n.kind||"up-to-date"===n.kind,p=(()=>{switch(n.kind){case"checking":return"æ£æ¥æ´æ°ä¸... Checking";case"up-to-date":return`å·²æ¯ææ°çæ¬ ${o.VERSION_NUMBER}`;case"available":return`æ´æ°å° v${n.version} Update`;case"downloading":return`ä¸è½½ä¸ v${n.version}... Downloading`;case"ready":return"éå¯ä»¥å®ææ´æ° Restart";case"error":return"éè¯æ£æ¥ Retry";case"web":return"åå¾ä¸è½½ææ°ç Download"}})(),f="available"===n.kind||"ready"===n.kind||"web"===n.kind?"default":"secondary";return(0,t.jsx)(a.Button,{type:"button",variant:f,onClick:c,disabled:m,children:p})}function m({error:e,errorInfo:l,disabled:d,onSuccess:c}){let[p,f]=r.default.useState(!1),{mutate:g,isPending:h}=n.api.webhook.errorReport.useMutation({onSuccess:e=>{e.success?(i.toast.success(e.message),f(!0),c?.()):i.toast.error(e.message)},onError:e=>{i.toast.error("Error report failed / éè¯¯ä¸æ¥å¤±è´¥"),console.error("éè¯¯ä¸æ¥å¤±è´¥:",e)}}),b=async()=>{if(!e)return;let t=await u(),r="string"==typeof e?.stack?e.stack:"",i="string"==typeof l?l:"",a=[r&&`JS stack: 2${r}`,i&&`Component stack: 3${i}`].filter(Boolean).join("\n\n--------------------------------\n");g({error:e.toString(),errorInfo:a.slice(0,12e3),currentUrl:window.location.href,userAgent:navigator.userAgent,timestamp:new Date().toISOString(),appVersion:o.VERSION_NUMBER,buildTime:"2026-09-27T16:36:46.567Z",isTauri:(0,s.isTauri)(),desktopVersion:t||""})};return(0,t.jsx)(a.Button,{type:"button",variant:"secondary",onClick:b,disabled:d||h||p,children:h?"Reporting...":p?"已䏿¥ Reported":"䏿¥é误 Report"})}class p extends r.default.Component{constructor(e){super(e),this.state={hasError:!1,error:null,errorInfo:null,isStackOverflow:!1}}static getDerivedStateFromError(e){return d(e)?(console.warn("[ErrorBoundary] Ignored DOM error:",e.message),{hasError:!1}):!function(e){if(!e)return!1;let t=e.message||e.toString();return t.includes("Maximum call stack size exceeded")||t.includes("too much recursion")||"RangeError"===e.name}(e)?{hasError:!0}:(console.error("[ErrorBoundary] Stack overflow error:",e.message),{hasError:!0,isStackOverflow:!0})}componentDidCatch(e,t){d(e)?console.warn("[ErrorBoundary] Caught ignorable DOM error:",{error:e.message,componentStack:t?.componentStack?.slice(0,500)}):(this.setState({error:e,errorInfo:t}),console.log({error:e,errorInfo:t}))}render(){return this.state.hasError?this.state.isStackOverflow?(0,t.jsxs)("div",{className:"mx-auto flex min-h-screen flex-col items-center justify-center p-4 font-sans",children:[(0,t.jsx)("h2",{className:"mb-2 text-xl",children:"å 容渲æå¼å¸¸ Content Rendering Error"}),(0,t.jsxs)("div",{className:"mb-4 max-w-xl text-center text-muted-foreground",children:[(0,t.jsxs)("p",{className:"mb-2",children:["å½åå 容å å«è¿äºå¤æçç»æï¼æ æ³æ£å¸¸æ¾ç¤ºã",(0,t.jsx)("br",{}),"The content contains complex structures that cannot be rendered properly."]}),(0,t.jsxs)("p",{className:"text-sm",children:["è¿å¯è½æ¯ç±äºå 容ä¸ç HTML/Markdown åµå¥å±çº§è¿æ·±å¯¼è´çã",(0,t.jsx)("br",{}),"This may be caused by deeply nested HTML/Markdown structures."]})]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(a.Button,{type:"button",onClick:()=>window.location.reload(),children:"å·æ°é¡µé¢ Refresh Page"}),(0,t.jsx)(a.Button,{type:"button",variant:"secondary",onClick:()=>window.history.back(),children:"è¿åä¸ä¸é¡µ Go Back"}),(0,t.jsx)(c,{}),(0,t.jsx)(m,{error:this.state.error,errorInfo:this.state.errorInfo?.componentStack})]})]}):(0,t.jsxs)("div",{className:"mx-auto flex min-h-screen flex-col items-center justify-center font-sans",children:[(0,t.jsx)("h2",{className:"mb-2 text-xl",children:"Ops! ååï¼åºéäºï¼"}),(0,t.jsxs)("p",{className:"mb-2 text-sm text-muted-foreground",children:["å½åçæ¬ ",o.VERSION_NUMBER]}),(0,t.jsxs)("div",{className:"mb-4 max-w-3xl overflow-auto rounded bg-background/80 p-4",children:[(0,t.jsx)("p",{className:"font-bold",children:"Error é误信æ¯ï¼"}),(0,t.jsx)("pre",{className:"text-sm",children:(0,t.jsx)("code",{children:this.state.error&&this.state.error.toString()})}),this.state.errorInfo&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"mt-2 font-bold",children:"Component Stack ç»ä»¶å æ ï¼"}),(0,t.jsx)("pre",{className:"text-sm",children:(0,t.jsx)("code",{children:this.state.errorInfo.componentStack.slice(0,1e3)})})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap justify-center gap-3",children:[(0,t.jsx)(a.Button,{type:"button",onClick:()=>this.setState({hasError:!1,error:null,errorInfo:null}),children:"Try again? éè¯"}),(0,s.isTauri)()&&(0,t.jsx)(c,{}),(0,t.jsx)(m,{error:this.state.error,errorInfo:this.state.errorInfo?.componentStack})]})]}):this.props.children}}e.s(["default",0,p],791840);var f=e.i(168489),g=e.i(203828),h=e.i(426878);let b="https://bibigpt.co",v=[{slug:"openclaw-bibigpt-skill",namespace:"openclaw-bibigpt-skill",config:{name:"OpenClaw bibigpt-skill: AI Video for Agents | BibiGPT",description:"Add bibigpt-skill to OpenClaw or Claude Code in one command. Summarize Bilibili, YouTube, TikTok, Douyin, and podcasts â platforms OpenClaw cannot natively reach.",applicationCategory:"ProductivityApplication",aggregateRating:{ratingValue:4.9,reviewCount:8800}}},{slug:"ai-answer",namespace:"aiAnswerFeature"},{slug:"video-to-slides-ai-ppt-maker",namespace:"video-to-slides-ai-ppt-maker",config:{name:"Video to Slides AI PPT Maker | BibiGPT",description:"Extract slides from any video with AI scene detection. Enhance with AI, add per-slide TTS narration, and export as PDF, PPTX, or narrated video.",applicationCategory:"ProductivityApplication",aggregateRating:{ratingValue:4.8,reviewCount:6200}}},{slug:"ai-bilibili-summary",namespace:"aiBilibiliSummaryFeature"},{slug:"bilibili-video-to-text",namespace:"bilibili-video-to-text",config:{name:"Bilibili Video to Text Converter | BibiGPT",description:"Convert Bilibili videos to accurate text transcripts and structured notes. Export to TXT, Markdown, or Notion â fast, free, no sign-up required.",applicationCategory:"MultimediaApplication",aggregateRating:{ratingValue:4.8,reviewCount:9500}}},{slug:"bilibili-video-search",namespace:"bilibili-video-search"},{slug:"bilibili-subtitle-downloader",namespace:"bilibili-subtitle-downloader",config:{name:"Bilibili Subtitle Downloader & Extractor | BibiGPT",description:"Extract and download Bilibili video subtitles instantly. Export as SRT or TXT, supports AI transcription for videos without captions â free, no sign-up required.",applicationCategory:"MultimediaApplication",aggregateRating:{ratingValue:4.9,reviewCount:15e3}}},{slug:"ai-douyin-summary",namespace:"ai-douyin-summary",config:{aggregateRating:{ratingValue:4.8,reviewCount:8500}}},{slug:"ai-kuaishou-summary",namespace:"ai-kuaishou-summary",config:{name:"AI Kuaishou Summary Generator | Short Video Scripts | BibiGPT",description:"Turn any Kuaishou video into structured hooks, scripts, and CTAs with BibiGPT AI. Join the waitlist for the 700M+ MAU Chinese short-video AI summary tool â free to join.",applicationCategory:"MultimediaApplication",aggregateRating:{ratingValue:4.9,reviewCount:7200}}},{slug:"douyin-video-to-text",namespace:"douyin-video-to-text",config:{name:"Douyin Video to Text Converter | BibiGPT",description:"Convert Douyin videos to text with AI-powered transcription. Extract subtitles and export as SRT, TXT, or PDF â fast, accurate, and free to try.",applicationCategory:"MultimediaApplication",aggregateRating:{ratingValue:4.9,reviewCount:11200}}},{slug:"douyin-transcript-generator",namespace:"douyin-transcript-generator",config:{name:"Douyin Transcript Generator | BibiGPT",description:"Generate accurate Douyin video transcripts with AI-powered transcription. Get time-stamped, searchable text from any Douyin video. Export as SRT, TXT, or PDF.",applicationCategory:"MultimediaApplication",aggregateRating:{ratingValue:4.9,reviewCount:10500}}},{slug:"douyin-subtitle-downloader",namespace:"douyin-subtitle-downloader",config:{name:"Douyin Subtitle Downloader | BibiGPT",description:"Download Douyin video subtitles instantly. Export as SRT, TXT, or PDF â perfect for study notes, content creation, and script analysis.",applicationCategory:"MultimediaApplication",aggregateRating:{ratingValue:4.94,reviewCount:12890}}},{slug:"ai-local-file-speech-to-text",namespace:"aiLocalFileSpeechToText",config:{name:"BibiGPT AI Local Speech-to-Text",description:"Upload local recordings on macOS/Windows and let BibiGPT deliver diarized transcripts plus instant summaries.",applicationCategory:"ProductivityApplication",aggregateRating:{ratingValue:4.94,reviewCount:12890}}},{slug:"ai-music-video-generator",namespace:"aiMusicVideoGenerator",config:{name:"AI Music Video Generator",description:"Combine BibiGPT audiograms with AI visuals to produce lyric-ready music videos from Bilibili or Suno clips.",applicationCategory:"MultimediaApplication"}},{slug:"ai-podcast-summary",namespace:"ai-podcast-summary",config:{name:"AI Podcast Summary Generator | BibiGPT",description:"Transform podcast episodes into structured AI summaries. Capture chapter markers, speaker quotes, and action items ready for show notes â Spotify, Apple Podcasts, RSS.",applicationCategory:"MultimediaApplication",aggregateRating:{ratingValue:4.9,reviewCount:10500}}},{slug:"podcast-transcript-generator",namespace:"podcast-transcript-generator",config:{name:"Podcast Transcript Generator | Free AI Transcription | BibiGPT",description:"Transcribe any podcast episode to text instantly with BibiGPT. Supports Apple Podcasts, Spotify, RSS feeds and 30+ languages. Download SRT/TXT/PD
3F â free, no sign-up required.",applicationCategory:"MultimediaApplication",aggregateRating:{ratingValue:4.8,reviewCount:9500}}},{slug:"ai-podcast-to-article",namespace:"aiPodcastToArticle",config:{name:"æå®¢æ¹åæç« | BibiGPT",description:"尿客é³é¢è½¬æ¢ä¸ºç²¾ç¼çæç« ï¼èªå¨è¯å«å¯¹è¯ç»æä¸ç²¾å½©è§ç¹ï¼è®©å
å®¹æ´æçè§£ä¸å享ã",applicationCategory:"ProductivityApplication"}},{slug:"ai-summary-local-subtitle-text",namespace:"aiSummaryLocalSubtitleTextFeature"},{slug:"ai-tiktok-summary",namespace:"aiTiktokSummaryFeature"},{slug:"tiktok-video-to-text",namespace:"tiktok-video-to-text"},{slug:"tiktok-video-search",namespace:"tiktok-video-search"},{slug:"tiktok-video-finder",namespace:"tiktok-video-finder"},{slug:"tiktok-viral-finder",namespace:"tiktok-viral-finder",config:{name:"TikTok Viral Trend Finder â Spot Hits Worth Recreating | BibiGPT",description:"Find viral TikTok trends worth recreating. BibiGPT scans recent hits, reads comment demand for tutorials, and surfaces ready-to-copy recipes â catch low-follower breakouts before they peak.",applicationCategory:"MultimediaApplication",aggregateRating:{ratingValue:4.9,reviewCount:3200}}},{slug:"tiktok-subtitle-downloader",namespace:"tiktok-subtitle-downloader",config:{name:"TikTok Subtitle Downloader | BibiGPT",description:"Download TikTok video subtitles and captions instantly. Extract text from any TikTok video with AI-powered transcription â free, no sign-up required.",applicationCategory:"MultimediaApplication",aggregateRating:{ratingValue:4.8,reviewCount:6500}}},{slug:"tiktok-caption-downloader",namespace:"tiktok-caption-downloader",config:{name:"TikTok Caption Downloader & Extractor | BibiGPT",description:"Download TikTok captions and closed captions instantly. Extract CC text from any TikTok video with AI â free SRT/TXT export, no sign-up required.",applicationCategory:"MultimediaApplication",aggregateRating:{ratingValue:4.8,reviewCount:6500}}},{slug:"ai-video-summary-visual-content",namespace:"aiVideoSummaryVisualContent",config:{name:"BibiGPT AI Vision Summary",description:"Process offline videos with multimodal AI to highlight frames, scenes, and talking points for storyboard-ready recaps.",applicationCategory:"MultimediaApplication",aggregateRating:{ratingValue:4.96,reviewCount:8421}}},{slug:"ai-video-to-illustrated-article",namespace:"aiVideoToArticle",config:{name:"AI Video to Illustrated Article",description:"Convert webinars or livestreams into illustrated, publication-ready longform articles with CTAs and key art.",applicationCategory:"ProductivityApplication",aggregateRating:{ratingValue:4.93,reviewCount:5231}}},{slug:"ai-video-to-social-image",namespace:"aiVideoToSocialImage",config:{name:"BibiGPT Xiaohongshu Visualizer",description:"Generate Xiaohongshu-ready social graphics from any workshop, vlog, or webinar video in seconds.",applicationCategory:"MultimediaApplication",aggregateRating:{ratingValue:4.97,reviewCount:6120}}},{slug:"ai-web-reactor",namespace:"aiWebReactor",config:{name:"BibiGPT AI ç½é¡µä¼´è¯»å¡ç",description:"èªå¨çæå¯¹è¯å¡çãæ»ç»å¡çä¸ç¥è¯å¡çï¼è®©ç½é¡µæµè§ä¸é
读æ´é«æã",applicationCategory:"ProductivityApplication"}},{slug:"article-summarizer",namespace:"article-summarizer",config:{name:"BibiGPT Article Summarizer",description:"Paste a webpage link and get structured summaries and key points in seconds.",applicationCategory:"ProductivityApplication"}},{slug:"ai-youtube-summary",namespace:"ai-youtube-summary",config:{name:"AI YouTube Summary Generator | BibiGPT",description:"Summarize any YouTube video with AI. Get structured notes, key highlights, and chapter breakdowns in seconds â supports 50+ languages.",applicationCategory:"ProductivityApplication",aggregateRating:{ratingValue:4.98,reviewCount:96542}}},{slug:"youtube-subtitle-downloader",namespace:"youtube-subtitle-downloader",config:{name:"Free YouTube Subtitle Downloader | BibiGPT",description:"Download official YouTube subtitles for free. Export to SRT, TXT, or PDF in one click. AI transcription available when official subtitles are missing.",applicationCategory:"UtilitiesApplication",aggregateRating:{ratingValue:4.91,reviewCount:32e3}}},{slug:"youtube-to-text-converter",namespace:"youtube-to-text-converter"},{slug:"youtube-video-search",namespace:"youtube-video-search"},{slug:"free-video-search-youtube-bilibili-tiktok",namespace:"videoExploreFeaturePage",config:{aggregateRating:{ratingValue:4.92,reviewCount:18234}}},{slug:"macos-local-video-search",namespace:"macosLocalVideoSearch",config:{name:"macOS Local Video Search",description:"Index and search your offline macOS videos with transcripts, semantic highlights, and instant playback.",applicationCategory:"ProductivityApplication"}}
3,{slug:"short-url-to-long-url-converter",namespace:"shortUrlConverter",config:{name:"Short URL to Long URL Converter | BibiGPT",description:"Expand shortened URLs back to their original long URLs. Supports b23.tv, xhslink.com, v.douyin.com, and 12+ platforms with batch processing.",applicationCategory:"UtilitiesApplication",aggregateRating:{ratingValue:4.9,reviewCount:12e3}}},{slug:"sora-2-ai-video-generator",namespace:"sora2VideoGenerator",config:{name:"Sora 2 AI Video Generator",description:"Craft cinematic prompts, style references, and production checklists to drive Sora 2 video shoots.",applicationCategory:"MultimediaApplication"}},{slug:"wan-2-7-ai-video-generator",namespace:"wan27VideoGenerator",config:{name:"Wan 2.7 AI Video Generator",description:"Four video creation modes: text-to-video, image-to-video, reference-to-video style transfer, AI video editing. Watermark-free HD output.",applicationCategory:"MultimediaApplication"}},{slug:"study-guide-maker",namespace:"studyGuideMakerFeature"},{slug:"video-to-text-converter",namespace:"videoToTextConverterFeature",config:{name:"BibiGPT Video to Text Converter",description:"Convert YouTube, Bilibili, or local uploads into subtitles, highlights, and export-ready Markdown within minutes.",applicationCategory:"ProductivityApplication",aggregateRating:{ratingValue:4.95,reviewCount:5e4}}},{slug:"online-video-to-text",namespace:"online-video-to-text"},{slug:"local-video-to-text",namespace:"local-video-to-text"},{slug:"free-online-subtitle-translator",namespace:"free-online-subtitle-translator",config:{name:"Free Online Subtitle Translator - SRT & VTT Translation | BibiGPT",description:"Translate subtitle files (SRT, VTT, ASS) into 15+ languages with AI. Upload your subtitle, pick a language, and download the translated file â free online tool by BibiGPT.",applicationCategory:"UtilitiesApplication",aggregateRating:{ratingValue:4.88,reviewCount:9800}}},{slug:"youtube-to-obsidian-notes",namespace:"youtubeToObsidianNotesFeature"},{slug:"youtube-transcript-generator",namespace:"youtubeTranscriptFeaturePage",config:{name:"BibiGPT YouTube Transcript Generator",description:"Fetch official YouTube subtitles, export TXT/SRT/PDF, and feed them into AI summaries instantly.",applicationCategory:"UtilitiesApplication",aggregateRating:{ratingValue:4.91,reviewCount:784289}}},{slug:"youtube-video-to-notes",namespace:"youtubeToNotesFeature"},{slug:"xiaohongshu-video-to-text",namespace:"xiaohongshu-video-to-text",config:{name:"BibiGPT å°çº¢ä¹¦è§é¢è½¬æå",description:"ä¸é®æåå°çº¢ä¹¦è§é¢åå¹ï¼å¯¼åº TXT/SRT/PDF æ ¼å¼ï¼å¿«éè·åè§é¢æåå
容ã",applicationCategory:"UtilitiesApplication",aggregateRating:{ratingValue:4.8,reviewCount:3200}}},{slug:"xiaohongshu-subtitle-downloader",namespace:"xiaohongshu-subtitle-downloader"},{slug:"baidu-cloud-drive-video-to-text",namespace:"baidu-cloud-drive-video-to-text",config:{name:"BibiGPT ç¾åº¦ç½çè§é¢è½¬æå",description:"ç¾åº¦ç½çè§é¢è½¬æåï¼æ¯æé³è§é¢è½¬æåãä»ç¾åº¦ç½çç´æ¥å¯¼å
¥è§é¢ï¼èªå¨è½¬åææå稿ãäº®ç¹æè¦ä¸å¯å¯¼åºç Markdownã",applicationCategory:"ProductivityApplication"}},{slug:"free-speech-to-text-online",namespace:"free-speech-to-text-online",config:{name:"Free Speech to Text Online - Browser-Based Transcription | BibiGPT",description:"Convert speech to text directly in your browser. No upload, no signup, 100% private. Powered by OpenAI Whisper running locally via WebGPU.",applicationCategory:"UtilitiesApplication",aggregateRating:{ratingValue:4.92,reviewCount:15200}}},{slug:"free-audio-transcription-online",namespace:"free-audio-transcription-online",config:{name:"Free Audio Transcription Online - Transcribe Audio in Browser | BibiGPT",description:"Transcribe audio files for free in your browser. No server upload, no account needed. Powered by OpenAI Whisper with WebGPU acceleration.",applicationCategory:"UtilitiesApplication",aggregateRating:{ratingValue:4.89,reviewCount:12800}}},{slug:"free-text-summarizer",namespace:"free-text-summarizer",config:{name:"Free Text Summarizer - AI-Powered Browser Summary | BibiGPT",description:"Summarize any text with AI directly in your browser. No upload, no signup, 100% private. Powered by Qwen3 running locally via WebGPU.",applicationCategory:"UtilitiesApplication",aggregateRating:{ratingValue:4.88,reviewCount:8600}}}
3,{slug:"free-video-summarizer",namespace:"free-video-summarizer",config:{name:"Free Video Summarizer - Transcribe & Summarize in Browser | BibiGPT",description:"Upload a video file and get AI-powered transcription and summary directly in your browser. No server upload needed, 100% private.",applicationCategory:"UtilitiesApplication",aggregateRating:{ratingValue:4.9,reviewCount:9200}}},{slug:"free-audio-summarizer",namespace:"free-audio-summarizer",config:{name:"Free Audio Summarizer - Transcribe & Summarize Audio in Browser | BibiGPT",description:"Transcribe and summarize audio files with AI in your browser. No upload to servers, completely offline and private.",applicationCategory:"UtilitiesApplication",aggregateRating:{ratingValue:4.89,reviewCount:7800}}},{slug:"other-cloud-drive-video-to-text",namespace:"other-cloud-drive-video-to-text",config:{name:"BibiGPT Other Cloud Drive Video to Text",description:"Use BibiGPT desktop folder auto-import to automatically monitor cloud drive sync folders, meeting recordings, OBS live streams, and transcribe new files automatically.",applicationCategory:"ProductivityApplication"}},{slug:"free-audio-noise-remover",namespace:"free-audio-noise-remover",config:{name:"Free Audio Noise Remover Online | BibiGPT",description:"Remove background noise from audio and video files online for free. Browser-based denoiser with adjustable levels â no upload to server, 100% private.",applicationCategory:"MultimediaApplication",aggregateRating:{ratingValue:4.88,reviewCount:8500}}},{slug:"twitter-post-image-generator",namespace:"social-card-generator.twitter"},{slug:"weibo-hot-topic-card-generator",namespace:"social-card-generator.weibo"},{slug:"xiaohongshu-note-card-generator",namespace:"social-card-generator.xiaohongshu"}].reduce((e,t)=>{let r=`${b}/features/${t.slug}`;return e[`/features/${t.slug}`]=t.url?t:{...t,url:r},e},{});var x=e.i(193905),y=e.i(821384);let w=y.z.string().url(),k=y.z.object({type:y.z.enum(["software","product"]).default("software"),url:w,name:y.z.string(),description:y.z.string(),image:w.optional(),screenshots:y.z.array(w).optional(),applicationCategory:y.z.enum(["UtilitiesApplication","MultimediaApplication","ProductivityApplication"]).optional(),offers:y.z.object({price:y.z.number(),priceCurrency:y.z.string()}).optional(),aggregateRating:y.z.object({ratingValue:y.z.number(),reviewCount:y.z.number()}).optional(),reviews:y.z.array(y.z.object({author:y.z.string(),datePublished:y.z.string().optional(),reviewBody:y.z.string().optional(),name:y.z.string().optional(),ratingValue:y.z.string().optional()})).optional(),breadcrumb:y.z.array(y.z.object({name:y.z.string(),item:w})).optional(),faq:y.z.array(y.z.object({question:y.z.string(),answer:y.z.string()})).optional()}),S=["UtilitiesApplication","MultimediaApplication","ProductivityApplication"],T=e=>"string"==typeof e&&/^https?:\/\//.test(e),C=e=>"string"==typeof e&&e.trim().length>0?e.trim():void 0,j={price:0,priceCurrency:"USD"},P=e=>Array.isArray(e)?e.map(e=>{if(!e||"object"!=typeof e)return;let t=C(e.question),r=C(e.answer);if(t&&r)return{question:t,answer:r}}).filter(Boolean):[],A=(e,t,r)=>"string"!=typeof e||e.includes(r)?t:e;function N({slug:e,config:i}){let{breadcrumbJsonLd:a,faqJsonLd:o,jsonLd:n}=function(e,t,i){let{t:a}=(0,x.useTranslation)(),{lang:o}=(0,x.useSelectedLanguage)(),n=e=>{for(let t of e)try{let e=a(t);if("string"==typeof e&&e.trim().length>0&&!e.includes(t))return e.trim()}catch{continue}},s=n([`${e}.seo.title`,`${e}.meta.title`,`${e}.structuredData.pageName`])??"BibiGPT Feature",l=n([`${e}.seo.description`,`${e}.meta.description`,`${e}.structuredData.description`])??"AI video productivity assistant by BibiGPT",u=n([`${e}.seo.keywords`,`${e}.meta.keywords`]),d=(0,r.useMemo)(()=>{try{let t=a(`${e}.structuredData`,{returnObjects:!0});return"object"==typeof t&&null!==t?t:{}}catch{return{}}},[e,a]),c=(0,r.useMemo)(()=>{try{let t=a(`${e}.faqs.items`,{returnObjects:!0});return P(t)}catch{return[]}},[e,a]),m=t.url??(d.url&&T(d.url)?d.url:void 0);if(!m)throw Error(`[useFeatureJsonLd] Missing url for namespace: ${e}`);let p=P(d.faq),f=p.length>0?p:c,g=d.breadcrumb&&"object"==typeof d.breadcrumb?d.breadcrumb:{},h=C(g.current)??C(d.pageName)??C(d.appName),v=[{name:C(g.features)??("zh"===o?"åè½":"Features"),item:T(g.featuresUrl)&&"string"==typeof g.featuresUrl?g.featuresUrl:"https://bibigpt.co/features"},{name:h??A(s,"BibiGPT Feature",`${e}.seo.title`),item:m}],y=d.image&&T(d.image)?d.image:void 0,w=(e=>{if(!Array.isArray(e))return;let t=e.filter(T);return t.length>0?t:void 0})(d.screenshots),N=(e=>{if(!e||"object"!=typeof e)return;let t=C(e.price),r=C(e.priceCurrency);if(!t||!r)return;let i=parseFloat(t);if(!isNaN(i))return{price:i,priceCurrency:r}})(d.offers),E=(e=>{if(!e||"object"!=typeof e)return;let t=C(e.ratingValue),r=C(e.reviewCount);if(!t||!r)return;let i=parseFloat(t),a=parseInt(r,10);if(!(isNaN(i)||isNaN(a)))return{ratingValue:i,reviewCount:a}})(d.aggregateRating),I=(e=>{if(!Array.isArray(e))return;let t=e.map(e=>{if(!e||"object"!=typeof e)return;let t=C(e.author);if(t)return{author:t,datePublished:C(e.datePublished),reviewBody:C(e.reviewBody),name:C(e.name),ratingV
3alue:C(e.ratingValue)}}).filter(Boolean);return t.length>0?t:void 0})(d.reviews),R="product"===d.type?"product":"software",L=C(d.description),_=function(e,t){if("string"==typeof e)return t.includes(e)?e:void 0}(d.applicationCategory,S),M=C(d.siteName)??C(d.brand)??"BibiGPT",z=k.parse({type:R,url:m,name:C(d.appName)??C(d.pageName)??A(s,"BibiGPT Feature",`${e}.seo.title`),description:L??A(l,"AI video productivity assistant",`${e}.seo.description`),image:y,screenshots:w,applicationCategory:_,reviews:I,breadcrumb:t.breadcrumb??v,faq:t.faq??(f.length>0?f:void 0),...t,aggregateRating:t.aggregateRating??E,offers:t.offers??N??j}),F=A(s,z.name,`${e}.seo.title`),D=A(l,z.description,`${e}.seo.description`),U=((e,t)=>{if("string"==typeof e)return e.includes(t)?void 0:e})(u,`${e}.seo.keywords`),B="zh"===o?"zh-CN":"en-US",V=i?.slug,$=(0,r.useMemo)(()=>{let e=V&&"string"==typeof V?[{rel:"alternate",hrefLang:"zh-CN",href:`${b}/features/${V}`},{rel:"alternate",hrefLang:"en-US",href:`${b}/en/features/${V}`},{rel:"alternate",hrefLang:"x-default",href:`${b}/features/${V}`}]:void 0;return{title:F,description:D,canonical:z.url,openGraph:{url:z.url,title:F,description:D,images:z.image?[{url:z.image,alt:z.name}]:void 0},additionalMetaTags:[{name:"inLanguage",content:B},...U?[{name:"keywords",content:U}]:[]],...e?{additionalLinkTags:e}:{},twitter:{cardType:"summary_large_image"}}},[z.image,z.name,z.url,B,U,D,F,V]);return{nextSeoProps:$,breadcrumbJsonLd:(0,r.useMemo)(()=>({items:(z.breadcrumb||[]).map(e=>({name:e.name,item:e.item}))}),[z.breadcrumb]),faqJsonLd:(0,r.useMemo)(()=>{if(z.faq&&0!==z.faq.length)return{questions:z.faq.map(e=>({question:e.question,answer:e.answer}))}},[z.faq]),jsonLd:(0,r.useMemo)(()=>{let e=z.offers?.price??j.price,t=z.offers?.priceCurrency??j.priceCurrency,r=z.aggregateRating?{ratingValue:z.aggregateRating.ratingValue,reviewCount:z.aggregateRating.reviewCount}:void 0;return"product"===z.type?{kind:"product",props:{name:z.name,description:z.description,image:z.image?[z.image]:void 0,offers:{price:e,priceCurrency:t,availability:"https://schema.org/InStock",url:z.url},aggregateRating:r,review:z.reviews?.map(e=>({author:e.author,datePublished:e.datePublished,reviewBody:e.reviewBody,name:e.name,reviewRating:e.ratingValue?{ratingValue:parseFloat(e.ratingValue)}:void 0})),brand:M}}:{kind:"software",props:{name:z.name,operatingSystem:"Web",applicationCategory:z.applicationCategory??"UtilitiesApplication",offers:{price:e,priceCurrency:t},aggregateRating:r,url:z.url,image:z.image,screenshot:z.screenshots}}},[z.aggregateRating,z.applicationCategory,z.description,z.image,z.name,z.offers,z.reviews,z.screenshots,z.type,z.url,M])}}(e,i,{slug:e});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.BreadcrumbJsonLd,{...a}),o?(0,t.jsx)(h.FAQJsonLd,{...o}):null,"software"===n.kind?(0,t.jsx)(h.SoftwareApplicationJsonLd,{name:n.props.name,operatingSystem:n.props.operatingSystem,applicationCategory:n.props.applicationCategory,offers:n.props.offers,aggregateRating:n.props.aggregateRating,url:n.props.url,image:n.props.image,screenshot:n.props.screenshot}):(0,t.jsx)(h.ProductJsonLd,{name:n.props.name,description:n.props.description,image:n.props.image,offers:n.props.offers,aggregateRating:n.props.aggregateRating,brand:n.props.brand,review:n.props.review})]})}var E=e.i(379159),I=e.i(791213),R=e.i(941001),L=e.i(911160),_=e.i(166487),M=e.i(506918),z=e.i(210291),F=e.i(275031),D=e.i(880710);function U({className:e}){let i=(0,g.useRouter)(),a=(0,D.normalizeFeaturePath)(i.asPath||i.pathname),{t:o}=(0,x.useTranslation)(),n=(0,r.useMemo)(()=>{let e=[];
3if(!a)return e;let t="/features"===a,r="/features/ai-summarizer-tools"===a||a.startsWith("/features/")&&a.endsWith("-tools");if(t)return e.push({label:o("é¦é¡µ"),href:"/features",isCurrentPage:!0}),e;if(e.push({label:o("é¦é¡µ"),href:"/features"}),r){let t;"/features/ai-summarizer-tools"===a?t="summarizer":a.endsWith("-tools")&&(t=a.replace("/features/","").replace("-tools",""));let r=t?R.FEATURE_MENU_CONFIG.find(e=>e.id===t):null;if(r){let t=o(r.labelKey),i=o("featureHub.toolsCollection")||"å·¥å
·éå";e.push({label:`${t} ${i}`,href:a,isCurrentPage:!0})}else e.push({label:a,href:a,isCurrentPage:!0})}else{let t=(0,R.getCategoryByPathname)(a);if(t){let r=o(t.labelKey),i="summarizer"===t.id?"/features/ai-summarizer-tools":`/features/${t.id}-tools`;e.push({label:r,href:i})}if(a.startsWith("/features/")){let t=function(e,t){if(!e||!e.startsWith("/features/"))return"";let r=e.replace("/features/","");if(!r)return"";let i=v[e];if(i?.namespace){let e=i.namespace;for(let r of[`${e}.seo.title`,`${e}.meta.title`,`${e}.structuredData.pageName`])try{let e=t(r);if("string"==typeof e&&e.trim().length>0&&e!==r)return e.replace(/\s*\|\s*BibiGPT\s*$/i,"").trim()}catch{continue}}return i?.config?.name?i.config.name:r?r.split("-").map(e=>{let t={ai:"AI",api:"API",url:"URL",pdf:"PDF",srt:"SRT",txt:"TXT",mp3:"MP3",mp4:"MP4",mov:"MOV",mkv:"MKV",avi:"AVI",webm:"WEBM"},r=e.toLowerCase();return t[r]?t[r]:e.charAt(0).toUpperCase()+e.slice(1)}).join(" "):""}(a,o);t&&e.push({label:t,href:a,isCurrentPage:!0})}else a&&e.push({label:a,href:a,isCurrentPage:!0})}return e},[a,o]);return(0,t.jsx)("div",{className:(0,L.cn)("w-full",e),children:(0,t.jsx)(F.Breadcrumb,{children:(0,t.jsx)(F.BreadcrumbList,{className:"!flex-nowrap",children:n.map((e,i)=>{let a=i===n.length-1;return(0,t.jsxs)(r.Fragment,{children:[i>0&&(0,t.jsx)(F.BreadcrumbSeparator,{}),(0,t.jsx)(F.BreadcrumbItem,{className:"flex-shrink-0",children:a?(0,t.jsx)(F.BreadcrumbPage,{className:"max-w-[200px] truncate sm:max-w-none",children:e.label}):(0,t.jsx)(F.BreadcrumbLink,{asChild:!0,children:(0,t.jsx)(z.default,{href:e.href,className:"max-w-[200px] truncate sm:max-w-none",children:e.label})})})]},`${e.href}-${i}`)})})})})}var B=e.i(188478);let V="seoStructure.featureCta";function $({className:e}){let{t:r}=(0,x.useTranslation)(),i=r(`${V}.href`);return(0,t.jsx)("section",{"aria-labelledby":"feature-hub-cta-title",className:(0,L.cn)("mx-auto w-full max-w-5xl",e),children:(0,t.jsxs)("div",{className:"flex flex-col items-start gap-4 roun
3ded-3xl border border-border bg-card p-6 shadow-sm sm:flex-row sm:items-center sm:justify-between",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{className:"text-xs font-semibold tracking-[0.32em] text-primary uppercase",children:r(`${V}.eyebrow`)}),(0,t.jsx)("h2",{id:"feature-hub-cta-title",className:"text-2xl font-semibold text-foreground sm:text-3xl",children:r(`${V}.title`)}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground sm:text-base",children:r(`${V}.description`)})]}),(0,t.jsxs)(z.default,{href:"string"==typeof i?i:"/ai-summarizer-tools/",className:"inline-flex items-center gap-2 rounded-full border border-primary px-5 py-2 text-sm font-semibold text-primary transition hover:bg-primary hover:text-primary-foreground",children:[r(`${V}.button`),(0,t.jsx)(B.ArrowRight,{className:"size-4","aria-hidden":"true"})]})]})})}var G=e.i(16920);let O={default:["ai-answer","video-to-text-converter","study-guide-maker"],"ai-answer":["ai-youtube-summary","video-to-text-converter","study-guide-maker"],"video-to-text-converter":[],"study-guide-maker":[],"openclaw-bibigpt-skill":["ai-youtube-summary","ai-bilibili-summary","video-to-text-converter"],"ai-youtube-summary":["video-to-text-converter","ai-answer","study-guide-maker"],"ai-bilibili-summary":["video-to-text-converter","ai-answer","study-guide-maker"],"ai-douyin-summary":["video-to-text-converter","ai-answer","study-guide-maker"],"ai-tiktok-summary":["video-to-text-converter","ai-answer","study-guide-maker"],"ai-kuaishou-summary":["ai-douyin-summary","ai-tiktok-summary","ai-bilibili-summary"],"ai-podcast-summary":["video-to-text-converter","ai-answer","ai-podcast-to-article"],"ai-podcast-to-article":["ai-podcast-summary","video-to-text-converter","ai-answer"],"podcast-transcript-generator":["ai-podcast-summary","ai-podcast-to-article","youtube-transcript-generator"],"ai-local-file-speech-to-text":["video-to-text-converter","ai-summary-local-subtitle-text","ai-answer"],"article-summarizer":["ai-answer","study-guide-maker","ai-video-summary-visual-content"],"ai-video-summary-visual-content":["ai-answer","video-to-text-converter","study-guide-maker"],"ai-video-to-social-image":["ai-answer","ai-video-summary-visual-content","video-to-text-converter"],"free-video-search-youtube-bilibili-tiktok":["ai-youtube-summary","ai-answer","video-to-text-converter"],"youtube-video-to-notes":["youtube-to-obsidian-notes"],"youtube-to-obsidian-notes":["youtube-video-to-notes"],"free-text-summarizer":["free-speech-to-text-online","free-video-summarizer","free-audio-summarizer","article-summarizer"],"free-video-summarizer":["free-speech-to-text-online","free-text-summarizer","free-audio-summarizer","ai-video-summary-visual-content"],"free-audio-summarizer":["free-speech-to-text-online","free-text-summarizer","free-video-summarizer","ai-podcast-summary"],"free-speech-to-text-online":["free-text-summarizer","free-video-summarizer","free-audio-summarizer","video-to-text-converter"],"free-audio-transcription-online":["free-speech-to-text-online","free-text-summarizer","free-video-summarizer","free-audio-summarizer"],"free-online-subtitle-converter":["youtube-subtitle-downloader","video-to-text-converter","youtube-transcript-generator"],"free-online-subtitle-burner":["free-online-subtitle-converter","free-online-video-compressor","youtube-subtitle-downloader"],"free-online-subtitle-translator":["free-online-subtitle-converter","youtube-subtitle-downloader","free-online-subtitle-burner"],"free-online-video-to-gif-converter":["free-online-video-compressor","video-to-text-converter","ai-video-summary-visual-content"],"free-online-audio-cutter":["free-audio-summarizer","free-speech-to-text-online","free-audio-transcription-online"],"tiktok-video-finder":["ai-tiktok-summary","tiktok-video-to-text","free-video-search-youtube-bilibili-tiktok"],"bilibili-subtitle-downloader":["ai-bilibili-summary","bilibili-video-to-text","youtube-subtitle-downloader"],"free-audio-noise-remover":["free-online-audio-cutter","free-speech-to-text-online","free-audio-summarizer"],"free-online-audio-silence-remover":["free-audio-noise-remover","free-audio-summarizer","free-speech-to-text-online"],"free-online-audio-converter":["mp4-to-mp3-online-converter","free-online-audio-cutter","free-audio-noise-remover"],"free-online-audio-speed-changer":["free-online-audio-converter","free-online-audio-cutter","free-audio-noise-remover"],"free-online-video-trimmer":["free-online-video-compressor","free-online-video-to-gif-converter","mp4-to-mp3-online-converter"],"youtube-transcript-generator":["youtube-subtitle-downloader","ai-youtube-summary","video-to-text-converter"],"youtube-subtitle-downloader":["youtube-transcript-generator","bilibili-subtitle-downloader","free-online-subtitle-converter"],"youtube-to-text-converter":["youtube-transcript-generator","ai-youtube-summary","video-to-text-converter"],"youtube-video-search":["ai-youtube-summary","youtube-transcript-generator","free-video-search-youtube-bilibili-tiktok"],"youtube-thumbnail-maker":["ai-youtube-summary","youtube-video-to-notes"],"bilibili-video-to-text":["ai-bilibili-summary","bilibili-subtitle-downloader","video-to-text-converter"],"bilibili-video-search":["ai-bilibili-summary","bilibili-video-to-text","free-video-search-youtube-bilibili-tiktok"],"douyin-transcript-generator":["douyin-video-to-text","douyin-subtitle-downloader","ai-douyin-summary"],"douyin-video-to-text":["douyin-transcript-generator","ai-douyin-summary","douyin-subtitle-downloader"],"douyin-subtitle-downloader":["douyin-video-to-text","douyin-transcript-generator","bilibili-subtitle-downloader"],"xiaohongshu-video-to-text":["xiaohongshu-subtitle-downloader","video-to-text-converter","ai-answer"],"xiaohongshu-subtitle-downloader":["xiaohongshu-video-to-text","douyin-subtitle-downloader","bilibili-subtitle-downloader"],"tiktok-video-to-text":["ai-tiktok-summary","tiktok-video-finder","video-to-text-converter"],"tiktok-subtitle-downloader":["tiktok-video-to-text","douyin-subtitle-downloader","youtube-subtitle-downloader"],"tiktok-caption-downloader":["tiktok-subtitle-downloader","tiktok-video-to-text","youtube-subtitle-downloader"],"tiktok-video-search":["ai-tiktok-summary","tiktok-video-finder","free-video-search-youtube-bilibili-tiktok"],"local-video-to-text":["ai-local-file-speech-to-text","video-to-text-converter","free-speech-to-text-online"],"online-video-to-text":["video-to-text-converter","ai-youtube-summary","ai-bilibili-summary"],"macos-local-video-search":["local-video-to-text","free-video-search-youtube-bilibili-tiktok","video-to-text-converter"],"baidu-cloud-drive-video-to-text":["video-to-text-converter","ai-answer"],"other-cloud-drive-video-to-text":["video-to-text-converter"],"free-online-video-compressor":["free-online-video-to-gif-converter","video-to-text-converter","ai-video-summary-visual-content"],"free-text-to-speech-online":["free-speech-to-text-online","free-text-summarizer","ai-answer"],"short-url-to-long-url-converter":["ai-youtube-summary","video-to-text-converter","ai-answer"],"mp4-to-mp3-online-converter":["free-online-audio-converter","avi-to-mp3-audio-converter","free-online-audio-cutter"],"avi-to-mp3-audio-converter":["mp4-to-mp3-online-converter","mov-to-mp3-audio-converter","free-online-audio-converter"],"mov-to-mp3-audio-converter":["mp4-to-mp3-online-converter","mkv-to-mp3-audio-extractor","free-online-audio-converter"],"mkv-to-mp3-audio-extractor":["mp4-to-mp3-online-converter","avi-to-mp3-audio-converter","free-online-audio-converter"],"webm-to-mp3-online-converter":["mp4-to-mp3-online-converter","free-online-audio-converter","free-online-audio-cutter"],"ai-music-video-generator":["sora-2-ai-video-generator","ai-answer"],"ai-video-to-illustrated-article":["ai-video-summary-visual-content","ai-video-to-social-image","ai-answer"],"sora-2-ai-video-generator":["wan-2-7-ai-video-generator","ai-music-video-generator"],"wan-2-7-ai-video-generator":["sora-2-ai-video-generator","ai-music-video-generator"],"twitter-post-image-generator":["xiaohongshu-note-card-generator","weibo-hot-topic-card-generator","ai-video-to-social-image"],"xiaohongshu-note-card-generator":["twitter-post-image-generator","weibo-hot-topic-card-generator","ai-video-to-social-image"],"weibo-hot-topic-card-generator":["twitter-post-image-generator","xiaohongshu-note-card-generator","ai-video-to-social-image"],"ai-summary-local-subtitle-text":["free-online-subtitle-converter","video-to-text-converter","ai-answer"],"ai-web-reactor":["article-summarizer","ai-answer","study-guide-maker"],"free-online-video-frame-extractor":["free-online-video-to-gif-converter","free-online-video-compressor","free-online-video-trimmer"],"free-online-voice-recorder":["free-speech-to-text-online","free-audio-transcription-online","free-online-audio-cutter"],"free-image-to-text-converter":["free-speech-to-text-online","free-text-summarizer","video-to-text-converter"],"free-online-video-speed-changer":["free-online-video-compressor","free-online-video-trimmer","free-online-audio-speed-changer"],"free-online-audio-joiner":["free-online-audio-cutter","free-online-audio-converter","free-audio-noise-remover"],"free-audio-waveform-visualizer":["free-speech-to-text-online","free-online-audio-cutter","free-audio-transcription-online"],"free-pdf-to-text-converter":["free-text-summarizer","free-image-to-text-converter","article-summarizer"],"free-online-video-merger":["free-online-video-compressor","free-online-video-to-gif-converter","free-online-video-trimmer"],"free-online-audio-volume-booster":["free-online-audio-speed-changer","free-audio-noise-remover","free-online-audio-converter"],"free-online-video-format-converter":["free-online-video-compressor","free-online-video-merger","free-online-video-trimmer"],"free-online-audio-pitch-changer":["free-online-audio-speed-changer","free-online-audio-converter","free-audio-noise-remover"],"free-online-video-rotator":["free-online-video-trimmer","free-online-video-compressor","free-online-video-format-converter"],"free-online-video-audio-remover":["free-online-video-trimmer","free-online-video-compressor","ai-local-file-speech-to-text"],"free-online-video-cropper":["free-online-video-compressor","free-online-video-trimmer","free-online-video-rotator"],"free-online-image-compressor":["free-online-image-resizer","free-image-to-text-converter","free-pdf-to-text-converter"],"free-online-image-resizer":["free-online-image-compressor","free-image-to-text-converter","free-online-video-compressor"]};function q(){let e=(0,g.useRouter)(),i=(0,D.normalizeFeaturePath)(e.asPath||e.pathname),o=(0,r.useMemo)(()=>(function(e){if(!e||!e.startsWith("/features"))return null;let[,,...t]=e.split("/");return 0===t.length?null:t.join("/")||null})(i),[i]),{t:n}=(0,x.useTranslation)(),s=(0,r.useMemo)(()=>o?(O[o]??O.default).filter(e=>e!==o):[],[o]);if(!o||0===s.length)return null;let l=n("seoStructure.featureRecommendations.eyebrow"),u=n("seoStructure.featureRecommendations.title"),d=n("seoStructure.featureRecommendations.subtitle"),c=n("seoStructure.featureRecommendations.cta.label"),m=n("seoStructure.featureRecommendations.cta.href")||"/ai-summarizer-tools",p=s.map(e=>{let t=`seoStructure.featureRecommendations.items.${e}.title`,r=`seoStructure.featureRecommendations.items.${e}.description`,i=`seoStructure.featureRecommendations.items.${e}.href`,a=n(t),o=n(r),s=n(i)||`/features/${e}`;return!a||a.includes(t)?null:{href:s,title:a,description:o&&!o.includes(r)?o:""}}
3).filter(Boolean);return 0===p.length?null:(0,t.jsxs)("section",{"aria-labelledby":"feature-recommendations-title",className:"mx-auto w-full max-w-5xl",children:[(0,t.jsxs)("header",{className:"mb-8 max-w-3xl space-y-3",children:[(0,t.jsx)("span",{className:"text-xs font-semibold tracking-[0.2em] text-sky-400 uppercase dark:text-sky-300",children:l}),(0,t.jsx)("h2",{id:"feature-recommendations-title",className:"text-3xl font-semibold text-foreground",children:u}),d&&(0,t.jsx)("p",{className:"text-muted-foreground",children:d})]}),(0,t.jsx)("div",{className:"grid gap-6 md:grid-cols-3",children:p.map(e=>(0,t.jsxs)(G.Card,{className:"flex h-full flex-col justify-between border border-border/60 bg-card/80 shadow-sm transition-shadow duration-200 hover:-translate-y-1 hover:border-primary/40 hover:shadow-lg",children:[(0,t.jsxs)(G.CardHeader,{className:"space-y-3",children:[(0,t.jsx)(G.CardTitle,{className:"text-lg font-semibold text-foreground",children:e.title}),e.description?(0,t.jsx)(G.CardDescription,{className:"text-sm text-muted-foreground",children:e.description}):null]}),(0,t.jsx)(G.CardContent,{children:(0,t.jsx)(a.Button,{variant:"outline",className:"w-full border-primary/30 text-primary hover:bg-primary/10 hover:text-primary",asChild:!0,children:(0,t.jsxs)(z.default,{href:e.href,className:"flex items-center justify-center gap-2 no-underline",children:[n("seoStructure.featureRecommendations.itemCta"),(0,t.jsx)(B.ArrowRight,{className:"size-4","aria-hidden":"true"})]})})})]},e.href))}),(0,t.jsx)("div",{className:"mt-10 flex justify-center",children:(0,t.jsx)(a.Button,{size:"lg",className:"rounded-full bg-pink-400 font-semibold text-white shadow-lg shadow-pink-400/30 transition hover:bg-pink-400/90 dark:bg-sky-400 dark:shadow-sky-400/30 dark:hover:bg-sky-400/90",asChild:!0,children:(0,t.jsxs)(z.default,{href:m,className:"inline-flex items-center gap-2 no-underline",children:[c,(0,t.jsx)(B.ArrowRight,{className:"size-4","aria-hidden":"true"})]})})})]})}e.i(601723);let W=(0,f.default)(()=>e.A(129576).then(e=>({default:e.FeatureSidebar})),{loadableGenerated:{modules:[374960]},ssr:!1}),H=(0,f.default)(()=>e.A(45951),{loadableGenerated:{modules:[871134]},ssr:!1}),X=(0,f.default)(()=>e.A(654248),{loadableGenerated:{modules:[640821]},ssr:!1}),Y=(0,f.default)(()=>e.A(165083).then(e=>({default:e.FeaturePromotionFloatingWidget})),{loadableGenerated:{modules:[165307]},ssr:!1});e.s(["default",0,function({children:e,className:i,showRecommendations:a=!0}){let o,n,{isMenuPanelOpen:s,setMenuPanelOpen:l}=(0,_.useFeatureSidebarStore)(),u=(0,g.useRouter)(),d=(0,D.normalizeFeaturePath)(u.asPath||u.pathname);(0,r.useEffect)(()=>{_.useFeatureSidebarStore.persist?.rehydrate()},[]);let c="/features"===d,m=!!d&&(0,R.isHubPagePath)(d),{shouldShowPromoWidget:p,featureSeoConfig:f}=(o=d.startsWith("/features"),{isFeaturePage:o,isBlogPage:n=d.startsWith("/blog"),shouldShowPromoWidget:o||n,featureSeoConfig:(0,r.useMemo)(()=>{let e=v[d];return e?{namespace:e.namespace,slug:e.slug,config:{url:e.url??`${b}/features/${e.slug}`,...e.config}}:null},[d])}),h=M.useStoreAuto.use.showUpgradeModal(),x=M.useStoreAuto.use.upgradeModalTrigger(),y=M.useStoreAuto.use.showFeatureShowcaseModal(),w=h||null!==x,k=y||null!==x&&["visual-storytelling","custom-website","interactive-game"].includes(x);return(0,t.jsx)(E.SidebarProvider,{open:s,onOpenChange:l,children:(0,t.jsxs)(I.TooltipProvider,{delayDuration:0,children:[w?(0,t.jsx)(H,{}):null,k?(0,t.jsx)(X,{}):null,f?(0,t.jsx)(N,{slug:f.slug,config:f.config}):null,p&&(0,t.jsx)(Y,{}),(0,t.jsxs)("div",{className:"relative flex min-h-screen w-full flex-col bg-background",children:[(0,t.jsx)(W,{}),(0,t.jsxs)("div",{role:"main",className:(0,L.cn)("flex w-full flex-1 flex-col overflow-x-hidden transition-[padding] duration-300 ease-in-out",s?"md:pl-[272px]":"md:pl-[120px]",i),children:[(0,t.jsx)("div",{className:"sticky top-0 z-20 flex h-14 items-center border-b border-border bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/80",children:(0,t.jsx)("div",{className:"w-full min-w-0 pr-6 pl-16 md:px-10",children:(0,t.jsx)(U,{})})}),(0,t.jsx)("div",{className:"min-w-0 flex-1",children:e}),a&&!c&&!m&&(0,t.jsxs)("div",{className:"px-6 pb-24 md:px-10 md:pb-32",children:[(0,t.jsx)(q,{}),(0,t.jsx)($,{className:"mt-8"})]})]})]})]})})}],64202)}
3,676148,8054,978382,162588,e=>{"use strict";var t=e.i(391398),r=e.i(792042),i=e.i(740504),a=e.i(741913),o=e.i(694465),n=e.i(641124),s=e.i(733148),l=e.i(57490),u=e.i(313632),d=e.i(954466),c=e.i(63135),m=e.i(41158),p=e.i(203828),f=e.i(191788),g=e.i(911160);function h({ogimage:e,title:r,description:i,tags:a=[],author:o,formattedDate:n,isoDate:s,locale:l,variant:u="cream",maxTags:d=5}){if(!e)return null;let c="dark"===u,m=a.slice(0,d);return(0,t.jsxs)("div",{className:"relative flex min-h-[420px] items-end overflow-hidden border-2 border-border shadow-brutal-lg sm:min-h-[480px] md:min-h-[560px]",children:[(0,t.jsx)("img",{src:e,alt:r,loading:"eager",className:"absolute inset-0 h-full w-full object-cover"}),(0,t.jsx)("div",{className:"relative z-10 w-full p-4 sm:p-6 md:p-8 lg:p-10",children:(0,t.jsxs)("div",{className:(0,g.cn)("border-2 border-border p-5 shadow-brutal backdrop-blur-xl sm:p-6 md:p-8",c?"bg-black/55 text-white [text-shadow:_0_2px_8px_rgba(0,0,0,0.6)]":"bg-yellow-50/85 text-foreground [text-shadow:_0_1px_4px_rgba(255,255,255,0.6)] dark:bg-amber-950/85 dark:text-amber-50 dark:[text-shadow:_0_2px_6px_rgba(0,0,0,0.5)]"),children:[m.length>0&&(0,t.jsx)("div",{className:"mb-4 flex flex-wrap gap-2",children:m.map((e,r)=>(0,t.jsx)("span",{className:(0,g.cn)("border-2 border-border px-3 py-1 text-xs font-bold shadow-brutal sm:text-sm",r%3==0?"bg-yellow-300 text-black":r%3==1?"bg-pink-400 text-white":"bg-sky-400 text-white"),children:e},`${e}-${r}`))}),(0,t.jsx)("h1",{className:(0,g.cn)("mb-4 text-3xl font-black leading-[1.05] tracking-tight sm:text-4xl md:text-5xl",c?"text-white":"text-foreground"),children:r}),i&&(0,t.jsx)("p",{className:(0,g.cn)("mb-4 max-w-3xl text-sm sm:text-base",c?"text-white/90":"text-foreground/85"),children:i}),(o||n)&&(0,t.jsxs)("div",{className:(0,g.cn)("flex flex-wrap items-center justify-between gap-2 border-t-2 pt-3 text-xs font-bold sm:text-sm",c?"border-white/40 text-white/85":"border-foreground
3/30 text-foreground/85"),children:[o&&(0,t.jsxs)("div",{children:["zh"===l||"zh-TW"===l?"ä½è
ï¼":"Author: ",(0,t.jsx)("span",{className:c?"text-white":"text-foreground",children:o})]}),n&&(0,t.jsx)("time",{dateTime:s,className:"font-mono",children:n})]})]})})]})}var b=e.i(193905),v=e.i(864860);let x={en:a.enUS,zh:d.zhCN,"zh-TW":c.zhTW,ja:s.ja,ko:l.ko,de:i.de,fr:o.fr,it:n.it,pl:u.pl},y={en:"BibiGPT Team",zh:"BibiGPT å¢é","zh-TW":"BibiGPT åé",ja:"BibiGPTãã¼ã ",ko:"BibiGPT í",de:"BibiGPT Team",fr:"Ãquipe BibiGPT",it:"Team BibiGPT",pl:"ZespóŠBibiGPT"};function w(e,t){if(!e)return null;let i=new Date(e);return Number.isNaN(i.getTime())?e:(0,r.format)(i,"PPP",{locale:t?x[t]??a.enUS:x[v.defaultLocale]??a.enUS})}function k({items:e,activeId:r}){let{t:i}=(0,b.useTranslation)();return 0===e.length?null:(0,t.jsx)("aside",{className:"hidden w-64 shrink-0 lg:block",children:(0,t.jsx)("nav",{className:"sticky top-20 max-h-[calc(100vh-6rem)] overflow-y-auto",children:(0,t.jsxs)("div",{className:"rounded-lg border border-border/50 bg-card p-4 shadow-sm",children:[(0,t.jsx)("h3",{className:"mb-3 text-sm font-semibold text-foreground",children:i("ç®å½")}),(0,t.jsx)("ul",{className:"space-y-2 text-sm",children:e.map(e=>(0,t.jsx)("li",{style:{paddingLeft:`${(e.level-2)*12}px`},children:(0,t.jsx)("a",{href:`#${e.id}`,className:(0,g.cn)("block truncate transition-colors hover:text-foreground",r===e.id?"font-medium text-pink-500":"text-muted-foreground"),children:e.text})},e.id))})]})})})}let S={siteName:"BibiGPT",titleSuffix:" | BibiGPT Blog",blogListUrl:"/blog",homeUrl:"/",allPostsUrl:"/blog/posts"};e.s(["default",0,function({children:e,frontMatter:r={},blogConfig:i}){var a;let o={...S,...i},{t:n}=(0,b.useTranslation)(),{isReady:s}=(0,b.useI18nReady)(),{lang:l}=(0,b.useSelectedLanguage)(),u=(0,p.useRouter)(),[d,c]=(0,f.useState)([]),[g,v]=(0,f.useState)(""),[x,T]=(0,f.useState)({title:null,date:null,author:null,description:null}),C=r.title||x.title||"Blog Post",j=r.description||x.description,P=r.author||x.author||(l?y[l]??y.en:y.zh),A=r.date||x.date,N=!1!==r.toc,E=(a=r.tag)?Array.isArray(a)?a.filter(
3Boolean):a.split(/[,ï¼ã;ï¼]/g).map(e=>e.trim()).filter(Boolean):[],[I,R]=(0,f.useState)(r.heroVariant??"cream");return(0,f.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get("hero");("dark"===e||"cream"===e)&&R(e)},[]),(0,f.useEffect)(()=>{let e=document.querySelector("article");if(!e)return;let t={title:null,date:null,author:null,description:null};if(!r.title){let r=e.querySelector("h1[data-mdx-title]")||e.querySelector("h1");r?.textContent&&(t.title=r.textContent.trim())}if(!r.date){let e=u.asPath.match(/\/blog\/posts\/(\d{4})(\d{2})(\d{2})-/);if(e){let[,r,i,a]=e;t.date=`${r}/${i}/${a}`}}r.author||(t.author=document.querySelector('meta[name="author"]')?.getAttribute("content")??null),r.description||(t.description=document.querySelector('meta[name="description"]')?.getAttribute("content")??null),T(t);let i=e.querySelectorAll("h2, h3");c(Array.from(i).map(e=>(e.id||(e.id=e.textContent?.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]/g,"")||""),{id:e.id,text:e.textContent||"",level:parseInt(e.tagName[1])})));let a=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&v(e.target.id)})},{rootMargin:"-100px 0px -80% 0px"});return i.forEach(e=>a.observe(e)),()=>a.disconnect()},[e,r.title,r.date,u.asPath,s]),(0,t.jsxs)("div",{className:"w-full bg-background",children:[(0,t.jsx)("header",{className:"sticky top-0 z-40 border-b border-border/50 bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:(0,t.jsxs)("div",{className:"mx-auto flex h-12 max-w-7xl items-center justify-between px-4 sm:px-6 lg:px-8",children:[(0,t.jsx)(m.default,{href:o.blogListUrl,className:"text-lg font-semibold text-foreground transition hover:text-pink-500",children:n("å客é¦é¡µ")}),(0,t.jsxs)("nav",{className:"flex items-center gap-6 text-sm",children:[(0,t.jsx)(m.default,{href:o.homeUrl,className:"text-muted-foreground transition hover:text-foreground",children:o.siteName}),(0,t.jsx)(m.default,{href:o.allPostsUrl||o.blogListUrl,className:"text-muted-foreground transition hover:text-foreground",children:"All Posts"})]})]})}),(0,t.jsxs)("div",{className:"mx-auto flex max-w-7xl gap-8 px-4 py-10 sm:px-6 lg:px-8",children:[(0,t.jsxs)("article",{className:"min-w-0 flex-1",children:[r.ogimage?(0,t.jsx)("header",{className:"mb-10",children:(0,t.jsx)(h,{ogimage:r.ogimage,title:C,description:j,tags:E,author:P,formattedDate:A?w(A,l):void 0,isoDate:A??void 0,locale:l,variant:I})}):(0,t.jsxs)("header",{className:"mb-10 border-b border-border pb-8",children:[(0,t.jsx)("h1",{className:"mb-4 text-3xl font-bold tracking-tight text-foreground sm:text-4xl",children:C}),j&&(0,t.jsx)("p",{className:"mb-4 max-w-3xl text-lg text-muted-foreground",children:j}),(P||A)&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 text-sm text-muted-foreground",children:[P&&(0,t.jsx)("span",{children:P}),P&&A&&(0,t.jsx)("span",{"aria-hidden":"true",children:"·"}),A&&(0,t.jsx)("time",{dateTime:A,children:w(A,l)})]})]}),(0,t.jsx)("div",{className:"prose prose-lg max-w-none dark:prose-invert",children:e})]}),N&&(0,t.jsx)(k,{items:d,activeId:g})]})]})}],676148);var T=e.i(768208),C=e.i(869077),j=e.i(361934),P=e.i(506918),A=e.i(167947),N=e.i(95787),E=e.i(319980),I=e.i(490914),R=e.i(975682),L=e.i(696614),_=e.i(680571),M=e.i(918324),z=e.i(710710),F=e.i(112586),D=e.i(822378),U=e.i(871138),B=e.i(53912),V=e.i(988822),$=e.i(7827),G=e.i(868462),O=e.i(416534),q=e.i(877641),W=e.i(611073),H=e.i(791213),X=e.i(183377),Y=e.i(156430),K=e.i(784633),Q=e.i(507147),J=e.i(980968);let Z=16/9;function ee(e){return Number.isFinite(e)&&e>0&&e<1}function et(e,t=!0,r=Z){let i=r>0?r:Z;return Math.round((t?e/i:0)+52)}function er(e,t,r=Z){let i=Math.max(1,t.width-32),a=Math.max(1,t.height-32-52),o=r>0?r:Z,n=Math.max(1,Math.min(720,i,(ee(o)?Math.min(360,a):a)*o)),s=Math.min(260,n),l=Number.isFinite(e)?e:s;return Math.round(Math.min(n,Math.max(s,l)))}function ei(e,t,r=!0,i=Z){let a=r?i:Z,o=er(e.width,t,a),n=et(o,r,i),s=t.width-o-16,l=t.height-n-16;return{x:Math.round(Math.min(Math.max(e.x,16),Math.max(16,s))),y:Math.round(Math.min(Math.max(e.y,16),Math.max(16,l))),width:o}}var ea=e.i(823682),eo=e.i(200918);let en=["n","s","e","w","ne","nw","se","sw"];function es(){return{width:window.innerWidth,height:window.innerHeight}}function el({onExpand:e,mediaDuration:r}){let{t:i}=(0,b.useTranslation)(),a=P.useStoreAuto.use.currentTime(),o=P.useStoreAuto.use.duration(),n=P.useStoreAuto.use.seekMiniPlayer(),s=P.useStoreAuto.use.skipMiniPlayer(),[l,u]=(0,f.useState)(null),d=(0,f.useRef)(null),c=(0,f.useRef)(null),m=(0,f.useRef)(null),p=(0,J.resolveMiniPlayerDuration)(o,r),h=null!==l,v=h?100*l:(0,J.progressPercent)(a,p),x=h?(0,J.seekSecondsFromRatio)(l,p):null,y=e=>{let t=m.current??e.currentTarget.getBoundingClientRect();return(0,J.scrubRatioFromClientX)(e.clientX,t)};return(0,t.jsx)("div",{role:"slider",tabIndex:0,"aria-label":i("è¿·ä½ ææ¾å¨è¿åº¦"),"aria-valuemin":0,"aria-valuemax":Math.floor(p),"aria-valuenow":Math.floor(x??a),className:"group/scrubber absolute inset-x-3 bottom-0 z-10 flex h-2.5 cursor-pointer touch-none items-end",onPointerDown:t=>{if((!(p<=0)||e)&&(t.preventDefault(),t.stopPropagation(),t.currentTarget.setPointerCapture?.(t.pointerId),m.current=t.currentTarget.getBoundingClientRect(),c.current={x:t.clientX,y:t.clientY,scrubLocked:!1},p>0)){let e=y(t);d.current=e,u(e)}},onPointerMove:t=>{let r=c.current;if(!r)return;t.stopPropagation();let i=t.clientX-r.x,a=t.clientY-r.y;if(Math.abs(i)>=10&&(r.scrubLocked=!0),e&&!r.scrubLocked&&Number.isFinite(i)&&Number.isFinite(a)&&a<=-20&&Math.abs(a)>Math.abs(i)){c.current=null,d.current=null,m.current=null,u(null),t.currentTarget.releasePointerCapture?.(t.pointerId),e();return}if(null===d.current||p<=0)return;let o=y(t);d.current=o,u(o)},onPointerUp:e=>{e.stopPropagation();let t=null!==d.current;c.current=null,d.current=null;try{e.currentTarget.releasePointerCapture?.(e.pointerId)}catch{}t&&p>0&&n((0,J.seekSecondsFromRatio)(y(e),p)),m.current=null,u(null)},onPointerCancel:()=>{c.current=null,d.current=null,m.current=null,u(null)},onKeyDown:e=>{"ArrowLeft"===e.key?(e.preventDefault(),s(-J.MINI_PLAYER_SKIP_SECONDS)):"ArrowRight"===e.key&&(e.preventDefault(),s(J.MINI_PLAYER_SKIP_SECONDS))},children:(0,t.jsxs)("div",{className:(0,g.cn)("relative w-full overflow-visible rounded-full transition-[height,background-color]",h?"h-1 bg-muted":"h-0.5 bg-border/70 group-hover/scrubber:h-1 group-hover/scrubber:bg-muted"),children:[(0,t.jsx)("div",{className:"h-full rounded-full bg-sky-500",style:{width:`${v}%`}}),(0,t.jsx)("div",{className:"absolute top-1/2 size-2.5 rounded-full bg-sky-500 shadow-sm",style:{left:`${v}%`,transform:"translate(-50%, -50%)"}}),h&&null!==x&&(0,t.jsx)("div",{className:"absolute -top-7 -translate-x-1/2 roun
3ded bg-foreground px-1.5 py-0.5 text-[10px] font-medium tabular-nums text-background shadow",style:{left:`${v}%`},children:(0,eo.formatTime)(Math.floor(x))})]})})}function eu({className:e}){let r=P.useStoreAuto.use.currentTime(),i=P.useStoreAuto.use.duration();return(0,t.jsxs)("span",{className:(0,g.cn)("whitespace-nowrap text-[11px] leading-none text-muted-foreground tabular-nums",e),children:[(0,eo.formatTime)(Math.floor(r)),i>0&&` / ${(0,eo.formatTime)(Math.floor(i))}`]})}function ed(){let{t:e}=(0,b.useTranslation)(),r=P.useStoreAuto.use.playerSession();if(!r.isActive||!r.isDownloading||r.hasLocalCache)return null;let i=Math.max(0,Math.min(100,Math.round(r.downloadProgress)));return(0,t.jsxs)("div",{className:"group/cache absolute inset-x-0 -bottom-0.5 z-30 flex h-2 cursor-help items-end",role:"progressbar","aria-label":e("è§é¢ç¼åä¸"),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":i,title:`${e("è§é¢ç¼åä¸")} ${i}%`,children:[(0,t.jsx)("div",{className:"h-1 w-full overflow-hidden rounded-b-xl bg-amber-500/20",children:(0,t.jsx)("div",{className:"h-full bg-amber-500 transition-[width] duration-300",style:{width:`${i}%`}})}),(0,t.jsxs)("div",{className:"pointer-events-none absolute bottom-3 left-1/2 hidden -translate-x-1/2 whitespace-nowrap rounded bg-foreground px-1.5 py-0.5 text-[10px] font-medium text-background shadow group-hover/cache:block",children:[e("è§é¢ç¼åä¸")," ",i,"%"]})]})}function ec({className:e}){let{t:r}=(0,b.useTranslation)(),i=(0,p.useRouter)(),a=P.useStoreAuto.use.playlist(),o=P.useStoreAuto.use.currentIndex(),n=P.useStoreAuto.use.playMode(),s=P.useStoreAuto.use.isPlaying(),l=P.useStoreAuto.use.isVideoPlayerExpanded(),u=P.useStoreAuto.use.nextTrack(),d=P.useStoreAuto.use.previousTrack(),c=P.useStoreAuto.use.toggleVideoPlayerExpanded(),m=P.useStoreAuto.use.hideMiniPlayer(),h=P.useStoreAuto.use.closeMiniPlayer(),v=P.useStoreAuto.use.toggleMiniPlayback(),x=P.useStoreAuto.use.skipMiniPlayer(),y=P.useStoreAuto.use.aspectRatio(),w=P.useStoreAuto.use.miniPlayerLayoutEpoch(),k=P.useStoreAuto.use.isVisible(),S=function(e){if(!e)return Z;let t=e.split(/[/:]/).map(Number);return t.length>=2&&t[0]>0&&t[1]>0?t[0]/t[1]:Z}(y),T=(0,j.shouldRenderMiniPlayer)({isVisible:k,hasCurrentVideo:!0,pathname:i.pathname}),C=k&&!(0,j.isMiniPlayerDetailPath)(i.pathname);(0,f.useEffect)(()=>{if(!T)return;let e=e=>{if((0,J.shouldIgnoreMiniPlayerHotkey)(e.target))return;let t=P.useStoreAuto.getState();"Space"===e.code?(e.preventDefault(),t.toggleMiniPlayback()):"ArrowLeft"===e.code?(e.preventDefault(),t.skipMiniPlayer(-J.MINI_PLAYER_SKIP_SECONDS)):"ArrowRight"===e.code&&(e.preventDefault(),t.skipMiniPlayer(J.MINI_PLAYER_SKIP_SECONDS))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[T]);let[A,N]=(0,Y.useLocalStorageState)("bibigpt:mini-player-window:v1",void 0),E=(0,f.useRef)(null),I=(0,f.useRef)(null),[R,eo]=(0,f.useState)(!1),em=(0,f.useRef)(null),ep=(0,f.useRef)(w),ef=o>=0&&o<a.length?o:0,eg=a[ef]?.videoDetail,{videoConfig:eh}=(0,X.useContentConfig)(eg?.url||"");(0,f.useEffect)(()=>{if(ep.current===w)return;ep.current=w,N(void 0);let e=E.current;e&&(e.style.left="",e.style.top="",e.style.right="",e.style.bottom="",e.style.width="",e.style.transform="")},[w,N]);let eb=!!A;(0,f.useEffect)(()=>{if(!eb)return;let e=()=>{N(e=>e?ei(e,es(),l,S):e)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[eb,N,l,S]),(0,f.useEffect)(()=>{if(!A)return;let e=ei(A,es(),l,S);(e.x!==A.x||e.y!==A.y||e.width!==A.width)&&N(e)},[A,l,S,N]);let ev=(0,f.useMemo)(()=>(0,q.getVideoIcon)(eg?.url||""),[eg?.url]),ex=(0,f.useCallback)(e=>{let t=E.current;t&&(t.style.left=`${e.x}px`,t.style.top=`${e.y}px`,t.style.right="auto",t.style.bottom="auto",t.style.width=`${e.width}px`,t.style.transform="none")},[]),ey=(0,f.useCallback)((e,t,r)=>{let i=E.current;if(!i)return;let a=i.getBoundingClientRect();I.current={type:t,edge:r,pointerId:e.pointerId,startX:e.clientX,startY:e.clientY,startRect:{x:a.left,y:a.top,width:a.width},moved:!1,liveRect:null},e.currentTarget.setPointerCapture?.(e.pointerId)},[]),ew=(0,f.useCallback)(e=>{let t=I.current;if(!t||e.pointerId!==t.pointerId)return;let r=e.clientX-t.startX,i=e.clientY-t.startY;if(!t.moved){if(!function(e,t,r=4){return Math.abs(e)>=r||Math.abs(t)>=r}(r,i))return;t.moved=!0,eo(!0)}let a=es(),o="drag"===t.type?ei({x:t.startRect.x+r,y:t.startRect.y+i,width:t.startRect.width}
3,a,l,S):function({edge:e,start:t,dx:r,dy:i,viewport:a,mediaVisible:o=!0,aspect:n=Z}){let s,l=et(t.width,o,n),u=t.x+t.width,d=t.y+l,c=e=>o?(e-52)*n:t.width;switch(e){case"e":case"se":case"ne":s=t.width+r;break;case"w":case"sw":case"nw":s=t.width-r;break;case"s":s=c(l+i);break;case"n":s=c(l-i)}let m=er(s,a,n),p=et(m,o,n);return ei({x:"w"===e||"nw"===e||"sw"===e?u-m:t.x,y:"n"===e||"nw"===e||"ne"===e?d-p:t.y,width:m},a,o,n)}({edge:t.edge,start:t.startRect,dx:r,dy:i,viewport:a,mediaVisible:l,aspect:S});t.liveRect=o,ex(o)},[ex,l,S]),ek=(0,f.useCallback)(e=>{let t=I.current;if(!t||e.pointerId!==t.pointerId)return!1;I.current=null,eo(!1);try{e.currentTarget.releasePointerCapture?.(e.pointerId)}catch{}return t.moved&&t.liveRect?(N(t.liveRect),!0):t.moved},[N]),eS=(0,f.useCallback)(()=>{if(A){let e,t=es(),r=A.y+et(A.width,l,S),i=l?(e=er(520,t,Z),ei({x:A.x+(A.width-e)/2,y:A.y,width:e},t,!1)):A,a=et(i.width,!l,S);N(ei({x:i.x,y:r-a,width:i.width},t,!l,S))}c()},[S,N,l,A,c]);if(!eg||0===a.length)return null;let{hasPrev:eT,hasNext:eC}=function({playlistLength:e,currentIndex:t,playMode:r}){return!Number.isFinite(e)||e<2||!Number.isFinite(t)||t<0||t>=e||"repeat-one"===r?{hasPrev:!1,hasNext:!1}:"repeat"===r||"random"===r?{hasPrev:!0,hasNext:!0}:{hasPrev:t>0,hasNext:t<e-1}}({playlistLength:a.length,currentIndex:ef,playMode:n}),ej=eg.cover?(0,ea.convertCover)(eg.cover):"",eP=()=>{let e=P.useStoreAuto.getState().currentTime;m(),eg.dbId?i.push(`/content/${eg.dbId}?t=${Math.floor(e)}`):eg.url&&i.push(`/new/video?url=${encodeURIComponent(eg.url)}&t=${Math.floor(e)}`)},eA=e=>!!e.target?.closest?.('button, a, input, [role="slider"]'),eN=es(),eE=er(function(e,t=Z){return e?ee(t)?220:400:520}(l,S),eN,l?S:void 0),eI=A?ei(A,eN,l,S):void 0,eR=eI?{left:eI.x,top:eI.y,width:eI.width}:{left:"50%",bottom:16,transform:"translateX(-50%)",width:eE};return(0,t.jsxs)("div",{ref:E,role:"region","aria-label":r("è¿·ä½ ææ¾å¨"),className:(0,g.cn)("group/mini fixed z-[60] select-none outline-none","overflow-visible rounded-xl bg-background/95 shadow-2xl backdrop-blur-xl",R&&"shadow-sky-500/25 outline outline-2 outline-offset-2 outline-sky-500/50 [&_iframe]:pointer-events-none",!T&&"invisible pointer-events-none",e),"aria-hidden":!T,style:eR,children:[l&&en.map(e=>(0,t.jsx)("div",{"aria-hidden":!0,className:(0,g.cn)("absolute z-20 touch-none",(e=>{switch(e){case"n":return"inset-x-2 -top-1 h-2";case"s":return"inset-x-2 -bottom-1 h-2";case"e":return"inset-y-2 -right-1 w-2";case"w":return"inset-y-2 -left-1 w-2";case"ne":return"-top-1 -right-1 size-3";case"nw":return"-top-1 -left-1 size-3";case"se":return"-bottom-1 -right-1 size-3";case"sw":return"-bottom-1 -left-1 size-3"}})(e)),style:{cursor:function(e){switch(e){case"n":case"s":return"ns-resize";case"e":case"w":return"ew-resize";case"ne":case"sw":return"nesw-resize";case"nw":case"se":return"nwse-resize"}}(e)},onPointerDown:t=>{t.preventDefault(),t.stopPropagation(),ey(t,"resize",e)},onPointerMove:ew,onPointerUp:ek,onPointerCancel:ek},e)),(0,t.jsxs)("div",{className:(0,g.cn)("overflow-hidden bg-black",l?"relative w-full rounded-t-xl":"pointer-events-none fixed top-0 left-[-120vw] aspect-video w-[320px] opacity-0"),style:l?{aspectRatio:String(S)}:void 0,"aria-hidden":!l,children:[(0,t.jsx)("div",{className:(0,g.cn)("size-full [&_[data-player-controls]]:hidden","[&_div:has([data-media-player])]:h-full","[&_[data-media-player]]:!m-0 [&_[data-media-player]]:!size-full","[&_[data-media-player]]:!max-h-none [&_[data-media-player]]:!max-w-none [&_[data-media-player]]:!rounded-none","[&_[data-media-player]]:!h-full [&_[data-media-player]]:!w-full","[&_[class*=video-layout]]:!h-full [&_[class*=video-layout]]:!w-full","[&_video]:!size-full [&_video]:object-contain"),children:(0,t.jsx)(K.PlayerActivityProvider,{active:C,children:(0,t.jsx)(Q.PlaybackSlotProvider,{slot:"mini",children:(0,t.jsx)(O.MixPlayer,{videoConfig:eh,videoDetail:eg,chatRef:em},(0,L.playbackContentId)(eg)||String(ef))})})}),l&&(0,t.jsxs)("div",{className:(0,g.cn)("absolute inset-x-0 top-0 z-10 flex cursor-grab items-center gap-1 px-2 pb-4 pt-1.5","bg-gradient-to-b from-black/70 to-transparent","opacity-0 transition-opacity duration-150 focus-within:opacity-100 group-hover/mini:opacity-100",R&&"cursor-grabbing opacity-100"),onPointerDown:e=>{eA(e)||(e.preventDefault(),ey(e,"drag"))},onPointerMove:ew,onPointerUp:e=>{ek(e)||eA(e)||eP()},onPointerCancel:ek,children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-xs font-medium text-white",title:eg.title,children:eg.title||r("æªç¥æ é¢")}),(0,t.jsx)(W.Button,{variant:"ghost",size:"icon",className:"size-6 text-white hover:bg-white/20 hover:text-white",onClick:eP,title:r("åå°å
容页"),"aria-label":r("åå°å
容页"),children:(0,t.jsx)(_.ArrowUpRight,{className:"size-3.5"})}),(0,t.jsx)(W.Button,{variant:"ghost",size:"icon",className:"size-6 text-white hover:bg-white/20 hover:text-white",onClick:h,title:r("å
³éè¿·ä½ ææ¾å¨"),"aria-label":r("å
³éè¿·ä½ ææ¾å¨"),children:(0,t.jsx)(G.X,{className:"size-3.5"})})]})]}),(0,t.jsxs)("div",{className:(0,g.cn)("relative h-[52px]",R?"cursor-grabbing":"cursor-grab"),onPointerDown:e=>{eA(e)||(e.preventDefault(),ey(e,"drag"))},onPointerMove:ew,onPointerUp:ek,onPointerCancel:ek,children:[(0,t.jsxs)("div",{className:(0,g.cn)("flex h-full items-center",l?"gap-0.5 px-2":"gap-2 px-3 pb-2"),children:[!l&&(0,t.jsx)("div",{className:"flex min-w-[8.5rem] flex-1 items-center gap-2 overflow-hidden",children:(0,t.jsxs)(H.Tooltip,{children:[(0,t.jsx)(H.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("button",{type:"button",onClick:eP,"aria-label":r("åå°å
容页"),className:"group/title flex min-w-0 flex-1 items-center gap-2 rounded-md text-left outline-none focus-visible:ring-2 focus-visible:ring-sky-500/40",children:[(0,t.jsx)("div",{className:"flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-md bg-muted",children:ej?(0,t.jsx)("img",{src:ej,alt:"",className:"size-full object-cover"}):(0,t.jsx)(ev,{className:"size-5 text-sky-600 dark:text-sky-400"})}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-xs font-medium leading-4 text-foreground transition-colors group-hover/title:text-sky-500",children:eg.title||r("æªç¥æ é¢")})]})}),(0,t.jsx)(H.TooltipContent,{side:"top",className:"max-w-xs text-left",children:eg.title||r("æªç¥æ é¢")})]})}),!l&&(0,t.jsx)(eu,{className:"shrink-0"}),(0,t.jsxs)("div",{className:(0,g.cn)("flex shrink-0 items-center gap-0.5",l&&"contents"),children:[eT&&(0,t.jsx)(W.Button,{variant:"ghost",size:"icon",className:"size-7 shrink-0",onClick:d,"aria-label":r("ä¸ä¸æ¡"),title:r("ä¸ä¸æ¡"),children:(0,t.jsx)(V.SkipBack,{className:"size-3.5"})}),(0,t.jsx)(W.Button,{variant:"ghost",size:"icon",className:"size-7 shrink-0",onClick:()=>x(-J.MINI_PLAYER_SKIP_SECONDS),"aria-label":r("å¿«é15ç§"),title:r("å¿«é15ç§"),children:(0,t.jsx)(U.RotateCcw,{className:"size-3.5"})}),(0,t.jsx)(W.Button,{variant:"ghost",size:"icon",className:"size-8 shrink-0 transition-transform hover:scale-105",onClick:v,"aria-label":r(s?"æå":"ææ¾"),children:s?(0,t.jsx)(F.Pause,{className:"size-4"}):(0,t.jsx)(D.Play,{className:"ml-0.5 size-4"})}),(0,t.jsx)(W.Button,{variant:"ghost",size:"icon",className:"size-7 shrink-0",onClick:()=>x(J.MINI_PLAYER_SKIP_SECONDS),"aria-label":r("å¿«è¿15ç§"),title:r("å¿«è¿15ç§"),children:(0,t.jsx)(B.RotateCw,{className:"size-3.5"})}),eC&&(0,t.jsx)(W.Button,{variant:"ghost",size:"icon",className:"size-7 shrink-0",onClick:u,"aria-label":r("ä¸ä¸æ¡"),title:r("ä¸ä¸æ¡"),children:(0,t.jsx)($.SkipForward,{className:"size-3.5"})})]}),l&&(0,t.jsx)(eu,{className:"min-w-0 flex-1 truncate pl-1 text-right"}),(0,t.jsx)(W.Button,{variant:"ghost",size:"icon",className:"size-7 shrink-0",onClick:eS,title:r(l?"æ¶èµ·è§é¢ææ¾":"å±å¼è§é¢ææ¾"),"aria-label":r(l?"æ¶èµ·è§é¢ææ¾":"å±å¼è§é¢ææ¾"),children:l?(0,t.jsx)(M.ChevronDown,{className:"size-3.5"}):(0,t.jsx)(z.ChevronUp,{className:"size-3.5"})}),!l&&(0,t.jsx)(W.Button,{variant:"ghost",size:"icon",className:"size-7 shrink-0",onClick:h,title:r("å
³éè¿·ä½ ææ¾å¨"),"aria-label":r("å
³éè¿·ä½ ææ¾å¨"),children:(0,t.jsx)(G.X,{className:"size-3.5"})})]}),!l&&(0,t.jsx)(el,{onExpand:eS,mediaDuration:eg.duration}),(0,t.jsx)(ed,{})]})]})}var em=e.i(127630),ep=e.i(269356),ef=e.i(636133);let eg=(0,e.i(369547).default)("repeat-1",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}],["path",{d:"M11 10h1v4",key:"70cz1p"}]]);var eh=e.i(560946),eb=e.i(909289),ev=e.i(822768),ex=e.i(597223),ey=e.i(732062),ew=e.i(486595);function ek({className:e}){let{t:r}=(0,b.useTranslation)(),i=(0,p.useRouter)(),a=(0,R.useUser)(),o=P.useStoreAuto.use.playlist(),n=P.useStoreAuto.use.currentIndex(),s=P.useStoreAuto.use.playMode(),l=P.useStoreAuto.use.isPlaylistExpanded(),u=P.useStoreAuto.use.setCurrentIndex(),d=P.useStoreAuto.use.clearPlaylistWithDB(),c=P.useStoreAuto.use.removeVideoByUrlWithDB(),m=P.useStoreAuto.use.setPlayMode(),f=P.useStoreAuto.use.togglePlaylistExpanded();if(!l||0===o.length)return null;
3let h={sequential:{icon:$.SkipForward,label:r("é¡ºåºææ¾"),next:"repeat"},repeat:{icon:ef.Repeat,label:r("å表循ç¯"),next:"repeat-one"},"repeat-one":{icon:eg,label:r("åæ²å¾ªç¯"),next:"random"},random:{icon:eh.Shuffle,label:r("éæºææ¾"),next:"sequential"}}[s],v=h.icon,x=o.reduce((e,t)=>e+(t.videoDetail.duration||0),0);return(0,t.jsxs)("div",{className:(0,g.cn)("fixed bottom-24 left-1/2 z-40 -translate-x-1/2","border border-border/50 bg-background/95 backdrop-blur-xl","rounded-2xl shadow-2xl","mx-4 w-[calc(100vw-2rem)] max-w-2xl","flex max-h-[70vh] flex-col","animate-in slide-in-from-bottom-2 duration-200",e),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-border/50 p-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("h3",{className:"text-lg font-semibold",children:r("ææ¾å表")}),(0,t.jsxs)(ev.Badge,{variant:"secondary",className:"bg-sky-100 text-xs text-sky-700 dark:bg-sky-900 dark:text-sky-300",children:[o.length," ",r("个è§é¢")]}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:(0,eo.formatTime)(Math.floor(x))})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)(W.Button,{variant:"ghost",size:"sm",onClick:()=>m(h.next),className:"gap-2 hover:bg-sky-100 dark:hover:bg-sky-900",children:[(0,t.jsx)(v,{className:"size-4"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:h.label})]}),(0,t.jsx)(ey.Separator,{orientation:"vertical",className:"h-6"}),(0,t.jsxs)(W.Button,{variant:"ghost",size:"sm",onClick:()=>a?.id&&d(a.id),className:"gap-2 text-red-500 hover:bg-red-50 hover:text-red-600 dark:hover:bg-red-950",children:[(0,t.jsx)(eb.Trash2,{className:"size-4"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:r("æ¸
空")})]}),(0,t.jsx)(W.Button,{variant:"ghost",size:"icon",onClick:f,className:"hover:bg-muted",children:(0,t.jsx)(M.ChevronDown,{className:"size-4"})})]})]}),(0,t.jsx)(ex.ScrollArea,{className:"w-full flex-1",children:(0,t.jsx)("div",{className:"p-3",children:o.map((e,o)=>{let s=(0,q.getVideoIcon)(e.videoDetail.url||""),l=o===n;return(0,t.jsxs)("div",{className:(0,g.cn)("group flex items-center gap-3 rounded-xl p-3 transition-all","cursor-pointer hover:bg-muted/50",l&&"border border-sky-200/50 bg-gradient-to-r from-sky-50 to-pink-50 dark:border-sky-800/50 dark:from-sky-950/50 dark:to-pink-950/50"),onClick:()=>{u(o)},children:[(0,t.jsx)("div",{className:"cursor-grab opacity-0 transition-opacity group-hover:opacity-100",children:(0,t.jsx)(ep.GripVertical,{className:"size-4 text-muted-foreground"})}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[(0,t.jsx)("div",{className:(0,g.cn)("flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-xl",l?"bg-gradient-to-br from-sky-100 to-pink-100 dark:from-sky-900 dark:to-pink-900":"bg-muted"),children:(0,t.jsx)(s,{className:(0,g.cn)("size-5",l?"text-sky-600 dark:text-sky-400":"text-muted-foreground")})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h4",{className:(0,g.cn)("line-clamp-2 text-sm leading-5 font-medium",l&&"text-sky-600 dark:text-sky-400"),children:e.videoDetail.title||"Unknown Title"}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:(0,eo.formatTime)(Math.floor(e.videoDetail.duration||0))}),l&&(0,t.jsx)(ev.Badge,{variant:"secondary",className:"bg-sky-100 text-xs text-sky-700 dark:bg-sky-900 dark:text-sky-300",children:r("æ£å¨ææ¾")})]})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 opacity-0 transition-opacity group-hover:opacity-100",children:[(0,t.jsx)(W.Button,{variant:"ghost",size:"icon",className:"size-8 hover:bg-sky-100 dark:hover:bg-sky-900",onClick:t=>{let r;return t.stopPropagation(),r=e.videoDetail.dbId?`/content/${e.videoDetail.dbId}`:(0,ew.getNewVideoUrl)(e.videoDetail.url),void i.push(r)},title:r("è¿å
¥è¯¦æ
页"),children:(0,t.jsx)(em.ExternalLink,{className:"size-4"})}),(0,t.jsx)(W.Button,{variant:"ghost",size:"icon",className:"size-8 text-red-500 hover:bg-red-50 hover:text-red-600 dark:hover:bg-red-950",onClick:t=>{t.stopPropagation(),a?.id&&c(e.videoDetail.url,a.id)},children:(0,t.jsx)(G.X,{className:"size-4"})})]})]},e.id)})})})]})}e.s(["VideoPlaylist",0,function({className:e}){let r,i,a=(0,T.useFeatureFlag)().isEnabled(T.FLAG.PLAYLIST);!function(e){let t=(0,R.useUser)(),r=P.useStoreAuto.use.loadPlaylistFromDB(),i=P.useStoreAuto.use.addToPlaylistWithDB(),a=P.useStoreAuto.use.playlist(),[o,n]=(0,f.useState)(!1),{data:s}=I.api.user.videos.useInfiniteQuery({limit:5},{enabled:!!t?.id&&o&&a?.length===0&&e,getNextPageParam:()=>void 0});(0,f.useEffect)(()=>{t?.id&&!o&&r(t.id).then(()=>{n(!0)})},[t?.id,r,o]),(0,f.useEffect)(()=>
3{if(o&&t?.id&&a?.length===0&&s?.pages?.[0]?.uniqueVideos?.length){let e=s.pages[0].uniqueVideos.slice(0,5);(async()=>{for(let r of(console.log("ðµ æå为空ï¼èªå¨æ·»å ææ°5个è§é¢"),e))try{let e=(0,E.mapCachedUserContentToVideoDetailStructure)({...r,id:r.content_id||""},r.note||"");await i(e,t.id,!1)}catch(e){console.error("æ·»å è§é¢å°æå失败:",e)}})()}},[o,t?.id,a?.length,s,i,e])}(a),r=(0,p.useRouter)(),i=(0,f.useRef)(!1),(0,f.useEffect)(()=>{let e=e=>{let t=P.useStoreAuto.getState(),a=function(e){let t=(0,j.isMiniPlayerDetailPath)(e.fromPath),r=(0,j.isMiniPlayerDetailPath)(e.toPath);if(r){let t=(0,C.getContentIdFromPath)(e.toPath);return e.playingContentId&&t&&e.playingContentId!==t?"close":"hide"}return t&&!r&&e.isPlaying?"enter":"noop"}({fromPath:r.asPath||r.pathname,toPath:e,isPlaying:t.playbackSession?"playing"===t.playbackSession.status:t.isPlaying,playingContentId:t.playbackSession?.contentId||t.getCurrentVideo()?.dbId});"enter"===a?i.current=!0:"close"===a?(i.current=!1,t.closeMiniPlayer()):"hide"===a&&t.isVisible?(i.current=!1,t.hideMiniPlayer()):i.current=!1},t=()=>{i.current&&(i.current=!1,(()=>{var e;let t=P.useStoreAuto.getState(),r=t.savedVideoDetail||t.getCurrentVideo();if(r){if("reveal"==((e={currentVideoUrl:t.getCurrentVideo()?.url,nextVideoUrl:r.url}).currentVideoUrl&&e.nextVideoUrl&&e.currentVideoUrl===e.nextVideoUrl?"reveal":"enter")){t.isVisible||t.revealMiniPlayer();return}t.enterMiniPlayer(r)}})())},a=()=>{i.current=!1};return r.events.on("routeChangeStart",e),r.events.on("routeChangeComplete",t),r.events.on("routeChangeError",a),()=>{r.events.off("routeChangeStart",e),r.events.off("routeChangeComplete",t),r.events.off("routeChangeError",a)}},[r]),(0,f.useEffect)(()=>{let e=`${window.location.pathname}${window.location.search}`;if(!(0,j.isMiniPlayerDetailPath)(e)){let e=(0,N.readMiniPlayerSession)();e&&P.useStoreAuto.getState().restoreMiniPlayer(e)}let t=(0,A.throttle)(()=>{let e=P.useStoreAuto.getState(),t=e.playbackSession,r=e.getCurrentVideo(),i=r&&t?{...r,dbId:t.contentId||r.dbId,url:t.sourceUrl||r.url,playUrl:t.playUrl,audioUrl:t.audioUrl}:r,a=(0,N.buildMiniPlayerSession)({isVisible:t?.surface==="mini",isVideoPlayerExpanded:e.isVideoPlayerExpanded,currentTime:t?.positionSec??e.currentTime,duration:t?.durationSec??e.duration,isPlaying:t?"playing"===t.status:e.isPlaying,videoDetail:i});a?(0,N.writeMiniPlayerSession)(a):(0,N.clearMiniPlayerSession)()},1e3),r=P.useStoreAuto.subscribe((e,r)=>{if(e.playbackSession?.surface!=="mini"){t.cancel(),(0,N.clearMiniPlayerSession)();return}(e.playbackSession?.surface!==r.playbackSession?.surface||e.playbackSession?.contentId!==r.playbackSession?.contentId||e.playbackSession?.status!==r.playbackSession?.status||e.isVideoPlayerExpanded!==r.isVideoPlayerExpanded||e.currentIndex!==r.currentIndex)&&t.flush(),t()});return t(),()=>{t.flush(),t.cancel(),r()}},[]);let o=P.useStoreAuto.use.playbackSession(),n=(0,L.shouldMountMiniPlayer)(o);return n||a?(0,t.jsxs)(t.Fragment,{children:[a&&(0,t.jsx)(ek,{className:e}),n&&(0,t.jsx)(ec,{className:e})]}):null}],8054);var eS=e.i(285700),eT=e.i(528607),eC=["added","removed","updated"];function ej(e){return eC.includes(e)}async function eP({queryClient:e,persister:t,maxAge:r=864e5,buster:i="",hydrateOptions:a}){try{let o=await t.restoreClient();if(o)if(!o.timestamp)return t.removeClient();else{let n=Date.now()-o.timestamp>r,s=o.buster!==i;if(n||s)return t.removeClient();(0,eT.hydrate)(e,o.clientState,a)}}catch(e){throw await t.removeClient(),e}}async function eA({queryClient:e,persister:t,buster:r="",dehydrateOptions:i}){let a={buster:r,timestamp:Date.now(),clientState:(0,eT.dehydrate)(e,i)};await t.persistClient(a)}var eN=e.i(77779);e.s(["QueryPersistenceProvider",0,function({children:e}){let r=(0,eS.useQueryClient)(),i=(0,R.useSupabaseClient)(),[a,o]=(0,f.useState)(!0);return(0,f.useEffect)(()=>{var e;let t,i,a=(0,eN.createIDBPersister)(),[n]=(i=!1,[()=>{i=!0,t?.()},eP(e={queryClient:r,persister:a,maxAge:864e5,buster:"v1",dehydrateOptions:{shouldDehydrateQuery:e=>"success"===e.state.status&&(0,eN.shouldPersistQuery)(e.queryKey)}}).then(()=>{let r,a;i||(r=e.queryClient.getQueryCache().subscribe(t=>{ej(t.type)&&eA(e)}),a=e.queryClient.getMutationCache().subscribe(t=>{ej(t.type)&&eA(e)}),t=()=>{r(),a()})})]),s=setTimeout(()=>{o(!1)},100);return()=>{clearTimeout(s),n()}},[r]),(0,f.useEffect)(()=>
3{if(!i)return;let{data:{subscription:e}}=i.auth.onAuthStateChange(async e=>{"SIGNED_OUT"===e&&(await (0,eN.clearQueryPersistenceCache)(),r.clear(),console.log("[QueryPersistenceProvider] Cleared cache on SIGNED_OUT"))});return()=>{e.unsubscribe()}},[i,r]),(0,t.jsx)(t.Fragment,{children:e})}],978382);var eE=e.i(168489),eI=e.i(974711),eR=e.i(653835),eL=e.i(994421),e_=e.i(207333),eM=e.i(691827),ez=e.i(109078),eF=e.i(496323);let eD=(0,eE.default)(()=>e.A(936595).then(e=>({default:e.TaskQueueFloat})),{loadableGenerated:{modules:[446149]},ssr:!1}),eU=eI.ENABLE_LOCAL_PRIVACY_MODE?(0,eE.default)(()=>e.A(71331).then(e=>{let t=()=>(e.useLocalTaskProcessor(),null);return t.displayName="LocalTaskProcessorLogic",{default:t}}),{loadableGenerated:{modules:[587353]},ssr:!1}):null;function eB(){let{cancelAllTasks:e}=(0,ez.useTaskProcessor)();(0,eM.useDialogUploadPipeline)();let r=(0,eL.useTaskQueueStore)(e=>(e.queue?.length??0)>0);return((0,e_.useGlobalPasteListener)(),r)?(0,t.jsx)(eD,{onCancelAllTasks:e}):null}function eV(){let e;return e=(0,p.useRouter)(),(0,f.useEffect)(()=>{let t=async t=>{let{detail:r}=t;if(!r||"task-completed"!==r.type)return;let{taskId:i,contentId:a,isLocalMode:o}=r;o?await e.push(`/local-result?taskId=${i}&tab=summary`):a?await e.push(`/content/${a}`):eL.useTaskQueueStore.getState().setQueueVisible(!0)};return window.addEventListener(eR.NOTIFICATION_CLICK_EVENT,t),()=>window.removeEventListener(eR.NOTIFICATION_CLICK_EVENT,t)},[e]),null}e.s(["TaskQueueProvider",0,function({children:e}){return(0,eF.isTauri)()&&(0,eF.isAigtdBuild)()?(0,t.jsx)(t.Fragment,{children:e}):(0,t.jsxs)(t.Fragment,{children:[e,(0,t.jsx)(eV,{}),(0,t.jsx)(eB,{}),eU&&(0,t.jsx)(eU,{})]})}],162588)},603940,e=>{"use strict";var t=e.i(391398),r=e.i(191788),i=e.i(472865);function a(){let{enableTexture:e}=(0,i.useThemeStore)();return e?(0,t.jsx)("div",{className:"texture"}):null}e.s(["ThemeProvider",0,function({children:e}){let{mode:o,color:n}=(0,i.useThemeStore)();return(0,r.useEffect)(()=>{i.useThemeStore.persist?.rehydrate()},[]),(0,r.useEffect)(()=>{let e=window.document.documentElement,t=window.document.body;if(e.classList.remove("light","dark"),t.classList.remove("light","dark"),"system"===o){let r=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";e.classList.add(r),t.classList.add(r)}else e.classList.add(o),t.classList.add(o)},[o]),(0,r.useEffect)(()=>{if("system"!==o)return;let e=window.matchMedia("(prefers-color-scheme: dark)"),t=()=>{let t=window.document.documentElement,r=window.document.body;t.classList.remove("light","dark"),r.classList.remove("light","dark");let i=e.matches?"dark":"light";t.classList.add(i),r.classList.add(i)};return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[o]),(0,r.useEffect)(()=>{let e=window.document.documentElement,t=window.document.body;["theme-default","theme-ghibli","theme-slate","theme-zinc","theme-neutral","theme-pink","theme-blue","theme-brutal"].forEach(r=>{e.classList.remove(r),t.classList.remove(r)});let r=`theme-${n}`;e.classList.add(r),t.classList.add(r)},[n]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a,{}),e]})}],603940)},434196,e=>{"use strict";var t=e.i(391398),r=e.i(418207),r=r,i=e.i(600300),a=e.i(948592),a=a;let o=(0,e.i(369547).default)("octagon-x",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);var n=e.i(74152),s=e.i(191788),l=(e,t,r,i,a,o,n,s)=>{let l=document.documentElement,u=["light","dark"];function d(t){var r;(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,i=r&&o?a.map(e=>o[e]||e):a;r?(l.classList.remove(...i),l.classList.add(o&&o[t]?o[t]:t)):l.setAttribute(e,t)}),r=t,s&&u.includes(r)&&(l.style.colorScheme=r)}if(i)d(i);else try{let e=localStorage.getItem(t)||r,i=n&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;d(i)}catch(e){}},u=s.createContext(void 0),d={setTheme:e=>{},themes:[]};s.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:i,enableColorScheme:a,defaultTheme:o,value:n,themes:u,nonce:d,scriptProps:c})=>{let m=JSON.stringify([r,t,o,e,u,n,i,a]).slice(1,-1);return s.createElement("script",{...c,suppressHydrationWarning:!0,nonce:"u"<typeof window?d:"",dangerouslySetInnerHTML:{__html:`(${l.toString()})(${m})`}})});var c=e.i(679935);e.s(["Toaster",0,({...e})=>{var l;let{theme:m="system"}=null!=(l=s.useContext(u))?l:d;return(0,t.jsx)(c.Toaster,{theme:m,className:"toaster group pointer-events-auto",style:{pointerEvents:"auto"},icons:{success:(0,t.jsx)(r.default,{className:"size-4"}),info:(0,t.jsx)(i.Info,{className:"size-4"}),warning:(0,t.jsx)(n.TriangleAlert,{className:"size-4"}),error:(0,t.jsx)(o,{className:"size-4"}),loading:(0,t.jsx)(a.default,{className:"size-4 animate-spin"})},toastOptions:{classNames:{toast:"group toast pointer-events-auto group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:pointer-events-auto group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})}],434196)},460764,e=>{"use strict";var t=e.i(391398),r=e.i(191788),i=e.i(730943);function a(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e?.(i),!1===r||!i.defaultPrevented)return t?.(i)}}"u">typeof window&&window.document&&window.document.createElement;var o=e.i(357006),n=e.i(352162),s=e.i(479293),l=e.i(64899),u=e.i(437767),d=e.i(993953),c=e.i(674534),m=e.i(998657),p=e.i(776833);r[" useEffectEvent ".trim().toString()],r[" useInsertionEffect ".trim().toString()];var f=r[" useInsertionEffect ".trim().toString()]||p.useLayoutEffect;Symbol("RADIX:SYNC_STATE");var g=e.i(349577),h="ToastProvider",[b,v,x]=(0,n.createCollection)("Toast"),[
3y,w]=(0,s.createContextScope)("Toast",[x]),[k,S]=y(h),T=e=>{let{__scopeToast:i,label:a="Notification",duration:o=5e3,swipeDirection:n="right",swipeThreshold:s=50,children:l}=e,[u,d]=r.useState(null),[c,m]=r.useState(0),p=r.useRef(!1),f=r.useRef(!1);return a.trim()||console.error(`Invalid prop \`label\` supplied to \`${h}\`. Expected non-empty \`string\`.`),(0,t.jsx)(b.Provider,{scope:i,children:(0,t.jsx)(k,{scope:i,label:a,duration:o,swipeDirection:n,swipeThreshold:s,toastCount:c,viewport:u,onViewportChange:d,onToastAdd:r.useCallback(()=>m(e=>e+1),[]),onToastRemove:r.useCallback(()=>m(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:f,children:l})})};T.displayName=h;var C="ToastViewport",j=["F8"],P="toast.viewportPause",A="toast.viewportResume",N=r.forwardRef((e,i)=>{let{__scopeToast:a,hotkey:n=j,label:s="Notifications ({hotkey})",...u}=e,d=S(C,a),m=v(a),p=r.useRef(null),f=r.useRef(null),g=r.useRef(null),h=r.useRef(null),x=(0,o.useComposedRefs)(i,h,d.onViewportChange),y=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=d.toastCount>0;r.useEffect(()=>{let e=e=>{0!==n.length&&n.every(t=>e[t]||e.code===t)&&h.current?.focus()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[n]),r.useEffect(()=>{let e=p.current,t=h.current;if(w&&e&&t){let r=()=>{if(!d.isClosePausedRef.current){let e=new CustomEvent(P);t.dispatchEvent(e),d.isClosePausedRef.current=!0}},i=()=>{if(d.isClosePausedRef.current){let e=new CustomEvent(A);t.dispatchEvent(e),d.isClosePausedRef.current=!1}},a=t=>{e.contains(t.relatedTarget)||i()},o=()=>{e.contains(document.activeElement)||i()};return e.addEventListener("focusin",r),e.addEventListener("focusout",a),e.addEventListener("pointermove",r),e.addEventListener("pointerleave",o),window.addEventListener("blur",r),window.addEventListener("focus",i),()=>{e.removeEventListener("focusin",r),e.removeEventListener("focusout",a),e.removeEventListener("pointermove",r),e.removeEventListener("pointerleave",o),window.removeEventListener("blur",r),window.removeEventListener("focus",i)}}},[w,d.isClosePausedRef]);let k=r.useCallback(({tabbingDirection:e})=>{let t=m().map(t=>{let r=t.ref.current,i=[r,...function(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}(r)];return"forwards"===e?i:i.reverse()});return("forwards"===e?t.reverse():t).flat()},[m]);return r.useEffect(()=>{let e=h.current;if(e){let t=t=>{let r=t.altKey||t.ctrlKey||t.metaKey;if("Tab"===t.key&&!r){let r=document.activeElement,i=t.shiftKey;if(t.target===e&&i)return void f.current?.focus();let a=k({tabbingDirection:i?"backwards":"forwards"}),o=a.findIndex(e=>e===r);H(a.slice(o+1))?t.preventDefault():i?f.current?.focus():g.current?.focus()}};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}},[m,k]),(0,t.jsxs)(l.Branch,{ref:p,role:"region","aria-label":s.replace("{hotkey}",y),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&(0,t.jsx)(I,{ref:f,onFocusFromOutsideViewport:()=>{H(k({tabbingDirection:"forwards"}))}}),(0,t.jsx)(b.Slot,{scope:a,children:(0,t.jsx)(c.Primitive.ol,{tabIndex:-1,...u,ref:x})}),w&&(0,t.jsx)(I,{ref:g,onFocusFromOutsideViewport:()=>{H(k({tabbingDirection:"backwards"}))}})]})});N.displayName=C;var E="ToastFocusProxy",I=r.forwardRef((e,r)=>{let{__scopeToast:i,onFocusFromOutsideViewport:a,...o}=e,n=S(E,i);return(0,t.jsx)(g.VisuallyHidden,{tabIndex:0,...o,ref:r,style:{position:"fixed"},onFocus:e=>{let t=e.relatedTarget;n.viewport?.contains(t)||a()}})});I.displayName=E;var R="Toast",L=r.forwardRef((e,i)=>{let{forceMount:o,open:n,defaultOpen:s,onOpenChange:l,...u}=e,[c,p]=function({prop:e,defaultProp:t,onChange:i=()=>{},caller:a}){let[o,n,s]=function({defaultProp:e,onChange:t}){let[i,a]=r.useState(e),o=r.useRef(i),n=r.useRef(t);return f(()=>{n.current=t},[t]),r.useEffect(()=>{o.current!==i&&(n.current?.(i),o.current=i)},[i,o]),[i,a,n]}({defaultProp:t,onChange:i}),l=void 0!==e,u=l?e:o;{let t=r.useRef(void 0!==e);r.useEffect(()=>{let e=t.current;if(e!==l){let t=l?"controlled":"uncontrolled";console.warn(`${a} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=l},[l,a])}return[u,r.useCallback(t=>{if(l){let r="function"==typeof t?t(e):t;r!==e&&s.current?.(r)}else n(t)},[l,e,n,s])]}({prop:n,defaultProp:s??!0,onChange:l,caller:R});return(0,t.jsx)(d.Presence,{present:o||c,children:(0,t.jsx)(z,{open:c,...u,ref:i,onClose:()=>p(!1),onPause:(0,m.useCallbackRef)(e.onPause),onResume:(0,m.useCallbackRef)(e.onResume),onSwipeStart:a(e.onSwipeStart,e=>{e.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:a(e.onSwipeMove,e=>{let{x:t,y:r}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","move"),e.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${r}px`)}),onSwipeCancel:a(e.onSwipeCancel,e=>{e.currentTarget.setAttribute("data-swipe","cancel"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:a(e.onSwipeEnd,e=>{let{x:t,y:r}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","end"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${r}px`),p(!1)})})})});L.displayName=R;var[_,M]=y(R,{onClose(){}}
3),z=r.forwardRef((e,n)=>{let{__scopeToast:s,type:u="foreground",duration:d,open:p,onClose:f,onEscapeKeyDown:g,onPause:h,onResume:v,onSwipeStart:x,onSwipeMove:y,onSwipeCancel:w,onSwipeEnd:k,...T}=e,C=S(R,s),[j,N]=r.useState(null),E=(0,o.useComposedRefs)(n,e=>N(e)),I=r.useRef(null),L=r.useRef(null),M=d||C.duration,z=r.useRef(0),D=r.useRef(M),U=r.useRef(0),{onToastAdd:B,onToastRemove:V}=C,$=(0,m.useCallbackRef)(()=>{j?.contains(document.activeElement)&&C.viewport?.focus(),f()}),G=r.useCallback(e=>{e&&e!==1/0&&(window.clearTimeout(U.current),z.current=new Date().getTime(),U.current=window.setTimeout($,e))},[$]);r.useEffect(()=>{let e=C.viewport;if(e){let t=()=>{G(D.current),v?.()},r=()=>{let e=new Date().getTime()-z.current;D.current=D.current-e,window.clearTimeout(U.current),h?.()};return e.addEventListener(P,r),e.addEventListener(A,t),()=>{e.removeEventListener(P,r),e.removeEventListener(A,t)}}},[C.viewport,M,h,v,G]),r.useEffect(()=>{p&&!C.isClosePausedRef.current&&G(M)},[p,M,C.isClosePausedRef,G]),r.useEffect(()=>(B(),()=>V()),[B,V]);let O=r.useMemo(()=>j?function e(t){let r=[];return Array.from(t.childNodes).forEach(t=>{var i;if(t.nodeType===t.TEXT_NODE&&t.textContent&&r.push(t.textContent),(i=t).nodeType===i.ELEMENT_NODE){let i=t.ariaHidden||t.hidden||"none"===t.style.display,a=""===t.dataset.radixToastAnnounceExclude;if(!i)if(a){let e=t.dataset.radixToastAnnounceAlt;e&&r.push(e)}else r.push(...e(t))}}),r}(j):null,[j]);return C.viewport?(0,t.jsxs)(t.Fragment,{children:[O&&(0,t.jsx)(F,{__scopeToast:s,role:"status","aria-live":"foreground"===u?"assertive":"polite",children:O}),(0,t.jsx)(_,{scope:s,onClose:$,children:i.createPortal((0,t.jsx)(b.ItemSlot,{scope:s,children:(0,t.jsx)(l.Root,{asChild:!0,onEscapeKeyDown:a(g,()=>{C.isFocusedToastEscapeKeyDownRef.current||$(),C.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,t.jsx)(c.Primitive.li,{tabIndex:0,"data-state":p?"open":"closed","data-swipe-direction":C.swipeDirection,...T,ref:E,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:a(e.onKeyDown,e=>{"Escape"===e.key&&(g?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(C.isFocusedToastEscapeKeyDownRef.current=!0,$()))}),onPointerDown:a(e.onPointerDown,e=>{0===e.button&&(I.current={x:e.clientX,y:e.clientY})}),onPointerMove:a(e.onPointerMove,e=>{if(!I.current)return;
3let t=e.clientX-I.current.x,r=e.clientY-I.current.y,i=!!L.current,a=["left","right"].includes(C.swipeDirection),o=["left","up"].includes(C.swipeDirection)?Math.min:Math.max,n=a?o(0,t):0,s=a?0:o(0,r),l="touch"===e.pointerType?10:2,u={x:n,y:s},d={originalEvent:e,delta:u};i?(L.current=u,q("toast.swipeMove",y,d,{discrete:!1})):W(u,C.swipeDirection,l)?(L.current=u,q("toast.swipeStart",x,d,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>l||Math.abs(r)>l)&&(I.current=null)}),onPointerUp:a(e.onPointerUp,e=>{let t=L.current,r=e.target;if(r.hasPointerCapture(e.pointerId)&&r.releasePointerCapture(e.pointerId),L.current=null,I.current=null,t){let r=e.currentTarget,i={originalEvent:e,delta:t};W(t,C.swipeDirection,C.swipeThreshold)?q("toast.swipeEnd",k,i,{discrete:!0}):q("toast.swipeCancel",w,i,{discrete:!0}),r.addEventListener("click",e=>e.preventDefault(),{once:!0})}})})})}),C.viewport)})]}):null}),F=e=>{let{__scopeToast:i,children:a,...o}=e,n=S(R,i),[s,l]=r.useState(!1),[d,c]=r.useState(!1);return function(e=()=>{}){let t=(0,m.useCallbackRef)(e);(0,p.useLayoutEffect)(()=>{let e=0,r=0;return e=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(r)}},[t])}(()=>l(!0)),r.useEffect(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),d?null:(0,t.jsx)(u.Portal,{asChild:!0,children:(0,t.jsx)(g.VisuallyHidden,{...o,children:s&&(0,t.jsxs)(t.Fragment,{children:[n.label," ",a]})})})},D=r.forwardRef((e,r)=>{let{__scopeToast:i,...a}=e;return(0,t.jsx)(c.Primitive.div,{...a,ref:r})});D.displayName="ToastTitle";var U=r.forwardRef((e,r)=>{let{__scopeToast:i,...a}=e;return(0,t.jsx)(c.Primitive.div,{...a,ref:r})});U.displayName="ToastDescription";var B="ToastAction",V=r.forwardRef((e,r)=>{let{altText:i,...a}=e;return i.trim()?(0,t.jsx)(O,{altText:i,asChild:!0,children:(0,t.jsx)(G,{...a,ref:r})}):(console.error(`Invalid prop \`altText\` supplied to \`${B}\`. Expected non-empty \`string\`.`),null)});V.displayName=B;var $="ToastClose",G=r.forwardRef((e,r)=>{let{__scopeToast:i,...o}=e,n=M($,i);return(0,t.jsx)(O,{asChild:!0,children:(0,t.jsx)(c.Primitive.button,{type:"button",...o,ref:r,onClick:a(e.onClick,n.onClose)})})});G.displayName=$;var O=r.forwardRef((e,r)=>{let{__scopeToast:i,altText:a,...o}=e;return(0,t.jsx)(c.Primitive.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":a||void 0,...o,ref:r})});function q(e,t,r,{discrete:i}){let a=r.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),i?(0,c.dispatchDiscreteCustomEvent)(a,o):a.dispatchEvent(o)}var W=(e,t,r=0)=>{let i=Math.abs(e.x),a=Math.abs(e.y),o=i>a;return"left"===t||"right"===t?o&&i>r:!o&&a>r};function H(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}var X=e.i(648684),Y=e.i(868462),K=e.i(911160);let Q=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(N,{ref:i,className:(0,K.cn)("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:flex-col md:max-w-[420px]",e),...r}));Q.displayName=N.displayName;let J=(0,X.cva)("data-[swipe=move]:transition-none grow-1 group relative pointer-events-auto flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full mt-4 data-[state=closed]:slide-out-to-right-full dark:border-slate-700 last:mt-0 sm:last:mt-4",{variants:{variant:{default:"bg-white border-slate-200 dark:bg-slate-800 dark:border-slate-700",success:"bg-green-500 border-slate-200 dark:bg-slate-800 dark:border-slate-700",destructive:"group destructive bg-red-500 text-white border-red-500 dark:border-red-500"}},defaultVariants:{variant:"default"}}),Z=r.forwardRef(({className:e,variant:r,...i},a)=>(0,t.jsx)(L,{ref:a,className:(0,K.cn)(J({variant:r}),e),...i}));Z.displayName=L.displayName;let ee=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(V,{ref:i,className:(0,K.cn)("inline-flex h-8 shrink-0 items-center justify-center rounded-md border border-slate-200 bg-transparent px-3 text-sm font-medium transition-colors group-[.destructive]:border-red-100 hover:bg-slate-100 group-[.destructive]:hover:border-slate-50 group-[.destructive]:hover:bg-red-100 group-[.destructive]:hover:text-red-600 focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 focus:outline-none group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600 disabled:pointer-events-none disabled:opacity-50 dark:border-slate-700 dark:text-slate-100 dar
3k:hover:bg-slate-700 dark:hover:text-slate-100 dark:focus:ring-slate-400 dark:focus:ring-offset-slate-900 dark:data-[state=open]:bg-slate-800",e),...r}));ee.displayName=V.displayName;let et=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(G,{ref:i,className:(0,K.cn)("absolute top-2 right-2 rounded-md p-1 text-slate-500 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-slate-900 group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:ring-2 focus:outline-none group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600 dark:hover:text-slate-50",e),"toast-close":"",...r,children:(0,t.jsx)(Y.X,{className:"size-4"})}));et.displayName=G.displayName;let er=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(D,{ref:i,className:(0,K.cn)("text-sm font-semibold",e),...r}));er.displayName=D.displayName;let ei=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(U,{ref:i,className:(0,K.cn)("text-sm opacity-90",e),...r}));ei.displayName=U.displayName,e.s(["Toast",0,Z,"ToastAction",0,ee,"ToastClose",0,et,"ToastDescription",0,ei,"ToastProvider",0,T,"ToastTitle",0,er,"ToastViewport",0,Q],460764)},691827,e=>{"use strict";var t=e.i(191788),r=e.i(679935),i=e.i(193905),a=e.i(674408),o=e.i(983410),n=e.i(913621),s=e.i(282987),l=e.i(971145),u=e.i(666111),d=e.i(80690),c=e.i(297678),m=e.i(401533),p=e.i(479744),f=e.i(424959),g=e.i(511125),h=e.i(833805),b=e.i(748629),v=e.i(994421),x=e.i(661262),y=e.i(975682),w=e.i(203828);e.s(["useDialogUploadPipeline",0,function(){let{t:e}=(0,i.useTranslation)(),n=(0,w.useRouter)(),c=(0,y.useUser)(),k=(0,y.useSupabaseClient)(),{isProPaidMemberUser:S}=(0,o.useUserOrdersAndMemberType)(),{setValue:T}=(0,u.default)(),{uploadFileAndSaveContent:C,uploadFileWithUrlAndSaveContent:j}=(0,s.useUploadFile)(),{extractThumbnail:P}=(0,l.useVideoThumbnail)(),A=(0,b.useAppStore)(e=>e.convertFileToMp3Audio),N=(0,b.useAppStore)(e=>e.compressVideoFile),E=(0,b.useAppStore)(e=>e.handleTauriFileStrict),I=(0,b.useAppStore)(e=>e.toggleVisualSummary),R=(0,b.useAppStore)(e=>e.uploadFileToR2PublicAssets),L=(0,v.useTaskQueueStore)(e=>e.updateTaskProgress),_=(0,v.useTaskQueueStore)(e=>e.promoteUploadingTask),M=(0,v.useTaskQueueStore)(e=>e.setTaskError),z=(0,v.useTaskQueueStore)(e=>e.setTaskCompleted),F=(0,v.useTaskQueueStore)(e=>e.queue),D=(0,t.useRef)(async()=>{});D.current=async t=>{if(!(0,g.beginDialogUpload)(t))return;let i=(0,g.getDialogUploadJob)(t);if(!i)return void(0,g.endDialogUpload)(t);try{let o;if(!c)throw Error(e("请å
ç»å½å¦ï¼"));let s=i.file,u=(0,m.buildEncodedMp3FileName)(s.name);if((0,l.isVideoFile)(s))try{L(t,8,i.initialStep,e("æåå°é¢"));let r=await P(s,{timeOffset:1,width:320,height:180,quality:2});if(r&&c){let e=await R(r,c,"thumbnails");"u">typeof sessionStorage&&(sessionStorage.setItem(`thumbnail_${u}`,e),sessionStorage.setItem(`thumbnail_${s.name}`,e))}}catch(e){console.warn("[dialogUpload] thumbnail failed",s.name,e)}if("web"===i.platform){let r;if(!("u">typeof File&&s instanceof File))throw Error(e("å¤çæä»¶å¤±è´¥"));(0,p.cacheLocalMedia)(c.id,t,s);let o={content:s,name:s.name,type:s.type};if(i.visualSummary||i.onlyCompress)L(t,20,"compressing",e("å缩è§é¢...")),r=await N(o,T,{onlyCompress:i.onlyCompress,speed:1});else if(L(t,20,"extracting",e("æåé³é¢...")),(r=await A(o,T)).size>a.SUANLEME_WHISPER_FILE_SIZE_LIMIT)throw Error(e("upload.fileTooLargeAfterConversion",{name:s.name})+" "+e("upload.fileTooLargeHint",{size:(0,x.convertFileSize)(s)}));L(t,60,"uploading",e("ä¸ä¼ æä»¶..."));let n=await C({file:r});if(!n?.dbId||!n?.fullFileUrl)throw Error(e("ä¿åå°æ°æ®åºå¤±è´¥"));(0,p.cacheLocalMedia)(c.id,n.dbId,s),_(t,{url:n.fullFileUrl,contentId:n.dbId,title:s.name}),(0,g.unregisterDialogUploadJob)(t);return}(0,p.cacheLocalMedia)(c.id,t,s);let f=i.visualSummary;try{L(t,20,f?"compressing":"extracting",f?e("å缩è§é¢..."):e("æåé³é¢...")),[o]=await E([s],f,c,e=>{let r=20+Math.round(e/100*35);L(t,Math.min(r,55),f?"compressing":"extracting")})}catch(i){if(i instanceof d.NoAudioTrackError&&S)r.toast.info(e("å·²èªå¨åæ¢ä¸ºè§è§åæ»ç»")),I(!0),f=!0,L(t,20,"compressing",e("å缩è§é¢...")),[o]=await E([s],!0,c);else throw i}if(!o)throw Error(e("ä¸ä¼ ç»æä¸ºç©º"));let b="u">typeof sessionStorage&&sessionStorage.getItem(`thumbnail_${s.name}`)||void 0;L(t,70,"uploading",e("ä¿åå°ç¥è¯åº"));let v=await j({file:s,fileUrl:o,thumbnailUrl:b});if(!v?.dbId)throw Error(e("ä¿åå°æ°æ®åºå¤±è´¥"));if(f){try{await k.from("visual_video_summaries").upsert({user_id:c.id,summary:"",video_url:o},{onConflict:"user_id,video_url",ignoreDuplicates:!1})}catch(e){console.error("[dialogUpload] visual summary row failed",e)}z(t,v.dbId),(0,g.unregisterDialogUploadJob)(t),await n.push(`/content/${v.dbId}?tab=${h.ResultTab.Vision}`);return}_(t,{url:o,contentId:v.dbId,thumbnail:b,title:s.name}),(0,g.unregisterDialogUploadJob)(t)}catch(o){let a=o instanceof Error?o.message:e("æªç¥é误");console.error("[dialogUpload] failed",i.file.name,o),M(t,a),o instanceof d.NoAudioTrackError?(S?(0,r.toast)(e("æ¤è§é¢æ é³è½¨ï¼è¯·ç¨æ¡é¢ç«¯å¤ç"),{description:e("è§è§åæ»ç»ä»
卿¡é¢ç«¯å¯ç¨"),duration:2e4,action:{label:e("å»ä¸è½½"),onClick:()=>window.open("/apps/desktop","_blank")}}):r.toast.error(e("æ¤è§é¢æ é³è½¨ï¼è¯·ç¨æ¡é¢ç«¯å¤ç"),{description:e("å级 Pro å³å¯ä½¿ç¨ è§è§åæ»ç»ï¼ææ 声è§é¢ä¹åæå¯è¯»å
容"),duration:2e4,action:{label:e("å级 Pro · è§£éè§è§åæ»ç»"),onClick:()=>window.open("/shop?ref=no_audio_upsell","_blank")}}),(0,g.unregisterDialogUploadJob)(t)):r.toast.error(e("å¤çæä»¶å¤±è´¥"),{description:`${i.file.name}: ${a}`,duration:8e3})}finally{(0,g.endDialogUpload)(t)}},(0,t.useEffect)(()=>{for(let e of F)"pending"===e.status&&(0,f.isPreparingStep)(e.progressStep)&&(0,g.hasDialogUploadJob)(e.id)&&D.current(e.id)},[F])},"useEnqueueDialogUploads",0,function(){let e=(0,v.useTaskQueueStore)(e=>e.addUploadingTask),{targetCollectionId:t,customPrompt:r}=(0,n.useCollectionTaskOptions)(),i=(0,b.useAppStore)(e=>e.onVisualSummary);return{enqueueFile:function(a,o,n){let s=n?.visualSummary??i??!1,l=s||n?.onlyCompress?"compressing":"extracting",u=e((0,
3c.persistableLocalPath)(a),a.name,void 0,{progressStep:l,targetCollectionId:t,customPrompt:r,autoTranslateLanguage:n?.autoTranslateLanguage}),d={taskId:u,platform:o,file:a,visualSummary:s,onlyCompress:n?.onlyCompress,autoTranslateLanguage:n?.autoTranslateLanguage,initialStep:l};return(0,g.registerDialogUploadJob)(d),u}}}])},192634,e=>{"use strict";var t=e.i(191788);e.s(["useIdleDeferredFlag",0,function(e=3e3){let[r,i]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{let t=()=>i(!0),r=window.requestIdleCallback;if("function"==typeof r){let i=r(t,{timeout:e});return()=>window.cancelIdleCallback?.(i)}let a=setTimeout(t,100);return()=>clearTimeout(a)},[e]),r}])},768208,e=>{"use strict";var t,r=e.i(217837);e.i(975682);var i=((t={}).PLAYLIST="playlist",t);let a={playlist:!1};e.s(["FLAG",()=>i,"useFeatureFlag",0,function(){let e=(0,r.useSearchParams)();return{isEnabled:t=>a[t]||e?.get(t)==="1"}}])},282987,e=>{"use strict";var t=e.i(679935),r=e.i(193905),i=e.i(771091),a=e.i(865261),o=e.i(872012),n=e.i(21235),s=e.i(701710),l=e.i(961026),u=e.i(748629),d=e.i(490914),c=e.i(496323),m=e.i(338739),p=e.i(564496),f=e.i(297678),g=e.i(975682);async function h(e,t,r){let i=(0,f.persistableLocalPath)(r);if(!i)return;let{data:a}=await e.from("user_contents").select("local_path").eq("id",t).maybeSingle();if(a?.local_path)return;let{error:o}=await e.from("user_contents").update({local_path:i}).eq("id",t);o&&console.warn("[useUploadFile] backfill local_path failed:",o.message)}async function b(t){if((0,c.isTauri)()&&"string"==typeof t?.path){let r=t.path;try{let t=await e.A(872622);return await t.computeTauriFingerprint(r)}catch(e){console.warn("[useUploadFile] tauri fingerprint compute failed:",e)}}if("u">typeof File&&t instanceof File)try{return await (0,i.computeWebFingerprint)(t)}catch(e){console.warn("[useUploadFile] web fingerprint compute failed:",e)}return null}e.s(["useUploadFile",0,function(){let{t:e}=(0,r.useTranslation)(),i=(0,g.useSupabaseClient)(),c=(0,g.useUser)(),v=(0,u.useAppStore)(e=>e.setShowAddNewContentModal),x=(0,u.useAppStore)(e=>e.uploadFileToOSS),y=d.api.ingest.attachContent.useMutation(),w=async r=>{let i=t.toast.loading(`æ£å¨ä¸ä¼ æä»¶ ${r.name}...`,{duration:1/0,description:"请ç¨å..."});try{if((0,n.isR2IngestEnabled)()){let e=await (0,s.ingestOne)({kind:"web",file:r,sourceKind:"manual"});return{url:e.sourceUrl,fingerprint:e.fingerprint}}return{url:await x(r,c),fingerprint:null}}catch(i){console.error("Failed to upload file",i);let r="string"==typeof i?.message&&/[\u4e00-\u9fff]/.test(i.message)?i.message:e("ç½ç»å¼å¸¸ææä»¶è¿å¤§ï¼è¯·æ£æ¥ç½ç»åéè¯ãå¦åå¤å¤±è´¥ï¼å»ºè®®ä½¿ç¨æ¡é¢å®¢æ·ç«¯å¤ç大è§é¢ã");throw t.toast.error(e("ä¸ä¼ 失败"),{description:r,duration:8e3}),i}finally{t.toast.dismiss(i)}},k=async({file:r,contentType:o})=>{let n=await w(r);if(!n?.url)return;let{url:s,fingerprint:u}=n;if(c?.id&&u?.hash){let e=await T(u);if(e)return console.log("[uploadFileAndSaveContent] reuse via fingerprint:",e),await h(i,e.dbId,r),{dbId:e.dbId,fullFileUrl:e.sourceUrl}}let d=await (0,m.getAudioDurationFromFile)(r),g=sessionStorage.getItem(`thumbnail_${r.name}`);console.log("========uploadFileAndSaveContent thumbnailUrl check========",{fileName:r.name,thumbnailUrl:g,hasSessionStorage:!0});let{data:b,error:x}=await i.from("user_contents").insert({source_url:s,audio_url:s,duration:d,title:(0,a.usableUploadTitle)((0,p.getFileName)(r?.name||"")),user_id:c?.id||"",content_type:o||(r?.type?.startsWith("video/")?l.VideoService.LocalVideo:l.VideoService.LocalAudio),local_path:(0,f.persistableLocalPath)(r),cover_url:g||"",source_fingerprint:u?.hash??null}).select("id").single();if(b&&(t.toast.success(e("toast.file.localUploadSuccess")),v(!1),g&&sessionStorage.removeItem(`thumbnail_${r.name}`)),x){if("23505"===x.code&&c?.id&&u?.hash){console.warn("[uploadFileAndSaveContent] race: unique violation on fingerprint, falling back to select");let e=await T(u);if(e)return{dbId:e.dbId,fullFileUrl:e.sourceUrl}}console.error("Failed to upload file and save content",x),t.toast.error(e("æ¬å°æä»¶ä¸ä¼ 失败"),{description:x.message})}return c?.id&&b?.id&&S(c.id,b.id),{dbId:b?.id,fullFileUrl:s}},S=async(r,a)=>{let{data:o,error:n}=await i.from("user_contents_note").insert({user_id:r,content_id:a,note:null}).select("id").single();n&&(console.error("Failed to save user content note",n),t.toast.error(e("æ¬å°æä»¶ä¿åç¬è®°å¤±è´¥"),{description:n.message}))},T=async e=>{if(!c?.id||!e?.hash)return null;let{data:t,error:r}=await i.from("user_contents").select("id, source_url, source_fingerprint").eq("user_id",c.id).eq("source_fingerprint",e.hash).order("created_at",{ascending:!1}).limit(5);if(r)return console.warn("[findExistingByFingerprint] query failed",r),null;var a=(t||[]).filter(e=>"string"==typeof e.source_url&&!!e.source_fingerprint);if(!a||0===a.length||!e?.hash)return null;let o=a.find(t=>!!t.source_fingerprint&&t.source_fingerprint===e.hash);return o?{dbId:o.id,sourceUrl:o.source_url}:null};return{uploadFile:w,uploadFileAndSaveContent:k,uploadFileWithUrlAndSaveContent:async({file:r,fileUrl:n,uppyFile:s,thumbnailUrl:u,contentType:d,fingerprint:g})=>{let x=g??null;if(!x&&c?.id&&(x=await b(r)),c?.id&&x?.hash){let e=await T(x);if(e)return console.log("[uploadFileWithUrlAndSaveContent] reuse via fingerprint:",e),await h(i,e.dbId,r),{dbId:e.dbId,fullFileUrl:e.sourceUrl}}if(c?.id){let{data:e,error:t}=await i.from("user_contents").select("id, title").eq("user_id",c.id).eq("source_url",n).order("created_at",{ascending:!1}).limit(1).maybeSingle();if(!t&&e?.id){let t=(0,a.usableUploadTitle)((0,p.getFileName)(r?.name||s?.name||""));if(t&&(function(e){if(!e)return!1;let t=e.trim();return!!/^Direct media direct_/i.test(t)||"Unknown Video"===t}(e.title)||(0,a.isMojibakeFilename)(e.title)||!e.title)){let{error:r}=await i.from("user_contents").update({title:t}).eq("id",e.id);r?console.warn("[uploadFileWithUrlAndSaveContent] fix placeholder title failed:",r.message):console.log("[uploadFileWithUrlAndSaveContent] fixed placeholder title:",{dbId:e.id,realTitle:t})}return console.log("[uploadFileWithUrlAndSaveContent] reuse existing user_contents:",{fileUrl:n,dbId:e.id}),await h(i,e.id,r),{dbId:e.id,fullFileUrl:n}}}let w=await (0,m.getAudioDurationFromFile)(r);console.log("========thumbnailUrl========",u);let k=d?"video"===d?l.VideoService.LocalVideo:l.VideoService.LocalAudio:r?.type?.startsWith("video/")?l.VideoService.LocalVideo:l.VideoService.LocalAudio,{data:C,error:j}=await i.from("user_contents").insert({source_url:n,audio_url:n,duration:w,title:(0,a.usableUploadTitle)((0,p.getFileName)(r?.name||s?.name||"")),user_id:c?.id,content_type:k||(s?l.VideoService.ImportFile:l.VideoService.LocalVideo),local_path:(0,f.persistableLocalPath)(r)||(0,f.persistableLocalPath)(s),source_fingerprint:x?.hash??null,cover_url:u||s?.preview||s?.data?.preview||"",description:`Import from ${s?.source||"L
3ocal"}: ${(0,f.persistableLocalPath)(r)||(0,f.persistableLocalPath)(s)||""}`}).select("id").single();if(j&&"23505"===j.code&&c?.id&&x?.hash){console.warn("[uploadFileWithUrlAndSaveContent] race: unique violation on fingerprint, falling back to select");let e=await T(x);if(e)return await h(i,e.dbId,r),{dbId:e.dbId,fullFileUrl:e.sourceUrl}}C&&(t.toast.success(e("toast.file.uploadSuccess"),{description:e("toast.file.uploadSuccessDesc",{fileName:r?.name})}),v(!1)),j&&(console.error("Failed to upload file and save content",j),t.toast.error(e("æä»¶ä¸ä¼ 失败"),{description:j.message})),c?.id&&C?.id&&S(c.id,C.id);let P=C?.id?(0,o.fileIdFromAccessUrl)(n):null;if(C?.id&&P)try{await y.mutateAsync({fileId:P,contentId:C.id})}catch(e){console.warn("[uploadFileWithUrlAndSaveContent] attachContent failed",e)}return{dbId:C?.id,fullFileUrl:n}},findExistingByFingerprint:T}}],282987)},971145,e=>{"use strict";var t=e.i(191788),r=e.i(679935),i=e.i(728913),a=e.i(748629),o=e.i(496323);async function n(e,t,r){try{let i=await r.extractWithCanvas(e,t);if(i?.size)return{file:i,engine:"canvas"}}catch(t){console.warn("[extractWebVideoThumbnail] canvas failed, falling back to ffmpeg.wasm",e.name,t)}let i=await r.loadFfmpeg();return{file:await r.extractWithFfmpeg(e,i,t),engine:"ffmpeg"}}async function s(e,t){let{timeOffset:r=1,width:i=320,height:a=180,quality:o=2}=t||{},n=URL.createObjectURL(e);try{let t=document.createElement("video");t.preload="auto",t.muted=!0,t.playsInline=!0,t.src=n,await new Promise((e,r)=>{let i=window.setTimeout(()=>r(Error("CANVAS_THUMBNAIL_TIMEOUT")),8e3);t.onloadeddata=()=>{window.clearTimeout(i),e()},t.onerror=()=>{window.clearTimeout(i),r(Error("CANVAS_THUMBNAIL_UNSUPPORTED"))}});let s=t.duration,l=r>0?r:Number.isFinite(s)&&s>0?Math.max(.1,.1*s):1;Number.isFinite(s)&&s>0&&(t.currentTime=Math.min(l,Math.max(0,s-.05)),await new Promise((e,r)=>{let i=window.setTimeout(()=>r(Error("CANVAS_THUMBNAIL_SEEK_TIMEOUT")),5e3);t.onseeked=()=>{window.clearTimeout(i),e()}}));let u=document.createElement("canvas");u.width=i,u.height=a;let d=u.getContext("2d");if(!d)throw Error("CANVAS_THUMBNAIL_NO_CONTEXT");d.drawImage(t,0,0,i,a);let c=await new Promise((e,t)=>{u.toBlob(r=>r?e(r):t(Error("CANVAS_THUMBNAIL_EMPTY")),"image/jpeg",Math.max(.5,Math.min(.95,1-o/40)))});if(!c.size)throw Error("CANVAS_THUMBNAIL_EMPTY");let m=`${e.name.replace(/\.[^/.]+$/,"")}.jpg`;return new File([c],m,{type:"image/jpeg",lastModified:Date.now()})}finally{URL.revokeObjectURL(n)}}var l=e.i(871506);async function u(e,t,r){let{timeOffset:i=0,width:a=320,height:o=180,quality:n=2}=r||{},s=e.name.replace(/\.[^/.]+$/,""),u=`${s}.jpg`;t.FS("writeFile",e.name,await (0,l.fetchFile)(e));let d=i;if(0===i){let r="";t.setLogger(({message:e})=>{r+=e+"\n"});try{await t.run("-i",e.name,"-hide_banner")}catch(e){}let i=r.match(/Duration: (\d{2}):(\d{2}):(\d{2})\.(\d{2})/);d=i?Math.max(1,Math.floor(.1*(3600*parseInt(i[1])+60*parseInt(i[2])+parseInt(i[3])))):1}await t.run("-i",e.name,"-ss",d.toString(),"-vframes","1","-vf",`scale=${a}:${o}`,"-q:v",n.toString(),"-y",u);let c=new File([new Uint8Array(t.FS("readFile",u).buffer)],u,{type:"image/jpeg",lastModified:Date.now()});try{t.FS("unlink",e.name),t.FS("unlink",u)}catch(e){console.warn("Failed to cleanup FFmpeg filesystem:",e)}return c}var d=e.i(370947),c=e.i(564496);let m=async()=>{{let t=await e.A(74012),r=await e.A(323755);return{fs:t,path:r,downloadDir:r.downloadDir}}},p=Promise.resolve();async function f(e){try{let e=await (0,d.invoke)("get_download_folder_path");if(e?.path)return e.path}catch(e){console.warn("读åä¸è½½ç®å½é
置失败ï¼åéç³»ç»ä¸è½½ç®å½:",e)}return e()}async function g(e,t){var r;let i;return r=()=>h(e,t),p=(i=p.then(r,r)).catch(()=>void 0),i}async function h(e,t){let i,{fs:a,path:o,downloadDir:n}=await m();if(!a||!o||!n)throw r.toast.error("Failed to load Tauri modules"),Error("Failed to load Tauri modules");let{timeOffset:s=1,width:l=320,height:u=180,quality:p=2}=t||{};if("path"in e)i=e.path;else{let t=await f(n),r=(0,c.truncateFileName)(`temp-${Date.now()}-${e.name}`),s=await o.join(t,r),l=await e.arrayBuffer();await a.writeFile(s,new Uint8Array(l)),i=s}let g=e.name.replace(/\.[^/.]+$/,""),h=(0,c.truncateFileName)(`${g}.jpg`),b=await f(n),v=await o.join(b,h);try{console.log("========Generating thumbnail========",{videoPath:i,thumbnailPath:v,timeOffset:s,width:l,height:u,quality:p});let e=await (0,d.invoke)("generate_video_thumbnail",{videoPath:i});if(console.log("========Thumbnail generated========",{base64Length:e.length,thumbnailPath:v}),e.startsWith("data:image/jpeg;base64,")){let t=e.replace("data:image/jpeg;base64,",""),r=atob(t),i=new Uint8Array(r.length);for(let e=0;e<r.length;e++)i[e]=r.charCodeAt(e);await a.writeFile(v,i),console.log("========Thumbnail saved to file========",v)}let t=await a.stat(v),o={name:h,path:v,type:"image/jpeg",size:t.size,lastModified:Date.now(),webkitRelativePath:"",arrayBuffer:async()=>(await a.readFile(v)).buffer,bytes:async()=>await a.readFile(v),slice:()=>
3new Blob,stream:()=>new ReadableStream,text:async()=>"",json:async()=>{throw Error("TauriFile thumbnail does not support json()")},formData:async()=>{throw Error("TauriFile thumbnail does not support formData()")}};return r.toast.success("è§é¢å°é¢æåæåï¼",{description:`å·²çæç¼©ç¥å¾: ${h}`}),o}catch(e){throw console.error("Failed to generate thumbnail:",e),r.toast.error("è§é¢å°é¢æå失败",{description:e instanceof Error?e.message:"æªç¥é误"}),Error(`Failed to generate thumbnail: ${e}`)}}e.s(["isAudioFile",0,function(e){let t=e.name.split(".").pop()?.toLowerCase()||"";return(0,i.isAudioExtension)(t)},"isVideoFile",0,function(e){let t=e.name.split(".").pop()?.toLowerCase()||"";return(0,i.isVideoExtension)(t)},"useVideoThumbnail",0,function(){let[e,i]=(0,t.useState)(!1),[l,d]=(0,t.useState)(null),c=(0,a.useAppStore)(e=>e.checkAndLoadFFmpeg);return{isExtracting:e,extractThumbnail:(0,t.useCallback)(async(e,t)=>{i(!0),d(null);try{if((0,o.isTauri)()){let i=await g(e,t);return r.toast.success("è§é¢å°é¢æåæåï¼",{description:`å·²çæç¼©ç¥å¾: ${i.name}`}),i}{if(!(e instanceof File))throw Error("Webç¯å¢åªæ¯æFileç±»åçè§é¢æä»¶");let{file:i,engine:a}=await n(e,t,{extractWithCanvas:s,loadFfmpeg:async()=>{let e=await c();if(!e)throw Error("FFmpegå®ä¾åå§å失败");return e},extractWithFfmpeg:u});return console.log("[extractThumbnail] engine=",a,i.name),r.toast.success("è§é¢å°é¢æåæåï¼",{description:`å·²çæç¼©ç¥å¾: ${i.name}`}),i}}catch(t){let e=t instanceof Error?t.message:"è§é¢å°é¢æå失败";return d(e),r.toast.error("è§é¢å°é¢æå失败",{description:e}),console.error("Video thumbnail extraction failed:",t),null}finally{i(!1)}},[c]),error:l}}],971145)},77779,e=>{"use strict";var t=e.i(136362);let r="bibigpt-react-query-cache",i=[["user","videos"],["user","videoCount"],["user","profile"],["channel","channelList"],["agent","feed"],["share","listUserCollections"],["smartFolder","list"],["aigtd","getTasks"],["aigtd","getProjects"],["aigtd","getAreas"],["aigtd","getAgents"],["aigtd","getSettings"]];async function a(){try{await (0,t.del)(r),console.log("[IDB Persister] Cache cleared successfully")}catch(e){console.warn("[IDB Persister] Failed to clear cache:",e)}}e.s(["clearQueryPersistenceCache",0,a,"createIDBPersister",0,function(e=r){return{persistClient:async r=>{try{await (0,t.set)(e,r)}catch(e){console.warn("[IDB Persister] Failed to persist client:",e)}},restoreClient:async()=>{try{return await (0,t.get)(e)}catch(e){console.warn("[IDB Persister] Failed to restore client:",e);return}},removeClient:async()=>{try{await (0,t.del)(e)}catch(e){console.warn("[IDB Persister] Failed to remove client:",e)}}}},"shouldPersistQuery",0,function(e){let t=e[0];if(Array.isArray(t)){let e=t.join(".");return i.some(t=>{let r=t.join(".");return e===r||e.startsWith(r+".")})}return i.some(t=>!(t.length>e.length)&&t.every((t,r)=>e[r]===t))}])},511125,e=>{"use strict";let t=new Map,r=new Set;e.s(["beginDialogUpload",0,function(e){return!(!t.has(e)||r.has(e))&&(r.add(e),!0)},"endDialogUpload",0,function(e){r.delete(e)},"getDialogUploadJob",0,function(e){return t.get(e)},"hasDialogUploadJob",0,function(e){return t.has(e)},"registerDialogUploadJob",0,function(e){t.set(e.taskId,e)},"unregisterDialogUploadJob",0,function(e){t.delete(e),r.delete(e)}])},661262,e=>{"use strict";e.s(["convertFileSize",0,function(e){return e?.size?(e.size/1024/1024).toFixed(2)+"MB":"0MB"}])},608714,e=>{"use strict";let t="tauri:reload-route";function r(e){return"string"==typeof e&&e.startsWith("/")&&"/"!==e}function i(){let e=window.sessionStorage.getItem(t);if(!e)return null;try{let t=JSON.parse(e);if(!r(t.path)||"number"!=typeof t.timestamp)return null;return{path:t.path,timestamp:t.timestamp}}catch{return null}}function a(){return`${window.location.pathname}${window.location.search}${window.location.hash}`}function o(e=a()){if(!r(e))return void window.sessionStorage.removeItem(t);let i={path:e,timestamp:Date.now()};window.sessionStorage.setItem(t,JSON.stringify(i))}let n="tauri:initial-route";e.s(["clearTauriReloadPathIfCurrentMatches",0,function(e=a()){let r=i();r?.path===e&&window.sessionStorage.removeItem(t)},"consumeTauriInitialPath",0,function(){let e=window.sessionStorage.getItem(n);return window.sessionStorage.removeItem(n),r(e)?e:null},"consumeTauriReloadPath",0,function(){let e=i();return(window.sessionStorage.removeItem(t),e&&Date.now()-e.timestamp<=15e3)?e.path:null},"reloadCurrentTauriRoute",0,function(){o(),window.location.reload()},"rememberTauriReloadPath",0,o])},338739,e=>{"use strict";
3var t=e.i(856346),r=e.i(358615);function i(e,t,r){for(var i=0;i<e.length;++i)t[r+i]=e.charCodeAt(i)}function a(e,t,r){var i=255&(e=Math.floor(e)),a=e>>8&255;t[r+0]=i,t[r+1]=a}function o(e,t,r){var i=255&(e=Math.floor(e)),a=e>>8&255,o=e>>16&255,n=e>>24&255;t[r+0]=i,t[r+1]=a,t[r+2]=o,t[r+3]=n}var n=e.i(496323);async function s(e){let t=await function(e,t,r=8e3){try{t=t.toLowerCase();let n=new FileReader;return new Promise(s=>{n.onload=function(l){let u="audio/"+t,d=new(window.AudioContext||window.webkitAudioContext),c=n.result;d.decodeAudioData(c).then(function(n){let l=n.duration,d=new OfflineAudioContext(1,r*l,r),c=d.createBufferSource();c.buffer=n,c.connect(d.destination),c.start(),d.startRendering().then(function(r){var n,l,d,c,m,p;let f=(l=(n=r).length,d=n.numberOfChannels,c=n.sampleRate,m=l*d*2,p=new Uint8Array(44+m),i("RIFF",p,0),o(28+(8+m),p,4),i("WAVE",p,8),i("fmt ",p,12),o(16,p,16),a(1,p,20),a(d,p,22),o(c,p,24),o(c*d*16/8,p,28),a(16*d/8,p,32),o(16,p,34),i("data",p,36),o(m,p,40),function(e,t,r){for(var i=e.length,o=e.numberOfChannels,n=0;n<i;++n)for(var s=0;s<o;++s){var l=32768*e.getChannelData(s)[n];l<-32768&&(l=-32768),l>32767&&(l=32767),a(l,t,r),r+=2}}(n,p,44),p),g=btoa(function(e){var t,r,i="";for(t=0,r=e.length;t<r;t+=1)i+=String.fromCharCode(e[t]);return i}(f)),h=function(e,t,r=512){let i=atob(e),a=[];for(let e=0;e<i.length;e+=r){let t=i.slice(e,e+r),o=Array(t.length);for(let e=0;e<t.length;e++)o[e]=t.charCodeAt(e);let n=new Uint8Array(o);a.push(n)}return new Blob(a,{type:t})}(g,u),b=URL.createObjectURL(h),v={name:e.name.substring(0,e.name.lastIndexOf(".")),format:t,data:b};s(v)}).catch(function(e){console.log("Rendering failed: "+e)})})},n.readAsArrayBuffer(e)})}catch(e){console.log("Error occurred while converting : ",e)}}(e,"mp3");return await l(t)}async function l({name:e,format:t,data:r}){let i=await fetch(r),a=await i.blob();return new File([a],`${e}.${t}`,{type:a.type,lastModified:new Date().getTime()})}e.s(["convertToAudio",0,s,"getAudioDurationFromFile",0,function(e){return(0,n.isTauri)()&&"path"in e?t.TauriFileManager.getMediaDuration(e.path):r.WebFileManager.getMediaDuration(e)}],338739)},360392,e=>{"use strict";function t(){let e=0,t=[];for(let e=0;e<localStorage.length;e++){let r=localStorage.key(e);r&&r.startsWith("polished-text-")&&t.push(r)}return t.forEach(t=>{localStorage.removeItem(t),e++}),e>0&&console.log(`ð§¹ å·²æ¸
ç ${e} 个æ§ç polished-text ç¼å项ï¼éæ¾åå¨ç©ºé´`),e}function r(e=5,t){let i=[];for(let e=0;e<localStorage.length;e++){let t=localStorage.key(e);if(t&&t.startsWith("ai-editor-content")){let e=localStorage.getItem(t)||"";i.push({key:t,size:new Blob([t+e]).size})}}if(i.length<=e)return 0;i.sort((e,t)=>t.size-e.size);let a=i.filter(e=>e.key!==t).slice(0,i.length-e),o=0;return a.forEach(e=>{localStorage.removeItem(e.key),o++}),o>0&&console.log(`ð§¹ å·²æ¸
ç ${o} 个 AI ç¼è¾å¨ç¼å项ï¼éæ¾åå¨ç©ºé´`),o}e.s(["autoCleanupIfNeeded",0,function(e=80){let i=Math.round(function(){let e=0,t=0,r=0,i=0;for(let a=0;a<localStorage.length;a++){let o=localStorage.key(a);if(o){e++;let a=localStorage.getItem(o)||"",n=new Blob([o+a]).size;t+=n,o.startsWith("polished-text-")&&(r++,i+=n)}}return{totalKeys:e,totalSize:t,polishedTextKeys:r,polishedTextSize:i}}().totalSize/5242880*100);i>e&&(console.log(`ð localStorage 使ç¨ç ${i}%ï¼è¶
è¿éå¼ ${e}%ï¼å¼å§æ¸
ç...`),t(),r(3))},"cleanupAiEditorCache",0,r,"cleanupLegacyPolishedTextCache",0,t])}]);
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.