md-annotator 0.5.7 → 0.5.8

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.
@@ -401,7 +401,7 @@ ${o.text}
401
401
  \`\`\`
402
402
 
403
403
  `)}),s}async function CDe(t){try{return await navigator.clipboard.writeText(t),!0}catch{const e=document.createElement("textarea");return e.value=t,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e),!0}}function bse(t,e){const r=URL.createObjectURL(t),n=document.createElement("a");n.href=r,n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r)}function ADe(t,e="annotations.md"){bse(new Blob([t],{type:"text/markdown"}),e)}function RDe(t,e,r){return{version:1,filePath:e,contentHash:r,exportedAt:new Date().toISOString(),annotations:t.map(n=>{const a={id:n.id,blockId:n.blockId,startOffset:n.startOffset,endOffset:n.endOffset,type:n.type,text:n.text,originalText:n.originalText,createdAt:n.createdAt,startMeta:n.startMeta,endMeta:n.endMeta};return n.targetType&&(a.targetType=n.targetType),n.imageAlt!==void 0&&(a.imageAlt=n.imageAlt),n.imageSrc!==void 0&&(a.imageSrc=n.imageSrc),n.afterContext!==void 0&&(a.afterContext=n.afterContext),a})}}function wDe(t,e="annotations.json"){bse(new Blob([JSON.stringify(t,null,2)],{type:"application/json"}),e)}const NDe=["id","blockId","startOffset","endOffset","type","originalText"];function ODe(t){if(!t||typeof t!="object")return{valid:!1,error:"Invalid JSON format"};if(t.version!==1)return{valid:!1,error:`Unsupported version: ${t.version}`};if(!Array.isArray(t.annotations))return{valid:!1,error:"Missing annotations array"};if(t.annotations.length>1e4)return{valid:!1,error:"Too many annotations (max 10,000)"};for(const e of t.annotations){for(const a of NDe)if(e[a]===void 0)return{valid:!1,error:`Annotation missing required field: ${a}`};if(typeof e.id!="string"||typeof e.blockId!="string")return{valid:!1,error:"Annotation id and blockId must be strings"};if(typeof e.startOffset!="number"||typeof e.endOffset!="number")return{valid:!1,error:"Annotation offsets must be numbers"};if(e.startOffset<0||e.endOffset<0||e.endOffset<e.startOffset)return{valid:!1,error:"Invalid annotation offset values"};if(e.type!=="DELETION"&&e.type!=="COMMENT"&&e.type!=="INSERTION")return{valid:!1,error:`Invalid annotation type: ${e.type}`};if(typeof e.originalText!="string")return{valid:!1,error:"Annotation originalText must be a string"};if(e.text!==null&&e.text!==void 0&&typeof e.text!="string")return{valid:!1,error:"Annotation text must be a string or null"};if(e.targetType&&e.targetType!=="image"&&e.targetType!=="diagram"&&e.targetType!=="global")return{valid:!1,error:`Invalid annotation targetType: ${e.targetType}`};const r=e.targetType==="image"||e.targetType==="diagram"||e.targetType==="global",n=e.type==="INSERTION";if(!r&&!n){if(!e.startMeta||typeof e.startMeta!="object")return{valid:!1,error:"Annotation startMeta must be an object"};if(!e.endMeta||typeof e.endMeta!="object")return{valid:!1,error:"Annotation endMeta must be an object"}}}return{valid:!0,error:null,annotations:t.annotations,filePath:t.filePath||null,contentHash:t.contentHash||null}}const IDe=()=>fe.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[fe.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),fe.jsx("path",{d:"M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"})]}),DDe=()=>fe.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[fe.jsx("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"}),fe.jsx("polyline",{points:"7 10 12 15 17 10"}),fe.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),kDe=()=>fe.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[fe.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),fe.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),LDe=()=>fe.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:fe.jsx("polyline",{points:"6 9 12 15 18 9"})});function CH({isOpen:t,onClose:e,annotations:r,blocks:n,filePath:a,contentHash:i,onToast:s}){const[o,l]=nt.useState(""),[u,d]=nt.useState(!1);if(nt.useEffect(()=>{t&&l(xDe(r,n,a))},[t,r,n,a]),nt.useEffect(()=>{const v=y=>{y.key==="Escape"&&e()};if(t)return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[t,e]),nt.useEffect(()=>{t||d(!1)},[t]),!t)return null;const h=async()=>{await CDe(o),s==null||s("Copied to clipboard")},f=()=>{const v=a?`${a.split("/").pop().replace(".md","")}-annotations.md`:"annotations.md";ADe(o,v),s==null||s("Downloaded as Markdown")},p=()=>{const v=RDe(r,a,i),y=a?`${a.split("/").pop().replace(".md","")}-annotations.json`:"annotations.json";wDe(v,y),s==null||s("Downloaded as JSON")},m=v=>{v.target===v.currentTarget&&e()};return fe.jsx("div",{className:"modal-backdrop",onClick:m,children:fe.jsxs("div",{className:"modal",children:[fe.jsxs("div",{className:"modal-header",children:[fe.jsx("h2",{children:"Export Annotations"}),fe.jsx("button",{className:"modal-close",onClick:e,title:"Close",children:fe.jsx(kDe,{})})]}),fe.jsx("div",{className:"modal-body",children:fe.jsx("pre",{className:"modal-preview",children:o})}),fe.jsxs("div",{className:"modal-footer",children:[fe.jsx("button",{className:"btn",onClick:e,children:"Cancel"}),fe.jsxs("button",{className:"btn btn-export",onClick:h,children:[fe.jsx(IDe,{}),"Copy"]}),fe.jsxs("div",{className:"dropdown",children:[fe.jsxs("button",{className:"btn btn-export",onClick:()=>d(v=>!v),children:[fe.jsx(DDe,{}),"Download",fe.jsx(LDe,{})]}),u&&fe.jsxs("div",{className:"dropdown-menu",children:[fe.jsxs("button",{className:"dropdown-item",onClick:()=>{f(),d(!1)},children:[fe.jsx("span",{className:"dropdown-item-label",children:"Markdown"}),fe.jsx("span",{className:"dropdown-item-hint",children:"For sharing and reading"})]}),fe.jsxs("button",{className:"dropdown-item",onClick:()=>{p(),d(!1)},children:[fe.jsx("span",{className:"dropdown-item-label",children:"JSON"}),fe.jsx("span",{className:"dropdown-item-hint",children:"For re-importing later"})]})]})]})]})]})})}const MDe=()=>fe.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[fe.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),fe.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]});function PDe({isOpen:t,onClose:e,notesGroups:r,totalFiles:n}){const a=nt.useRef(null),i=nt.useRef(null);if(nt.useEffect(()=>{var u;const l=d=>{d.key==="Escape"&&e()};if(t)return i.current=document.activeElement,document.addEventListener("keydown",l),(u=a.current)==null||u.focus(),()=>{var d,h;document.removeEventListener("keydown",l),(h=(d=i.current)==null?void 0:d.focus)==null||h.call(d)}},[t,e]),!t)return null;const s=l=>{l.target===l.currentTarget&&e()},o=n>1;return fe.jsx("div",{className:"modal-backdrop",onClick:s,children:fe.jsxs("div",{ref:a,tabIndex:-1,className:"modal notes-modal",role:"dialog","aria-modal":"true","aria-labelledby":"notes-modal-title",children:[fe.jsxs("div",{className:"modal-header",children:[fe.jsx("h2",{id:"notes-modal-title",children:"AI Notes"}),fe.jsx("button",{className:"modal-close",onClick:e,title:"Close","aria-label":"Close notes",children:fe.jsx(MDe,{})})]}),fe.jsx("div",{className:"modal-body",children:r.map(({filePath:l,notes:u})=>fe.jsxs("div",{children:[o&&fe.jsx("h3",{className:"notes-modal-file-heading",children:l.split("/").pop()}),fe.jsx("ul",{className:"notes-modal-list",children:u.map(d=>fe.jsxs("li",{className:"notes-modal-item",children:[fe.jsx("p",{className:"notes-modal-text",children:d.text}),d.originalText&&fe.jsxs("p",{className:"notes-modal-context",children:["“",d.originalText.length>80?d.originalText.slice(0,80)+"...":d.originalText,"”"]})]},d.id))})]},l))}),fe.jsx("div",{className:"modal-footer",children:fe.jsx("button",{className:"btn btn-approve",onClick:e,children:"Got it"})})]})})}const BDe=200;function FDe(t){const e=t.split(`
404
- `).length,r=t.split(/\s+/).filter(Boolean).length,n=Math.max(1,Math.ceil(r/BDe));return{lines:e,words:r,readingTime:n}}const UDe="https://api.github.com/repos/konradmichalik/md-annotator/releases/latest";function GDe(t,e){const r=i=>i.replace(/^v/,""),n=r(t).split(".").map(Number),a=r(e).split(".").map(Number);for(let i=0;i<Math.max(n.length,a.length);i++){const s=n[i]||0,o=a[i]||0;if(o>s)return!0;if(o<s)return!1}return!1}function $De(){const[t,e]=nt.useState(null);return nt.useEffect(()=>{(async()=>{try{const n="0.5.7",i=new URLSearchParams(window.location.search).get("preview-update");if(i){const d=i.replace(/^v/,"");e({currentVersion:n,latestVersion:i,updateAvailable:!0,releaseUrl:`https://github.com/konradmichalik/md-annotator/releases/tag/v${d}`});return}const s=await fetch(UDe);if(!s.ok)return;const o=await s.json(),l=o.tag_name,u=GDe(n,l);e({currentVersion:n,latestVersion:l,updateAvailable:u,releaseUrl:o.html_url})}catch{}})()},[]),t}const zDe="curl -fsSL https://konradmichalik.github.io/md-annotator/install.sh | bash";function YDe(){const t=$De(),[e,r]=nt.useState(!1),[n,a]=nt.useState(!1),i=async()=>{try{await navigator.clipboard.writeText(zDe),r(!0),setTimeout(()=>r(!1),2e3)}catch{}};return!(t!=null&&t.updateAvailable)||n?null:fe.jsx("div",{className:"update-banner",children:fe.jsxs("div",{className:"update-banner-content",children:[fe.jsxs("div",{className:"update-banner-header",children:[fe.jsx("div",{className:"update-banner-icon",children:fe.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:fe.jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})})}),fe.jsxs("div",{className:"update-banner-text",children:[fe.jsx("strong",{className:"update-banner-title",children:"Update available"}),fe.jsxs("span",{className:"update-banner-version",children:[t.latestVersion," available (you have ",t.currentVersion,")"]})]}),fe.jsx("button",{className:"update-banner-dismiss",onClick:()=>a(!0),title:"Dismiss","aria-label":"Dismiss update notification",children:fe.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[fe.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),fe.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),fe.jsxs("div",{className:"update-banner-actions",children:[fe.jsx("button",{className:"update-banner-copy",onClick:i,children:e?"Copied!":"Copy update command"}),fe.jsx("a",{className:"update-banner-notes",href:t.releaseUrl,target:"_blank",rel:"noopener noreferrer",children:"Notes"})]})]})})}function qDe({files:t,activeFileIndex:e,onSelectFile:r}){return t.length<=1?null:fe.jsx("nav",{className:"file-tabs-bar",role:"tablist",children:fe.jsx("div",{className:"file-tabs-scroll",children:t.map((n,a)=>{const i=n.path.split(/[\\/]/).pop(),s=n.annState.annotations.length,o=a===e;return fe.jsxs("button",{role:"tab","aria-selected":o,className:`file-tab${o?" file-tab--active":""}`,onClick:()=>r(a),title:n.path,children:[fe.jsx("span",{className:"file-tab-name",children:i}),s>0&&fe.jsx("span",{className:"file-tab-badge",children:s})]},n.path)})})})}const xx={annotations:[],history:[],redo:[],lastAction:null};function VDe(t,e){switch(e.type){case"ADD":return{annotations:[...t.annotations,e.annotation],history:[...t.history,{action:"add",annotation:e.annotation}],redo:[],lastAction:{type:"add",annotation:e.annotation}};case"DELETE":{const r=t.annotations.find(n=>n.id===e.id);return r?{annotations:t.annotations.filter(n=>n.id!==e.id),history:[...t.history,{action:"delete",annotation:r}],redo:[],lastAction:{type:"delete",annotation:r}}:t}case"EDIT":{const r=t.annotations.find(a=>a.id===e.id);if(!r)return t;const n={...r,type:e.annotationType,text:e.text};return{annotations:t.annotations.map(a=>a.id===e.id?n:a),history:[...t.history,{action:"edit",annotation:r,updated:n}],redo:[],lastAction:{type:"edit",annotation:r,updated:n}}}case"UNDO":{if(t.history.length===0)return t;const r=t.history[t.history.length-1];let n=t.annotations;return r.action==="add"?n=t.annotations.filter(a=>a.id!==r.annotation.id):r.action==="delete"?n=[...t.annotations,r.annotation]:r.action==="edit"&&(n=t.annotations.map(a=>a.id===r.updated.id?r.annotation:a)),{annotations:n,history:t.history.slice(0,-1),redo:[...t.redo,r],lastAction:{type:"undo",entry:r}}}case"REDO":{if(t.redo.length===0)return t;const r=t.redo[t.redo.length-1];let n=t.annotations;return r.action==="add"?n=[...t.annotations,r.annotation]:r.action==="delete"?n=t.annotations.filter(a=>a.id!==r.annotation.id):r.action==="edit"&&(n=t.annotations.map(a=>a.id===r.annotation.id?r.updated:a)),{annotations:n,history:[...t.history,r],redo:t.redo.slice(0,-1),lastAction:{type:"redo",entry:r}}}case"RESTORE":return{annotations:e.annotations,history:[],redo:[],lastAction:null};default:return t}}function HDe(t,e){switch(e.type){case"INIT_FILES":return e.files.map(r=>({...r,annState:{...xx}}));case"ADD_FILE":return[...t,{...e.file,annState:{...xx}}];case"UPDATE_FILE":{const r=e.fileIndex;return r<0||r>=t.length?t:t.map((n,a)=>a!==r?n:{...n,...e.updates})}case"ANN":{const r=e.fileIndex;return r<0||r>=t.length?t:t.map((n,a)=>a!==r?n:{...n,annState:VDe(n.annState,e.annAction)})}default:return t}}const WDe=3600*24*365;function KDe(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function XDe(t){try{const e=document.cookie.match(new RegExp(`(?:^|; )${KDe(t)}=([^;]*)`));return e?decodeURIComponent(e[1]):null}catch{return null}}function QDe(t,e){try{const r=encodeURIComponent(e);document.cookie=`${t}=${r}; path=/; max-age=${WDe}; SameSite=Lax`}catch{}}const Sse="md-annotator-auto-close";function jDe(){const t=XDe(Sse);return t==="0"||t==="3"||t==="5"?t:"off"}function ZDe(t){QDe(Sse,t)}function AH(t){window.close(),setTimeout(()=>{window.closed||t()},300)}function JDe(t){const[e,r]=nt.useState({phase:"idle"});nt.useEffect(()=>{if(!t)return;const a=jDe();a==="0"?(AH(()=>r({phase:"closeFailed"})),r({phase:"closed"})):r(a!=="off"?{phase:"counting",remaining:Number(a)}:{phase:"prompt"})},[t]),nt.useEffect(()=>{if(e.phase!=="counting")return;if(e.remaining<=0){AH(()=>r({phase:"closeFailed"}));return}const a=setTimeout(()=>r(i=>i.phase==="counting"?{phase:"counting",remaining:i.remaining-1}:i),1e3);return()=>clearTimeout(a)},[e]);const n=nt.useCallback(()=>{ZDe("3"),r({phase:"counting",remaining:3})},[]);return{state:e,enableAndStart:n}}const RH=160,wH=500;function NH(t,e,r){const[n,a]=nt.useState(()=>{const d=localStorage.getItem(t),h=d?parseInt(d,10):NaN;return Number.isFinite(h)?Math.min(Math.max(h,RH),wH):e}),i=nt.useRef(!1),s=nt.useRef(0),o=nt.useRef(0),l=nt.useRef(n),u=nt.useCallback(d=>{d.preventDefault(),i.current=!0,s.current=d.clientX,o.current=l.current,document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[]);return nt.useEffect(()=>{const d=f=>{if(!i.current)return;const p=(s.current-f.clientX)*r,m=Math.min(Math.max(o.current+p,RH),wH);l.current=m,a(m)},h=()=>{i.current&&(i.current=!1,document.body.style.cursor="",document.body.style.userSelect="",localStorage.setItem(t,String(Math.round(l.current))))};return document.addEventListener("mousemove",d),document.addEventListener("mouseup",h),()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",h),i.current&&(i.current=!1,document.body.style.cursor="",document.body.style.userSelect="")}},[t,r]),{width:n,handleMouseDown:u}}const eke=3,OH=3e3,IH=5e3;function DH(t){return fetch("/api/heartbeat",{method:"POST",signal:t,cache:"no-store"})}function tke({submitted:t}){const[e,r]=nt.useState(!1),[n,a]=nt.useState(null),i=nt.useRef(0);return nt.useEffect(()=>{if(e||t)return;i.current=0;const s=`
404
+ `).length,r=t.split(/\s+/).filter(Boolean).length,n=Math.max(1,Math.ceil(r/BDe));return{lines:e,words:r,readingTime:n}}const UDe="https://api.github.com/repos/konradmichalik/md-annotator/releases/latest";function GDe(t,e){const r=i=>i.replace(/^v/,""),n=r(t).split(".").map(Number),a=r(e).split(".").map(Number);for(let i=0;i<Math.max(n.length,a.length);i++){const s=n[i]||0,o=a[i]||0;if(o>s)return!0;if(o<s)return!1}return!1}function $De(){const[t,e]=nt.useState(null);return nt.useEffect(()=>{(async()=>{try{const n="0.5.8",i=new URLSearchParams(window.location.search).get("preview-update");if(i){const d=i.replace(/^v/,"");e({currentVersion:n,latestVersion:i,updateAvailable:!0,releaseUrl:`https://github.com/konradmichalik/md-annotator/releases/tag/v${d}`});return}const s=await fetch(UDe);if(!s.ok)return;const o=await s.json(),l=o.tag_name,u=GDe(n,l);e({currentVersion:n,latestVersion:l,updateAvailable:u,releaseUrl:o.html_url})}catch{}})()},[]),t}const zDe="curl -fsSL https://konradmichalik.github.io/md-annotator/install.sh | bash";function YDe(){const t=$De(),[e,r]=nt.useState(!1),[n,a]=nt.useState(!1),i=async()=>{try{await navigator.clipboard.writeText(zDe),r(!0),setTimeout(()=>r(!1),2e3)}catch{}};return!(t!=null&&t.updateAvailable)||n?null:fe.jsx("div",{className:"update-banner",children:fe.jsxs("div",{className:"update-banner-content",children:[fe.jsxs("div",{className:"update-banner-header",children:[fe.jsx("div",{className:"update-banner-icon",children:fe.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:fe.jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})})}),fe.jsxs("div",{className:"update-banner-text",children:[fe.jsx("strong",{className:"update-banner-title",children:"Update available"}),fe.jsxs("span",{className:"update-banner-version",children:[t.latestVersion," available (you have ",t.currentVersion,")"]})]}),fe.jsx("button",{className:"update-banner-dismiss",onClick:()=>a(!0),title:"Dismiss","aria-label":"Dismiss update notification",children:fe.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[fe.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),fe.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),fe.jsxs("div",{className:"update-banner-actions",children:[fe.jsx("button",{className:"update-banner-copy",onClick:i,children:e?"Copied!":"Copy update command"}),fe.jsx("a",{className:"update-banner-notes",href:t.releaseUrl,target:"_blank",rel:"noopener noreferrer",children:"Notes"})]})]})})}function qDe({files:t,activeFileIndex:e,onSelectFile:r}){return t.length<=1?null:fe.jsx("nav",{className:"file-tabs-bar",role:"tablist",children:fe.jsx("div",{className:"file-tabs-scroll",children:t.map((n,a)=>{const i=n.path.split(/[\\/]/).pop(),s=n.annState.annotations.length,o=a===e;return fe.jsxs("button",{role:"tab","aria-selected":o,className:`file-tab${o?" file-tab--active":""}`,onClick:()=>r(a),title:n.path,children:[fe.jsx("span",{className:"file-tab-name",children:i}),s>0&&fe.jsx("span",{className:"file-tab-badge",children:s})]},n.path)})})})}const xx={annotations:[],history:[],redo:[],lastAction:null};function VDe(t,e){switch(e.type){case"ADD":return{annotations:[...t.annotations,e.annotation],history:[...t.history,{action:"add",annotation:e.annotation}],redo:[],lastAction:{type:"add",annotation:e.annotation}};case"DELETE":{const r=t.annotations.find(n=>n.id===e.id);return r?{annotations:t.annotations.filter(n=>n.id!==e.id),history:[...t.history,{action:"delete",annotation:r}],redo:[],lastAction:{type:"delete",annotation:r}}:t}case"EDIT":{const r=t.annotations.find(a=>a.id===e.id);if(!r)return t;const n={...r,type:e.annotationType,text:e.text};return{annotations:t.annotations.map(a=>a.id===e.id?n:a),history:[...t.history,{action:"edit",annotation:r,updated:n}],redo:[],lastAction:{type:"edit",annotation:r,updated:n}}}case"UNDO":{if(t.history.length===0)return t;const r=t.history[t.history.length-1];let n=t.annotations;return r.action==="add"?n=t.annotations.filter(a=>a.id!==r.annotation.id):r.action==="delete"?n=[...t.annotations,r.annotation]:r.action==="edit"&&(n=t.annotations.map(a=>a.id===r.updated.id?r.annotation:a)),{annotations:n,history:t.history.slice(0,-1),redo:[...t.redo,r],lastAction:{type:"undo",entry:r}}}case"REDO":{if(t.redo.length===0)return t;const r=t.redo[t.redo.length-1];let n=t.annotations;return r.action==="add"?n=[...t.annotations,r.annotation]:r.action==="delete"?n=t.annotations.filter(a=>a.id!==r.annotation.id):r.action==="edit"&&(n=t.annotations.map(a=>a.id===r.annotation.id?r.updated:a)),{annotations:n,history:[...t.history,r],redo:t.redo.slice(0,-1),lastAction:{type:"redo",entry:r}}}case"RESTORE":return{annotations:e.annotations,history:[],redo:[],lastAction:null};default:return t}}function HDe(t,e){switch(e.type){case"INIT_FILES":return e.files.map(r=>({...r,annState:{...xx}}));case"ADD_FILE":return[...t,{...e.file,annState:{...xx}}];case"UPDATE_FILE":{const r=e.fileIndex;return r<0||r>=t.length?t:t.map((n,a)=>a!==r?n:{...n,...e.updates})}case"ANN":{const r=e.fileIndex;return r<0||r>=t.length?t:t.map((n,a)=>a!==r?n:{...n,annState:VDe(n.annState,e.annAction)})}default:return t}}const WDe=3600*24*365;function KDe(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function XDe(t){try{const e=document.cookie.match(new RegExp(`(?:^|; )${KDe(t)}=([^;]*)`));return e?decodeURIComponent(e[1]):null}catch{return null}}function QDe(t,e){try{const r=encodeURIComponent(e);document.cookie=`${t}=${r}; path=/; max-age=${WDe}; SameSite=Lax`}catch{}}const Sse="md-annotator-auto-close";function jDe(){const t=XDe(Sse);return t==="0"||t==="3"||t==="5"?t:"off"}function ZDe(t){QDe(Sse,t)}function AH(t){window.close(),setTimeout(()=>{window.closed||t()},300)}function JDe(t){const[e,r]=nt.useState({phase:"idle"});nt.useEffect(()=>{if(!t)return;const a=jDe();a==="0"?(AH(()=>r({phase:"closeFailed"})),r({phase:"closed"})):r(a!=="off"?{phase:"counting",remaining:Number(a)}:{phase:"prompt"})},[t]),nt.useEffect(()=>{if(e.phase!=="counting")return;if(e.remaining<=0){AH(()=>r({phase:"closeFailed"}));return}const a=setTimeout(()=>r(i=>i.phase==="counting"?{phase:"counting",remaining:i.remaining-1}:i),1e3);return()=>clearTimeout(a)},[e]);const n=nt.useCallback(()=>{ZDe("3"),r({phase:"counting",remaining:3})},[]);return{state:e,enableAndStart:n}}const RH=160,wH=500;function NH(t,e,r){const[n,a]=nt.useState(()=>{const d=localStorage.getItem(t),h=d?parseInt(d,10):NaN;return Number.isFinite(h)?Math.min(Math.max(h,RH),wH):e}),i=nt.useRef(!1),s=nt.useRef(0),o=nt.useRef(0),l=nt.useRef(n),u=nt.useCallback(d=>{d.preventDefault(),i.current=!0,s.current=d.clientX,o.current=l.current,document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[]);return nt.useEffect(()=>{const d=f=>{if(!i.current)return;const p=(s.current-f.clientX)*r,m=Math.min(Math.max(o.current+p,RH),wH);l.current=m,a(m)},h=()=>{i.current&&(i.current=!1,document.body.style.cursor="",document.body.style.userSelect="",localStorage.setItem(t,String(Math.round(l.current))))};return document.addEventListener("mousemove",d),document.addEventListener("mouseup",h),()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",h),i.current&&(i.current=!1,document.body.style.cursor="",document.body.style.userSelect="")}},[t,r]),{width:n,handleMouseDown:u}}const eke=3,OH=3e3,IH=5e3;function DH(t){return fetch("/api/heartbeat",{method:"POST",signal:t,cache:"no-store"})}function tke({submitted:t}){const[e,r]=nt.useState(!1),[n,a]=nt.useState(null),i=nt.useRef(0);return nt.useEffect(()=>{if(e||t)return;i.current=0;const s=`
405
405
  setInterval(() => self.postMessage('tick'), ${OH})
406
406
  self.postMessage('tick')
407
407
  `,o=new Blob([s],{type:"application/javascript"}),l=URL.createObjectURL(o),u=new Worker(l);let d=!1,h=null;return u.onmessage=async()=>{if(d)return;h=new AbortController;const f=setTimeout(()=>h.abort(),IH);try{const p=await DH(h.signal);if(clearTimeout(f),d)return;if(!p.ok)throw new Error("heartbeat failed");i.current=0}catch{if(clearTimeout(f),d)return;i.current++,i.current>=eke&&(d=!0,r(!0))}},()=>{d=!0,h&&h.abort(),u.terminate(),URL.revokeObjectURL(l)}},[e,t]),nt.useEffect(()=>{if(!e||t)return;a("reconnecting");let s=!1;return(async()=>{for(let l=0;l<10;l++){if(s||(await new Promise(h=>setTimeout(h,OH)),s))return;const u=new AbortController,d=setTimeout(()=>u.abort(),IH);try{const h=await DH(u.signal);if(clearTimeout(d),s)return;if(h.ok){a(null),r(!1);return}}catch{if(clearTimeout(d),s)return}}s||a("failed")})(),()=>{s=!0}},[e,t]),{serverGone:e,reconnectState:n}}function rke(){return localStorage.getItem("md-annotator-theme")||"auto"}function nke(t){const e=document.documentElement;if(t==="dark"||t==="light"){e.setAttribute("data-theme",t);return}const r=window.matchMedia("(prefers-color-scheme: dark)");e.setAttribute("data-theme",r.matches?"dark":"light");const n=()=>e.setAttribute("data-theme",r.matches?"dark":"light");return r.addEventListener("change",n),()=>r.removeEventListener("change",n)}function ake(){return localStorage.getItem("md-annotator-sidebar-collapsed")==="true"}function ike(){return localStorage.getItem("md-annotator-toc-collapsed")==="true"}function ske({content:t}){const{lines:e,words:r,readingTime:n}=FDe(t);return fe.jsxs("span",{className:"file-stats",children:[e," lines · ",r," words · ~",n," min read"]})}const OS={"claude-code":"Claude Code",opencode:"OpenCode"};function oke(){const[t,e]=nt.useReducer(HDe,[]),[r,n]=nt.useState(0),[a,i]=nt.useState(null),[s,o]=nt.useState("Loading..."),[l,u]=nt.useState(!1),[d,h]=nt.useState(null),[f,p]=nt.useState(rke),[m,v]=nt.useState(ake),[y,E]=nt.useState(ike),[b,T]=nt.useState(!1),[C,R]=nt.useState(!1),[N,A]=nt.useState(null),[I,M]=nt.useState("cli"),F=nt.useRef(null),L=nt.useRef(null),$=nt.useRef(null),U=nt.useRef(!1),D=nt.useRef(t);D.current=t;const B=nt.useCallback(ce=>{$.current&&clearTimeout($.current),A(ce),$.current=setTimeout(()=>A(null),2500)},[]),O=t[r]||null,k=(O==null?void 0:O.annState)||xx,{annotations:P}=k,z=(O==null?void 0:O.blocks)||[],V=(O==null?void 0:O.path)||"",G=t.reduce((ce,le)=>ce+le.annState.annotations.filter(be=>be.type!=="NOTES").length,0),H=t.map(ce=>({filePath:ce.path,notes:ce.annState.annotations.filter(le=>le.type==="NOTES")})).filter(ce=>ce.notes.length>0),K=nt.useCallback(ce=>{e({type:"ANN",fileIndex:r,annAction:ce})},[r]);nt.useEffect(()=>{var be,Ee,Ie,Be,Oe,qe,dt,gt;const{lastAction:ce}=k;if(!ce||ce===L.current)return;L.current=ce;const le=_e=>(_e==null?void 0:_e.targetType)==="image"||(_e==null?void 0:_e.targetType)==="diagram"||(_e==null?void 0:_e.targetType)==="global";if(ce.type==="delete")le(ce.annotation)||(be=F.current)==null||be.removeHighlight(ce.annotation.id);else if(ce.type==="edit")le(ce.updated)||(Ee=F.current)==null||Ee.updateHighlightType(ce.updated.id,ce.updated.type);else if(ce.type==="undo"){const{entry:_e}=ce;le(_e.annotation)||(_e.action==="add"?(Ie=F.current)==null||Ie.removeHighlight(_e.annotation.id):_e.action==="delete"?(Be=F.current)==null||Be.restoreHighlight(_e.annotation):_e.action==="edit"&&((Oe=F.current)==null||Oe.updateHighlightType(_e.annotation.id,_e.annotation.type)))}else if(ce.type==="redo"){const{entry:_e}=ce;le(_e.annotation)||(_e.action==="add"?(qe=F.current)==null||qe.restoreHighlight(_e.annotation):_e.action==="delete"?(dt=F.current)==null||dt.removeHighlight(_e.annotation.id):_e.action==="edit"&&((gt=F.current)==null||gt.updateHighlightType(_e.updated.id,_e.updated.type)))}},[k]),nt.useEffect(()=>(localStorage.setItem("md-annotator-theme",f),nke(f)),[f]),nt.useEffect(()=>{localStorage.setItem("md-annotator-sidebar-collapsed",m)},[m]),nt.useEffect(()=>{localStorage.setItem("md-annotator-toc-collapsed",y)},[y]);const j=nt.useCallback(()=>{E(ce=>!ce)},[]),Q=nt.useCallback(()=>{v(ce=>!ce)},[]),se=nt.useCallback(()=>{p(ce=>ce==="auto"?"light":ce==="light"?"dark":"auto")},[]),ae=nt.useCallback(async()=>{try{o("Loading...");const le=await(await fetch("/api/files")).json();if(le.success){const be=le.data.files.map(Ee=>({index:Ee.index,path:Ee.path,content:Ee.content,blocks:NN(Ee.content),contentHash:Ee.contentHash,hashMismatch:Ee.hashMismatch||!1}));return e({type:"INIT_FILES",files:be}),M(le.data.origin||"cli"),o("Select text to annotate, then Approve or Submit Feedback."),be}else o("Error: "+le.error)}catch(ce){o("Error: "+ce.message)}return null},[]),ve=nt.useCallback(async ce=>{for(let le=0;le<ce.length;le++)try{const Ee=await(await fetch(`/api/annotations?fileIndex=${le}`)).json();Ee.success&&Ee.data.annotations.length>0&&(Ee.data.contentHash===ce[le].contentHash?(e({type:"ANN",fileIndex:le,annAction:{type:"RESTORE",annotations:Ee.data.annotations}}),le===0&&setTimeout(()=>{var Ie;(Ie=F.current)==null||Ie.restoreHighlights(Ee.data.annotations)},100)):e({type:"UPDATE_FILE",fileIndex:le,updates:{hashMismatch:!0}}))}catch{}},[]);nt.useEffect(()=>{ae().then(ce=>{ce&&ve(ce)})},[ae,ve]),nt.useEffect(()=>{if(U.current||t.length===0)return;t.some(le=>le.annState.annotations.some(be=>be.type==="NOTES"))&&(U.current=!0,R(!0))},[t]);const re=nt.useRef(0);nt.useEffect(()=>{re.current!==r&&(re.current=r,L.current=null,i(null),P.length>0&&setTimeout(()=>{var ce;(ce=F.current)==null||ce.restoreHighlights(P)},100))},[r,P]),nt.useEffect(()=>{if(l||!O)return;const ce=setTimeout(async()=>{try{await fetch("/api/annotations",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({annotations:P,fileIndex:r})})}catch{}},500);return()=>clearTimeout(ce)},[P,l,r,O]);const oe=nt.useCallback(ce=>{K({type:"ADD",annotation:ce}),v(!1)},[K]),te=nt.useCallback(()=>{const ce={id:crypto.randomUUID(),blockId:"",startOffset:0,endOffset:0,type:"COMMENT",targetType:"global",text:"",originalText:"",createdAt:Date.now(),startMeta:null,endMeta:null};K({type:"ADD",annotation:ce}),v(!1)},[K]),J=nt.useCallback((ce,le)=>{K({type:"EDIT",id:ce,annotationType:"COMMENT",text:le})},[K]),de=nt.useCallback(ce=>{K({type:"DELETE",id:ce}),i(le=>le===ce?null:le)},[K]),ie=nt.useCallback((ce,le,be)=>{K({type:"EDIT",id:ce,annotationType:le,text:be})},[K]),Ce=nt.useCallback(ce=>{var be;const le=P.find(Ee=>Ee.id===ce);if(le){if(le.targetType==="global"||le.type==="INSERTION"){i(ce),v(!1);return}(be=F.current)==null||be.openEditToolbar(le),i(ce),v(!1)}},[P]),he=nt.useCallback(ce=>{var be;const le=ODe(ce);if(!le.valid){alert(`Import failed: ${le.error}`);return}if(le.annotations.length===0){alert("No annotations found in file");return}le.contentHash&&(O!=null&&O.contentHash)&&le.contentHash!==O.contentHash&&!window.confirm(`File content has changed since these annotations were exported. Annotations may not align correctly.
@@ -410,7 +410,7 @@ Import anyway?`)||le.filePath&&V&&le.filePath!==V&&!window.confirm(`These annota
410
410
 
411
411
  Import anyway?`)||P.length>0&&!window.confirm(`This will replace ${P.length} existing annotation(s) with ${le.annotations.length} imported annotation(s). Undo history will be lost.
412
412
 
413
- Continue?`)||((be=F.current)==null||be.clearAllHighlights(),K({type:"RESTORE",annotations:le.annotations}),setTimeout(()=>{var Ee;(Ee=F.current)==null||Ee.restoreHighlights(le.annotations)},100),B(`Imported ${le.annotations.length} annotation${le.annotations.length!==1?"s":""}`))},[O,V,P,K,B]),Ye=nt.useCallback(()=>{K({type:"UNDO"})},[K]),ee=nt.useCallback(()=>{K({type:"REDO"})},[K]),et=nt.useCallback(ce=>{i(ce)},[]),xe=nt.useCallback(ce=>{ce!==r&&n(ce)},[r]),tt=nt.useCallback(async ce=>{const le=D.current,be=ce.split(/[?#]/)[0],Ie=(V.replace(/[^/]*$/,"")+be.replace(/^\.\//,"")).split("/"),Be=[];for(const dt of Ie)dt===".."?Be.pop():dt&&dt!=="."&&Be.push(dt);const Oe=Be.join("/"),qe=le.findIndex(dt=>dt.path.replace(/^\.\//,"")===Oe);if(qe!==-1){n(qe);return}try{const dt=new URLSearchParams({path:be,relativeTo:V}),_e=await(await fetch(`/api/file/open?${dt}`)).json();if(_e.success){const Ue={index:_e.data.index,path:_e.data.path,content:_e.data.content,blocks:NN(_e.data.content),contentHash:_e.data.contentHash,hashMismatch:!1};e({type:"ADD_FILE",file:Ue}),n(le.length)}else o(`Could not open file: ${_e.error}`)}catch(dt){o(`Error opening file: ${dt.message}`)}},[V]);nt.useEffect(()=>{const ce=le=>{var Ie,Be;const be=(Be=(Ie=document.activeElement)==null?void 0:Ie.tagName)==null?void 0:Be.toLowerCase();if(be==="textarea"||be==="input")return;const Ee=le.metaKey||le.ctrlKey;Ee&&!le.shiftKey&&le.key==="z"&&(le.preventDefault(),Ye()),Ee&&le.shiftKey&&le.key==="z"&&(le.preventDefault(),ee()),le.ctrlKey&&!le.metaKey&&le.key==="y"&&(le.preventDefault(),ee())};return document.addEventListener("keydown",ce),()=>document.removeEventListener("keydown",ce)},[Ye,ee]);const ot=async()=>{u(!0),h("approved");try{await fetch("/api/approve",{method:"POST"})}catch{}},pt=async()=>{u(!0),h("feedback");try{const ce=t.map(le=>({path:le.path,annotations:le.annState.annotations.filter(be=>be.type!=="NOTES"),blocks:le.blocks}));await fetch("/api/feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:ce})})}catch{}},{serverGone:ke,reconnectState:Ze}=tke({submitted:l}),{state:Pe,enableAndStart:ze}=JDe(l),{width:at,handleMouseDown:Re}=NH("md-annotator-panel-width",280,1),{width:He,handleMouseDown:ue}=NH("md-annotator-toc-width",220,-1);if(ke&&!l)return fe.jsxs("div",{className:"app",children:[fe.jsx("div",{className:"done-screen",children:fe.jsxs("div",{className:"done-card",children:[fe.jsx("div",{className:"done-icon done-icon--disconnected",children:fe.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[fe.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"}),fe.jsx("path",{d:"M16.72 11.06A10.94 10.94 0 0119 12.55"}),fe.jsx("path",{d:"M5 12.55a10.94 10.94 0 015.17-2.39"}),fe.jsx("path",{d:"M10.71 5.05A16 16 0 0122.56 9"}),fe.jsx("path",{d:"M1.42 9a15.91 15.91 0 014.7-2.88"}),fe.jsx("path",{d:"M8.53 16.11a6 6 0 016.95 0"}),fe.jsx("line",{x1:"12",y1:"20",x2:"12.01",y2:"20"})]})}),fe.jsx("h1",{className:"done-title",children:"Server Disconnected"}),fe.jsx("p",{className:"done-message",children:"The server is no longer available. Your annotations have not been submitted."}),Ze==="reconnecting"&&fe.jsx("p",{className:"done-hint",children:"Attempting to reconnect..."}),Ze==="failed"&&fe.jsx("p",{className:"done-hint",children:"Could not reconnect to the server."}),P.length>0&&fe.jsxs("div",{className:"done-actions",children:[fe.jsxs("p",{className:"done-backup-info",children:[P.length," annotation",P.length!==1?"s":""," in this file not yet submitted."]}),fe.jsx("button",{onClick:()=>T(!0),className:"btn btn-feedback",children:"Export Annotations"})]})]})}),fe.jsx(CH,{isOpen:b,onClose:()=>T(!1),annotations:P,blocks:z,filePath:V,contentHash:O==null?void 0:O.contentHash,onToast:B}),N&&fe.jsx("div",{className:"toast",children:N})]});if(l)return fe.jsx("div",{className:"app",children:fe.jsx("div",{className:"done-screen",children:fe.jsxs("div",{className:"done-card",children:[fe.jsx("div",{className:`done-icon done-icon--${d}`,children:d==="approved"?fe.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:fe.jsx("polyline",{points:"20 6 9 17 4 12"})}):fe.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[fe.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),fe.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})}),fe.jsx("h1",{className:"done-title",children:d==="approved"?"Approved":"Feedback Submitted"}),fe.jsx("p",{className:"done-message",children:d==="approved"?"No changes requested. The file was approved as-is.":`${G} annotation${G!==1?"s":""} ${OS[I]?`sent to ${OS[I]}`:"submitted"}.`}),ke?fe.jsx("p",{className:"done-hint done-hint--disconnected",children:"Server disconnected. You can close this tab."}):fe.jsx("p",{className:"done-hint",children:"Waiting for server..."}),fe.jsxs("div",{className:"done-autoclose",children:[Pe.phase==="counting"&&fe.jsxs("p",{className:"done-countdown",children:["This tab will close in ",fe.jsx("span",{className:"done-countdown-number",children:Pe.remaining})," second",Pe.remaining!==1?"s":"","..."]}),Pe.phase==="closeFailed"&&fe.jsx("p",{className:"done-hint",children:"Could not close this tab automatically. Please close it manually."}),Pe.phase==="prompt"&&fe.jsxs("label",{className:"done-autoclose-prompt",children:[fe.jsx("input",{type:"checkbox",checked:!1,onChange:ze}),fe.jsx("span",{children:"Auto-close this tab after 3 seconds"})]})]})]})})});const Te=async()=>{var ce;try{const be=await(await fetch("/api/files")).json();if(be.success){const Ee=be.data.files.find(Ie=>Ie.path===(O==null?void 0:O.path));Ee&&(e({type:"UPDATE_FILE",fileIndex:r,updates:{content:Ee.content,blocks:NN(Ee.content),contentHash:Ee.contentHash,hashMismatch:!1,annState:{...xx}}}),(ce=F.current)==null||ce.clearAllHighlights())}}catch(le){o("Error reloading: "+le.message)}},W=t.some(ce=>ce.hashMismatch);return fe.jsxs("div",{className:"app",children:[W&&fe.jsxs("div",{className:"hash-mismatch-banner",children:[fe.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[fe.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"}),fe.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),fe.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),fe.jsx("span",{children:"File has changed since annotations were saved. Annotations may be outdated."}),fe.jsx("button",{onClick:Te,className:"btn btn-sm",children:"Reload"})]}),fe.jsxs("header",{className:"app-header",children:[fe.jsxs("div",{className:"header-left",children:[fe.jsx("button",{onClick:j,className:"btn btn-icon",title:y?"Show table of contents":"Hide table of contents","aria-label":y?"Show table of contents":"Hide table of contents",children:fe.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[fe.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),fe.jsx("line",{x1:"9",y1:"3",x2:"9",y2:"21"})]})}),fe.jsx("svg",{className:"app-logo",viewBox:"0 48 821 99","aria-label":"md-annotator",role:"img",children:fe.jsxs("g",{transform:"matrix(1,0,0,1,-53.9375,-433.25)",children:[fe.jsx("path",{d:"M168.625,539.5C169.042,537.583 169.5,535.521 170,533.313C170.5,531.104 170.75,529.375 170.75,528.125C170.75,526.542 170.479,525.292 169.938,524.375C169.396,523.458 168.417,523 167,523C165.583,523 164.125,523.521 162.625,524.563C161.125,525.604 159.667,526.979 158.25,528.688C156.833,530.396 155.479,532.333 154.188,534.5C152.896,536.667 151.75,538.875 150.75,541.125L142.625,577L125.875,577L133.5,541.875C134.083,539.292 134.583,536.792 135,534.375C135.417,531.958 135.625,529.708 135.625,527.625C135.625,524.542 134.458,523 132.125,523C130.958,523 129.625,523.542 128.125,524.625C126.625,525.708 125.125,527.104 123.625,528.813C122.125,530.521 120.708,532.458 119.375,534.625C118.042,536.792 117,539 116.25,541.25L109,577L91.5,577L102.625,523.375L95.5,521.75L95.5,517.5C96.833,516.833 98.479,516.208 100.438,515.625C102.396,515.042 104.458,514.563 106.625,514.188C108.792,513.813 111,513.521 113.25,513.313C115.5,513.104 117.583,513 119.5,513L122.125,514.5L117.25,532.75L117.75,532.75C119,530.5 120.521,528.188 122.312,525.813C124.104,523.438 126.125,521.313 128.375,519.438C130.625,517.563 133.042,516.021 135.625,514.813C138.208,513.604 140.833,513 143.5,513C144.5,513 145.542,513.167 146.625,513.5C147.708,513.833 148.729,514.438 149.688,515.313C150.646,516.188 151.417,517.375 152,518.875C152.583,520.375 152.875,522.292 152.875,524.625C152.875,525.792 152.771,527.125 152.562,528.625C152.354,530.125 152.083,531.5 151.75,532.75C153.167,530.167 154.833,527.667 156.75,525.25C158.667,522.833 160.729,520.729 162.938,518.938C165.146,517.146 167.479,515.708 169.938,514.625C172.396,513.542 174.958,513 177.625,513C180.792,513 183.375,514 185.375,516C187.375,518 188.375,520.75 188.375,524.25C188.375,526.917 188.125,529.458 187.625,531.875C187.125,534.292 186.583,536.833 186,539.5L178.875,568.375L187.625,568.375L187.625,572.625C186.792,573.292 185.646,573.958 184.188,574.625C182.729,575.292 181.167,575.875 179.5,576.375C177.833,576.875 176.125,577.292 174.375,577.625C172.625,577.958 171,578.125 169.5,578.125C166.5,578.125 164.417,577.521 163.25,576.313C162.083,575.104 161.5,573.75 161.5,572.25C161.5,569.833 162.083,566.5 163.25,562.25L168.625,539.5Z"}),fe.jsx("path",{d:"M221,568.5C222.75,568.5 224.479,567.771 226.188,566.313C227.896,564.854 229.521,563.042 231.062,560.875C232.604,558.708 234.021,556.375 235.312,553.875C236.604,551.375 237.708,549.083 238.625,547L243.125,522.375C242.042,521.708 241.021,521.229 240.062,520.938C239.104,520.646 237.958,520.5 236.625,520.5C233.458,520.5 230.562,521.563 227.938,523.688C225.312,525.813 223.083,528.604 221.25,532.063C219.417,535.521 218,539.479 217,543.938C216,548.396 215.5,552.958 215.5,557.625C215.5,564.875 217.333,568.5 221,568.5ZM236.625,557.125C235.375,560.042 233.896,562.792 232.188,565.375C230.479,567.958 228.604,570.208 226.562,572.125C224.521,574.042 222.292,575.583 219.875,576.75C217.458,577.917 214.917,578.5 212.25,578.5C208,578.5 204.521,576.875 201.812,573.625C199.104,570.375 197.75,565.458 197.75,558.875C197.75,552.958 198.562,547.271 200.188,541.813C201.812,536.354 204.188,531.521 207.312,527.313C210.438,523.104 214.271,519.729 218.812,517.188C223.354,514.646 228.542,513.375 234.375,513.375C237.125,513.375 239.146,513.542 240.438,513.875C241.729,514.208 243.083,514.708 244.5,515.375L248.75,493.375L240.125,491.75L240.125,487.5C241.375,487 243.083,486.5 245.25,486C247.417,485.5 249.729,485.042 252.188,484.625C254.646,484.208 257.062,483.854 259.438,483.563C261.812,483.271 263.75,483.083 265.25,483L267.75,484.375L251.625,568.375L260.625,568.375L260.625,572.625C259.792,573.292 258.688,573.958 257.312,574.625C255.938,575.292 254.438,575.875 252.812,576.375C251.188,576.875 249.5,577.292 247.75,577.625C246,577.958 244.375,578.125 242.875,578.125C239.958,578.125 237.875,577.458 236.625,576.125C235.375,574.792 234.75,573.417 234.75,572C234.75,570.583 234.958,568.542 235.375,565.875C235.792,563.208 236.375,560.292 237.125,557.125L236.625,557.125Z"}),fe.jsx("path",{d:"M271.625,536.875C271.625,533.875 272.583,531.458 274.5,529.625C276.417,527.792 278.958,526.875 282.125,526.875C285.292,526.875 287.875,527.792 289.875,529.625C291.875,531.458 292.875,533.875 292.875,536.875C292.875,539.875 291.875,542.271 289.875,544.063C287.875,545.854 285.292,546.75 282.125,546.75C278.958,546.75 276.417,545.854 274.5,544.063C272.583,542.271 271.625,539.875 271.625,536.875Z"}),fe.jsx("path",{d:"M337,547.875C334.917,547.875 332.312,547.979 329.188,548.188C326.062,548.396 323.062,548.896 320.188,549.688C317.312,550.479 314.854,551.708 312.812,553.375C310.771,555.042 309.75,557.333 309.75,560.25C309.75,562.167 310.146,563.813 310.938,565.188C311.729,566.563 312.792,567.688 314.125,568.563C315.458,569.438 316.938,570.063 318.562,570.438C320.188,570.813 321.833,571 323.5,571C326.5,571 329.104,570.5 331.312,569.5C333.521,568.5 335.375,567.146 336.875,565.438C338.375,563.729 339.479,561.729 340.188,559.438C340.896,557.146 341.25,554.708 341.25,552.125L341.25,547.875L337,547.875ZM341.25,541.125L341.25,539.625C341.25,529.542 336.25,524.5 326.25,524.5C319.417,524.5 313.458,526.792 308.375,531.375L303.375,525.5C308.875,519.833 317.125,517 328.125,517C330.958,517 333.688,517.417 336.312,518.25C338.938,519.083 341.208,520.354 343.125,522.063C345.042,523.771 346.583,525.917 347.75,528.5C348.917,531.083 349.5,534.167 349.5,537.75L349.5,563.875C349.5,566.125 349.604,568.479 349.812,570.938C350.021,573.396 350.25,575.417 350.5,577L342.5,577C342.25,575.583 342.062,574.042 341.938,572.375C341.812,570.708 341.75,569.083 341.75,567.5L341.5,567.5C339.083,571.417 336.229,574.229 332.938,575.938C329.646,577.646 325.625,578.5 320.875,578.5C318.292,578.5 315.792,578.146 313.375,577.438C310.958,576.729 308.812,575.646 306.938,574.188C305.062,572.729 303.562,570.938 302.438,568.813C301.312,566.688 300.75,564.208 300.75,561.375C300.75,556.625 301.979,552.896 304.438,550.188C306.896,547.479 309.979,545.458 313.688,544.125C317.396,542.792 321.354,541.958 325.562,541.625C329.771,541.292 333.625,541.125 337.125,541.125L341.25,541.125Z"}),fe.jsx("path",{d:"M376.5,518.5C376.667,520.083 376.771,521.646 376.812,523.188C376.854,524.729 376.875,526.292 376.875,527.875L377.125,527.875C378.042,526.292 379.208,524.833 380.625,523.5C382.042,522.167 383.625,521.021 385.375,520.063C387.125,519.104 388.979,518.354 390.938,517.813C392.896,517.271 394.833,517 396.75,517C404.25,517 409.792,518.979 413.375,522.938C416.958,526.896 418.75,532.542 418.75,539.875L418.75,577L410.5,577L410.5,544.625C410.5,538.125 409.375,533.146 407.125,529.688C404.875,526.229 400.708,524.5 394.625,524.5C394.208,524.5 393.042,524.667 391.125,525C389.208,525.333 387.188,526.25 385.062,527.75C382.938,529.25 381.042,531.5 379.375,534.5C377.708,537.5 376.875,541.667 376.875,547L376.875,577L368.625,577L368.625,531.375C368.625,529.792 368.562,527.792 368.438,525.375C368.312,522.958 368.167,520.667 368,518.5L376.5,518.5Z"}),fe.jsx("path",{d:"M446,518.5C446.167,520.083 446.271,521.646 446.312,523.188C446.354,524.729 446.375,526.292 446.375,527.875L446.625,527.875C447.542,526.292 448.708,524.833 450.125,523.5C451.542,522.167 453.125,521.021 454.875,520.063C456.625,519.104 458.479,518.354 460.438,517.813C462.396,517.271 464.333,517 466.25,517C473.75,517 479.292,518.979 482.875,522.938C486.458,526.896 488.25,532.542 488.25,539.875L488.25,577L480,577L480,544.625C480,538.125 478.875,533.146 476.625,529.688C474.375,526.229 470.208,524.5 464.125,524.5C463.708,524.5 462.542,524.667 460.625,525C458.708,525.333 456.688,526.25 454.562,527.75C452.438,529.25 450.542,531.5 448.875,534.5C447.208,537.5 446.375,541.667 446.375,547L446.375,577L438.125,577L438.125,531.375C438.125,529.792 438.062,527.792 437.938,525.375C437.812,522.958 437.667,520.667 437.5,518.5L446,518.5Z"}),fe.jsx("path",{d:"M557.75,547.75C557.75,544.5 557.229,541.458 556.188,538.625C555.146,535.792 553.667,533.333 551.75,531.25C549.833,529.167 547.521,527.521 544.812,526.313C542.104,525.104 539.042,524.5 535.625,524.5C532.208,524.5 529.146,525.104 526.438,526.313C523.729,527.521 521.438,529.167 519.562,531.25C517.688,533.333 516.229,535.792 515.188,538.625C514.146,541.458 513.625,544.5 513.625,547.75C513.625,551 514.146,554.042 515.188,556.875C516.229,559.708 517.688,562.167 519.562,564.25C521.438,566.333 523.729,567.979 526.438,569.188C529.146,570.396 532.208,571 535.625,571C539.042,571 542.104,570.396 544.812,569.188C547.521,567.979 549.833,566.333 551.75,564.25C553.667,562.167 555.146,559.708 556.188,556.875C557.229,554.042 557.75,551 557.75,547.75ZM566.75,547.75C566.75,552.167 565.979,556.25 564.438,560C562.896,563.75 560.75,567 558,569.75C555.25,572.5 551.979,574.646 548.188,576.188C544.396,577.729 540.208,578.5 535.625,578.5C531.125,578.5 526.979,577.729 523.188,576.188C519.396,574.646 516.125,572.5 513.375,569.75C510.625,567 508.479,563.75 506.938,560C505.396,556.25 504.625,552.167 504.625,547.75C504.625,543.333 505.396,539.25 506.938,535.5C508.479,531.75 510.625,528.5 513.375,525.75C516.125,523 519.396,520.854 523.188,519.313C526.979,517.771 531.125,517 535.625,517C540.208,517 544.396,517.771 548.188,519.313C551.979,520.854 555.25,523 558,525.75C560.75,528.5 562.896,531.75 564.438,535.5C565.979,539.25 566.75,543.333 566.75,547.75Z"}),fe.jsx("path",{d:"M612,526L595.125,526L595.125,560.5C595.125,562.667 595.333,564.438 595.75,565.813C596.167,567.188 596.75,568.25 597.5,569C598.25,569.75 599.146,570.271 600.188,570.563C601.229,570.854 602.375,571 603.625,571C605.042,571 606.5,570.792 608,570.375C609.5,569.958 610.875,569.417 612.125,568.75L612.5,576.375C609.417,577.792 605.708,578.5 601.375,578.5C599.792,578.5 598.146,578.292 596.438,577.875C594.729,577.458 593.167,576.667 591.75,575.5C590.333,574.333 589.167,572.75 588.25,570.75C587.333,568.75 586.875,566.125 586.875,562.875L586.875,526L574.5,526L574.5,518.5L586.875,518.5L586.875,502L595.125,502L595.125,518.5L612,518.5L612,526Z"}),fe.jsx("path",{d:"M656.5,547.875C654.417,547.875 651.812,547.979 648.688,548.188C645.562,548.396 642.562,548.896 639.688,549.688C636.812,550.479 634.354,551.708 632.312,553.375C630.271,555.042 629.25,557.333 629.25,560.25C629.25,562.167 629.646,563.813 630.438,565.188C631.229,566.563 632.292,567.688 633.625,568.563C634.958,569.438 636.438,570.063 638.062,570.438C639.688,570.813 641.333,571 643,571C646,571 648.604,570.5 650.812,569.5C653.021,568.5 654.875,567.146 656.375,565.438C657.875,563.729 658.979,561.729 659.688,559.438C660.396,557.146 660.75,554.708 660.75,552.125L660.75,547.875L656.5,547.875ZM660.75,541.125L660.75,539.625C660.75,529.542 655.75,524.5 645.75,524.5C638.917,524.5 632.958,526.792 627.875,531.375L622.875,525.5C628.375,519.833 636.625,517 647.625,517C650.458,517 653.188,517.417 655.812,518.25C658.438,519.083 660.708,520.354 662.625,522.063C664.542,523.771 666.083,525.917 667.25,528.5C668.417,531.083 669,534.167 669,537.75L669,563.875C669,566.125 669.104,568.479 669.312,570.938C669.521,573.396 669.75,575.417 670,577L662,577C661.75,575.583 661.562,574.042 661.438,572.375C661.312,570.708 661.25,569.083 661.25,567.5L661,567.5C658.583,571.417 655.729,574.229 652.438,575.938C649.146,577.646 645.125,578.5 640.375,578.5C637.792,578.5 635.292,578.146 632.875,577.438C630.458,576.729 628.312,575.646 626.438,574.188C624.562,572.729 623.062,570.938 621.938,568.813C620.812,566.688 620.25,564.208 620.25,561.375C620.25,556.625 621.479,552.896 623.938,550.188C626.396,547.479 629.479,545.458 633.188,544.125C636.896,542.792 640.854,541.958 645.062,541.625C649.271,541.292 653.125,541.125 656.625,541.125L660.75,541.125Z"}),fe.jsx("path",{d:"M718.375,526L701.5,526L701.5,560.5C701.5,562.667 701.708,564.438 702.125,565.813C702.542,567.188 703.125,568.25 703.875,569C704.625,569.75 705.521,570.271 706.562,570.563C707.604,570.854 708.75,571 710,571C711.417,571 712.875,570.792 714.375,570.375C715.875,569.958 717.25,569.417 718.5,568.75L718.875,576.375C715.792,577.792 712.083,578.5 707.75,578.5C706.167,578.5 704.521,578.292 702.812,577.875C701.104,577.458 699.542,576.667 698.125,575.5C696.708,574.333 695.542,572.75 694.625,570.75C693.708,568.75 693.25,566.125 693.25,562.875L693.25,526L680.875,526L680.875,518.5L693.25,518.5L693.25,502L701.5,502L701.5,518.5L718.375,518.5L718.375,526Z"}),fe.jsx("path",{d:"M779.75,547.75C779.75,544.5 779.229,541.458 778.188,538.625C777.146,535.792 775.667,533.333 773.75,531.25C771.833,529.167 769.521,527.521 766.812,526.313C764.104,525.104 761.042,524.5 757.625,524.5C754.208,524.5 751.146,525.104 748.438,526.313C745.729,527.521 743.438,529.167 741.562,531.25C739.688,533.333 738.229,535.792 737.188,538.625C736.146,541.458 735.625,544.5 735.625,547.75C735.625,551 736.146,554.042 737.188,556.875C738.229,559.708 739.688,562.167 741.562,564.25C743.438,566.333 745.729,567.979 748.438,569.188C751.146,570.396 754.208,571 757.625,571C761.042,571 764.104,570.396 766.812,569.188C769.521,567.979 771.833,566.333 773.75,564.25C775.667,562.167 777.146,559.708 778.188,556.875C779.229,554.042 779.75,551 779.75,547.75ZM788.75,547.75C788.75,552.167 787.979,556.25 786.438,560C784.896,563.75 782.75,567 780,569.75C777.25,572.5 773.979,574.646 770.188,576.188C766.396,577.729 762.208,578.5 757.625,578.5C753.125,578.5 748.979,577.729 745.188,576.188C741.396,574.646 738.125,572.5 735.375,569.75C732.625,567 730.479,563.75 728.938,560C727.396,556.25 726.625,552.167 726.625,547.75C726.625,543.333 727.396,539.25 728.938,535.5C730.479,531.75 732.625,528.5 735.375,525.75C738.125,523 741.396,520.854 745.188,519.313C748.979,517.771 753.125,517 757.625,517C762.208,517 766.396,517.771 770.188,519.313C773.979,520.854 777.25,523 780,525.75C782.75,528.5 784.896,531.75 786.438,535.5C787.979,539.25 788.75,543.333 788.75,547.75Z"}),fe.jsx("path",{d:"M804.625,536.75C804.625,534.167 804.562,531.542 804.438,528.875C804.312,526.208 804.208,522.75 804.125,518.5L812.25,518.5L812.25,529.375L812.5,529.375C813.083,527.792 813.917,526.271 815,524.813C816.083,523.354 817.396,522.042 818.938,520.875C820.479,519.708 822.271,518.771 824.312,518.063C826.354,517.354 828.667,517 831.25,517C833.583,517 835.625,517.25 837.375,517.75L835.75,525.875C834.667,525.458 833.083,525.25 831,525.25C827.833,525.25 825.125,525.854 822.875,527.063C820.625,528.271 818.75,529.813 817.25,531.688C815.75,533.563 814.646,535.583 813.938,537.75C813.229,539.917 812.875,542 812.875,544L812.875,577L804.625,577L804.625,536.75Z"})]})}),fe.jsxs("span",{className:"version-badge",children:["v","0.5.7"]}),OS[I]&&fe.jsx("span",{className:"origin-badge",children:OS[I]}),fe.jsx("span",{className:"app-filepath",children:V})]}),fe.jsxs("div",{className:"header-right",children:[fe.jsxs("button",{onClick:pt,className:"btn btn-feedback",disabled:G===0,title:G===0?"Add annotations first":`Submit ${G} annotation(s)`,children:["Feedback",G>0&&fe.jsx("span",{className:"btn-badge",children:G})]}),fe.jsx("button",{onClick:ot,className:"btn btn-approve",disabled:G>0,title:G>0?"Remove annotations to approve":"Approve file as-is",children:"Approve"}),fe.jsxs("button",{onClick:se,className:"btn btn-icon",title:`Theme: ${f}`,"aria-label":`Theme: ${f}`,children:[f==="light"&&fe.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[fe.jsx("circle",{cx:"12",cy:"12",r:"5"}),fe.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),fe.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),fe.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),fe.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),fe.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),fe.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),fe.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),fe.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]}),f==="dark"&&fe.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:fe.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),f==="auto"&&fe.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[fe.jsx("circle",{cx:"12",cy:"12",r:"9"}),fe.jsx("path",{d:"M12 3a9 9 0 0 1 0 18",fill:"currentColor"})]})]}),fe.jsx("button",{onClick:Q,className:"btn btn-icon",title:m?"Show annotations":"Hide annotations","aria-label":m?"Show annotations":"Hide annotations",children:fe.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[fe.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),fe.jsx("line",{x1:"15",y1:"3",x2:"15",y2:"21"})]})})]})]}),fe.jsx(qDe,{files:t,activeFileIndex:r,onSelectFile:xe}),fe.jsxs("main",{className:"app-main",children:[fe.jsx(TDe,{blocks:z,annotations:P,collapsed:y,width:He}),!y&&fe.jsx("div",{className:"resize-handle",onMouseDown:ue}),fe.jsx(_De,{ref:F,blocks:z,annotations:P,onAddAnnotation:oe,onEditAnnotation:ie,onDeleteAnnotation:de,onSelectAnnotation:et,onOpenFile:tt,selectedAnnotationId:a},(O==null?void 0:O.path)||"empty"),!m&&fe.jsx("div",{className:"resize-handle",onMouseDown:Re}),fe.jsx(EDe,{annotations:P,selectedAnnotationId:a,onSelect:et,onEdit:Ce,onDelete:de,onExport:()=>T(!0),onImport:he,onAddGlobalComment:te,onEditGlobalComment:J,collapsed:m,width:at})]}),fe.jsxs("footer",{className:"app-status",children:[fe.jsx("span",{children:s}),(O==null?void 0:O.content)&&fe.jsx(ske,{content:O.content})]}),fe.jsx(CH,{isOpen:b,onClose:()=>T(!1),annotations:P,blocks:z,filePath:V,contentHash:O==null?void 0:O.contentHash,onToast:B}),fe.jsx(PDe,{isOpen:C,onClose:()=>R(!1),notesGroups:H,totalFiles:t.length}),fe.jsx(YDe,{}),N&&fe.jsx("div",{className:"toast",children:N})]})}m0e.createRoot(document.getElementById("root")).render(fe.jsx(oke,{}));class zs{constructor(e,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=r,this.end=n}static range(e,r){return r?!e||!e.loc||!r.loc||e.loc.lexer!==r.loc.lexer?null:new zs(e.loc.lexer,e.loc.start,r.loc.end):e&&e.loc}}class Eo{constructor(e,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=r}range(e,r){return new Eo(r,zs.range(this,e))}}class $t{constructor(e,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+e,a,i,s=r&&r.loc;if(s&&s.start<=s.end){var o=s.lexer.input;a=s.start,i=s.end,a===o.length?n+=" at end of input: ":n+=" at position "+(a+1)+": ";var l=o.slice(a,i).replace(/[^]/g,"$&̲"),u;a>15?u="…"+o.slice(a-15,a):u=o.slice(0,a);var d;i+15<o.length?d=o.slice(i,i+15)+"…":d=o.slice(i),n+=u+l+d}var h=new Error(n);return h.name="ParseError",h.__proto__=$t.prototype,h.position=a,a!=null&&i!=null&&(h.length=i-a),h.rawMessage=e,h}}$t.prototype.__proto__=Error.prototype;var lke=/([A-Z])/g,G8=t=>t.replace(lke,"-$1").toLowerCase(),cke={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},uke=/[&><"']/g,es=t=>String(t).replace(uke,e=>cke[e]),Jy=t=>t.type==="ordgroup"||t.type==="color"?t.body.length===1?Jy(t.body[0]):t:t.type==="font"?Jy(t.body):t,dke=new Set(["mathord","textord","atom"]),Wu=t=>dke.has(Jy(t).type),hke=t=>{var e=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(t);return e?e[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?null:e[1].toLowerCase():"_relative"},e1={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:t=>"#"+t},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(t,e)=>(e.push(t),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:t=>Math.max(0,t),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:t=>Math.max(0,t),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:t=>Math.max(0,t),cli:"-e, --max-expand <n>",cliProcessor:t=>t==="Infinity"?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};function fke(t){if(t.default)return t.default;var e=t.type,r=Array.isArray(e)?e[0]:e;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class $8{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var r in e1)if(e1.hasOwnProperty(r)){var n=e1[r];this[r]=e[r]!==void 0?n.processor?n.processor(e[r]):e[r]:fke(n)}}reportNonstrict(e,r,n){var a=this.strict;if(typeof a=="function"&&(a=a(e,r,n)),!(!a||a==="ignore")){if(a===!0||a==="error")throw new $t("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+e+"]"),n);a==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+r+" ["+e+"]"))}}useStrictBehavior(e,r,n){var a=this.strict;if(typeof a=="function")try{a=a(e,r,n)}catch{a="error"}return!a||a==="ignore"?!1:a===!0||a==="error"?!0:a==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+r+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var r=hke(e.url);if(r==null)return!1;e.protocol=r}var n=typeof this.trust=="function"?this.trust(e):this.trust;return!!n}}class xd{constructor(e,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=r,this.cramped=n}sup(){return sc[pke[this.id]]}sub(){return sc[gke[this.id]]}fracNum(){return sc[mke[this.id]]}fracDen(){return sc[_ke[this.id]]}cramp(){return sc[vke[this.id]]}text(){return sc[yke[this.id]]}isTight(){return this.size>=2}}var z8=0,Cx=1,Am=2,Nu=3,w1=4,Qo=5,H0=6,Ss=7,sc=[new xd(z8,0,!1),new xd(Cx,0,!0),new xd(Am,1,!1),new xd(Nu,1,!0),new xd(w1,2,!1),new xd(Qo,2,!0),new xd(H0,3,!1),new xd(Ss,3,!0)],pke=[w1,Qo,w1,Qo,H0,Ss,H0,Ss],gke=[Qo,Qo,Qo,Qo,Ss,Ss,Ss,Ss],mke=[Am,Nu,w1,Qo,H0,Ss,H0,Ss],_ke=[Nu,Nu,Qo,Qo,Ss,Ss,Ss,Ss],vke=[Cx,Cx,Nu,Nu,Qo,Qo,Ss,Ss],yke=[z8,Cx,Am,Nu,Am,Nu,Am,Nu],Pr={DISPLAY:sc[z8],TEXT:sc[Am],SCRIPT:sc[w1],SCRIPTSCRIPT:sc[H0]},IL=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Eke(t){for(var e=0;e<IL.length;e++)for(var r=IL[e],n=0;n<r.blocks.length;n++){var a=r.blocks[n];if(t>=a[0]&&t<=a[1])return r.name}return null}var GT=[];IL.forEach(t=>t.blocks.forEach(e=>GT.push(...e)));function Tse(t){for(var e=0;e<GT.length;e+=2)if(t>=GT[e]&&t<=GT[e+1])return!0;return!1}var Ag=80,bke=function(e,r){return"M95,"+(622+e+r)+`
413
+ Continue?`)||((be=F.current)==null||be.clearAllHighlights(),K({type:"RESTORE",annotations:le.annotations}),setTimeout(()=>{var Ee;(Ee=F.current)==null||Ee.restoreHighlights(le.annotations)},100),B(`Imported ${le.annotations.length} annotation${le.annotations.length!==1?"s":""}`))},[O,V,P,K,B]),Ye=nt.useCallback(()=>{K({type:"UNDO"})},[K]),ee=nt.useCallback(()=>{K({type:"REDO"})},[K]),et=nt.useCallback(ce=>{i(ce)},[]),xe=nt.useCallback(ce=>{ce!==r&&n(ce)},[r]),tt=nt.useCallback(async ce=>{const le=D.current,be=ce.split(/[?#]/)[0],Ie=(V.replace(/[^/]*$/,"")+be.replace(/^\.\//,"")).split("/"),Be=[];for(const dt of Ie)dt===".."?Be.pop():dt&&dt!=="."&&Be.push(dt);const Oe=Be.join("/"),qe=le.findIndex(dt=>dt.path.replace(/^\.\//,"")===Oe);if(qe!==-1){n(qe);return}try{const dt=new URLSearchParams({path:be,relativeTo:V}),_e=await(await fetch(`/api/file/open?${dt}`)).json();if(_e.success){const Ue={index:_e.data.index,path:_e.data.path,content:_e.data.content,blocks:NN(_e.data.content),contentHash:_e.data.contentHash,hashMismatch:!1};e({type:"ADD_FILE",file:Ue}),n(le.length)}else o(`Could not open file: ${_e.error}`)}catch(dt){o(`Error opening file: ${dt.message}`)}},[V]);nt.useEffect(()=>{const ce=le=>{var Ie,Be;const be=(Be=(Ie=document.activeElement)==null?void 0:Ie.tagName)==null?void 0:Be.toLowerCase();if(be==="textarea"||be==="input")return;const Ee=le.metaKey||le.ctrlKey;Ee&&!le.shiftKey&&le.key==="z"&&(le.preventDefault(),Ye()),Ee&&le.shiftKey&&le.key==="z"&&(le.preventDefault(),ee()),le.ctrlKey&&!le.metaKey&&le.key==="y"&&(le.preventDefault(),ee())};return document.addEventListener("keydown",ce),()=>document.removeEventListener("keydown",ce)},[Ye,ee]);const ot=async()=>{u(!0),h("approved");try{await fetch("/api/approve",{method:"POST"})}catch{}},pt=async()=>{u(!0),h("feedback");try{const ce=t.map(le=>({path:le.path,annotations:le.annState.annotations.filter(be=>be.type!=="NOTES"),blocks:le.blocks}));await fetch("/api/feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:ce})})}catch{}},{serverGone:ke,reconnectState:Ze}=tke({submitted:l}),{state:Pe,enableAndStart:ze}=JDe(l),{width:at,handleMouseDown:Re}=NH("md-annotator-panel-width",280,1),{width:He,handleMouseDown:ue}=NH("md-annotator-toc-width",220,-1);if(ke&&!l)return fe.jsxs("div",{className:"app",children:[fe.jsx("div",{className:"done-screen",children:fe.jsxs("div",{className:"done-card",children:[fe.jsx("div",{className:"done-icon done-icon--disconnected",children:fe.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[fe.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"}),fe.jsx("path",{d:"M16.72 11.06A10.94 10.94 0 0119 12.55"}),fe.jsx("path",{d:"M5 12.55a10.94 10.94 0 015.17-2.39"}),fe.jsx("path",{d:"M10.71 5.05A16 16 0 0122.56 9"}),fe.jsx("path",{d:"M1.42 9a15.91 15.91 0 014.7-2.88"}),fe.jsx("path",{d:"M8.53 16.11a6 6 0 016.95 0"}),fe.jsx("line",{x1:"12",y1:"20",x2:"12.01",y2:"20"})]})}),fe.jsx("h1",{className:"done-title",children:"Server Disconnected"}),fe.jsx("p",{className:"done-message",children:"The server is no longer available. Your annotations have not been submitted."}),Ze==="reconnecting"&&fe.jsx("p",{className:"done-hint",children:"Attempting to reconnect..."}),Ze==="failed"&&fe.jsx("p",{className:"done-hint",children:"Could not reconnect to the server."}),P.length>0&&fe.jsxs("div",{className:"done-actions",children:[fe.jsxs("p",{className:"done-backup-info",children:[P.length," annotation",P.length!==1?"s":""," in this file not yet submitted."]}),fe.jsx("button",{onClick:()=>T(!0),className:"btn btn-feedback",children:"Export Annotations"})]})]})}),fe.jsx(CH,{isOpen:b,onClose:()=>T(!1),annotations:P,blocks:z,filePath:V,contentHash:O==null?void 0:O.contentHash,onToast:B}),N&&fe.jsx("div",{className:"toast",children:N})]});if(l)return fe.jsx("div",{className:"app",children:fe.jsx("div",{className:"done-screen",children:fe.jsxs("div",{className:"done-card",children:[fe.jsx("div",{className:`done-icon done-icon--${d}`,children:d==="approved"?fe.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:fe.jsx("polyline",{points:"20 6 9 17 4 12"})}):fe.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[fe.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),fe.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})}),fe.jsx("h1",{className:"done-title",children:d==="approved"?"Approved":"Feedback Submitted"}),fe.jsx("p",{className:"done-message",children:d==="approved"?"No changes requested. The file was approved as-is.":`${G} annotation${G!==1?"s":""} ${OS[I]?`sent to ${OS[I]}`:"submitted"}.`}),ke?fe.jsx("p",{className:"done-hint done-hint--disconnected",children:"Server disconnected. You can close this tab."}):fe.jsx("p",{className:"done-hint",children:"Waiting for server..."}),fe.jsxs("div",{className:"done-autoclose",children:[Pe.phase==="counting"&&fe.jsxs("p",{className:"done-countdown",children:["This tab will close in ",fe.jsx("span",{className:"done-countdown-number",children:Pe.remaining})," second",Pe.remaining!==1?"s":"","..."]}),Pe.phase==="closeFailed"&&fe.jsx("p",{className:"done-hint",children:"Could not close this tab automatically. Please close it manually."}),Pe.phase==="prompt"&&fe.jsxs("label",{className:"done-autoclose-prompt",children:[fe.jsx("input",{type:"checkbox",checked:!1,onChange:ze}),fe.jsx("span",{children:"Auto-close this tab after 3 seconds"})]})]})]})})});const Te=async()=>{var ce;try{const be=await(await fetch("/api/files")).json();if(be.success){const Ee=be.data.files.find(Ie=>Ie.path===(O==null?void 0:O.path));Ee&&(e({type:"UPDATE_FILE",fileIndex:r,updates:{content:Ee.content,blocks:NN(Ee.content),contentHash:Ee.contentHash,hashMismatch:!1,annState:{...xx}}}),(ce=F.current)==null||ce.clearAllHighlights())}}catch(le){o("Error reloading: "+le.message)}},W=t.some(ce=>ce.hashMismatch);return fe.jsxs("div",{className:"app",children:[W&&fe.jsxs("div",{className:"hash-mismatch-banner",children:[fe.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[fe.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"}),fe.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),fe.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),fe.jsx("span",{children:"File has changed since annotations were saved. Annotations may be outdated."}),fe.jsx("button",{onClick:Te,className:"btn btn-sm",children:"Reload"})]}),fe.jsxs("header",{className:"app-header",children:[fe.jsxs("div",{className:"header-left",children:[fe.jsx("button",{onClick:j,className:"btn btn-icon",title:y?"Show table of contents":"Hide table of contents","aria-label":y?"Show table of contents":"Hide table of contents",children:fe.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[fe.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),fe.jsx("line",{x1:"9",y1:"3",x2:"9",y2:"21"})]})}),fe.jsx("svg",{className:"app-logo",viewBox:"0 48 821 99","aria-label":"md-annotator",role:"img",children:fe.jsxs("g",{transform:"matrix(1,0,0,1,-53.9375,-433.25)",children:[fe.jsx("path",{d:"M168.625,539.5C169.042,537.583 169.5,535.521 170,533.313C170.5,531.104 170.75,529.375 170.75,528.125C170.75,526.542 170.479,525.292 169.938,524.375C169.396,523.458 168.417,523 167,523C165.583,523 164.125,523.521 162.625,524.563C161.125,525.604 159.667,526.979 158.25,528.688C156.833,530.396 155.479,532.333 154.188,534.5C152.896,536.667 151.75,538.875 150.75,541.125L142.625,577L125.875,577L133.5,541.875C134.083,539.292 134.583,536.792 135,534.375C135.417,531.958 135.625,529.708 135.625,527.625C135.625,524.542 134.458,523 132.125,523C130.958,523 129.625,523.542 128.125,524.625C126.625,525.708 125.125,527.104 123.625,528.813C122.125,530.521 120.708,532.458 119.375,534.625C118.042,536.792 117,539 116.25,541.25L109,577L91.5,577L102.625,523.375L95.5,521.75L95.5,517.5C96.833,516.833 98.479,516.208 100.438,515.625C102.396,515.042 104.458,514.563 106.625,514.188C108.792,513.813 111,513.521 113.25,513.313C115.5,513.104 117.583,513 119.5,513L122.125,514.5L117.25,532.75L117.75,532.75C119,530.5 120.521,528.188 122.312,525.813C124.104,523.438 126.125,521.313 128.375,519.438C130.625,517.563 133.042,516.021 135.625,514.813C138.208,513.604 140.833,513 143.5,513C144.5,513 145.542,513.167 146.625,513.5C147.708,513.833 148.729,514.438 149.688,515.313C150.646,516.188 151.417,517.375 152,518.875C152.583,520.375 152.875,522.292 152.875,524.625C152.875,525.792 152.771,527.125 152.562,528.625C152.354,530.125 152.083,531.5 151.75,532.75C153.167,530.167 154.833,527.667 156.75,525.25C158.667,522.833 160.729,520.729 162.938,518.938C165.146,517.146 167.479,515.708 169.938,514.625C172.396,513.542 174.958,513 177.625,513C180.792,513 183.375,514 185.375,516C187.375,518 188.375,520.75 188.375,524.25C188.375,526.917 188.125,529.458 187.625,531.875C187.125,534.292 186.583,536.833 186,539.5L178.875,568.375L187.625,568.375L187.625,572.625C186.792,573.292 185.646,573.958 184.188,574.625C182.729,575.292 181.167,575.875 179.5,576.375C177.833,576.875 176.125,577.292 174.375,577.625C172.625,577.958 171,578.125 169.5,578.125C166.5,578.125 164.417,577.521 163.25,576.313C162.083,575.104 161.5,573.75 161.5,572.25C161.5,569.833 162.083,566.5 163.25,562.25L168.625,539.5Z"}),fe.jsx("path",{d:"M221,568.5C222.75,568.5 224.479,567.771 226.188,566.313C227.896,564.854 229.521,563.042 231.062,560.875C232.604,558.708 234.021,556.375 235.312,553.875C236.604,551.375 237.708,549.083 238.625,547L243.125,522.375C242.042,521.708 241.021,521.229 240.062,520.938C239.104,520.646 237.958,520.5 236.625,520.5C233.458,520.5 230.562,521.563 227.938,523.688C225.312,525.813 223.083,528.604 221.25,532.063C219.417,535.521 218,539.479 217,543.938C216,548.396 215.5,552.958 215.5,557.625C215.5,564.875 217.333,568.5 221,568.5ZM236.625,557.125C235.375,560.042 233.896,562.792 232.188,565.375C230.479,567.958 228.604,570.208 226.562,572.125C224.521,574.042 222.292,575.583 219.875,576.75C217.458,577.917 214.917,578.5 212.25,578.5C208,578.5 204.521,576.875 201.812,573.625C199.104,570.375 197.75,565.458 197.75,558.875C197.75,552.958 198.562,547.271 200.188,541.813C201.812,536.354 204.188,531.521 207.312,527.313C210.438,523.104 214.271,519.729 218.812,517.188C223.354,514.646 228.542,513.375 234.375,513.375C237.125,513.375 239.146,513.542 240.438,513.875C241.729,514.208 243.083,514.708 244.5,515.375L248.75,493.375L240.125,491.75L240.125,487.5C241.375,487 243.083,486.5 245.25,486C247.417,485.5 249.729,485.042 252.188,484.625C254.646,484.208 257.062,483.854 259.438,483.563C261.812,483.271 263.75,483.083 265.25,483L267.75,484.375L251.625,568.375L260.625,568.375L260.625,572.625C259.792,573.292 258.688,573.958 257.312,574.625C255.938,575.292 254.438,575.875 252.812,576.375C251.188,576.875 249.5,577.292 247.75,577.625C246,577.958 244.375,578.125 242.875,578.125C239.958,578.125 237.875,577.458 236.625,576.125C235.375,574.792 234.75,573.417 234.75,572C234.75,570.583 234.958,568.542 235.375,565.875C235.792,563.208 236.375,560.292 237.125,557.125L236.625,557.125Z"}),fe.jsx("path",{d:"M271.625,536.875C271.625,533.875 272.583,531.458 274.5,529.625C276.417,527.792 278.958,526.875 282.125,526.875C285.292,526.875 287.875,527.792 289.875,529.625C291.875,531.458 292.875,533.875 292.875,536.875C292.875,539.875 291.875,542.271 289.875,544.063C287.875,545.854 285.292,546.75 282.125,546.75C278.958,546.75 276.417,545.854 274.5,544.063C272.583,542.271 271.625,539.875 271.625,536.875Z"}),fe.jsx("path",{d:"M337,547.875C334.917,547.875 332.312,547.979 329.188,548.188C326.062,548.396 323.062,548.896 320.188,549.688C317.312,550.479 314.854,551.708 312.812,553.375C310.771,555.042 309.75,557.333 309.75,560.25C309.75,562.167 310.146,563.813 310.938,565.188C311.729,566.563 312.792,567.688 314.125,568.563C315.458,569.438 316.938,570.063 318.562,570.438C320.188,570.813 321.833,571 323.5,571C326.5,571 329.104,570.5 331.312,569.5C333.521,568.5 335.375,567.146 336.875,565.438C338.375,563.729 339.479,561.729 340.188,559.438C340.896,557.146 341.25,554.708 341.25,552.125L341.25,547.875L337,547.875ZM341.25,541.125L341.25,539.625C341.25,529.542 336.25,524.5 326.25,524.5C319.417,524.5 313.458,526.792 308.375,531.375L303.375,525.5C308.875,519.833 317.125,517 328.125,517C330.958,517 333.688,517.417 336.312,518.25C338.938,519.083 341.208,520.354 343.125,522.063C345.042,523.771 346.583,525.917 347.75,528.5C348.917,531.083 349.5,534.167 349.5,537.75L349.5,563.875C349.5,566.125 349.604,568.479 349.812,570.938C350.021,573.396 350.25,575.417 350.5,577L342.5,577C342.25,575.583 342.062,574.042 341.938,572.375C341.812,570.708 341.75,569.083 341.75,567.5L341.5,567.5C339.083,571.417 336.229,574.229 332.938,575.938C329.646,577.646 325.625,578.5 320.875,578.5C318.292,578.5 315.792,578.146 313.375,577.438C310.958,576.729 308.812,575.646 306.938,574.188C305.062,572.729 303.562,570.938 302.438,568.813C301.312,566.688 300.75,564.208 300.75,561.375C300.75,556.625 301.979,552.896 304.438,550.188C306.896,547.479 309.979,545.458 313.688,544.125C317.396,542.792 321.354,541.958 325.562,541.625C329.771,541.292 333.625,541.125 337.125,541.125L341.25,541.125Z"}),fe.jsx("path",{d:"M376.5,518.5C376.667,520.083 376.771,521.646 376.812,523.188C376.854,524.729 376.875,526.292 376.875,527.875L377.125,527.875C378.042,526.292 379.208,524.833 380.625,523.5C382.042,522.167 383.625,521.021 385.375,520.063C387.125,519.104 388.979,518.354 390.938,517.813C392.896,517.271 394.833,517 396.75,517C404.25,517 409.792,518.979 413.375,522.938C416.958,526.896 418.75,532.542 418.75,539.875L418.75,577L410.5,577L410.5,544.625C410.5,538.125 409.375,533.146 407.125,529.688C404.875,526.229 400.708,524.5 394.625,524.5C394.208,524.5 393.042,524.667 391.125,525C389.208,525.333 387.188,526.25 385.062,527.75C382.938,529.25 381.042,531.5 379.375,534.5C377.708,537.5 376.875,541.667 376.875,547L376.875,577L368.625,577L368.625,531.375C368.625,529.792 368.562,527.792 368.438,525.375C368.312,522.958 368.167,520.667 368,518.5L376.5,518.5Z"}),fe.jsx("path",{d:"M446,518.5C446.167,520.083 446.271,521.646 446.312,523.188C446.354,524.729 446.375,526.292 446.375,527.875L446.625,527.875C447.542,526.292 448.708,524.833 450.125,523.5C451.542,522.167 453.125,521.021 454.875,520.063C456.625,519.104 458.479,518.354 460.438,517.813C462.396,517.271 464.333,517 466.25,517C473.75,517 479.292,518.979 482.875,522.938C486.458,526.896 488.25,532.542 488.25,539.875L488.25,577L480,577L480,544.625C480,538.125 478.875,533.146 476.625,529.688C474.375,526.229 470.208,524.5 464.125,524.5C463.708,524.5 462.542,524.667 460.625,525C458.708,525.333 456.688,526.25 454.562,527.75C452.438,529.25 450.542,531.5 448.875,534.5C447.208,537.5 446.375,541.667 446.375,547L446.375,577L438.125,577L438.125,531.375C438.125,529.792 438.062,527.792 437.938,525.375C437.812,522.958 437.667,520.667 437.5,518.5L446,518.5Z"}),fe.jsx("path",{d:"M557.75,547.75C557.75,544.5 557.229,541.458 556.188,538.625C555.146,535.792 553.667,533.333 551.75,531.25C549.833,529.167 547.521,527.521 544.812,526.313C542.104,525.104 539.042,524.5 535.625,524.5C532.208,524.5 529.146,525.104 526.438,526.313C523.729,527.521 521.438,529.167 519.562,531.25C517.688,533.333 516.229,535.792 515.188,538.625C514.146,541.458 513.625,544.5 513.625,547.75C513.625,551 514.146,554.042 515.188,556.875C516.229,559.708 517.688,562.167 519.562,564.25C521.438,566.333 523.729,567.979 526.438,569.188C529.146,570.396 532.208,571 535.625,571C539.042,571 542.104,570.396 544.812,569.188C547.521,567.979 549.833,566.333 551.75,564.25C553.667,562.167 555.146,559.708 556.188,556.875C557.229,554.042 557.75,551 557.75,547.75ZM566.75,547.75C566.75,552.167 565.979,556.25 564.438,560C562.896,563.75 560.75,567 558,569.75C555.25,572.5 551.979,574.646 548.188,576.188C544.396,577.729 540.208,578.5 535.625,578.5C531.125,578.5 526.979,577.729 523.188,576.188C519.396,574.646 516.125,572.5 513.375,569.75C510.625,567 508.479,563.75 506.938,560C505.396,556.25 504.625,552.167 504.625,547.75C504.625,543.333 505.396,539.25 506.938,535.5C508.479,531.75 510.625,528.5 513.375,525.75C516.125,523 519.396,520.854 523.188,519.313C526.979,517.771 531.125,517 535.625,517C540.208,517 544.396,517.771 548.188,519.313C551.979,520.854 555.25,523 558,525.75C560.75,528.5 562.896,531.75 564.438,535.5C565.979,539.25 566.75,543.333 566.75,547.75Z"}),fe.jsx("path",{d:"M612,526L595.125,526L595.125,560.5C595.125,562.667 595.333,564.438 595.75,565.813C596.167,567.188 596.75,568.25 597.5,569C598.25,569.75 599.146,570.271 600.188,570.563C601.229,570.854 602.375,571 603.625,571C605.042,571 606.5,570.792 608,570.375C609.5,569.958 610.875,569.417 612.125,568.75L612.5,576.375C609.417,577.792 605.708,578.5 601.375,578.5C599.792,578.5 598.146,578.292 596.438,577.875C594.729,577.458 593.167,576.667 591.75,575.5C590.333,574.333 589.167,572.75 588.25,570.75C587.333,568.75 586.875,566.125 586.875,562.875L586.875,526L574.5,526L574.5,518.5L586.875,518.5L586.875,502L595.125,502L595.125,518.5L612,518.5L612,526Z"}),fe.jsx("path",{d:"M656.5,547.875C654.417,547.875 651.812,547.979 648.688,548.188C645.562,548.396 642.562,548.896 639.688,549.688C636.812,550.479 634.354,551.708 632.312,553.375C630.271,555.042 629.25,557.333 629.25,560.25C629.25,562.167 629.646,563.813 630.438,565.188C631.229,566.563 632.292,567.688 633.625,568.563C634.958,569.438 636.438,570.063 638.062,570.438C639.688,570.813 641.333,571 643,571C646,571 648.604,570.5 650.812,569.5C653.021,568.5 654.875,567.146 656.375,565.438C657.875,563.729 658.979,561.729 659.688,559.438C660.396,557.146 660.75,554.708 660.75,552.125L660.75,547.875L656.5,547.875ZM660.75,541.125L660.75,539.625C660.75,529.542 655.75,524.5 645.75,524.5C638.917,524.5 632.958,526.792 627.875,531.375L622.875,525.5C628.375,519.833 636.625,517 647.625,517C650.458,517 653.188,517.417 655.812,518.25C658.438,519.083 660.708,520.354 662.625,522.063C664.542,523.771 666.083,525.917 667.25,528.5C668.417,531.083 669,534.167 669,537.75L669,563.875C669,566.125 669.104,568.479 669.312,570.938C669.521,573.396 669.75,575.417 670,577L662,577C661.75,575.583 661.562,574.042 661.438,572.375C661.312,570.708 661.25,569.083 661.25,567.5L661,567.5C658.583,571.417 655.729,574.229 652.438,575.938C649.146,577.646 645.125,578.5 640.375,578.5C637.792,578.5 635.292,578.146 632.875,577.438C630.458,576.729 628.312,575.646 626.438,574.188C624.562,572.729 623.062,570.938 621.938,568.813C620.812,566.688 620.25,564.208 620.25,561.375C620.25,556.625 621.479,552.896 623.938,550.188C626.396,547.479 629.479,545.458 633.188,544.125C636.896,542.792 640.854,541.958 645.062,541.625C649.271,541.292 653.125,541.125 656.625,541.125L660.75,541.125Z"}),fe.jsx("path",{d:"M718.375,526L701.5,526L701.5,560.5C701.5,562.667 701.708,564.438 702.125,565.813C702.542,567.188 703.125,568.25 703.875,569C704.625,569.75 705.521,570.271 706.562,570.563C707.604,570.854 708.75,571 710,571C711.417,571 712.875,570.792 714.375,570.375C715.875,569.958 717.25,569.417 718.5,568.75L718.875,576.375C715.792,577.792 712.083,578.5 707.75,578.5C706.167,578.5 704.521,578.292 702.812,577.875C701.104,577.458 699.542,576.667 698.125,575.5C696.708,574.333 695.542,572.75 694.625,570.75C693.708,568.75 693.25,566.125 693.25,562.875L693.25,526L680.875,526L680.875,518.5L693.25,518.5L693.25,502L701.5,502L701.5,518.5L718.375,518.5L718.375,526Z"}),fe.jsx("path",{d:"M779.75,547.75C779.75,544.5 779.229,541.458 778.188,538.625C777.146,535.792 775.667,533.333 773.75,531.25C771.833,529.167 769.521,527.521 766.812,526.313C764.104,525.104 761.042,524.5 757.625,524.5C754.208,524.5 751.146,525.104 748.438,526.313C745.729,527.521 743.438,529.167 741.562,531.25C739.688,533.333 738.229,535.792 737.188,538.625C736.146,541.458 735.625,544.5 735.625,547.75C735.625,551 736.146,554.042 737.188,556.875C738.229,559.708 739.688,562.167 741.562,564.25C743.438,566.333 745.729,567.979 748.438,569.188C751.146,570.396 754.208,571 757.625,571C761.042,571 764.104,570.396 766.812,569.188C769.521,567.979 771.833,566.333 773.75,564.25C775.667,562.167 777.146,559.708 778.188,556.875C779.229,554.042 779.75,551 779.75,547.75ZM788.75,547.75C788.75,552.167 787.979,556.25 786.438,560C784.896,563.75 782.75,567 780,569.75C777.25,572.5 773.979,574.646 770.188,576.188C766.396,577.729 762.208,578.5 757.625,578.5C753.125,578.5 748.979,577.729 745.188,576.188C741.396,574.646 738.125,572.5 735.375,569.75C732.625,567 730.479,563.75 728.938,560C727.396,556.25 726.625,552.167 726.625,547.75C726.625,543.333 727.396,539.25 728.938,535.5C730.479,531.75 732.625,528.5 735.375,525.75C738.125,523 741.396,520.854 745.188,519.313C748.979,517.771 753.125,517 757.625,517C762.208,517 766.396,517.771 770.188,519.313C773.979,520.854 777.25,523 780,525.75C782.75,528.5 784.896,531.75 786.438,535.5C787.979,539.25 788.75,543.333 788.75,547.75Z"}),fe.jsx("path",{d:"M804.625,536.75C804.625,534.167 804.562,531.542 804.438,528.875C804.312,526.208 804.208,522.75 804.125,518.5L812.25,518.5L812.25,529.375L812.5,529.375C813.083,527.792 813.917,526.271 815,524.813C816.083,523.354 817.396,522.042 818.938,520.875C820.479,519.708 822.271,518.771 824.312,518.063C826.354,517.354 828.667,517 831.25,517C833.583,517 835.625,517.25 837.375,517.75L835.75,525.875C834.667,525.458 833.083,525.25 831,525.25C827.833,525.25 825.125,525.854 822.875,527.063C820.625,528.271 818.75,529.813 817.25,531.688C815.75,533.563 814.646,535.583 813.938,537.75C813.229,539.917 812.875,542 812.875,544L812.875,577L804.625,577L804.625,536.75Z"})]})}),fe.jsxs("span",{className:"version-badge",children:["v","0.5.8"]}),OS[I]&&fe.jsx("span",{className:"origin-badge",children:OS[I]}),fe.jsx("span",{className:"app-filepath",children:V})]}),fe.jsxs("div",{className:"header-right",children:[fe.jsxs("button",{onClick:pt,className:"btn btn-feedback",disabled:G===0,title:G===0?"Add annotations first":`Submit ${G} annotation(s)`,children:["Feedback",G>0&&fe.jsx("span",{className:"btn-badge",children:G})]}),fe.jsx("button",{onClick:ot,className:"btn btn-approve",disabled:G>0,title:G>0?"Remove annotations to approve":"Approve file as-is",children:"Approve"}),fe.jsxs("button",{onClick:se,className:"btn btn-icon",title:`Theme: ${f}`,"aria-label":`Theme: ${f}`,children:[f==="light"&&fe.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[fe.jsx("circle",{cx:"12",cy:"12",r:"5"}),fe.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),fe.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),fe.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),fe.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),fe.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),fe.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),fe.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),fe.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]}),f==="dark"&&fe.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:fe.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),f==="auto"&&fe.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[fe.jsx("circle",{cx:"12",cy:"12",r:"9"}),fe.jsx("path",{d:"M12 3a9 9 0 0 1 0 18",fill:"currentColor"})]})]}),fe.jsx("button",{onClick:Q,className:"btn btn-icon",title:m?"Show annotations":"Hide annotations","aria-label":m?"Show annotations":"Hide annotations",children:fe.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[fe.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),fe.jsx("line",{x1:"15",y1:"3",x2:"15",y2:"21"})]})})]})]}),fe.jsx(qDe,{files:t,activeFileIndex:r,onSelectFile:xe}),fe.jsxs("main",{className:"app-main",children:[fe.jsx(TDe,{blocks:z,annotations:P,collapsed:y,width:He}),!y&&fe.jsx("div",{className:"resize-handle",onMouseDown:ue}),fe.jsx(_De,{ref:F,blocks:z,annotations:P,onAddAnnotation:oe,onEditAnnotation:ie,onDeleteAnnotation:de,onSelectAnnotation:et,onOpenFile:tt,selectedAnnotationId:a},(O==null?void 0:O.path)||"empty"),!m&&fe.jsx("div",{className:"resize-handle",onMouseDown:Re}),fe.jsx(EDe,{annotations:P,selectedAnnotationId:a,onSelect:et,onEdit:Ce,onDelete:de,onExport:()=>T(!0),onImport:he,onAddGlobalComment:te,onEditGlobalComment:J,collapsed:m,width:at})]}),fe.jsxs("footer",{className:"app-status",children:[fe.jsx("span",{children:s}),(O==null?void 0:O.content)&&fe.jsx(ske,{content:O.content})]}),fe.jsx(CH,{isOpen:b,onClose:()=>T(!1),annotations:P,blocks:z,filePath:V,contentHash:O==null?void 0:O.contentHash,onToast:B}),fe.jsx(PDe,{isOpen:C,onClose:()=>R(!1),notesGroups:H,totalFiles:t.length}),fe.jsx(YDe,{}),N&&fe.jsx("div",{className:"toast",children:N})]})}m0e.createRoot(document.getElementById("root")).render(fe.jsx(oke,{}));class zs{constructor(e,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=r,this.end=n}static range(e,r){return r?!e||!e.loc||!r.loc||e.loc.lexer!==r.loc.lexer?null:new zs(e.loc.lexer,e.loc.start,r.loc.end):e&&e.loc}}class Eo{constructor(e,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=r}range(e,r){return new Eo(r,zs.range(this,e))}}class $t{constructor(e,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+e,a,i,s=r&&r.loc;if(s&&s.start<=s.end){var o=s.lexer.input;a=s.start,i=s.end,a===o.length?n+=" at end of input: ":n+=" at position "+(a+1)+": ";var l=o.slice(a,i).replace(/[^]/g,"$&̲"),u;a>15?u="…"+o.slice(a-15,a):u=o.slice(0,a);var d;i+15<o.length?d=o.slice(i,i+15)+"…":d=o.slice(i),n+=u+l+d}var h=new Error(n);return h.name="ParseError",h.__proto__=$t.prototype,h.position=a,a!=null&&i!=null&&(h.length=i-a),h.rawMessage=e,h}}$t.prototype.__proto__=Error.prototype;var lke=/([A-Z])/g,G8=t=>t.replace(lke,"-$1").toLowerCase(),cke={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},uke=/[&><"']/g,es=t=>String(t).replace(uke,e=>cke[e]),Jy=t=>t.type==="ordgroup"||t.type==="color"?t.body.length===1?Jy(t.body[0]):t:t.type==="font"?Jy(t.body):t,dke=new Set(["mathord","textord","atom"]),Wu=t=>dke.has(Jy(t).type),hke=t=>{var e=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(t);return e?e[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?null:e[1].toLowerCase():"_relative"},e1={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:t=>"#"+t},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(t,e)=>(e.push(t),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:t=>Math.max(0,t),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:t=>Math.max(0,t),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:t=>Math.max(0,t),cli:"-e, --max-expand <n>",cliProcessor:t=>t==="Infinity"?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};function fke(t){if(t.default)return t.default;var e=t.type,r=Array.isArray(e)?e[0]:e;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class $8{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var r in e1)if(e1.hasOwnProperty(r)){var n=e1[r];this[r]=e[r]!==void 0?n.processor?n.processor(e[r]):e[r]:fke(n)}}reportNonstrict(e,r,n){var a=this.strict;if(typeof a=="function"&&(a=a(e,r,n)),!(!a||a==="ignore")){if(a===!0||a==="error")throw new $t("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+e+"]"),n);a==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+r+" ["+e+"]"))}}useStrictBehavior(e,r,n){var a=this.strict;if(typeof a=="function")try{a=a(e,r,n)}catch{a="error"}return!a||a==="ignore"?!1:a===!0||a==="error"?!0:a==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+r+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var r=hke(e.url);if(r==null)return!1;e.protocol=r}var n=typeof this.trust=="function"?this.trust(e):this.trust;return!!n}}class xd{constructor(e,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=r,this.cramped=n}sup(){return sc[pke[this.id]]}sub(){return sc[gke[this.id]]}fracNum(){return sc[mke[this.id]]}fracDen(){return sc[_ke[this.id]]}cramp(){return sc[vke[this.id]]}text(){return sc[yke[this.id]]}isTight(){return this.size>=2}}var z8=0,Cx=1,Am=2,Nu=3,w1=4,Qo=5,H0=6,Ss=7,sc=[new xd(z8,0,!1),new xd(Cx,0,!0),new xd(Am,1,!1),new xd(Nu,1,!0),new xd(w1,2,!1),new xd(Qo,2,!0),new xd(H0,3,!1),new xd(Ss,3,!0)],pke=[w1,Qo,w1,Qo,H0,Ss,H0,Ss],gke=[Qo,Qo,Qo,Qo,Ss,Ss,Ss,Ss],mke=[Am,Nu,w1,Qo,H0,Ss,H0,Ss],_ke=[Nu,Nu,Qo,Qo,Ss,Ss,Ss,Ss],vke=[Cx,Cx,Nu,Nu,Qo,Qo,Ss,Ss],yke=[z8,Cx,Am,Nu,Am,Nu,Am,Nu],Pr={DISPLAY:sc[z8],TEXT:sc[Am],SCRIPT:sc[w1],SCRIPTSCRIPT:sc[H0]},IL=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Eke(t){for(var e=0;e<IL.length;e++)for(var r=IL[e],n=0;n<r.blocks.length;n++){var a=r.blocks[n];if(t>=a[0]&&t<=a[1])return r.name}return null}var GT=[];IL.forEach(t=>t.blocks.forEach(e=>GT.push(...e)));function Tse(t){for(var e=0;e<GT.length;e+=2)if(t>=GT[e]&&t<=GT[e+1])return!0;return!1}var Ag=80,bke=function(e,r){return"M95,"+(622+e+r)+`
414
414
  c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
415
415
  c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
416
416
  c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "md-annotator",
3
- "version": "0.5.7",
3
+ "version": "0.5.8",
4
4
  "description": "Browser-based Markdown annotator for AI-assisted review",
5
5
  "type": "module",
6
6
  "bin": {