PageSourceSearch

https://otter-assistant.github.io/assets/page.f1e639c.js

js otter-assistant.github.io collected 2026-10-03 09:43:45 UTC 5,646 bytes, 80 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core.f1e639c.js","assets/preload-helper.f1e639c.js"])))=>i.map(i=>d[i]);
2import{_ as g}from"./preload-helper.f1e639c.js";const c=()=>document.querySelectorAll("pre.mermaid").length>0;let d=null;async function h(){return d||(console.log("[astro-mermaid] Loading mermaid.js..."),d=g(()=>import("./mermaid.core.f1e639c.js").then(r=>r.bE),__vite__mapDeps([0,1])).then(async({default:r})=>{const t=[];if(t&&t.length>0){console.log("[astro-mermaid] Registering",t.length,"icon packs");const a=t.map(e=>({name:e.name,loader:new Function("return "+e.loader)()}));await r.registerIconPacks(a)}return r}).catch(r=>{throw console.error("[astro-mermaid] Failed to load mermaid:",r),d=null,r}),d)}const m={startOnLoad:!1,theme:"default"},b={light:"default",dark:"dark"};async function s(){console.log("[astro-mermaid] Initializing mermaid diagrams...");const r=document.querySelectorAll("pre.mermaid");if(console.log("[astro-mermaid] Found",r.length,"mermaid diagrams"),r.length===0)return;const t=await h();let a=m.theme;{const e=document.documentElement.getAttribute("data-theme"),n=document.body.getAttribute("data-theme");a=b[e||n]||m.theme,console.log("[astro-mermaid] Using theme:",a,"from",e?"html":"body")}t.initialize({...m,theme:a,gitGraph:{mainBranchName:"main",showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0}});for(const e of r){if(e.hasAttribute("data-processed"))continue;e.hasAttribute("data-diagram")||e.setAttribute("data-diagram",e.textContent||"");const n=e.getAttribute("data-diagram")||"",o="mermaid-"+Math.random().toString(36).slice(2,11);console.log("[astro-mermaid] Rendering diagram:",o);try{const i=document.getElementById(o);i&&i.remove();const{svg:u}=await t.render(o,n);e.innerHTML=u,e.setAttribute("data-processed","true"),console.log("[astro-mermaid] Successfully rendered diagram:",o)}catch(i){console.error("[astro-mermaid] Mermaid rendering error for diagram:",o,i),e.innerHTML=`<div style="color: red; padding: 1rem; border: 1px solid red; border-radius: 0.5rem;">
3        <strong>Error rendering diagram:</strong><br/>
4        ${i.message||"Unknown error"}
5      </div>`,e.setAttribute("data-processed","true")}}}c()?(console.log("[astro-mermaid] Mermaid diagrams detected on initial load"),s()):console.log("[astro-mermaid] No mermaid diagrams found on initial load");{const r=new MutationObserver(t=>{for(const a of t)a.type==="attributes"&&a.attributeName==="data-theme"&&(document.querySelectorAll("pre.mermaid[data-processed]").forEach(e=>{e.removeAttribute("data-processed")}),s())});r.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),r.observe(document.body,{attributes:!0,attributeFilter:["data-theme"]})}document.addEventListener("astro:after-swap",()=>{console.log("[astro-mermaid] View transition detected"),c()&&s()});const l=document.createElement("style");l.textContent=`
6            /* Prevent layout shifts by setting minimum height */
7            pre.mermaid {
8              display: flex;
9              justify-content: center;
10              align-items: center;
11              margin: 2rem 0;
12              padding: 1rem;
13              background-color: transparent;
14              border: none;
15              overflow: auto;
16              min-height: 200px; /* Prevent layout shift */
17              position: relative;
18            }
19            
20            /* Loading state with skeleton loader */
21            pre.mermaid:not([data-processed]) {
22              background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
23              background-size: 200% 100%;
24              animation: shimmer 1.5s infinite;
25            }
26            
27            /* Dark mode skeleton loader */
28            [data-theme="dark"] pre.mermaid:not([data-processed]) {
29              background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
30              background-size: 200% 100%;
31            }
32            
33            @keyframes shimmer {
34              0% {
35                background-position: -200% 0;
36              }
37              100% {
38                background-position: 200% 0;
39              }
40            }
41            
42            /* Show processed diagrams with smooth transition */
43            pre.mermaid[data-processed] {
44              animation: none;
45              background: transparent;
46              min-height: auto; /* Allow natural height after render */
47            }
48            
49            /* Ensure responsive sizing for mermaid SVGs */
50            pre.mermaid svg {
51              max-width: 100%;
52              height: auto;
53            }
54            
55            /* Optional: Add subtle background for better visibility */
56            @media (prefers-color-scheme: dark) {
57              pre.mermaid[data-processed] {
58                background-color: rgba(255, 255, 255, 0.02);
59                border-radius: 0.5rem;
60              }
61            }
62            
63            @media (prefers-color-scheme: light) {
64              pre.mermaid[data-processed] {
65                background-color: rgba(0, 0, 0, 0.02);
66                border-radius: 0.5rem;
67              }
68            }
69            
70            /* Respect user's color scheme preference */
71            [data-theme="dark"] pre.mermaid[data-processed] {
72              background-color: rgba(255, 255, 255, 0.02);
73              border-radius: 0.5rem;
74            }
75            
76            [data-theme="light"] pre.mermaid[data-processed] {
77              background-color: rgba(0, 0, 0, 0.02);
78              border-radius: 0.5rem;
79            }
80          `;document.head.appendChild(l);

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.