@robthepcguy/rag-vault 1.7.2 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/README.md +92 -40
  2. package/dist/chunker/semantic-chunker.d.ts +0 -1
  3. package/dist/chunker/semantic-chunker.d.ts.map +1 -1
  4. package/dist/chunker/semantic-chunker.js +1 -1
  5. package/dist/chunker/semantic-chunker.js.map +1 -1
  6. package/dist/embedder/index.d.ts +5 -0
  7. package/dist/embedder/index.d.ts.map +1 -1
  8. package/dist/embedder/index.js +40 -5
  9. package/dist/embedder/index.js.map +1 -1
  10. package/dist/errors/index.d.ts +1 -1
  11. package/dist/errors/index.d.ts.map +1 -1
  12. package/dist/flywheel/feedback.d.ts +1 -1
  13. package/dist/flywheel/feedback.d.ts.map +1 -1
  14. package/dist/flywheel/feedback.js +1 -1
  15. package/dist/flywheel/feedback.js.map +1 -1
  16. package/dist/hyde/index.d.ts +47 -0
  17. package/dist/hyde/index.d.ts.map +1 -0
  18. package/dist/hyde/index.js +203 -0
  19. package/dist/hyde/index.js.map +1 -0
  20. package/dist/parser/pdf-filter.d.ts +3 -5
  21. package/dist/parser/pdf-filter.d.ts.map +1 -1
  22. package/dist/parser/pdf-filter.js +1 -1
  23. package/dist/parser/pdf-filter.js.map +1 -1
  24. package/dist/query/parser.d.ts +2 -6
  25. package/dist/query/parser.d.ts.map +1 -1
  26. package/dist/query/parser.js +14 -22
  27. package/dist/query/parser.js.map +1 -1
  28. package/dist/reranker/index.d.ts +76 -0
  29. package/dist/reranker/index.d.ts.map +1 -0
  30. package/dist/reranker/index.js +199 -0
  31. package/dist/reranker/index.js.map +1 -0
  32. package/dist/server/index.d.ts +25 -0
  33. package/dist/server/index.d.ts.map +1 -1
  34. package/dist/server/index.js +140 -48
  35. package/dist/server/index.js.map +1 -1
  36. package/dist/server/raw-data-utils.d.ts +0 -40
  37. package/dist/server/raw-data-utils.d.ts.map +1 -1
  38. package/dist/server/raw-data-utils.js +9 -8
  39. package/dist/server/raw-data-utils.js.map +1 -1
  40. package/dist/server/remote-transport.d.ts +2 -1
  41. package/dist/server/remote-transport.d.ts.map +1 -1
  42. package/dist/server/remote-transport.js +26 -6
  43. package/dist/server/remote-transport.js.map +1 -1
  44. package/dist/server/schemas.d.ts +26 -129
  45. package/dist/server/schemas.d.ts.map +1 -1
  46. package/dist/server/schemas.js +9 -9
  47. package/dist/server/schemas.js.map +1 -1
  48. package/dist/utils/config-parsers.d.ts +14 -0
  49. package/dist/utils/config-parsers.d.ts.map +1 -1
  50. package/dist/utils/config-parsers.js +26 -0
  51. package/dist/utils/config-parsers.js.map +1 -1
  52. package/dist/utils/config.d.ts +23 -0
  53. package/dist/utils/config.d.ts.map +1 -1
  54. package/dist/utils/config.js +39 -1
  55. package/dist/utils/config.js.map +1 -1
  56. package/dist/utils/file-utils.d.ts.map +1 -1
  57. package/dist/utils/file-utils.js +17 -1
  58. package/dist/utils/file-utils.js.map +1 -1
  59. package/dist/vectordb/index.d.ts +45 -16
  60. package/dist/vectordb/index.d.ts.map +1 -1
  61. package/dist/vectordb/index.js +363 -170
  62. package/dist/vectordb/index.js.map +1 -1
  63. package/dist/web/api-routes.d.ts.map +1 -1
  64. package/dist/web/api-routes.js +23 -10
  65. package/dist/web/api-routes.js.map +1 -1
  66. package/dist/web/database-manager.d.ts.map +1 -1
  67. package/dist/web/database-manager.js +32 -25
  68. package/dist/web/database-manager.js.map +1 -1
  69. package/dist/web/http-server.d.ts +0 -5
  70. package/dist/web/http-server.d.ts.map +1 -1
  71. package/dist/web/http-server.js +3 -7
  72. package/dist/web/http-server.js.map +1 -1
  73. package/dist/web/middleware/async-handler.d.ts +2 -1
  74. package/dist/web/middleware/async-handler.d.ts.map +1 -1
  75. package/dist/web/middleware/rate-limit.d.ts +2 -1
  76. package/dist/web/middleware/rate-limit.d.ts.map +1 -1
  77. package/dist/web/middleware/request-logger.d.ts +1 -1
  78. package/dist/web/middleware/request-logger.d.ts.map +1 -1
  79. package/package.json +8 -7
  80. package/skills/rag-vault/SKILL.md +3 -3
  81. package/skills/rag-vault/references/html-ingestion.md +1 -1
  82. package/web-ui/dist/assets/{CollectionsPage-BDmEfv3V.js → CollectionsPage-wbfgYFTw.js} +1 -1
  83. package/web-ui/dist/assets/{FilesPage-pG9HmpgQ.js → FilesPage-D6TlldaR.js} +1 -1
  84. package/web-ui/dist/assets/ReaderPage-Sgy0vMZ6.js +28 -0
  85. package/web-ui/dist/assets/{ReaderSettingsContext-CkSjqsRh.js → ReaderSettingsContext-DsvLXuaf.js} +1 -1
  86. package/web-ui/dist/assets/{SearchPage-DAltjnLL.js → SearchPage-mPKXZEyq.js} +1 -1
  87. package/web-ui/dist/assets/{SettingsPage-C6J5BITP.js → SettingsPage-DXeWwfvd.js} +1 -1
  88. package/web-ui/dist/assets/{StatusPage-powRGmW3.js → StatusPage-AirpfsGF.js} +1 -1
  89. package/web-ui/dist/assets/{UploadPage-eyfSjL4u.js → UploadPage-Cob25kDa.js} +5 -5
  90. package/web-ui/dist/assets/index-BZMzEssr.js +6 -0
  91. package/web-ui/dist/assets/index-DovQIIL4.css +1 -0
  92. package/web-ui/dist/assets/motion-DdHBXDWx.js +9 -0
  93. package/web-ui/dist/assets/query-DbAD_nLW.js +1 -0
  94. package/web-ui/dist/assets/vendor-DNJ-hWNb.js +10 -0
  95. package/web-ui/dist/index.html +4 -4
  96. package/web-ui/dist/assets/ReaderPage-CwMN03NU.js +0 -28
  97. package/web-ui/dist/assets/index-BpwaiuGL.css +0 -1
  98. package/web-ui/dist/assets/index-D068MV_o.js +0 -6
  99. package/web-ui/dist/assets/motion-CKwJwI3J.js +0 -9
  100. package/web-ui/dist/assets/query-DPt-uCb6.js +0 -1
  101. package/web-ui/dist/assets/vendor-C2QPsZ3S.js +0 -10
@@ -1,28 +0,0 @@
1
- import{a as o,b as st,j as e}from"./query-DPt-uCb6.js";import{useReaderSettings as we}from"./ReaderSettingsContext-CkSjqsRh.js";import{g as nt,u as Ne,a as rt,b as at,s as ot,S as q,c as lt,K as ct,d as Ce,e as it,f as dt}from"./index-D068MV_o.js";import{m as R,A}from"./motion-CKwJwI3J.js";import{c as ut,u as xt}from"./vendor-C2QPsZ3S.js";function ht(t="100px"){const[s,n]=o.useState(new Set),[r,a]=o.useState(null),i=o.useRef(null),u=o.useRef(new Map),d=o.useRef(new Set);o.useEffect(()=>{i.current=new IntersectionObserver(c=>{n(f=>{const m=new Set(f);for(const g of c){const y=Number(g.target.getAttribute("data-chunk-index"));Number.isNaN(y)||(g.isIntersecting?m.add(y):m.delete(y))}return m})},{rootMargin:t,threshold:[0,.25,.5,.75,1]});const x=i.current;for(const[,c]of u.current)x.observe(c);for(const c of d.current){const f=u.current.get(c);f&&x.observe(f)}return d.current.clear(),()=>{x.disconnect(),i.current=null}},[t]),o.useEffect(()=>{if(s.size===0)a(null);else{const x=Array.from(s).sort((c,f)=>c-f);a(x[0]??null)}},[s]);const l=o.useCallback((x,c)=>{const f=i.current,m=u.current.get(x);m&&f&&f.unobserve(m),d.current.delete(x),c?(u.current.set(x,c),c.setAttribute("data-chunk-index",String(x)),f?f.observe(c):d.current.add(x)):u.current.delete(x)},[]);return{visibleChunkIndices:s,registerChunk:l,activeChunkIndex:r}}function ft(t,s,n=300,r=5){const[a,i]=o.useState([]);o.useEffect(()=>{if(!t||s.size===0){i([]);return}const x=Array.from(s).map(f=>({filePath:t,chunkIndex:f})),c=setTimeout(()=>{i(x)},n);return()=>clearTimeout(c)},[t,s,n]);const{data:u={},isLoading:d,error:l}=st({queryKey:["batchRelatedChunks",a,r],queryFn:()=>a.length>0?nt(a,r):{},enabled:a.length>0,staleTime:300*1e3});return{relatedChunks:u,isLoading:d,error:l}}function ie(){return crypto.randomUUID()}function mt(t,s){const n=t||"1",r=String.fromCharCode(97+s);return`${n}${r}`}function pt(t){if(t.length===0)return null;const s=t[0];if(!s)return null;const n={id:ie(),chunkKey:s.chunkKey,visitedAt:s.visitedAt,connectionReason:s.connectionReason,branchLabel:"1",children:[]};let r=n;for(let a=1;a<t.length;a++){const i=t[a];if(!i)continue;const u={id:ie(),chunkKey:i.chunkKey,visitedAt:i.visitedAt,connectionReason:i.connectionReason,branchLabel:String(a+1),children:[]};r.children.push(u),r=u}return n}function Ie(t,s=[]){return t&&(s.push({chunkKey:t.chunkKey,visitedAt:t.visitedAt,connectionReason:t.connectionReason}),t.children.length>0&&Ie(t.children[0]||null,s)),s}function Se(t,s){if(!t)return null;if(t.id===s)return t;for(const n of t.children){const r=Se(n,s);if(r)return r}return null}function bt(){const t=Ne(),[s,n]=o.useState(null),r=o.useCallback((l,x)=>{t.addToTrail(l,x)},[t]),a=o.useCallback(()=>t.currentTrail?t.currentTrail.root?t.currentTrail.root:pt(t.currentTrail.steps):null,[t.currentTrail]),i=o.useCallback(()=>Ie(a()),[a]),u=o.useCallback((l,x)=>{if(!t.currentTrail)return null;const c=a();if(!c)return null;const f=s||c.id,m=Se(c,f);if(!m)return null;const g={id:ie(),chunkKey:l,visitedAt:new Date().toISOString(),connectionReason:x,branchLabel:mt(m.branchLabel,m.children.length),children:[]};return m.children.push(g),n(g.id),g.id},[t.currentTrail,s,a]),d=o.useMemo(()=>{if(!t.currentTrail)return 0;const l=a();if(!l)return t.currentTrail.steps.length;let x=0;const c=f=>{x++,f.children.forEach(c)};return c(l),x},[t.currentTrail,a]);return{currentTrail:t.currentTrail,savedTrails:t.trails,isRecording:t.currentTrail!==null,stepCount:d,startNewTrail:t.startNewTrail,addStep:r,saveTrail:t.saveTrail,loadTrail:t.loadTrail,deleteTrail:t.deleteTrail,clearCurrentTrail:t.clearCurrentTrail,currentNodeId:s,setCurrentNodeId:n,addBranch:u,getTrailTree:a,flattenTrail:i}}function gt({totalChunks:t,activeChunkIndex:s,onNavigateToChunk:n,onToggleSplit:r,onPinTopSuggestion:a,onOpenSearch:i,onOpenHelp:u,onCloseOverlay:d,isOverlayOpen:l,enabled:x=!0,isSearchOpen:c=!1,onNextSearchMatch:f,onPreviousSearchMatch:m,onToggleBookmark:g,onOpenTagPicker:y,onToggleAnnotationPanel:h,onToggleReadingMode:b,onOpenComparison:v,onResetGraphLayout:w,onOpenGraphExport:k,onTogglePathfinding:S,onToggleClustering:E,isGraphOpen:K=!1,onToggleInferredLinks:H,onToggleCrossDocPanel:B,onToggleStatsPanel:W,onToggleDiscoveryMode:T,isDiscoveryMode:N=!1,onDiscoverySelectSuggestion:D,onDiscoveryGoBack:p}){const O=o.useRef(null),F=o.useRef({totalChunks:t,activeChunkIndex:s,isOverlayOpen:l,isSearchOpen:c,isGraphOpen:K,isDiscoveryMode:N}),C=o.useRef({onNavigateToChunk:n,onToggleSplit:r,onPinTopSuggestion:a,onOpenSearch:i,onOpenHelp:u,onCloseOverlay:d,onNextSearchMatch:f,onPreviousSearchMatch:m,onToggleBookmark:g,onOpenTagPicker:y,onToggleAnnotationPanel:h,onToggleReadingMode:b,onOpenComparison:v,onResetGraphLayout:w,onOpenGraphExport:k,onTogglePathfinding:S,onToggleClustering:E,onToggleInferredLinks:H,onToggleCrossDocPanel:B,onToggleStatsPanel:W,onToggleDiscoveryMode:T,onDiscoverySelectSuggestion:D,onDiscoveryGoBack:p});F.current={totalChunks:t,activeChunkIndex:s,isOverlayOpen:l,isSearchOpen:c,isGraphOpen:K,isDiscoveryMode:N},C.current={onNavigateToChunk:n,onToggleSplit:r,onPinTopSuggestion:a,onOpenSearch:i,onOpenHelp:u,onCloseOverlay:d,onNextSearchMatch:f,onPreviousSearchMatch:m,onToggleBookmark:g,onOpenTagPicker:y,onToggleAnnotationPanel:h,onToggleReadingMode:b,onOpenComparison:v,onResetGraphLayout:w,onOpenGraphExport:k,onTogglePathfinding:S,onToggleClustering:E,onToggleInferredLinks:H,onToggleCrossDocPanel:B,onToggleStatsPanel:W,onToggleDiscoveryMode:T,onDiscoverySelectSuggestion:D,onDiscoveryGoBack:p};const z=o.useCallback(()=>{const I=document.activeElement;if(I){const L=I.tagName.toLowerCase();if(L==="input"||L==="textarea"||I.getAttribute("contenteditable")==="true")return!0}const $=window.getSelection();return!!($&&$.toString().length>0)},[]),U=o.useCallback(I=>{if(z())return;const $=F.current,L=C.current;if(I.key==="Escape"){$.isOverlayOpen&&(I.preventDefault(),L.onCloseOverlay());return}if($.isSearchOpen){switch(I.key){case"n":I.preventDefault(),L.onNextSearchMatch?.();return;case"N":I.preventDefault(),L.onPreviousSearchMatch?.();return}return}if(!$.isOverlayOpen)switch(I.key){case"j":{I.preventDefault();const _=$.activeChunkIndex===null?0:Math.min($.activeChunkIndex+1,$.totalChunks-1);L.onNavigateToChunk(_);break}case"k":{I.preventDefault();const _=$.activeChunkIndex===null?0:Math.max($.activeChunkIndex-1,0);L.onNavigateToChunk(_);break}case" ":{I.preventDefault(),L.onToggleSplit();break}case"p":{I.preventDefault(),L.onPinTopSuggestion();break}case"/":{I.preventDefault(),L.onOpenSearch();break}case"?":{I.preventDefault(),L.onOpenHelp();break}case"b":{I.preventDefault(),L.onToggleBookmark?.();break}case"t":{I.preventDefault(),L.onOpenTagPicker?.();break}case"a":{I.preventDefault(),L.onToggleAnnotationPanel?.();break}case"m":{I.preventDefault(),L.onToggleReadingMode?.();break}case"c":{I.preventDefault(),L.onOpenComparison?.();break}case"r":{$.isGraphOpen&&(I.preventDefault(),L.onResetGraphLayout?.());break}case"e":{$.isGraphOpen&&(I.preventDefault(),L.onOpenGraphExport?.());break}case"f":{$.isGraphOpen&&(I.preventDefault(),L.onTogglePathfinding?.());break}case"g":{$.isGraphOpen&&(I.preventDefault(),L.onToggleClustering?.());break}case"i":{I.preventDefault(),L.onToggleInferredLinks?.();break}case"x":{I.preventDefault(),L.onToggleCrossDocPanel?.();break}case"s":{I.preventDefault(),L.onToggleStatsPanel?.();break}case"d":{I.preventDefault(),L.onToggleDiscoveryMode?.();break}case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{if($.isDiscoveryMode){I.preventDefault();const _=parseInt(I.key,10)-1;L.onDiscoverySelectSuggestion?.(_)}break}case"Backspace":{$.isDiscoveryMode&&(I.preventDefault(),L.onDiscoveryGoBack?.());break}}},[z]);return o.useEffect(()=>{if(x)return document.addEventListener("keydown",U),()=>{document.removeEventListener("keydown",U)}},[x,U]),{containerRef:O}}async function vt(t){const n=new TextEncoder().encode(t.slice(0,500)),r=await crypto.subtle.digest("SHA-256",n);return Array.from(new Uint8Array(r)).slice(0,8).map(i=>i.toString(16).padStart(2,"0")).join("")}function yt({filePath:t,chunks:s,activeChunkIndex:n,vaultId:r="default",debounceMs:a=1e3}){const i=`rag-vault-reading-progress-${r}`,[u,d]=rt(i,{}),l=o.useRef(null),x=o.useRef(null),c=o.useRef(!1),f=o.useRef({chunkIndex:0,scrollOffset:0});o.useEffect(()=>{if(s.length>0){const w=s[0];w&&vt(w.text).then(k=>{x.current=k})}},[s]);const m=o.useCallback(w=>`${t}:${w}`,[t]),g=Object.entries(u).find(([w])=>w.startsWith(`${t}:`)),y=!!g,h=g?g[1].lastChunkIndex:null,b=o.useCallback((w,k)=>{x.current&&(f.current={chunkIndex:w,scrollOffset:k},l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{const S=x.current;if(!S)return;const{chunkIndex:E,scrollOffset:K}=f.current,H=m(S);d(B=>({...B,[H]:{lastChunkIndex:E,scrollOffsetWithinChunk:K,lastVisited:new Date().toISOString(),fileFingerprint:S}}))},a))},[m,d,a]);o.useEffect(()=>{if(n!==null&&c.current){const w=document.getElementById(`chunk-${n}`),k=w?w.getBoundingClientRect().top:0;b(n,k)}},[n,b]);const v=o.useCallback(()=>{if(!x.current||s.length===0)return null;const w=x.current,k=m(w),S=u[k];return S?S.fileFingerprint!==w?(c.current=!0,{chunkIndex:0,scrollOffset:0}):(c.current=!0,{chunkIndex:Math.min(S.lastChunkIndex,s.length-1),scrollOffset:S.scrollOffsetWithinChunk}):Object.entries(u).find(([K])=>K.startsWith(`${t}:`))?(c.current=!0,{chunkIndex:0,scrollOffset:0}):(c.current=!0,null)},[t,s,u,m]);return o.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]),{restorePosition:v,savePosition:b,hasSavedPosition:y,savedChunkIndex:h}}function kt(t){const s=at(),n=o.useMemo(()=>t?s.getHighlightsForChunk(t):[],[s,t]),r=o.useMemo(()=>{const c=new Map;for(const f of n){const m=s.getAnnotationForHighlight(f.id);m&&c.set(f.id,m)}return c},[n,s]),a=o.useCallback((c,f,m,g,y)=>{if(!t)throw new Error("No chunk key provided");return s.createHighlight(t,c,f,m,g,y)},[s,t]),i=o.useCallback(c=>{s.deleteHighlight(c)},[s]),u=o.useCallback((c,f)=>{s.updateHighlightColor(c,f)},[s]),d=o.useCallback((c,f)=>s.createAnnotation(c,f),[s]),l=o.useCallback((c,f)=>{s.updateAnnotation(c,f)},[s]),x=o.useCallback(c=>{s.deleteAnnotation(c)},[s]);return{highlights:n,annotations:r,createHighlight:a,deleteHighlight:i,updateHighlightColor:u,addNote:d,updateNote:l,deleteNote:x,hasHighlights:n.length>0}}function jt(t,s,n){const r=t.getRangeAt(0),a=[],i=document.createTreeWalker(s,NodeFilter.SHOW_TEXT);let u=i.nextNode();for(;u!==null;)a.push(u),u=i.nextNode();let d=0,l=!1;for(const f of a){if(f===r.startContainer){d+=r.startOffset,l=!0;break}d+=f.textContent?.length??0}if(!l)return null;let x=0,c=!1;for(const f of a){if(f===r.endContainer){x+=r.endOffset,c=!0;break}x+=f.textContent?.length??0}return!c||d<0||x>n.length||d>=x?null:{startOffset:d,endOffset:x}}function wt({containerRef:t,chunkText:s,enabled:n=!0}){const[r,a]=o.useState(null),i=o.useCallback(()=>{a(null),window.getSelection()?.removeAllRanges()},[]);return o.useEffect(()=>{if(!n)return;const u=()=>{const x=window.getSelection();if(!x||x.isCollapsed||!x.rangeCount){a(null);return}const c=t.current;if(!c){a(null);return}const f=x.getRangeAt(0);if(!c.contains(f.commonAncestorContainer)){a(null);return}const m=x.toString().trim();if(!m){a(null);return}const g=jt(x,c,s);if(!g){a(null);return}const y=f.getBoundingClientRect(),h=s.slice(Math.max(0,g.startOffset-30),g.startOffset),b=s.slice(g.endOffset,g.endOffset+30);a({startOffset:g.startOffset,endOffset:g.endOffset,text:m,contextBefore:h,contextAfter:b,rect:y})};let d;const l=()=>{clearTimeout(d),d=setTimeout(u,100)};return document.addEventListener("selectionchange",l),()=>{document.removeEventListener("selectionchange",l),clearTimeout(d)}},[n,t,s]),{selection:r,clearSelection:i}}function Nt(t){return t.map(s=>({chunkIndex:s.chunkIndex,text:s.text,lowerText:s.text.toLowerCase()}))}function be(t,s,n){if(!s||s.length===0)return[];const r=[],a=n?s:s.toLowerCase();for(const i of t){const u=n?i.text:i.lowerText;let d=0;for(;d<u.length;){const l=u.indexOf(a,d);if(l===-1)break;const x=Math.max(0,l-25),c=Math.min(i.text.length,l+s.length+25),f=i.text.slice(x,c);r.push({chunkIndex:i.chunkIndex,startOffset:l,endOffset:l+s.length,context:(x>0?"...":"")+f+(c<i.text.length?"...":"")}),d=l+1}}return r}const ge={query:"",matches:[],currentIndex:-1,caseSensitive:!1,isOpen:!1};function Ct({chunks:t,onNavigateToChunk:s}){const[n,r]=o.useState(ge),a=o.useMemo(()=>Nt(t),[t]),i=o.useCallback(()=>{r(h=>({...h,isOpen:!0}))},[]),u=o.useCallback(()=>{r(h=>({...h,isOpen:!1}))},[]),d=o.useCallback(()=>{r(ge)},[]),l=o.useCallback(h=>{const b=be(a,h,n.caseSensitive);r(v=>({...v,query:h,matches:b,currentIndex:b.length>0?0:-1})),b.length>0&&s&&s(b[0].chunkIndex)},[a,n.caseSensitive,s]),x=o.useCallback(()=>{r(h=>{const b=!h.caseSensitive,v=be(a,h.query,b);return{...h,caseSensitive:b,matches:v,currentIndex:v.length>0?0:-1}})},[a]),c=o.useCallback(()=>{r(h=>{if(h.matches.length===0)return h;const b=(h.currentIndex+1)%h.matches.length,v=h.matches[b];return v&&s&&s(v.chunkIndex),{...h,currentIndex:b}})},[s]),f=o.useCallback(()=>{r(h=>{if(h.matches.length===0)return h;const b=h.currentIndex<=0?h.matches.length-1:h.currentIndex-1,v=h.matches[b];return v&&s&&s(v.chunkIndex),{...h,currentIndex:b}})},[s]),m=o.useCallback(h=>{r(b=>{if(h<0||h>=b.matches.length)return b;const v=b.matches[h];return v&&s&&s(v.chunkIndex),{...b,currentIndex:h}})},[s]),g=o.useCallback(h=>n.matches.filter(b=>b.chunkIndex===h),[n.matches]),y=o.useMemo(()=>n.currentIndex>=0&&n.currentIndex<n.matches.length?n.matches[n.currentIndex]??null:null,[n.matches,n.currentIndex]);return{searchState:n,isSearchOpen:n.isOpen,openSearch:i,closeSearch:u,setQuery:l,toggleCaseSensitive:x,nextMatch:c,previousMatch:f,goToMatch:m,clearSearch:d,getMatchesForChunk:g,currentMatch:y,totalMatches:n.matches.length}}const It=10,St=400,Lt=5,Tt=300*1e3,Z=new Map;function Le(t){return t.trim().toLowerCase().slice(0,100)}function Ot(t){const s=Le(t),n=Z.get(s);return n&&Date.now()-n.timestamp<Tt?n.results:(n&&Z.delete(s),null)}function Mt(t,s){const n=Le(t);if(Z.size>=50){const r=Z.keys().next().value;r&&Z.delete(r)}Z.set(n,{results:s,timestamp:Date.now()})}function Rt({selectionText:t,filePath:s,chunkIndex:n,enabled:r=!0}){const[a,i]=o.useState([]),[u,d]=o.useState(!1),[l,x]=o.useState(null),c=o.useRef(null),f=o.useRef(null),m=o.useRef(null),g=o.useCallback(()=>{i([]),x(null),d(!1),m.current=null,f.current&&(clearTimeout(f.current),f.current=null),c.current&&(c.current.abort(),c.current=null)},[]);return o.useEffect(()=>{if(!r){g();return}if(!t){g();return}if(t.length<It){g();return}if(t===m.current)return;f.current&&clearTimeout(f.current),c.current&&c.current.abort();const y=Ot(t);if(y){const h=y.filter(b=>!(b.filePath===s&&b.chunkIndex===n));i(h),x(t),m.current=t;return}return f.current=setTimeout(async()=>{d(!0),c.current=new AbortController;try{const h=await ot(t,Lt),b=h.filter(v=>!(v.filePath===s&&v.chunkIndex===n));Mt(t,h),i(b),x(t),m.current=t}catch(h){h instanceof Error&&h.name!=="AbortError"&&console.error("Auto-selection search failed:",h)}finally{d(!1)}},St),()=>{f.current&&clearTimeout(f.current)}},[t,s,n,r,g]),o.useEffect(()=>()=>{f.current&&clearTimeout(f.current),c.current&&c.current.abort()},[]),{results:a,isSearching:u,searchedText:l,clearResults:g}}const ve=[{color:"yellow",bg:"bg-yellow-300",ring:"ring-yellow-400",label:"Yellow"},{color:"green",bg:"bg-green-300",ring:"ring-green-400",label:"Green"},{color:"blue",bg:"bg-blue-300",ring:"ring-blue-400",label:"Blue"},{color:"pink",bg:"bg-pink-300",ring:"ring-pink-400",label:"Pink"},{color:"purple",bg:"bg-purple-300",ring:"ring-purple-400",label:"Purple"}];function $t({highlight:t,annotation:s,onUpdateNote:n,onDeleteNote:r,onDeleteHighlight:a,onChangeColor:i}){const[u,d]=o.useState(!1),[l,x]=o.useState(s?.note||""),[c,f]=o.useState(!1),m=o.useCallback(()=>{l.trim()&&n(l.trim()),d(!1)},[l,n]),g=o.useCallback(h=>{h.key==="Enter"&&!h.shiftKey&&(h.preventDefault(),m()),h.key==="Escape"&&(d(!1),x(s?.note||""))},[m,s?.note]),y=ve.find(h=>h.color===t.color);return e.jsxs(R.div,{initial:{opacity:0,x:10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10},className:"rounded-lg border shadow-sm overflow-hidden",style:{background:"var(--ws-surface-raised)",borderColor:"var(--ws-border)"},children:[e.jsx("div",{className:"px-3 py-2 border-b",style:{background:"var(--ws-surface-1)",borderColor:"var(--ws-border)"},children:e.jsxs("p",{className:"text-xs italic line-clamp-2",style:{color:"var(--ws-text-muted)"},children:['"',t.text.length>60?`${t.text.slice(0,60)}...`:t.text,'"']})}),e.jsx("div",{className:"p-3",children:u?e.jsxs("div",{children:[e.jsx("textarea",{value:l,onChange:h=>x(h.target.value),onKeyDown:g,onBlur:m,placeholder:"Add a note...",className:"w-full px-2 py-1.5 text-sm rounded border-0 resize-none focus:ring-2 focus:ring-blue-500",style:{background:"var(--ws-surface-1)",color:"var(--ws-text)"},rows:3}),e.jsxs("div",{className:"flex justify-end gap-2 mt-2",children:[e.jsx("button",{type:"button",onClick:()=>{d(!1),x(s?.note||"")},className:"px-2 py-1 text-xs",style:{color:"var(--ws-text-secondary)"},children:"Cancel"}),e.jsx("button",{type:"button",onClick:m,className:"px-2 py-1 text-xs rounded",style:{background:"var(--ws-accent)",color:"white"},children:"Save"})]})]}):e.jsx("div",{children:s?.note?e.jsx("button",{type:"button",className:"text-left text-sm cursor-pointer",style:{color:"var(--ws-text-secondary)"},onClick:()=>d(!0),children:s.note}):e.jsx("button",{type:"button",onClick:()=>d(!0),className:"text-sm italic",style:{color:"var(--ws-text-muted)"},children:"+ Add note..."})})}),e.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-t",style:{borderColor:"var(--ws-border-subtle)"},children:[e.jsxs("div",{className:"relative",children:[e.jsx("button",{type:"button",onClick:()=>f(!c),className:`w-5 h-5 rounded-full ${y?.bg} ring-1`,style:{"--tw-ring-color":"var(--ws-border)"},title:"Change color"}),c&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>f(!1),onKeyDown:h=>h.key==="Escape"&&f(!1),role:"button",tabIndex:0,"aria-label":"Close color picker"}),e.jsx("div",{className:"absolute bottom-full left-0 mb-2 z-20 flex gap-1 p-1.5 rounded-lg shadow-lg border",style:{background:"var(--ws-surface-raised)",borderColor:"var(--ws-border)"},children:ve.map(({color:h,bg:b,ring:v})=>e.jsx("button",{type:"button",onClick:()=>{i(h),f(!1)},className:`w-5 h-5 rounded-full ${b} hover:ring-2 ${v} transition-all ${h===t.color?"ring-2":""}`,title:h},h))})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[s&&e.jsx("button",{type:"button",onClick:r,className:"text-xs",style:{color:"var(--ws-text-muted)"},title:"Delete note",children:"Remove note"}),e.jsx("button",{type:"button",onClick:a,className:"p-1",style:{color:"var(--ws-text-muted)"},title:"Delete highlight",children:e.jsx(Dt,{className:"w-4 h-4"})})]})]})]})}function Dt({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})}function Et({items:t,onNavigate:s,onSaveTrail:n,canSaveTrail:r}){return t.length===0?null:e.jsxs("nav",{className:"flex items-center gap-1 px-4 py-2 border-b overflow-x-auto",style:{background:"var(--ws-surface-1)",borderColor:"var(--ws-border)"},"aria-label":"Breadcrumb",children:[e.jsxs("ol",{className:"flex items-center gap-1",children:[e.jsx("li",{children:e.jsx("button",{type:"button",onClick:()=>s({filePath:"",label:"Search",chunkIndex:void 0}),className:"transition-colors",style:{color:"var(--ws-text-muted)"},children:e.jsx(At,{})})}),t.map((a,i)=>e.jsxs(R.li,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},className:"flex items-center",children:[e.jsx("span",{className:"mx-1",style:{color:"var(--ws-text-muted)"},children:"/"}),a.connectionReason&&e.jsxs("span",{className:"text-xs italic mr-1",style:{color:"var(--ws-text-muted)"},children:['via "',a.connectionReason,'"']}),e.jsxs("button",{type:"button",onClick:()=>s(a),disabled:i===t.length-1,className:"text-sm truncate max-w-[150px] px-2 py-0.5 rounded transition-colors",style:i===t.length-1?{color:"var(--ws-text)",fontWeight:500,background:"var(--ws-surface-1)"}:{color:"var(--ws-text-secondary)"},title:`${a.label}${a.chunkIndex!==void 0?` #${a.chunkIndex}`:""}`,children:[a.label,a.chunkIndex!==void 0&&e.jsxs("span",{className:"ml-1",style:{color:"var(--ws-text-muted)"},children:["#",a.chunkIndex]})]})]},`${a.filePath}-${a.chunkIndex??"doc"}`))]}),n&&r&&t.length>1&&e.jsx(R.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},type:"button",onClick:n,className:"ml-auto px-2 py-1 text-xs font-medium rounded transition-colors whitespace-nowrap",style:{color:"var(--ws-accent)"},children:"Save Trail"})]})}function At(){return e.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})}const Kt=[{color:"yellow",bg:"bg-yellow-300",ring:"ring-yellow-400"},{color:"green",bg:"bg-green-300",ring:"ring-green-400"},{color:"blue",bg:"bg-blue-300",ring:"ring-blue-400"},{color:"pink",bg:"bg-pink-300",ring:"ring-pink-400"},{color:"purple",bg:"bg-purple-300",ring:"ring-purple-400"}],Bt=[{action:"related",icon:"🔍",label:"Related",title:"Find related content in vault"},{action:"support",icon:"✓",label:"Support",title:"Find supporting evidence"},{action:"contradict",icon:"✗",label:"Contradict",title:"Find contradicting content"},{action:"compare",icon:"⚖️",label:"Compare",title:"Compare with other chunks"},{action:"pin",icon:"📌",label:"Pin",title:"Pin selection as note"}];function Pt({rect:t,onSelectColor:s,onClose:n,onSelectionAction:r,isActionLoading:a=!1,showMarginIndicator:i=!0}){const u=!!r,d=i&&!u,l=u?220:160,x=u?80:d?70:44,c=8,f=t.left+t.width/2-l/2,m=t.top-x-c+window.scrollY,g=Math.max(8,Math.min(f,window.innerWidth-l-8)),y=m<8?t.bottom+c+window.scrollY:m;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-50",onClick:n,onKeyDown:h=>h.key==="Escape"&&n(),role:"button",tabIndex:0,"aria-label":"Close popover"}),e.jsxs(R.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.1},className:"fixed z-50 rounded-lg shadow-xl border p-2",style:{background:"var(--ws-surface-raised)",borderColor:"var(--ws-border)",left:g,top:y,minWidth:l},children:[e.jsx("div",{className:"flex items-center justify-center gap-1 mb-1.5",children:Kt.map(({color:h,bg:b,ring:v})=>e.jsx("button",{type:"button",onClick:()=>s(h),className:`w-7 h-7 rounded-full ${b} hover:ring-2 ${v} transition-all`,title:`Highlight ${h}`},h))}),d&&e.jsx("div",{className:"flex items-center justify-center gap-1.5 pt-1.5 border-t",style:{borderColor:"var(--ws-border)"},children:e.jsxs("span",{className:"text-xs text-violet-600 dark:text-violet-400 flex items-center gap-1",children:[e.jsx(Ht,{className:"w-3 h-3"}),"See margin",e.jsx(Ft,{className:"w-3 h-3"})]})}),u&&e.jsx("div",{className:"flex items-center justify-center gap-1 pt-1.5 border-t",style:{borderColor:"var(--ws-border)"},children:Bt.map(({action:h,icon:b,title:v})=>e.jsx("button",{type:"button",onClick:()=>r(h),disabled:a,className:`
2
- flex items-center justify-center w-8 h-8 rounded-md text-sm
3
- transition-all
4
- ${a?"opacity-50 cursor-not-allowed":""}
5
- `,title:v,children:b},h))})]})]})}function Ht({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})}function Ft({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}const Wt={yellow:"bg-yellow-200 dark:bg-yellow-800/60",green:"bg-green-200 dark:bg-green-800/60",blue:"bg-blue-200 dark:bg-blue-800/60",pink:"bg-pink-200 dark:bg-pink-800/60",purple:"bg-purple-200 dark:bg-purple-800/60"},zt={yellow:"hover:bg-yellow-300 dark:hover:bg-yellow-700/60",green:"hover:bg-green-300 dark:hover:bg-green-700/60",blue:"hover:bg-blue-300 dark:hover:bg-blue-700/60",pink:"hover:bg-pink-300 dark:hover:bg-pink-700/60",purple:"hover:bg-purple-300 dark:hover:bg-purple-700/60"};function Vt(t,s,n){const r=new Set;r.add(0),r.add(t.length);const a=[...s,...n];for(const d of a)d.startOffset>=0&&d.startOffset<=t.length&&r.add(d.startOffset),d.endOffset>=0&&d.endOffset<=t.length&&r.add(d.endOffset);const i=Array.from(r).sort((d,l)=>d-l),u=[];for(let d=0;d<i.length-1;d++){const l=i[d],x=i[d+1];if(l>=x)continue;const c=a.filter(f=>f.startOffset<=l&&f.endOffset>=x);u.push({text:t.slice(l,x),types:c})}return u}function Gt(t){return t.map(s=>({startOffset:s.range.startOffset,endOffset:s.range.endOffset,type:"annotation",highlightId:s.id,color:s.color}))}function Ut(t,s,n){let r=0;const a=[];let i=0;for(const u of t)u.chunkIndex<s&&i++;for(const u of t){if(u.chunkIndex!==s)continue;const d=i+r;a.push({startOffset:u.startOffset,endOffset:u.endOffset,type:d===n?"search-current":"search-match"}),r++}return a}function _t({text:t,highlights:s,searchMatches:n=[],currentSearchIndex:r=-1,chunkIndex:a,onHighlightClick:i}){const u=o.useMemo(()=>Gt(s),[s]),d=o.useMemo(()=>Ut(n,a,r),[n,a,r]),l=o.useMemo(()=>Vt(t,u,d),[t,u,d]),x=o.useMemo(()=>{const c=new Map;for(const f of s)c.set(f.id,f);return c},[s]);return e.jsx("span",{className:"whitespace-pre-wrap",children:l.map((c,f)=>{const m=c.types.find(b=>b.type==="annotation"),g=c.types.find(b=>b.type==="search-current"),y=c.types.find(b=>b.type==="search-match"),h=["rounded","transition-colors"];if(m?.color&&(h.push(Wt[m.color]),h.push(zt[m.color]),h.push("cursor-pointer","px-0.5")),g&&(h.push("ring-2","ring-orange-500","dark:ring-orange-400","ring-offset-1","ring-offset-white"),m||h.push("bg-orange-100","dark:bg-orange-900/30")),y&&!g&&h.push("underline","decoration-dotted","decoration-orange-500","dark:decoration-orange-400","underline-offset-2"),m?.highlightId){const b=x.get(m.highlightId);return e.jsx("span",{className:h.join(" "),onClick:v=>{v.stopPropagation(),b&&i&&i(b)},onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),b&&i&&i(b))},role:"button",tabIndex:0,"data-highlight-id":m.highlightId,children:c.text},`highlight-${m.highlightId}-${f}`)}return g||y?e.jsx("span",{className:h.join(" "),"data-search-match":"true",children:c.text},`search-${f}-${c.text.length}`):e.jsx("span",{children:c.text},`text-${f}-${c.text.length}`)})})}function Qt({chunk:t,isActive:s,onRegister:n,onClick:r,showChunkNumbers:a=!0,highlights:i=[],onCreateHighlight:u,onHighlightClick:d,searchMatches:l=[],currentSearchIndex:x=-1,isBookmarked:c=!1,onSelectionAction:f,isSelectionActionLoading:m=!1}){const g=o.useRef(null),y=o.useRef(null),h=o.useRef(null),b=r?y:g,{selection:v,clearSelection:w}=wt({containerRef:h,chunkText:t.text,enabled:!!u}),k=o.useCallback(B=>{v&&u&&(u({startOffset:v.startOffset,endOffset:v.endOffset},v.text,v.contextBefore,v.contextAfter,B),w())},[v,u,w]),S=o.useCallback(B=>{v&&f&&(f(B,{text:v.text,startOffset:v.startOffset,endOffset:v.endOffset,contextBefore:v.contextBefore,contextAfter:v.contextAfter}),B==="pin"&&w())},[v,f,w]);o.useEffect(()=>(n(t.chunkIndex,b.current),()=>{n(t.chunkIndex,null)}),[t.chunkIndex,n,b]);const E=e.jsx("div",{ref:h,children:i.length>0||l.length>0?e.jsx(_t,{text:t.text,highlights:i,searchMatches:l,currentSearchIndex:x,chunkIndex:t.chunkIndex,onHighlightClick:d}):e.jsx("span",{className:"whitespace-pre-wrap",children:t.text})}),K=e.jsxs(e.Fragment,{children:[a&&e.jsxs("div",{className:"absolute -left-1 top-5 flex items-center gap-1.5",children:[e.jsxs("span",{className:"book-chunk-badge",children:["§",t.chunkIndex]}),c&&e.jsx(Zt,{className:"w-3.5 h-3.5 text-amber-600 dark:text-amber-500"})]}),e.jsx("div",{className:"pl-8 pr-4 max-w-none book-text",style:{fontSize:"var(--reader-font-size, 1.05rem)",lineHeight:"var(--reader-line-height, 1.85)",fontFamily:"var(--reader-font-family, 'Georgia', 'Palatino Linotype', serif)"},children:E}),s&&e.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-0.5 bg-amber-500/60 dark:bg-amber-600/50"}),e.jsx(A,{children:v&&u&&e.jsx(Pt,{rect:v.rect,onSelectColor:k,onClose:w,onSelectionAction:f?S:void 0,isActionLoading:m})})]}),H=`
6
- book-page group relative py-6 px-8 mb-4 transition-all duration-200 text-left w-full
7
- ${s?"book-chunk-active":""}
8
- `;return r?e.jsx("button",{ref:y,id:`chunk-${t.chunkIndex}`,type:"button",className:H,onClick:r,children:K}):e.jsx("div",{ref:g,id:`chunk-${t.chunkIndex}`,className:H,children:K})}function Zt({className:t}){return e.jsx("svg",{className:t,fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{d:"M5 4a2 2 0 012-2h6a2 2 0 012 2v14l-5-2.5L5 18V4z"})})}function Te({chunks:t,activeChunkIndex:s,onRegisterChunk:n,onChunkClick:r,scrollToChunk:a,showChunkNumbers:i=!0,getHighlightsForChunk:u,onCreateHighlight:d,onHighlightClick:l,getSearchMatchesForChunk:x,currentSearchIndex:c=-1,isChunkBookmarked:f}){return o.useEffect(()=>{if(a!=null){const m=document.getElementById(`chunk-${a}`);m&&requestAnimationFrame(()=>{m.scrollIntoView({behavior:"smooth",block:"center"})})}},[a]),t.length===0?e.jsx("div",{className:"flex items-center justify-center h-64",style:{color:"var(--ws-text-muted)"},children:e.jsx("p",{children:"No content to display"})}):e.jsx("div",{className:"max-w-3xl mx-auto space-y-2",children:t.map(m=>{const g=u?.(m.chunkIndex)??[],y=x?.(m.chunkIndex)??[],h=f?.(m.chunkIndex)??!1;return e.jsx(Qt,{chunk:m,isActive:s===m.chunkIndex,onRegister:n,onClick:r?()=>r(m):void 0,showChunkNumbers:i,highlights:g,onCreateHighlight:d?(b,v,w,k,S)=>d(m.chunkIndex,b,v,w,k,S):void 0,onHighlightClick:l,searchMatches:y,currentSearchIndex:c,isBookmarked:h},`${m.filePath}-${m.chunkIndex}`)})})}const Xt={hidden:{opacity:0,y:-15,rotate:-3,scale:.95},visible:t=>({opacity:1,y:0,rotate:-.3,scale:1,transition:{delay:t*.06,duration:.3,ease:"easeOut"}}),exit:{opacity:0,x:-20,transition:{duration:.15}}};function Yt(t){switch(t){case"backlink":return"zettel-backlink";case"forward":return"zettel-forward";case"semantic":return"zettel-semantic"}}function Jt(t){switch(t){case"backlink":return"Links here";case"forward":return"Links to";case"semantic":return"Related"}}function qt(t){const s=t.split(/[/\\]/);return s[s.length-1]||t}function ye(t){return`${Math.round((1-t)*100)}%`}function Y({filePath:t,chunkIndex:s,previewText:n,type:r,score:a,sharedKeywords:i=[],onNavigate:u,onPin:d,isPinned:l=!1,animationIndex:x=0}){const c=qt(t),f=Jt(r),m=Yt(r);return e.jsxs(R.button,{type:"button",onClick:u,custom:x,variants:Xt,initial:"hidden",animate:"visible",exit:"exit",className:`
9
- zettel-slip ${m}
10
- w-full text-left cursor-pointer
11
- focus:outline-none focus:ring-2 focus:ring-amber-400 dark:focus:ring-amber-600
12
- ${l?"ring-2 ring-amber-500 dark:ring-amber-400":""}
13
- `,children:[e.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 flex-1",children:[e.jsx(es,{type:r}),e.jsx("span",{className:"text-xs font-medium text-stone-600 dark:text-stone-400 truncate font-serif",title:t,children:c}),e.jsxs("span",{className:"text-xs text-stone-400 dark:text-stone-500 font-mono",children:["#",s]})]}),a!==void 0&&e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-stone-200/50 dark:bg-stone-700/50 text-stone-600 dark:text-stone-400",title:`Similarity: ${ye(a)}`,children:ye(a)})]}),e.jsxs("p",{className:"text-sm text-stone-700 dark:text-stone-300 line-clamp-3 font-serif leading-relaxed",children:[n.slice(0,180),n.length>180&&"..."]}),i.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:i.slice(0,3).map(g=>e.jsx("span",{className:"px-1.5 py-0.5 text-xs bg-amber-100/60 dark:bg-amber-900/30 text-amber-700 dark:text-amber-400 rounded font-sans",children:g},g))}),e.jsxs("div",{className:"flex items-center justify-between mt-2 pt-1.5 border-t border-stone-200/50 dark:border-stone-700/50",children:[e.jsx("span",{className:"text-xs text-stone-500 dark:text-stone-400 italic",children:f}),e.jsx("div",{className:"flex items-center gap-1",children:d&&e.jsx("span",{role:"button",tabIndex:0,onClick:g=>{g.stopPropagation(),d()},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.stopPropagation(),g.preventDefault(),d())},className:`
14
- p-1 rounded transition-colors
15
- ${l?"text-amber-600 dark:text-amber-400":"text-stone-400 hover:text-amber-500 dark:text-stone-500 dark:hover:text-amber-400"}
16
- `,title:l?"Unpin":"Pin",children:e.jsx(ts,{className:"w-3.5 h-3.5"})})})]})]})}function es({type:t}){const s={backlink:"bg-blue-500",forward:"bg-emerald-500",semantic:"bg-violet-500"}[t];return e.jsx("span",{className:`w-2 h-2 rounded-full ${s} flex-shrink-0`,"aria-hidden":"true"})}function ts({className:t}){return e.jsx("svg",{className:t,fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{d:"M5 5a2 2 0 012-2h6a2 2 0 012 2v14l-5-2.5L5 19V5z"})})}function ke({message:t}){return e.jsxs(R.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center py-6 text-stone-500 dark:text-stone-400",children:[e.jsx(ss,{}),e.jsx("p",{className:"mt-2 text-sm font-serif italic",children:t})]})}function ss(){return e.jsx("svg",{className:"mx-auto h-10 w-10 text-stone-300 dark:text-stone-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}function Q({title:t,count:s,icon:n}){return e.jsxs("div",{className:"flex items-center gap-2 px-1 py-2",children:[n&&e.jsx("span",{className:"text-stone-400 dark:text-stone-500",children:n}),e.jsx("h4",{className:"text-xs font-semibold text-stone-600 dark:text-stone-400 uppercase tracking-wide font-sans",children:t}),s!==void 0&&s>0&&e.jsxs("span",{className:"text-xs text-stone-400 dark:text-stone-500",children:["(",s,")"]})]})}function le(){return e.jsxs("div",{className:"zettel-slip zettel-semantic animate-pulse",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-stone-300 dark:bg-stone-600"}),e.jsx("div",{className:"h-3 w-24 bg-stone-300 dark:bg-stone-600 rounded"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"h-3 w-full bg-stone-200 dark:bg-stone-700 rounded"}),e.jsx("div",{className:"h-3 w-4/5 bg-stone-200 dark:bg-stone-700 rounded"}),e.jsx("div",{className:"h-3 w-2/3 bg-stone-200 dark:bg-stone-700 rounded"})]})]})}function ns({relatedChunks:t,isLoading:s,activeChunkIndex:n,currentFilePath:r,onNavigateToChunk:a,pinnedChunkKeys:i,onTogglePin:u,highlights:d=[],annotations:l=new Map,onUpdateNote:x,onDeleteNote:c,onDeleteHighlight:f,onChangeHighlightColor:m,backlinks:g=[],outgoingLinks:y=[],selectionSearchResults:h,isSelectionSearchLoading:b=!1,onClearSelectionSearch:v,autoSelectionResults:w=[],isAutoSearching:k=!1,selectionText:S=null}){const E=t.filter(p=>p.score<.7),K=d.length>0,H=g.length>0,B=y.length>0,W=w.length>0||k,T=h||b,N=[...g].sort((p,O)=>{const F=p.sourceKey.filePath===r,C=O.sourceKey.filePath===r;if(F!==C)return F?-1:1;const z=!!p.label,U=!!O.label;return z!==U?z?-1:1:new Date(O.createdAt).getTime()-new Date(p.createdAt).getTime()}),D=[...y].sort((p,O)=>{const F=p.targetKey.filePath===r,C=O.targetKey.filePath===r;if(F!==C)return F?-1:1;const z=!!p.label,U=!!O.label;return z!==U?z?-1:1:new Date(O.createdAt).getTime()-new Date(p.createdAt).getTime()});return e.jsxs("div",{className:"h-full flex flex-col zettel-margin",children:[e.jsxs("div",{className:"zettel-header flex items-center justify-between",children:[e.jsxs("h3",{className:"text-sm font-semibold text-stone-700 dark:text-stone-300 font-serif",children:["Connections",n!==null&&e.jsxs("span",{className:"ml-2 text-stone-400 dark:text-stone-500 font-mono text-xs",children:["#",n]})]}),s&&e.jsx(q,{className:"w-4 h-4 text-stone-400"})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-3 space-y-4",children:[K&&e.jsxs("div",{className:"border-b border-stone-200/50 dark:border-stone-700/50 pb-4",children:[e.jsx(Q,{title:"Notes",count:d.length,icon:e.jsx(rs,{className:"w-3.5 h-3.5"})}),e.jsx("div",{className:"space-y-3 mt-2",children:e.jsx(A,{mode:"popLayout",children:d.map(p=>e.jsx($t,{highlight:p,annotation:l.get(p.id),onUpdateNote:O=>x?.(p.id,O),onDeleteNote:()=>{const O=l.get(p.id);O&&c?.(O.id)},onDeleteHighlight:()=>f?.(p.id),onChangeColor:O=>m?.(p.id,O)},p.id))})})]}),W&&e.jsxs("div",{className:"border-b border-stone-200/50 dark:border-stone-700/50 pb-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx(Q,{title:"From Selection",count:w.length,icon:e.jsx(is,{className:"w-3.5 h-3.5"})}),S&&e.jsxs("span",{className:"zettel-selection-pill truncate max-w-[150px]",title:S,children:['"',S.slice(0,30),S.length>30?"...":"",'"']})]}),e.jsx("div",{className:"space-y-2 mt-2",children:k?e.jsxs("div",{className:"zettel-searching",children:[e.jsx(q,{className:"w-4 h-4 text-violet-500"}),e.jsx("span",{className:"text-xs text-violet-600 dark:text-violet-400 font-serif italic",children:"Finding connections..."})]}):w.length===0?e.jsx("p",{className:"text-xs text-stone-500 dark:text-stone-400 italic font-serif py-2",children:"No related content found"}):e.jsx(A,{mode:"popLayout",children:w.map((p,O)=>e.jsx(Y,{filePath:p.filePath,chunkIndex:p.chunkIndex,previewText:p.text,type:"semantic",score:p.score,onNavigate:()=>a(p.filePath,p.chunkIndex),onPin:u?()=>u(p.filePath,p.chunkIndex):void 0,isPinned:i?.has(`${p.filePath}:${p.chunkIndex}`)??!1,animationIndex:O},`${p.filePath}:${p.chunkIndex}`))})})]}),T&&!W&&e.jsxs("div",{className:"border-b border-stone-200/50 dark:border-stone-700/50 pb-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx(Q,{title:h?us(h.action):"Searching...",count:h?.results.length,icon:e.jsx(cs,{className:"w-3.5 h-3.5"})}),v&&e.jsx("button",{type:"button",onClick:v,className:"text-stone-400 hover:text-stone-600 dark:hover:text-stone-200 transition-colors",title:"Close",children:e.jsx(ds,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"space-y-2 mt-2",children:b?e.jsx(le,{}):h?.results.length===0?e.jsx(ke,{message:"No results found"}):e.jsx(A,{mode:"popLayout",children:h?.results.map((p,O)=>e.jsx(Y,{filePath:p.filePath,chunkIndex:p.chunkIndex,previewText:p.text,type:"semantic",score:p.score,onNavigate:()=>a(p.filePath,p.chunkIndex),onPin:u?()=>u(p.filePath,p.chunkIndex):void 0,isPinned:i?.has(`${p.filePath}:${p.chunkIndex}`)??!1,animationIndex:O},`${p.filePath}:${p.chunkIndex}`))})})]}),H&&e.jsxs("div",{className:"border-b border-stone-200/50 dark:border-stone-700/50 pb-4",children:[e.jsx(Q,{title:"Links Here",count:N.length,icon:e.jsx(os,{className:"w-3.5 h-3.5"})}),e.jsx("div",{className:"space-y-2 mt-2",children:e.jsx(A,{mode:"popLayout",children:N.map((p,O)=>e.jsx(Y,{filePath:p.sourceKey.filePath,chunkIndex:p.sourceKey.chunkIndex,previewText:p.sourceText||"No preview available",type:"backlink",sharedKeywords:p.label?[p.label]:void 0,onNavigate:()=>a(p.sourceKey.filePath,p.sourceKey.chunkIndex),animationIndex:O},p.id))})})]}),B&&e.jsxs("div",{className:"border-b border-stone-200/50 dark:border-stone-700/50 pb-4",children:[e.jsx(Q,{title:"Links From",count:D.length,icon:e.jsx(ls,{className:"w-3.5 h-3.5"})}),e.jsx("div",{className:"space-y-2 mt-2",children:e.jsx(A,{mode:"popLayout",children:D.map((p,O)=>e.jsx(Y,{filePath:p.targetKey.filePath,chunkIndex:p.targetKey.chunkIndex,previewText:p.targetText||"No preview available",type:"forward",sharedKeywords:p.label?[p.label]:void 0,onNavigate:()=>a(p.targetKey.filePath,p.targetKey.chunkIndex),animationIndex:O},p.id))})})]}),e.jsxs("div",{children:[e.jsx(Q,{title:"Suggested",count:E.length,icon:e.jsx(as,{className:"w-3.5 h-3.5"})}),e.jsx("div",{className:"space-y-2 mt-2",children:e.jsx(A,{mode:"popLayout",children:E.length===0&&!s?e.jsx(ke,{message:n!==null?"No related content found":"Scroll to see related content"}):s&&E.length===0?e.jsxs(e.Fragment,{children:[e.jsx(le,{}),e.jsx(le,{})]}):E.map((p,O)=>{const F=`${p.filePath}:${p.chunkIndex}`,C=i?.has(F)??!1;return e.jsx(Y,{filePath:p.filePath,chunkIndex:p.chunkIndex,previewText:p.text,type:"semantic",score:p.score,sharedKeywords:p.explanation?.sharedKeywords,onNavigate:()=>a(p.filePath,p.chunkIndex),onPin:u?()=>u(p.filePath,p.chunkIndex):void 0,isPinned:C,animationIndex:O},F)})})})]})]})]})}function rs({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 8h10M7 12h4m1 8l-4-4H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-3l-4 4z"})})}function as({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})})}function os({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 19l-7-7 7-7m8 14l-7-7 7-7"})})}function ls({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 5l7 7-7 7M5 5l7 7-7 7"})})}function cs({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}function is({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 9l4-4 4 4m0 6l-4 4-4-4"})})}function ds({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}function us(t){switch(t){case"related":return"Related";case"support":return"Supporting";case"contradict":return"Contradicting";case"compare":return"Compare";case"pin":return"Pinned";default:return"Results"}}function xs({isOpen:t,onToggle:s,filePath:n,activeChunkIndex:r,relatedChunks:a,pins:i,onNavigateToChunk:u}){const{graphData:d,currentNodeId:l}=lt({filePath:n,activeChunkIndex:r,relatedChunks:a,pins:i}),x=o.useMemo(()=>{const f=new Set;for(const m of i)f.add(`${m.sourceKey.filePath}:${m.sourceKey.chunkIndex}`),f.add(`${m.targetKey.filePath}:${m.targetKey.chunkIndex}`);return f},[i]),c=f=>{u(f.filePath,f.chunkIndex)};return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:s,className:"flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg transition-colors",style:{color:"var(--ws-text-secondary)"},title:t?"Hide knowledge graph":"Show knowledge graph",children:[e.jsx(je,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Graph"}),d.nodes.length>0&&e.jsxs("span",{className:"text-xs",style:{color:"var(--ws-text-muted)"},children:["(",d.nodes.length,")"]})]}),e.jsx(A,{children:t&&e.jsx(R.div,{initial:{height:0,opacity:0},animate:{height:300,opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"absolute bottom-0 left-0 right-0 z-30 border-t overflow-hidden",style:{borderColor:"var(--ws-border)",background:"var(--ws-surface-raised)"},children:e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b",style:{borderColor:"var(--ws-border)",background:"var(--ws-surface-1)"},children:[e.jsxs("h3",{className:"text-sm font-medium",style:{color:"var(--ws-text-secondary)"},children:["Knowledge Graph",r!==null&&e.jsxs("span",{className:"ml-2",style:{color:"var(--ws-text-muted)"},children:["(centered on #",r,")"]})]}),e.jsx("button",{type:"button",onClick:s,className:"p-1 rounded",style:{color:"var(--ws-text-muted)"},children:e.jsx(hs,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"flex-1 p-2",children:d.nodes.length===0?e.jsx("div",{className:"h-full flex items-center justify-center",style:{color:"var(--ws-text-muted)"},children:e.jsxs("div",{className:"text-center",children:[e.jsx(je,{className:"w-10 h-10 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"No graph data available"}),e.jsx("p",{className:"text-xs mt-1",children:"Scroll through the document to load related content"})]})}):e.jsx(ct,{graphData:d,currentNodeId:l,pinnedNodeIds:x,onNodeClick:c})})]})})})]})}function je({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}function hs({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}const fs=[{key:"j",description:"Navigate to next chunk"},{key:"k",description:"Navigate to previous chunk"},{key:"Space",description:"Toggle split view"},{key:"p",description:"Pin top margin suggestion"},{key:"/",description:"Open search"},{key:"?",description:"Show keyboard shortcuts"},{key:"Esc",description:"Close overlays"}];function ms({isOpen:t,onClose:s}){return e.jsx(A,{children:t&&e.jsxs(e.Fragment,{children:[e.jsx(R.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",onClick:s}),e.jsx(R.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.15},className:"fixed inset-0 z-50 flex items-center justify-center p-4",onClick:n=>n.target===n.currentTarget&&s(),children:e.jsxs("div",{className:"w-full max-w-md rounded-xl shadow-2xl overflow-hidden",style:{background:"var(--ws-surface-raised)"},children:[e.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b",style:{borderColor:"var(--ws-border)"},children:[e.jsx("h2",{className:"text-lg font-semibold",style:{color:"var(--ws-text)"},children:"Keyboard Shortcuts"}),e.jsx("button",{type:"button",onClick:s,className:"p-1 rounded-lg transition-colors",style:{color:"var(--ws-text-muted)"},children:e.jsx(ps,{className:"w-5 h-5"})})]}),e.jsx("div",{className:"p-4",children:e.jsx("table",{className:"w-full",children:e.jsx("tbody",{className:"divide-y",style:{borderColor:"var(--ws-border-subtle)"},children:fs.map(n=>e.jsxs("tr",{className:"group",children:[e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("kbd",{className:"inline-flex items-center justify-center min-w-[2rem] px-2 py-1 text-sm font-mono font-semibold border rounded shadow-sm",style:{color:"var(--ws-text-secondary)",background:"var(--ws-surface-1)",borderColor:"var(--ws-border)"},children:n.key})}),e.jsx("td",{className:"py-2.5 text-sm",style:{color:"var(--ws-text-secondary)"},children:n.description})]},n.key))})})}),e.jsx("div",{className:"px-6 py-3 border-t",style:{background:"var(--ws-surface-1)",borderColor:"var(--ws-border)"},children:e.jsx("p",{className:"text-xs text-center",style:{color:"var(--ws-text-muted)"},children:"Shortcuts are disabled when typing in inputs or selecting text"})})]})})]})})}function ps({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}function bs({isOpen:t,onClose:s}){const{settings:n,setFontSize:r,setLineHeight:a,setFontFamily:i,setShowChunkNumbers:u,setShowHeatmap:d,resetSettings:l}=we();return e.jsx(A,{children:t&&e.jsxs(e.Fragment,{children:[e.jsx(R.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40",onClick:s}),e.jsx(R.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.15},className:"absolute right-0 top-full mt-2 z-50 w-72 rounded-lg shadow-xl border p-4",style:{background:"var(--ws-surface-raised)",borderColor:"var(--ws-border)"},children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("span",{className:"block text-xs font-medium mb-2",style:{color:"var(--ws-text-secondary)"},children:"Font Size"}),e.jsx("div",{className:"flex gap-1",role:"group","aria-label":"Font size",children:["sm","base","lg","xl"].map(x=>e.jsxs("button",{type:"button",onClick:()=>r(x),className:"flex-1 px-2 py-1.5 text-sm rounded-md transition-colors",style:n.fontSize===x?{background:"var(--ws-accent-subtle)",color:"var(--ws-accent)",fontWeight:500}:{background:"var(--ws-surface-1)",color:"var(--ws-text-secondary)"},children:[x==="sm"&&"S",x==="base"&&"M",x==="lg"&&"L",x==="xl"&&"XL"]},x))})]}),e.jsxs("div",{children:[e.jsx("span",{className:"block text-xs font-medium mb-2",style:{color:"var(--ws-text-secondary)"},children:"Line Spacing"}),e.jsx("div",{className:"flex gap-1",role:"group","aria-label":"Line spacing",children:["tight","normal","relaxed"].map(x=>e.jsx("button",{type:"button",onClick:()=>a(x),className:"flex-1 px-2 py-1.5 text-sm rounded-md transition-colors capitalize",style:n.lineHeight===x?{background:"var(--ws-accent-subtle)",color:"var(--ws-accent)",fontWeight:500}:{background:"var(--ws-surface-1)",color:"var(--ws-text-secondary)"},children:x},x))})]}),e.jsx("div",{children:e.jsxs("label",{className:"block text-xs font-medium mb-2",style:{color:"var(--ws-text-secondary)"},children:["Font",e.jsxs("select",{value:n.fontFamily,onChange:x=>i(x.target.value),className:"mt-1 w-full px-3 py-2 text-sm border-0 rounded-md focus:ring-2 focus:ring-blue-500",style:{background:"var(--ws-surface-1)",color:"var(--ws-text-secondary)"},children:[e.jsx("option",{value:"sans",children:"Sans-serif"}),e.jsx("option",{value:"serif",children:"Serif"}),e.jsx("option",{value:"mono",children:"Monospace"})]})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm",style:{color:"var(--ws-text-secondary)"},children:"Show chunk numbers"}),e.jsx("button",{type:"button",onClick:()=>u(!n.showChunkNumbers),className:"relative inline-flex h-6 w-11 items-center rounded-full transition-colors",style:{background:n.showChunkNumbers?"var(--ws-accent)":"var(--ws-surface-2)"},children:e.jsx("span",{className:`
17
- inline-block h-4 w-4 transform rounded-full bg-white transition-transform
18
- ${n.showChunkNumbers?"translate-x-6":"translate-x-1"}
19
- `})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("span",{className:"text-sm",style:{color:"var(--ws-text-secondary)"},children:"Semantic heatmap"}),e.jsx("p",{className:"text-xs",style:{color:"var(--ws-text-muted)"},children:"Highlight connected terms"})]}),e.jsx("button",{type:"button",onClick:()=>d(!n.showHeatmap),className:"relative inline-flex h-6 w-11 items-center rounded-full transition-colors",style:{background:n.showHeatmap?"var(--ws-accent)":"var(--ws-surface-2)"},children:e.jsx("span",{className:`
20
- inline-block h-4 w-4 transform rounded-full bg-white transition-transform
21
- ${n.showHeatmap?"translate-x-6":"translate-x-1"}
22
- `})})]}),e.jsx("div",{className:"pt-2 border-t",style:{borderColor:"var(--ws-border)"},children:e.jsx("button",{type:"button",onClick:l,className:"w-full px-3 py-1.5 text-sm rounded-md transition-colors",style:{color:"var(--ws-text-secondary)"},children:"Reset to defaults"})})]})})]})})}function gs({onClick:t}){return e.jsxs("button",{type:"button",onClick:t,className:"flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg transition-colors",style:{color:"var(--ws-text-secondary)"},title:"Reader settings",children:[e.jsx(vs,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Display"})]})}function vs({className:t}){return e.jsxs("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}function ys({isOpen:t,query:s,matches:n,currentIndex:r,caseSensitive:a,onQueryChange:i,onToggleCaseSensitive:u,onNextMatch:d,onPreviousMatch:l,onGoToMatch:x,onClose:c}){const f=o.useRef(null),m=o.useRef(null);o.useEffect(()=>{t&&requestAnimationFrame(()=>{f.current?.focus(),f.current?.select()})},[t]),o.useEffect(()=>{r>=0&&m.current&&m.current.querySelector(`[data-result-index="${r}"]`)?.scrollIntoView({block:"nearest",behavior:"smooth"})},[r]);const g=o.useCallback(y=>{switch(y.key){case"Escape":y.preventDefault(),c();break;case"Enter":y.preventDefault(),y.shiftKey?l():d();break;case"n":y.target!==f.current&&(y.preventDefault(),y.shiftKey?l():d());break;case"N":y.target!==f.current&&(y.preventDefault(),l());break}},[c,d,l]);return e.jsx(A,{children:t&&e.jsx(R.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.15},className:"fixed top-16 left-1/2 -translate-x-1/2 z-50 w-full max-w-lg px-4",onKeyDown:g,children:e.jsxs("div",{className:"rounded-xl shadow-2xl border overflow-hidden",style:{background:"var(--ws-surface-raised)",borderColor:"var(--ws-border)"},children:[e.jsxs("div",{className:"flex items-center gap-2 p-3 border-b",style:{borderColor:"var(--ws-border)"},children:[e.jsx("span",{style:{color:"var(--ws-text-muted)"},children:e.jsx(js,{className:"w-5 h-5 flex-shrink-0"})}),e.jsx("input",{ref:f,type:"text",value:s,onChange:y=>i(y.target.value),placeholder:"Search in document...",className:"flex-1 bg-transparent placeholder-gray-400 focus:outline-none text-base",style:{color:"var(--ws-text)"}}),n.length>0&&e.jsxs("span",{className:"text-sm whitespace-nowrap px-2",style:{color:"var(--ws-text-muted)"},children:[r+1,"/",n.length]}),e.jsx("button",{type:"button",onClick:u,className:"p-1.5 rounded text-sm font-medium transition-colors",style:a?{background:"var(--ws-accent-subtle)",color:"var(--ws-accent)"}:{color:"var(--ws-text-muted)"},title:"Case sensitive (Aa)",children:"Aa"}),e.jsxs("div",{className:"flex items-center gap-1 border-l pl-2",style:{borderColor:"var(--ws-border)"},children:[e.jsx("button",{type:"button",onClick:l,disabled:n.length===0,className:"p-1 disabled:opacity-30 disabled:cursor-not-allowed rounded transition-colors",style:{color:"var(--ws-text-muted)"},title:"Previous match (N)",children:e.jsx(ws,{className:"w-4 h-4"})}),e.jsx("button",{type:"button",onClick:d,disabled:n.length===0,className:"p-1 disabled:opacity-30 disabled:cursor-not-allowed rounded transition-colors",style:{color:"var(--ws-text-muted)"},title:"Next match (n)",children:e.jsx(Ns,{className:"w-4 h-4"})})]}),e.jsx("button",{type:"button",onClick:c,className:"p-1 rounded transition-colors",style:{color:"var(--ws-text-muted)"},title:"Close (Esc)",children:e.jsx(Cs,{className:"w-4 h-4"})})]}),s.length>0&&e.jsx("div",{ref:m,className:"max-h-64 overflow-y-auto",children:n.length===0?e.jsx("div",{className:"px-4 py-6 text-center",style:{color:"var(--ws-text-muted)"},children:e.jsx("p",{className:"text-sm",children:"No matches found"})}):e.jsxs("div",{className:"py-1",children:[n.slice(0,50).map((y,h)=>e.jsxs("button",{"data-result-index":h,type:"button",onClick:()=>x(h),className:`w-full text-left px-4 py-2 transition-colors ${h===r?"border-l-2":""}`,style:h===r?{background:"var(--ws-accent-subtle)",borderColor:"var(--ws-accent)"}:{},children:[e.jsx("div",{className:"flex items-center gap-2 mb-0.5",children:e.jsxs("span",{className:"text-xs font-medium",style:{color:"var(--ws-text-muted)"},children:["Chunk #",y.chunkIndex]})}),e.jsx("p",{className:"text-sm line-clamp-2",style:{color:"var(--ws-text-secondary)"},children:ks(y.context,s,a)})]},`${y.chunkIndex}-${y.startOffset}`)),n.length>50&&e.jsxs("div",{className:"px-4 py-2 text-xs text-center border-t",style:{color:"var(--ws-text-muted)",borderColor:"var(--ws-border)"},children:["Showing first 50 of ",n.length," matches"]})]})}),s.length===0&&e.jsxs("div",{className:"px-4 py-3 text-xs",style:{color:"var(--ws-text-muted)",background:"var(--ws-surface-1)"},children:[e.jsxs("span",{className:"mr-4",children:[e.jsx("kbd",{className:"px-1.5 py-0.5 rounded",style:{background:"var(--ws-surface-2)",color:"var(--ws-text-secondary)"},children:"Enter"})," ","next"]}),e.jsxs("span",{className:"mr-4",children:[e.jsx("kbd",{className:"px-1.5 py-0.5 rounded",style:{background:"var(--ws-surface-2)",color:"var(--ws-text-secondary)"},children:"Shift+Enter"})," ","previous"]}),e.jsxs("span",{children:[e.jsx("kbd",{className:"px-1.5 py-0.5 rounded",style:{background:"var(--ws-surface-2)",color:"var(--ws-text-secondary)"},children:"Esc"})," ","close"]})]})]})})})}function ks(t,s,n){if(!s)return t;const r=n?s:s.toLowerCase(),i=(n?t:t.toLowerCase()).indexOf(r);if(i===-1)return t;const u=t.slice(0,i),d=t.slice(i,i+s.length),l=t.slice(i+s.length);return e.jsxs(e.Fragment,{children:[u,e.jsx("mark",{className:"bg-orange-200 dark:bg-orange-800/60 rounded px-0.5",children:d}),l]})}function js({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}function ws({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 15l7-7 7 7"})})}function Ns({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})}function Cs({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}function Is({filePath:t,chunkIndex:s,onClose:n,onNavigate:r}){const{chunks:a,isLoading:i,error:u}=Ce(t),d=Ss(t);return e.jsxs(R.div,{initial:{opacity:0,x:50},animate:{opacity:1,x:0},exit:{opacity:0,x:50},className:"h-full flex flex-col border-l",style:{background:"var(--ws-surface-raised)",borderColor:"var(--ws-border)"},children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b",style:{borderColor:"var(--ws-border)",background:"var(--ws-surface-1)"},children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"text-sm font-medium truncate",style:{color:"var(--ws-text)"},title:t,children:d}),e.jsxs("p",{className:"text-xs",style:{color:"var(--ws-text-muted)"},children:[a.length," chunks · Viewing #",s]})]}),e.jsxs("div",{className:"flex items-center gap-2 ml-4",children:[e.jsx("button",{type:"button",onClick:()=>r(t,s),className:"px-3 py-1.5 text-sm font-medium rounded-lg transition-colors",style:{color:"var(--ws-accent)"},children:"Open Full"}),e.jsx("button",{type:"button",onClick:n,className:"p-1.5 rounded-lg transition-colors",style:{color:"var(--ws-text-muted)"},"aria-label":"Close split view",children:e.jsx(Ls,{})})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:i?e.jsxs("div",{className:"flex items-center justify-center h-32",children:[e.jsx(q,{className:"w-6 h-6",style:{color:"var(--ws-text-muted)"}}),e.jsx("span",{className:"ml-2",style:{color:"var(--ws-text-muted)"},children:"Loading document..."})]}):u?e.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4 text-red-700 dark:text-red-400",children:[e.jsx("p",{className:"font-medium",children:"Error loading document"}),e.jsx("p",{className:"text-sm mt-1",children:u.message})]}):e.jsx(Te,{chunks:a,activeChunkIndex:s,onRegisterChunk:()=>{},scrollToChunk:s})})]})}function Ss(t){const s=t.split(/[/\\]/);return s[s.length-1]||t}function Ls(){return e.jsx("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}function Ts({entries:t,activeChunkIndex:s,onNavigateToChunk:n,isOpen:r,onToggle:a,isFallback:i=!1}){const u=t.findIndex((l,x)=>{const c=t[x+1];return c?l.chunkIndex<=(s??0)&&c.chunkIndex>(s??0):l.chunkIndex<=(s??0)}),d=o.useCallback(l=>{n(l.chunkIndex)},[n]);return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:a,className:"flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg transition-colors",style:{color:"var(--ws-text-secondary)"},title:r?"Hide table of contents":"Show table of contents",children:[e.jsx(Ms,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Contents"}),e.jsx(R.span,{animate:{rotate:r?180:0},transition:{duration:.2},children:e.jsx(Rs,{className:"w-3 h-3"})})]}),e.jsx(A,{children:r&&e.jsx(R.div,{initial:{width:0,opacity:0},animate:{width:240,opacity:1},exit:{width:0,opacity:0},transition:{duration:.2},className:"fixed left-0 top-16 bottom-0 z-40 border-r shadow-lg overflow-hidden",style:{background:"var(--ws-surface-raised)",borderColor:"var(--ws-border)"},children:e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b",style:{borderColor:"var(--ws-border)"},children:[e.jsx("h3",{className:"text-sm font-semibold",style:{color:"var(--ws-text)"},children:"Table of Contents"}),i&&e.jsx("span",{className:"text-xs",style:{color:"var(--ws-text-muted)"},children:"(auto)"})]}),e.jsx("div",{className:"flex-1 overflow-y-auto py-2",children:t.length===0?e.jsx("div",{className:"px-4 py-8 text-center",style:{color:"var(--ws-text-muted)"},children:e.jsx("p",{className:"text-sm",children:"No headings detected"})}):e.jsx("nav",{className:"space-y-0.5",children:t.map((l,x)=>e.jsx(Os,{entry:l,isCurrent:x===u,onClick:()=>d(l)},l.id))})})]})})})]})}function Os({entry:t,isCurrent:s,onClick:n}){const r=16+(t.level-1)*12;return e.jsxs("button",{type:"button",onClick:n,className:`
23
- w-full text-left px-4 py-1.5 text-sm transition-colors border-l-2
24
- ${s?"font-medium":"border-transparent"}
25
- `,style:s?{background:"var(--ws-accent-subtle)",color:"var(--ws-accent)",borderColor:"var(--ws-accent)",paddingLeft:r}:{color:"var(--ws-text-secondary)",paddingLeft:r},children:[e.jsx("span",{className:"line-clamp-2",children:t.text}),t.type==="allcaps"&&e.jsx("span",{className:"ml-1 text-xs",style:{color:"var(--ws-text-muted)"},children:t.chunkIndex})]})}function Ms({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})}function Rs({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})}function $s({filePath:t,initialChunkIndex:s,onNavigate:n,onGoHome:r,pinnedChunkKeys:a,onTogglePin:i,onSaveTrail:u}){const[d,l]=o.useState(null),[x,c]=o.useState(()=>{const j=ce(t);return[{filePath:t,chunkIndex:s,label:j}]}),[f,m]=o.useState(!1),[g,y]=o.useState(!1),[h,b]=o.useState(!1),[v,w]=o.useState(!1),[k,S]=o.useState(null),E=o.useRef(null),{settings:K,cssVariables:H}=we(),{pins:B,getBacklinks:W,getPinsFromChunk:T}=Ne(),{chunks:N,isLoading:D,error:p}=Ce(t),{visibleChunkIndices:O,registerChunk:F,activeChunkIndex:C}=ht("100px"),{relatedChunks:z,isLoading:U}=ft(t,O,300,5),{results:I,isSearching:$,searchedText:L}=Rt({selectionText:k,filePath:t,chunkIndex:C??0,enabled:!d});o.useEffect(()=>{const j=()=>{const V=window.getSelection();if(!V||V.isCollapsed||!V.rangeCount){S(null);return}const J=V.toString().trim();J.length>=10?S(J):S(null)};let M;const P=()=>{clearTimeout(M),M=setTimeout(j,150)};return document.addEventListener("selectionchange",P),()=>{document.removeEventListener("selectionchange",P),clearTimeout(M)}},[]);const{entries:_,isFallback:Re}=it({chunks:N}),ee=o.useCallback(j=>{const M=document.getElementById(`chunk-${j}`);M&&M.scrollIntoView({behavior:"smooth",block:"center"})},[]),{searchState:X,isSearchOpen:te,openSearch:$e,closeSearch:se,setQuery:De,toggleCaseSensitive:Ee,nextMatch:de,previousMatch:ue,goToMatch:Ae,getMatchesForChunk:Ke}=Ct({chunks:N,onNavigateToChunk:ee}),{restorePosition:xe,hasSavedPosition:Be}=yt({filePath:t,chunks:N,activeChunkIndex:C}),Pe=o.useMemo(()=>C!==null?{filePath:t,chunkIndex:C}:null,[t,C]),{highlights:ne,annotations:re,createHighlight:he,deleteHighlight:He,updateHighlightColor:Fe,addNote:fe,updateNote:me,deleteNote:We}=kt(Pe),ze=o.useCallback(j=>j===C?ne:[],[C,ne]),Ve=o.useCallback((j,M,P,V,J,tt)=>{j===C&&he(M,P,V,J,tt)},[C,he]),Ge=o.useCallback(j=>{},[]),Ue=o.useCallback((j,M)=>{const P=re.get(j);P?me(P.id,M):fe(j,M)},[re,me,fe]),pe=o.useRef(!1);o.useEffect(()=>{if(N.length>0&&!pe.current&&!s){pe.current=!0;const j=xe();j&&requestAnimationFrame(()=>{const M=document.getElementById(`chunk-${j.chunkIndex}`);M&&M.scrollIntoView({behavior:"auto",block:"start"})})}},[N,xe,s]);const G=o.useMemo(()=>{if(C===null)return[];const j=`${t}:${C}`;return z[j]||[]},[t,C,z]),ae=o.useCallback((j,M)=>{const P=G.find(V=>V.filePath===j&&V.chunkIndex===M);c(V=>[...V,{filePath:j,chunkIndex:M,label:ce(j),connectionReason:P?.connectionReason}]),n(j,M)},[G,n]),oe=o.useCallback((j,M)=>{l({filePath:j,chunkIndex:M})},[]),_e=o.useCallback(j=>{if(!j.filePath){r();return}const M=x.findIndex(P=>P.filePath===j.filePath&&P.chunkIndex===j.chunkIndex);M!==-1&&c(P=>P.slice(0,M+1)),n(j.filePath,j.chunkIndex)},[x,n,r]),Qe=h||te||g,Ze=o.useMemo(()=>C===null?[]:W({filePath:t,chunkIndex:C}),[t,C,W]),Xe=o.useMemo(()=>C===null?[]:T({filePath:t,chunkIndex:C}),[t,C,T]),Ye=o.useCallback(()=>{if(G.length>0&&i){const j=G[0];j&&i(j.filePath,j.chunkIndex)}},[G,i]),Je=o.useCallback(()=>{if(d)l(null);else if(G.length>0){const j=G[0];j&&oe(j.filePath,j.chunkIndex)}},[d,G,oe]),qe=o.useCallback(()=>{b(!1),se(),y(!1)},[se]);gt({totalChunks:N.length,activeChunkIndex:C,onNavigateToChunk:ee,onToggleSplit:Je,onPinTopSuggestion:Ye,onOpenSearch:$e,onOpenHelp:()=>b(!0),onCloseOverlay:qe,isOverlayOpen:Qe,enabled:!0,isSearchOpen:te,onNextSearchMatch:de,onPreviousSearchMatch:ue});const et=ce(t);return e.jsxs("div",{className:"h-full flex flex-col",style:H,children:[e.jsx(Et,{items:x,onNavigate:_e,onSaveTrail:u,canSaveTrail:x.length>1}),e.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[f&&e.jsx("div",{className:"w-60 flex-shrink-0"}),e.jsxs("div",{className:`
26
- flex flex-col overflow-hidden transition-all duration-300
27
- ${d?"w-[40%]":"w-[60%]"}
28
- `,children:[e.jsxs("div",{className:"book-header flex items-center justify-between px-6 py-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(Ts,{entries:_,activeChunkIndex:C,onNavigateToChunk:ee,isOpen:f,onToggle:()=>m(!f),isFallback:Re}),e.jsxs("div",{children:[e.jsx("h2",{className:"book-title text-xl truncate",title:t,children:et}),e.jsxs("p",{className:"text-sm text-stone-500 dark:text-stone-400 font-serif",children:[N.length," passages",C!==null&&` · §${C}`,Be&&!s&&e.jsx("span",{className:"ml-2 text-amber-600 dark:text-amber-500",children:"· Restored"})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 relative",children:[e.jsx(xs,{isOpen:v,onToggle:()=>w(!v),filePath:t,activeChunkIndex:C,relatedChunks:G,pins:B,onNavigateToChunk:ae}),e.jsx("button",{type:"button",onClick:()=>b(!0),className:"p-2 rounded-lg transition-colors",style:{color:"var(--ws-text-muted)"},title:"Keyboard shortcuts (?)",children:e.jsx(Ds,{className:"w-4 h-4"})}),e.jsx(gs,{onClick:()=>y(!g)}),e.jsx(bs,{isOpen:g,onClose:()=>y(!1)})]})]}),e.jsx("div",{ref:E,className:"flex-1 overflow-y-auto px-8 py-6 book-reader",children:D?e.jsxs("div",{className:"flex items-center justify-center h-32",children:[e.jsx(q,{className:"w-6 h-6",style:{color:"var(--ws-text-muted)"}}),e.jsx("span",{className:"ml-2",style:{color:"var(--ws-text-muted)"},children:"Loading document..."})]}):p?e.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4 text-red-700 dark:text-red-400",children:[e.jsx("p",{className:"font-medium",children:"Error loading document"}),e.jsx("p",{className:"text-sm mt-1",children:p.message})]}):e.jsx(Te,{chunks:N,activeChunkIndex:C,onRegisterChunk:F,scrollToChunk:s,showChunkNumbers:K.showChunkNumbers,getHighlightsForChunk:ze,onCreateHighlight:Ve,onHighlightClick:Ge,getSearchMatchesForChunk:Ke,currentSearchIndex:X.currentIndex})})]}),e.jsx(A,{mode:"wait",children:d?e.jsx("div",{className:"w-[60%] border-l",style:{borderColor:"var(--ws-border)"},children:e.jsx(Is,{filePath:d.filePath,chunkIndex:d.chunkIndex,onClose:()=>l(null),onNavigate:(j,M)=>{l(null),ae(j,M)}})},"split"):e.jsx("div",{className:"w-[40%] border-l",style:{borderColor:"var(--ws-border)",background:"var(--ws-surface-1)"},children:e.jsx(ns,{relatedChunks:G,isLoading:U,activeChunkIndex:C,currentFilePath:t,onNavigateToChunk:ae,onOpenSplit:oe,pinnedChunkKeys:a,onTogglePin:i,highlights:ne,annotations:re,onUpdateNote:Ue,onDeleteNote:We,onDeleteHighlight:He,onChangeHighlightColor:Fe,backlinks:Ze,outgoingLinks:Xe,autoSelectionResults:I,isAutoSearching:$,selectionText:L})},"margin")})]}),e.jsx(ms,{isOpen:h,onClose:()=>b(!1)}),e.jsx(ys,{isOpen:te,query:X.query,matches:X.matches,currentIndex:X.currentIndex,caseSensitive:X.caseSensitive,onQueryChange:De,onToggleCaseSensitive:Ee,onNextMatch:de,onPreviousMatch:ue,onGoToMatch:Ae,onClose:se})]})}function ce(t){const s=t.split(/[/\\]/);return s[s.length-1]||t}function Ds({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6m-6 4h6"})})}function Es({currentTrail:t,savedTrails:s,onSaveTrail:n,onLoadTrail:r,onDeleteTrail:a,onClearCurrentTrail:i,onNavigateToStep:u,isOpen:d,onClose:l,trailTree:x,currentNodeId:c,onSetCurrentNode:f}){const[m,g]=o.useState(!1),[y,h]=o.useState(""),[b,v]=o.useState("current"),w=()=>{y.trim()&&(n(y.trim()),h(""),g(!1))};return d?e.jsx(R.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:l,children:e.jsxs(R.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},className:"rounded-xl shadow-xl max-w-lg w-full mx-4 max-h-[80vh] flex flex-col",style:{background:"var(--ws-surface-raised)"},onClick:k=>k.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b",style:{borderColor:"var(--ws-border)"},children:[e.jsx("h2",{className:"text-lg font-semibold",style:{color:"var(--ws-text)"},children:"Trail Manager"}),e.jsx("button",{type:"button",onClick:l,className:"p-1 rounded transition-colors",style:{color:"var(--ws-text-muted)"},children:e.jsx(Bs,{})})]}),e.jsxs("div",{className:"flex border-b",style:{borderColor:"var(--ws-border)"},children:[e.jsxs("button",{type:"button",onClick:()=>v("current"),className:`flex-1 px-4 py-2 text-sm font-medium transition-colors ${b==="current"?"border-b-2":""}`,style:b==="current"?{color:"var(--ws-accent)",borderColor:"var(--ws-accent)"}:{color:"var(--ws-text-muted)"},children:["Current Trail",t&&e.jsx("span",{className:"ml-2 text-xs px-1.5 py-0.5 rounded",style:{background:"var(--ws-accent-subtle)",color:"var(--ws-accent)"},children:t.steps.length})]}),e.jsxs("button",{type:"button",onClick:()=>v("saved"),className:`flex-1 px-4 py-2 text-sm font-medium transition-colors ${b==="saved"?"border-b-2":""}`,style:b==="saved"?{color:"var(--ws-accent)",borderColor:"var(--ws-accent)"}:{color:"var(--ws-text-muted)"},children:["Saved Trails",s.length>0&&e.jsx("span",{className:"ml-2 text-xs px-1.5 py-0.5 rounded",style:{background:"var(--ws-surface-1)",color:"var(--ws-text-secondary)"},children:s.length})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:e.jsx(A,{mode:"wait",children:b==="current"?e.jsx(R.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},children:t?e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"space-y-2",children:x?e.jsx(Me,{node:x,depth:0,currentNodeId:c,onNavigate:k=>u(k.chunkKey.filePath,k.chunkKey.chunkIndex),onSetCurrent:k=>f?.(k)}):t.steps.map((k,S)=>e.jsx(As,{step:k,index:S,isLast:S===t.steps.length-1,onNavigate:()=>u(k.chunkKey.filePath,k.chunkKey.chunkIndex)},`${k.chunkKey.filePath}-${k.chunkKey.chunkIndex}-${S}`))}),e.jsxs("div",{className:"flex gap-2 pt-2 border-t",style:{borderColor:"var(--ws-border)"},children:[e.jsx("button",{type:"button",onClick:()=>g(!0),disabled:t.steps.length<2,className:"flex-1 px-3 py-2 text-sm font-medium rounded-lg disabled:opacity-50 disabled:cursor-not-allowed transition-colors",style:{background:"var(--ws-accent)",color:"white"},children:"Save Trail"}),e.jsx("button",{type:"button",onClick:i,className:"px-3 py-2 text-sm font-medium rounded-lg transition-colors",style:{color:"var(--ws-text-secondary)",background:"var(--ws-surface-1)"},children:"Clear"})]})]}):e.jsxs("div",{className:"text-center py-8",style:{color:"var(--ws-text-muted)"},children:[e.jsx(Ps,{}),e.jsx("p",{className:"mt-2",children:"No active trail"}),e.jsx("p",{className:"text-sm mt-1",children:"Navigate between documents to start recording"})]})},"current"):e.jsx(R.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},children:s.length>0?e.jsx("div",{className:"space-y-2",children:s.map(k=>e.jsx(Ks,{trail:k,onLoad:()=>{r(k.id),l()},onDelete:()=>a(k.id)},k.id))}):e.jsxs("div",{className:"text-center py-8",style:{color:"var(--ws-text-muted)"},children:[e.jsx(Hs,{}),e.jsx("p",{className:"mt-2",children:"No saved trails"}),e.jsx("p",{className:"text-sm mt-1",children:"Save your explorations to revisit later"})]})},"saved")})}),e.jsx(A,{children:m&&e.jsx(R.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 bg-black/30 flex items-center justify-center rounded-xl",children:e.jsxs(R.div,{initial:{scale:.9},animate:{scale:1},exit:{scale:.9},className:"rounded-lg p-4 m-4 shadow-lg",style:{background:"var(--ws-surface-raised)"},children:[e.jsx("h3",{className:"text-sm font-medium mb-3",style:{color:"var(--ws-text)"},children:"Save Trail"}),e.jsx("input",{type:"text",value:y,onChange:k=>h(k.target.value),placeholder:"Enter trail name...",className:"w-full px-3 py-2 border rounded-lg placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500",style:{borderColor:"var(--ws-border)",background:"var(--ws-surface-raised)",color:"var(--ws-text)"},onKeyDown:k=>{k.key==="Enter"&&w(),k.key==="Escape"&&g(!1)}}),e.jsxs("div",{className:"flex gap-2 mt-3",children:[e.jsx("button",{type:"button",onClick:w,disabled:!y.trim(),className:"flex-1 px-3 py-1.5 text-sm font-medium rounded-lg disabled:opacity-50 transition-colors",style:{background:"var(--ws-accent)",color:"white"},children:"Save"}),e.jsx("button",{type:"button",onClick:()=>g(!1),className:"px-3 py-1.5 text-sm font-medium rounded-lg transition-colors",style:{color:"var(--ws-text-secondary)",background:"var(--ws-surface-1)"},children:"Cancel"})]})]})})})]})}):null}function As({step:t,index:s,isLast:n,onNavigate:r}){const a=Oe(t.chunkKey.filePath);return e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center text-xs font-medium",style:n?{background:"var(--ws-accent)",color:"white"}:{background:"var(--ws-surface-2)",color:"var(--ws-text-secondary)"},children:s+1}),!n&&e.jsx("div",{className:"w-0.5 h-4",style:{background:"var(--ws-surface-2)"}})]}),e.jsxs("button",{type:"button",onClick:r,className:"flex-1 text-left p-2 rounded-lg transition-colors",children:[e.jsx("div",{className:"text-sm font-medium truncate",style:{color:"var(--ws-text)"},children:a}),e.jsxs("div",{className:"text-xs",style:{color:"var(--ws-text-muted)"},children:["Chunk #",t.chunkKey.chunkIndex,t.connectionReason&&e.jsxs("span",{className:"ml-2 italic",children:['via "',t.connectionReason,'"']})]})]})]})}function Ks({trail:t,onLoad:s,onDelete:n}){const[r,a]=o.useState(!1);return e.jsx("div",{className:"border rounded-lg p-3",style:{borderColor:"var(--ws-border)"},children:e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h4",{className:"text-sm font-medium truncate",style:{color:"var(--ws-text)"},children:t.name}),e.jsxs("p",{className:"text-xs mt-0.5",style:{color:"var(--ws-text-muted)"},children:[t.steps.length," steps · ",new Date(t.updatedAt).toLocaleDateString()]})]}),e.jsx("div",{className:"flex items-center gap-1",children:r?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:n,className:"px-2 py-1 text-xs font-medium text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-900/30 rounded hover:bg-red-100 dark:hover:bg-red-900/50 transition-colors",children:"Delete"}),e.jsx("button",{type:"button",onClick:()=>a(!1),className:"px-2 py-1 text-xs font-medium rounded transition-colors",style:{color:"var(--ws-text-secondary)",background:"var(--ws-surface-1)"},children:"Cancel"})]}):e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:s,className:"px-2 py-1 text-xs font-medium rounded transition-colors",style:{color:"var(--ws-accent)"},children:"Load"}),e.jsx("button",{type:"button",onClick:()=>a(!0),className:"px-2 py-1 text-xs font-medium rounded transition-colors",style:{color:"var(--ws-text-muted)"},children:"Delete"})]})})]})})}function Oe(t){const s=t.split(/[/\\]/);return s[s.length-1]||t}function Bs(){return e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}function Ps(){return e.jsx("svg",{className:"mx-auto h-10 w-10",style:{color:"var(--ws-text-muted)"},fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7"})})}function Hs(){return e.jsx("svg",{className:"mx-auto h-10 w-10",style:{color:"var(--ws-text-muted)"},fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z"})})}function Me({node:t,depth:s,currentNodeId:n,onNavigate:r,onSetCurrent:a}){const[i,u]=o.useState(!0),d=Oe(t.chunkKey.filePath),l=t.id===n,x=t.children.length>1;return e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[x?e.jsx("button",{type:"button",onClick:()=>u(!i),className:"mt-1 w-5 h-5 flex items-center justify-center",style:{color:"var(--ws-text-muted)"},children:i?e.jsx(Fs,{className:"w-4 h-4"}):e.jsx(Ws,{className:"w-4 h-4"})}):e.jsx("div",{className:"w-5"}),e.jsx("div",{className:"flex items-center justify-center min-w-[2rem] h-6 px-1.5 rounded text-xs font-medium",style:l?{background:"var(--ws-accent)",color:"white"}:{background:"var(--ws-surface-2)",color:"var(--ws-text-secondary)"},children:t.branchLabel||s+1}),e.jsxs("button",{type:"button",onClick:()=>{r(t),a(t.id)},className:"flex-1 text-left p-2 rounded-lg transition-colors",style:l?{background:"var(--ws-accent-subtle)",borderWidth:"1px",borderStyle:"solid",borderColor:"var(--ws-accent)"}:{},children:[e.jsx("div",{className:"text-sm font-medium truncate",style:{color:"var(--ws-text)"},children:d}),e.jsxs("div",{className:"text-xs",style:{color:"var(--ws-text-muted)"},children:["Chunk #",t.chunkKey.chunkIndex,t.connectionReason&&e.jsxs("span",{className:"ml-2 italic",children:['via "',t.connectionReason,'"']})]})]})]}),i&&t.children.length>0&&e.jsx("div",{className:"ml-6 mt-1 space-y-1 border-l-2 pl-2",style:{borderColor:"var(--ws-border)"},children:t.children.map(c=>e.jsx(Me,{node:c,depth:s+1,currentNodeId:n,onNavigate:r,onSetCurrent:a},c.id))})]})}function Fs({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})}function Ws({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}function zs(t){try{let s=t.replace(/-/g,"+").replace(/_/g,"/");const n=s.length%4;n>0&&(s+="=".repeat(4-n));const r=atob(s),a=JSON.parse(r);if(a.v!==1)return console.error("Unsupported trail version:",a.v),null;if(!a.vault||!Array.isArray(a.steps))return console.error("Invalid trail structure"),null;for(const i of a.steps)if(typeof i.p!="string"||typeof i.c!="number")return console.error("Invalid step structure: each step must have p (string) and c (number)"),null;return a}catch(s){return console.error("Failed to decode trail:",s),null}}function Vs(){const t=window.location.hash;return t.startsWith("#trail=")?t.slice(7):null}function Gs(t,s){const n=[],r=[];if(t.vault!==s.currentVaultId&&n.push(`This trail was created in a different vault (${t.vault}). Some steps may not be available.`),t.steps.length===0)return r.push("Trail has no steps"),{success:!1,warnings:n,errors:r};const i=[],u=[];for(const l of t.steps)if(!(!l.p||typeof l.c!="number")){if(s.checkFileExists&&!s.checkFileExists(l.p)){u.push(l.p);continue}i.push({chunkKey:{filePath:l.p,chunkIndex:l.c},visitedAt:new Date().toISOString()})}if(u.length>0){const l=[...new Set(u)];n.push(`${l.length} file(s) not found and will be skipped: ${l.slice(0,3).join(", ")}${l.length>3?"...":""}`)}return i.length===0?(r.push("No valid steps found in trail"),{success:!1,warnings:n,errors:r}):{success:!0,trail:{id:crypto.randomUUID(),name:"Imported Trail",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),steps:i},warnings:n,errors:r}}function Js(){const[t]=ut(),s=xt(),[n,r]=o.useState(!1),[a,i]=o.useState(!1),[u,d]=o.useState(null),l=t.get("path"),x=t.get("chunk"),c=x?Number.parseInt(x,10):void 0,{pinnedChunkKeys:f,togglePin:m}=dt(),{currentTrail:g,savedTrails:y,addStep:h,saveTrail:b,loadTrail:v,deleteTrail:w,clearCurrentTrail:k}=bt();o.useEffect(()=>{const T=Vs();if(!T)return;const N=zs(T);if(!N)return;const D=Gs(N,{currentVaultId:"default"});d({decoded:N,validation:D}),i(!0),window.history.replaceState(null,"",window.location.pathname+window.location.search)},[]);const S=o.useCallback((T,N)=>{const D=new URLSearchParams({path:T});N!==void 0&&D.set("chunk",String(N)),s(`/read?${D.toString()}`),h({filePath:T,chunkIndex:N??0})},[s,h]),E=o.useCallback(()=>{s("/")},[s]),K=o.useCallback((T,N)=>{!l||c===void 0||m({filePath:l,chunkIndex:c},{filePath:T,chunkIndex:N},"","",void 0)},[l,c,m]),H=o.useCallback(()=>{r(!0)},[]),B=o.useCallback(()=>{if(!u?.validation.trail)return;const T=u.validation.trail;if(T.steps.length>0){const N=T.steps[0];if(N){for(const D of T.steps)h(D.chunkKey);s(`/read?path=${encodeURIComponent(N.chunkKey.filePath)}&chunk=${N.chunkKey.chunkIndex}`)}}i(!1),d(null)},[u,h,s]),W=o.useCallback(()=>{i(!1),d(null)},[]);return l?e.jsxs("div",{className:"h-[calc(100vh-4rem)]",children:[e.jsx($s,{filePath:l,initialChunkIndex:c,onNavigate:S,onGoHome:E,pinnedChunkKeys:f,onTogglePin:K,onSaveTrail:H}),e.jsx(Es,{currentTrail:g,savedTrails:y,onSaveTrail:b,onLoadTrail:T=>{const N=v(T);if(N&&N.steps.length>0){const D=N.steps[0];D&&S(D.chunkKey.filePath,D.chunkKey.chunkIndex)}},onDeleteTrail:w,onClearCurrentTrail:k,onNavigateToStep:S,isOpen:n,onClose:()=>r(!1)}),e.jsx(A,{children:a&&u&&e.jsx(R.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:W,children:e.jsxs(R.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},className:"rounded-xl shadow-xl max-w-md w-full mx-4 p-6",style:{background:"var(--ws-surface-raised)"},onClick:T=>T.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"p-2 rounded-lg",style:{background:"var(--ws-accent-subtle)"},children:e.jsx("span",{style:{color:"var(--ws-accent)"},children:e.jsx(Us,{className:"w-5 h-5"})})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold",style:{color:"var(--ws-text)"},children:"Import Shared Trail"}),e.jsxs("p",{className:"text-sm",style:{color:"var(--ws-text-muted)"},children:[u.decoded.steps.length," steps"]})]})]}),u.validation.warnings.length>0&&e.jsx("div",{className:"mb-4 p-3 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-700 rounded-lg",children:e.jsx("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:u.validation.warnings[0]})}),u.validation.errors.length>0&&e.jsx("div",{className:"mb-4 p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-700 rounded-lg",children:e.jsx("p",{className:"text-sm text-red-700 dark:text-red-300",children:u.validation.errors[0]})}),u.validation.success&&u.validation.trail&&e.jsxs("div",{className:"mb-4 max-h-48 overflow-y-auto",children:[e.jsx("p",{className:"text-xs font-medium mb-2",style:{color:"var(--ws-text-muted)"},children:"Trail steps:"}),e.jsxs("div",{className:"space-y-1",children:[u.validation.trail.steps.slice(0,5).map((T,N)=>e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsxs("span",{className:"w-4",style:{color:"var(--ws-text-muted)"},children:[N+1,"."]}),e.jsx("span",{className:"truncate",style:{color:"var(--ws-text-secondary)"},children:T.chunkKey.filePath.split("/").pop()}),e.jsxs("span",{className:"text-xs",style:{color:"var(--ws-text-muted)"},children:["#",T.chunkKey.chunkIndex]})]},`${T.chunkKey.filePath}::${T.chunkKey.chunkIndex}`)),u.validation.trail.steps.length>5&&e.jsxs("p",{className:"text-xs pl-6",style:{color:"var(--ws-text-muted)"},children:["+",u.validation.trail.steps.length-5," more steps"]})]})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:W,className:"px-4 py-2 text-sm rounded-lg transition-colors",style:{color:"var(--ws-text-secondary)",background:"var(--ws-surface-1)"},children:"Cancel"}),u.validation.success&&e.jsx("button",{type:"button",onClick:B,className:"px-4 py-2 text-sm rounded-lg transition-colors",style:{background:"var(--ws-accent)",color:"white"},children:"Import & Navigate"})]})]})})})]}):e.jsx("div",{className:"max-w-4xl mx-auto py-12",children:e.jsxs("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-700 rounded-lg p-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-yellow-800 dark:text-yellow-200 mb-2",children:"No document selected"}),e.jsx("p",{className:"text-yellow-700 dark:text-yellow-300 mb-4",children:"Please select a document from the search results or files page to read."}),e.jsx("button",{type:"button",onClick:E,className:"px-4 py-2 bg-yellow-600 text-white rounded-lg hover:bg-yellow-700 transition-colors",children:"Go to Search"})]})})}function Us({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"})})}export{Js as ReaderPage};
@@ -1 +0,0 @@
1
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}:root{--ws-bg:#0f1117;--ws-surface-1:#161922;--ws-surface-2:#1c1f2b;--ws-surface-3:#242836;--ws-surface-raised:#2a2e3d;--ws-border:#2a2e3d;--ws-border-subtle:#1e2230;--ws-border-strong:#3a3f52;--ws-text:#e2e4ea;--ws-text-secondary:#a0a4b4;--ws-text-muted:#6b7084;--ws-text-faint:#4a4f62;--ws-accent:#e8863a;--ws-accent-hover:#f09a52;--ws-accent-muted:#e8863a26;--ws-accent-subtle:#e8863a14;--ws-accent-text:#f0a060;--ws-success:#34d399;--ws-success-muted:#34d39926;--ws-warning:#fbbf24;--ws-warning-muted:#fbbf2426;--ws-danger:#f87171;--ws-danger-muted:#f8717126;--ws-info:#60a5fa;--ws-info-muted:#60a5fa26;--ws-link-explicit:#60a5fa;--ws-link-semantic:#a78bfa;--ws-link-backlink:#818cf8;--ws-link-unresolved:#f87171;--ws-link-mention:#34d399;--ws-focus-ring:var(--ws-accent);--ws-focus-ring-offset:var(--ws-bg);--ws-radius-xs:3px;--ws-radius-sm:5px;--ws-radius-md:8px;--ws-radius-lg:12px;--ws-radius-xl:16px;--ws-shadow-sm:0 1px 2px #0000004d;--ws-shadow-md:0 2px 8px #00000059;--ws-shadow-lg:0 4px 16px #0006;--ws-shadow-xl:0 8px 32px #00000080;--ws-shadow-popover:0 4px 24px #00000080,0 0 0 1px #ffffff0d;--ws-space-1:4px;--ws-space-2:8px;--ws-space-3:12px;--ws-space-4:16px;--ws-space-5:20px;--ws-space-6:24px;--ws-space-7:28px;--ws-space-8:32px;--ws-space-9:36px;--ws-space-10:40px;--ws-space-11:44px;--ws-space-12:48px;--ws-font-ui:"DM Sans",system-ui,-apple-system,sans-serif;--ws-font-mono:"JetBrains Mono","Fira Code",ui-monospace,monospace;--ws-font-reader:Georgia,"Palatino Linotype","Book Antiqua",Palatino,serif;--ws-text-xs:.6875rem;--ws-text-sm:.8125rem;--ws-text-base:.875rem;--ws-text-md:.9375rem;--ws-text-lg:1.0625rem;--ws-text-xl:1.25rem;--ws-text-2xl:1.5rem;--ws-leading-tight:1.3;--ws-leading-normal:1.5;--ws-leading-relaxed:1.7;--ws-transition-fast:.1s ease;--ws-transition-base:.15s ease;--ws-transition-slow:.25s ease;--ws-left-rail-width:220px;--ws-left-rail-min:180px;--ws-left-rail-max:320px;--ws-left-rail-collapsed:52px;--ws-right-rail-width:300px;--ws-right-rail-min:240px;--ws-right-rail-max:420px;--ws-tab-bar-height:36px;--ws-header-height:40px}.light,:root:not(.dark){--ws-bg:#f0ece6;--ws-surface-1:#f7f4ef;--ws-surface-2:#fdfcfa;--ws-surface-3:#fff;--ws-surface-raised:#fff;--ws-border:#d8d3ca;--ws-border-subtle:#e6e2db;--ws-border-strong:#c0b9ae;--ws-text:#1e1b16;--ws-text-secondary:#52504a;--ws-text-muted:#8a8780;--ws-text-faint:#b0ada6;--ws-accent:#c06820;--ws-accent-hover:#a85a18;--ws-accent-muted:#c068201f;--ws-accent-subtle:#c068200f;--ws-accent-text:#9a5518;--ws-success:#16a364;--ws-success-muted:#16a3641a;--ws-warning:#d97706;--ws-warning-muted:#d977061a;--ws-danger:#dc2626;--ws-danger-muted:#dc26261a;--ws-info:#2563eb;--ws-info-muted:#2563eb1a;--ws-link-explicit:#2563eb;--ws-link-semantic:#7c3aed;--ws-link-backlink:#6366f1;--ws-link-unresolved:#dc2626;--ws-link-mention:#16a364;--ws-shadow-sm:0 1px 2px #0000000f;--ws-shadow-md:0 2px 8px #00000014;--ws-shadow-lg:0 4px 16px #0000001a;--ws-shadow-xl:0 8px 32px #0000001f;--ws-shadow-popover:0 4px 24px #0000001f,0 0 0 1px #0000000d}.ws-button{justify-content:center;align-items:center;gap:var(--ws-space-2);border-radius:var(--ws-radius-md);font-family:var(--ws-font-ui);cursor:pointer;transition:background var(--ws-transition-fast),color var(--ws-transition-fast),border-color var(--ws-transition-fast),box-shadow var(--ws-transition-fast);white-space:nowrap;border:1px solid #0000;outline:none;font-weight:500;display:inline-flex}.ws-button:focus-visible{box-shadow:0 0 0 2px var(--ws-focus-ring-offset),0 0 0 4px var(--ws-focus-ring)}.ws-button:disabled{opacity:.4;cursor:not-allowed}.ws-button[data-size=sm]{font-size:var(--ws-text-xs);padding:var(--ws-space-1)var(--ws-space-2);height:28px}.ws-button[data-size=md]{font-size:var(--ws-text-sm);padding:var(--ws-space-1)var(--ws-space-3);height:32px}.ws-button[data-size=lg]{font-size:var(--ws-text-base);padding:var(--ws-space-2)var(--ws-space-4);height:38px}.ws-button[data-variant=default]{background:var(--ws-surface-2);color:var(--ws-text-secondary);border-color:var(--ws-border)}.ws-button[data-variant=default]:hover:not(:disabled){background:var(--ws-surface-3);color:var(--ws-text);border-color:var(--ws-border-strong)}.ws-button[data-variant=primary]{background:var(--ws-accent);color:#fff}.ws-button[data-variant=primary]:hover:not(:disabled){background:var(--ws-accent-hover)}.ws-button[data-variant=ghost]{color:var(--ws-text-secondary);background:0 0}.ws-button[data-variant=ghost]:hover:not(:disabled){background:var(--ws-accent-subtle);color:var(--ws-text)}.ws-button[data-variant=danger]{background:var(--ws-danger-muted);color:var(--ws-danger);border-color:#0000}.ws-button[data-variant=danger]:hover:not(:disabled){background:var(--ws-danger);color:#fff}.ws-input{width:100%;height:32px;padding:var(--ws-space-1)var(--ws-space-3);font-family:var(--ws-font-ui);font-size:var(--ws-text-sm);color:var(--ws-text);background:var(--ws-surface-1);border:1px solid var(--ws-border);border-radius:var(--ws-radius-md);transition:border-color var(--ws-transition-fast),box-shadow var(--ws-transition-fast);outline:none}.ws-input::placeholder{color:var(--ws-text-faint)}.ws-input:focus{border-color:var(--ws-accent);box-shadow:0 0 0 2px var(--ws-focus-ring-offset),0 0 0 4px var(--ws-focus-ring)}.ws-input[data-error]{border-color:var(--ws-danger)}.ws-input:disabled{opacity:.4;cursor:not-allowed}.ws-badge{align-items:center;gap:var(--ws-space-1);font-family:var(--ws-font-ui);font-size:var(--ws-text-xs);padding:2px var(--ws-space-2);border-radius:var(--ws-radius-sm);font-weight:500;line-height:var(--ws-leading-tight);white-space:nowrap;display:inline-flex}.ws-badge[data-variant=default]{background:var(--ws-surface-3);color:var(--ws-text-secondary)}.ws-badge[data-variant=accent]{background:var(--ws-accent-muted);color:var(--ws-accent-text)}.ws-badge[data-variant=success]{background:var(--ws-success-muted);color:var(--ws-success)}.ws-badge[data-variant=warning]{background:var(--ws-warning-muted);color:var(--ws-warning)}.ws-badge[data-variant=danger]{background:var(--ws-danger-muted);color:var(--ws-danger)}.ws-badge[data-variant=info]{background:var(--ws-info-muted);color:var(--ws-info)}.ws-badge[data-variant=link-explicit]{color:var(--ws-link-explicit);background:#60a5fa26}.ws-badge[data-variant=link-semantic]{color:var(--ws-link-semantic);background:#a78bfa26}.ws-badge[data-variant=link-backlink]{color:var(--ws-link-backlink);background:#818cf826}.ws-badge[data-variant=link-unresolved]{background:var(--ws-danger-muted);color:var(--ws-link-unresolved)}.ws-badge-count{background:var(--ws-accent);color:#fff;border-radius:99px;justify-content:center;align-items:center;min-width:16px;height:16px;font-size:10px;font-weight:600;display:inline-flex}.ws-tabs{scrollbar-width:none;align-items:center;gap:0;display:flex;overflow-x:auto}.ws-tabs::-webkit-scrollbar{display:none}.ws-tab{align-items:center;gap:var(--ws-space-1);padding:var(--ws-space-2)var(--ws-space-3);font-family:var(--ws-font-ui);font-size:var(--ws-text-sm);color:var(--ws-text-muted);cursor:pointer;white-space:nowrap;transition:color var(--ws-transition-fast),background var(--ws-transition-fast);background:0 0;border:none;outline:none;font-weight:500;display:inline-flex;position:relative}.ws-tab:hover{color:var(--ws-text)}.ws-tab[aria-selected=true]{color:var(--ws-accent-text)}.ws-tab:focus-visible{box-shadow:inset 0 0 0 2px var(--ws-focus-ring);border-radius:var(--ws-radius-sm)}.ws-tabs--underline{border-bottom:1px solid var(--ws-border-subtle)}.ws-tabs--underline .ws-tab[aria-selected=true]:after{content:"";bottom:-1px;left:var(--ws-space-3);right:var(--ws-space-3);background:var(--ws-accent);border-radius:1px;height:2px;position:absolute}.ws-tabs--pill{gap:var(--ws-space-1);padding:var(--ws-space-1)}.ws-tabs--pill .ws-tab{border-radius:var(--ws-radius-sm)}.ws-tabs--pill .ws-tab[aria-selected=true]{background:var(--ws-accent-muted);color:var(--ws-accent-text)}.ws-tab-icon{align-items:center;display:flex}.ws-tab-badge{background:var(--ws-accent-muted);min-width:16px;height:16px;color:var(--ws-accent-text);border-radius:99px;justify-content:center;align-items:center;font-size:10px;font-weight:600;display:inline-flex}.ws-tab-close{width:16px;height:16px;color:var(--ws-text-faint);border-radius:var(--ws-radius-xs);cursor:pointer;justify-content:center;align-items:center;font-size:11px;display:inline-flex}.ws-tab-close:hover{background:var(--ws-danger-muted);color:var(--ws-danger)}.ws-select{height:32px;padding:var(--ws-space-1)var(--ws-space-3);padding-right:var(--ws-space-8);font-family:var(--ws-font-ui);font-size:var(--ws-text-sm);color:var(--ws-text);background:var(--ws-surface-1);border:1px solid var(--ws-border);border-radius:var(--ws-radius-md);cursor:pointer;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7084' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");background-position:right 8px center;background-repeat:no-repeat;outline:none}.ws-select:focus{border-color:var(--ws-accent);box-shadow:0 0 0 2px var(--ws-focus-ring-offset),0 0 0 4px var(--ws-focus-ring)}.ws-card{background:var(--ws-surface-2);border:1px solid var(--ws-border);border-radius:var(--ws-radius-lg)}.ws-card[data-padding=sm]>.ws-card-body{padding:var(--ws-space-3)}.ws-card[data-padding=md]>.ws-card-body{padding:var(--ws-space-4)}.ws-card[data-padding=lg]>.ws-card-body{padding:var(--ws-space-6)}.ws-card-header{justify-content:space-between;align-items:flex-start;gap:var(--ws-space-4);padding:var(--ws-space-4);border-bottom:1px solid var(--ws-border-subtle);display:flex}.ws-card-title{font-size:var(--ws-text-md);color:var(--ws-text);font-weight:600}.ws-card-subtitle{font-size:var(--ws-text-sm);color:var(--ws-text-muted);margin-top:2px}.ws-card-actions{align-items:center;gap:var(--ws-space-2);display:flex}.ws-tooltip-anchor{display:inline-flex;position:relative}.ws-tooltip{z-index:9999;padding:var(--ws-space-1)var(--ws-space-2);font-family:var(--ws-font-ui);font-size:var(--ws-text-xs);color:var(--ws-text);background:var(--ws-surface-raised);border:1px solid var(--ws-border);border-radius:var(--ws-radius-sm);box-shadow:var(--ws-shadow-md);white-space:nowrap;pointer-events:none;animation:.1s ws-tooltip-in;position:absolute}.ws-tooltip--top{bottom:calc(100% + 6px);left:50%;transform:translate(-50%)}.ws-tooltip--bottom{top:calc(100% + 6px);left:50%;transform:translate(-50%)}.ws-tooltip--left{top:50%;right:calc(100% + 6px);transform:translateY(-50%)}.ws-tooltip--right{top:50%;left:calc(100% + 6px);transform:translateY(-50%)}@keyframes ws-tooltip-in{0%{opacity:0}to{opacity:1}}.ws-panel{background:var(--ws-surface-1);flex-direction:column;height:100%;display:flex;overflow:hidden}.ws-panel-header{padding:var(--ws-space-3)var(--ws-space-4);border-bottom:1px solid var(--ws-border-subtle);flex-shrink:0}.ws-panel-body{flex:1;overflow-y:auto}.ws-panel-footer{padding:var(--ws-space-3)var(--ws-space-4);border-top:1px solid var(--ws-border-subtle);flex-shrink:0}.ws-shell{background:var(--ws-bg);width:100vw;height:100vh;color:var(--ws-text);font-family:var(--ws-font-ui);display:flex;overflow:hidden}.ws-left-rail{background:var(--ws-surface-1);border-right:1px solid var(--ws-border-subtle);transition:width var(--ws-transition-slow);flex-direction:column;flex-shrink:0;display:flex;overflow:hidden}.ws-left-rail-nav{padding:var(--ws-space-2);flex-direction:column;gap:2px;display:flex}.ws-nav-item{align-items:center;gap:var(--ws-space-2);padding:var(--ws-space-2)var(--ws-space-3);border-radius:var(--ws-radius-md);font-size:var(--ws-text-sm);color:var(--ws-text-secondary);transition:background var(--ws-transition-fast),color var(--ws-transition-fast);font-weight:500;text-decoration:none;display:flex}.ws-nav-item:hover{background:var(--ws-surface-2);color:var(--ws-text)}.ws-nav-item--active{font-weight:600;background:var(--ws-accent-muted)!important;color:var(--ws-accent-text)!important}.ws-nav-item--collapsed{padding:var(--ws-space-2);justify-content:center}.ws-nav-icon{width:20px;height:20px;font-size:var(--ws-text-xs);color:inherit;opacity:.7;justify-content:center;align-items:center;font-weight:700;display:flex}.ws-nav-item--active .ws-nav-icon{opacity:1}.ws-left-rail-footer{padding:var(--ws-space-3);border-top:1px solid var(--ws-border-subtle)}.ws-db-indicator{align-items:center;gap:var(--ws-space-2);font-size:var(--ws-text-xs);color:var(--ws-text-muted);display:flex}.ws-db-dot{background:var(--ws-success);border-radius:50%;flex-shrink:0;width:6px;height:6px}.ws-db-name{color:var(--ws-text-secondary);font-weight:500}.ws-db-count{color:var(--ws-text-faint)}.ws-rail-toggle{height:32px;margin:var(--ws-space-2);border-radius:var(--ws-radius-sm);background:var(--ws-surface-2);border:1px solid var(--ws-border-subtle);color:var(--ws-text-muted);font-size:var(--ws-text-lg);cursor:pointer;transition:background var(--ws-transition-fast);justify-content:center;align-items:center;display:flex}.ws-rail-toggle:hover{background:var(--ws-surface-3);color:var(--ws-text)}.ws-resize-handle{cursor:col-resize;width:4px;transition:background var(--ws-transition-fast);z-index:10;background:0 0;flex-shrink:0;position:relative}.ws-resize-handle:hover,.ws-resize-handle:active{background:var(--ws-accent-muted)}.ws-resize-handle:after{content:"";position:absolute;inset:0 -3px}.ws-center-pane{flex-direction:column;flex:1;min-width:0;display:flex;overflow:hidden}.ws-tab-bar{height:var(--ws-tab-bar-height);background:var(--ws-surface-1);border-bottom:1px solid var(--ws-border-subtle);padding:0 var(--ws-space-2);flex-shrink:0;align-items:center;display:flex}.ws-center-content{padding:var(--ws-space-6);flex:1;overflow-y:auto}.ws-right-rail{background:var(--ws-surface-1);border-left:1px solid var(--ws-border-subtle);flex-direction:column;flex-shrink:0;display:flex;overflow:hidden}.ws-right-rail--collapsed{width:36px;padding-top:var(--ws-space-2);align-items:center}.ws-right-rail-header{padding:var(--ws-space-1)var(--ws-space-2);border-bottom:1px solid var(--ws-border-subtle);flex-shrink:0;justify-content:space-between;align-items:center;display:flex}.ws-right-rail-tabs{flex:1;overflow-x:auto}.ws-right-rail-content{flex:1;overflow-y:auto}@media(max-width:1024px){.ws-right-rail:not(.ws-right-rail--collapsed){z-index:50;box-shadow:var(--ws-shadow-xl);position:fixed;top:0;bottom:0;right:0}}@media(max-width:768px){.ws-left-rail{width:var(--ws-left-rail-collapsed)!important}.ws-nav-item{padding:var(--ws-space-2);justify-content:center}.ws-nav-label{display:none}}.ws-page{color:var(--ws-text)}.ws-page-title{font-size:var(--ws-text-xl);color:var(--ws-text);font-weight:600}.ws-page-subtitle{font-size:var(--ws-text-sm);color:var(--ws-text-muted);margin-top:4px}.ws-surface{background:var(--ws-surface-2);border:1px solid var(--ws-border);border-radius:var(--ws-radius-lg)}.ws-error-box{background:var(--ws-danger-muted);border:1px solid var(--ws-danger);border-radius:var(--ws-radius-md);padding:var(--ws-space-4);color:var(--ws-danger)}.ws-success-box{background:var(--ws-success-muted);border:1px solid var(--ws-success);border-radius:var(--ws-radius-md);padding:var(--ws-space-4);color:var(--ws-success)}.ws-info-box{background:var(--ws-info-muted);border:1px solid var(--ws-info);border-radius:var(--ws-radius-md);padding:var(--ws-space-4);color:var(--ws-info)}.ws-rail-list{flex-direction:column;display:flex}.ws-rail-item{padding:var(--ws-space-3)var(--ws-space-4);border-bottom:1px solid var(--ws-border-subtle);cursor:pointer;text-align:left;color:var(--ws-text);font-family:var(--ws-font-ui);transition:background var(--ws-transition-fast);background:0 0;border-top:none;border-left:none;border-right:none;flex-direction:column;gap:2px;width:100%;display:flex}.ws-rail-item:hover{background:var(--ws-surface-2)}.ws-rail-item-title{font-size:var(--ws-text-sm);color:var(--ws-text);font-weight:500}.ws-rail-item-meta{font-size:var(--ws-text-xs);color:var(--ws-text-muted)}.ws-rail-item-label{font-size:var(--ws-text-xs);color:var(--ws-accent-text)}.ws-rail-item-excerpt{font-size:var(--ws-text-xs);color:var(--ws-text-secondary);line-height:var(--ws-leading-normal);-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:0;display:-webkit-box;overflow:hidden}.ws-rail-empty{padding:var(--ws-space-6);text-align:center;color:var(--ws-text-faint);font-size:var(--ws-text-sm)}.ws-rail-loading{padding:var(--ws-space-6);text-align:center;color:var(--ws-text-muted);font-size:var(--ws-text-sm)}.ws-rail-empty-state{padding:var(--ws-space-8);text-align:center;color:var(--ws-text-faint);font-size:var(--ws-text-sm)}.ws-link-popover{z-index:100;background:var(--ws-surface-raised);border:1px solid var(--ws-border);border-radius:var(--ws-radius-lg);box-shadow:var(--ws-shadow-xl);padding:var(--ws-space-3);max-width:320px;font-family:var(--ws-font-ui);position:fixed}.ws-link-popover-header{align-items:center;gap:var(--ws-space-2);margin-bottom:var(--ws-space-2);display:flex}.ws-link-popover-status{border-radius:50%;flex-shrink:0;width:8px;height:8px}.ws-link-popover-status--resolved{background:var(--ws-link-explicit)}.ws-link-popover-status--unresolved{background:var(--ws-link-unresolved)}.ws-link-popover-title{font-size:var(--ws-text-sm);color:var(--ws-text);font-weight:600}.ws-link-popover-heading{font-size:var(--ws-text-xs);color:var(--ws-text-muted)}.ws-link-popover-preview{font-size:var(--ws-text-xs);color:var(--ws-text-secondary);line-height:var(--ws-leading-normal);margin:0 0 var(--ws-space-2)0;-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.ws-link-popover-actions{gap:var(--ws-space-2);border-top:1px solid var(--ws-border-subtle);padding-top:var(--ws-space-2);display:flex}.ws-link-popover-action{font-size:var(--ws-text-xs);color:var(--ws-accent);cursor:pointer;padding:var(--ws-space-1)var(--ws-space-2);border-radius:var(--ws-radius-sm);font-weight:500;font-family:var(--ws-font-ui);background:0 0;border:none}.ws-link-popover-action:hover{background:var(--ws-accent-subtle)}.ws-hover-preview{z-index:100;background:var(--ws-surface-2);border:1px solid var(--ws-border-strong);border-radius:var(--ws-radius-lg);box-shadow:var(--ws-shadow-popover);padding:var(--ws-space-4);min-width:280px;max-width:400px;font-family:var(--ws-font-ui);opacity:1;transition:opacity .15s,transform .15s;position:fixed;transform:translateY(0)}.ws-hover-preview--entering{opacity:0;transform:translateY(4px)}.ws-hover-preview-title{font-size:var(--ws-text-sm);color:var(--ws-text);font-weight:600;line-height:var(--ws-leading-tight);margin-bottom:var(--ws-space-2)}.ws-hover-preview-excerpt{font-size:var(--ws-text-xs);color:var(--ws-text-secondary);line-height:var(--ws-leading-normal);margin:0 0 var(--ws-space-3)0;-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.ws-hover-preview-meta{align-items:center;gap:var(--ws-space-2);margin-bottom:var(--ws-space-3);display:flex}.ws-hover-preview-actions{justify-content:space-between;align-items:center;gap:var(--ws-space-2);border-top:1px solid var(--ws-border-subtle);padding-top:var(--ws-space-3);display:flex}.ws-hover-preview-secondary-actions{align-items:center;gap:var(--ws-space-1);display:flex}.ws-toast-container{bottom:var(--ws-space-4);right:var(--ws-space-4);z-index:50;gap:var(--ws-space-2);flex-direction:column;max-width:24rem;display:flex;position:fixed}.ws-toast{align-items:flex-start;gap:var(--ws-space-3);padding:var(--ws-space-4);border-radius:var(--ws-radius-lg);box-shadow:var(--ws-shadow-lg);border:1px solid;animation:.2s forwards ws-toast-in;display:flex}@keyframes ws-toast-in{0%{opacity:0;transform:translate(100px)scale(.9)}to{opacity:1;transform:translate(0)scale(1)}}.ws-toast--exiting{animation:.2s forwards ws-toast-out}@keyframes ws-toast-out{0%{opacity:1;transform:translate(0)scale(1)}to{opacity:0;transform:translate(100px)scale(.9)}}.ws-toast--success{background:#22c55e}@supports (color:color-mix(in lab,red,red)){.ws-toast--success{background:color-mix(in srgb,#22c55e 10%,var(--ws-surface-1))}}.ws-toast--success{border-color:#22c55e}@supports (color:color-mix(in lab,red,red)){.ws-toast--success{border-color:color-mix(in srgb,#22c55e 25%,var(--ws-border))}}.ws-toast--error{background:#ef4444}@supports (color:color-mix(in lab,red,red)){.ws-toast--error{background:color-mix(in srgb,#ef4444 10%,var(--ws-surface-1))}}.ws-toast--error{border-color:#ef4444}@supports (color:color-mix(in lab,red,red)){.ws-toast--error{border-color:color-mix(in srgb,#ef4444 25%,var(--ws-border))}}.ws-toast--info{background:#3b82f6}@supports (color:color-mix(in lab,red,red)){.ws-toast--info{background:color-mix(in srgb,#3b82f6 10%,var(--ws-surface-1))}}.ws-toast--info{border-color:#3b82f6}@supports (color:color-mix(in lab,red,red)){.ws-toast--info{border-color:color-mix(in srgb,#3b82f6 25%,var(--ws-border))}}.ws-toast-icon{flex-shrink:0}.ws-toast-icon--success{color:#22c55e}.ws-toast-icon--error{color:#ef4444}.ws-toast-icon--info{color:#3b82f6}.ws-toast-content{flex:1;min-width:0}.ws-toast-title{font-size:var(--ws-text-sm);color:var(--ws-text);font-weight:500}.ws-toast-message{margin-top:var(--ws-space-1);font-size:var(--ws-text-sm);color:var(--ws-text-secondary)}.ws-toast-close{color:var(--ws-text-muted);cursor:pointer;transition:color var(--ws-transition-fast);background:0 0;border:none;flex-shrink:0;padding:0}.ws-toast-close:hover{color:var(--ws-text)}.ws-autocomplete{z-index:100;background:var(--ws-surface-raised);border:1px solid var(--ws-border);border-radius:var(--ws-radius-md);box-shadow:var(--ws-shadow-lg);min-width:200px;max-width:400px;max-height:240px;position:fixed;overflow-y:auto}.ws-autocomplete-item{padding:var(--ws-space-2)var(--ws-space-3);text-align:left;border:none;border-bottom:1px solid var(--ws-border-subtle);cursor:pointer;width:100%;font-family:var(--ws-font-ui);color:var(--ws-text);transition:background var(--ws-transition-fast);background:0 0;flex-direction:column;gap:1px;display:flex}.ws-autocomplete-item:last-child{border-bottom:none}.ws-autocomplete-item:hover,.ws-autocomplete-item--selected{background:var(--ws-accent-subtle)}.ws-autocomplete-title{font-size:var(--ws-text-sm);font-weight:500}.ws-autocomplete-path{font-size:var(--ws-text-xs);color:var(--ws-text-muted)}.ws-command-palette-backdrop{z-index:200;background:#00000080;animation:.1s ws-palette-backdrop-in;position:fixed;inset:0}@keyframes ws-palette-backdrop-in{0%{opacity:0}to{opacity:1}}.ws-command-palette{z-index:201;width:520px;max-width:calc(100vw - var(--ws-space-8));background:var(--ws-surface-2);border:1px solid var(--ws-border);border-radius:var(--ws-radius-xl);max-height:480px;box-shadow:var(--ws-shadow-xl);flex-direction:column;animation:.15s ws-palette-in;display:flex;position:fixed;top:20%;left:50%;overflow:hidden;transform:translate(-50%)}@keyframes ws-palette-in{0%{opacity:0;transform:translate(-50%)translateY(-8px)scale(.98)}to{opacity:1;transform:translate(-50%)translateY(0)scale(1)}}.ws-command-palette-input{border:none;border-bottom:1px solid var(--ws-border-subtle);height:44px;padding:var(--ws-space-3)var(--ws-space-4);font-size:var(--ws-text-base);background:var(--ws-surface-2);border-radius:0;flex-shrink:0}.ws-command-palette-input:focus{box-shadow:none;border-color:var(--ws-border-subtle)}.ws-command-palette-results{padding:var(--ws-space-2)0;flex:1;overflow-y:auto}.ws-command-palette-empty{padding:var(--ws-space-8);text-align:center;color:var(--ws-text-faint);font-size:var(--ws-text-sm)}.ws-command-palette-group{padding-bottom:var(--ws-space-1)}.ws-command-palette-category{padding:var(--ws-space-2)var(--ws-space-4)var(--ws-space-1);font-size:var(--ws-text-xs);color:var(--ws-text-muted);text-transform:uppercase;letter-spacing:.04em;font-weight:600}.ws-command-palette-item{align-items:center;gap:var(--ws-space-3);width:100%;padding:var(--ws-space-2)var(--ws-space-4);color:var(--ws-text);font-family:var(--ws-font-ui);font-size:var(--ws-text-sm);cursor:pointer;text-align:left;transition:background var(--ws-transition-fast);background:0 0;border:none;display:flex}.ws-command-palette-item:hover,.ws-command-palette-item--selected{background:var(--ws-accent-subtle)}.ws-command-palette-item--selected{background:var(--ws-accent-muted)}.ws-command-palette-item-icon{width:24px;height:24px;font-size:var(--ws-text-xs);color:var(--ws-text-muted);background:var(--ws-surface-3);border-radius:var(--ws-radius-sm);flex-shrink:0;justify-content:center;align-items:center;font-weight:700;display:flex}.ws-command-palette-item-content{flex-direction:column;gap:1px;min-width:0;display:flex}.ws-command-palette-item-label{color:var(--ws-text);white-space:nowrap;text-overflow:ellipsis;font-weight:500;overflow:hidden}.ws-command-palette-item-description{font-size:var(--ws-text-xs);color:var(--ws-text-muted);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.ws-command-palette-footer{align-items:center;gap:var(--ws-space-4);padding:var(--ws-space-2)var(--ws-space-4);border-top:1px solid var(--ws-border-subtle);background:var(--ws-surface-1);flex-shrink:0;display:flex}.ws-command-palette-hint{align-items:center;gap:var(--ws-space-1);font-size:var(--ws-text-xs);color:var(--ws-text-faint);display:inline-flex}.ws-command-palette-hint kbd{min-width:18px;height:18px;padding:0 var(--ws-space-1);font-family:var(--ws-font-ui);color:var(--ws-text-muted);background:var(--ws-surface-3);border:1px solid var(--ws-border);border-radius:var(--ws-radius-xs);justify-content:center;align-items:center;font-size:10px;font-weight:600;display:inline-flex}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-serif:ui-serif,Georgia,Cambria,"Times New Roman",Times,serif;--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-700:oklch(55.3% .195 38.402);--color-orange-800:oklch(47% .157 37.304);--color-orange-900:oklch(40.8% .123 38.172);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-800:oklch(44.8% .119 151.328);--color-green-900:oklch(39.3% .095 152.535);--color-emerald-500:oklch(69.6% .17 162.48);--color-cyan-50:oklch(98.4% .019 200.873);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-600:oklch(60.9% .126 221.723);--color-cyan-700:oklch(52% .105 223.128);--color-cyan-900:oklch(39.8% .07 227.392);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-violet-600:oklch(54.1% .281 293.009);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-200:oklch(90.2% .063 306.703);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-purple-800:oklch(43.8% .218 303.724);--color-purple-900:oklch(38.1% .176 304.987);--color-pink-100:oklch(94.8% .028 342.258);--color-pink-200:oklch(89.9% .061 343.231);--color-pink-300:oklch(82.3% .12 346.018);--color-pink-400:oklch(71.8% .202 349.761);--color-pink-700:oklch(52.5% .223 3.958);--color-pink-800:oklch(45.9% .187 3.815);--color-pink-900:oklch(40.8% .153 2.432);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-stone-200:oklch(92.3% .003 48.717);--color-stone-300:oklch(86.9% .005 56.366);--color-stone-400:oklch(70.9% .01 56.259);--color-stone-500:oklch(55.3% .013 58.071);--color-stone-600:oklch(44.4% .011 73.639);--color-stone-700:oklch(37.4% .01 67.558);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-2{top:calc(var(--spacing)*2)}.top-5{top:calc(var(--spacing)*5)}.top-16{top:calc(var(--spacing)*16)}.top-full{top:100%}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-full{bottom:100%}.-left-1{left:calc(var(--spacing)*-1)}.left-0{left:calc(var(--spacing)*0)}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-4{margin:calc(var(--spacing)*4)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-4{margin-inline:calc(var(--spacing)*4)}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-6{margin-top:calc(var(--spacing)*6)}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-4{margin-right:calc(var(--spacing)*4)}.-mb-px{margin-bottom:-1px}.mb-0\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.ml-0\.5{margin-left:calc(var(--spacing)*.5)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-3{margin-left:calc(var(--spacing)*3)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-6{margin-left:calc(var(--spacing)*6)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-3{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-4{-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-2{height:calc(var(--spacing)*2)}.h-2\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-16{height:calc(var(--spacing)*16)}.h-32{height:calc(var(--spacing)*32)}.h-64{height:calc(var(--spacing)*64)}.h-\[calc\(100vh-4rem\)\]{height:calc(100vh - 4rem)}.h-full{height:100%}.max-h-32{max-height:calc(var(--spacing)*32)}.max-h-48{max-height:calc(var(--spacing)*48)}.max-h-64{max-height:calc(var(--spacing)*64)}.max-h-72{max-height:calc(var(--spacing)*72)}.max-h-\[80vh\]{max-height:80vh}.max-h-\[85vh\]{max-height:85vh}.min-h-\[300px\]{min-height:300px}.min-h-screen{min-height:100vh}.w-0\.5{width:calc(var(--spacing)*.5)}.w-2{width:calc(var(--spacing)*2)}.w-2\.5{width:calc(var(--spacing)*2.5)}.w-2\/3{width:66.6667%}.w-3{width:calc(var(--spacing)*3)}.w-3\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-4\/5{width:80%}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-10{width:calc(var(--spacing)*10)}.w-11{width:calc(var(--spacing)*11)}.w-12{width:calc(var(--spacing)*12)}.w-16{width:calc(var(--spacing)*16)}.w-24{width:calc(var(--spacing)*24)}.w-32{width:calc(var(--spacing)*32)}.w-56{width:calc(var(--spacing)*56)}.w-60{width:calc(var(--spacing)*60)}.w-72{width:calc(var(--spacing)*72)}.w-80{width:calc(var(--spacing)*80)}.w-\[40\%\]{width:40%}.w-\[60\%\]{width:60%}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-32{max-width:calc(var(--spacing)*32)}.max-w-\[100px\]{max-width:100px}.max-w-\[150px\]{max-width:150px}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\[2rem\]{min-width:2rem}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-1{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-6{--tw-translate-x:calc(var(--spacing)*6);translate:var(--tw-translate-x)var(--tw-translate-y)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-grab{cursor:grab}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-100{border-color:var(--color-amber-100)}.border-amber-200{border-color:var(--color-amber-200)}.border-blue-200{border-color:var(--color-blue-200)}.border-gray-200{border-color:var(--color-gray-200)}.border-green-200{border-color:var(--color-green-200)}.border-orange-200{border-color:var(--color-orange-200)}.border-pink-200{border-color:var(--color-pink-200)}.border-purple-200{border-color:var(--color-purple-200)}.border-red-200{border-color:var(--color-red-200)}.border-stone-200\/50{border-color:#e7e5e480}@supports (color:color-mix(in lab,red,red)){.border-stone-200\/50{border-color:color-mix(in oklab,var(--color-stone-200)50%,transparent)}}.border-transparent{border-color:#0000}.border-yellow-200{border-color:var(--color-yellow-200)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-100\/60{background-color:#fef3c699}@supports (color:color-mix(in lab,red,red)){.bg-amber-100\/60{background-color:color-mix(in oklab,var(--color-amber-100)60%,transparent)}}.bg-amber-500\/60{background-color:#f99c0099}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/60{background-color:color-mix(in oklab,var(--color-amber-500)60%,transparent)}}.bg-amber-600{background-color:var(--color-amber-600)}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\/30{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-200{background-color:var(--color-blue-200)}.bg-blue-300{background-color:var(--color-blue-300)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-cyan-50{background-color:var(--color-cyan-50)}.bg-cyan-600{background-color:var(--color-cyan-600)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-200{background-color:var(--color-green-200)}.bg-green-300{background-color:var(--color-green-300)}.bg-green-500{background-color:var(--color-green-500)}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-200{background-color:var(--color-orange-200)}.bg-pink-100{background-color:var(--color-pink-100)}.bg-pink-200{background-color:var(--color-pink-200)}.bg-pink-300{background-color:var(--color-pink-300)}.bg-purple-50{background-color:var(--color-purple-50)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-purple-200{background-color:var(--color-purple-200)}.bg-purple-300{background-color:var(--color-purple-300)}.bg-purple-600{background-color:var(--color-purple-600)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-600{background-color:var(--color-red-600)}.bg-stone-200{background-color:var(--color-stone-200)}.bg-stone-200\/50{background-color:#e7e5e480}@supports (color:color-mix(in lab,red,red)){.bg-stone-200\/50{background-color:color-mix(in oklab,var(--color-stone-200)50%,transparent)}}.bg-stone-300{background-color:var(--color-stone-300)}.bg-transparent{background-color:#0000}.bg-violet-500{background-color:var(--color-violet-500)}.bg-white{background-color:var(--color-white)}.bg-yellow-50{background-color:var(--color-yellow-50)}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-yellow-200{background-color:var(--color-yellow-200)}.bg-yellow-300{background-color:var(--color-yellow-300)}.bg-yellow-600{background-color:var(--color-yellow-600)}.p-0{padding:calc(var(--spacing)*0)}.p-0\.5{padding:calc(var(--spacing)*.5)}.p-1{padding:calc(var(--spacing)*1)}.p-1\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-0\.5{padding-inline:calc(var(--spacing)*.5)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.py-8{padding-block:calc(var(--spacing)*8)}.py-12{padding-block:calc(var(--spacing)*12)}.pt-1\.5{padding-top:calc(var(--spacing)*1.5)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pr-3{padding-right:calc(var(--spacing)*3)}.pr-4{padding-right:calc(var(--spacing)*4)}.pr-10{padding-right:calc(var(--spacing)*10)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-6{padding-left:calc(var(--spacing)*6)}.pl-8{padding-left:calc(var(--spacing)*8)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-serif{font-family:var(--font-serif)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-current{color:currentColor}.text-cyan-600{color:var(--color-cyan-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-green-800{color:var(--color-green-800)}.text-orange-700{color:var(--color-orange-700)}.text-pink-700{color:var(--color-pink-700)}.text-purple-500{color:var(--color-purple-500)}.text-purple-600{color:var(--color-purple-600)}.text-purple-700{color:var(--color-purple-700)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-stone-300{color:var(--color-stone-300)}.text-stone-400{color:var(--color-stone-400)}.text-stone-500{color:var(--color-stone-500)}.text-stone-600{color:var(--color-stone-600)}.text-stone-700{color:var(--color-stone-700)}.text-violet-500{color:var(--color-violet-500)}.text-violet-600{color:var(--color-violet-600)}.text-white{color:var(--color-white)}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-700{color:var(--color-yellow-700)}.text-yellow-800{color:var(--color-yellow-800)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.decoration-orange-500{-webkit-text-decoration-color:var(--color-orange-500);text-decoration-color:var(--color-orange-500)}.decoration-purple-200\/40{text-decoration-color:#e9d5ff66}@supports (color:color-mix(in lab,red,red)){.decoration-purple-200\/40{-webkit-text-decoration-color:color-mix(in oklab,var(--color-purple-200)40%,transparent);text-decoration-color:color-mix(in oklab,var(--color-purple-200)40%,transparent)}}.decoration-purple-300\/50{text-decoration-color:#d9b3ff80}@supports (color:color-mix(in lab,red,red)){.decoration-purple-300\/50{-webkit-text-decoration-color:color-mix(in oklab,var(--color-purple-300)50%,transparent);text-decoration-color:color-mix(in oklab,var(--color-purple-300)50%,transparent)}}.decoration-purple-400\/60{text-decoration-color:#c07eff99}@supports (color:color-mix(in lab,red,red)){.decoration-purple-400\/60{-webkit-text-decoration-color:color-mix(in oklab,var(--color-purple-400)60%,transparent);text-decoration-color:color-mix(in oklab,var(--color-purple-400)60%,transparent)}}.decoration-purple-500\/80{text-decoration-color:#ac4bffcc}@supports (color:color-mix(in lab,red,red)){.decoration-purple-500\/80{-webkit-text-decoration-color:color-mix(in oklab,var(--color-purple-500)80%,transparent);text-decoration-color:color-mix(in oklab,var(--color-purple-500)80%,transparent)}}.decoration-dotted{text-decoration-style:dotted}.decoration-1{text-decoration-thickness:1px}.decoration-2{text-decoration-thickness:2px}.decoration-\[1\.5px\]{text-decoration-thickness:1.5px}.underline-offset-2{text-underline-offset:2px}.placeholder-gray-400::placeholder{color:var(--color-gray-400)}.accent-cyan-600{accent-color:var(--color-cyan-600)}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-amber-500{--tw-ring-color:var(--color-amber-500)}.ring-blue-400{--tw-ring-color:var(--color-blue-400)}.ring-blue-500{--tw-ring-color:var(--color-blue-500)}.ring-green-400{--tw-ring-color:var(--color-green-400)}.ring-orange-500{--tw-ring-color:var(--color-orange-500)}.ring-pink-400{--tw-ring-color:var(--color-pink-400)}.ring-purple-400{--tw-ring-color:var(--color-purple-400)}.ring-yellow-400{--tw-ring-color:var(--color-yellow-400)}.ring-offset-1{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ring-offset-white{--tw-ring-offset-color:var(--color-white)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a))drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a)drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition\!{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events!important;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))!important;transition-duration:var(--tw-duration,var(--default-transition-duration))!important}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}.hover\:bg-amber-100:hover{background-color:var(--color-amber-100)}.hover\:bg-amber-700:hover{background-color:var(--color-amber-700)}.hover\:bg-black\/10:hover{background-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-black\/10:hover{background-color:color-mix(in oklab,var(--color-black)10%,transparent)}}.hover\:bg-blue-100:hover{background-color:var(--color-blue-100)}.hover\:bg-blue-300:hover{background-color:var(--color-blue-300)}.hover\:bg-cyan-700:hover{background-color:var(--color-cyan-700)}.hover\:bg-green-50:hover{background-color:var(--color-green-50)}.hover\:bg-green-300:hover{background-color:var(--color-green-300)}.hover\:bg-pink-300:hover{background-color:var(--color-pink-300)}.hover\:bg-purple-50:hover{background-color:var(--color-purple-50)}.hover\:bg-purple-100:hover{background-color:var(--color-purple-100)}.hover\:bg-purple-300:hover{background-color:var(--color-purple-300)}.hover\:bg-purple-700:hover{background-color:var(--color-purple-700)}.hover\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\:bg-red-100:hover{background-color:var(--color-red-100)}.hover\:bg-red-700:hover{background-color:var(--color-red-700)}.hover\:bg-yellow-300:hover{background-color:var(--color-yellow-300)}.hover\:bg-yellow-700:hover{background-color:var(--color-yellow-700)}.hover\:text-amber-500:hover{color:var(--color-amber-500)}.hover\:text-red-500:hover{color:var(--color-red-500)}.hover\:text-red-600:hover{color:var(--color-red-600)}.hover\:text-red-700:hover{color:var(--color-red-700)}.hover\:text-stone-600:hover{color:var(--color-stone-600)}.hover\:underline:hover{text-decoration-line:underline}.hover\:decoration-purple-600:hover{-webkit-text-decoration-color:var(--color-purple-600);text-decoration-color:var(--color-purple-600)}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:ring-2:hover{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\:border-transparent:focus{border-color:#0000}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-amber-400:focus{--tw-ring-color:var(--color-amber-400)}.focus\:ring-amber-500:focus{--tw-ring-color:var(--color-amber-500)}.focus\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\:ring-purple-500:focus{--tw-ring-color:var(--color-purple-500)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\:cursor-grabbing:active{cursor:grabbing}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\:inline{display:inline}.sm\:flex-row{flex-direction:row}}@media(min-width:48rem){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(prefers-color-scheme:dark){.dark\:border-amber-700{border-color:var(--color-amber-700)}.dark\:border-amber-800\/30{border-color:#953d004d}@supports (color:color-mix(in lab,red,red)){.dark\:border-amber-800\/30{border-color:color-mix(in oklab,var(--color-amber-800)30%,transparent)}}.dark\:border-blue-700{border-color:var(--color-blue-700)}.dark\:border-blue-800{border-color:var(--color-blue-800)}.dark\:border-gray-600{border-color:var(--color-gray-600)}.dark\:border-green-800{border-color:var(--color-green-800)}.dark\:border-orange-800{border-color:var(--color-orange-800)}.dark\:border-pink-800{border-color:var(--color-pink-800)}.dark\:border-purple-700{border-color:var(--color-purple-700)}.dark\:border-purple-800{border-color:var(--color-purple-800)}.dark\:border-red-700{border-color:var(--color-red-700)}.dark\:border-red-800{border-color:var(--color-red-800)}.dark\:border-stone-700\/50{border-color:#44403b80}@supports (color:color-mix(in lab,red,red)){.dark\:border-stone-700\/50{border-color:color-mix(in oklab,var(--color-stone-700)50%,transparent)}}.dark\:border-yellow-700{border-color:var(--color-yellow-700)}.dark\:border-yellow-800{border-color:var(--color-yellow-800)}.dark\:bg-amber-600\/50{background-color:#dd740080}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-600\/50{background-color:color-mix(in oklab,var(--color-amber-600)50%,transparent)}}.dark\:bg-amber-900\/20{background-color:#7b330633}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-900\/20{background-color:color-mix(in oklab,var(--color-amber-900)20%,transparent)}}.dark\:bg-amber-900\/30{background-color:#7b33064d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-900\/30{background-color:color-mix(in oklab,var(--color-amber-900)30%,transparent)}}.dark\:bg-blue-800\/60{background-color:#193cb899}@supports (color:color-mix(in lab,red,red)){.dark\:bg-blue-800\/60{background-color:color-mix(in oklab,var(--color-blue-800)60%,transparent)}}.dark\:bg-blue-900\/20{background-color:#1c398e33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-blue-900\/20{background-color:color-mix(in oklab,var(--color-blue-900)20%,transparent)}}.dark\:bg-blue-900\/30{background-color:#1c398e4d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-blue-900\/30{background-color:color-mix(in oklab,var(--color-blue-900)30%,transparent)}}.dark\:bg-blue-900\/40{background-color:#1c398e66}@supports (color:color-mix(in lab,red,red)){.dark\:bg-blue-900\/40{background-color:color-mix(in oklab,var(--color-blue-900)40%,transparent)}}.dark\:bg-cyan-900\/30{background-color:#104e644d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-cyan-900\/30{background-color:color-mix(in oklab,var(--color-cyan-900)30%,transparent)}}.dark\:bg-gray-700{background-color:var(--color-gray-700)}.dark\:bg-green-800\/60{background-color:#01663099}@supports (color:color-mix(in lab,red,red)){.dark\:bg-green-800\/60{background-color:color-mix(in oklab,var(--color-green-800)60%,transparent)}}.dark\:bg-green-900\/30{background-color:#0d542b4d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-green-900\/30{background-color:color-mix(in oklab,var(--color-green-900)30%,transparent)}}.dark\:bg-green-900\/40{background-color:#0d542b66}@supports (color:color-mix(in lab,red,red)){.dark\:bg-green-900\/40{background-color:color-mix(in oklab,var(--color-green-900)40%,transparent)}}.dark\:bg-orange-800\/60{background-color:#9f2d0099}@supports (color:color-mix(in lab,red,red)){.dark\:bg-orange-800\/60{background-color:color-mix(in oklab,var(--color-orange-800)60%,transparent)}}.dark\:bg-orange-900\/30{background-color:#7e2a0c4d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-orange-900\/30{background-color:color-mix(in oklab,var(--color-orange-900)30%,transparent)}}.dark\:bg-orange-900\/40{background-color:#7e2a0c66}@supports (color:color-mix(in lab,red,red)){.dark\:bg-orange-900\/40{background-color:color-mix(in oklab,var(--color-orange-900)40%,transparent)}}.dark\:bg-pink-800\/60{background-color:#a2004c99}@supports (color:color-mix(in lab,red,red)){.dark\:bg-pink-800\/60{background-color:color-mix(in oklab,var(--color-pink-800)60%,transparent)}}.dark\:bg-pink-900\/40{background-color:#86104366}@supports (color:color-mix(in lab,red,red)){.dark\:bg-pink-900\/40{background-color:color-mix(in oklab,var(--color-pink-900)40%,transparent)}}.dark\:bg-purple-800\/60{background-color:#6e11b099}@supports (color:color-mix(in lab,red,red)){.dark\:bg-purple-800\/60{background-color:color-mix(in oklab,var(--color-purple-800)60%,transparent)}}.dark\:bg-purple-900\/30{background-color:#59168b4d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-purple-900\/30{background-color:color-mix(in oklab,var(--color-purple-900)30%,transparent)}}.dark\:bg-purple-900\/40{background-color:#59168b66}@supports (color:color-mix(in lab,red,red)){.dark\:bg-purple-900\/40{background-color:color-mix(in oklab,var(--color-purple-900)40%,transparent)}}.dark\:bg-red-900\/20{background-color:#82181a33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-red-900\/20{background-color:color-mix(in oklab,var(--color-red-900)20%,transparent)}}.dark\:bg-red-900\/30{background-color:#82181a4d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-red-900\/30{background-color:color-mix(in oklab,var(--color-red-900)30%,transparent)}}.dark\:bg-red-900\/40{background-color:#82181a66}@supports (color:color-mix(in lab,red,red)){.dark\:bg-red-900\/40{background-color:color-mix(in oklab,var(--color-red-900)40%,transparent)}}.dark\:bg-stone-600{background-color:var(--color-stone-600)}.dark\:bg-stone-700{background-color:var(--color-stone-700)}.dark\:bg-stone-700\/50{background-color:#44403b80}@supports (color:color-mix(in lab,red,red)){.dark\:bg-stone-700\/50{background-color:color-mix(in oklab,var(--color-stone-700)50%,transparent)}}.dark\:bg-yellow-800\/60{background-color:#874b0099}@supports (color:color-mix(in lab,red,red)){.dark\:bg-yellow-800\/60{background-color:color-mix(in oklab,var(--color-yellow-800)60%,transparent)}}.dark\:bg-yellow-900\/20{background-color:#733e0a33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-yellow-900\/20{background-color:color-mix(in oklab,var(--color-yellow-900)20%,transparent)}}.dark\:bg-yellow-900\/40{background-color:#733e0a66}@supports (color:color-mix(in lab,red,red)){.dark\:bg-yellow-900\/40{background-color:color-mix(in oklab,var(--color-yellow-900)40%,transparent)}}.dark\:text-amber-200{color:var(--color-amber-200)}.dark\:text-amber-300{color:var(--color-amber-300)}.dark\:text-amber-400{color:var(--color-amber-400)}.dark\:text-amber-500{color:var(--color-amber-500)}.dark\:text-blue-300{color:var(--color-blue-300)}.dark\:text-blue-400{color:var(--color-blue-400)}.dark\:text-cyan-400{color:var(--color-cyan-400)}.dark\:text-gray-300{color:var(--color-gray-300)}.dark\:text-green-300{color:var(--color-green-300)}.dark\:text-green-400{color:var(--color-green-400)}.dark\:text-orange-300{color:var(--color-orange-300)}.dark\:text-pink-300{color:var(--color-pink-300)}.dark\:text-purple-300{color:var(--color-purple-300)}.dark\:text-purple-400{color:var(--color-purple-400)}.dark\:text-red-300{color:var(--color-red-300)}.dark\:text-red-400{color:var(--color-red-400)}.dark\:text-stone-300{color:var(--color-stone-300)}.dark\:text-stone-400{color:var(--color-stone-400)}.dark\:text-stone-500{color:var(--color-stone-500)}.dark\:text-stone-600{color:var(--color-stone-600)}.dark\:text-violet-400{color:var(--color-violet-400)}.dark\:text-yellow-200{color:var(--color-yellow-200)}.dark\:text-yellow-300{color:var(--color-yellow-300)}.dark\:decoration-orange-400{-webkit-text-decoration-color:var(--color-orange-400);text-decoration-color:var(--color-orange-400)}.dark\:ring-amber-400{--tw-ring-color:var(--color-amber-400)}.dark\:ring-orange-400{--tw-ring-color:var(--color-orange-400)}@media(hover:hover){.dark\:hover\:bg-amber-900\/50:hover{background-color:#7b330680}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-amber-900\/50:hover{background-color:color-mix(in oklab,var(--color-amber-900)50%,transparent)}}.dark\:hover\:bg-blue-700\/60:hover{background-color:#1447e699}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-blue-700\/60:hover{background-color:color-mix(in oklab,var(--color-blue-700)60%,transparent)}}.dark\:hover\:bg-blue-900\/40:hover{background-color:#1c398e66}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-blue-900\/40:hover{background-color:color-mix(in oklab,var(--color-blue-900)40%,transparent)}}.dark\:hover\:bg-blue-900\/50:hover{background-color:#1c398e80}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-blue-900\/50:hover{background-color:color-mix(in oklab,var(--color-blue-900)50%,transparent)}}.dark\:hover\:bg-green-700\/60:hover{background-color:#00813899}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-green-700\/60:hover{background-color:color-mix(in oklab,var(--color-green-700)60%,transparent)}}.dark\:hover\:bg-pink-700\/60:hover{background-color:#c4005c99}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-pink-700\/60:hover{background-color:color-mix(in oklab,var(--color-pink-700)60%,transparent)}}.dark\:hover\:bg-purple-700\/60:hover{background-color:#8200da99}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-purple-700\/60:hover{background-color:color-mix(in oklab,var(--color-purple-700)60%,transparent)}}.dark\:hover\:bg-purple-900\/20:hover{background-color:#59168b33}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-purple-900\/20:hover{background-color:color-mix(in oklab,var(--color-purple-900)20%,transparent)}}.dark\:hover\:bg-purple-900\/50:hover{background-color:#59168b80}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-purple-900\/50:hover{background-color:color-mix(in oklab,var(--color-purple-900)50%,transparent)}}.dark\:hover\:bg-red-900\/20:hover{background-color:#82181a33}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-red-900\/20:hover{background-color:color-mix(in oklab,var(--color-red-900)20%,transparent)}}.dark\:hover\:bg-red-900\/30:hover{background-color:#82181a4d}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-red-900\/30:hover{background-color:color-mix(in oklab,var(--color-red-900)30%,transparent)}}.dark\:hover\:bg-red-900\/50:hover{background-color:#82181a80}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-red-900\/50:hover{background-color:color-mix(in oklab,var(--color-red-900)50%,transparent)}}.dark\:hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-white\/10:hover{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.dark\:hover\:bg-yellow-700\/60:hover{background-color:#a3610099}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-yellow-700\/60:hover{background-color:color-mix(in oklab,var(--color-yellow-700)60%,transparent)}}.dark\:hover\:text-amber-400:hover{color:var(--color-amber-400)}.dark\:hover\:text-red-300:hover{color:var(--color-red-300)}.dark\:hover\:text-red-400:hover{color:var(--color-red-400)}.dark\:hover\:text-stone-200:hover{color:var(--color-stone-200)}}.dark\:focus\:ring-amber-600:focus{--tw-ring-color:var(--color-amber-600)}}}:root{--toast-enter-duration:.3s;--toast-exit-duration:.2s}body{background-color:var(--ws-bg);color:var(--ws-text);font-family:var(--ws-font-ui);font-size:var(--ws-text-base);line-height:var(--ws-leading-normal);transition:background-color var(--ws-transition-slow),color var(--ws-transition-slow)}.dark ::-webkit-scrollbar{width:8px;height:8px}.dark ::-webkit-scrollbar-track{background-color:var(--ws-surface-1)}.dark ::-webkit-scrollbar-thumb{background-color:var(--ws-border-strong);border-radius:var(--ws-radius-sm)}.dark ::-webkit-scrollbar-thumb:hover{background-color:var(--ws-text-muted)}@keyframes slideInRight{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}@keyframes slideOutRight{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(100%)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes scaleIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.zettel-paper{background:linear-gradient(#fffdf0,#fcfaeb)}.dark .zettel-paper{background:linear-gradient(#292524,#1c1917)}.zettel-margin{background:linear-gradient(#fefdfb,#faf8f3)}.dark .zettel-margin{background:linear-gradient(#1c1917,#171412)}.zettel-slip{border-radius:var(--radius-lg);padding:calc(var(--spacing)*3);background:linear-gradient(#fffdf0,#fcfaeb);transition:transform .2s,box-shadow .2s;transform:rotate(-.3deg);box-shadow:0 1px 3px #00000014,0 4px 6px #0000000d}.dark .zettel-slip{background:linear-gradient(#292524,#1c1917);box-shadow:0 1px 3px #0000004d,0 4px 6px #0003}.zettel-slip:hover{transform:rotate(0)translateY(-2px);box-shadow:0 4px 8px #0000001f,0 8px 16px #00000014}.dark .zettel-slip:hover{box-shadow:0 4px 8px #0006,0 8px 16px #0000004d}.zettel-backlink{border-left:3px solid #3b82f6}.zettel-forward{border-left:3px solid #10b981}.zettel-semantic{border-left:3px solid #8b5cf6}.zettel-header{border-bottom-style:var(--tw-border-style);padding-inline:calc(var(--spacing)*4);padding-block:calc(var(--spacing)*3);background:linear-gradient(90deg,#faf8f3,#fefdfb);border-color:#78716c33;border-bottom-width:1px}.dark .zettel-header{background:linear-gradient(90deg,#1c1917,#292524);border-color:#57534e4d}.zettel-selection-pill{padding-inline:calc(var(--spacing)*2);padding-block:calc(var(--spacing)*1);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:#7c3aed;background:#8b5cf61a;border:1px solid #8b5cf633;border-radius:3.40282e38px}.dark .zettel-selection-pill{color:#a78bfa;background:#8b5cf633;border-color:#8b5cf64d}.zettel-searching{align-items:center;gap:calc(var(--spacing)*2);border-radius:var(--radius-lg);padding-inline:calc(var(--spacing)*3);padding-block:calc(var(--spacing)*2);background:#8b5cf60d;border:1px dashed #8b5cf64d;display:flex}.dark .zettel-searching{background:#8b5cf61a;border-color:#8b5cf666}.book-reader{background:linear-gradient(#faf8f5,#f5f2ed);min-height:100%}.dark .book-reader{background:linear-gradient(#1a1815,#141210)}.book-page{background:linear-gradient(#fffcf7,#faf7f2);border-radius:4px;position:relative;box-shadow:0 1px 3px #0000000d,0 4px 12px #00000008,inset 0 0 60px #fffaf080}.dark .book-page{background:linear-gradient(#1e1b18,#1a1714);box-shadow:0 1px 3px #0000004d,0 4px 12px #0003,inset 0 0 60px #1e191480}.book-page:before{content:"";pointer-events:none;background:linear-gradient(90deg,#00000008,#0000);width:20px;position:absolute;top:0;bottom:0;left:0}.dark .book-page:before{background:linear-gradient(90deg,#00000026,#0000)}.book-text{color:#2c2416;letter-spacing:.01em;font-family:Georgia,Palatino Linotype,Book Antiqua,Palatino,serif;line-height:1.8}.dark .book-text{color:#d4cfc5}.book-chunk-active{background:linear-gradient(90deg,#b48c5014,#b48c5008 20%,#0000);border-left:3px solid #b4a060}.dark .book-chunk-active{background:linear-gradient(90deg,#b48c501f,#b48c500d 20%,#0000);border-left:3px solid #9a8650}.book-header{background:linear-gradient(#f5f2ed,#ebe7e0);border-bottom:1px solid #b4a0824d}.dark .book-header{background:linear-gradient(#1e1b18,#171412);border-bottom:1px solid #645a464d}.book-title{color:#3d3425;font-family:Georgia,Palatino Linotype,serif;font-weight:600}.dark .book-title{color:#c9c2b5}.book-link{color:#6b5b3d;cursor:pointer;border-bottom:1px dotted #b4a080;text-decoration:none;transition:all .15s}.book-link:hover{color:#4a3f2a;background:#b4a0801a;border-bottom-color:#8b7355}.dark .book-link{color:#b8a988;border-bottom-color:#7a6b50}.dark .book-link:hover{color:#d4c9b0;background:#b4a08026;border-bottom-color:#9a8b70}.book-chunk-badge{color:#9a8a70;background:#b4a08226;border-radius:3px;padding:2px 6px;font-family:Georgia,serif;font-size:.7rem}.dark .book-chunk-badge{color:#8a7a60;background:#78644633}.book-progress{background:linear-gradient(90deg,#b4a060,#d4c090);height:2px;transition:width .3s}.dark .book-progress{background:linear-gradient(90deg,#8a7040,#a48850)}.book-paragraph{text-indent:1.5em;margin-bottom:.5em}.book-paragraph:first-of-type{text-indent:0}.book-dropcap:first-letter{float:left;color:#5a4a30;margin-top:.1em;margin-right:.1em;font-size:3.2em;line-height:.8}.dark .book-dropcap:first-letter{color:#a09080}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}