1let i=!1,c=0,l=0;const s=5e3;function f(){return typeof window>"u"?!1:i?!0:(i=new URL(window.location.href).searchParams.get("profile")==="memory"||localStorage.getItem("mugComic_profileMemory")==="1",i)}function d(){return typeof document>"u"?0:document.querySelectorAll("canvas").length}function y(e){return!e||typeof e!="string"?0:Math.round(e.length*.75)}function m(e){return!e||!e.width||!e.height?0:e.width*e.height*4}function g(e){if(!e||typeof e!="object")return{count:0,totalBytes:0};let n=0,o=0;for(const r of Object.keys(e)){const t=e[r];if(t!=null&&t.originalImage){const u=y(t.originalImage);n+=u,o++}}return{count:o,totalBytes:n}}function M(e=null){if(!f())return;const n=Date.now();if(n-l<s)return;l=n;const o=d();let r=0;typeof document<"u"&&document.querySelectorAll("canvas").forEach(a=>{r+=m(a)});const t=e?g(e):{count:0,totalBytes:0};[`[MemoryProfile] canvases: ${o}, canvasMem: ${(r/1024/1024).toFixed(2)} MB`,`maskImages originalImage: ${t.count} ÑÑ, ~${(t.totalBytes/1024/1024).toFixed(2)} MB`,`3D updates: ${c}`].join(" | ")}function h(){f()&&c++}export{d as countCanvases,m as estimateCanvasMemory,y as estimateDataUrlSize,g as getMaskImagesMemory,f as isEnabled,M as logMemoryProfile,h as on3DUpdate};
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.