var Il=Object.defineProperty;var El=(l,e,t)=>e in l?Il(l,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[e]=t;var Pe=(l,e,t)=>El(l,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=t(i);fetch(i.href,s)}})();function D(){}const Ll=l=>l;function qt(l){return l()}function Ue(){return Object.create(null)}function te(l){l.forEach(qt)}function Re(l){return typeof l=="function"}function Ee(l,e){return l!=l?e==e:l!==e||l&&typeof l=="object"||typeof l=="function"}function Al(l){return Object.keys(l).length===0}function Ol(l){return l??""}const Wt=typeof window<"u";let jl=Wt?()=>window.performance.now():()=>Date.now(),qe=Wt?l=>requestAnimationFrame(l):D;const ve=new Set;function Gt(l){ve.forEach(e=>{e.c(l)||(ve.delete(e),e.f())}),ve.size!==0&&qe(Gt)}function Pl(l){let e;return ve.size===0&&qe(Gt),{promise:new Promise(t=>{ve.add(e={c:l,f:t})}),abort(){ve.delete(e)}}}function a(l,e){l.appendChild(e)}function Kt(l){if(!l)return document;const e=l.getRootNode?l.getRootNode():l.ownerDocument;return e&&e.host?e:l.ownerDocument}function Dl(l){const e=_("style");return e.textContent="/* empty */",Hl(Kt(l),e),e.sheet}function Hl(l,e){return a(l.head||l,e),e.sheet}function v(l,e,t){l.insertBefore(e,t||null)}function h(l){l.parentNode&&l.parentNode.removeChild(l)}function re(l,e){for(let t=0;tl.removeEventListener(e,t,n)}function Jt(l){return function(e){e.target===this&&l.call(this,e)}}function r(l,e,t){t==null?l.removeAttribute(e):l.getAttribute(e)!==t&&l.setAttribute(e,t)}function Ut(l){return l===""?null:+l}function Tl(l){return Array.from(l.childNodes)}function B(l,e){e=""+e,l.data!==e&&(l.data=e)}function oe(l,e){l.value=e??""}function Ze(l,e,t,n){t==null?l.style.removeProperty(e):l.style.setProperty(e,t,"")}function Xe(l,e,t){for(let n=0;n>>0}function ql(l,e){const t={stylesheet:Dl(e),rules:{}};return xe.set(l,t),t}function Ye(l,e,t,n,i,s,o,c=0){const f=16.666/n;let u=`{
`;for(let k=0;k<=1;k+=f){const x=e+(t-e)*s(k);u+=k*100+`%{${o(x,1-x)}}
`}const d=u+`100% {${o(t,1-t)}}
}`,m=`__svelte_${Rl(d)}_${c}`,p=Kt(l),{stylesheet:b,rules:z}=xe.get(p)||ql(p,l);z[m]||(z[m]=!0,b.insertRule(`@keyframes ${m} ${d}`,b.cssRules.length));const g=l.style.animation||"";return l.style.animation=`${g?`${g}, `:""}${m} ${n}ms linear ${i}ms 1 both`,Ne+=1,m}function Wl(l,e){const t=(l.style.animation||"").split(", "),n=t.filter(e?s=>s.indexOf(e)<0:s=>s.indexOf("__svelte")===-1),i=t.length-n.length;i&&(l.style.animation=n.join(", "),Ne-=i,Ne||Gl())}function Gl(){qe(()=>{Ne||(xe.forEach(l=>{const{ownerNode:e}=l.stylesheet;e&&h(e)}),xe.clear())})}let we;function ye(l){we=l}function We(){if(!we)throw new Error("Function called outside component initialization");return we}function Kl(l){We().$$.on_mount.push(l)}function Jl(l){We().$$.on_destroy.push(l)}function Xt(){const l=We();return(e,t,{cancelable:n=!1}={})=>{const i=l.$$.callbacks[e];if(i){const s=Zt(e,t,{cancelable:n});return i.slice().forEach(o=>{o.call(l,s)}),!s.defaultPrevented}return!0}}function De(l,e){const t=l.$$.callbacks[e.type];t&&t.slice().forEach(n=>n.call(this,e))}const he=[],Se=[];let be=[];const Be=[],Ul=Promise.resolve();let Ve=!1;function Zl(){Ve||(Ve=!0,Ul.then(Yt))}function ze(l){be.push(l)}function Qe(l){Be.push(l)}const He=new Set;let me=0;function Yt(){if(me!==0)return;const l=we;do{try{for(;mel.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),be=e}let ke;function Ql(){return ke||(ke=Promise.resolve(),ke.then(()=>{ke=null})),ke}function Te(l,e,t){l.dispatchEvent(Zt(`${e?"intro":"outro"}${t}`))}const Fe=new Set;let ce;function de(){ce={r:0,c:[],p:ce}}function pe(){ce.r||te(ce.c),ce=ce.p}function Q(l,e){l&&l.i&&(Fe.delete(l),l.i(e))}function ee(l,e,t,n){if(l&&l.o){if(Fe.has(l))return;Fe.add(l),ce.c.push(()=>{Fe.delete(l),n&&(t&&l.d(1),n())}),l.o(e)}else n&&n()}const $l={duration:0};function $e(l,e,t,n){let s=e(l,t,{direction:"both"}),o=n?0:1,c=null,f=null,u=null,d;function m(){u&&Wl(l,u)}function p(z,g){const k=z.b-o;return g*=Math.abs(k),{a:o,b:z.b,d:k,duration:g,start:z.start,end:z.start+g,group:z.group}}function b(z){const{delay:g=0,duration:k=300,easing:x=Ll,tick:C=D,css:L}=s||$l,O={start:jl()+g,b:z};z||(O.group=ce,ce.r+=1),"inert"in l&&(z?d!==void 0&&(l.inert=d):(d=l.inert,l.inert=!0)),c||f?f=O:(L&&(m(),u=Ye(l,o,z,k,g,x,L)),z&&C(0,1),c=p(O,k),ze(()=>Te(l,z,"start")),Pl(A=>{if(f&&A>f.start&&(c=p(f,k),f=null,Te(l,c.b,"start"),L&&(m(),u=Ye(l,o,c.b,c.duration,0,x,s.css))),c){if(A>=c.end)C(o=c.b,1-o),Te(l,c.b,"end"),f||(c.b?m():--c.group.r||te(c.group.c)),c=null;else if(A>=c.start){const H=A-c.start;o=c.a+c.d*x(H/c.duration),C(o,1-o)}}return!!(c||f)}))}return{run(z){Re(s)?Ql().then(()=>{s=s({direction:z?"in":"out"}),b(z)}):b(z)},end(){m(),c=f=null}}}function Z(l){return(l==null?void 0:l.length)!==void 0?l:Array.from(l)}function en(l,e){ee(l,1,1,()=>{e.delete(l.key)})}function tn(l,e,t,n,i,s,o,c,f,u,d,m){let p=l.length,b=s.length,z=p;const g={};for(;z--;)g[l[z].key]=z;const k=[],x=new Map,C=new Map,L=[];for(z=b;z--;){const N=m(i,s,z),S=t(N);let y=o.get(S);y?L.push(()=>y.p(N,e)):(y=u(S,N),y.c()),x.set(S,k[z]=y),S in g&&C.set(S,Math.abs(z-g[S]))}const O=new Set,A=new Set;function H(N){Q(N,1),N.m(c,d),o.set(N.key,N),d=N.first,b--}for(;p&&b;){const N=k[b-1],S=l[p-1],y=N.key,P=S.key;N===S?(d=N.first,p--,b--):x.has(P)?!o.has(y)||O.has(y)?H(N):A.has(P)?p--:C.get(y)>C.get(P)?(A.add(y),H(N)):(O.add(P),p--):(f(S,o),p--)}for(;p--;){const N=l[p];x.has(N.key)||f(N,o)}for(;b;)H(k[b-1]);return te(L),k}function et(l,e,t){const n=l.$$.props[e];n!==void 0&&(l.$$.bound[n]=t,t(l.$$.ctx[n]))}function Ie(l){l&&l.c()}function Ce(l,e,t){const{fragment:n,after_update:i}=l.$$;n&&n.m(e,t),ze(()=>{const s=l.$$.on_mount.map(qt).filter(Re);l.$$.on_destroy?l.$$.on_destroy.push(...s):te(s),l.$$.on_mount=[]}),i.forEach(ze)}function Me(l,e){const t=l.$$;t.fragment!==null&&(Yl(t.after_update),te(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function ln(l,e){l.$$.dirty[0]===-1&&(he.push(l),Zl(),l.$$.dirty.fill(0)),l.$$.dirty[e/31|0]|=1<{const z=b.length?b[0]:p;return u.ctx&&i(u.ctx[m],u.ctx[m]=z)&&(!u.skip_bound&&u.bound[m]&&u.bound[m](z),d&&ln(l,m)),p}):[],u.update(),d=!0,te(u.before_update),u.fragment=n?n(u.ctx):!1,e.target){if(e.hydrate){const m=Tl(e.target);u.fragment&&u.fragment.l(m),m.forEach(h)}else u.fragment&&u.fragment.c();e.intro&&Q(l.$$.fragment),Ce(l,e.target,e.anchor),Yt()}ye(f)}class Ae{constructor(){Pe(this,"$$");Pe(this,"$$set")}$destroy(){Me(this,1),this.$destroy=D}$on(e,t){if(!Re(t))return D;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const i=n.indexOf(t);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!Al(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const nn="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(nn);function sn(l){let e,t;return{c(){e=E("path"),t=E("polyline"),r(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),r(t,"points","14 2 14 8 20 8")},m(n,i){v(n,e,i),v(n,t,i)},d(n){n&&(h(e),h(t))}}}function on(l){let e,t,n,i,s;return{c(){e=E("path"),t=E("polyline"),n=E("line"),i=E("line"),s=E("polyline"),r(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),r(t,"points","14 2 14 8 20 8"),r(n,"x1","16"),r(n,"y1","13"),r(n,"x2","8"),r(n,"y2","13"),r(i,"x1","16"),r(i,"y1","17"),r(i,"x2","8"),r(i,"y2","17"),r(s,"points","10 9 9 9 8 9")},m(o,c){v(o,e,c),v(o,t,c),v(o,n,c),v(o,i,c),v(o,s,c)},d(o){o&&(h(e),h(t),h(n),h(i),h(s))}}}function rn(l){let e,t;return{c(){e=E("polyline"),t=E("polyline"),r(e,"points","16 18 22 12 16 6"),r(t,"points","8 6 2 12 8 18")},m(n,i){v(n,e,i),v(n,t,i)},d(n){n&&(h(e),h(t))}}}function fn(l){let e,t,n,i;return{c(){e=E("path"),t=E("polyline"),n=E("line"),i=E("rect"),r(e,"d","M21 8v13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8"),r(t,"points","7 3 12 8 17 3"),r(n,"x1","3"),r(n,"y1","8"),r(n,"x2","21"),r(n,"y2","8"),r(i,"x","10"),r(i,"y","12"),r(i,"width","4"),r(i,"height","4"),r(i,"rx","1")},m(s,o){v(s,e,o),v(s,t,o),v(s,n,o),v(s,i,o)},d(s){s&&(h(e),h(t),h(n),h(i))}}}function cn(l){let e,t,n,i,s;return{c(){e=E("path"),t=E("polyline"),n=E("line"),i=E("line"),s=E("line"),r(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),r(t,"points","14 2 14 8 20 8"),r(n,"x1","9"),r(n,"y1","12"),r(n,"x2","15"),r(n,"y2","12"),r(i,"x1","9"),r(i,"y1","15"),r(i,"x2","13"),r(i,"y2","15"),r(s,"x1","12"),r(s,"y1","15"),r(s,"x2","12"),r(s,"y2","18")},m(o,c){v(o,e,c),v(o,t,c),v(o,n,c),v(o,i,c),v(o,s,c)},d(o){o&&(h(e),h(t),h(n),h(i),h(s))}}}function an(l){let e,t,n,i,s,o;return{c(){e=E("path"),t=E("polyline"),n=E("line"),i=E("line"),s=E("line"),o=E("line"),r(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),r(t,"points","14 2 14 8 20 8"),r(n,"x1","8"),r(n,"y1","12"),r(n,"x2","16"),r(n,"y2","12"),r(i,"x1","8"),r(i,"y1","16"),r(i,"x2","16"),r(i,"y2","16"),r(s,"x1","8"),r(s,"y1","14"),r(s,"x2","12"),r(s,"y2","14"),r(o,"x1","12"),r(o,"y1","12"),r(o,"x2","12"),r(o,"y2","18")},m(c,f){v(c,e,f),v(c,t,f),v(c,n,f),v(c,i,f),v(c,s,f),v(c,o,f)},d(c){c&&(h(e),h(t),h(n),h(i),h(s),h(o))}}}function un(l){let e,t,n,i;return{c(){e=E("path"),t=E("polyline"),n=E("line"),i=E("line"),r(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),r(t,"points","14 2 14 8 20 8"),r(n,"x1","16"),r(n,"y1","13"),r(n,"x2","8"),r(n,"y2","13"),r(i,"x1","16"),r(i,"y1","17"),r(i,"x2","8"),r(i,"y2","17")},m(s,o){v(s,e,o),v(s,t,o),v(s,n,o),v(s,i,o)},d(s){s&&(h(e),h(t),h(n),h(i))}}}function dn(l){let e,t,n,i,s;return{c(){e=E("path"),t=E("polyline"),n=E("line"),i=E("line"),s=E("line"),r(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),r(t,"points","14 2 14 8 20 8"),r(n,"x1","8"),r(n,"y1","12"),r(n,"x2","16"),r(n,"y2","12"),r(i,"x1","8"),r(i,"y1","16"),r(i,"x2","16"),r(i,"y2","16"),r(s,"x1","8"),r(s,"y1","14"),r(s,"x2","12"),r(s,"y2","14")},m(o,c){v(o,e,c),v(o,t,c),v(o,n,c),v(o,i,c),v(o,s,c)},d(o){o&&(h(e),h(t),h(n),h(i),h(s))}}}function pn(l){let e,t,n;return{c(){e=E("path"),t=E("circle"),n=E("circle"),r(e,"d","M9 18V5l12-2v13"),r(t,"cx","6"),r(t,"cy","18"),r(t,"r","3"),r(n,"cx","18"),r(n,"cy","16"),r(n,"r","3")},m(i,s){v(i,e,s),v(i,t,s),v(i,n,s)},d(i){i&&(h(e),h(t),h(n))}}}function _n(l){let e,t;return{c(){e=E("rect"),t=E("polyline"),r(e,"x","2"),r(e,"y","4"),r(e,"width","20"),r(e,"height","16"),r(e,"rx","2"),r(t,"points","10 9 16 12 10 15 10 9")},m(n,i){v(n,e,i),v(n,t,i)},d(n){n&&(h(e),h(t))}}}function mn(l){let e,t,n;return{c(){e=E("rect"),t=E("circle"),n=E("polyline"),r(e,"x","3"),r(e,"y","3"),r(e,"width","18"),r(e,"height","18"),r(e,"rx","2"),r(e,"ry","2"),r(t,"cx","8.5"),r(t,"cy","8.5"),r(t,"r","1.5"),r(n,"points","21 15 16 10 5 21")},m(i,s){v(i,e,s),v(i,t,s),v(i,n,s)},d(i){i&&(h(e),h(t),h(n))}}}function hn(l){let e;return{c(){e=E("path"),r(e,"d","M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z")},m(t,n){v(t,e,n)},d(t){t&&h(e)}}}function vn(l){let e;function t(s,o){return s[0]==="folder"?hn:s[0]==="image"?mn:s[0]==="video"?_n:s[0]==="audio"?pn:s[0]==="pdf"?dn:s[0]==="document"?un:s[0]==="spreadsheet"?an:s[0]==="presentation"?cn:s[0]==="archive"?fn:s[0]==="code"?rn:s[0]==="text"?on:sn}let n=t(l),i=n(l);return{c(){e=E("svg"),i.c(),r(e,"width",l[1]),r(e,"height",l[1]),r(e,"viewBox","0 0 24 24"),r(e,"fill","none"),r(e,"stroke","currentColor"),r(e,"stroke-width","1.5"),r(e,"stroke-linecap","round"),r(e,"stroke-linejoin","round"),r(e,"xmlns","http://www.w3.org/2000/svg")},m(s,o){v(s,e,o),i.m(e,null)},p(s,[o]){n!==(n=t(s))&&(i.d(1),i=n(s),i&&(i.c(),i.m(e,null))),o&2&&r(e,"width",s[1]),o&2&&r(e,"height",s[1])},i:D,o:D,d(s){s&&h(e),i.d()}}}function bn(l,e,t){let{kind:n="generic"}=e,{size:i=20}=e;return l.$$set=s=>{"kind"in s&&t(0,n=s.kind),"size"in s&&t(1,i=s.size)},[n,i]}class zn extends Ae{constructor(e){super(),Le(this,e,bn,vn,Ee,{kind:0,size:1})}}function gn(l){let e,t,n;return{c(){e=E("path"),t=E("polyline"),n=E("line"),r(e,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),r(t,"points","15 3 21 3 21 9"),r(n,"x1","10"),r(n,"y1","14"),r(n,"x2","21"),r(n,"y2","3")},m(i,s){v(i,e,s),v(i,t,s),v(i,n,s)},d(i){i&&(h(e),h(t),h(n))}}}function kn(l){let e,t;return{c(){e=E("path"),t=E("line"),r(e,"d","M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"),r(t,"x1","9"),r(t,"y1","14"),r(t,"x2","15"),r(t,"y2","14")},m(n,i){v(n,e,i),v(n,t,i)},d(n){n&&(h(e),h(t))}}}function yn(l){let e,t,n,i,s,o,c,f,u;function d(b,z){return b[0]?kn:gn}let m=d(l),p=m(l);return{c(){e=_("div"),t=_("button"),n=E("svg"),p.c(),o=F(),c=_("button"),c.innerHTML='',r(n,"width","16"),r(n,"height","16"),r(n,"viewBox","0 0 24 24"),r(n,"fill","none"),r(n,"stroke","currentColor"),r(n,"stroke-width","2"),r(n,"stroke-linecap","round"),r(n,"stroke-linejoin","round"),r(t,"class","action-btn svelte-7ixqek"),r(t,"title",i=l[0]?"Open folder":"Open file"),r(t,"aria-label",s=l[0]?"Open folder":"Open file"),r(c,"class","action-btn action-btn-danger svelte-7ixqek"),r(c,"title","Delete"),r(c,"aria-label","Delete"),r(e,"class","file-actions svelte-7ixqek")},m(b,z){v(b,e,z),a(e,t),a(t,n),p.m(n,null),a(e,o),a(e,c),f||(u=[T(t,"click",l[1]),T(c,"click",l[2])],f=!0)},p(b,[z]){m!==(m=d(b))&&(p.d(1),p=m(b),p&&(p.c(),p.m(n,null))),z&1&&i!==(i=b[0]?"Open folder":"Open file")&&r(t,"title",i),z&1&&s!==(s=b[0]?"Open folder":"Open file")&&r(t,"aria-label",s)},i:D,o:D,d(b){b&&h(e),p.d(),f=!1,te(u)}}}function wn(l,e,t){let{isFolder:n=!1}=e,{fileId:i=""}=e,{nodeId:s=""}=e;const o=Xt();function c(){n?o("openFolder",s):o("open",i)}function f(){o("delete",s)}return l.$$set=u=>{"isFolder"in u&&t(0,n=u.isFolder),"fileId"in u&&t(3,i=u.fileId),"nodeId"in u&&t(4,s=u.nodeId)},[n,c,f,i,s]}class Cn extends Ae{constructor(e){super(),Le(this,e,wn,yn,Ee,{isFolder:0,fileId:3,nodeId:4})}}function tt(l){if(l==null||l<0)return"—";if(l===0)return"0 B";const e=["B","KB","MB","GB"],t=Math.min(Math.floor(Math.log(l)/Math.log(1024)),e.length-1),n=l/Math.pow(1024,t);return(t===0?n.toFixed(0):n.toFixed(1))+" "+e[t]}const Mn={"image/jpeg":"JPEG image","image/png":"PNG image","image/gif":"GIF image","image/webp":"WebP image","image/svg+xml":"SVG image","image/bmp":"BMP image","image/tiff":"TIFF image","image/avif":"AVIF image","application/pdf":"PDF document","application/msword":"Word document","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"Word document","application/vnd.ms-excel":"Excel spreadsheet","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"Excel spreadsheet","application/vnd.ms-powerpoint":"PowerPoint presentation","application/vnd.openxmlformats-officedocument.presentationml.presentation":"PowerPoint presentation","application/zip":"ZIP archive","application/gzip":"GZIP archive","application/x-tar":"TAR archive","application/x-7z-compressed":"7z archive","application/x-rar-compressed":"RAR archive","text/plain":"Text file","text/html":"HTML file","text/css":"CSS file","text/javascript":"JavaScript file","application/json":"JSON file","application/xml":"XML file","application/x-yaml":"YAML file","application/octet-stream":"Binary file","application/x-msdos-program":"Executable","inode/directory":"Folder"};function lt(l){return l?Mn[l]||l:"Unknown"}function Fn(l){if(l.type==="folder")return"folder";const e=(l.mime||"").toLowerCase();if(e.startsWith("image/"))return"image";if(e.startsWith("video/"))return"video";if(e.startsWith("audio/"))return"audio";if(e.startsWith("text/"))return"text";if(e.includes("pdf"))return"pdf";if(e.includes("word")||e.includes("document"))return"document";if(e.includes("spreadsheet")||e.includes("excel"))return"spreadsheet";if(e.includes("presentation")||e.includes("powerpoint"))return"presentation";if(e.includes("zip")||e.includes("tar")||e.includes("gzip")||e.includes("rar")||e.includes("7z")||e.includes("compress"))return"archive";if(e.includes("json")||e.includes("xml")||e.includes("yaml")||e.includes("javascript")||e.includes("css")||e.includes("html"))return"code";const n=(l.name||"").toLowerCase().split(".").pop();return["js","ts","jsx","tsx","vue","svelte","py","rs","go","c","cpp","h","hpp","java","kt","swift","rb","php","pl","sh","bash","zsh","fish","yml","yaml","json","xml","toml","ini","cfg","conf","md","markdown","css","scss","less","sass","sql","graphql","proto","gradle","cmake","makefile","dockerfile","env","gitignore"].includes(n)?"code":"generic"}function nt(l,e,t){const n=l.slice();return n[15]=e[t],n}function xn(l){let e;return{c(){e=_("span"),r(e,"class","expand-spacer svelte-1fc98j1")},m(t,n){v(t,e,n)},p:D,d(t){t&&h(e)}}}function Nn(l){let e,t,n,i,s,o;const c=[In,Sn],f=[];function u(d,m){return d[4]?0:1}return t=u(l),n=f[t]=c[t](l),{c(){e=_("button"),n.c(),r(e,"class","expand-toggle svelte-1fc98j1"),r(e,"aria-label",i=l[0][l[2].id]?"Collapse":"Expand")},m(d,m){v(d,e,m),f[t].m(e,null),s||(o=T(e,"click",l[6]),s=!0)},p(d,m){let p=t;t=u(d),t===p?f[t].p(d,m):(de(),ee(f[p],1,1,()=>{f[p]=null}),pe(),n=f[t],n?n.p(d,m):(n=f[t]=c[t](d),n.c()),Q(n,1),n.m(e,null)),m&5&&i!==(i=d[0][d[2].id]?"Collapse":"Expand")&&r(e,"aria-label",i)},d(d){d&&h(e),f[t].d(),s=!1,o()}}}function Sn(l){let e,t,n,i;return{c(){e=E("svg"),t=E("path"),r(t,"d","M9 18l6-6-6-6"),r(e,"width","10"),r(e,"height","10"),r(e,"viewBox","0 0 24 24"),r(e,"fill","currentColor")},m(s,o){v(s,e,o),a(e,t),i=!0},p(s,o){l=s},i(s){i||(s&&ze(()=>{i&&(n||(n=$e(e,rotate,l[0][l[2].id]?90:0,!0)),n.run(1))}),i=!0)},o(s){s&&(n||(n=$e(e,rotate,l[0][l[2].id]?90:0,!1)),n.run(0)),i=!1},d(s){s&&h(e),s&&n&&n.end()}}}function In(l){let e,t;return{c(){e=E("svg"),t=E("path"),r(t,"d","M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83"),r(e,"width","10"),r(e,"height","10"),r(e,"viewBox","0 0 24 24"),r(e,"fill","currentColor"),r(e,"class","spin svelte-1fc98j1")},m(n,i){v(n,e,i),a(e,t)},p:D,i:D,o:D,d(n){n&&h(e)}}}function En(l){let e,t=tt(l[2].size)+"",n,i,s,o,c,f=lt(l[2].mime)+"",u;return{c(){e=_("span"),n=I(t),i=F(),s=_("span"),s.textContent="·",o=F(),c=_("span"),u=I(f),r(s,"class","meta-sep svelte-1fc98j1")},m(d,m){v(d,e,m),a(e,n),v(d,i,m),v(d,s,m),v(d,o,m),v(d,c,m),a(c,u)},p(d,m){m&4&&t!==(t=tt(d[2].size)+"")&&B(n,t),m&4&&f!==(f=lt(d[2].mime)+"")&&B(u,f)},d(d){d&&(h(e),h(i),h(s),h(o),h(c))}}}function Ln(l){let e,t,n,i=l[1][l[2].id]&&l[1][l[2].id].length>0&&it(l);return{c(){e=_("span"),e.textContent="Folder",t=F(),i&&i.c(),n=ue()},m(s,o){v(s,e,o),v(s,t,o),i&&i.m(s,o),v(s,n,o)},p(s,o){s[1][s[2].id]&&s[1][s[2].id].length>0?i?i.p(s,o):(i=it(s),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(s){s&&(h(e),h(t),h(n)),i&&i.d(s)}}}function it(l){let e,t,n,i=l[1][l[2].id].length+"",s,o,c=l[1][l[2].id].length===1?"item":"items",f;return{c(){e=_("span"),e.textContent="·",t=F(),n=_("span"),s=I(i),o=F(),f=I(c),r(e,"class","meta-sep svelte-1fc98j1")},m(u,d){v(u,e,d),v(u,t,d),v(u,n,d),a(n,s),a(n,o),a(n,f)},p(u,d){d&6&&i!==(i=u[1][u[2].id].length+"")&&B(s,i),d&6&&c!==(c=u[1][u[2].id].length===1?"item":"items")&&B(f,c)},d(u){u&&(h(e),h(t),h(n))}}}function st(l){let e,t,n=Z(l[1][l[2].id]),i=[];for(let o=0;oee(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o{S=null}),pe())},i(y){x||(Q(i.$$.fragment,y),Q(z.$$.fragment,y),Q(S),x=!0)},o(y){ee(i.$$.fragment,y),ee(z.$$.fragment,y),ee(S),x=!1},d(y){y&&(h(e),h(g),h(k)),O.d(),Me(i),N.d(),Me(z),S&&S.d(y)}}}function On(l,...e){var t,n,i;try{const s=(i=(n=(t=window==null?void 0:window.go)==null?void 0:t.main)==null?void 0:n.App)==null?void 0:i[l];if(typeof s=="function")return s(...e)}catch(s){console.error("Wails call error:",l,s)}}function jn(l,e,t){let{item:n}=e,{expanded:i={}}=e,{childrenMap:s={}}=e,{depth:o=0}=e;const c=Xt();let f=!1;async function u(){const C=n.id;if(i[C]){t(0,i={...i,[C]:!1});return}if(t(4,f=!0),t(0,i={...i,[C]:!0}),!s[C]){try{t(1,s[C]=await On("ListItems",C)||[],s)}catch{t(1,s[C]=[],s)}t(1,s={...s})}t(4,f=!1)}const d=Fn(n),m=n.type==="folder",p=C=>c("open",C.detail),b=C=>c("openFolder",C.detail),z=C=>c("delete",C.detail);function g(C){De.call(this,l,C)}function k(C){De.call(this,l,C)}function x(C){De.call(this,l,C)}return l.$$set=C=>{"item"in C&&t(2,n=C.item),"expanded"in C&&t(0,i=C.expanded),"childrenMap"in C&&t(1,s=C.childrenMap),"depth"in C&&t(3,o=C.depth)},[i,s,n,o,f,c,u,d,m,p,b,z,g,k,x]}class Qt extends Ae{constructor(e){super(),Le(this,e,jn,An,Ee,{item:2,expanded:0,childrenMap:1,depth:3})}}function rt(l,e,t){const n=l.slice();return n[80]=e[t],n}function ft(l,e,t){const n=l.slice();return n[83]=e[t],n}function ct(l,e,t){const n=l.slice();return n[94]=e[t],n}function at(l,e,t){const n=l.slice();return n[91]=e[t],n}function ut(l,e,t){const n=l.slice();return n[86]=e[t],n}function dt(l,e,t){const n=l.slice();return n[83]=e[t],n}function pt(l,e,t){const n=l.slice();return n[86]=e[t],n}function _t(l,e,t){const n=l.slice();return n[99]=e[t],n}function mt(l,e,t){const n=l.slice();return n[80]=e[t],n}function ht(l,e,t){const n=l.slice();return n[104]=e[t],n}function vt(l,e,t){const n=l.slice();return n[107]=e[t],n}function bt(l){let e,t=l[107].label+"",n,i,s,o,c;function f(){return l[48](l[107])}return{c(){e=_("button"),n=I(t),i=F(),r(e,"class",s="nav-item "+(l[4]===l[107].id?"selected":"")+" svelte-1dzzaxf")},m(u,d){v(u,e,d),a(e,n),a(e,i),o||(c=T(e,"click",f),o=!0)},p(u,d){l=u,d[0]&1&&t!==(t=l[107].label+"")&&B(n,t),d[0]&17&&s!==(s="nav-item "+(l[4]===l[107].id?"selected":"")+" svelte-1dzzaxf")&&r(e,"class",s)},d(u){u&&h(e),o=!1,c()}}}function zt(l){let e,t,n,i,s,o=l[1].length>0&>(l),c=Z(l[1]),f=[];for(let d=0;d0?o?o.p(d,m):(o=gt(d),o.c(),o.m(t,null)):o&&(o.d(1),o=null),m[0]&268435490){c=Z(d[1]);let p;for(p=0;p0)return qn;if(c[3])return Rn}let s=i(l),o=s&&s(l);return{c(){e=_("div"),t=_("h2"),t.textContent="Верстак",n=F(),o&&o.c(),r(t,"class","svelte-1dzzaxf"),r(e,"class","welcome svelte-1dzzaxf")},m(c,f){v(c,e,f),a(e,t),a(e,n),o&&o.m(e,null)},p(c,f){s===(s=i(c))&&o?o.p(c,f):(o&&o.d(1),o=s&&s(c),o&&(o.c(),o.m(e,null)))},i:D,o:D,d(c){c&&h(e),o&&o.d()}}}function Bn(l){let e,t,n,i,s,o,c=Z(l[26]),f=[];for(let p=0;p{d[z]=null}),pe()),~i?(s=d[i],s?s.p(p,b):(s=d[i]=u[i](p),s.c()),Q(s,1),s.m(n,null)):s=null)},i(p){o||(Q(s),o=!0)},o(p){ee(s),o=!1},d(p){p&&(h(e),h(t),h(n)),re(f,p),~i&&d[i].d()}}}function Vn(l){let e,t,n,i=l[8].title+"",s,o,c,f,u,d,m,p,b,z,g,k=l[8].dirty&&Pt();return{c(){e=_("div"),t=_("div"),n=_("span"),s=I(i),o=F(),k&&k.c(),c=F(),f=_("div"),u=_("button"),u.textContent="Сохранить",d=F(),m=_("button"),m.textContent="Закрыть",p=F(),b=_("textarea"),r(n,"class","note-title svelte-1dzzaxf"),r(u,"class","btn btn-primary svelte-1dzzaxf"),r(m,"class","btn svelte-1dzzaxf"),r(f,"class","note-editor-actions svelte-1dzzaxf"),r(t,"class","note-editor-header svelte-1dzzaxf"),r(b,"class","note-textarea svelte-1dzzaxf"),r(b,"placeholder","Начните писать..."),r(e,"class","note-editor svelte-1dzzaxf")},m(x,C){v(x,e,C),a(e,t),a(t,n),a(n,s),a(t,o),k&&k.m(t,null),a(t,c),a(t,f),a(f,u),a(f,d),a(f,m),a(e,p),a(e,b),oe(b,l[8].content),z||(g=[T(u,"click",l[39]),T(m,"click",l[37]),T(b,"input",l[51]),T(b,"input",l[38])],z=!0)},p(x,C){C[0]&256&&i!==(i=x[8].title+"")&&B(s,i),x[8].dirty?k||(k=Pt(),k.c(),k.m(t,c)):k&&(k.d(1),k=null),C[0]&256&&oe(b,x[8].content)},i:D,o:D,d(x){x&&h(e),k&&k.d(),z=!1,te(g)}}}function Rn(l){let e,t,n;return{c(){e=_("p"),t=I("Ошибка: "),n=I(l[3]),r(e,"class","error-text svelte-1dzzaxf")},m(i,s){v(i,e,s),a(e,t),a(e,n)},p(i,s){s[0]&8&&B(n,i[3])},d(i){i&&h(e)}}}function qn(l){let e,t,n;return{c(){e=_("p"),e.textContent="Выберите раздел в боковой панели.",t=F(),n=_("p"),n.textContent="Или создайте новое дело кнопкой «+».",r(e,"class","svelte-1dzzaxf"),r(n,"class","hint svelte-1dzzaxf")},m(i,s){v(i,e,s),v(i,t,s),v(i,n,s)},p:D,d(i){i&&(h(e),h(t),h(n))}}}function Wn(l){let e;return{c(){e=_("p"),e.textContent="Загрузка...",r(e,"class","svelte-1dzzaxf")},m(t,n){v(t,e,n)},p:D,d(t){t&&h(e)}}}function Mt(l){let e,t=l[99].label+"",n,i,s;function o(){return l[52](l[99])}return{c(){e=_("button"),n=I(t),r(e,"class",Ol(l[47](l[99].id))+" svelte-1dzzaxf")},m(c,f){v(c,e,f),a(e,n),i||(s=T(e,"click",o),i=!0)},p(c,f){l=c},d(c){c&&h(e),i=!1,s()}}}function Gn(l){let e;return{c(){e=_("div"),e.innerHTML='Активность появится позже
',r(e,"class","empty-state svelte-1dzzaxf")},m(t,n){v(t,e,n)},p:D,i:D,o:D,d(t){t&&h(e)}}}function Kn(l){let e,t,n,i,s,o,c,f,u,d,m,p;function b(k,x){return k[10].length===0?Qn:Yn}let z=b(l),g=z(l);return{c(){e=_("div"),t=_("div"),n=_("input"),i=F(),s=_("input"),o=F(),c=_("button"),f=I("Записать"),d=F(),g.c(),r(n,"type","text"),r(n,"placeholder","Что сделано"),r(n,"class","svelte-1dzzaxf"),r(s,"type","number"),r(s,"placeholder","Мин"),r(s,"min","1"),r(s,"class","svelte-1dzzaxf"),r(c,"class","btn btn-primary svelte-1dzzaxf"),c.disabled=u=!l[12].trim()||!l[11],r(t,"class","worklog-form svelte-1dzzaxf"),r(e,"class","worklog-tab svelte-1dzzaxf")},m(k,x){v(k,e,x),a(e,t),a(t,n),oe(n,l[12]),a(t,i),a(t,s),oe(s,l[11]),a(t,o),a(t,c),a(c,f),a(e,d),g.m(e,null),m||(p=[T(n,"input",l[66]),T(s,"input",l[67]),T(c,"click",l[40])],m=!0)},p(k,x){x[0]&4096&&n.value!==k[12]&&oe(n,k[12]),x[0]&2048&&Ut(s.value)!==k[11]&&oe(s,k[11]),x[0]&6144&&u!==(u=!k[12].trim()||!k[11])&&(c.disabled=u),z===(z=b(k))&&g?g.p(k,x):(g.d(1),g=z(k),g&&(g.c(),g.m(e,null)))},i:D,o:D,d(k){k&&h(e),g.d(),m=!1,te(p)}}}function Jn(l){let e;function t(s,o){return s[9].length===0?ei:$n}let n=t(l),i=n(l);return{c(){i.c(),e=ue()},m(s,o){i.m(s,o),v(s,e,o)},p(s,o){n===(n=t(s))&&i?i.p(s,o):(i.d(1),i=n(s),i&&(i.c(),i.m(e.parentNode,e)))},i:D,o:D,d(s){s&&h(e),i.d(s)}}}function Un(l){let e,t,n,i,s,o,c,f,u,d,m,p,b,z;const g=[ni,li,ti],k=[];function x(L,O){return L[25]?0:L[22].length===0?1:2}u=x(l),d=k[u]=g[u](l);let C=l[19]&&!l[21]&&St();return{c(){e=_("div"),t=_("div"),n=_("button"),i=I("+ Добавить файл"),s=F(),o=_("button"),c=I("+ Добавить папку"),f=F(),d.c(),m=F(),C&&C.c(),r(n,"class","btn btn-primary svelte-1dzzaxf"),n.disabled=l[19],r(o,"class","btn svelte-1dzzaxf"),o.disabled=l[19],r(t,"class","tab-toolbar svelte-1dzzaxf"),r(e,"class","files-tab svelte-1dzzaxf")},m(L,O){v(L,e,O),a(e,t),a(t,n),a(n,i),a(t,s),a(t,o),a(o,c),a(e,f),k[u].m(e,null),a(e,m),C&&C.m(e,null),p=!0,b||(z=[T(n,"click",l[41]),T(o,"click",l[42])],b=!0)},p(L,O){(!p||O[0]&524288)&&(n.disabled=L[19]),(!p||O[0]&524288)&&(o.disabled=L[19]);let A=u;u=x(L),u===A?k[u].p(L,O):(de(),ee(k[A],1,1,()=>{k[A]=null}),pe(),d=k[u],d?d.p(L,O):(d=k[u]=g[u](L),d.c()),Q(d,1),d.m(e,m)),L[19]&&!L[21]?C||(C=St(),C.c(),C.m(e,null)):C&&(C.d(1),C=null)},i(L){p||(Q(d),p=!0)},o(L){ee(d),p=!1},d(L){L&&h(e),k[u].d(),C&&C.d(),b=!1,te(z)}}}function Zn(l){let e,t,n,i,s,o,c,f=l[16]&&It(l);function u(p,b){return p[7].length===0&&!p[16]?si:ii}let d=u(l),m=d(l);return{c(){e=_("div"),t=_("div"),n=_("button"),n.textContent="+ Добавить заметку",i=F(),f&&f.c(),s=F(),m.c(),r(n,"class","btn btn-primary svelte-1dzzaxf"),r(t,"class","tab-toolbar svelte-1dzzaxf"),r(e,"class","notes-tab svelte-1dzzaxf")},m(p,b){v(p,e,b),a(e,t),a(t,n),a(e,i),f&&f.m(e,null),a(e,s),m.m(e,null),o||(c=T(n,"click",l[33]),o=!0)},p(p,b){p[16]?f?f.p(p,b):(f=It(p),f.c(),f.m(e,s)):f&&(f.d(1),f=null),d===(d=u(p))&&m?m.p(p,b):(m.d(1),m=d(p),m&&(m.c(),m.m(e,null)))},i:D,o:D,d(p){p&&h(e),f&&f.d(),m.d(),o=!1,c()}}}function Xn(l){let e,t,n=l[5].title+"",i,s,o,c,f,u,d=l[5].type+"",m,p,b,z,g,k=(l[5].section||"—")+"",x,C,L,O,A,H=ae(l[5].createdAt)+"",N,S,y,P,q,G,le,U,X,K,ne,$,ie,J,R=l[7].length>0&&Lt(l),j=l[10].length>0&&Ot(l);return{c(){e=_("div"),t=_("h2"),i=I(n),s=F(),o=_("div"),c=_("div"),f=_("span"),f.textContent="Тип",u=_("span"),m=I(d),p=F(),b=_("div"),z=_("span"),z.textContent="Раздел",g=_("span"),x=I(k),C=F(),L=_("div"),O=_("span"),O.textContent="Создано",A=_("span"),N=I(H),S=F(),y=_("div"),P=_("button"),P.textContent="✏️ Новая заметка",q=F(),G=_("button"),G.textContent="📎 Добавить файл",le=F(),U=_("button"),U.textContent="⚡ Добавить действие",X=F(),K=_("button"),K.textContent="🕐 Записать время",ne=F(),R&&R.c(),$=F(),j&&j.c(),r(t,"class","svelte-1dzzaxf"),r(f,"class","meta-label svelte-1dzzaxf"),r(u,"class","svelte-1dzzaxf"),r(c,"class","meta-item svelte-1dzzaxf"),r(z,"class","meta-label svelte-1dzzaxf"),r(g,"class","svelte-1dzzaxf"),r(b,"class","meta-item svelte-1dzzaxf"),r(O,"class","meta-label svelte-1dzzaxf"),r(A,"class","svelte-1dzzaxf"),r(L,"class","meta-item svelte-1dzzaxf"),r(o,"class","meta-grid svelte-1dzzaxf"),r(P,"class","qa-btn svelte-1dzzaxf"),r(G,"class","qa-btn svelte-1dzzaxf"),r(U,"class","qa-btn svelte-1dzzaxf"),U.disabled=!0,r(U,"title","Следующий этап"),r(K,"class","qa-btn svelte-1dzzaxf"),r(y,"class","quick-actions svelte-1dzzaxf"),r(e,"class","overview svelte-1dzzaxf")},m(M,V){v(M,e,V),a(e,t),a(t,i),a(e,s),a(e,o),a(o,c),a(c,f),a(c,u),a(u,m),a(o,p),a(o,b),a(b,z),a(b,g),a(g,x),a(o,C),a(o,L),a(L,O),a(L,A),a(A,N),a(e,S),a(e,y),a(y,P),a(y,q),a(y,G),a(y,le),a(y,U),a(y,X),a(y,K),a(e,ne),R&&R.m(e,null),a(e,$),j&&j.m(e,null),ie||(J=[T(P,"click",l[53]),T(G,"click",l[54]),T(K,"click",l[55])],ie=!0)},p(M,V){V[0]&32&&n!==(n=M[5].title+"")&&B(i,n),V[0]&32&&d!==(d=M[5].type+"")&&B(m,d),V[0]&32&&k!==(k=(M[5].section||"—")+"")&&B(x,k),V[0]&32&&H!==(H=ae(M[5].createdAt)+"")&&B(N,H),M[7].length>0?R?R.p(M,V):(R=Lt(M),R.c(),R.m(e,$)):R&&(R.d(1),R=null),M[10].length>0?j?j.p(M,V):(j=Ot(M),j.c(),j.m(e,null)):j&&(j.d(1),j=null)},i:D,o:D,d(M){M&&h(e),R&&R.d(),j&&j.d(),ie=!1,te(J)}}}function Yn(l){let e,t=Z(l[10]),n=[];for(let i=0;iЗаписей работы пока нет
',r(e,"class","empty-state svelte-1dzzaxf")},m(t,n){v(t,e,n)},p:D,d(t){t&&h(e)}}}function Ft(l){let e,t,n=l[83].summary+"",i,s,o,c=l[83].minutes+"",f,u,d=ae(l[83].createdAt)+"",m,p;return{c(){e=_("div"),t=_("div"),i=I(n),s=F(),o=_("div"),f=I(c),u=I(" мин · "),m=I(d),p=F(),r(t,"class","svelte-1dzzaxf"),r(o,"class","wl-meta svelte-1dzzaxf"),r(e,"class","worklog-entry svelte-1dzzaxf")},m(b,z){v(b,e,z),a(e,t),a(t,i),a(e,s),a(e,o),a(o,f),a(o,u),a(o,m),a(e,p)},p(b,z){z[0]&1024&&n!==(n=b[83].summary+"")&&B(i,n),z[0]&1024&&c!==(c=b[83].minutes+"")&&B(f,c),z[0]&1024&&d!==(d=ae(b[83].createdAt)+"")&&B(m,d)},d(b){b&&h(e)}}}function $n(l){let e,t=Z(l[9]),n=[];for(let i=0;iДействий пока нет',r(e,"class","empty-state svelte-1dzzaxf")},m(t,n){v(t,e,n)},p:D,d(t){t&&h(e)}}}function xt(l){let e,t,n=l[94].title+"",i,s,o=l[94].type+"",c,f,u,d,m,p;function b(){return l[65](l[94])}return{c(){e=_("div"),t=_("span"),i=I(n),s=_("span"),c=I(o),f=F(),u=_("button"),u.textContent="Запустить",d=F(),r(t,"class","svelte-1dzzaxf"),r(s,"class","action-type svelte-1dzzaxf"),r(u,"class","btn btn-sm svelte-1dzzaxf"),r(e,"class","action-card svelte-1dzzaxf")},m(z,g){v(z,e,g),a(e,t),a(t,i),a(e,s),a(s,c),a(e,f),a(e,u),a(e,d),m||(p=T(u,"click",b),m=!0)},p(z,g){l=z,g[0]&512&&n!==(n=l[94].title+"")&&B(i,n),g[0]&512&&o!==(o=l[94].type+"")&&B(c,o)},d(z){z&&h(e),m=!1,p()}}}function ti(l){let e,t=[],n=new Map,i,s=Z(l[22]);const o=c=>c[91].id;for(let c=0;c',n=F(),i=_("p"),i.textContent="В этом проекте пока нет файлов",s=F(),o=_("p"),o.textContent="Добавьте файл или папку, чтобы сохранить материалы проекта.",c=F(),f=_("div"),u=_("button"),u.textContent="Добавить файл",d=F(),m=_("button"),m.textContent="Добавить папку",r(t,"class","empty-icon svelte-1dzzaxf"),r(i,"class","svelte-1dzzaxf"),r(o,"class","hint svelte-1dzzaxf"),r(u,"class","btn btn-primary svelte-1dzzaxf"),r(m,"class","btn svelte-1dzzaxf"),r(f,"class","empty-actions svelte-1dzzaxf"),r(e,"class","empty-state svelte-1dzzaxf")},m(z,g){v(z,e,g),a(e,t),a(e,n),a(e,i),a(e,s),a(e,o),a(e,c),a(e,f),a(f,u),a(f,d),a(f,m),p||(b=[T(u,"click",l[41]),T(m,"click",l[42])],p=!0)},p:D,i:D,o:D,d(z){z&&h(e),p=!1,te(b)}}}function ni(l){let e;return{c(){e=_("div"),e.innerHTML='Загрузка...
',r(e,"class","empty-state svelte-1dzzaxf")},m(t,n){v(t,e,n)},p:D,i:D,o:D,d(t){t&&h(e)}}}function Nt(l,e){let t,n,i,s,o;function c(d){e[60](d)}function f(d){e[61](d)}let u={item:e[91]};return e[23]!==void 0&&(u.expanded=e[23]),e[24]!==void 0&&(u.childrenMap=e[24]),n=new Qt({props:u}),Se.push(()=>et(n,"expanded",c)),Se.push(()=>et(n,"childrenMap",f)),n.$on("delete",e[62]),n.$on("open",e[63]),n.$on("openFolder",e[64]),{key:l,first:null,c(){t=ue(),Ie(n.$$.fragment),this.first=t},m(d,m){v(d,t,m),Ce(n,d,m),o=!0},p(d,m){e=d;const p={};m[0]&4194304&&(p.item=e[91]),!i&&m[0]&8388608&&(i=!0,p.expanded=e[23],Qe(()=>i=!1)),!s&&m[0]&16777216&&(s=!0,p.childrenMap=e[24],Qe(()=>s=!1)),n.$set(p)},i(d){o||(Q(n.$$.fragment,d),o=!0)},o(d){ee(n.$$.fragment,d),o=!1},d(d){d&&h(t),Me(n,d)}}}function St(l){let e;return{c(){e=_("div"),e.innerHTML='Сканирование...
',r(e,"class","empty-state svelte-1dzzaxf")},m(t,n){v(t,e,n)},d(t){t&&h(e)}}}function It(l){let e,t,n,i,s,o,c,f,u;return{c(){e=_("div"),t=_("input"),n=F(),i=_("div"),s=_("button"),s.textContent="Создать",o=F(),c=_("button"),c.textContent="Отмена",r(t,"type","text"),r(t,"placeholder","Название заметки"),r(t,"class","svelte-1dzzaxf"),r(s,"class","btn btn-primary svelte-1dzzaxf"),r(c,"class","btn svelte-1dzzaxf"),r(i,"class","form-actions svelte-1dzzaxf"),r(e,"class","create-form svelte-1dzzaxf")},m(d,m){v(d,e,m),a(e,t),oe(t,l[17]),a(e,n),a(e,i),a(i,s),a(i,o),a(i,c),f||(u=[T(t,"input",l[57]),T(t,"keydown",l[58]),T(s,"click",l[35]),T(c,"click",l[34])],f=!0)},p(d,m){m[0]&131072&&t.value!==d[17]&&oe(t,d[17])},d(d){d&&h(e),f=!1,te(u)}}}function ii(l){let e,t=Z(l[7]),n=[];for(let i=0;iНет заметокСоздайте первую заметку для этого дела.
',r(e,"class","empty-state svelte-1dzzaxf")},m(t,n){v(t,e,n)},p:D,d(t){t&&h(e)}}}function Et(l){let e,t,n=l[86].title+"",i,s,o,c=ae(l[86].createdAt)+"",f,u,d,m;function p(){return l[59](l[86])}return{c(){e=_("div"),t=_("div"),i=I(n),s=F(),o=_("div"),f=I(c),u=F(),r(t,"class","note-card-title svelte-1dzzaxf"),r(o,"class","note-card-date svelte-1dzzaxf"),r(e,"class","note-card svelte-1dzzaxf")},m(b,z){v(b,e,z),a(e,t),a(t,i),a(e,s),a(e,o),a(o,f),a(e,u),d||(m=T(e,"click",p),d=!0)},p(b,z){l=b,z[0]&128&&n!==(n=l[86].title+"")&&B(i,n),z[0]&128&&c!==(c=ae(l[86].createdAt)+"")&&B(f,c)},d(b){b&&h(e),d=!1,m()}}}function Lt(l){let e,t,n,i=Z(l[7].slice(0,5)),s=[];for(let o=0;ol[70].call(b)),r(d,"class","form-group svelte-1dzzaxf"),r(k,"class","btn btn-primary svelte-1dzzaxf"),r(C,"class","btn svelte-1dzzaxf"),r(g,"class","modal-actions svelte-1dzzaxf"),r(t,"class","modal svelte-1dzzaxf"),r(e,"class","modal-overlay svelte-1dzzaxf")},m(N,S){v(N,e,S),a(e,t),a(t,n),a(t,i),a(t,s),a(s,o),a(s,c),a(s,f),oe(f,l[14]),a(t,u),a(t,d),a(d,m),a(d,p),a(d,b);for(let y=0;y⚒ Верстак',i=F(),s=_("nav"),o=_("div"),c=_("div"),c.textContent="Разделы",f=F();for(let M=0;M{$[fe]=null}),pe(),A=$[O],A?A.p(M,V):(A=$[O]=ne[O](M),A.c()),Q(A,1),A.m(g,H)),!M[8]&&!M[5]?J?J.p(M,V):(J=Dt(M),J.c(),J.m(g,N)):J&&(J.d(1),J=null),M[13]?R?R.p(M,V):(R=Ht(M),R.c(),R.m(g,S)):R&&(R.d(1),R=null),M[21]&&M[20]?j?j.p(M,V):(j=Bt(M),j.c(),j.m(g,null)):j&&(j.d(1),j=null)},i(M){y||(Q(A),y=!0)},o(M){ee(A),y=!1},d(M){M&&h(e),re(q,M),G&&G.d(),X.d(),K&&K.d(),$[O].d(),J&&J.d(),R&&R.d(),j&&j.d()}}}function Y(l,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[l];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails call error:",l,t)}return Promise.reject(new Error("Wails not connected: "+l))}function ae(l){if(!l)return"";try{return new Date(l).toLocaleDateString("ru-RU",{day:"numeric",month:"short"})}catch{return l}}const Rt=l=>l.id!=="today"&&l.id!=="inbox";function ri(l,e,t){let n=[],i=[],s="",o="",c="",f=null,u="overview",d=[],m=null,p=[],b=[],z=[],g="",k="",x=!1,C="",L="clients",O=!1,A="",H=!0,N=!1,S=null,y=!1,P="",q=[],G={},le={},U=!1;const X=[{id:"overview",label:"Обзор"},{id:"notes",label:"Заметки"},{id:"files",label:"Файлы"},{id:"actions",label:"Действия"},{id:"worklog",label:"Журнал"},{id:"activity",label:"Активность"}];let K=null;Kl(async()=>{try{t(2,s=await Y("VerstakVersion")||"verstak-gui/v2"),t(0,n=await Y("ListSections")||[])}catch(w){t(3,o=String(w)),t(0,n=[{id:"today",label:"Сегодня"},{id:"inbox",label:"Неразобранное"},{id:"clients",label:"Клиенты"},{id:"projects",label:"Проекты"},{id:"recipes",label:"Рецепты"},{id:"documents",label:"Документы"},{id:"archive",label:"Архив"}])}window.runtime&&window.runtime.EventsOn&&(window.runtime.EventsOn("files-dropped",sl),K=()=>window.runtime.EventsOff("files-dropped")),t(18,H=!1)}),Jl(()=>{K&&K()});async function ne(w){t(4,c=w),t(5,f=null),t(6,u="overview"),t(7,d=[]),p=[],t(9,b=[]),t(10,z=[]),t(13,x=!1),t(3,o="");try{t(1,i=await Y("ListNodesBySection",w)||[])}catch(W){t(3,o=String(W)),t(1,i=[])}}async function $(w){t(5,f=w),t(6,u="overview"),t(7,d=[]),p=[],t(9,b=[]),t(10,z=[]),t(22,q=[]),t(23,G={}),t(24,le={}),t(8,m=null),t(13,x=!1),t(16,O=!1),t(3,o=""),await ie(w.id)}async function ie(w){try{t(7,d=await Y("ListNotes",w)||[])}catch{}try{p=await Y("ListFiles",w)||[]}catch{}try{t(9,b=await Y("ListActions",w)||[])}catch{}try{t(10,z=await Y("ListWorklog",w)||[])}catch{}}async function J(w){t(25,U=!0);try{t(22,q=await Y("ListItems",w)||[])}catch{t(22,q=[])}t(25,U=!1)}function R(){t(13,x=!0),t(14,C=""),t(15,L=c||"clients")}function j(){t(13,x=!1),t(14,C="")}async function M(){if(C.trim())try{const w=await Y("CreateNode","","case",C.trim(),L);t(13,x=!1),t(14,C=""),await ne(L)}catch(w){t(3,o=String(w))}}function V(){t(16,O=!0),t(17,A="")}function fe(){t(16,O=!1),t(17,A="")}async function se(){if(!(!A.trim()||!f))try{const w=await Y("CreateNote",f.id,A.trim());t(7,d=[...d,w&&w.id?w:{id:Date.now().toString(),title:A.trim(),createdAt:new Date().toISOString()}]),t(16,O=!1),t(17,A="")}catch{const W={id:Date.now().toString(),title:A.trim(),createdAt:new Date().toISOString()};t(7,d=[...d,W]),t(16,O=!1),t(17,A="")}}async function _e(w){if(!(m&&m.dirty&&!confirm("Несохранённые изменения. Закрыть?")))try{const W=await Y("ReadNote",w.id);t(8,m={id:w.id,title:w.title,content:W||"",dirty:!1})}catch{t(8,m={id:w.id,title:w.title,content:"# "+w.title+`
`,dirty:!1})}}function $t(){m&&m.dirty&&!confirm("Несохранённые изменения. Закрыть?")||t(8,m=null)}function el(w){m&&(t(8,m.content=w.target.value,m),t(8,m.dirty=!0,m))}async function tl(){if(m)try{await Y("SaveNote",m.id,m.content),t(8,m.dirty=!1,m)}catch{t(8,m.dirty=!1,m)}}async function ll(){const w=parseInt(g,10);if(!(!k.trim()||isNaN(w)||w<=0||!f)){try{const W=await Y("CreateWorklog",f.id,k.trim(),w);t(10,z=[...z,W&&W.id?W:{id:Date.now().toString(),nodeId:f.id,summary:k.trim(),minutes:w,createdAt:new Date().toISOString()}])}catch{t(10,z=[...z,{id:Date.now().toString(),nodeId:f.id,summary:k.trim(),minutes:w,createdAt:new Date().toISOString()}])}t(12,k=""),t(11,g="")}}async function Ge(){const w=await Y("PickFile");w&&await Oe(f.id,w)}async function nl(){const w=await Y("PickDirectory");w&&await Oe(f.id,w)}async function Oe(w,W){t(19,N=!0);try{const ge=await Y("PreviewImport",W);t(20,S=ge),P=W,t(21,y=!0)}catch(ge){t(3,o=String(ge))}t(19,N=!1)}async function je(w){try{const W=w==="copy"?await Y("AddPathCopy",f.id,P):await Y("AddPathLink",f.id,P);t(21,y=!1),t(20,S=null),t(23,G={}),t(24,le={}),await Promise.all([ie(f.id),J(f.id)])}catch(W){t(3,o=String(W))}}function il(){t(21,y=!1),t(20,S=null)}async function Ke(w){if(confirm("Удалить файл?")){console.log("deleteFile called with:",w);try{const W=await Y("DeleteFileOrFolder",w);console.log("DeleteFileOrFolder result:",W),p=p.filter(ge=>ge.nodeId!==w),t(23,G={}),t(24,le={}),await J(f.id),console.log("Tree reloaded, items:",q.length)}catch(W){console.error("deleteFile error:",W),t(3,o=String(W))}}}async function Je(w){try{await Y("OpenFile",w)}catch(W){t(3,o=String(W))}}async function sl(w){if(!w||w.length===0)return;if(!f){t(3,o="Сначала выберите дело для добавления файлов");return}const W=w[0];await Oe(f.id,W)}function ol(w){return u===w?"tab active":"tab"}const rl=w=>ne(w.id),fl=w=>$(w),cl=()=>t(3,o="");function al(){m.content=this.value,t(8,m)}const ul=w=>{t(6,u=w.id),w.id==="files"&&f&&q.length===0&&J(f.id)},dl=()=>{t(6,u="notes"),V()},pl=()=>{t(6,u="files"),Ge()},_l=()=>t(6,u="worklog"),ml=w=>_e(w);function hl(){A=this.value,t(17,A)}const vl=w=>w.key==="Enter"&&se(),bl=w=>_e(w);function zl(w){G=w,t(23,G)}function gl(w){le=w,t(24,le)}const kl=w=>Ke(w.detail),yl=w=>Je(w.detail),wl=w=>console.log("open folder",w.detail),Cl=w=>Y("RunAction",w.id);function Ml(){k=this.value,t(12,k)}function Fl(){g=Ut(this.value),t(11,g)}function xl(){C=this.value,t(14,C)}const Nl=w=>w.key==="Enter"&&M();function Sl(){L=Bl(this),t(15,L),t(0,n)}return[n,i,s,o,c,f,u,d,m,b,z,g,k,x,C,L,O,A,H,N,S,y,q,G,le,U,X,ne,$,J,R,j,M,V,fe,se,_e,$t,el,tl,ll,Ge,nl,je,il,Ke,Je,ol,rl,fl,cl,al,ul,dl,pl,_l,ml,hl,vl,bl,zl,gl,kl,yl,wl,Cl,Ml,Fl,xl,Nl,Sl,()=>je("copy"),()=>je("link")]}class fi extends Ae{constructor(e){super(),Le(this,e,ri,oi,Ee,{},null,[-1,-1,-1,-1])}}new fi({target:document.getElementById("app")});