function calculateLineDiff(e,t){let l=e.split("\n"),s=t.split("\n"),a=0,n=0,f=Math.max(l.length,s.length);for(let e=0;e<f;e++){let t=l[e]||"",f=s[e]||"";e>=l.length?a++:e>=s.length?n++:t!==f&&(a++,n++)}return{additions:a,deletions:n}}self.onmessage=function(e){let{taskId:t,fileId:l,oldContent:s,newContent:a}=e.data;try{let{additions:e,deletions:n}=calculateLineDiff(s,a);self.postMessage({taskId:t,fileId:l,result:{additions:e,deletions:n,hasChanges:e>0||n>0}})}catch(e){self.postMessage({taskId:t,fileId:l,error:e.message})}};