PageSourceSearch

https://resource.flomoapp.com/flomo-web/js/7914.462f63bb.js

js flomoapp.com collected 2026-10-01 13:55:08 UTC 44,368 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8c26bdb6-0743-49be-a2f0-0d705fe2535c",e._sentryDebugIdIdentifier="sentry-dbid-8c26bdb6-0743-49be-a2f0-0d705fe2535c")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"20260930061839"},(self.webpackChunkflomo=self.webpackChunkflomo||[]).push([[7914],{47914:function(e,t,o){o.r(t),o.d(t,{default:function(){return B}});var n=o(28748),r=o(30112),s=o(6838),a=o.n(s),i=(o(92458),o(54820),o(92529),o(71178),o(82767),o(17835),o(6203),o(7847)),l=o(4972),c=o(69001),d=o.n(c),h=o(45916),p=o(67631);async function m(){await n.Ay.deleteZipCache(),localStorage.removeItem("exportProgress"),localStorage.removeItem("exportTotal"),localStorage.removeItem("exportCacheSlug"),localStorage.removeItem("advancedSearchQuery"),h.A.commit("setExportProgress",0)}function u(e){return new Promise(t=>{setTimeout(t,e)})}function g(e){const{content:t}=e;return`${function(e){let t="";return t=function e(t){var o;if(t.nodeType===Node.TEXT_NODE)return t.textContent;const n=null===(o=t.tagName)||void 0===o?void 0:o.toLowerCase();if(!n)return"";let r=Array.from(t.childNodes).map(e).join("");switch(n){case"ol":return function(e){return Array.from(e.children).map((e,t)=>`${t+1}. ${e.textContent}`).join("\n")}(t);case"ul":return function(e){return Array.from(e.children).map(e=>`- ${e.textContent}`).join("\n")}(t);case"li":return r;case"p":return`${r}\n`;case"strong":return`**${r}**`;case"em":return`*${r}*`;case"u":return`<u>${r}</u>`;case"mark":return`==${r}==`}return r}((new DOMParser).parseFromString(e,"text/html").body).trim(),t}(`<div>${t}</div>`)}`}var f=(e,t,o,r,s,a,i,c,f,x,y,w,E,v)=>(console.log("开始导出 Markdown 文件 ===>>>"),new Promise(async(S,A)=>{try{const{memosGroupByMonth:A,total:T}=await n.Ay.getMemosByMonth(e,t,o,r,s,a,i,c,f,x,y,w);h.A.commit("setExportTotal",T),localStorage.setItem("exportTotal",T);let _=1;localStorage.setItem("exportProgress",_),h.A.commit("setExportProgress",_);const b=new(d());if(A&&Object.keys(A).length){const e={};for(let t in A){const o=t.replace("-","");let n=A[t],r="";if(console.log(`正在处理 ${t} 的数据...`),n&&n.length){for(let e=0;e<n.length;e++){r+=g(n[e])+"\n\n",_++,h.A.commit("setExportProgress",_),localStorage.setItem("exportProgress",_),e%10==0&&await u(10)}e[o]=r}}for(const[t,o]of Object.entries(e)){const e=`${t}.md`;b.file(e,o)}b.generateAsync({type:"blob"}).then(async e=>{h.A.commit("setExportProgress",T),localStorage.setItem("exportProgress",T),(0,l.saveAs)(e,`${v}-md.zip`),console.log("导出完成!文件已保存"),E.$message({message:"导出完成!文件已保存",type:"success",duration:3e3}),(0,p.A)("数据导出","纯文本-按月分组"),await m(),S()})}else{const e=new Blob(["暂无数据"],{type:"text/plain"});(0,l.saveAs)(e,`${v}.md`),E.$message({message:"导出完成,没有找到符合条件的数据",type:"info",duration:3e3}),(0,p.A)("数据导出","Markdown-空数据"),await m(),S()}}catch(e){console.error("导出Markdown错误:",e),E.$message.error("导出过程中发生错误,请重试"),await m(),A(e)}})),x=o(39014);async function y(){await n.Ay.deleteZipCache(),localStorage.removeItem("exportProgress"),localStorage.removeItem("exportTotal"),localStorage.removeItem("exportCacheSlug"),localStorage.removeItem("advancedSearchQuery"),h.A.commit("setExportProgress",0)}function w(e){return new Promise(t=>{setTimeout(t,e)})}function E(e){let t="";return t=function e(t){var o;if(t.nodeType===Node.TEXT_NODE)return t.textContent;const n=null===(o=t.tagName)||void 0===o?void 0:o.toLowerCase();if(!n)return"";let r=Array.from(t.childNodes).map(e).join("");switch(n){case"ol":let e=1;r=Array.from(t.children).map(t=>`${e++}. ${t.textContent}`).join("\n");break;case"ul":r=Array.from(t.children).map(e=>`- ${e.textContent}`).join("\n");break;case"li":return r;case"p":return`${r}\n`}return r}((new DOMParser).parseFromString(e,"text/html").body).trim(),t}o(71414);var v=(e,t,o,r,s,a,i,c,m,u,g,f,v,S)=>(console.log("开始导出 PDF 文件 ===>>>"),new Promise(async(A,T)=>{try{const{memosGroupByMonth:T,total:_}=await n.Ay.getMemosByMonth(e,t,o,r,s,a,i,c,m,u,g,f);h.A.commit("setExportTotal",_),localStorage.setItem("exportTotal",_);let b=1;localStorage.setItem("exportProgress",b),h.A.commit("setExportProgress",b);const M=new(d());if(T&&Object.keys(T).length){const e=Object.keys(T);for(let t=0;t<e.length;t++){const o=e[t],n=o.replace("-","");let r=T[o];if(console.log(`正在处理 ${o} 的数据...`),r&&r.length){const e=new x.uE({orientation:"portrait",unit:"mm",format:"a4"});e.addFont("LXGWWenKai-Light.ttf","LXGWWenKai-Light","normal");let t=25;const o=e.internal.pageSize.height;for(let n=0;n<r.length;n++){const s=r[n],{content:a,created_at:i}=s,l=E(a);i&&(new Date(i).toISOString().split("T")[0],new Date(i).toTimeStr
1ing().split(" ")[0]),t>o-30&&(e.addPage(),t=15),e.setFont("LXGWWenKai-Light","normal");const c=180,d=e.splitTextToSize(l,c);t+5*d.length>o-10&&(e.addPage(),t=15),e.text(d,15,t),t+=7*d.length+10,b++,h.A.commit("setExportProgress",b),localStorage.setItem("exportProgress",b),n%5==0&&0!==n&&await w(5)}const s=e.output("blob");M.file(`${n}.pdf`,s)}}M.generateAsync({type:"blob"}).then(async e=>{(0,l.saveAs)(e,`${S}-pdf.zip`),h.A.commit("setExportProgress",_),localStorage.setItem("exportProgress",_),console.log("PDF导出完成!文件已保存"),v.$message({message:"PDF导出完成!文件已保存",type:"success",duration:3e3}),(0,p.A)("数据导出","PDF-按月分组"),await y(),A()})}else{const e=new x.uE;e.text("暂无数据",10,10),e.save(`${S}.pdf`),v.$message({message:"导出完成,没有找到符合条件的数据",type:"info",duration:3e3}),(0,p.A)("数据导出","PDF-空数据"),await y(),A()}}catch(e){console.error("导出PDF错误:",e),v.$message.error("导出过程中发生错误,请重试"),await y(),T(e)}}));async function S(){await n.Ay.deleteZipCache(),localStorage.removeItem("exportProgress"),localStorage.removeItem("exportTotal"),localStorage.removeItem("exportCacheSlug"),localStorage.removeItem("advancedSearchQuery"),h.A.commit("setExportProgress",0)}function A(e){return new Promise(t=>{setTimeout(t,e)})}function T(e){const{content:t}=e,o=function(e){let t="";return t=function e(t){var o;if(t.nodeType===Node.TEXT_NODE)return t.textContent;const n=null===(o=t.tagName)||void 0===o?void 0:o.toLowerCase();if(!n)return"";let r=Array.from(t.childNodes).map(e).join("");switch(n){case"ol":let e=1;r=Array.from(t.children).map(t=>`${e++}. ${t.textContent}`).join("\n");break;case"ul":r=Array.from(t.children).map(e=>`- ${e.textContent}`).join("\n");break;case"li":return r;case"p":return`${r}\n`}return r}((new DOMParser).parseFromString(e,"text/html").body).trim(),t}(`<div>${t}</div>`);return`${o}`}var _=(e,t,o,r,s,a,i,c,m,u,g,f,x,y)=>(console.log("开始导出 TXT 文件 ===>>>"),new Promise(async(w,E)=>{try{const{memosGroupByMonth:E,total:v}=await n.Ay.getMemosByMonth(e,t,o,r,s,a,i,c,m,u,g,f);h.A.commit("setExportTotal",v),localStorage.setItem("exportTotal",v);let _=1;localStorage.setItem("exportProgress",_),h.A.commit("setExportProgress",_);const b=new(d());if(E&&Object.keys(E).length){const e={};for(let t in E){const o=t.replace("-","");let n=E[t],r="";if(console.log(`正在处理 ${t} 的数据...`),n&&n.length){for(let e=0;e<n.length;e++){r+=T(n[e])+"\n\n",_++,h.A.commit("setExportProgress",_),localStorage.setItem("exportProgress",_),e%10==0&&await A(10)}e[o]=r}}for(const[t,o]of Object.entries(e)){const e=`${t}.txt`;b.file(e,o)}b.generateAsync({type:"blob"}).then(async e=>{h.A.commit("setExportProgress",v),localStorage.setItem("exportProgress",v),(0,l.saveAs)(e,`${y}-txt.zip`),console.log("导出完成!文件已保存"),x.$message({message:"导出完成!文件已保存",type:"success",duration:3e3}),(0,p.A)("数据导出","纯文本-按月分组"),await S(),w()})}else{const e=new Blob(["暂无数据"],{type:"text/plain"});(0,l.saveAs)(e,`${y}.txt`),x.$message({message:"导出完成,没有找到符合条件的数据",type:"info",duration:3e3}),(0,p.A)("数据导出","纯文本-空数据"),await S(),w()}}catch(e){console.error("导出TXT错误:",e),x.$message.error("导出过程中发生错误,请重试"),await S(),E(e)}}));const b=o(40232),M=()=>!(!window.require||!window.require("electron")),C={LIMITS:{MAX_EXPORT_SIZE:{ELECTRON:10737418240,WEB:2147483648},MAX_CONCURRENT_DOWNLOADS:3,CHUNK_SIZE:100,MAX_FINAL_SIZE_MB:{ELECTRON:10240,WEB:2048},STREAMING_EXPORT_SIZE_THRESHOLD_MB:500,get STREAMING_EXPORT_SIZE_THRESHOLD(){return 1024*this.STREAMING_EXPORT_SIZE_THRESHOLD_MB*1024}},TIMEOUTS:{DOWNLOAD:3e4,RETRY_DELAY:1e3},IMAGE_DOMAIN_MAPPING:{"flomo.oss-cn-shanghai.aliyuncs.com":"static.flomoapp.com"},VALID_FORMATS:["txt","md","pdf","html"]};class $ extends Error{constructor(e,t,o={}){super(e),this.name="ExportError",this.code=t,this.details=o}}class I{constructor(e){this.maxConcurrency=e,this.currentConcurrency=0,this.queue=[]}async acquire(){return new Promise(e=>{this.currentConcurrency<this.maxConcurrency?(this.currentConcurrency++,e()):this.queue.push(e)})}release(){if(this.currentConcurrency--,this.queue.length>0){const e=this.queue.shift();this.currentConcurrency++,e()}}}class P{static validateExportParams(e){const{format:t}=e;if(t&&!C.VALID_FORMATS.includes(t))throw new $(`Invalid format: ${t}. Valid formats: ${C.VALID_FORMATS.join(", ")}`,"INVALID_FORMAT")}static validateStoreState(){var e;if(null===h.A||void 0===h.A||null===(e=h.A.state)||void 0===e||null===(e=e.me)||void 0===e||!e.name)throw new $("Store or user info not available","INVALID_STORE_STATE")}static validateMemosData(e,t){return 0!==e||(console.log("No memos foun
1d for export"),a().warning(t.$t("export.no_memos")),!1)}}class k{static replaceImageDomain(e){let t=e;for(const[e,o]of Object.entries(C.IMAGE_DOMAIN_MAPPING))t=t.replace(e,o);return t}static async fetchWithTimeout(e,t=C.TIMEOUTS.DOWNLOAD){const o=new AbortController,n=setTimeout(()=>o.abort(),t);try{const t=await fetch(e,{signal:o.signal,mode:"cors"});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return await t.blob()}finally{clearTimeout(n)}}static calculateTotalSize(e){return e.reduce((e,t)=>{var o;return null!==(o=t.files)&&void 0!==o&&o.length?e+t.files.reduce((e,t)=>e+(t.size||0),0):e},0)}}class L{static async restoreCache(e,t){const{zipCache:o}=await n.Ay.getZipCache();console.log(null!=o&&o.length?`Restoring ${o.length} cached items`:"No cache to restore");let r="";return null!=o&&o.length&&o.forEach(o=>{o.path.includes(".txt")&&(o.path.startsWith(".txt")&&e.folder(t).file(o.path,o.file),r+=o.file)}),r}static isFileProcessed(e,t,o){const{zipCache:r}=n.Ay.getZipCache()||{};return e.file(`${o}/${t}`)||(null==r?void 0:r.find(e=>e.path.includes(t)))}static async restoreCacheForStreaming(e){const{zipCache:t}=await n.Ay.getZipCache();console.log(null!=t&&t.length?`Restoring ${t.length} cached items for streaming`:"No cache to restore");let o="";return null!=t&&t.length&&t.forEach(e=>{e.path.includes(".txt")&&(o+=e.file)}),o}static async cleanup(){try{await n.Ay.deleteZipCache(),["exportProgress","exportTotal","exportCacheSlug","advancedSearchQuery"].forEach(e=>localStorage.removeItem(e)),h.A.commit("setExportProgress",0),h.A.commit("setExportTotal",0),h.A.commit("setExportTime",0),h.A.commit("setCancelExport",!1)}catch(e){console.error("Cleanup error:",e)}}}class F{static updateProgress(e,t,o){t.push(o);const n=e+1;return localStorage.setItem("exportCacheSlug",JSON.stringify(t)),h.A.commit("setExportProgress",n),localStorage.setItem("exportProgress",n),n}static initializeProgress(e){return h.A.commit("setExportTotal",e),localStorage.setItem("exportTotal",e),parseInt(localStorage.getItem("exportProgress")||"1")}}class N{constructor(){this.zip=null,this.downloadSemaphore=new I(C.LIMITS.MAX_CONCURRENT_DOWNLOADS),this.cancelled=!1}async export(e){try{P.validateExportParams(e),P.validateStoreState();const{start_date:t,format:o}=e,{name:n}=h.A.state.me,r=(new Date).getTime(),s=`flomo@${n}-${b(t||new Date).format("YYYYMMDD")}`;return o&&"html"!==o?await this.exportSpecificFormat(e,s):await this.exportToHTML(e,s,r)}catch(e){throw console.error("Export failed:",e),await this.handleExportError(e),e}}async exportSpecificFormat(e,t){const{tag:o,search:n,start_date:r,end_date:s,source:a,with_image:i,with_tag:l,with_link:c,contain_tag:d,last_year_today:h,deny_tag:p,with_record:m,app:u,format:g}=e,x={txt:_,md:f,pdf:v}[g];if(!x)throw new $(`Unsupported export format: ${g}`,"UNSUPPORTED_FORMAT");return x(o,n,r,s,a,i,l,c,d,h,p,m,u,t)}async exportToHTML(e,t,o){try{const{memosGroupByMonth:n,total:s}=await this.fetchMemos(e);if(!P.validateMemosData(s,e.app))return;const i=this.estimateTotalFileSize(n),l=C.LIMITS.MAX_EXPORT_SIZE.WEB,c=(()=>{if("undefined"==typeof window||!window.navigator)return!1;const e=window.navigator.userAgent;return/Chrome\//.test(e)&&!/Edg\//.test(e)&&!/OPR\//.test(e)})(),d=M(),p=h.A.getters["app/exportHtmlMode"]||"auto",m=c||d;if(!m&&i>=l)return a().error("暂不支持 Safari 浏览器,请使用 Chrome 或桌面客户端"),await L.cleanup(),void r.default.emit("export-error");let u=!1;return u="streaming"===p?m:"traditional"!==p&&m&&i>=C.LIMITS.STREAMING_EXPORT_SIZE_THRESHOLD,console.log(`Total export size: ${(i/1024/1024).toFixed(2)}MB, mode: ${p}, using ${u?"streaming":"traditional"} export`),u?await this.exportToHTMLStreaming(e,t,o,n,s):await this.exportToHTMLTraditional(e,t,o,n,s)}catch(e){throw console.error("Export HTML failed:",e),e}}async exportToHTMLTraditional(e,t,o,r,s){console.log("[exportMemo] use TRADITIONAL HTML export (< threshold)"),this.zip=new(d());const a=await L.restoreCache(this.zip,t);this.memoHtml=a;const i=F.initializeProgress(s),l=JSON.parse(localStorage.getItem("exportCacheSlug")||"[]"),c=this.collectPendingMemos(r,l);await n.Ay.refreshExpiredFiles(c,{batchSize:200});const{dateOptions:h,tagOptions:p,processedHtml:m}=await this.processMonthlyMemos(r,t,i);this.cancelled||await this.generateFinalFiles(t,h,p,this.memoHtml+m,s,o)}async exportToHTMLStreaming(e,t,o,n,s){if(console.log("[exportMemo] use STREAMING HTML export (>= threshold)"),"undefined"==typeof window||!window.showSaveFilePicker)throw new $("Streaming export requires showSaveFilePicker API (Chrome 86+)","API_NOT_SUPPORTED");const i=await L.restoreCacheForStreaming(t);let l;this.memoHtml=i;try{l=await window.showSaveFilePicker({suggestedName:`${t}.zip`,types:[{description:"ZIP Files",accept:{"application/zip":[".zip"]}}]})}catch(e){if("AbortError"===e.name)return void console.log("User cancelled file save");throw e}const c=await l.createWritable();try{await this.generateStreamingZip(c,n,t,s,o,e),await c.close();const i=((new Date).getTime()-o)/1e3;h.A.commit("setExportTime",i),console.log("Streaming export completed in",i,"seconds");const l=localStorage.getItem("advancedSearchQuery")?"条件-下载":"全量-下载";(0,p.A)("数据导出",l),r.default.emit("export-complete"),a().success("导出成功"),await L.cleanup()}catch(e){try{await c.abort()}catch(e){console.warn("Failed to cleanup writable stream after streaming export error:",e)}throw e}}estimateTotalFileSize(e){let t=0;for(const o in e){const n=e[o];t+=k.calculateTotalSize(n)}return t}async fetchMemos(e){if(e.slugs&&e.slugs.length){const t=await n.Ay.getSlugList(e.slugs),o=t.reduce((e,t)=>
1{const o=b(t.created_at).format("YYYY-MM-DD HH:mm:ss").slice(0,7);return e[o]||(e[o]=[]),e[o].push(t),e},{});return console.log("Memos retrieved by slugs, total:",t.length),{memosGroupByMonth:o,total:t.length}}const{tag:t,search:o,start_date:r,end_date:s,source:a,with_image:i,with_tag:l,with_link:c,contain_tag:d,last_year_today:h,deny_tag:p,with_record:m}=e,u=await n.Ay.getMemosByMonth(t,o,r,s,a,i,l,c,d,h,p,m);return console.log("Memos retrieved, total:",u.total),u}async processMonthlyMemos(e,t,o){const r=[],s=[];let a="",i=o;const l=JSON.parse(localStorage.getItem("exportCacheSlug")||"[]");for(const o in e){if(this.cancelled)break;r.push(o);const c=o.replace("-",""),d=`${c}.html`;if(L.isFileProcessed(this.zip,d,t)){console.log("Skipping processed file:",d);continue}const h=e[o].filter(e=>(this.extractTags(e,s),!l.includes(e.slug)));if(!h||0===h.length){console.log(`${o} has no data`);continue}await this.validateExportSize(h);const p=await this.processMemosBatch(h,t,i,l);a+=p.html,i=p.progress,await n.Ay.saveZipCache(c,p.html,`${c}.txt`)}return{dateOptions:r,tagOptions:s,processedHtml:a}}async processMemosBatch(e,t,o,n){let r=o;const s=e.map(e=>O(e)).join(""),a=this.chunkArray(e,C.LIMITS.CHUNK_SIZE);for(const e of a){if(this.cancelled)break;const o=await Promise.allSettled(e.map(e=>this.processSingleMemo(e,t,n))),s=o.filter(e=>"rejected"===e.status);s.length>0&&console.warn(`${s.length} memos failed to process in chunk:`,s),o.forEach((t,o)=>{"fulfilled"!==t.status||this.cancelled||(r=F.updateProgress(r,n,e[o].slug))})}return{html:s,progress:r}}async processSingleMemo(e,t,o){if(!this.cancelled)try{await this.zipFiles(e.files,t)}catch(t){throw console.error("Error processing memo:",e.slug,t),t}}async zipFiles(e,t){if(null==e||!e.length)return;const o=e.map(e=>this.downloadFile(e,t));await Promise.allSettled(o)}async downloadFile(e,t){await this.downloadSemaphore.acquire();try{let{url:o,path:r,id:s}=e;if(r.includes(".")||(r=`${r}.jpg`),this.zip.file(`${t}/${r}`))return void console.log("File already exists, skipping:",r);const a=k.replaceImageDomain(o),i=await k.fetchWithTimeout(a);(null==i?void 0:i.size)>0?(await n.Ay.saveZipCache(s,i,r),this.zip.folder(t).file(r,i)):console.warn("Download failed - empty blob:",a)}catch(e){console.error("Download error:",e)}finally{this.downloadSemaphore.release()}}async generateFinalFiles(e,t,o,n,r,s){const{name:a}=h.A.state.me;o.sort((e,t)=>e.localeCompare(t,"zh"));const i=((new Date).getTime()-s)/1e3;h.A.commit("setExportTime",i);const l=this.formatDate(new Date),c=this.renderSelectOptions(t),d=this.renderSelectOptions(o),p=D(a,l,r,c,d,n);this.zip.folder(e).file(`${a}的笔记.html`,p);const m=await this.zip.generateAsync({type:"blob"});await this.handleFinalBlob(m,e,i)}async handleFinalBlob(e,t,o){const n=e.size/1024/1024,s=C.LIMITS.MAX_FINAL_SIZE_MB[M()?"ELECTRON":"WEB"];if(n>s)throw(0,p.A)("数据导出","导出_失败","final_size_exceeded"),await L.cleanup(),a().error("导出文件过大,请缩小导出范围"),r.default.emit("export-error"),new $("Export file too large","FILE_SIZE_EXCEEDED",{size:n,maxSizeMB:s});console.log("Export completed in",o,"seconds"),(0,l.saveAs)(e,`${t}.zip`);const i=localStorage.getItem("advancedSearchQuery")?"条件-下载":"全量-下载";(0,p.A)("数据导出",i),r.default.emit("export-complete"),await L.cleanup()}extractTags(e,t){var o;null!==(o=e.tags)&&void 0!==o&&o.length&&e.tags.forEach(e=>{t.includes(e)||t.push(e)})}async validateExportSize(e){const t=k.calculateTotalSize(e),o=C.LIMITS.MAX_EXPORT_SIZE[M()?"ELECTRON":"WEB"];if(t>o)throw(0,p.A)("数据导出","导出_失败","size_exceeded"),await L.cleanup(),new $("Export size exceeds limit","SIZE_EXCEEDED",{totalSize:t,maxSize:o})}chunkArray(e,t){const o=[];for(let n=0;n<e.length;n+=t)o.push(e.slice(n,n+t));return o}collectPendingMemos(e,t){const o=[];for(const n in e){const r=e[n];for(let e=0;e<r.length;e++){const n=r[e];t.includes(n.slug)||o.push(n)}}return o}renderSelectOptions(e){return e.map(e=>`<option value="${e}">${e}</option>`).join("")}formatDate(e){return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`}async generateSelectJsFile(e){const t=new Blob(['\n      var x, i, j, l, ll, selElmnt, a, b, c;\n      x = document.getElementsByClassName("custom-select");\n      l = x.length;\n      for (i = 0; i < l;
1 i++) {\n        selElmnt = x[i].getElementsByTagName("select")[0];\n        ll = selElmnt.length;\n        a = document.createElement("DIV");\n        a.setAttribute("class", "select-selected");\n        a.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML;\n        x[i].appendChild(a);\n        b = document.createElement("DIV");\n        b.setAttribute("class", "select-items select-hide");\n        for (j = 0; j < ll; j++) {\n          c = document.createElement("DIV");\n          c.innerHTML = selElmnt.options[j].innerHTML;\n          c.addEventListener("click", function (e) {\n            var y, i, k, s, h, sl, yl;\n            s = this.parentNode.parentNode.getElementsByTagName("select")[0];\n            sl = s.length;\n            h = this.parentNode.previousSibling;\n            for (i = 0; i < sl; i++) {\n              if (s.options[i].innerHTML == this.innerHTML) {\n                s.selectedIndex = i;\n                h.innerHTML = this.innerHTML;\n                y = this.parentNode.getElementsByClassName("same-as-selected");\n                yl = y.length;\n                for (k = 0; k < yl; k++) {\n                  y[k].removeAttribute("class");\n                }\n                this.setAttribute("class", "same-as-selected");\n                break;\n              }\n            }\n            h.click();\n          });\n          b.appendChild(c);\n        }\n        x[i].appendChild(b);\n        a.addEventListener("click", function (e) {\n          e.stopPropagation();\n          closeAllSelect(this);\n          this.nextSibling.classList.toggle("select-hide");\n          this.classList.toggle("select-arrow-active");\n        });\n      }\n      \n      function closeAllSelect(elmnt) {\n        var x, y, i, xl, yl, arrNo = [];\n        x = document.getElementsByClassName("select-items");\n        y = document.getElementsByClassName("select-selected");\n        xl = x.length;\n        yl = y.length;\n        for (i = 0; i < yl; i++) {\n          if (elmnt == y[i]) {\n            arrNo.push(i);\n          } else {\n            y[i].classList.remove("select-arrow-active");\n          }\n        }\n        for (i = 0; i < xl;
1 i++) {\n          if (arrNo.indexOf(i)) {\n            x[i].classList.add("select-hide");\n          }\n        }\n      }\n\n      document.addEventListener("click", closeAllSelect);\n    '],{type:"text/javascript"});this.zip.file(`${e}/file/js/select.js`,t)}async handleExportError(e){await L.cleanup(),e instanceof $?(0,p.A)("数据导出","导出_失败",e.code):(0,p.A)("数据导出","导出_失败","unknown_error"),r.default.emit("export-error")}cancel(){this.cancelled=!0}async generateStreamingZip(e,t,o,n,r,s){return new Promise((a,l)=>{let c=Promise.resolve(),d=!1;const h=new i.qQ((t,o,n)=>{if(t)return d=!0,void l(t);o&&(c=c.then(()=>d?Promise.reject(new Error("ZIP generation cancelled")):e.write(o)).catch(e=>{d=!0,l(e)})),n&&c.then(()=>{d||a()}).catch(l)});this.processStreamingZipFiles(h,e,t,o,n,r,s).then(()=>{d||h.end()}).catch(e=>{d=!0,h.terminate(),l(e)})})}async processStreamingZipFiles(e,t,o,r,s,a,l){const c=[],d=[];let p="",m=F.initializeProgress(s);const u=JSON.parse(localStorage.getItem("exportCacheSlug")||"[]"),g=this.collectPendingMemos(o,u);await n.Ay.refreshExpiredFiles(g,{batchSize:200});for(const t in o){if(this.cancelled)break;c.push(t),t.replace("-","");const n=o[t].filter(e=>(this.extractTags(e,d),!u.includes(e.slug)));if(!n||0===n.length){console.log(`${t} has no data`);continue}await this.validateExportSize(n),p+=n.map(e=>O(e)).join("");const s=this.chunkArray(n,C.LIMITS.CHUNK_SIZE);for(const t of s){if(this.cancelled)break;(await Promise.allSettled(t.map(t=>this.processSingleMemoForStreaming(t,e,r,u)))).forEach((e,o)=>{"fulfilled"!==e.status||this.cancelled||(m=F.updateProgress(m,u,t[o].slug))})}}if(this.cancelled)return;const{name:f}=h.A.state.me;d.sort((e,t)=>e.localeCompare(t,"zh"));const x=this.formatDate(new Date),y=this.renderSelectOptions(c),w=this.renderSelectOptions(d),E=D(f,x,s,y,w,(this.memoHtml||"")+p),v=new Blob([E],{type:"text/html;charset=utf-8"}),S=await v.arrayBuffer(),A=new i.uZ(`${r}/${f}的笔记.html`);e.add(A),A.push(new Uint8Array(S),!0)}async processSingleMemoForStreaming(e,t,o,n){if(!this.cancelled)try{var r;null!==(r=e.files)&&void 0!==r&&r.length&&await this.downloadFilesForStreaming(e.files,t,o)}catch(t){throw console.error("Error processing memo:",e.slug,t),t}}async downloadFilesForStreaming(e,t,o){if(null==e||!e.length)return;const n=e.map(e=>this.downloadFileForStreaming(e,t,o));await Promise.allSettled(n)}async downloadFileForStreaming(e,t,o){await this.downloadSemaphore.acquire();try{if(!t)return void console.warn("Zip object is undefined");if("function"!=typeof t.add)return void console.warn("Zip.add is not a function",t);if(!o)return void console.warn("FolderName is undefined");let{url:r,path:s,id:a}=e;if(!r||!a)return void console.warn("File missing required fields:",{url:r,id:a,path:s});s||(s=a),s.includes(".")||(s=`${s}.jpg`);const l=k.replaceImageDomain(r),c=await k.fetchWithTimeout(l);if((null==c?void 0:c.size)>0){const e=await c.arrayBuffer();if(!e||0===e.byteLength)return void console.warn("Failed to get valid arrayBuffer from blob:",l);const r=new Uint8Array(e);if(!r||0===r.length)return void console.warn("Failed to create valid Uint8Array from arrayBuffer:",l);const d=`${o}/${s}`;if(!d||"string"!=typeof d)return void console.warn("Invalid zip path:",{folderName:o,path:s,zipPath:d});try{if(!(r instanceof Uint8Array))return void console.warn("uint8Array is not a Uint8Array instance:",typeof r,r);const e=new i.uZ(d);t.add(e),e.push(r,!0)}catch(e){throw console.error("Error calling zip.add:",{error:e,zipPath:d,uint8ArrayLength:null==r?void 0:r.length,uint8ArrayType:typeof r,uint8ArrayInstance:r instanceof Uint8Array,zipType:typeof t,zipAddType:typeof t.add}),e}await n.Ay.saveZipCache(a,c,s)}else console.warn("Download failed - empty blob:",l)}catch(e){console.error("Download error:",e)}finally{this.downloadSemaphore.release()}}}const D=(e,t,o,n,r,s)=>`\n    <html>\n      <head>\n        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\n        <title>flomo · 浮墨笔记</title>\n        <style type="text/css">\n          * { margin: 0; padding: 0; }\n          body { background: #fafafa; }\n          header .logo { text-align: center; border-bottom: 1px solid #efefef; }\n          header .top { display: flex; justify-content: space-between; align-items: center; }\n          header .logo, header .top .user { padding: 40px 0; }\n          header .top .user .name { color: #454545; font-size: 16px; }\n          header .top .user .date { font-size: 12px; color: #9d9d9d; }\n          header .top .filter { display: none; justify-content: space-between; align-items: center; }\n          header .top .filter button { padding: 9px 10px; background: #30cf79; border-radius: 3px; color: #fff; font-size: 14px; border: none; cursor: pointer; }\n          header, .memos { width: 600px; margin: 0 auto; }\n          .memos h1 { margin-top: 30px; }\n          .memo { margin: 20px 0; background: #fff; padding: 20px; border-radius: 6px; word-wrap: break-word; }\n          .memo:hover { box-shadow: 0px 2px 10px #dddddd; }\n          .memo .time { color: #8d8d8d; font-size: 12px; }\n          .memo .content { color: #323232; font-size: 14px; }\n          .memo .content p { line-height: 1.8; min-height: 20px; margin: 0; }\n          .memo .content ul, .memo .content ol { padding-inline-start: 22px; margin: 0; }\n          .memo .content li { line-height: 1.8; }\n          .memo .files img { max-width: 100%; border: 1px solid #e6e6e6; border-radius: 4px; margin: 6px 0; }\n          .custom-select { position: relative; font-size: 14px; color: #9d9d9d; background: #efefef; border-radius: 3px; border: none; margin-right: 10px; }\n          .custom-select select { display: none; }\n          .select-selected { background: #efefef; color: #9d9d9d; }\n          .select-selected:after { position: absolute; content: ""; top: 14px; right: 10px; width: 0; height: 0; border: 6px solid transparent; border-color: #7d7d7d transparent transparent transparent; }\n          .select-selected.select-arrow-active:after { border-color: transparent transparent #7d7d7d transparent; top: 7px; }\n          .select-items div, .select-selected { color: rgba(157, 157, 157, 1
1); padding: 9px 12px; font-size: 14px; color: #9d9d9d; border: none; cursor: pointer; border-radius: 3px; border: none; width: 120px; user-select: none; }\n          .select-items { position: absolute; background-color: white; top: 100%; left: 0; right: 0; z-index: 99; max-height: 200px; overflow-y: auto; overflow-x: hidden; box-shadow: 0px 4px 2px #dddddd; }\n          .select-items::-webkit-scrollbar { width: 5px; }\n          .select-items::-webkit-scrollbar-track { background: #f1f1f1; }\n          .select-items::-webkit-scrollbar-thumb { background: #888; }\n          .select-hide { display: none; }\n          .select-items div:hover, .same-as-selected { background-color: rgba(0, 0, 0, 0.1); }\n            /* --- Audio Player Styles --- */\n          .audio-player {\n            width: 100%;\n            background: #f7f7f7; /* 替换 var(--commentItemBg) 为一个具体的颜色值 */\n            border-radius: 6px;\n            margin-top: 10px;\n            padding: 10px;\n            box-sizing: border-box;\n          }\n\n          .audio-player audio {\n            /* 设置宽度确保它充满容器 */\n            width: 100%;\n          }\n\n          /* 音频转录内容的样式 */\n          .audio-player__content {\n            padding-top: 10px;\n            margin-top: 10px;\n            border-top: 1px solid #eeeeee; /* 添加一个分割线,使其更清晰 */\n            font-size: 14px;\n            color: #555555; /* 替换 #9d9d9d 为一个更清晰的颜色 */\n            line-height: 1.8;\n            white-space: pre-wrap; /* 保留换行和空格 */\n            word-wrap: break-word; /* 确保长文本能正常换行 */\n          } \n          </style>\n      </head>\n      <body>\n        <header>\n          <div class="logo">\n            <svg width="96" height="31" viewBox="0 0 96 31" fill="none" xmlns="http://www.w3.org/2000/svg">\n              <path fill-rule="evenodd" clip-rule="evenodd" d="M4.87056 9.11086C4.87056 6.25522 5.89594 4.89539 7.81854 4.89539H12.5609V0H7.81854C2.69163 0 0 3.39957 0 9.11086V10.8786V14.9581V30.3242H4.87056V15.3661H12.5609V10.8786H4.87056V9.11086ZM79.5937 27.8765C81.3881 29.7803 83.6952 30.7321 86.3868 30.7321C89.0785 30.7321 91.2574 29.7803 93.18 27.8765C95.1026 25.9727 95.9998 23.525 95.9998 20.5334C95.9998 17.5418 94.9744 15.0941 93.18 13.1903C91.2574 11.2866 89.0785 10.3347 86.3868 10.3347C83.6952 10.3347 81.5163 11.2866 79.5937 13.1903C77.6711 15.0941 76.7739 17.5418 76.7739 20.5334C76.7739 23.525 77.7993 25.9727 79.5937 27.8765ZM81.6444 20.5334C81.6444 17.5418 83.6952 15.502 86.3868 15.502C89.0785 15.502 91.2574 17.5418 91.1292 20.5334C91.1292 23.661 89.0785 25.7008 86.3868 25.7008C83.6952 25.7008 81.6444 23.661 81.6444 20.5334ZM32.8147 30.7321C30.1231 30.7321 27.816 29.7802 26.0215 27.8765C24.2271 25.9727 23.2017 23.661 23.2017 20.6694C23.2017 17.6777 24.0989 15.23 26.0215 13.3263C27.9441 11.4225 30.1231 10.4706 32.8147 10.4706C35.5063 10.4706 37.6853 11.4225 39.6079 13.3263C41.5305 15.23 42.4277 17.6777 42.4277 20.6694C42.4277 23.661 41.5305 26.1087 39.6079 28.0124C37.6853 29.9162 35.5063 30.7321 32.8147 30.7321ZM32.8147 15.502C30.1231 15.502 28.0723 17.5418 28.0723 20.5334C28.0723 23.661 30.1231 25.7007 32.8147 25.7007C35.5063 25.7007 37.5571 23.661 37.5571 20.5334C37.5571 17.5418 35.5063 15.502 32.8147 15.502ZM62.0358 19.9894V30.4601H57.2934V19.7175C57.2934 17.1338 55.8835 15.502 53.9609 15.502C51.7819 15.502 50.1157 16.8618 50.1157 19.9894V30.4601H45.3733V10.8786H50.1157V13.7342C51.0129 11.5585 53.32 10.4706 55.3708 10.4706C58.3187 10.6066 60.2413 11.8305 61.2667 14.1422C62.5484 11.6945 64.471 10.4706 67.0345 10.4706C71.5205 10.4706 74.084 13.5982 74.084 19.3095V30.4601H69.3416V19.8535C69.3416 17.1338 67.9317 15.502 65.8809 15.502C63.5738 15.502 62.0358 17.1338 62.0358 19.9894ZM15.6366 4.89539V0H20.379V30.4602H15.6366V7.2071V4.89539Z" fill="#202020"/>\n            </svg>\n          </div>\n          <div class="top">\n            <div class="user">\n              <div class="name">@${e}</div>\n              <div class="date">于 ${t} 导出 ${o} 条 MEMO</div>\n            </div>\n            <div class="filter">\n              <div class='custom-select'>\n                <select name="date" id="date">\n                  <option value="">选择年月</option>\n                  ${n}\n                </select>\n              </div>\n              <div class='custom-select'>\n                <select name="tag" id="tag">\n                  <option value="">选择标签</option>\n                  ${r}\n                </select>\n              </div>\n              <button>筛选</button>\n            </div>\n          </div>\n        </header>\n        <div class="memos">${s}</div>\n        <script>\n          // 检测 JS 是否可执行,如果可执行则显示 filter\n          (function() {\
1n            try {\n              const filterEl = document.querySelector(".filter");\n              if (filterEl) {\n                filterEl.style.display = "flex";\n              }\n            } catch (e) {\n              // JS 不可执行时保持隐藏状态\n            }\n          })();\n          \n          const memos = document.querySelectorAll(".memo");\n          const dateSelect = document.querySelector("#date");\n          const tagSelect = document.querySelector("#tag");\n          const filterBtn = document.querySelector("button");\n          filterBtn.addEventListener("click", () => {\n            const date = dateSelect.value;\n            const tag = tagSelect.value;\n            memos.forEach((memo) => {\n              const time = memo.querySelector(".time").innerText;\n              const content = memo.querySelector(".content").innerText;\n              const isDateMatch = !date || time.includes(date);\n              const isTagMatch = !tag || content.includes(tag);\n              memo.style.display = (isDateMatch && isTagMatch) ? "block" : "none";\n            });\n          });\n          \n          // 自定义选择框功能\n          var x, i, j, l, ll, selElmnt, a, b, c;\n          x = document.getElementsByClassName("custom-select");\n          l = x.length;\n          for (i = 0; i < l; i++) {\n            selElmnt = x[i].getElementsByTagName("select")[0];\n            ll = selElmnt.length;\n            a = document.createElement("DIV");\n            a.setAttribute("class", "select-selected");\n            a.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML;\n            x[i].appendChild(a);\n            b = document.createElement("DIV");\n            b.setAttribute("class", "select-items select-hide");\n            for (j = 0; j < ll; j++) {\n              c = document.createElement("DIV");\n              c.innerHTML = selElmnt.options[j].innerHTML;\n              c.addEventListener("click", function (e) {\n                var y, i, k, s, h, sl, yl;\n                s = this.parentNode.parentNode.getElementsByTagName("select")[0];\n                sl = s.length;\n                h = this.parentNode.previousSibling;\n                for (i = 0; i < sl; i++) {\n                  if (s.options[i].innerHTML == this.innerHTML) {\n                    s.selectedIndex = i;\n                    h.innerHTML = this.innerHTML;\n                    y = this.parentNode.getElementsByClassName("same-as-selected");\n                    yl = y.length;\n                    for (k = 0; k < yl; k++) {\n                      y[k].removeAttribute("class");\n                    }\n                    this.setAttribute("class", "same-as-selected");\n                    break;\n                  }\n                }\n                h.click();\n              });\n              b.appendChild(c);\n            }\n            x[i].appendChild(b);\n            a.addEventListener("click", function (e) {\n              e.stopPropagation();\n              closeAllSelect(this);\n              this.nextSibling.classList.toggle("select-hide");\n              this.classList.toggle("select-arrow-active");\n            });\n          }\n          \n          function closeAllSelect(elmnt) {\n            var x, y, i, xl, yl, arrNo = [];\n            x = document.getElementsByClassName("select-items");\n            y = document.getElementsByClassName("select-selected");\n            xl = x.length;\n            yl = y.length;\n            for (i = 0; i < yl; i++) {\n              if (elmnt == y[i]) {\n                arrNo.push(i);\n              } else {\n                y[i].classList.remove("select-arrow-active");\n              }\n            }\n            for (i = 0; i < xl;
1 i++) {\n              if (arrNo.indexOf(i)) {\n                x[i].classList.add("select-hide");\n              }\n            }\n          }\n\n          document.addEventListener("click", closeAllSelect);\n        <\/script>\n      </body>\n    </html>\n  `,O=e=>{const{created_at:t,content:o,files:n}=e;let r="",s="";if(null!=n&&n.length){const e=n.filter(e=>"recorded"!==e.type&&"audio"!==e.type),t=n.filter(e=>"recorded"===e.type||"audio"===e.type);e.length>0&&(r=e.map(e=>`<img src="${e.path.includes(".")?e.path:`${e.path}.jpg`}" alt="memo image" />`).join("")),t.length>0&&(s=t.map(e=>{const t=e.content?`<div class="audio-player__content">${e.content}</div>`:"";return`\n            <div class="audio-player">\n              <audio controls style="width: 100%;" src="${e.path}">\n                Your browser does not support the audio element.\n              </audio>\n              ${t}\n            </div>\n          `}).join(""))}return`\n    <div class="memo">\n      <div class="time">${t}</div>\n      <div class="content">${o}</div>\n      <div class="files">\n        ${r}\n        ${s}\n      </div>\n    </div>\n  `};var z=(e,t,o,n,r,s,a,i,l,c,d,p,m,u,g)=>{const f=new N,x=h.A.watch(e=>e.cancelExport,e=>{e&&f.cancel()});return f.export({tag:e,search:t,start_date:o,end_date:n,source:r,with_image:s,with_tag:a,with_link:i,contain_tag:l,last_year_today:c,deny_tag:d,with_record:p,app:m,format:u,slugs:g}).finally(()=>{x()})},H={name:"ExportTip",components:{Snackbar:o(91159).A},computed:{processedMemos(){return this.$store.state.exportProgress||0},exportTotal(){return this.$store.state.exportTotal||0},progress(){if(!this.processedMemos||!this.exportTotal)return 0;const e=this.processedMemos/this.exportTotal*100;return Math.min(e,100).toFixed(2)},cancelExport(){return this.$store.state.cancelExport},type(){return this.$store.state.type},advancedSearchQuery(){return this.$store.state.advancedSearchQuery},selectedTag(){return this.$store.state.selected_tag||this.$store.state.pinned_selected_tag},exportFormat(){return this.$route.query.format},exportFilters(){return{with_tag:this.with_tag,with_link:this.with_link,with_image:this.with_image,with_record:this.with_record,start_date:this.start_date,end_date:this.end_date,source:"export"===this.selected_source?null:this.selected_source,isLastYearToday:"that_year_today"===this.type?"last_year_today":void 0}}},data(){return{showContinueAction:!1,caches:[],query:"",with_tag:void 0,with_link:void 0,with_image:void 0,with_record:void 0,start_date:null,end_date:null,selected_source:"export"}},methods:{getActiveQuery(){return this.$route.query.query||this.$store.state.query},continueAction(){this.showContinueAction=!1,this.continueExport()},closeExportTip(){localStorage.removeItem("advancedSearchQuery")},async startExport(e){try{await this.resetExportState(),this.$store.commit("setCancelExport",!1),this.advancedSearchQuery?await this.handleAdvancedExport(this.advancedSearchQuery,e):await this.executeExport(e)}catch(e){console.error("导出失败:",e),this.$message.error(this.$t("export.failed")),await this.resetExportState()}},async cancelExportProcess(){this.$store.commit("setCancelExport",!0),await this.resetExportState()},continueExport(){this.$store.commit("setCancelExport",!1),this.query=this.getActiveQuery(),this.advancedSearchQuery?this.handleAdvancedExport(this.advancedSearchQuery,this.exportFormat):this.executeExport(this.exportFormat)},async handleSlugsExport(e){try{await this.resetExportState(),this.$store.commit("setCancelExport",!1),await z(null,null,null,null,null,void 0,void 0,void 0,void 0,void 0,void 0,void 0,this,null,e),await this.resetExportState()}catch(e){console.error("Slugs 导出失败:",e),this.$message.error(this.$t("export.failed")),await this.resetExportState()}},async handleAdvancedExport(e={},t){const{date:o=[],contain:n="",other:r=[],tag:s="",tags:a=[]}=e||{},i=Array.isArray(o)?o:[],l=Array.isArray(r)?r:[],c=Array.isArray(a)&&a.length?a.filter(Boolean):s?[s]:[],d=i.length?i[0]:this.$store.state.start_date,h=i.length?i[1]:this.$store.state.end_date,p="notContain"!==n&&"all"!==n&&"noTag"!==n&&c.length?c:null,m="notContain"===n&&c.length?c:void 0,u="noTag"!==n&&void 0,g=l.length?l.includes("record"):void 0;try{await z(p,this.query||null,d,h,"export"===this.selected_source?null:this.selected_source,l.length?l.includes("image"):void 0,u,l.length?l.includes("link"):void 0,void 0,"that_year_today"===this.type?"last_year_today":void 0,m,g,this,t),await this.resetExportState()}catch(e){throw console.error("高级搜索导出失败:",e),e}},setExportTypeFilters(){switch(this.with_tag=void 0,this.with_link=void 0,this.with_image=void 0,this.with_record=void 0,this.type){case"notag":this.with_tag=!1;break;case"link":this.with_link=!0;break;case"image":this.with_image=!0;break;
1case"record":this.with_record=!0}},async executeExport(e){this.setExportTypeFilters();const t=this.start_date||this.$store.state.start_date,o=this.end_date||this.$store.state.end_date,n=""===this.selectedTag?null:this.selectedTag;try{await z(n,this.query||null,t,o,this.exportFilters.source,this.with_image,this.with_tag,this.with_link,void 0,this.exportFilters.isLastYearToday,void 0,this.with_record,this,e),await this.resetExportState()}catch(e){throw console.error("执行导出失败:",e),e}},async resetExportState(){this.$store.commit("setExportProgress",0),await n.Ay.deleteZipCache(),localStorage.removeItem("exportProgress"),localStorage.removeItem("exportTotal"),localStorage.removeItem("exportCacheSlug")},async checkPendingExports(){const{zipCache:e}=await n.Ay.getZipCache();e&&e.length&&(this.showContinueAction=!0,this.caches=e)},setupEventListeners(){r.default.on("memo-export",this.onMemoExport),r.default.on("memo-export-full",this.onMemoExportFull),r.default.on("memo-export-txt",this.onMemoExportTxt),r.default.on("memo-export-pdf",this.onMemoExportPdf)},onMemoExport(e){this.query=this.getActiveQuery(),(0,p.A)("数据导出","条件_开始"),this.$store.commit("setCancelExport",!1),e&&e.slugs?this.handleSlugsExport(e.slugs):e?this.handleAdvancedExport(e,this.exportFormat):this.startExport(this.exportFormat)},onMemoExportFull(){this.showContinueAction||(this.$store.commit("setAdvancedSearchQuery",null),this.query=null,(0,p.A)("数据导出","全量_开始"),this.startExport())},onMemoExportTxt(){this.$store.commit("setAdvancedSearchQuery",null),this.query=null,(0,p.A)("数据导出","全量_开始"),this.startExport(this.exportFormat||"txt")},onMemoExportPdf(){this.$store.commit("setAdvancedSearchQuery",null),this.query=null,(0,p.A)("数据导出","PDF_开始"),this.startExport("pdf")}},async mounted(){await this.checkPendingExports(),this.setupEventListeners()},beforeDestroy(){r.default.off("memo-export",this.onMemoExport),r.default.off("memo-export-full",this.onMemoExportFull),r.default.off("memo-export-txt",this.onMemoExportTxt),r.default.off("memo-export-pdf",this.onMemoExportPdf)}},B=(0,o(53460).A)(H,function(){var e=this;return(0,e._self._c)("Snackbar",{attrs:{show:e.processedMemos>0&&!e.cancelExport,persistent:!0,message:e.showContinueAction?e.$t("export.export_tip_continue",{progress:e.progress}):e.$t("export.export_tip",{progress:e.progress}),actionText:e.showContinueAction?e.$t("export.export_tip_continue_btn"):null},on:{close:e.cancelExportProcess,action:e.continueAction}})},[],!1,null,null,null).exports}}]);

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.